/* ==========================================================================
   Hokage Saga — Tiên Hiệp Glass
   Một ngôn ngữ thiết kế duy nhất cho landing, portal, admin.
   Chữ: Yeseva One (tiêu đề/nút/số) + Cormorant (nội dung) + Ma Shan Zheng (ấn triện Hán tự)
   ========================================================================== */
@layer tokens, base, components, utilities;

@layer tokens {
  :root {
    color-scheme: dark;
    /* Nền xanh navy đêm */
    --ink-950: #050a14; --ink-900: #07111f; --ink-800: #0a1020; --ink-700: #111a2e; --ink-600: #1a2540;
    /* Hokage Saga: gold and amber accents. Legacy aliases keep every module in sync. */
    --gold-100: #fff3d6; --gold-200: #ffe2a3; --gold-300: #ffcf7a; --gold-400: #ffb84d; --gold-500: #e89a2e; --gold-700: #7a5a1e;
    --cyan-200: #fff1cf; --cyan-300: #ffe2a3; --cyan-400: #ffb84d; --cyan-500: #ff9f3a;
    --violet-200: #ffe9c2; --violet-300: #ffcf8a; --violet-400: #ffa24d; --violet-500: #ff8a3d; --violet-600: #e0702a;
    --jade-300: var(--cyan-300); --jade-400: var(--cyan-400); --jade-500: var(--cyan-500); --jade-600: #c9821f;
    --indigo-400: #8fa6d8; --indigo-500: #6b83c4;
    --cinnabar-400: #ff7a7a; --cinnabar-500: #ee5252; --cinnabar-700: #8f2626;
    --azure-400: #8fb8ff; --mint-400: #5ff0c0;
    --text: #eef0f6; --text-hi: #fffaf0; --text-soft: #cfd5e4; --text-mute: #9aa5be; --text-faint: #6f7b96;

    --glass-1: rgb(12 18 32 / .5);
    --glass-2: rgb(16 24 42 / .58);
    --glass-3: rgb(20 30 52 / .72);
    --glass-solid: rgb(9 14 26 / .95);
    --glass-border: rgb(255 184 77 / .3);
    --glass-border-hi: rgb(255 184 77 / .6);
    --glass-blur: 0px; --glass-blur-hi: 8px;
    --glass-shadow: 0 18px 50px rgb(0 0 0 / .42), 0 0 0 1px rgb(255 184 77 / .04) inset, 0 1px 0 rgb(255 226 163 / .12) inset;
    --glow-cyan: 0 0 26px rgb(255 138 61 / .2); --glow-violet: 0 0 30px rgb(255 138 61 / .24);

    --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 22px;
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 56px;

    /* Sans hiện đại cho toàn bộ UI; serif sang trọng CHỈ cho tiêu đề chính */
    --font-display: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-serif: 'Playfair Display', 'Times New Roman', serif;
    --font-seal: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', serif;
    --fw-display: 600;

    --grad-accent: linear-gradient(135deg, #ffe2a3 0%, #ffb84d 48%, #ff8a3d 100%);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --focus: 0 0 0 3px rgb(255 184 77 / .45);
    --rail-w: 276px; --sidebar-w: 256px; --topbar-h: 64px; --tabbar-h: 64px;
  }
}

@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-size: 15px; }
  body {
    margin: 0; min-height: 100dvh; background: var(--ink-950); color: var(--text);
    font-family: var(--font-body); font-weight: 400; font-size: 1rem; line-height: 1.6;
    font-variant-numeric: lining-nums; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 var(--s-3); line-height: 1.25; color: var(--text-hi); letter-spacing: .01em; }
  h1 { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -.005em; } h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); } h3 { font-size: 1.3rem; } h4 { font-size: 1.1rem; }
  p { margin: 0 0 var(--s-3); color: var(--text-soft); }
  a { color: var(--cyan-300); text-decoration: none; transition: color .15s var(--ease); }
  a:hover { color: var(--violet-200); }
  img, svg { max-width: 100%; }
  :focus-visible { outline: 2px solid var(--cyan-400); outline-offset: 2px; border-radius: 4px; }
  ::selection { background: rgb(255 138 61 / .5); }
  hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 184 77 / .3), transparent); margin: var(--s-6) 0; }
  ::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: rgb(210 163 93 / .35); border-radius: 8px; border: 2px solid var(--ink-900); }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--cyan-400); color: var(--ink-950); padding: 8px 14px; border-radius: 8px; }
  .skip-link:focus { left: 8px; }
}

