:root {
  --bg: #fffbf5;
  --surface: #ffffff;
  --surface-2: #fff4e6;
  --text: #1f1a14;
  --muted: #6b6258;
  --line: #f0e4d4;
  --brand: #f97316;
  --brand-ink: #c2410c;
  --brand-soft: #ffedd5;
  --sun: #f59e0b;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #b91c1c;
  --bad-soft: #fee2e2;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(31, 26, 20, .05), 0 8px 24px rgba(31, 26, 20, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --surface: #211b16;
    --surface-2: #2a221b;
    --text: #f6efe7;
    --muted: #b3a797;
    --line: #3a3027;
    --brand: #fb923c;
    --brand-ink: #fdba74;
    --brand-soft: #3b2615;
    --ok: #4ade80;
    --ok-soft: #12331f;
    --warn: #fbbf24;
    --warn-soft: #3a2c0c;
    --bad: #f87171;
    --bad-soft: #3b1515;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--brand-ink); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 24px; padding-bottom: 48px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; word-break: break-all; }
[hidden] { display: none !important; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-size: 21px; font-weight: 700; }
.brand b { color: var(--brand); font-weight: 800; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.nav a.active, .nav a:hover { color: var(--text); background: var(--surface-2); }
.mode { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.mode.prod { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 640px) {
  .topbar-in { gap: 8px; }
  .brand span { display: none; }
  .nav a { padding: 8px; font-size: 14px; }
  .mode { display: none; }
}

.footer { border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: 13px; }

/* hero: bầu trời đêm + địa cầu 3D */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; margin-bottom: 32px; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; min-height: 500px;
  background:
    radial-gradient(circle at 78% 50%, rgba(249, 115, 22, .28) 0, transparent 45%),
    url("https://unpkg.com/three-globe@2.45.4/example/img/night-sky.png") center/cover,
    linear-gradient(160deg, #0b1026 0%, #141a3d 55%, #2a1a2e 100%);
}
.hero-text { padding: 48px 8px 48px 44px; position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero p { max-width: 520px; font-size: 16.5px; margin: 0 0 22px; color: rgba(255, 255, 255, .78); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); margin-bottom: 14px; }
.sun-text { background: linear-gradient(90deg, #fde047, #fb923c 60%, #f97316); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { display: flex; gap: 8px; max-width: 500px; padding: 6px; border-radius: 16px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); }
.search input { flex: 1; border: 0; background: #fff; color: #1f1a14; }
.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stats b { display: block; font-size: 20px; color: #fdba74; }
.hero-stats span { font-size: 13px; color: rgba(255, 255, 255, .65); }
.globe-wrap { position: relative; height: 100%; min-height: 500px; }
.globe { position: absolute; inset: 0; }
/* chỉ hiện con trỏ kéo khi chuột nằm trên quả cầu (xem limitDragToGlobe trong app.js) */
.globe.on-globe { cursor: grab; }
.globe.on-globe:active { cursor: grabbing; }
/* globe.gl đặt touch-action: none cho canvas → cả khung chặn cuộn trang. Cho cuộn dọc lại;
   phần trong hình tròn thì app.js tự chặn cuộn để kéo là xoay. */
.globe canvas { touch-action: pan-y !important; }
.globe-fallback { background: url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=1000&q=70&auto=format&fit=crop") center/cover; border-radius: 50%; inset: 40px; opacity: .85; }
.globe-hint { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, .55); pointer-events: none; }
.globe-tip { background: rgba(15, 18, 40, .92); color: #fff; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; border: 1px solid rgba(251, 146, 60, .5); }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { padding: 32px 22px 8px; }
  .globe-wrap { min-height: 340px; }
}

/* thẻ điểm đến có ảnh */
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.photo-card { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; background: linear-gradient(135deg, #f97316, #f59e0b); box-shadow: var(--shadow); isolation: isolate; }
.photo-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; z-index: -2; }
.photo-card:hover > img { transform: scale(1.07); }
.photo-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .72) 100%); }
.photo-type { position: absolute; top: 12px; left: 12px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .38); backdrop-filter: blur(6px); color: #fff; }
.photo-body { position: absolute; left: 14px; right: 14px; bottom: 12px; }
.photo-name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
.photo-flag { font-size: 20px; }
.photo-price { font-size: 13.5px; color: rgba(255, 255, 255, .88); }
.photo-price b { color: #fed7aa; font-size: 15px; }

.banner { position: relative; border-radius: 24px; overflow: hidden; min-height: 260px; margin-bottom: 22px; color: #fff; display: flex; align-items: flex-end; background: linear-gradient(135deg, #f97316, #f59e0b); isolation: isolate; }
.banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 18s ease-in-out infinite alternate; }
.banner-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .7)); }
.banner-body { padding: 26px; }
.banner-body h1 { color: #fff; margin: 10px 0 4px; }
.banner-body .photo-type { position: static; }
.banner-body b { color: #fed7aa; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
.aside-photo { margin: -18px -18px 0; height: 150px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: var(--surface-2); }
.aside-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* hoạt hình lottie */
.lottie { width: 100%; aspect-ratio: 1; }
.how { margin-top: 48px; text-align: center; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.how-step { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 22px; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: var(--shadow); }
.how-step .lottie { width: 150px; height: 150px; }
.how-step b { font-size: 16.5px; margin-top: 4px; }
.how-step span { color: var(--muted); font-size: 14px; }
@media (max-width: 720px) { .how-grid { grid-template-columns: 1fr; } }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.page-head h1 { margin: 0 0 4px; }
.page-head p { margin: 0; }
.head-anim { width: 96px; height: 96px; flex: none; }
.hero-status { display: flex; align-items: center; gap: 18px; padding: 14px 20px; border-radius: 18px; margin: 8px 0 18px; background: var(--surface-2); border: 1px solid var(--line); }
.hero-status.ok { background: var(--ok-soft); }
.hero-status h3 { margin: 0 0 4px; }
.hero-status p { margin: 0; }
.status-anim { width: 110px; height: 110px; flex: none; }
.status-anim.wide { width: 180px; height: 98px; aspect-ratio: auto; }
@media (max-width: 520px) { .hero-status { flex-direction: column; text-align: center; } }

/* forms */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface); width: 100%;
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
label .req { color: var(--bad); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border: 0; border-radius: 12px; padding: 11px 18px;
  background: var(--brand); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }

/* tabs / chips */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 16px; }
.tab { font: inherit; font-size: 14px; cursor: pointer; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); }
.tab.active { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); font-weight: 600; }
.chip { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); margin: 2px 4px 2px 0; }

/* cards & grid */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
a.card { text-decoration: none; color: inherit; transition: transform .12s, border-color .12s; }
a.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.dest { display: flex; gap: 12px; align-items: center; }
.flag { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-size: 26px; background: var(--surface-2); overflow: hidden; }
.flag img { width: 100%; height: 100%; object-fit: cover; }
.dest-name { font-weight: 700; }
.price { font-weight: 800; color: var(--brand-ink); }

.cols { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* packages */
.pkgs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.pkg { display: flex; flex-direction: column; gap: 10px; }
.pkg-data { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pkg-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.pkg-foot .price { font-size: 18px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; }

.notice { border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--surface-2); color: var(--muted); }

.badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* order */
.steps { display: flex; gap: 0; margin: 18px 0 8px; }
.step { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); position: relative; padding-top: 22px; }
.step::before { content: ""; position: absolute; top: 6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--line); z-index: 1; }
.step::after { content: ""; position: absolute; top: 11px; left: -50%; width: 100%; height: 2px; background: var(--line); }
.step:first-child::after { display: none; }
.step.done { color: var(--text); font-weight: 600; }
.step.done::before, .step.done::after { background: var(--brand); }
.step.fail::before { background: var(--bad); }

