  :root {
    --bg: #0c0e0b;
    --bg-raised: #14170f;
    --bg-card: #181c13;
    --line: #2a2f21;
    --line-bright: #3d4530;
    --text: #e9ebe1;
    --text-dim: #9ea391;
    --text-faint: #6b7060;
    --fire: #ff7a29;
    --fire-dim: #c4551a;
    --void: #a875ff;
    --void-dim: #6d47b8;
    --ok: #7ed957;
    --warn: #ffb020;
    --bad: #ff3b3b;

    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Manrope', sans-serif;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
  }

  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
  }

  a { color: inherit; text-decoration: none; }

  /* Fix (per direct request - "hiệu ứng click vô các nút"): hiệu ứng
     bấm nút dùng chung cho TOÀN trang - chỉ thêm transition mượt +
     nhún nhẹ khi bấm (giống cảm giác bấm nút vật lý) để mọi nút trên
     site đều có phản hồi rõ ràng lúc click, không chỉ riêng hover như
     trước. */
  button { font-family: inherit; }
  button, .navcta, a.navcta {
    cursor: pointer;
    transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  }
  button:active:not(:disabled), a.navcta:active {
    transform: scale(0.96);
  }
  button:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

  /* Fix (per direct request - "nút đừng góc cạnh"): bo góc nhẹ 8px
     cho toàn bộ nút/input/thẻ trên site thay vì góc vuông 90° như
     trước - vẫn giữ tông màu/layout cũ, chỉ bớt gắt ở góc. Nút tròn
     (icon user, .wallet-btn.logged-in) giữ nguyên border-radius:50%
     đã khai báo riêng - selector 2 class đó specific hơn nên không bị
     8px này ghi đè. */
  button, .navcta, a.navcta, input, select, textarea,
  .btn-primary, .btn-ghost, .hamburger,
  .key-modal, .price-card, .wallet-key-row, .wallet-tx-row, .status-badge, .key-value,
  .auth-tabs, .check-tabs, .price-toggle,
  .eyebrow-badge, .terminal, .trial-banner,
  .why-grid, .key-progress-track, .key-progress-fill {
    border-radius: 8px;
  }
  /* Thanh tab: chừa 4px đệm để tab con bo góc nằm gọn trong khung. */
  .auth-tabs, .check-tabs, .price-toggle { padding: 4px; }
  .auth-tab, .check-tab, .price-toggle button { border-radius: 6px; }
  /* Lưới có ô con sát nhau: cắt ô con theo góc bo của khung ngoài. */
  .why-grid, .terminal { overflow: hidden; }
  .price-card.best::before, .trial-banner-tag { border-radius: 6px; }

  /* Particle bắn ra khi bấm nút (per direct request - "all nút bấm có
     particle và sound"). Hạt là span tạm, tự xoá sau khi animation
     xong; pointer-events:none để không chặn click tiếp theo. */
  .click-particle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
  }
  .sound-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--line-bright);
    font-size: 15px;
  }
  .sound-toggle:hover { color: var(--text); border-color: var(--text-dim); }
  /* Màn hẹp: nút loa chuyển vào menu hamburger cho nav khỏi tràn ngang. */
  @media (max-width: 520px) { .sound-toggle { display: none; } }

  .wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
    z-index: 1;
  }

  /* ---------- NAV ---------- */

  nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 14, 11, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }

  nav .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.02em;
  }

  .brand .dot {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 0 12px var(--fire);
  }

  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }

  .navlinks {
    display: flex;
    gap: 22px;
    white-space: nowrap;
    font-size: 14.5px;
    color: var(--text-dim);
  }

  .navlinks a:hover { color: var(--text); }

  .navcta {
    background: var(--fire);
    color: #1a0e05;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid var(--fire);
    white-space: nowrap;
  }

  @media (max-width: 420px) {
    .navcta { padding: 9px 12px; font-size: 13px; }
  }

  .navcta:hover { background: #ff8c47; }

  .wallet-btn {
    background: transparent;
    border: 1px solid var(--void);
    color: var(--void);
  }

  .wallet-btn:hover { background: rgba(168, 117, 255, 0.1); }

  .wallet-btn.logged-in {
    border-color: var(--ok);
    color: var(--ok);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }

  .hamburger {
    display: none;
    position: relative;
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text);
    width: 40px;
    height: 40px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }
  /* 3 vạch -> dấu X khi mở menu. */
  .hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
  .hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-right { display: flex; align-items: center; gap: 12px; }

  /* Menu hamburger trượt xuống / kéo lên (per direct request - "cái
     hamburger cho animation kéo lên kéo xuống"): chiều cao chạy từ 0 tới
     đúng chiều cao nội dung bằng grid-template-rows 0fr -> 1fr, các mục
     trượt nhẹ xuống và hiện dần theo thứ tự. */
  .mobile-dropdown {
    display: grid;
    grid-template-rows: 0fr;
    background: var(--bg);
    border-top: 1px solid transparent;
    transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.35s ease;
  }
  .mobile-dropdown.show {
    grid-template-rows: 1fr;
    border-top-color: var(--line);
  }
  .mobile-dropdown-inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .mobile-dropdown a {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.3s ease, color 0.15s ease;
  }
  .mobile-dropdown.show a { opacity: 1; transform: none; }
  .mobile-dropdown.show a:nth-child(1) { transition-delay: 0.03s; }
  .mobile-dropdown.show a:nth-child(2) { transition-delay: 0.06s; }
  .mobile-dropdown.show a:nth-child(3) { transition-delay: 0.09s; }
  .mobile-dropdown.show a:nth-child(4) { transition-delay: 0.12s; }
  .mobile-dropdown.show a:nth-child(5) { transition-delay: 0.15s; }
  .mobile-dropdown.show a:nth-child(6) { transition-delay: 0.18s; }
  .mobile-dropdown.show a:nth-child(7) { transition-delay: 0.21s; }
  .mobile-dropdown.show a:nth-child(8) { transition-delay: 0.24s; }
  .mobile-dropdown.show a:nth-child(9) { transition-delay: 0.27s; }
  .mobile-dropdown a:hover { color: var(--text); }
  @media (prefers-reduced-motion: reduce) {
    .mobile-dropdown, .mobile-dropdown a, .hamburger span { transition: none; }
  }
  /* Màn rộng (đủ chỗ hiện link trên thanh menu) thì không có menu thả. */
  @media (min-width: 1181px) { .mobile-dropdown { display: none; } }

  .mobile-dropdown a {
    padding: 16px 20px;
    font-size: 15px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--line);
  }

  /* Nav có 8 link + 3 nút bên phải: dưới 1180px không đủ chỗ (chữ bị
     gãy 2 dòng, đè lên nút) nên chuyển sang menu hamburger sớm hơn. */
  @media (max-width: 1180px) {
    .navlinks { display: none; }
    .hamburger { display: flex; }
  }

  /* ---------- HERO ---------- */

  header.hero {
    padding: 84px 0 96px;
    position: relative;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
  }

  @media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
  }

  .hero-grid > * { min-width: 0; }

  .eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-dim);
    border: 1px solid var(--line-bright);
    padding: 5px 12px;
    margin-bottom: 26px;
  }

  .eyebrow-badge b { color: var(--ok); }

  h1 {
    font-size: 52px;
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.015em;
    margin-bottom: 22px;
  }

  @media (max-width: 640px) {
    h1 { font-size: 34px; }
    h2 { font-size: 26px; }
    .wrap { padding: 0 20px; }
    .hero-stats { flex-wrap: wrap; gap: 20px; }
  }

  h1 .accent { color: var(--fire); }

  .hero-sub {
    font-size: 17px;
    color: var(--text-dim);
    max-width: 480px;
    margin-bottom: 34px;
  }

  .hero-ctas {
    display: flex;
    gap: 14px;
    margin-bottom: 40px;
  }

  .btn-primary {
    background: var(--fire);
    color: #1a0e05;
    padding: 14px 26px;
    font-weight: 700;
    font-size: 15px;
    border: 1px solid var(--fire);
  }

  .btn-primary:hover { background: #ff8c47; }

  .btn-ghost {
    padding: 14px 26px;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid var(--line-bright);
    color: var(--text);
  }

  .btn-ghost:hover { border-color: var(--text-dim); }

  .hero-stats {
    display: flex;
    gap: 34px;
  }

  .hero-stat b {
    display: block;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 700;
  }

  .hero-stat span {
    font-size: 13px;
    color: var(--text-faint);
  }

  /* ---------- TERMINAL ---------- */

  .terminal {
    background: #0a0b08;
    border: 1px solid var(--line-bright);
    font-family: var(--font-mono);
    font-size: 12.5px;
  }

  .terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--text-faint);
  }

  .terminal-bar .tdot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-bright);
  }

  .terminal-body {
    padding: 16px 18px;
    height: 320px;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .terminal-line { white-space: nowrap; opacity: 0; animation: appear 0.4s forwards; }
  @keyframes appear { to { opacity: 1; } }

  .terminal-line .tag { color: var(--fire); font-weight: 700; }
  .terminal-line .fail { color: #ff5c5c; }
  .terminal-line .vl { color: var(--warn); }
  .terminal-line .ping { color: var(--text-faint); }
  .terminal-line .ok { color: var(--ok); }

  /* ---------- SECTION SHELL ---------- */

  section { padding: 88px 0; border-top: 1px solid var(--line); }

  .section-head { max-width: 620px; margin-bottom: 52px; }

  .section-kicker {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--void);
    margin-bottom: 14px;
  }

  h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
  }

  .section-desc { color: var(--text-dim); font-size: 15.5px; }

  /* ---------- WHY GRID ---------- */

  .why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }

  @media (max-width: 800px) {
    .why-grid { grid-template-columns: 1fr; }
  }

  .why-cell {
    background: var(--bg);
    padding: 32px 28px;
  }

  .why-cell .num {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--fire-dim);
    margin-bottom: 16px;
  }

  .why-cell h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
  .why-cell p { font-size: 14.5px; color: var(--text-dim); }

  /* ---------- CHECKS ---------- */

  .check-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    border: 1px solid var(--line-bright);
    width: fit-content;
  }

  .check-tab {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 10px 20px;
    color: var(--text-faint);
    cursor: pointer;
    background: transparent;
    border: none;
  }

  .check-tab.active { background: var(--fire); color: #1a0e05; font-weight: 700; }

  /* Danh sách kiểm tra - per direct request "chỗ này cũng xấu lắm, làm
     lại bằng ảnh tự tạo": mỗi kiểm tra là 1 thẻ có icon SVG tự vẽ
     (static/check-icons.js) + mô tả ngắn, màu theo nhóm. Thay cho ô vuông
     to chỉ có 2 chữ cái viết tắt trước đây. */
  .check-grid {
    --cat: var(--fire);
    --cat-rgb: 255, 122, 41;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
  }
  .check-grid[data-cat="movement"] { --cat: var(--void); --cat-rgb: 168, 117, 255; }
  .check-grid[data-cat="world"] { --cat: var(--ok); --cat-rgb: 126, 217, 87; }

  .check-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
    animation: checkIn 0.35s ease both;
  }
  .check-card:hover {
    border-color: rgba(var(--cat-rgb), 0.7);
    box-shadow: 0 0 0 1px rgba(var(--cat-rgb), 0.35), 0 0 22px rgba(var(--cat-rgb), 0.18);
    transform: translateY(-2px);
  }
  .check-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cat);
    background:
      radial-gradient(circle at 30% 25%, rgba(var(--cat-rgb), 0.32), transparent 65%),
      rgba(var(--cat-rgb), 0.08);
    border: 1px solid rgba(var(--cat-rgb), 0.35);
    box-shadow: inset 0 0 12px rgba(var(--cat-rgb), 0.12);
  }
  .check-card:hover .check-icon { box-shadow: inset 0 0 12px rgba(var(--cat-rgb), 0.2), 0 0 14px rgba(var(--cat-rgb), 0.35); }
  .check-text { min-width: 0; }
  .check-name {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
  }
  .check-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; margin-top: 2px; }

  @keyframes checkIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .check-card { animation: none; }
    .check-card:hover { transform: none; }
  }
  @media (max-width: 520px) {
    .check-grid { grid-template-columns: 1fr; gap: 8px; }
    .check-card { padding: 10px 12px; gap: 12px; }
    .check-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 10px; }
  }

  .check-count {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-faint);
    margin-top: 18px;
  }

  /* ---------- COMPAT ---------- */

  .compat-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }

  @media (max-width: 760px) { .compat-cols { grid-template-columns: 1fr; } }

  .compat-cols h3 {
    font-size: 15px;
    font-family: var(--font-mono);
    margin-bottom: 18px;
  }

  .compat-cols ul { list-style: none; }

  .compat-cols li {
    font-size: 14.5px;
    color: var(--text-dim);
    padding: 10px 0;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 10px;
  }

  .compat-cols li:first-child { border-top: none; }

  .compat-cols .yes::before { content: '✓'; color: var(--ok); font-weight: 700; }
  .compat-cols .no::before { content: '×'; color: #ff5c5c; font-weight: 700; }

  /* ---------- PRICING ---------- */

  .trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--ok);
    background: rgba(126, 217, 87, 0.06);
    padding: 24px 28px;
    margin-bottom: 36px;
  }

  .trial-banner-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ok);
    margin-bottom: 8px;
  }

  .trial-banner h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
  }

  .trial-banner p {
    font-size: 14px;
    color: var(--text-dim);
  }

  .trial-banner .btn-primary {
    flex-shrink: 0;
    background: var(--ok);
    border-color: var(--ok);
    color: #0a1806;
  }

  .trial-banner .btn-primary:hover { background: #94e871; }

  @media (max-width: 640px) {
    .trial-banner { flex-direction: column; align-items: flex-start; }
  }

  .price-toggle {
    display: flex;
    gap: 4px;
    margin-bottom: 36px;
    border: 1px solid var(--line-bright);
    width: fit-content;
  }

  .price-toggle button {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 10px 20px;
    color: var(--text-faint);
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .price-toggle button.active { background: var(--void); color: #12081f; font-weight: 700; }

  .price-grid {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
  }

  .price-grid.show { display: grid; }

  @media (max-width: 900px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 560px) { .price-grid { grid-template-columns: repeat(2, 1fr); } }

  .price-card {
    background: var(--bg-card);
    border: 1px solid var(--line-bright);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
  }

  .price-card.best { border-color: var(--fire); }

  .price-card.best::before {
    content: 'Tốt nhất';
    position: absolute;
    top: -11px;
    left: 20px;
    background: var(--fire);
    color: #1a0e05;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    letter-spacing: 0.04em;
  }

  .price-card .dur {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-dim);
  }

  .price-card .amt {
    font-size: 25px;
    font-weight: 800;
  }

  .price-card .amt small { font-size: 13px; color: var(--text-faint); font-weight: 500; }

  .price-card .perday {
    font-size: 12px;
    color: var(--text-faint);
    font-family: var(--font-mono);
  }

  .price-card button {
    margin-top: 6px;
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text);
    padding: 10px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
  }

  .price-card button:hover { border-color: var(--void); color: var(--void); }

  .price-note {
    margin-top: 28px;
    font-size: 13.5px;
    color: var(--text-faint);
    max-width: 560px;
  }

  /* ---------- FOOTER ---------- */

  footer {
    border-top: 1px solid var(--line);
    padding: 48px 0 40px;
  }

  .footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-links {
    display: flex;
    gap: 26px;
    font-size: 14px;
    color: var(--text-dim);
  }

  .footer-fine {
    margin-top: 26px;
    font-size: 12.5px;
    color: var(--text-faint);
  }

  .key-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .key-modal-overlay.show { display: flex; }

  .key-modal {
    background: var(--bg-card);
    border: 1px solid var(--line-bright);
    padding: 32px;
    max-width: 440px;
    width: 100%;
  }

  .key-modal h3 { font-size: 19px; font-weight: 700; margin-bottom: 6px; }
  .key-modal p { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }

  .key-modal .key-value {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--ok);
    background: #0a0b08;
    border: 1px solid var(--line-bright);
    padding: 14px 16px;
    margin-bottom: 14px;
    word-break: break-all;
    cursor: pointer;
  }

  .key-modal .key-meta {
    font-size: 13px;
    color: var(--text-faint);
    font-family: var(--font-mono);
    margin-bottom: 22px;
  }

  .key-modal .key-error { color: #ff5c5c; font-size: 14px; }

  .key-modal-close {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text);
    padding: 11px;
    font-weight: 600;
    cursor: pointer;
  }

  .key-modal-close:hover { border-color: var(--text-dim); }
  /* ---------- AUTH & WALLET ---------- */

  .auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border: 1px solid var(--line-bright);
    width: fit-content;
  }

  .auth-tab {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 9px 18px;
    color: var(--text-faint);
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .auth-tab.active { background: var(--void); color: #12081f; font-weight: 700; }

  .auth-input {
    width: 100%;
    background: #0a0b08;
    border: 1px solid var(--line-bright);
    color: var(--text);
    padding: 11px 14px;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: var(--font-sans);
  }

  .auth-input:focus { outline: none; border-color: var(--void); }

  .password-field { position: relative; }
  .password-field .auth-input { padding-right: 44px; }

  .eye-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.55;
    padding: 4px 6px;
  }

  .eye-btn:hover { opacity: 1; }
  .eye-btn.showing { opacity: 1; }

  .captcha-box { margin-bottom: 14px; display: flex; justify-content: center; }

  .forgot-link {
    display: block;
    font-size: 13px;
    color: var(--text-faint);
    text-decoration: none;
    margin-bottom: 14px;
  }

  .forgot-link:hover { color: var(--void); }

  .wallet-modal { max-width: 560px; max-height: 84vh; overflow-y: auto; }

  .wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }

  .wallet-username { font-family: var(--font-mono); font-size: 14px; color: var(--text-dim); }
  .wallet-balance { font-size: 24px; font-weight: 800; color: var(--ok); }

  .wallet-deposit-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
  .wallet-deposit-row .auth-input { margin-bottom: 0; flex: 1 1 200px; }
  .wallet-deposit-row button { flex-shrink: 0; }

  /* Tách nạp thẻ cào / nạp ngân hàng-QR thành 2 tab riêng trong ví -
     per direct request ("làm chuyên nghiệp như mấy web lớn... nạp thẻ
     để riêng nạp ngân hàng qr để riêng"), thay vì dồn chung 4 nút liền
     nhau như trước. Dùng chung style .auth-tabs/.auth-tab đang có sẵn
     ở modal đăng nhập, chỉ thêm biến thể full-width cho vừa modal ví. */
  .wallet-pay-tabs { width: 100%; margin-top: 4px; }
  .wallet-pay-tabs .auth-tab { flex: 1; text-align: center; }
  .wallet-pay-panel { display: none; }
  .wallet-pay-panel.active { display: block; }
  .wallet-pay-row { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

  /* Fix (per direct request - "gắn thẳng vào trang, không nổi gì
     cả"): gộp accountModal/forgotModal/resetPasswordModal/walletModal/
     profileModal/keysModal/historyModal (7 cửa sổ nổi riêng biệt)
     thành MỘT section nằm ngay trong luồng trang (#accountPanel),
     không còn overlay/backdrop che màn hình nữa - nav bấm vào thì
     cuộn xuống đây + đổi tab nội dung, y hệt cảm giác 1 trang web
     bình thường thay vì popup. (keyModal - popup mua/gia hạn key từ
     bảng giá - CHƯA đổi, xem ghi chú cuối file.) */
  .account-panel { padding: 56px 24px; scroll-margin-top: 84px; }
  .account-panel .key-modal { max-width: 560px; margin: 0 auto; width: 100%; }
  .account-panel-title { font-size: 22px; font-weight: 700; margin-bottom: 20px; text-align: center; }

  .account-section { display: none; }
  .account-section.active { display: block; }

  .account-tabs { width: 100%; margin-bottom: 20px; flex-wrap: wrap; }
  .account-tabs .auth-tab { flex: 1 1 auto; text-align: center; }

  .account-subform { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }

  .wallet-section-title {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--void);
    margin: 24px 0 12px;
  }

  .wallet-key-row, .wallet-tx-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    font-size: 13.5px;
  }

  .wallet-key-row:first-child, .wallet-tx-row:first-child { border-top: none; }

  .wallet-key-row .key-str { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); word-break: break-all; }

  .status-badge {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 3px 8px;
    flex-shrink: 0;
  }

  .status-dang_hoat_dong { background: rgba(126,217,87,0.15); color: var(--ok); }
  .status-chua_kich_hoat { background: rgba(168,117,255,0.15); color: var(--void); }
  .status-het_han_cho_gia_han { background: rgba(255,176,32,0.15); color: var(--warn); }
  .status-het_han, .status-da_mat { background: rgba(255,92,92,0.15); color: #ff5c5c; }

  .wallet-tx-row .tx-amount.positive { color: var(--ok); }
  .wallet-tx-row .tx-amount.negative { color: #ff5c5c; }

  .copy-key-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text-dim);
    padding: 5px 10px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .copy-key-btn:hover { border-color: var(--void); color: var(--void); }

  .countdown { color: var(--ok); font-family: var(--font-mono); font-size: 12px; }

  /* Per direct request - "thanh cooldown thời hạn dùng của key": a
     visual progress bar next to the text countdown, one full row
     under the key so it doesn't crowd the existing layout. */
  .key-progress-row { flex-basis: 100%; order: 5; }
  .key-progress-track {
    width: 100%;
    height: 5px;
    background: var(--line);
    overflow: hidden;
    margin-top: 4px;
  }
  .key-progress-fill {
    height: 100%;
    background: var(--ok);
    width: 100%;
    transition: width 1s linear, background-color 0.3s;
  }
  .key-progress-fill.warn { background: var(--warn); }
  .key-progress-fill.danger { background: #ff5c5c; }
  .key-not-activated-hint { color: var(--text-dim); font-size: 11.5px; font-style: italic; }

  /* Fix (per direct request - "thay cái nút đỏ thành nhấp nháy thành
     cái hình này đi", ảnh logo GoatAC): nút Gia hạn đổi từ viền vàng
     tĩnh sang màu đỏ (--bad) + icon logo GoatAC + tự nhấp nháy liên
     tục (dùng lại @keyframes blink có sẵn ở trên, không tạo keyframes
     mới) để nổi bật hơn, đúng tinh thần "sắp mất key, gia hạn ngay". */
  .renew-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,59,59,0.12);
    border: 1px solid var(--bad);
    color: var(--bad);
    padding: 5px 10px;
    cursor: pointer;
    flex-shrink: 0;
    animation: blink 1.4s ease-in-out infinite;
  }
  .renew-btn:disabled {
    animation: none;
    opacity: 0.6;
    cursor: default;
  }
  .renew-btn-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .empty-note { color: var(--text-faint); font-size: 13px; padding: 8px 0; }


  /* ---------- Hover gói giá ----------
     Per direct request - "các gói mua khi aim chuột vô thì hiện viền
     sáng": rê chuột vào gói nào thì viền gói đó sáng màu cam + hắt
     quầng sáng ra ngoài, nhấc nhẹ lên. Gói dùng thử sáng màu xanh. */
  .price-card, .trial-banner {
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
  }
  .price-card:hover {
    border-color: var(--fire);
    box-shadow: 0 0 0 1px var(--fire), 0 0 18px rgba(255, 122, 41, 0.45), 0 0 46px rgba(255, 122, 41, 0.18);
    transform: translateY(-4px);
  }
  .trial-banner:hover {
    box-shadow: 0 0 0 1px var(--ok), 0 0 18px rgba(126, 217, 87, 0.35), 0 0 46px rgba(126, 217, 87, 0.12);
  }
  @media (prefers-reduced-motion: reduce) {
    .price-card:hover { transform: none; }
  }

  /* ---------- Trang đăng nhập riêng (/login) ---------- */
  .auth-page {
    min-height: calc(100vh - 69px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
  }
  .auth-page .key-modal { max-width: 440px; }
  .auth-page-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
  .auth-page-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 22px; }
  .auth-page .auth-tabs { width: 100%; }
  .auth-page .auth-tabs .auth-tab { flex: 1; text-align: center; }
  .back-home { display: inline-flex; align-items: center; gap: 8px; }

  /* ---------- Sale mừng khai trương ---------- */
  .sale-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 59, 59, 0.55);
    background: linear-gradient(90deg, rgba(255, 59, 59, 0.16), rgba(255, 122, 41, 0.08));
    font-size: 14.5px;
    color: var(--text);
  }
  .sale-banner-tag, .sale-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff3b3b, #ff7a29);
    border-radius: 6px;
    box-shadow: 0 0 14px rgba(255, 59, 59, 0.45);
  }
  .sale-banner-tag { padding: 4px 10px; font-size: 13px; letter-spacing: 0.04em; }
  .sale-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    padding: 2px 8px;
    font-size: 11px;
  }
  .price-card .old-amt {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-faint);
    text-decoration: line-through;
    margin-bottom: -10px;
  }

  .check-note {
    margin-top: 12px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-dim);
    border-left: 3px solid var(--ok);
    background: rgba(126, 217, 87, 0.06);
    border-radius: 8px;
  }
  .check-note b { color: var(--text); }

  /* ---------- Trang hồ sơ /profile ---------- */
  /* Per direct request - "chỗ hồ sơ làm như wiki, 1 trang riêng; trong
     profile chỉ hiện hồ sơ và lịch sử giao dịch, ví và key của tôi chuyển
     xuống thành ô phụ". */
  .page-main { padding: 48px 0 96px; }
  .page-title { font-size: 32px; font-weight: 800; margin-bottom: 6px; line-height: 1.2; }
  .page-sub { color: var(--text-dim); font-size: 15px; margin-bottom: 32px; }
  .panel {
    background: var(--bg-card);
    border: 1px solid var(--line-bright);
    border-radius: 14px;
    padding: 24px;
    scroll-margin-top: 90px;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
  }
  .panel.flash { border-color: var(--fire); box-shadow: 0 0 0 1px var(--fire), 0 0 26px rgba(255, 122, 41, 0.25); }
  .panel-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .panel-title i { color: var(--fire); }
  .profile-main { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
  .profile-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; align-items: start; }
  .sub-heading {
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--text-faint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 36px 0 12px;
  }
  @media (max-width: 900px) {
    .profile-main, .profile-sub { grid-template-columns: 1fr; }
  }
  .profile-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
  .avatar {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; color: #1a0e05;
    background: linear-gradient(135deg, var(--fire), #ffb020);
    box-shadow: 0 0 18px rgba(255, 122, 41, 0.35);
    flex-shrink: 0;
  }
  .profile-name { font-size: 20px; font-weight: 800; }
  .profile-email { color: var(--text-dim); font-size: 14px; overflow-wrap: anywhere; }
  .stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
  .stat {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
  }
  .stat-label { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
  .stat-value { font-size: 17px; font-weight: 800; margin-top: 2px; }
  .stat-value.money { color: var(--ok); }
  .tx-list { max-height: 520px; overflow-y: auto; }
  .panel .auth-tabs { width: 100%; }
  .panel .auth-tabs .auth-tab { flex: 1; text-align: center; }
  .btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
  .btn-row > * { flex: 1 1 140px; }
  .renew-inline {
    flex-basis: 100%;
    order: 6;
    margin-top: 8px;
    padding: 12px;
    border: 1px dashed var(--line-bright);
    border-radius: 10px;
  }
  details.pw-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
  details.pw-box summary { cursor: pointer; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; align-items: center; gap: 8px; }
  details.pw-box summary::-webkit-details-marker { display: none; }
  details.pw-box summary i { transition: transform 0.2s ease; color: var(--text-faint); }
  details.pw-box[open] summary i { transform: rotate(90deg); }
  details.pw-box .pw-body { margin-top: 12px; }

  /* ---------- Trang wiki /wiki ---------- */
  .wiki { max-width: 860px; }
  .wiki-toc {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px;
  }
  .wiki-toc a {
    font-size: 13.5px;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid var(--line-bright);
    color: var(--text-dim);
    transition: border-color 0.2s ease, color 0.2s ease;
  }
  .wiki-toc a:hover { border-color: var(--fire); color: var(--text); }
  .wiki-section { margin-bottom: 18px; }
  .wiki-section h2 { font-size: 21px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
  .wiki-num {
    width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 14px; font-weight: 700;
    color: #1a0e05; background: var(--fire);
  }
  .wiki-section p, .wiki-section li { color: var(--text-dim); font-size: 15px; line-height: 1.65; }
  .wiki-section p { margin-bottom: 12px; }
  .wiki-section ul { margin: 0 0 12px 20px; }
  .wiki-section li { margin-bottom: 6px; }
  .wiki-section a { color: var(--fire); }
  .wiki-section strong { color: var(--text); }
  .wiki code {
    font-family: var(--font-mono); background: #0a0b08; border: 1px solid var(--line-bright);
    padding: 2px 6px; font-size: 13px; color: var(--ok); border-radius: 6px;
  }
  .wiki pre {
    font-family: var(--font-mono); background: #0a0b08; border: 1px solid var(--line-bright);
    padding: 14px 16px; margin: 10px 0 14px; overflow-x: auto; font-size: 13px; color: var(--text);
    border-radius: 10px;
  }
  .wiki .note {
    border-left: 3px solid var(--void); background: rgba(168, 117, 255, 0.06);
    padding: 12px 16px; margin: 14px 0; font-size: 14px; color: var(--text-dim); border-radius: 8px;
  }
  /* Danh sách lệnh trong wiki: mỗi lệnh 1 ô - cú pháp nằm trọn 1 dòng
     (không bị ngắt giữa các chữ như bảng cũ trên điện thoại; dài quá thì
     vuốt ngang), kèm mô tả và 1 ví dụ dùng thật. */
  .cmd-list { display: flex; flex-direction: column; gap: 10px; }
  .cmd-item {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 0;
  }
  /* Code dạng khối: dài quá thì xuống dòng GIỮA các từ nhưng vẫn nằm
     chung 1 ô (bảng cũ mỗi dòng bị tách thành 1 ô nhỏ rời nhau). */
  .wiki .cmd-item code {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.55;
  }
  .wiki .cmd-syntax { color: var(--fire); font-size: 13.5px; padding: 6px 10px; }
  .cmd-desc { color: var(--text-dim); font-size: 14px; margin: 8px 0; }
  .cmd-example { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .cmd-example span {
    flex-shrink: 0;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .wiki .cmd-example code { padding: 6px 10px; }

  /* ---------- Khung thông tin chuyển khoản ---------- */
  .bank-box {
    margin-top: 12px;
    border: 1px solid rgba(255, 122, 41, 0.6);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 122, 41, 0.12), rgba(255, 122, 41, 0.03));
    box-shadow: 0 0 18px rgba(255, 122, 41, 0.15);
    overflow: hidden;
  }
  .bank-row {
    display: grid;
    grid-template-columns: 82px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 122, 41, 0.18);
  }
  .bank-row:first-child { border-top: none; }
  .bank-label {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .bank-value {
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    overflow-wrap: anywhere;
    letter-spacing: 0.02em;
  }
  .bank-row-reason { background: rgba(255, 122, 41, 0.12); }
  .bank-row-reason .bank-value { color: var(--fire); font-size: 18px; }
  .bank-copy {
    font-size: 12px;
    padding: 6px 10px;
    border: 1px solid var(--line-bright);
    background: var(--bg);
    color: var(--text-dim);
    white-space: nowrap;
  }
  .bank-copy:hover { border-color: var(--fire); color: var(--text); }
  .bank-copy.copied { border-color: var(--ok); color: var(--ok); }
  @media (max-width: 420px) {
    .bank-row { grid-template-columns: 64px 1fr auto; padding: 9px 12px; gap: 8px; }
    .bank-value { font-size: 15.5px; }
    .bank-row-reason .bank-value { font-size: 16px; }
  }

  /* ---------- Nút chat hỗ trợ ---------- */
  /* Per direct request - "thay cái chat icon đi, làm đẹp 1 tỷ điểm": quả
     cầu gradient cam-đỏ có ánh bóng, icon bong bóng chat vẽ tay với 3 chấm
     "đang gõ", vòng sáng toả nhịp, rê chuột thì dài ra hiện chữ. */
  .support-launcher {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 60;
    display: flex;
    align-items: center;
    height: 62px;
    padding: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ff9a3c 0%, #ff6a2a 45%, #ff2d55 100%);
    box-shadow:
      0 10px 30px rgba(255, 74, 52, 0.45),
      0 2px 6px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.2);
    animation: slFloat 3.6s ease-in-out infinite;
  }
  .support-launcher::after {
    /* ánh bóng kính phía trên */
    content: "";
    position: absolute;
    inset: 3px 10px auto 10px;
    height: 45%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
    pointer-events: none;
  }
  .support-launcher:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 38px rgba(255, 74, 52, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation-play-state: paused;
  }
  .support-launcher:active { transform: scale(0.95); }
  .sl-orb {
    width: 62px;
    height: 62px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .sl-icon { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(120, 20, 0, 0.35)); }
  .sl-dot { fill: #ff4d2e; animation: slType 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .sl-d2 { animation-delay: 0.18s; }
  .sl-d3 { animation-delay: 0.36s; }
  .support-launcher-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    line-height: 1.15;
    transition: max-width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, padding 0.35s ease;
  }
  .support-launcher-label b { font-size: 15px; font-weight: 800; }
  .support-launcher-label small { font-size: 11.5px; opacity: 0.85; }
  .support-launcher:hover .support-launcher-label { max-width: 160px; opacity: 1; padding-right: 22px; }
  .sl-pulse {
    position: absolute;
    left: 0;
    top: 0;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: 2px solid rgba(255, 110, 60, 0.7);
    animation: slPulse 2.4s ease-out infinite;
    pointer-events: none;
  }
  .support-badge {
    position: absolute;
    top: -4px;
    left: 42px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: #ff2d55;
    font-size: 12px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    animation: slPop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.4);
  }
  .support-badge[hidden] { display: none; }
  @keyframes slPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.7); opacity: 0; }
  }
  @keyframes slType {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
    30% { transform: translateY(-2.2px); opacity: 1; }
  }
  @keyframes slFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
  }
  @keyframes slPop {
    from { transform: scale(0.3); }
    to { transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .support-launcher, .sl-dot, .sl-pulse, .support-badge { animation: none; }
  }
  @media (max-width: 520px) {
    .support-launcher { right: 14px; bottom: 14px; height: 56px; }
    .sl-orb, .sl-pulse { width: 56px; height: 56px; }
    .sl-icon { width: 30px; height: 30px; }
    .support-badge { left: 38px; }
  }

  /* ---------- Trang chat /support ---------- */
  .chat-page { padding: 20px 0 20px; }
  .chat-wrap { max-width: 1180px; }
  .chat-app {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 69px - 40px);
    min-height: 480px;
    border: 1px solid var(--line-bright);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
  }
  .chat-app.is-user { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
  .chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
  .chat-list-head { padding: 16px; border-bottom: 1px solid var(--line); }
  .chat-list-title { font-weight: 800; font-size: 18px; margin-bottom: 10px; }
  .chat-search { position: relative; }
  .chat-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 13px; }
  .chat-search input {
    width: 100%; padding: 10px 12px 10px 34px; background: var(--bg);
    border: 1px solid var(--line-bright); color: var(--text); font-size: 14px; font-family: inherit;
  }
  .chat-search input:focus { outline: none; border-color: var(--void); }
  .chat-list-items { overflow-y: auto; flex: 1; padding: 6px; }
  .chat-item {
    width: 100%; display: flex; gap: 12px; align-items: center; text-align: left;
    padding: 10px; border: none; background: transparent; color: var(--text); cursor: pointer;
    border-radius: 10px; font-family: inherit;
  }
  .chat-item:hover { background: rgba(255, 255, 255, 0.04); }
  .chat-item.active { background: rgba(255, 122, 41, 0.12); }
  .chat-item:active:not(:disabled) { transform: none; }
  .chat-item-text { flex: 1; min-width: 0; }
  .chat-item-top, .chat-item-bottom { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
  .chat-item-name { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-item-time { font-size: 11.5px; color: var(--text-faint); flex-shrink: 0; }
  .chat-item-preview { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-item.unread .chat-item-name, .chat-item.unread .chat-item-preview { color: var(--text); font-weight: 800; }
  .chat-badge {
    flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
    background: var(--fire); color: #1a0e05; font-size: 11.5px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .chat-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 17px; color: #1a0e05;
    background: linear-gradient(135deg, var(--fire), #ffb020);
  }
  /* section mặc định có padding 88px + viền trên (style trang chủ) - bỏ cho khung chat. */
  .chat-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; padding: 0; border-top: none; }
  .chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .chat-head-text { min-width: 0; }
  .chat-head-name { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-head-sub { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-back { display: none; background: transparent; border: 1px solid var(--line-bright); color: var(--text); width: 36px; height: 36px; flex-shrink: 0; }
  .chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
  .chat-empty { margin: auto; text-align: center; color: var(--text-dim); max-width: 360px; font-size: 14px; }
  .chat-empty i { font-size: 38px; color: var(--fire); margin-bottom: 10px; display: block; }
  .chat-msg { display: flex; }
  .chat-msg.mine { justify-content: flex-end; }
  .chat-bubble {
    max-width: min(78%, 520px); padding: 8px 12px 6px; border-radius: 16px;
    background: #23281c; color: var(--text); font-size: 14.5px; line-height: 1.45;
    overflow-wrap: anywhere;
  }
  .chat-msg.mine .chat-bubble { background: linear-gradient(135deg, #ff7a29, #ff5a2a); color: #1a0e05; border-bottom-right-radius: 4px; }
  .chat-msg.theirs .chat-bubble { border-bottom-left-radius: 4px; }
  .chat-msg.mine .chat-text a { color: #1a0e05; text-decoration: underline; }
  .chat-text a { color: var(--fire); text-decoration: underline; }
  .chat-who { font-size: 11.5px; font-weight: 800; opacity: 0.75; margin-bottom: 2px; }
  .chat-time { font-size: 10.5px; opacity: 0.6; text-align: right; margin-top: 2px; }
  .chat-img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 2px 0 4px; }
  .chat-video { display: block; width: 100%; max-height: 360px; border-radius: 10px; margin: 2px 0 4px; background: #000; }
  .chat-file {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0 4px;
    border-radius: 10px; background: rgba(0, 0, 0, 0.22); color: inherit;
  }
  .chat-file i { font-size: 22px; }
  .chat-file span { display: flex; flex-direction: column; min-width: 0; }
  .chat-file b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-file small { font-size: 11.5px; opacity: 0.75; }
  .chat-file.compact { padding: 4px 8px; }
  .chat-file.compact i { font-size: 15px; }
  .chat-compose { border-top: 1px solid var(--line); padding: 10px 12px; }
  .chat-compose-row { display: flex; gap: 8px; align-items: flex-end; }
  .chat-compose textarea {
    flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 14px;
    background: var(--bg); border: 1px solid var(--line-bright); color: var(--text);
    font-family: inherit; font-size: 14.5px; line-height: 1.4; border-radius: 20px;
  }
  .chat-compose textarea:focus { outline: none; border-color: var(--fire); }
  .chat-attach, .chat-send {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .chat-attach { border: 1px solid var(--line-bright); color: var(--text-dim); font-size: 17px; }
  .chat-attach:hover { color: var(--text); border-color: var(--text-dim); }
  .chat-send { border: none; background: var(--fire); color: #1a0e05; font-size: 16px; }
  .chat-file-chip {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
    padding: 6px 10px; margin-bottom: 8px; border-radius: 8px;
    background: rgba(255, 122, 41, 0.12); border: 1px solid rgba(255, 122, 41, 0.4); font-size: 13px;
  }
  .chat-file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chat-file-chip button { background: transparent; border: none; color: var(--text-dim); cursor: pointer; }
  .chat-progress { position: relative; height: 22px; margin-bottom: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; border: 1px solid var(--line); }
  .chat-progress div { position: absolute; inset: 0 auto 0 0; background: rgba(255, 122, 41, 0.35); transition: width 0.2s; }
  .chat-progress span { position: relative; font-size: 12px; padding: 0 10px; line-height: 20px; }
  .chat-error { color: var(--bad); font-size: 13px; margin-top: 6px; min-height: 0; }
  .chat-error:empty { display: none; }
  @media (max-width: 760px) {
    .chat-page { padding: 0; }
    .chat-page .wrap { padding: 0; }
    .chat-app { border-radius: 0; border-left: none; border-right: none; height: calc(100vh - 69px); grid-template-columns: 1fr; }
    .chat-app.is-staff .chat-pane { display: none; }
    .chat-app.is-staff.show-pane .chat-list { display: none; }
    .chat-app.is-staff.show-pane .chat-pane { display: flex; }
    .chat-back { display: inline-flex; align-items: center; justify-content: center; }
    .chat-bubble { max-width: 85%; }
  }
  @supports (height: 100dvh) {
    .chat-app { height: calc(100dvh - 69px - 40px); }
    @media (max-width: 760px) { .chat-app { height: calc(100dvh - 69px); } }
  }

  /* ---------- Menu theo trạng thái đăng nhập ---------- */
  body:not(.logged-in) .nav-auth { display: none !important; }
  body.logged-in .nav-guest { display: none !important; }
  .mobile-dropdown a.mobile-cta { color: var(--fire); font-weight: 700; }
  .mobile-dropdown.show a:nth-child(10) { transition-delay: 0.3s; }
  .mobile-dropdown.show a:nth-child(11) { transition-delay: 0.33s; }
  .mobile-dropdown.show a:nth-child(12) { transition-delay: 0.36s; }
  .mobile-dropdown.show a:nth-child(13) { transition-delay: 0.39s; }

  /* ---------- Trang thanh toán /checkout ---------- */
  .checkout-wrap { max-width: 980px; }
  .back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 14px; margin-bottom: 14px; }
  .back-link:hover { color: var(--text); }
  .checkout-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 20px; align-items: start; }
  @media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }
  .co-plan { font-size: 24px; font-weight: 800; }
  .co-sale { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
  .sale-badge.static { position: static; }
  .co-old { font-family: var(--font-mono); color: var(--text-faint); text-decoration: line-through; }
  .co-price { font-size: 36px; font-weight: 800; color: var(--fire); margin: 4px 0; }
  .co-points { margin: 16px 0 0 18px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }
  .co-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
  .co-methods.locked { opacity: 0.6; pointer-events: none; }
  .co-method input { position: absolute; opacity: 0; pointer-events: none; }
  .co-method-box {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; cursor: pointer;
    border: 1px solid var(--line-bright); border-radius: 12px; background: var(--bg);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  .co-method-box:hover { border-color: var(--text-dim); }
  .co-method input:checked + .co-method-box {
    border-color: var(--fire);
    background: rgba(255, 122, 41, 0.08);
    box-shadow: 0 0 0 1px var(--fire), 0 0 18px rgba(255, 122, 41, 0.2);
  }
  .co-method-icon {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    color: var(--fire); background: rgba(255, 122, 41, 0.12);
  }
  .co-method-text { display: flex; flex-direction: column; }
  .co-method-text b { font-size: 16px; }
  .co-method-text small { font-size: 13px; color: var(--text-dim); }
  .co-confirm { width: 100%; padding: 14px; font-size: 16px; }
  #checkoutResult { margin-top: 16px; }
  .co-qr { display: flex; justify-content: center; }
  .co-qr img { width: 100%; max-width: 280px; border-radius: 12px; background: #fff; padding: 10px; }
  .co-wait { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-dim); font-size: 14px; }
  .co-spinner {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255, 122, 41, 0.25); border-top-color: var(--fire);
    animation: coSpin 0.8s linear infinite;
  }
  @keyframes coSpin { to { transform: rotate(360deg); } }
  .co-success { text-align: center; }
  .co-success-icon { font-size: 44px; color: var(--ok); margin-bottom: 6px; }
  .co-success h3 { font-size: 19px; margin-bottom: 10px; }

  /* Xác nhận + màn chờ trên trang thanh toán */
  .co-confirm-box {
    border: 1px solid rgba(255, 122, 41, 0.6);
    background: rgba(255, 122, 41, 0.08);
    border-radius: 12px;
    padding: 16px;
    animation: checkIn 0.25s ease both;
  }
  .co-confirm-q { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
  .co-confirm-q i { color: var(--fire); margin-right: 4px; }
  .co-confirm-actions { display: flex; gap: 10px; }
  .co-confirm-actions > * { flex: 1; padding: 12px; font-size: 15px; }
  .co-btn-no {
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
  }
  .co-btn-no:hover { border-color: var(--text-dim); }
  .co-processing {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 22px 10px 10px;
    animation: checkIn 0.25s ease both;
  }
  .co-processing b { font-size: 17px; }
  .co-loader {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid rgba(255, 122, 41, 0.18);
    border-top-color: var(--fire);
    border-right-color: #ff2d55;
    animation: coSpin 0.9s linear infinite;
    box-shadow: 0 0 22px rgba(255, 122, 41, 0.25);
    margin-bottom: 6px;
  }
  @media (prefers-reduced-motion: reduce) { .co-loader { animation-duration: 2.5s; } }

  /* ---------- Nút thoát chat ---------- */
  .chat-exit {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--line-bright);
    color: var(--text-dim);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
  }
  .chat-exit:hover { color: var(--text); border-color: var(--bad); }
  .chat-list-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
  .chat-list-top .chat-list-title { margin-bottom: 0; }
  /* Desktop staff: nút thoát ở đầu danh sách là đủ, ẩn bớt nút ở khung chat. */
  @media (min-width: 761px) { .chat-app.is-staff .chat-head .chat-exit { display: none; } }
  .chat-avatar { overflow: hidden; }
  .chat-avatar img, .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

  /* ---------- Ảnh đại diện ---------- */
  .avatar-edit { position: relative; cursor: pointer; overflow: hidden; }
  .avatar-edit #profileAvatar { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
  .avatar-cam {
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .avatar-edit:hover .avatar-cam { opacity: 1; }
  @media (hover: none) { .avatar-cam { opacity: 1; } }
  .avatar-edit.uploading { opacity: 0.5; }
  .avatar-actions { display: flex; gap: 14px; margin-top: 4px; font-size: 13px; }
  .avatar-actions a { color: var(--fire); }
  .avatar-actions a#avatarRemove { color: var(--text-faint); }
  .nav-avatar { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
  .wallet-btn.logged-in:has(.nav-avatar) { padding: 0; overflow: hidden; }

  /* ---------- Menu hamburger mới ---------- */
  .mnav { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
  .mobile-dropdown .mnav a { padding: 0; border-bottom: none; font-size: inherit; color: inherit; }
  .mnav-user {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px !important;
    border-radius: 14px; border: 1px solid rgba(255, 122, 41, 0.35);
    background: linear-gradient(135deg, rgba(255, 122, 41, 0.16), rgba(255, 45, 85, 0.06));
  }
  .mnav-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: #1a0e05;
    background: linear-gradient(135deg, var(--fire), #ffb020);
  }
  .mnav-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .mnav-user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .mnav-user-text b { color: var(--text); font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mnav-user-text small { color: var(--text-dim); font-size: 12.5px; }
  .mnav-arrow { color: var(--text-faint); font-size: 13px; }
  .mnav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mnav-tile {
    display: flex; align-items: center; gap: 10px; padding: 12px !important;
    border-radius: 12px; background: var(--bg-card); border: 1px solid var(--line);
    color: var(--text) !important; font-weight: 700; font-size: 14px !important;
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.25s ease, transform 0.3s ease !important;
  }
  .mnav-tile:hover, .mnav-tile:active { border-color: var(--line-bright); background: #1f2418; }
  .mnav-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
  }
  .ico-fire { color: var(--fire); background: rgba(255, 122, 41, 0.14); }
  .ico-void { color: var(--void); background: rgba(168, 117, 255, 0.14); }
  .ico-ok { color: var(--ok); background: rgba(126, 217, 87, 0.14); }
  .ico-red { color: #ff4d6d; background: rgba(255, 77, 109, 0.14); }
  .mnav-foot { display: flex; gap: 8px; flex-wrap: wrap; }
  .mnav-foot a {
    flex: 1 1 auto; display: inline-flex !important; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 10px !important; border-radius: 10px; border: 1px solid var(--line);
    color: var(--text-dim) !important; font-size: 13px !important; white-space: nowrap;
  }
  .mnav-foot a:hover { color: var(--text) !important; border-color: var(--line-bright); }
  .mnav-foot a.mnav-logout, .mnav-foot a.mnav-logout:hover { color: var(--bad) !important; border-color: rgba(255, 77, 109, 0.35); }
  /* Hiệu ứng trượt: các khối hiện dần lần lượt khi mở menu. */
  .mnav > * { opacity: 0; transform: translateY(-8px); transition: opacity 0.25s ease, transform 0.3s ease; }
  .mobile-dropdown.show .mnav > * { opacity: 1; transform: none; }
  .mobile-dropdown.show .mnav > *:nth-child(2) { transition-delay: 0.05s; }
  .mobile-dropdown.show .mnav > *:nth-child(3) { transition-delay: 0.1s; }
  .mobile-dropdown.show .mnav > *:nth-child(4) { transition-delay: 0.15s; }
  .mobile-dropdown .mnav a { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .mnav > * { transition: none; } }

  /* =========================================================
     Trang Ví / Key của tôi / Chi tiết key (pages.js)
     ========================================================= */
  .narrow-wrap { max-width: 760px; }
  .page-main .panel + .panel, .wallet-hero + .panel, .key-hero + .panel { margin-top: 16px; }
  .field-label { font-size: 12.5px; font-family: var(--font-mono); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 8px; }
  .big-btn { width: 100%; padding: 14px; font-size: 15.5px; margin-top: 4px; }
  .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .two-col .auth-input { margin-bottom: 10px; }
  @media (max-width: 480px) { .two-col { grid-template-columns: 1fr; gap: 0; } }

  /* Hero số dư */
  .wallet-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(135deg, #2a1608 0%, #1b120c 45%, #12140e 100%);
    border: 1px solid rgba(255, 122, 41, 0.45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  .wh-glow {
    position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 41, 0.45), transparent 65%);
    pointer-events: none;
  }
  .wh-top { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .wh-label { font-size: 13.5px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 8px; }
  .wh-label i { color: var(--fire); }
  .wh-user { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
  .wh-amount { position: relative; font-size: clamp(34px, 8vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 18px; }
  .wh-actions { position: relative; display: flex; gap: 10px; }
  .wh-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px; border-radius: 12px; font-weight: 800; font-size: 14.5px;
    border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: var(--text);
  }
  .wh-btn-main { background: var(--fire); border-color: var(--fire); color: #1a0e05; }
  .wh-btn:hover { filter: brightness(1.1); }

  /* Thanh chọn 2 mục (segmented) */
  .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
  .seg-btn {
    padding: 11px 8px; border: none; background: transparent; color: var(--text-dim);
    font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  }
  .seg-btn.active { background: var(--bg-card); color: var(--text); box-shadow: 0 0 0 1px var(--line-bright), 0 4px 12px rgba(0, 0, 0, 0.3); }
  .seg-btn.active i { color: var(--fire); }
  .pay-pane { display: none; }
  .pay-pane.active { display: block; animation: checkIn 0.25s ease both; }

  /* Chip chọn nhanh */
  .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .chip {
    padding: 9px 14px; border: 1px solid var(--line-bright); background: var(--bg);
    color: var(--text-dim); font-weight: 700; font-size: 13.5px; border-radius: 999px !important; cursor: pointer;
  }
  .chip:hover { color: var(--text); border-color: var(--text-dim); }
  .chip.active { color: #1a0e05; background: var(--fire); border-color: var(--fire); }

  /* Danh sách giao dịch */
  .tx2-list { display: flex; flex-direction: column; }
  .tx2 { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .tx2:first-child { border-top: none; }
  .tx2-ico { width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; }
  .tx2-ico.in { color: var(--ok); background: rgba(126, 217, 87, 0.12); }
  .tx2-ico.out { color: #ff5c5c; background: rgba(255, 92, 92, 0.12); }
  .tx2-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .tx2-text b { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
  .tx2-text small { font-size: 12px; color: var(--text-faint); }
  .tx2-amt { font-family: var(--font-mono); font-weight: 700; font-size: 14px; white-space: nowrap; }
  .tx2-amt.in { color: var(--ok); }
  .tx2-amt.out { color: #ff5c5c; }
  .empty-state { text-align: center; padding: 26px 10px; color: var(--text-dim); }
  .empty-state i { font-size: 34px; color: var(--text-faint); margin-bottom: 10px; display: block; }
  .empty-state p { margin-bottom: 14px; }
  .empty-state.wide { grid-column: 1 / -1; border: 1px dashed var(--line-bright); border-radius: 16px; padding: 40px 16px; }

  .success-banner {
    display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin-bottom: 16px;
    border-radius: 14px; border: 1px solid rgba(126, 217, 87, 0.5);
    background: linear-gradient(135deg, rgba(126, 217, 87, 0.14), rgba(126, 217, 87, 0.04));
    animation: checkIn 0.35s ease both;
  }
  .success-banner > i { font-size: 26px; color: var(--ok); }
  .success-banner div { display: flex; flex-direction: column; }
  .success-banner b { font-size: 15.5px; }
  .success-banner span { font-size: 13.5px; color: var(--text-dim); }

  /* Key của tôi */
  .page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
  .head-cta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; }
  .filter-chips { margin-bottom: 18px; }
  .key-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
  @media (max-width: 520px) { .key-grid { grid-template-columns: 1fr; } }
  .kc {
    --k: var(--fire);
    display: flex; flex-direction: column; gap: 10px; padding: 16px; color: var(--text);
    border-radius: 16px; background: var(--bg-card); border: 1px solid var(--line);
    position: relative; overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
  }
  .kc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--k); opacity: 0.9; }
  .kc:hover { border-color: var(--k); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); }
  .kc.st-active { --k: var(--ok); }
  .kc.st-ready { --k: var(--void); }
  .kc.st-renew { --k: var(--warn); }
  .kc.st-expired { --k: #6b7060; }
  .kc-top, .kh-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .kc-tier { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; }
  .kc-ico {
    width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--k, var(--fire)); background: rgba(255, 255, 255, 0.05);
  }
  .st-pill { font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
  .st-pill.st-active { color: var(--ok); background: rgba(126, 217, 87, 0.14); }
  .st-pill.st-ready { color: var(--void); background: rgba(168, 117, 255, 0.14); }
  .st-pill.st-renew { color: var(--warn); background: rgba(255, 176, 32, 0.14); }
  .st-pill.st-expired { color: var(--text-faint); background: rgba(255, 255, 255, 0.06); }
  .kc-key { font-family: var(--font-mono); font-size: 13.5px; color: var(--text-dim); letter-spacing: 0.03em; overflow-wrap: anywhere; }
  .kc-time { font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; }
  .kc-time.warn { color: var(--warn); }
  .kc-time.muted { color: var(--text-faint); }
  .kc-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
  .kc-bar.big { height: 8px; margin-top: 8px; }
  .kc-bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #5fbf3a, var(--ok)); transition: width 1s linear; }
  .kc-bar > div.warn { background: var(--warn); }
  .kc-bar > div.danger { background: #ff5c5c; }
  .kc-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
  .kc-btn {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; font-weight: 700;
    border: 1px solid var(--line-bright); background: var(--bg); color: var(--text);
  }
  .kc-btn:hover { border-color: var(--k); }
  .kc-btn.copied { color: var(--ok); border-color: var(--ok); }
  .kc-more { font-size: 13px; color: var(--text-dim); display: inline-flex; align-items: center; gap: 6px; }
  .kc:hover .kc-more { color: var(--text); }

  /* Chi tiết key */
  .key-hero {
    --k: var(--fire);
    border-radius: 20px; padding: 22px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, #1d2116, #12140e);
    border: 1px solid var(--line-bright);
  }
  .key-hero::after {
    content: ""; position: absolute; inset: auto -40px -90px auto; width: 240px; height: 240px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--k) 35%, transparent), transparent 65%); pointer-events: none;
  }
  .key-hero.st-active { --k: var(--ok); }
  .key-hero.st-ready { --k: var(--void); }
  .key-hero.st-renew { --k: var(--warn); }
  .key-hero.st-expired { --k: #6b7060; }
  .kh-key {
    position: relative; margin: 18px 0 14px; padding: 16px; border-radius: 14px; text-align: center;
    font-family: var(--font-mono); font-size: clamp(16px, 4.6vw, 22px); font-weight: 700; letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.35); border: 1px dashed color-mix(in srgb, var(--k) 60%, transparent); overflow-wrap: anywhere;
  }
  .kh-remaining { position: relative; margin-top: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
  .info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .info { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
  .info span { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
  .info b { font-size: 14.5px; }
  @media (max-width: 360px) { .info-grid { grid-template-columns: 1fr; } }
  .cmd-copy {
    display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px;
    background: #0a0b08; border: 1px solid var(--line-bright); border-radius: 12px;
  }
  .cmd-copy code { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--ok); overflow-wrap: anywhere; }
  .renew-panel { border-color: rgba(255, 176, 32, 0.5); }

  /* Ô phụ trong Hồ sơ */
  .profile-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  @media (max-width: 640px) { .profile-tiles { grid-template-columns: 1fr; } }
  .ptile {
    display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 16px; color: var(--text);
    background: var(--bg-card); border: 1px solid var(--line-bright);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
  }
  .ptile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); }
  .ptile-wallet:hover { border-color: var(--ok); }
  .ptile-keys:hover { border-color: var(--fire); }
  .ptile-ico { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 19px; }
  .ptile-wallet .ptile-ico { color: var(--ok); background: rgba(126, 217, 87, 0.12); }
  .ptile-keys .ptile-ico { color: var(--fire); background: rgba(255, 122, 41, 0.12); }
  .ptile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .ptile-text small { font-size: 12.5px; color: var(--text-faint); font-family: var(--font-mono); }
  .ptile-text b { font-size: 19px; font-weight: 800; }
  .ptile-text em { font-style: normal; font-size: 12.5px; color: var(--text-dim); }
  .ptile-arrow { color: var(--text-faint); }

  /* ---------- Mệnh giá cuộn ngang ---------- */
  .scroller-wrap { position: relative; margin: 0 -4px 12px; }
  .chips.scroller {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 24px;
    padding: 6px 4px 10px;
    margin-bottom: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  }
  .chips.scroller::-webkit-scrollbar { display: none; }
  .chips.scroller .chip { scroll-snap-align: center; flex-shrink: 0; }
  .telco-scroller { margin: 0 -4px 12px; }
  .amt-card {
    min-width: 108px;
    padding: 14px 16px !important;
    border-radius: 16px !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    background: linear-gradient(160deg, #1d2116, #12140e) !important;
    border: 1px solid var(--line-bright) !important;
    color: var(--text) !important;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1.2), border-color 0.2s ease, box-shadow 0.25s ease !important;
  }
  .amt-card b { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
  .amt-card small { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); }
  .amt-card:hover { border-color: var(--text-dim) !important; }
  .amt-card.active {
    transform: translateY(-3px) scale(1.04);
    border-color: var(--fire) !important;
    background: linear-gradient(160deg, rgba(255, 122, 41, 0.28), rgba(255, 45, 85, 0.12)) !important;
    box-shadow: 0 8px 22px rgba(255, 122, 41, 0.28);
  }
  .amt-card.active b { color: var(--fire); }
  .amt-card.active small { color: var(--text-dim); }
  .scroll-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 34px; height: 34px; border-radius: 50% !important; display: none;
    align-items: center; justify-content: center; font-size: 12px;
    background: rgba(12, 14, 11, 0.9); border: 1px solid var(--line-bright); color: var(--text);
  }
  .scroll-arrow.left { left: -6px; }
  .scroll-arrow.right { right: -6px; }
  @media (hover: hover) and (min-width: 700px) { .scroll-arrow { display: inline-flex; } }
  .scroll-arrow:active { transform: translateY(-50%) scale(0.9); }
  .wh-amount.rolling { color: var(--ok); text-shadow: 0 0 22px rgba(126, 217, 87, 0.45); transition: color 0.3s; }
  .wh-amount { transition: color 0.6s ease, text-shadow 0.6s ease; }

  /* ---------- Bánh xe chọn mệnh giá ---------- */
  .field-hint { text-transform: none; letter-spacing: 0; font-family: var(--font-sans); color: var(--text-faint); font-size: 11.5px; margin-left: 6px; }
  .wheel-field {
    position: relative;
    height: 138px;
    margin-bottom: 8px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--line-bright);
    overflow: hidden;
  }
  .wheel-field::before {
    /* dải sáng đánh dấu dòng đang chọn */
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 46px;
    transform: translateY(-50%);
    border-radius: 10px;
    background: rgba(255, 122, 41, 0.12);
    border: 1px solid rgba(255, 122, 41, 0.55);
    box-shadow: 0 0 18px rgba(255, 122, 41, 0.18);
    pointer-events: none;
  }
  .wheel-field::after {
    /* mờ dần trên/dưới như bánh xe cong */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg) 0%, transparent 34%, transparent 66%, var(--bg) 100%);
    pointer-events: none;
  }
  .wheel {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    outline: none;
  }
  .wheel::-webkit-scrollbar { display: none; }
  .wheel-pad { height: 46px; }
  .wheel-item {
    height: 46px;
    line-height: 46px;
    text-align: center;
    scroll-snap-align: center;
    font-family: var(--font-mono);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-faint);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease, transform 0.15s ease, font-size 0.15s ease;
    transform: scale(0.88);
  }
  .wheel-item.near { color: var(--text-dim); transform: scale(0.94); }
  .wheel-item.sel { color: var(--fire); font-size: 22px; transform: scale(1); }
  .wheel-unit {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 800;
    color: var(--fire);
    z-index: 1;
    pointer-events: none;
  }
  .custom-toggle { display: inline-block; font-size: 13px; color: var(--fire); margin: 2px 0 12px; }
  .warn-note {
    display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; padding: 12px 14px;
    border-radius: 12px; border: 1px solid rgba(255, 92, 92, 0.5); background: rgba(255, 92, 92, 0.08);
    font-size: 13.5px; color: var(--text-dim); line-height: 1.5;
  }
  .warn-note i { color: #ff5c5c; margin-top: 3px; }
  .warn-note b { color: #ff7b7b; }

/* ---------- Bánh xe ngang chọn nhà mạng (logo) ---------- */
.telco-wheel-field {
  position: relative; height: 92px; margin-bottom: 6px;
  border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 8px;
  background: rgba(0,0,0,.35); overflow: hidden;
}
.telco-wheel-field::before { /* khung chọn ở giữa */
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; width: 108px; transform: translateX(-50%);
  border: 1px solid var(--fire, #ff7a2a); border-radius: 8px;
  background: rgba(255,122,42,.08); box-shadow: 0 0 18px rgba(255,122,42,.25);
  pointer-events: none; z-index: 0;
}
.telco-wheel-field::after { /* mờ dần 2 bên */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(90deg, rgba(10,10,10,.95), transparent 28%, transparent 72%, rgba(10,10,10,.95));
}
.telco-wheel {
  position: relative; z-index: 1; display: flex; align-items: center; height: 100%;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  outline: none; -webkit-overflow-scrolling: touch;
}
.telco-wheel::-webkit-scrollbar { display: none; }
.telco-pad { flex: 0 0 calc(50% - 58px); }
.telco-item {
  flex: 0 0 116px; height: 76px; padding: 6px 10px; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  opacity: .35; transform: scale(.8); transition: opacity .2s, transform .2s, filter .2s;
  filter: grayscale(.6);
}
.telco-item.near { opacity: .6; transform: scale(.88); }
.telco-item.sel { opacity: 1; transform: scale(1); filter: none; }
.telco-item img {
  width: 96px; height: 58px; box-sizing: border-box; object-fit: contain; border-radius: 8px;
  background: #fff; padding: 8px 9px; user-select: none; pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.telco-badge {
  display: flex; align-items: center; justify-content: center;
  width: 92px; height: 52px; border-radius: 8px; background: var(--tc);
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.telco-picked { font-size: 13px; color: var(--text-dim, #9a9a9a); text-align: center; margin-bottom: 14px; }
.telco-picked b { color: var(--fire, #ff7a2a); }

.telco-admin { display: grid; gap: 8px; }
.telco-admin-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.telco-admin-row b { flex: 1; min-width: 80px; }
.telco-admin-prev {
  width: 54px; height: 34px; border-radius: 8px; background: var(--tc);
  display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-weight: 800; font-size: 12px;
}
.telco-admin-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.telco-up { cursor: pointer; }

/* ---------- Giao dịch ngân hàng (staff) ---------- */
.bank-status p { font-size: 13px; line-height: 1.5; margin: 0 0 8px; padding: 10px 12px; border-radius: 8px; }
.bank-ok { background: rgba(60,200,120,.1); color: #7be0a4; }
.bank-bad { background: rgba(255,77,94,.1); color: #ff8a95; word-break: break-all; }
.bank-row { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07); }
.bank-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bank-amt { color: #7be0a4; font-size: 16px; }
.bank-pill { font-size: 12px; padding: 3px 9px; border-radius: 8px; font-weight: 700; }
.bank-pill.ok { background: rgba(60,200,120,.15); color: #7be0a4; }
.bank-pill.bad { background: rgba(255,77,94,.15); color: #ff8a95; }
.bank-content { font-family: 'Space Mono', monospace; font-size: 12px; color: var(--text-dim, #9a9a9a); margin-top: 4px; word-break: break-all; }
.bank-assign { display: flex; gap: 8px; margin-top: 8px; }
.bank-assign .auth-input { flex: 1; margin: 0; }
.bank-assign .btn-primary { white-space: nowrap; padding: 0 14px; }
#bankList { display: block; }
#bankList .bank-row { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
#bankList .bank-row > * { width: 100%; }
#bankList .bank-top { flex-direction: row; }
#bankList .bank-assign { display: flex; flex-direction: row; }
#bankList .bank-assign .auth-input { min-width: 0; width: auto; }

/* ================= Trang đăng nhập / đăng ký (auth2) ================= */
.auth2 {
  position: relative; min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center;
  padding: 40px 16px 60px; overflow: hidden;
}
.auth2-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 36px 36px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.auth2-bg span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: auth2Float 12s ease-in-out infinite alternate; }
.auth2-bg span:nth-child(1) { width: 340px; height: 340px; background: rgba(255,122,41,.35); top: 8%; left: 50%; margin-left: -300px; }
.auth2-bg span:nth-child(2) { width: 280px; height: 280px; background: rgba(255,59,59,.22); bottom: 6%; left: 50%; margin-left: 20px; animation-delay: -6s; }
@keyframes auth2Float { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,-24px) scale(1.12); } }

.auth2-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(28,32,22,.92), rgba(18,21,14,.94));
  border: 1px solid var(--line-bright); border-radius: 8px; padding: 30px 26px 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,122,41,.06), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}
.auth2-card::before { content: ""; position: absolute; top: -1px; left: 18%; right: 18%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--fire), transparent); }
.auth2-card.swap #authMainForm { animation: auth2Swap .35s ease; }
@keyframes auth2Swap { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.auth2-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 22px; }
.auth2-logo { width: 62px; height: 62px; border-radius: 8px; padding: 3px;
  background: linear-gradient(135deg, var(--fire), #ff3b3b); box-shadow: 0 8px 28px rgba(255,122,41,.35); }
.auth2-logo img { width: 100%; height: 100%; border-radius: 6px; object-fit: cover; display: block; background: #0c0e0b; }
.auth2-brand-name { font-family: var(--font-mono); font-weight: 700; font-size: 18px; letter-spacing: 1px; }

.auth2-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 22px;
  background: rgba(0,0,0,.4); border: 1px solid var(--line); border-radius: 8px; }
.auth2-seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 6px;
  background: var(--fire); box-shadow: 0 4px 16px rgba(255,122,41,.35); transition: transform .3s cubic-bezier(.4,1.3,.5,1); }
.auth2-seg.is-register .auth2-seg-pill { transform: translateX(100%); }
.auth2-seg .auth-tab { position: relative; z-index: 1; background: transparent !important; border: none; padding: 10px 0;
  font: 700 14px var(--font-sans); color: var(--text-dim); cursor: pointer; transition: color .25s; text-align: center; }
.auth2-seg .auth-tab.active { color: #1a0e05; }

.auth2-title { font-size: 22px; font-weight: 800; margin: 0 0 4px; text-align: center; }
.auth2-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; text-align: center; line-height: 1.5; }

.auth2-field { position: relative; display: block; margin-bottom: 12px; }
.auth2-field > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 14px; transition: color .2s; pointer-events: none; }
.auth2-field input { width: 100%; box-sizing: border-box; height: 54px; padding: 20px 46px 6px 42px;
  background: rgba(0,0,0,.45); border: 1px solid var(--line); border-radius: 8px; color: var(--text);
  font: 600 15px var(--font-sans); transition: border-color .2s, box-shadow .2s, background .2s; }
.auth2-field input:hover { border-color: var(--line-bright); }
.auth2-field input:focus { outline: none; border-color: var(--fire); background: rgba(0,0,0,.6); box-shadow: 0 0 0 3px rgba(255,122,41,.15); }
.auth2-field span { position: absolute; left: 42px; top: 50%; transform: translateY(-50%); color: var(--text-faint);
  font-size: 15px; pointer-events: none; transition: all .18s ease; }
.auth2-field input:focus + span, .auth2-field input:not(:placeholder-shown) + span { top: 15px; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: var(--fire); }
.auth2-field input:not(:focus):not(:placeholder-shown) + span { color: var(--text-dim); }
.auth2-field:focus-within > i { color: var(--fire); }
.auth2-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  background: transparent; border: none; color: var(--text-faint); cursor: pointer; border-radius: 8px; }
.auth2-eye:hover, .auth2-eye.showing { color: var(--text); }

.auth2-collapse { max-height: 0; opacity: 0; overflow: hidden; margin-bottom: 0; transition: max-height .35s ease, opacity .25s ease, margin .35s ease; }
.auth2-collapse.open { max-height: 80px; opacity: 1; margin-bottom: 12px; }

.auth2-strength > div { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; margin-top: 2px; }
.auth2-strength .auth2-bars b { display: block; height: 4px; border-radius: 4px; background: var(--line); transition: background .25s; }
.auth2-strength small { display: block; margin-top: 6px; font-size: 12px; color: var(--text-faint); }
.auth2-strength[data-score="1"] b:nth-child(-n+1) { background: var(--bad); }
.auth2-strength[data-score="2"] b:nth-child(-n+2) { background: var(--warn); }
.auth2-strength[data-score="3"] b:nth-child(-n+3) { background: #c6d93b; }
.auth2-strength[data-score="4"] b { background: var(--ok); }

.auth2-row { display: flex; justify-content: flex-end; margin: -2px 0 14px; transition: opacity .2s; }
.auth2-row.hide { display: none; }
.auth2-link { font-size: 13px; color: var(--text-dim); text-decoration: none; }
.auth2-link:hover { color: var(--fire); }

.auth2-captcha { display: flex; justify-content: center; margin: 4px 0 14px; min-height: 78px; }
@media (max-width: 380px) { .auth2-captcha .g-recaptcha { transform: scale(.9); transform-origin: center; } }

.auth2-error { display: flex; gap: 8px; align-items: flex-start; background: rgba(255,59,59,.1); border: 1px solid rgba(255,59,59,.3);
  color: #ff8a8a; font-size: 13px; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; animation: auth2Shake .35s; }
@keyframes auth2Shake { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.auth2-btn { width: 100%; height: 50px; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 26px rgba(255,122,41,.28); }
.auth2-btn:disabled { opacity: .8; cursor: wait; }
.auth2-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(26,14,5,.3); border-top-color: #1a0e05; animation: auth2Rot .7s linear infinite; }
@keyframes auth2Rot { to { transform: rotate(360deg); } }

.auth2-switch { text-align: center; font-size: 14px; color: var(--text-dim); margin: 18px 0 0; }
.auth2-switch a { color: var(--fire); font-weight: 700; text-decoration: none; }
.auth2-switch a:hover { text-decoration: underline; }
.auth2-icon-head { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--fire); background: rgba(255,122,41,.12); border: 1px solid rgba(255,122,41,.3); }
#forgotResult p, #resetResult p { font-size: 13px; margin: 0 0 12px; }

body:has(.auth2) .back-home { color: var(--fire); border-color: rgba(255,122,41,.5); }
body:has(.auth2) .back-home:hover { background: rgba(255,122,41,.1); border-color: var(--fire); }

/* ---------- Nhập mã xác minh 6 số ---------- */
.auth2-otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 16px; }
.auth2-otp input {
  width: 100%; min-width: 0; box-sizing: border-box; height: 58px; text-align: center; padding: 0;
  background: rgba(0,0,0,.45); border: 1px solid var(--line-bright); border-radius: 8px; color: var(--fire);
  font: 700 26px var(--font-mono); caret-color: var(--fire); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.auth2-otp input:focus { outline: none; border-color: var(--fire); box-shadow: 0 0 0 3px rgba(255,122,41,.18); transform: translateY(-2px); }
.auth2-otp input:not(:placeholder-shown), .auth2-otp input[value]:not([value=""]) { border-color: rgba(255,122,41,.5); }
.auth2-otp input.bad { border-color: var(--bad); animation: auth2Shake .35s; }
.auth2-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text-dim); margin: 0 0 14px; line-height: 1.4; user-select: none; }
.auth2-check input { position: absolute; opacity: 0; pointer-events: none; }
.auth2-check-box { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-bright); background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; transition: all .15s; }
.auth2-check input:checked + .auth2-check-box { background: var(--fire); border-color: var(--fire); color: #1a0e05; }
.auth2-check input:focus-visible + .auth2-check-box { box-shadow: 0 0 0 3px rgba(255,122,41,.25); }
.auth2-resend { text-align: center; font-size: 14px; color: var(--text-dim); margin: 16px 0 0; }
.auth2-resend a { color: var(--fire); font-weight: 700; text-decoration: none; }
.auth2-resend a:hover { text-decoration: underline; }
.auth2-wait b { color: var(--text); font-variant-numeric: tabular-nums; }
.auth2-ok { display: flex; gap: 8px; align-items: center; background: rgba(126,217,87,.1); border: 1px solid rgba(126,217,87,.3);
  color: var(--ok); font-size: 13px; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; }
.auth2-sub b { color: var(--text); }

/* ---------- Tương thích (thẻ) ---------- */
.compat-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .compat-grid { grid-template-columns: 1fr; } }
.compat-panel {
  --c: var(--ok); position: relative; padding: 20px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)), var(--bg-card);
  border: 1px solid var(--line); overflow: hidden;
}
.compat-panel.warn { --c: var(--warn); }
.compat-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--c), transparent 70%); }
.compat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.compat-head h3 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: 0; text-transform: none; font-family: var(--font-sans); }
.compat-head small { color: var(--text-faint); font-size: 12.5px; }
.compat-head-ico { width: 40px; height: 40px; border-radius: 8px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); font-size: 18px; }
.compat-item { display: flex; align-items: center; gap: 14px; padding: 12px; margin-top: 8px; border-radius: 8px;
  background: rgba(0,0,0,.28); border: 1px solid transparent; transition: border-color .2s, transform .2s, background .2s; }
.compat-item:hover { border-color: color-mix(in srgb, var(--c) 45%, transparent); background: rgba(0,0,0,.4); transform: translateX(3px); }
.compat-ico { width: 38px; height: 38px; border-radius: 8px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); font-size: 16px; }
.compat-item b { display: block; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.compat-item span:not(.compat-ico) { display: block; font-size: 13px; color: var(--text-dim); line-height: 1.45; margin-top: 2px; }

/* ---------- Màn nhập mã: thẻ "đã gửi", ô tin tưởng, nút gửi lại ---------- */
.auth2-sent { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; margin-bottom: 10px;
  background: rgba(126,217,87,.08); border: 1px solid rgba(126,217,87,.28); }
.auth2-sent-ico { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: rgba(126,217,87,.15); color: var(--ok); font-size: 15px; }
.auth2-sent-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auth2-sent-text b { font-size: 14px; color: var(--text); }
.auth2-sent-text span { font-family: var(--font-mono); font-size: 13px; color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth2-sent-ok { color: var(--ok); font-size: 18px; }
.auth2-hints { list-style: none; margin: 0 0 16px; padding: 0 2px; display: grid; gap: 6px; }
.auth2-hints li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }
.auth2-hints li i { width: 16px; color: var(--text-faint); text-align: center; }
.auth2-hints b { color: var(--text); font-weight: 700; }

.auth2-trust { position: relative; display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 12px 14px; margin: 0 0 14px;
  border-radius: 8px; border: 1px solid var(--line-bright); background: rgba(0,0,0,.3); user-select: none; transition: border-color .2s, background .2s; }
.auth2-trust:hover { border-color: rgba(255,122,41,.5); }
.auth2-trust input { position: absolute; opacity: 0; pointer-events: none; }
.auth2-trust .auth2-check-box { flex: 0 0 22px; width: 22px; height: 22px; font-size: 12px; }
.auth2-trust input:checked + .auth2-check-box { background: var(--fire); border-color: var(--fire); color: #1a0e05; }
.auth2-trust:has(input:checked) { border-color: var(--fire); background: rgba(255,122,41,.08); }
.auth2-trust-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.auth2-trust-text b { font-size: 14px; color: var(--text); }
.auth2-trust-text small { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
.auth2-trust-ico { color: var(--text-faint); font-size: 18px; transition: color .2s; }
.auth2-trust:has(input:checked) .auth2-trust-ico { color: var(--fire); }
.auth2-trust input:focus-visible + .auth2-check-box { box-shadow: 0 0 0 3px rgba(255,122,41,.25); }

.auth2-resend-btn { position: relative; width: 100%; height: 46px; margin-top: 12px; overflow: hidden; border-radius: 8px; cursor: not-allowed;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-bright); color: var(--text-dim); font: 700 14px var(--font-sans); }
.auth2-resend-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(90deg, rgba(255,122,41,.28), rgba(255,122,41,.14)); }
.auth2-resend-label { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.auth2-resend-label b { color: var(--text); font-variant-numeric: tabular-nums; min-width: 2.2ch; display: inline-block; text-align: left; }
.auth2-resend-btn.ready { cursor: pointer; border-color: var(--fire); color: var(--fire); }
.auth2-resend-btn.ready:hover { background: rgba(255,122,41,.12); }
.auth2-ring { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,122,41,.3); border-top-color: var(--fire); animation: auth2Rot .8s linear infinite; }
.auth2-error i, .auth2-ok i { margin-top: 2px; }

/* ================= Trang chủ: hero stats, terminal, why ================= */
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.hero-stat {
  background: linear-gradient(160deg, rgba(var(--cat-rgb,255,122,41),.08), transparent 70%), var(--bg-raised);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.hero-stat:last-child { grid-column: 1 / -1; }
.hero-stat b { font-size: 22px; color: var(--fire); line-height: 1.2; }
.hero-stat span { display: block; margin-top: 2px; }

.terminal {
  border-radius: 16px; overflow: hidden; background: #090a08;
  box-shadow: 0 0 0 1px rgba(255,122,41,.08), 0 24px 60px -24px rgba(255,122,41,.28);
}
.terminal-bar { padding: 12px 16px; background: #101209; font-size: 12px; }
.terminal-bar .tdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; font-style: normal; }
.terminal-bar .tdot.r { background: #ff5f57; } .terminal-bar .tdot.y { background: #febc2e; } .terminal-bar .tdot.g { background: #28c840; }
.terminal-bar span { margin-left: 6px; }
.terminal-bar .live { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.terminal-bar .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: livePulse 1.4s infinite; }
@keyframes livePulse { 50% { opacity: .3; } }
.terminal-body { height: auto; max-height: 360px; overflow: hidden; padding: 10px; gap: 6px; justify-content: flex-end; min-height: 300px; }
.terminal-line {
  white-space: normal; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.04);
}
.terminal-line:last-child { border-color: rgba(255,122,41,.35); background: rgba(255,122,41,.06); }
.tl-main { display: flex; flex-direction: column; min-width: 0; }
.tl-name { color: var(--text); font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.tl-chk { color: var(--fire); font-size: 12px; } .tl-chk small { color: var(--text-faint); font-size: 11px; }
.tl-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tl-ping { color: var(--text-faint); font-size: 11px; }
.tl-vl { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.tl-vl.lo { color: var(--ok); background: rgba(126,217,87,.12); }
.tl-vl.mid { color: var(--warn); background: rgba(255,176,32,.13); }
.tl-vl.hi { color: #ff6b6b; background: rgba(255,59,59,.14); }

.why-grid { gap: 14px; background: none; border: 0; overflow: visible !important; }
.why-cell {
  position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px;
  background: linear-gradient(180deg, var(--bg-raised), var(--bg)); overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.why-cell::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--fire), transparent); opacity: .7; }
.why-cell:hover { transform: translateY(-3px); border-color: rgba(255,122,41,.45); }
.why-ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 19px;
  color: var(--fire); background: rgba(255,122,41,.1); border: 1px solid rgba(255,122,41,.25); margin-bottom: 18px;
}
.why-cell .num { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.why-cell h3 { font-size: 19px; }
.section-head h2 { line-height: 1.2; }
@media (max-width: 640px) { .hero-stat b { font-size: 19px; } .terminal-body { min-height: 0; } }

/* ===== Chat: GoatAI ===== */
.chat-ai-badge { display: inline-block; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; background: rgba(168,117,255,.18); color: var(--void); vertical-align: 1px; }
.chat-typing { display: flex; gap: 4px; padding: 6px 2px 4px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); animation: chatDot 1.2s infinite ease-in-out; }
.chat-typing i:nth-child(2) { animation-delay: .15s; } .chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chatDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ===== Chat: Đã gửi / Đã nhận / Đã xem ===== */
.chat-receipt { display: flex; align-items: center; justify-content: flex-end; gap: 5px; margin: -4px 4px 0; font-size: 11px; color: var(--text-faint); min-height: 18px; }
.chat-receipt.seen { color: var(--text-dim); }
.chat-receipt.delivered i, .chat-receipt.sent i { font-size: 10px; }
.chat-seen-av { width: 16px; height: 16px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: #2c3322; color: var(--text); font-size: 9px; font-weight: 800; flex-shrink: 0; border: 1px solid var(--line-bright); animation: seenPop .25s ease-out; }
.chat-seen-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-seen-av.ai { background: rgba(168,117,255,.2); color: var(--void); font-size: 8px; }
@keyframes seenPop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ===== GoatAI avatar ===== */
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.chat-msg.theirs { align-items: flex-end; gap: 8px; }
.chat-msg-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(168,255,60,.35); background: #000; box-shadow: 0 0 10px rgba(168,255,60,.25); }
.chat-empty-ai { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; box-shadow: 0 0 28px rgba(168,255,60,.3); }
.chat-seen-av { background: #000; }
.chat-text.typing-now::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--fire); animation: caretBlink .7s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }

/* Thanh token GoatAI (staff) */
.ai-meter { padding: 8px 16px 10px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.ai-meter-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.ai-meter-top b { color: var(--text); font-weight: 700; }
.ai-meter-top i { color: #fbbf24; margin-right: 4px; }
.ai-meter-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 6px 0 4px; }
.ai-meter-bar > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #22c55e, #84cc16); transition: width .6s ease; }
.ai-meter-bar > div.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.ai-meter-bar > div.hot { background: linear-gradient(90deg, #ef4444, #f97316); }
.ai-meter-sub { font-size: 11.5px; color: var(--text-dim); }

/* Gợi ý lệnh kiểu Minecraft */
.chat-compose { position: relative; }
.cmd-box { position: absolute; left: 12px; right: 12px; bottom: 100%; margin-bottom: 6px; max-height: 240px; overflow-y: auto;
  background: #14110f; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -8px 28px rgba(0,0,0,.55); z-index: 30; padding: 4px; }
.cmd-item { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cmd-item b { color: #ffb36b; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; word-break: break-all; }
.cmd-item span { color: var(--text-dim); font-size: 12.5px; text-align: right; }
.cmd-item.sel, .cmd-item:hover { background: rgba(255,106,0,.16); }

/* Khung đang tạo ảnh/video */
.ai-gen-bubble { min-width: 250px; }
.ai-gen-cap { font-size: 14px; color: var(--text-dim); margin: 2px 0 10px; animation: aiGenCap 1.6s ease-in-out infinite; }
.ai-gen-grid { position: relative; display: grid; grid-template-columns: repeat(15, 1fr); gap: 8px 8px; width: min(260px, 72vw); padding: 10px 8px 14px; }
.ai-gen-grid i { width: 4px; height: 4px; border-radius: 50%; background: #4f7cff; opacity: .15; justify-self: center; animation: aiGenDot 1.8s ease-in-out infinite; }
.ai-gen-pct { position: absolute; right: 6px; bottom: 0; background: rgba(60,64,75,.9); color: #b9c8ff; border: 1px solid rgba(255,255,255,.12);
  border-radius: 99px; padding: 4px 12px; font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes aiGenDot { 0%, 100% { opacity: .12; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.5); } }
@keyframes aiGenCap { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Vòng tròn xử lý -> vòng tích xanh (chuyển êm, không đột ngột) */
.co-ring { width: 64px; height: 64px; overflow: visible; margin-bottom: 4px; transition: transform .45s cubic-bezier(.3,1.6,.5,1); }
.co-ring-track { fill: none; stroke: rgba(255, 122, 41, .18); stroke-width: 5; transition: stroke .6s ease; }
.co-ring-spin { transform-box: view-box; transform-origin: 50% 50%; animation: coSpin .9s linear infinite; }
.co-ring-arc { fill: none; stroke: var(--fire); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 28 72;
  transition: stroke-dasharray .7s cubic-bezier(.2,.7,.2,1), stroke .6s ease; filter: drop-shadow(0 0 6px rgba(255,122,41,.45)); }
.co-ring.done .co-ring-arc { stroke-dasharray: 100 0; stroke: var(--ok, #22c55e); filter: drop-shadow(0 0 8px rgba(34,197,94,.5)); }
.co-ring.done .co-ring-track { stroke: rgba(34, 197, 94, .18); }
.co-ring-check { fill: none; stroke: var(--ok, #22c55e); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; }
.co-ring.check { transform: scale(1.08); }
.co-ring.check .co-ring-check { stroke-dashoffset: 0; transition: stroke-dashoffset .4s ease .05s; }
.co-ring-title, .co-ring-sub { transition: opacity .2s ease; }
@media (prefers-reduced-motion: reduce) { .co-ring-spin { animation-duration: 2.5s; } }

/* Hòm thư: huy hiệu số quà + chấm đỏ trên hamburger */
.mail-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:6px;border-radius:99px;background:#ff4d6d;color:#fff;font-size:11px;font-weight:800;vertical-align:middle}
.mail-badge[hidden]{display:none}
.hamburger{position:relative}
.hamburger.has-mail::after{content:"";position:absolute;top:6px;right:6px;width:10px;height:10px;border-radius:50%;background:#ff4d6d;box-shadow:0 0 0 2px var(--bg,#0c0e0b)}

/* Voucher ở trang thanh toán */
.co-vch{margin:14px 0 4px;padding:12px 14px;border:1px dashed rgba(255,179,0,.5);border-radius:12px;background:rgba(255,179,0,.06)}
.co-vch label{display:block;font-weight:600;margin-bottom:8px}.co-vch small{font-weight:400;opacity:.7}
.co-vch select{width:100%;padding:10px;border-radius:8px;background:rgba(0,0,0,.35);color:inherit;border:1px solid rgba(255,255,255,.15)}
.co-vch-sum{margin-top:8px;color:#ffb300}

/* Chat hỗ trợ: 2 tab Admin | GoatAI + gợi ý @GoatAI */
.chat-tabs{display:flex;gap:6px;padding:8px 12px;border-bottom:1px solid rgba(255,255,255,.08)}
.chat-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.12);background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;opacity:.7;transition:.15s}
.chat-tab img{width:20px;height:20px;border-radius:50%;object-fit:cover}
.chat-tab.on{opacity:1;background:rgba(77,163,255,.16);border-color:rgba(77,163,255,.55);color:#9fd0ff}
.mention-box{bottom:100%}
.mn-item{display:flex;align-items:center;gap:10px;cursor:pointer}
.mn-av{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.mn-t{display:flex;flex-direction:column;min-width:0}.mn-t small{opacity:.65;font-size:12px;white-space:normal}
.chat-mention{color:#6fb6ff;font-weight:700}
.mn-item{justify-content:flex-start!important}.mn-t{align-items:flex-start;text-align:left;flex:1}.mn-t b{font-family:inherit;color:#fff;font-size:15px}.mn-t small{color:inherit}

/* ---- Bảng giá mới: Free / Premium / Mua thêm key ---- */
.price-grid.shop-grid { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
@media (max-width: 1000px) { .price-grid.shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .price-grid.shop-grid { grid-template-columns: 1fr; } }
.shop-grid .price-card { display: flex; flex-direction: column; }
.shop-list { list-style: none; margin: 12px 0 16px; padding: 0; text-align: left; font-size: 13.5px; line-height: 1.45; color: var(--text-dim); flex: 1; }
.shop-list li { padding: 3px 0 3px 18px; position: relative; }
.shop-list li::before { content: "✓"; position: absolute; left: 0; color: var(--fire); font-weight: 700; }
.shop-list code { font-family: var(--font-mono); font-size: 12.5px; }
.shop-btn { display: block; text-align: center; text-decoration: none; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border, rgba(255,255,255,.18)); color: inherit; font-weight: 600; margin-top: auto; }
.shop-btn:hover { border-color: var(--void); color: var(--void); }
.shop-grid .price-card button { margin-top: auto; }

/* ---- Premium đã mua ---- */
.owned-row { display: flex; gap: 8px; margin-top: auto; }
.owned-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px;
  border-radius: 10px; font-weight: 700; color: #052e12; background: #22e06b; cursor: pointer; text-decoration: none;
  box-shadow: 0 0 14px rgba(34,224,107,.75), 0 0 32px rgba(34,224,107,.4); animation: ownedGlow 2s ease-in-out infinite; }
@keyframes ownedGlow { 0%,100% { box-shadow: 0 0 10px rgba(34,224,107,.6), 0 0 22px rgba(34,224,107,.3); }
  50% { box-shadow: 0 0 18px rgba(34,224,107,.95), 0 0 40px rgba(34,224,107,.55); } }
.owned-key, .owned-plus { display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border-radius: 10px; font-weight: 700; border: 1px solid rgba(34,224,107,.6); color: #22e06b; background: transparent; }
.owned-key { padding: 11px 14px; }
.owned-plus { width: 44px; font-size: 22px; line-height: 1; }
.owned-key:hover, .owned-plus:hover { background: rgba(34,224,107,.15); }
.co-switch { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.co-switch a { padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); text-decoration: none; color: inherit; font-size: 13px; }
.co-switch a.on { border-color: #22e06b; color: #22e06b; }

/* Trang chủ chỉ còn 2 thẻ: Free + Premium */
.price-grid.shop-grid { grid-template-columns: repeat(2, 1fr); max-width: 860px; margin-left: auto; margin-right: auto; }
@media (max-width: 700px) { .price-grid.shop-grid { grid-template-columns: 1fr; } }