@layer components {
  /* ---------- Cảnh nền ---------- */
  /* Ảnh nền tối (navy + núi + làng lên đèn) sinh bởi scripts/gen-bg.py; giao diện là trọng tâm nên nền được hạ sáng và phủ lớp tối nhẹ */
  .scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #07111f url('/ui/img/bg/bg-1920.webp') center bottom / cover no-repeat; }
  @media (min-width: 1921px) { .scene { background-image: url('/ui/img/bg/bg-2560.webp'); } }
  @media (max-width: 720px) { .scene { background-image: url('/ui/img/bg/bg-mobile.webp'); } }
  .scene::before { content: ''; position: absolute; inset: 0; background:
    linear-gradient(180deg, rgb(7 17 31 / .34) 0%, rgb(7 17 31 / .1) 40%, rgb(7 17 31 / .18) 72%, rgb(7 17 31 / .55) 100%),
    radial-gradient(60% 45% at 50% 42%, rgb(7 17 31 / .45), transparent 70%),
    radial-gradient(90% 70% at 62% 78%, rgb(255 138 61 / .1), transparent 60%); }
  .scene .aurora, .scene .orb, .scene .moon, .scene .stars, .scene .cloud, .scene svg.scene-svg, .scene .shimmer { display: none; }
  .scene .particles { display: none; }
  .island { animation: none; }

  /* ---------- Bố cục ---------- */
  .container { width: min(1200px, 100% - 32px); margin-inline: auto; }
  .stack { display: flex; flex-direction: column; gap: var(--s-4); }
  .stack-lg { display: flex; flex-direction: column; gap: var(--s-8); }
  .row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
  .row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
  .grid { display: grid; gap: var(--s-5); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  @media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } .grid { gap: var(--s-4); } }
  .center { text-align: center; } .muted { color: var(--text-mute); } .gold { color: var(--gold-300); } .jade { color: var(--cyan-300); } .danger { color: var(--cinnabar-400); }
  .num { font-family: var(--font-display); font-weight: var(--fw-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .02em; }

  /* ---------- Kính (glass) ---------- */
  /* Kính trong, blur mạnh, viền trắng mảnh: nền cực quang lộ xuyên qua nhưng chữ vẫn rõ nhờ lớp tinh chỉnh tối nhẹ */
  .glass {
    position: relative; isolation: isolate; border-radius: var(--r-lg); padding: var(--s-6);
    background: linear-gradient(145deg, rgb(255 226 163 / .07), rgb(255 226 163 / .01) 48%, rgb(255 138 61 / .04)), var(--glass-1);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%); backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
  }
  .glass::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
    background: linear-gradient(140deg, rgb(255 226 163 / .7), rgb(255 184 77 / .08) 32%, rgb(255 184 77 / 0) 62%, rgb(255 138 61 / .5));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
  .glass::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: radial-gradient(70% 55% at 6% 0%, rgb(255 184 77 / .1), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgb(255 138 61 / .1), transparent 62%); }
  .glass--raised { background: linear-gradient(145deg, rgb(255 226 163 / .09), rgb(255 226 163 / .015) 50%, rgb(255 138 61 / .05)), var(--glass-2); }
  .glass--overlay { background: linear-gradient(145deg, rgb(255 255 255 / .18), rgb(255 255 255 / .05)), var(--glass-3);
    -webkit-backdrop-filter: blur(var(--glass-blur-hi)) saturate(190%); backdrop-filter: blur(var(--glass-blur-hi)) saturate(190%); }
  .glass--flat { background: rgb(12 18 32 / .42); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); box-shadow: none; border-color: rgb(255 184 77 / .16); border-radius: var(--r-md); }
  .glass--flat::before, .glass--flat::after { display: none; }
  .glass--tight { padding: var(--s-4); }
  .glass--hover { transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease); }
  .glass--hover:hover { transform: translateY(-4px); border-color: rgb(255 184 77 / .6); box-shadow: 0 26px 60px rgb(0 0 0 / .5), var(--glow-cyan), 0 1px 0 rgb(255 226 163 / .2) inset; }
  @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass, .glass--raised, .glass--overlay { background: var(--glass-solid); } }
  @media (prefers-reduced-transparency: reduce) { .glass, .glass--raised, .glass--overlay, .glass--flat { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
  @media (prefers-contrast: more) { .glass { background: var(--glass-solid); border-color: var(--glass-border-hi); } }
  .perf-lite .glass, .perf-lite .glass--raised, .perf-lite .glass--flat, .perf-lite .topbar, .perf-lite .sidebar, .perf-lite .appbar, .perf-lite .tabbar, .perf-lite .rail { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-solid); }

  /* ---------- Tiêu đề trang & mục ---------- */
  .page-head { margin-bottom: var(--s-6); }
  .page-head .eyebrow { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .82rem; letter-spacing: .3em; text-transform: uppercase; color: var(--cyan-300); margin-bottom: 8px; }
  .page-head .eyebrow::before { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan-300)); box-shadow: 0 0 10px var(--cyan-400); }
  .page-head p { max-width: 70ch; }
  .divider-ornate { display: flex; align-items: center; gap: 14px; margin: var(--s-6) 0; color: var(--violet-300); }
  .divider-ornate::before, .divider-ornate::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgb(255 184 77 / .5)); }
  .divider-ornate::after { transform: scaleX(-1); }
  /* Ấn triện: ô kính gradient lam – tím, chữ Hán làm điểm nhấn thương hiệu game */
  .seal { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; flex: none; color: #081a32;
    font-family: var(--font-seal); font-size: 1.7rem; line-height: 1; background: var(--grad-accent);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 6px 20px rgb(86 160 255 / .35), 0 0 0 1px rgb(255 255 255 / .18); }
  .seal--sm { width: 34px; height: 34px; font-size: 1.2rem; border-radius: 11px; } .seal--lg { width: 68px; height: 68px; font-size: 2.5rem; border-radius: 20px; }
  .chip-ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; color: var(--cyan-200);
    background: linear-gradient(145deg, rgb(255 184 77 / .22), rgb(255 138 61 / .18)); border: 1px solid rgb(255 220 161 / .28); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), var(--glow-cyan); }
  .chip-ico--violet { color: var(--violet-200); background: linear-gradient(145deg, rgb(255 138 61 / .28), rgb(91 108 240 / .16)); border-color: rgb(190 170 255 / .32); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), var(--glow-violet); }
  .chip-ico--gold { color: var(--gold-200); background: linear-gradient(145deg, rgb(221 193 255 / .24), rgb(255 138 61 / .12)); border-color: rgb(221 193 255 / .34); box-shadow: inset 0 1px 0 rgb(255 255 255 / .16); }
  .chip-ico--rose { color: #ffc4cf; background: linear-gradient(145deg, rgb(255 122 144 / .24), rgb(156 37 64 / .16)); border-color: rgb(255 122 144 / .36); }
  .icon { display: block; }

  /* ---------- Nút ---------- */
  .btn { --_bg: linear-gradient(180deg, rgb(255 255 255 / .12), rgb(255 255 255 / .04)); --_fg: var(--text-hi); --_bd: rgb(255 184 77 / .34);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 var(--s-6); border-radius: 14px; cursor: pointer;
    font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1rem; letter-spacing: .03em; text-decoration: none; white-space: nowrap; user-select: none;
    color: var(--_fg); background: var(--_bg); border: 1px solid var(--_bd); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 6px 18px rgb(0 0 0 / .35);
    transition: transform .18s var(--ease), box-shadow .22s var(--ease), filter .2s var(--ease), border-color .2s var(--ease); }
  .btn:hover { transform: translateY(-2px); color: var(--_fg); border-color: var(--glass-border-hi); box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 12px 28px rgb(0 0 0 / .45), var(--glow-cyan); }
  .btn:active { transform: translateY(0); filter: brightness(.94); }
  .btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; transform: none; filter: grayscale(.35); box-shadow: none; }
  .btn--primary { --_bg: var(--grad-accent); --_fg: #081a32; --_bd: rgb(255 255 255 / .45);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 8px 26px rgb(255 184 77 / .38); }
  .btn--primary:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 14px 34px rgb(255 184 77 / .55), 0 0 30px rgb(164 139 255 / .45); border-color: #fff; }
  .btn--jade { --_bg: linear-gradient(135deg, #5ff0c0, #3bc7d8); --_fg: #03201d; --_bd: rgb(255 255 255 / .4); }
  .btn--danger { --_bg: linear-gradient(135deg, #ff7a90, #d13a63); --_fg: #fff; --_bd: rgb(255 190 200 / .5); }
  .btn--ghost { --_bg: transparent; --_bd: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; } .btn--ghost:hover { --_bg: rgb(255 255 255 / .07); box-shadow: none; }
  .btn--sm { min-height: 38px; padding: 0 var(--s-4); font-size: .9rem; border-radius: 12px; } .btn--lg { min-height: 58px; padding: 0 var(--s-8); font-size: 1.15rem; border-radius: 16px; }
  .btn--block { width: 100%; }
  .btn .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ---------- Form ---------- */
  .field { display: flex; flex-direction: column; gap: 7px; }
  .field > label, .label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-200); }
  .input, .select, .textarea {
    width: 100%; min-height: 50px; padding: 8px 16px; border-radius: 14px; color: var(--text-hi); font: inherit; font-size: 1.2rem;
    background: rgb(8 12 24 / .55); border: 1px solid rgb(255 184 77 / .26); box-shadow: inset 0 2px 10px rgb(0 0 0 / .35); transition: border-color .15s, box-shadow .15s, background .15s;
  }
  .textarea { min-height: 110px; resize: vertical; } .select { appearance: none; padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23ffda91' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
  .select option { background: var(--ink-800); }
  .input::placeholder, .textarea::placeholder { color: var(--text-faint); }
  .input:hover, .select:hover, .textarea:hover { border-color: rgb(255 184 77 / .5); }
  .input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--cyan-400); background-color: rgb(8 12 24 / .7); box-shadow: var(--focus), inset 0 2px 10px rgb(0 0 0 / .3); }
  .input[aria-invalid='true'] { border-color: var(--cinnabar-400); }
  .hint { font-size: 1rem; color: var(--text-mute); } .error-text { font-size: 1.02rem; color: var(--cinnabar-400); }
  .check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; } .check input { width: 20px; height: 20px; accent-color: var(--violet-500); margin-top: 3px; }

  /* ---------- Badge, thẻ, chip ---------- */
  .badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 13px; border-radius: 999px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--violet-200); background: rgb(255 138 61 / .16); border: 1px solid rgb(255 138 61 / .42); white-space: nowrap; }
  .badge--jade { color: var(--cyan-200); background: rgb(255 184 77 / .13); border-color: rgb(255 184 77 / .45); }
  .badge--danger { color: #ffc0cb; background: rgb(255 122 144 / .15); border-color: rgb(255 122 144 / .5); }
  .badge--azure { color: var(--azure-400); background: rgb(124 196 255 / .13); border-color: rgb(124 196 255 / .42); }
  .badge--mute { color: var(--text-mute); background: rgb(255 255 255 / .06); border-color: rgb(255 255 255 / .16); }
  .stat { display: flex; flex-direction: column; gap: 4px; } .stat .stat-label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-mute); }
  .stat .stat-value { font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.1; color: var(--text-hi); font-variant-numeric: tabular-nums; text-shadow: 0 0 24px rgb(255 184 77 / .28); }
  .stat .stat-sub { font-size: 1rem; color: var(--text-mute); }
  .coin { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: var(--fw-display); color: var(--cyan-200); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .coin svg { width: 1.1em; height: 1.1em; flex: none; filter: drop-shadow(0 0 8px rgb(255 184 77 / .5)); }

  /* Ô vật phẩm theo phẩm cấp */
  .slot { --rc: #a5b4d8; position: relative; display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 16px;
    background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--rc) 30%, transparent), rgb(8 12 24 / .72) 74%); border: 1.5px solid color-mix(in srgb, var(--rc) 80%, transparent);
    box-shadow: inset 0 0 16px color-mix(in srgb, var(--rc) 32%, transparent), 0 0 20px color-mix(in srgb, var(--rc) 20%, transparent); }
  .slot .glyph { font-family: var(--font-seal); font-size: 2rem; color: color-mix(in srgb, var(--rc) 65%, #fff); text-shadow: 0 0 12px var(--rc); line-height: 1; }
  .slot .qty { position: absolute; right: 5px; bottom: 2px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .8rem; color: #fff; text-shadow: 0 1px 3px #000; }
  .slot .slot-img { width: 78%; height: 78%; object-fit: contain; image-rendering: auto; filter: drop-shadow(0 2px 6px rgb(0 0 0 / .5)); }
  .slot--sm { width: 44px; height: 44px; border-radius: 12px; } .slot--sm .glyph { font-size: 1.4rem; }
  .slot--lg { width: 88px; height: 88px; border-radius: 20px; } .slot--lg .glyph { font-size: 2.8rem; }
  .rarity-common { --rc: #a5b4d8; } .rarity-uncommon { --rc: #5ff0c0; } .rarity-rare { --rc: #6cb8ff; } .rarity-epic { --rc: #c58cff; } .rarity-legendary { --rc: #f58bcf; }
  /* Bóng tĩnh: hàng chục ô quà trên bảng xếp hạng không vẽ lại mỗi khung hình. */
  .rarity-legendary { box-shadow: inset 0 0 18px rgb(245 139 207 / .25), 0 0 14px rgb(245 139 207 / .18); }

  /* ---------- Bảng ---------- */
  .table-wrap { overflow-x: auto; border-radius: var(--r-md); }
  .table { width: 100%; border-collapse: collapse; font-size: 1.08rem; }
  .table th { position: sticky; top: 0; text-align: left; padding: 13px 16px; font-family: var(--font-display); font-weight: 400; font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; color: var(--violet-200);
    background: rgb(12 18 32 / .8); border-bottom: 1px solid var(--glass-border); white-space: nowrap; }
  .table td { padding: 13px 16px; border-bottom: 1px solid rgb(255 184 77 / .1); vertical-align: middle; }
  .table tbody tr { transition: background .15s; } .table tbody tr:hover td { background: rgb(255 184 77 / .07); } .table td.num, .table th.num { text-align: right; }
  .empty { display: grid; place-items: center; gap: 8px; padding: var(--s-10) var(--s-4); text-align: center; color: var(--text-mute); }
  .empty .seal { opacity: .75; }
  .progress { height: 12px; border-radius: 99px; background: rgb(6 10 20 / .55); border: 1px solid rgb(255 184 77 / .22); overflow: hidden; box-shadow: inset 0 2px 6px rgb(0 0 0 / .4); }
  .progress > i { display: block; height: 100%; border-radius: inherit; background: var(--grad-accent); box-shadow: 0 0 16px rgb(120 180 255 / .6); transition: width .6s var(--ease); }
  .tabs { display: flex; gap: 6px; overflow-x: auto; padding: 5px; border-radius: 999px; width: fit-content; max-width: 100%; background: rgb(8 12 24 / .45); border: 1px solid rgb(255 184 77 / .16); }
  .tab { padding: 8px 20px; border-radius: 999px; border: 1px solid transparent; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .92rem; color: var(--text-soft); background: transparent; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .18s, color .18s; }
  .tab:hover { color: var(--text-hi); background: rgb(255 255 255 / .07); } .tab[aria-selected='true'], .tab.active { color: #081a32; background: var(--grad-accent); box-shadow: 0 4px 16px rgb(255 184 77 / .35); }

  /* ---------- Điều hướng ---------- */
  /* Thanh trên của trang công khai: kính nổi */
  .topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center;
    background: linear-gradient(180deg, rgb(8 14 26 / .62), rgb(8 14 26 / .38)); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgb(255 255 255 / .14); }
  .topbar-inner { display: flex; align-items: center; gap: var(--s-4); width: min(1360px, 100% - 32px); margin-inline: auto; }
  .brand { display: flex; align-items: center; gap: 12px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1.32rem; letter-spacing: .05em; }
  .brand:hover { color: #fff; } .brand small { display: block; font-size: .6rem; letter-spacing: .36em; color: var(--cyan-300); margin-top: -2px; }
  .nav { display: flex; gap: 4px; margin-left: var(--s-6); } .nav a { padding: 8px 15px; border-radius: 12px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .93rem; color: var(--text-soft); transition: background .18s, color .18s; }
  .nav a:hover { color: var(--text-hi); background: rgb(255 255 255 / .08); }
  .nav a[aria-current='page'] { color: var(--text-hi); background: rgb(255 255 255 / .14); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .28); }
  .spacer { flex: 1; }
  @media (max-width: 860px) { .nav { display: none; } }
  @media (max-width: 600px) { .brand { font-size: 1.05rem; white-space: nowrap; } .brand small { display: none; } .brand .seal { width: 38px; height: 38px; font-size: 1.4rem; } .topbar-inner { gap: var(--s-2); } .topbar-inner .btn--sm { padding: 0 var(--s-3); } .topbar-inner .only-desktop { display: none !important; } }

  /* Khung ứng dụng (portal + admin): thanh bên kính nổi sát mép trái + nội dung */
  .app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); gap: 24px; padding: 22px; min-height: 100dvh; align-items: start; }
  .sidebar { position: sticky; top: 22px; height: calc(100dvh - 44px); display: flex; flex-direction: column; padding: 20px 14px 16px; border-radius: 30px; overflow: hidden; }
  .sidebar .brand { padding: 4px 8px 2px; font-size: 1.3rem; white-space: nowrap; } .sidebar .brand .seal { width: 44px; height: 44px; }
  .sidebar .tagline { padding: 4px 10px 8px; font-size: 1rem; line-height: 1.25; color: var(--text-soft); }
  .sidebar nav { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
  .sidebar-foot { padding: 12px 10px 0; font-size: .95rem; color: var(--text-mute); }
  .rail-title { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .64rem; letter-spacing: .32em; text-transform: uppercase; color: var(--text-mute); padding: 10px 12px 4px; }
  .sidebar nav a, .rail a { position: relative; display: flex; align-items: center; gap: 12px; padding: 4px 8px; margin: 1px 0; border-radius: 14px; color: var(--text-soft); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .86rem; border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s; }
  .sidebar nav a .ico, .rail a .ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; color: var(--cyan-200); flex: none; transition: background .18s, color .18s, box-shadow .18s; }
  .sidebar nav a:hover, .rail a:hover { background: rgb(255 255 255 / .08); color: #fff; } .sidebar nav a:hover .ico { background: rgb(255 255 255 / .1); }
  .sidebar nav a[aria-current='page'] { background: linear-gradient(90deg, rgb(255 255 255 / .2), rgb(255 255 255 / .07)); border-color: rgb(255 255 255 / .32); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 6px 22px rgb(255 138 61 / .25); }
  .sidebar nav a[aria-current='page'] .ico { background: var(--grad-accent); color: #081a32; box-shadow: 0 4px 16px rgb(255 184 77 / .5); }
  .sidebar .tag, .rail .tag { margin-left: auto; font-size: .56rem; padding: 1px 7px; border-radius: 99px; background: linear-gradient(135deg, #ffb84d, #ff8a3d); color: #081a32; letter-spacing: .08em; }
  .lb-xu { display: flex; align-items: center; gap: 12px; margin: 10px 4px 8px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(145deg, rgb(255 255 255 / .14), rgb(255 255 255 / .04)); border: 1px solid rgb(255 255 255 / .22); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
  .lb-xu .chip-ico { width: 44px; height: 44px; border-radius: 14px; } .lb-xu-label { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-mute); } .lb-xu-val { font-size: 1.3rem; }
  .sidebar nav a .nm { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; } .sidebar nav a .nm-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sidebar nav a .nm-row { display: flex; align-items: center; gap: 8px; } .sidebar nav a .nm small { font-family: var(--font-body); font-weight: 400; font-size: .8rem; color: var(--text-mute); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-links { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / .12); display: flex; flex-direction: column; } .sidebar-links a { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 12px; color: var(--text-soft); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .86rem; } .sidebar-links a .ico { display: grid; place-items: center; width: 26px; color: var(--cyan-300); } .sidebar-links a:hover, .sidebar-links a[aria-current='page'] { background: rgb(255 255 255 / .1); color: #fff; }
  .pill-btn { cursor: pointer; font: inherit; font-family: var(--font-display); font-weight: var(--fw-display); } .only-mobile-flex { display: none; } @media (max-width: 980px) { .only-mobile-flex { display: inline-flex; } }
  .promo { margin-top: 10px; padding: 16px 16px 14px; border-radius: 22px; overflow: hidden; position: relative; isolation: isolate;
    background: linear-gradient(180deg, rgb(8 14 26 / .18), rgb(8 14 26 / .78)), url('/ui/img/bg/bg-1920.webp') 30% 40% / 320% no-repeat; border: 1px solid rgb(255 255 255 / .28); box-shadow: inset 0 1px 0 rgb(255 255 255 / .2); }
  .promo b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; line-height: 1.15; color: #fff; margin-bottom: 4px; }
  .promo p { font-size: .95rem; margin: 0 0 12px; color: var(--text-soft); }

  .appbar { display: flex; align-items: center; gap: 14px; margin-bottom: var(--s-6); }
  .search { position: relative; flex: 0 1 440px; min-width: 0; }
  @media (max-height: 980px) { .sidebar .promo, .sidebar-foot { display: none; } }
  @media (max-width: 1560px) { .pill.date { display: none; } }
  .search input { width: 100%; height: 48px; padding: 0 16px 0 46px; border-radius: 16px; color: var(--text-hi); font: inherit; font-size: 1.12rem; background: rgb(255 255 255 / .1);
    border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15); }
  .search input::placeholder { color: var(--text-mute); } .search input:focus { outline: none; border-color: var(--cyan-300); box-shadow: var(--focus); }
  .search .icon { position: absolute; left: 15px; top: 14px; color: var(--text-soft); pointer-events: none; }
  .search-results { position: absolute; top: 54px; left: 0; right: 0; z-index: 70; padding: 8px; max-height: 340px; overflow: auto; }
  .search-results a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .95rem; }
  .search-results a:hover, .search-results a[data-active='true'] { background: rgb(255 255 255 / .14); }
  .search-results .muted { padding: 10px 12px; }
  .pill { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; color: var(--text-hi); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .9rem; white-space: nowrap;
    background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgb(255 255 255 / .15); }
  a.pill:hover { background: rgb(255 255 255 / .18); color: #fff; }
  .icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; cursor: pointer; color: var(--text-hi); position: relative;
    background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
  .icon-btn:hover { background: rgb(255 255 255 / .18); } .icon-btn .dot { position: absolute; top: 11px; right: 12px; width: 9px; height: 9px; border-radius: 50%; background: #ffb84d; box-shadow: 0 0 10px #ffb84d; }
  .bell-menu { position: absolute; top: 56px; right: 0; width: min(360px, 90vw); z-index: 70; padding: 10px; }
  .user-chip { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px 0 6px; border-radius: 18px; color: var(--text-hi); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 184 77 / .28);
    -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); }
  .user-chip:hover { background: rgb(255 255 255 / .18); color: #fff; }
  .avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; color: #081a32; font-family: var(--font-display); font-weight: var(--fw-display); font-size: 1.1rem; background: var(--grad-accent); box-shadow: 0 0 0 2px rgb(255 255 255 / .35); }
  .user-chip { flex: none; white-space: nowrap; } .user-chip .who { line-height: 1.1; } .user-chip .who b { display: block; font-family: var(--font-display); font-weight: 400; font-size: .95rem; } .user-chip .who span { font-size: .85rem; color: var(--text-mute); }
  .app-brand { display: none; }
  .main-col { min-width: 0; } .content { max-width: 1560px; }
  .tabbar { display: none; }
  @media (max-width: 1100px) { .search { flex-basis: 260px; } .pill.date { display: none; } }
  @media (max-width: 980px) {
    .app { grid-template-columns: minmax(0, 1fr); padding: 14px 14px calc(var(--tabbar-h) + 34px); gap: 0; } .sidebar { display: none; }
    .appbar { gap: 8px; margin-bottom: var(--s-4); } .appbar .app-brand { display: flex; } .user-chip .who { display: none; } .user-chip { padding: 0 6px; } .pill.date { display: none; }
    .tabbar { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); height: var(--tabbar-h); display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 22px;
      background: rgb(14 22 84 / .62); -webkit-backdrop-filter: blur(26px) saturate(180%); backdrop-filter: blur(26px) saturate(180%); border: 1px solid rgb(255 184 77 / .28); box-shadow: 0 16px 44px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .2); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-mute); font-family: var(--font-display); font-weight: var(--fw-display); font-size: .66rem; letter-spacing: .03em; border-radius: 18px; }
    .tabbar a .ico { display: grid; place-items: center; width: 34px; height: 26px; border-radius: 10px; color: var(--text-mute); transition: background .18s, color .18s; }
    .tabbar a[aria-current='page'] { color: var(--text-hi); } .tabbar a[aria-current='page'] .ico { color: #081a32; background: var(--grad-accent); box-shadow: 0 4px 14px rgb(255 184 77 / .5); }
  }
  @media (max-width: 600px) { .search { display: none; } .appbar .search-toggle { display: grid; } }
  .search-toggle { display: none; }
  .footer { border-top: 1px solid rgb(255 255 255 / .14); background: linear-gradient(180deg, rgb(8 14 26 / .4), rgb(5 9 18 / .8)); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: var(--s-8) 0 calc(var(--s-8) + 8px); margin-top: var(--s-12); color: var(--text-mute); }
  .footer a { color: var(--text-soft); } .footer a:hover { color: var(--cyan-300); } .footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-8); } @media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

  /* ---------- Dashboard kiểu bảng điều khiển ---------- */
  .hello { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: var(--s-6); align-items: center; margin-bottom: var(--s-6); }
  .hello .eyebrow { font-family: var(--font-display); font-weight: var(--fw-display); font-size: .82rem; letter-spacing: .38em; text-transform: uppercase; color: #fff3d6; margin-bottom: 10px; text-shadow: 0 2px 12px rgb(4 8 50 / .8); }
  .grid-kpi { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
  .hello h1 { font-family: var(--font-serif); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.9rem); line-height: 1.06; margin-bottom: 12px; color: #fffaf0; text-shadow: 0 4px 30px rgb(0 0 0 / .5); }
  .grad-text { background: linear-gradient(90deg, #ffe2a3 0%, #ffb84d 52%, #ff8a3d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 2px 18px rgb(255 138 61 / .3)); }
  .hello .sub { font-size: 1.3rem; max-width: 46ch; color: #e3e9ff; margin: 0; text-shadow: 0 2px 14px rgb(4 8 50 / .8); }
  .hello > div:first-child { position: relative; isolation: isolate; } .hello > div:first-child::before { content: ''; position: absolute; inset: -30px -50px -20px -30px; z-index: -1; background: radial-gradient(closest-side, rgb(7 17 31 / .55), transparent); }
  .float-card { position: relative; justify-self: end; width: min(400px, 100%); aspect-ratio: 16 / 9.6; border-radius: 26px; overflow: hidden; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
    transform: perspective(900px) rotateY(-9deg) rotateX(4deg) rotateZ(2deg); transition: transform .4s var(--ease);
    background: linear-gradient(200deg, rgb(255 255 255 / .05), rgb(8 14 26 / .7)), url('/ui/img/bg/bg-1920.webp') 62% 38% / 260% no-repeat; border: 1px solid rgb(255 255 255 / .42); box-shadow: 0 30px 70px rgb(0 0 0 / .55), inset 0 1px 0 rgb(255 255 255 / .35); }
  .float-card:hover { transform: perspective(900px) rotateY(-4deg) rotateX(2deg) rotateZ(1deg) translateY(-4px); }
  .float-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.1; color: #fff; } .float-card span { color: var(--text-soft); font-size: 1.05rem; }
  .float-card .play { position: absolute; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: rgb(255 255 255 / .22); border: 1px solid rgb(255 255 255 / .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 6px 24px rgb(0 0 0 / .5); }
  .tag-pill { font-family: var(--font-display); font-size: .62rem; padding: 2px 9px; border-radius: 99px; background: linear-gradient(135deg, #ffb84d, #ff8a3d); color: #081a32; letter-spacing: .08em; }
  .quote { justify-self: end; text-align: right; max-width: 260px; color: #fff3d6; font-size: 1.15rem; font-style: italic; text-shadow: 0 2px 14px rgb(4 8 50 / .9); }
  @media (max-width: 1280px) { .hello { grid-template-columns: minmax(0, 1fr); } .float-card { display: none; } }

  .kpi { display: flex; align-items: center; gap: var(--s-3); padding: 16px 16px; }
  .kpi .chip-ico { width: 52px; height: 52px; border-radius: 16px; }
  .kpi .meta { min-width: 0; flex: 1; } .kpi .k-label { font-size: 1.02rem; color: var(--text-soft); }
  .kpi .val { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(1.35rem, 1.7vw, 1.8rem); color: #fff; line-height: 1.15; font-variant-numeric: tabular-nums; }
  .kpi .note { font-size: .95rem; color: var(--text-mute); }
  .delta { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; font-family: var(--font-display); font-weight: var(--fw-display); font-size: .78rem; letter-spacing: .02em; color: #5dffc4; background: rgb(60 240 180 / .16); border: 1px solid rgb(60 240 180 / .35); }
  .delta--down { color: #ff9db3; background: rgb(255 120 150 / .16); border-color: rgb(255 120 150 / .38); } .delta--flat { color: var(--text-soft); background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .22); }
  .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s-4); flex-wrap: wrap; }
  .panel-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.15rem; } .panel-head .icon { color: var(--cyan-300); }
  .big-num { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; } .big-num b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.5rem); color: #fff; }
  .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .95rem; color: var(--text-soft); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
  .chart { width: 100%; height: auto; display: block; overflow: visible; } .chart text { font-family: var(--font-body); font-weight: 600; font-size: 15px; fill: var(--text-mute); }
  .chart .grid-line { stroke: rgb(255 255 255 / .12); stroke-dasharray: 3 5; } .chart .dot { fill: #ffe2a3; stroke: #ffb84d; stroke-width: 2; filter: drop-shadow(0 0 6px rgb(255 184 77 / .8)); }
  .chart .bar { transition: opacity .2s; } .chart .bar:hover { opacity: .8; }
  .donut-wrap { display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap; } .donut-wrap svg { width: 168px; height: 168px; flex: none; }
  .donut-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; } .donut-legend div { display: flex; align-items: center; gap: 8px; color: var(--text-soft); } .donut-legend b { margin-left: auto; font-family: var(--font-display); font-weight: 400; color: #fff; }
  .donut-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .power-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; } .power-row .row-between { flex-wrap: nowrap; } .power-row + .power-row { border-top: 1px solid rgb(255 255 255 / .1); }
  .activity { display: flex; flex-direction: column; } .activity .item { display: flex; align-items: center; gap: 12px; padding: 10px 0; } .activity .item + .item { border-top: 1px solid rgb(255 255 255 / .1); }
  .activity .chip-ico { width: 40px; height: 40px; border-radius: 13px; } .activity .txt { flex: 1; min-width: 0; line-height: 1.25; } .activity .txt b { display: block; font-family: var(--font-display); font-weight: 400; font-size: .95rem; color: #fff; } .activity .txt span { font-size: .95rem; color: var(--text-mute); } .activity time { font-size: .9rem; color: var(--text-mute); white-space: nowrap; }

  /* ---------- Modal, toast ---------- */
  .modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgb(4 8 16 / .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: fade .18s var(--ease); }
  .modal { width: min(560px, 100%); max-height: 90dvh; overflow: auto; animation: pop .22s var(--ease); }
  @keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
  .toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100% - 32px)); }
  @media (max-width: 980px) { .toasts { bottom: calc(var(--tabbar-h) + 22px); } }
  .toast { padding: 14px 18px; border-radius: 16px; border: 1px solid var(--glass-border-hi); background: rgb(14 20 68 / .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 16px 40px rgb(0 0 0 / .6), var(--glow-cyan); animation: pop .22s var(--ease); }
  .toast.ok { border-color: var(--cyan-400); } .toast.err { border-color: var(--cinnabar-400); box-shadow: 0 16px 40px rgb(0 0 0 / .6), 0 0 26px rgb(255 122 144 / .25); }
  .toast b { font-family: var(--font-display); font-weight: 400; color: var(--text-hi); display: block; }

  /* ---------- Hero / trang chủ ---------- */
  .hero { padding: clamp(48px, 9vw, 120px) 0 var(--s-10); text-align: center; }
  .hero h1 { font-family: var(--font-serif); font-weight: 800; font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: 1.02; margin-bottom: var(--s-4);
    background: linear-gradient(180deg, #fff3d6 0%, #ffcf7a 48%, #ff9a45 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgb(255 184 77 / .45)); }
  .hero .lead { font-size: clamp(1.25rem, 2.2vw, 1.65rem); max-width: 46ch; margin: 0 auto var(--s-8); color: var(--text-soft); }
  .hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px; margin-bottom: var(--s-6); border-radius: 99px; font-family: var(--font-display); font-size: .82rem; color: var(--gold-200); background: rgb(255 184 77 / .1); border: 1px solid rgb(255 184 77 / .35); } .hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #ffb84d; box-shadow: 0 0 10px #ff8a3d; }
  .hero-line2 { display: block; margin-top: 10px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 2.6vw, 1.7rem); letter-spacing: .04em; color: var(--gold-200); -webkit-text-fill-color: var(--gold-200); }
  .dl-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: var(--s-5); } .dl-card .dl-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--text-hi); } .dl-card.featured { border-color: rgb(255 184 77 / .5); }
  .hero .han { font-family: var(--font-seal); font-size: clamp(1rem, 2vw, 1.4rem); letter-spacing: .6em; color: var(--cyan-300); margin-bottom: var(--s-4); text-indent: .6em; text-shadow: 0 0 18px rgb(255 184 77 / .6); }
  .cta-row { display: flex; gap: var(--s-4); justify-content: center; flex-wrap: wrap; }
  .feature .seal { margin-bottom: var(--s-3); }
  .auth-card { width: min(460px, 100%); margin: var(--s-10) auto; }
  .countdown { display: flex; gap: 6px; max-width: 100%; } .countdown .cd { flex: 1 1 0; min-width: 0; max-width: 64px; padding: 7px 4px; text-align: center; border-radius: 14px; background: rgb(6 10 20 / .55); border: 1px solid rgb(255 184 77 / .22); box-shadow: inset 0 1px 0 rgb(255 255 255 / .08); }
  .countdown .cd b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.32rem; color: var(--text-hi); text-shadow: 0 0 14px rgb(255 184 77 / .5); } .countdown .cd span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); }

  /* Vòng quay */
  .wheel-wrap { position: relative; width: min(440px, 100%); aspect-ratio: 1; margin-inline: auto; }
  .wheel { width: 100%; height: 100%; transition: transform 4.2s cubic-bezier(.12, .7, .1, 1); filter: drop-shadow(0 12px 34px rgb(0 0 0 / .6)) drop-shadow(0 0 30px rgb(255 184 77 / .25)); }
  .wheel-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); z-index: 2; width: 34px; height: 46px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .6)); }
  .wheel-hub { position: absolute; inset: 0; margin: auto; width: 24%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; z-index: 2;
    background: var(--grad-accent); box-shadow: 0 0 0 6px rgb(8 12 24 / .55), 0 0 40px rgb(255 184 77 / .6); font-family: var(--font-seal); font-size: 2.2rem; color: #081a32; }

  /* Thẻ tổng quan kiểu bảng điều khiển */
  .dash-stat { display: flex; gap: var(--s-4); align-items: flex-start; } .dash-stat .stat { flex: 1; min-width: 0; }
  .char-card { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md);
    background: linear-gradient(150deg, rgb(255 255 255 / .09), rgb(255 255 255 / .03)); border: 1px solid rgb(255 184 77 / .18); transition: border-color .2s, transform .2s, box-shadow .2s; }
  .char-card > .row { flex-wrap: nowrap; min-width: 0; flex: 1; } .char-card > .row > div { min-width: 0; }
  .char-card:hover { border-color: var(--glass-border-hi); transform: translateY(-2px); box-shadow: var(--glow-cyan); }
  .event-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-4); border-radius: var(--r-md); color: var(--text-hi);
    background: linear-gradient(150deg, rgb(255 255 255 / .09), rgb(255 255 255 / .03)); border: 1px solid rgb(255 184 77 / .18); transition: border-color .2s, transform .2s, box-shadow .2s; }
  .event-row:hover { border-color: var(--glass-border-hi); transform: translateY(-2px); box-shadow: var(--glow-violet); color: #fff; }
}

@layer utilities {
  .mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: var(--s-4); }
  .w-full { width: 100%; } .hide-mobile { } .only-mobile { display: none; }
  @media (max-width: 760px) { .hide-mobile { display: none !important; } .only-mobile { display: initial; } }
  .ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fade-up { animation: fadeUp .3s var(--ease) backwards; } .fade-up.d1 { animation-delay: .06s; } .fade-up.d2 { animation-delay: .12s; } .fade-up.d3 { animation-delay: .18s; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
  @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } .scene .cloud { animation: none; } }
}