.sim { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
@media (max-width: 600px) { .sim { grid-template-columns: 1fr; } }
.qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 10px; display: grid; place-items: center; border: 1px solid var(--line); }
.qr img, .qr canvas { width: 180px !important; height: 180px !important; }

.bar { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 8px 0; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--brand)); border-radius: 999px; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table-scroll { overflow-x: auto; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 50; max-width: calc(100% - 32px); }

.back { display: inline-block; margin-bottom: 12px; text-decoration: none; color: var(--muted); font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 16px; }
.flag-img { width: 1.35em; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; vertical-align: -0.15em; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.flag .flag-img { width: 30px; height: auto; }
.globe-wrap { min-width: 0; overflow: hidden; }
.globe canvas { max-width: 100%; }
@media (max-width: 520px) {
  .search .btn { padding: 11px 14px; }
  .hero-stats { gap: 18px; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-name { font-size: 16px; }
}

/* chọn ngôn ngữ */
.lang { position: relative; flex: none; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 38px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand-ink); }
.lang-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
.lang-btn .caret { opacity: .6; transition: transform .15s; }
.lang-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(31, 26, 20, .16);
}
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 9px 12px;
  border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer;
}
.lang-menu button:hover, .lang-menu button:focus-visible { outline: none; background: var(--surface-2); }
.lang-menu button small { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .05em; }
.lang-menu button[aria-checked="true"] { color: var(--brand-ink); font-weight: 700; }
.lang-menu button[aria-checked="true"] small { color: var(--brand-ink); }
@media (max-width: 640px) {
  .lang-btn { padding: 0 8px; gap: 3px; }
  .lang-btn .caret { display: none; }
  .nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}

/* font cho chữ Ấn / Nga / Trung / Hàn / Nhật (nạp theo ngôn ngữ, xem i18n.js) */
html[lang="hi"] body { font-family: "Be Vietnam Pro", "Noto Sans Devanagari", system-ui, sans-serif; }
html[lang="ru"] body { font-family: "Be Vietnam Pro", "Noto Sans", system-ui, sans-serif; }
html[lang="zh"] body { font-family: "Be Vietnam Pro", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
html[lang="ko"] body { font-family: "Be Vietnam Pro", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
html[lang="ja"] body { font-family: "Be Vietnam Pro", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif; }
@media (max-width: 420px) {
  .topbar-in { gap: 6px; }
  .nav { gap: 0; }
  .nav a { padding: 7px 6px; font-size: 13.5px; }
  .lang-btn { padding: 0 7px; height: 34px; }
}

/* thẻ Việt Nam nổi bật: rộng 2 cột, cao 2 hàng, luôn đứng đầu */
.photo-grid { grid-auto-flow: dense; }
.photo-card.featured { grid-column: span 2; grid-row: span 2; box-shadow: 0 0 0 2px var(--brand), 0 14px 36px rgba(249, 115, 22, .28); }
.featured .photo-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .05) 25%, rgba(0, 0, 0, .25) 50%, rgba(0, 0, 0, .8) 100%); }
.featured .photo-body { left: 24px; right: 24px; bottom: 22px; }
.featured .photo-name { font-size: clamp(28px, 3.6vw, 42px); gap: 12px; }
.featured .photo-flag { font-size: .8em; }
.featured .flag-img { width: 1.3em; }
.feat-badge { top: 16px; left: 16px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; background: var(--brand); backdrop-filter: none; box-shadow: 0 4px 14px rgba(249, 115, 22, .45); }
.feat-tagline { margin: 6px 0 14px; max-width: 34ch; font-size: 15.5px; line-height: 1.45; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.feat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.featured .photo-price { font-size: 15px; }
.featured .photo-price b { font-size: 24px; }
.featured .btn { pointer-events: none; }
@media (max-width: 520px) {
  .featured .photo-body { left: 16px; right: 16px; bottom: 14px; }
  .featured .photo-name { font-size: 26px; }
  .feat-tagline { font-size: 13.5px; margin: 4px 0 10px; }
  .featured .photo-price b { font-size: 19px; }
}

/* ---------- tài khoản: nút trên thanh đầu trang ---------- */
.auth-slot { position: relative; flex: none; }
.auth-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .6); transition: background .15s, transform .15s;
}
.auth-btn:hover { background: var(--brand-ink); }
.auth-btn:active { transform: translateY(1px); }
.avatar-btn { display: block; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 999px; }
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 999px;
  background: linear-gradient(135deg, #fb923c, #f59e0b); color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-soft);
}
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.avatar-btn:focus-visible { outline: none; }
.avatar-btn:focus-visible .avatar, .avatar-btn[aria-expanded="true"] .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; min-width: 250px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(31, 26, 20, .18);
}
.user-head { display: flex; gap: 10px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-head .avatar { width: 34px; height: 34px; font-size: 14px; box-shadow: none; }
.user-head b { display: block; font-size: 14.5px; }
.user-head span { display: block; font-size: 12.5px; color: var(--muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 9px;
  color: var(--text); font: inherit; font-size: 14.5px; text-decoration: none; cursor: pointer; text-align: left;
}
.user-menu [role="menuitem"]:hover, .user-menu [role="menuitem"]:focus-visible { background: var(--surface-2); outline: none; }
.user-menu [role="menuitem"] svg { color: var(--muted); }
@media (max-width: 640px) {
  .auth-btn { width: 38px; padding: 0; justify-content: center; }
  .auth-btn span { display: none; }
}
@media (max-width: 420px) {
  .auth-btn, .avatar-btn .avatar { width: 34px; height: 34px; }
}

/* ---------- trang đăng nhập / đăng ký ---------- */
main.wrap.wide { max-width: 1280px; }
.auth {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(360px, 450px); gap: 28px; align-items: center;
}
.auth-visual {
  /* tỉ lệ 16:11 để luôn thấy đủ cả 5 người trong ảnh */
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 11; border-radius: 28px;
  background: #1c2433; box-shadow: 0 30px 60px -24px rgba(15, 23, 42, .45);
}
.auth-visual picture, .auth-visual picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-visual picture img { object-fit: cover; object-position: 20% 42%; z-index: -2; }
.auth-brand img { display: block; }
.auth-visual-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 10, 28, 0) 38%, rgba(8, 10, 28, .2) 58%, rgba(8, 10, 28, .86) 100%),
    linear-gradient(100deg, rgba(249, 115, 22, .22) 0%, rgba(249, 115, 22, 0) 45%);
}
.auth-visual-text { position: absolute; left: 36px; right: 36px; bottom: 34px; color: #fff; }
.auth-brand {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 8px; border-radius: 999px; font-weight: 700; font-size: 16px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .24); backdrop-filter: blur(10px);
}
.auth-brand b { color: #fdba74; font-weight: 800; }
.auth-visual h2 {
  font-size: clamp(28px, 2.7vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1;
  margin: 16px 0 16px; max-width: 17ch; text-wrap: balance; text-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}
.auth-perks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.auth-perks li {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 10px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: rgba(12, 15, 36, .48); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(8px);
}
.auth-perks svg { width: 16px; height: 16px; color: #4ade80; }
.auth-panel { display: flex; align-items: center; }
.auth-card {
  width: 100%; padding: 30px 30px 24px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(31, 26, 20, .05), 0 24px 50px -20px rgba(31, 26, 20, .22);
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.auth-note {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px 12px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 600;
}
.auth-note svg { width: 16px; height: 16px; flex: none; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg a { position: relative; z-index: 1; padding: 9px 10px; border-radius: 10px; text-align: center; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .2s; }
.seg a[aria-selected="true"] { color: var(--text); }
.seg a:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.seg-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 12px rgba(0, 0, 0, .07);
}
.seg-thumb.right { transform: translateX(100%); }
.auth-card h1 { font-size: 28px; margin: 22px 0 6px; }
.auth-sub { margin: 0 0 20px; color: var(--muted); }
.field { display: block; margin: 0 0 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; }
.field-box { position: relative; display: flex; align-items: center; }
.field-box > svg { position: absolute; left: 14px; color: var(--muted); pointer-events: none; transition: color .15s; }
.field-box:focus-within > svg { color: var(--brand); }
.field-box input { height: 48px; padding-left: 44px; border-radius: 13px; }
.field-box:has(.pw-toggle) input { padding-right: 48px; }
.pw-toggle {
  position: absolute; right: 6px; display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer;
}
.pw-toggle:hover, .pw-toggle:focus-visible { color: var(--text); background: var(--surface-2); outline: none; }
.field-hint { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
#authErr .notice { margin: 2px 0 12px; }
#authErr .notice a { color: inherit; font-weight: 700; }
.auth-submit { height: 50px; margin-top: 4px; font-size: 15.5px; box-shadow: 0 12px 24px -10px rgba(249, 115, 22, .7); }
.auth-submit svg { transition: transform .2s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit.loading { cursor: progress; }
.auth-submit.loading svg { animation: auth-nudge .8s ease-in-out infinite alternate; }
@keyframes auth-nudge { to { transform: translateX(5px); } }
.auth-forgot { margin: -6px 0 12px; text-align: right; font-size: 13.5px; }
.auth-forgot.center { margin: 16px 0 0; text-align: center; }
.auth-forgot a { color: var(--muted); font-weight: 600; text-decoration: none; }
.auth-forgot a:hover { color: var(--brand); }
.auth-sent { text-align: center; }
.auth-sent-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: var(--brand); background: color-mix(in srgb, var(--brand) 13%, transparent); }
.auth-sent-ico svg { width: 30px; height: 30px; }
.auth-sent h1 { margin-top: 16px; }
.pw-card { max-width: 460px; margin: 28px auto; padding: 26px 26px 22px; }
.pw-card h1 { font-size: 26px; margin: 4px 0 6px; }
.act-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.act-code code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; overflow-wrap: anywhere; padding: 5px 9px; border-radius: 8px; background: var(--surface-2); }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 14.5px; }
.auth-switch a { font-weight: 700; text-decoration: none; }
.auth-secure {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; padding-top: 14px;
  border-top: 1px dashed var(--line); color: var(--muted); font-size: 12.5px; text-align: center;
}
.auth-secure svg { width: 15px; height: 15px; flex: none; color: var(--ok); }
@media (max-width: 899px) {
  body.auth-page main.wrap { padding-top: 0; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 0; }
  .auth-visual { aspect-ratio: auto; height: clamp(300px, 50vh, 440px); margin: 0 -16px; border-radius: 0 0 30px 30px; box-shadow: none; }
  .auth-visual picture img { object-position: 50% 30%; }
  .auth-visual-text { left: 20px; right: 20px; bottom: 62px; }
  .auth-visual h2 { font-size: 26px; margin: 12px 0 0; max-width: 15ch; }
  .auth-perks { display: none; }
  .auth-card { position: relative; margin-top: -42px; padding: 22px 20px 20px; border-radius: 24px; }
  .auth-card h1 { font-size: 24px; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-visual picture img, .auth-card, .auth-submit.loading svg { animation: none; }
}

/* ---------- trang eSIM của tôi ---------- */
.acc-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; }
.acc-id { flex: 1; min-width: 200px; }
.acc-id h1 { font-size: 24px; margin: 0 0 2px; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-actions .btn svg { width: 16px; height: 16px; }
.acc-title { margin: 28px 0 12px; }
.acc-list { display: grid; gap: 10px; }
.acc-order { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.acc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); }
.acc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.acc-go { color: var(--muted); transition: transform .15s, color .15s; }
.acc-order:hover .acc-go { color: var(--brand); transform: translateX(3px); }
.acc-empty { text-align: center; padding: 26px; }
.acc-empty p { color: var(--muted); }
.acc-anim { width: 150px; height: 150px; margin: 0 auto; }
@media (max-width: 560px) {
  .acc-order { flex-wrap: wrap; }
  .acc-side { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; padding-left: 58px; }
  .acc-go { display: none; }
}

/* chọn nhà mạng trong trang điểm đến (1 nước nhiều nhà mạng) */
.variant-bar { margin: 0 0 14px; }
.variant-title { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.variant-bar .tabs { margin: 0; }
.variant-bar .tab { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.25; text-align: left; }
.variant-bar .tab small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.variant-bar .tab.active small { color: inherit; opacity: .8; }
.chip.net { background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }

/* ---------- trang điểm đến: 3 gói gợi ý + danh sách gọn có "Xem thêm" ---------- */
.dest-banner { min-height: 200px; }
.rec-wrap { margin: 4px 0 30px; }
.rec-wrap > h2, .plist-head h2 { margin: 0 0 12px; }
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; padding-top: 6px; }
.rec {
  display: flex; flex-direction: column; padding: 20px 20px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.rec.hot { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 18px 36px -18px rgba(249, 115, 22, .55); transform: translateY(-6px); }
.rec-kind { align-self: flex-start; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 700; }
.rec.hot .rec-kind { background: var(--brand); color: #fff; }
.rec-data { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.rec-meta { margin-top: 2px; color: var(--muted); font-size: 14px; }
.rec-price { margin-top: 16px; color: var(--brand-ink); font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rec-per { margin-bottom: 14px; color: var(--muted); font-size: 12.5px; }
.rec .btn { margin-top: auto; }


.plist { margin-bottom: 22px; }
.plist-head { margin-bottom: 12px; }
.plist-head small { color: var(--muted); font-size: 15px; font-weight: 500; }
.plist-filters { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.plist-filters .tabs { margin: 0; }
.plist-filters .tabs:empty { display: none; }
.prow-list { display: grid; gap: 8px; }
.prow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.prow:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.prow[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.prow summary { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 16px; list-style: none; cursor: pointer; }
.prow summary::-webkit-details-marker { display: none; }
.prow summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 14px; }
.prow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.prow-main b { font-size: 16.5px; }
.prow-sub { color: var(--muted); font-size: 13px; }
.prow-sub .net { color: var(--brand-ink); font-weight: 700; }
.prow-price { color: var(--brand-ink); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.prow-chev { flex: none; width: 18px; height: 18px; margin-left: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) scale(.5); transition: transform .2s; }
.prow[open] .prow-chev, .cov-box[open] .prow-chev { transform: rotate(225deg) scale(.5); }
.prow-body { padding: 12px 16px 14px; border-top: 1px dashed var(--line); }
.plist-more { margin-top: 12px; }
@media (max-width: 520px) {
  .prow summary { gap: 10px; padding: 12px; }
  .prow-main b { font-size: 15.5px; }
}

.cov-box { margin-bottom: 24px; padding: 0; }
.cov-box summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; list-style: none; cursor: pointer; }
.cov-box summary::-webkit-details-marker { display: none; }
.cov-box summary > span:first-child { display: flex; flex-direction: column; }
.cov-box summary small { color: var(--muted); font-size: 13px; }
.cov-box > .table-scroll, .cov-box > p { padding: 0 18px 16px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .prow-chev { transition: none; } }

/* ---------- điện thoại: gọn, vừa màn hình (không áp dụng cho trang chủ) ---------- */
@media (max-width: 600px) {
  main.wrap > h1, main.wrap > .row > h1, .page-head h1, .banner-body h1, .acc-id h1, .auth-card h1 { font-size: 22px; }
  .dest-banner { min-height: 150px; margin-bottom: 14px; border-radius: 18px; }
  .dest-banner .banner-body { padding: 18px; }
  .variant-bar { margin-bottom: 10px; }
  .variant-title { margin-bottom: 6px; }
  /* các dòng nút chọn: 1 hàng vuốt ngang thay vì gãy nhiều hàng */
  .variant-bar .tabs, .plist-filters .tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px;
  }
  .variant-bar .tabs::-webkit-scrollbar, .plist-filters .tabs::-webkit-scrollbar { display: none; }
  .variant-bar .tab, .plist-filters .tab { flex: none; padding: 6px 12px; font-size: 13.5px; }
  .plist-filters { flex-direction: column; gap: 8px; }
  .rec-wrap { margin-bottom: 20px; }
  .rec-wrap > h2, .plist-head h2 { font-size: 19px; margin-bottom: 8px; }
  /* mỗi dòng gói: [dung lượng + thời hạn | giá / nút Mua | mũi tên] */
  .prow summary {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; grid-template-areas: "main price chev" "main buy chev";
    gap: 4px 10px; padding: 10px 10px 10px 14px;
  }
  .prow-main { grid-area: main; }
  .prow-price { grid-area: price; justify-self: end; font-size: 15px; }
  .prow summary .btn { grid-area: buy; justify-self: end; padding: 4px 12px; font-size: 12.5px; }
  .prow-chev { grid-area: chev; margin: 0; }
  .prow-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .prow-body { padding: 10px 14px 12px; }
  .cov-box summary { padding: 14px; }
  /* trang đơn: khối trạng thái thành 1 hàng gọn */
  .hero-status { flex-direction: row; text-align: left; gap: 12px; padding: 10px 14px; margin: 6px 0 14px; }
  .hero-status h3 { font-size: 16px; }
  .hero-status p { font-size: 13px; }
  .status-anim { width: 56px; height: 56px; }
  .status-anim.wide { width: 84px; height: 46px; }
  .steps { margin: 12px 0 4px; }
  .sim .qr { margin: 0 auto; }
  .page-head .head-anim { width: 64px; height: 64px; }
  .acc-head { padding: 16px; gap: 12px; }
  .avatar.lg { width: 52px; height: 52px; font-size: 22px; }
}

/* ---------- eSIM của tôi: chỉ eSIM, có lọc theo trạng thái ---------- */
.acc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.acc-top h1 { margin: 0; font-size: clamp(22px, 3vw, 30px); }
.acc-top h1 small { color: var(--muted); font-size: .62em; font-weight: 500; }
.acc-tabs { margin-bottom: 14px; }
.acc-n { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); font-size: 12px; font-weight: 700; text-align: center; }
.tab.active .acc-n { background: var(--surface); }
.esim-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.esim-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.esim-top { display: flex; align-items: flex-start; gap: 12px; }
.esim-flag { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--surface-2); color: var(--brand-ink); font-size: 22px; }
.esim-flag .flag-img { width: 30px; }
.esim-id { flex: 1; min-width: 0; }
.esim-id h3 { margin: 0; font-size: 17px; }
.esim-id h3 small { color: var(--muted); font-weight: 500; }
.esim-id p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.esim-top .badge { flex: none; }
.esim-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 13px; }
.esim-meta .mono { font-size: 12px; word-break: normal; }
.esim-meta b { margin-left: auto; color: var(--brand-ink); font-size: 15px; }
.esim-actions { display: flex; gap: 8px; }
.esim-actions .btn { flex: 1; padding: 10px 12px; }

/* ---------- danh sách gói: sắp xếp, nhóm theo số ngày, bộ lọc dạng ô chọn trên điện thoại ---------- */
.plist-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.plist-title h2 { margin: 0; }
.plist-sort { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.plist-sort select { width: auto; padding: 7px 12px; font-size: 14px; }
.plist-selects { display: none; }
.prow-group { margin: 12px 2px 0; color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.prow-group:first-child { margin-top: 0; }
@media (max-width: 600px) {
  .plist-filters { display: none; }
  .plist-title { flex-wrap: nowrap; }
  .plist-title h2 { white-space: nowrap; }
  .plist-sort span { display: none; }
  .plist-sort select { max-width: 52vw; padding: 8px 10px; font-size: 13.5px; }
  .plist-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .plist-selects label { display: flex; flex-direction: column; gap: 4px; margin: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .plist-selects select { padding: 9px 10px; font-size: 14.5px; }
  .prow-list { gap: 10px; }
  .prow summary { padding: 12px 10px 12px 14px; }
  .prow-main b { font-size: 16px; }
  .prow-sub { font-size: 13.5px; }
  .acc-top .btn { flex: none; }
  .esim-list { gap: 12px; }
}

/* gói gợi ý: điện thoại xếp đủ 3 thẻ nhỏ trong 1 màn hình */
.rec-meta .rec-net { display: block; color: var(--brand-ink); font-weight: 600; }
@media (max-width: 600px) {
  .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
  .rec { padding: 10px 8px; border-radius: 12px; text-align: center; }
  .rec.hot { transform: translateY(-4px); }
  .rec-kind { align-self: center; margin-bottom: 6px; padding: 3px 7px; font-size: 10.5px; line-height: 1.25; }
  .rec-data { font-size: 15px; line-height: 1.2; }
  .rec-meta { font-size: 12px; }
  .rec-meta .rec-x { display: none; }
  .rec-price { margin: 6px 0 10px; font-size: 15px; }
  .rec-per { display: none; }
  .rec .btn { margin-top: auto; padding: 7px 4px; font-size: 13px; }
}

/* bộ lọc danh sách gói: mỗi hàng có nhãn (máy tính); nhà mạng nằm cùng các bộ lọc khác */
.plist-filters { flex-direction: column; gap: 8px; }
.frow { display: flex; align-items: center; gap: 10px; }
.frow:has(.tabs:empty) { display: none; }
.flabel { flex: none; min-width: 84px; color: var(--muted); font-size: 13px; font-weight: 700; }
.frow .tab small { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.frow .tab.active small { color: inherit; opacity: .8; }
.plist-selects .wide { grid-column: 1 / -1; }

/* trang chủ: nút "Xem thêm điểm đến" dưới hàng thẻ đầu tiên */
.home-more { margin-top: 14px; }
.home-more:empty { display: none; }

/* đăng nhập / đăng ký trên máy tính: ảnh và form luôn cao bằng nhau, cố định — chuyển tab không xê dịch */
@media (min-width: 900px) {
  .auth { align-items: stretch; }
  .auth-visual { aspect-ratio: auto; min-height: 620px; }
  .auth-panel { align-items: stretch; }
  .auth-card { min-height: 620px; display: flex; flex-direction: column; justify-content: center; }
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
}

/* đăng nhập / đăng ký: slide giới thiệu tự chạy, chuyển bằng mờ dần */
.auth-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.1s ease; isolation: isolate; }
.auth-slide.on { opacity: 1; }
.auth-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.auth-slide .auth-visual-text h2 { margin: 0 0 8px; }
.auth-slide .auth-visual-text p { margin: 0; max-width: 44ch; color: rgba(255, 255, 255, .88); font-size: 15.5px; text-shadow: 0 1px 10px rgba(0, 0, 0, .4); }
.auth-visual > .auth-brand { position: absolute; top: 24px; left: 28px; z-index: 2; color: #fff; }
.auth-dots { position: absolute; z-index: 2; right: 28px; bottom: 30px; display: flex; gap: 8px; }
.auth-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .3s, background .3s; }
.auth-dots button.on { width: 26px; background: #fff; }
.auth-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 899px) {
  .auth-visual > .auth-brand { top: 16px; left: 20px; }
  .auth-dots { right: auto; left: 20px; bottom: 54px; }
  .auth-slide .auth-visual-text { bottom: 72px; }
  .auth-slide .auth-visual-text p { display: none; }
}
@media (prefers-reduced-motion: reduce) { .auth-slide, .auth-dots button { transition: none; } }
@media (min-width: 900px) { .auth-slide .auth-visual-text { right: 150px; } }

/* slide giới thiệu: chuyển nhanh hơn, chữ to ghi thẳng lên ảnh */
.auth-slide { transition-duration: .8s; }
.auth-slide .auth-visual-shade {
  background: linear-gradient(180deg, rgba(8, 10, 28, .25) 0%, rgba(8, 10, 28, 0) 30%, rgba(8, 10, 28, .15) 50%, rgba(8, 10, 28, .82) 100%);
}
.auth-slide .auth-visual-text h2 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.05; letter-spacing: -.025em; max-width: 14ch; text-shadow: 0 3px 24px rgba(0, 0, 0, .45); }
.auth-slide .auth-visual-text p { font-size: 18px; max-width: 38ch; }
@media (max-width: 899px) {
  .auth-slide .auth-visual-text h2 { font-size: 30px; max-width: 13ch; }
  .auth-slide .auth-visual-text p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; }
}

/* ---------- hoạt hình vẽ bằng SVG trên slide đăng nhập (chạy lại mỗi lần slide hiện) ---------- */
.fx { position: absolute; z-index: 1; pointer-events: none; }
/* chỉ ảnh SVG nằm TRONG khung mới giãn 100%; SVG tự là khung thì giữ đúng bề ngang riêng của nó */
.fx > svg { display: block; width: 100%; height: auto; overflow: visible; }
svg.fx { display: block; height: auto; overflow: visible; }
.auth-slide .auth-visual-text { z-index: 2; }
.fx-flight { top: 10%; right: 5%; width: 44%; }
.fx-pinbox { top: 8%; right: 7%; width: 36%; }
.fx-phone { top: 6%; right: 8%; width: 22%; }
.fx-globebox { top: 7%; right: 7%; width: 31%; }
.fx-cards { top: 10%; right: 9%; width: 28%; aspect-ratio: 1.05; }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fx-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fx-in { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
.fx-endpin, .fx-drop, .fx-ok, .fx-gpin { transform-box: fill-box; }
.pin-hole { fill: #fb923c; }

/* chữ trồi lên mỗi lần slide hiện */
.auth-slide.on .auth-visual-text h2 { animation: fx-rise .7s .15s cubic-bezier(.2, .8, .2, 1) both; }
.auth-slide.on .auth-visual-text p { animation: fx-rise .7s .35s cubic-bezier(.2, .8, .2, 1) both; }

/* 1 · đường bay */
.fx-route { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 11; opacity: 0; }
.on .fx-route { animation: fx-fade .5s .1s both, fx-flow 1.2s linear infinite; }
@keyframes fx-flow { to { stroke-dashoffset: -24; } }
.fx-dot { fill: #fb923c; }
.fx-ring { fill: none; stroke: #fb923c; stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.on .fx-ring { animation: fx-ping 1.6s ease-out infinite; }
@keyframes fx-ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
.fx-endpin path { fill: #fff; }
.fx-endpin { transform-origin: 50% 100%; transform: scale(0); }
.on .fx-endpin { animation: fx-pop .5s 2.3s cubic-bezier(.34, 1.56, .64, 1) both; }
.fx-plane path { fill: #fff; }
.fx-plane { opacity: 0; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.on .fx-plane { opacity: 1; }

/* 2 · ghim Việt Nam + sóng điện thoại */
.fx-ripple { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.on .fx-ripple { animation: fx-ripple 1.8s .7s ease-out infinite; }
.on .fx-ripple.r2 { animation-delay: 1.3s; }
@keyframes fx-ripple { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.3); opacity: 0; } }
.fx-drop path { fill: #fff; }
.fx-drop { transform-origin: 50% 100%; opacity: 0; }
.on .fx-drop { animation: fx-drop .9s .1s cubic-bezier(.3, 1.4, .6, 1) both; }
@keyframes fx-drop { 0% { transform: translateY(-40px); opacity: 0; } 50% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.fx-bars rect { fill: rgba(255, 255, 255, .28); }
.on .fx-bars rect { animation: fx-bar .3s calc(.9s + var(--i) * .22s) both; }
@keyframes fx-bar { to { fill: #fff; } }
.fx-chip {
  position: absolute; left: 0; bottom: -4%; display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  background: rgba(12, 15, 36, .55); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(8px); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap;
}
.fx-chip .flag-img { width: 20px; }
.fx-chip { opacity: 0; }
.on .fx-chip { animation: fx-in .6s .9s cubic-bezier(.2, .8, .2, 1) both; }

/* 3 · điện thoại quét QR → có mạng */
.fx-body { fill: rgba(12, 15, 36, .6); stroke: #fff; stroke-width: 2.5; }
.fx-notch { fill: rgba(255, 255, 255, .55); }
.fx-qr .q-bg { fill: #fff; }
.fx-qr rect:not(.q-bg) { fill: #0b1026; }
.fx-qr rect.q-f { fill: none; stroke: #0b1026; stroke-width: 3; }
.fx-qr { opacity: 0; }
.on .fx-qr { animation: fx-fade .5s .1s both; }
.fx-scan { fill: #fb923c; opacity: 0; filter: drop-shadow(0 0 6px #fb923c); }
.on .fx-scan { animation: fx-scan 2.2s .4s ease-in-out both; }
@keyframes fx-scan { 0% { opacity: 1; transform: translateY(0); } 45% { transform: translateY(93px); } 90% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; } }
.fx-ok circle { fill: #22c55e; }
.fx-ok path { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.fx-ok { transform-origin: center; transform: scale(0); }
.on .fx-ok { animation: fx-pop .45s 2.5s cubic-bezier(.34, 1.56, .64, 1) both; }
.fx-waves path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; opacity: 0; }
.fx-waves circle { fill: #fff; opacity: 0; }
.on .fx-waves > * { animation: fx-fade .3s calc(2.7s + var(--i) * .16s) both; }

/* 4 · địa cầu xoay, ghim bật lên, đếm 200+ */
.fx-earth { fill: rgba(255, 255, 255, .1); stroke: #fff; stroke-width: 2.5; }
.fx-lat { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.5; }
.fx-mer { fill: none; stroke: rgba(255, 255, 255, .8); stroke-width: 1.8; transform-box: fill-box; transform-origin: center; }
.on .fx-mer { animation: fx-spin 3s linear infinite; }
.on .fx-mer.m2 { animation-delay: -1.5s; }
@keyframes fx-spin { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.04); } }
.fx-gpin path { fill: #fb923c; }
.fx-gpin .pin-hole { fill: #fff; }
.fx-gpin { transform-origin: 50% 100%; transform: scale(0); }
.on .fx-gpin { animation: fx-pop .45s calc(.4s + var(--i) * .25s) cubic-bezier(.34, 1.56, .64, 1) both; }
.fx-count {
  position: absolute; right: -6%; bottom: -4%; display: flex; align-items: baseline; padding: 2px 14px 4px; border-radius: 16px;
  background: rgba(12, 15, 36, .55); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(8px);
  color: #fff; font-size: clamp(30px, 3vw, 44px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15;
}
.fx-count span { color: #fdba74; }
.fx-count { opacity: 0; }
.on .fx-count { animation: fx-in .5s .3s both; }

/* 5 · thẻ eSIM xoè ra */
.fx-card {
  position: absolute; left: 24%; top: 4%; width: 52%; aspect-ratio: .64; padding: 9%; border-radius: 12px;
  display: flex; flex-direction: column; gap: 9%; background: linear-gradient(160deg, #fff, #ffedd5);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .55); transform-origin: 50% 115%; opacity: 0;
}
.on .fx-card { animation: fx-fan .8s calc(.2s + var(--i) * .15s) cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fx-fan { from { opacity: 0; transform: translateY(30px) rotate(0deg); } to { opacity: 1; transform: rotate(var(--r)); } }
.fx-chipgold { width: 36%; aspect-ratio: 1.3; border-radius: 5px; background: linear-gradient(135deg, #fde68a, #f59e0b 60%, #b45309); }
.fx-card .flag-img { position: absolute; top: 9%; right: 9%; width: 28%; border-radius: 3px; }
.fx-card i { display: block; width: 80%; height: 5%; border-radius: 99px; background: #fed7aa; }
.fx-card i.short { width: 50%; }
.fx-card b { margin-top: auto; color: #c2410c; font-size: 12px; letter-spacing: .08em; }
.fx-tick {
  position: absolute; right: -12%; bottom: -8%; display: grid; place-items: center; width: 36%; aspect-ratio: 1; border-radius: 50%;
  background: #22c55e; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transform: scale(0);
}
.fx-tick svg { width: 60%; }
.fx-tick path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.on .fx-tick { animation: fx-pop .45s 1.2s cubic-bezier(.34, 1.56, .64, 1) both; }

/* điện thoại: đo riêng — hình nhỏ hơn, nằm góc trên bên phải, không chạm chữ */
@media (max-width: 899px) {
  .fx-flight { top: 16%; right: 4%; width: 52%; }
  .fx-pinbox { top: 13%; right: 6%; width: 44%; }
  .fx-phone { top: 13%; right: 7%; width: 24%; }
  .fx-globebox { top: 12%; right: 8%; width: 33%; }
  .fx-cards { top: 15%; right: 10%; width: 28%; }
  .fx-chip { font-size: 12px; padding: 5px 10px; }
  .fx-chip .flag-img { width: 16px; }
  .fx-count { font-size: 24px; padding: 1px 10px 2px; border-radius: 12px; }
  .fx-card b { font-size: 9px; }
  .fx-card { border-radius: 8px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .fx { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fx { display: none; }
  .auth-slide.on .auth-visual-text h2, .auth-slide.on .auth-visual-text p { animation: none; }
}

/* form đăng ký: nhãn dài xuống 2 dòng vẫn giữ các ô nhập cùng hàng thẳng nhau */
@media (min-width: 900px) {
  .field-row { grid-template-rows: auto auto auto; row-gap: 0; }
  .field-row > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
  .field-row > .field .field-label { align-self: end; }
}
/* điện thoại hẹp (≤380px): tiêu đề dài 3 dòng → hình nhỏ lại, đẩy lên cao */
@media (max-width: 380px) {
  .fx-globebox { top: 9%; width: 26%; }
  .fx-count { font-size: 19px; right: -14%; bottom: -12%; }
  .fx-pinbox { top: 11%; width: 40%; }
  .fx-cards { top: 12%; width: 24%; }
}

/* giá quy đổi tham khảo: 1 dòng nhỏ, mờ dưới giá VND */
.price-fx { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-per.price-fx { margin-top: 0; }
.prow-price .price-fx { text-align: right; font-size: 11.5px; }
.price .price-fx { text-align: right; }
.price-fx-pay { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-align: right; }
@media (max-width: 600px) { .rec-per.price-fx { display: block; margin: -8px 0 10px; font-size: 11.5px; } }
/* trên ảnh (thẻ điểm đến, tiêu đề, địa cầu): cùng dòng với giá, chữ nhỏ, mờ theo màu chữ xung quanh */
.price-fx.inline { display: inline-block; margin: 0 0 0 6px; color: inherit; opacity: .78; font-size: .82em; font-weight: 600; }
