/* =========================================================================
   PAY_CSS.CSS — GIAO DIỆN của trang khách pay.html (trang duy nhất dùng file này)
   -------------------------------------------------------------------------
   • Đây là file CSS DUY NHẤT của pay.html. Mọi tùy biến giao diện trang khách
     đặt ở đây — KHÔNG rải <style> trong HTML để tránh trùng lặp chéo.
   • KHÔNG dùng file này: admin.html (dùng admin_css.css riêng).
   • Cấu trúc: biến màu :root (tông TỐI, dùng cho header/hero/modal ngoài khung
     báo cáo) → #result-container override riêng sang tông SÁNG (khung báo cáo
     luôn sáng, không có chế độ tối/công tắc đổi theme).
========================================================================= */

:root {
    --bg-deep: #05060d;
    --bg-mid: #0a1024;
    --bg-card: rgba(15, 22, 41, 0.72);
    --bg-card-solid: #0e1526;
    --bg-card-soft: rgba(20, 28, 50, 0.55);
    --border-soft: rgba(148, 163, 184, 0.14);
    --border-accent: rgba(56, 189, 248, 0.32);
    --text-main: #eef2f8;
    --text-dim: #97a3ba;
    /* --text-faint: chữ phụ (nhãn form, ghi chú, thời gian audio...).
       Cũ #5d6883 chỉ đạt tương phản ~2.4–3.6 (chuẩn WCAG AA cần ≥4.5) → đã làm sáng lên.
       Giá trị này đo được ~4.7 trên nền thẻ audio (nền tối nhất trong khung báo cáo). */
    --text-faint: #97a4bb;
    --accent: #38bdf8;
    --accent-strong: #22d3ee;
    --accent-deep: #0ea5e9;
    /* --accent-text: RIÊNG cho CHỮ nhấn (giá trị chỉ số, kết quả luận giải).
       Tách khỏi --accent-strong vì biến đó còn dùng cho spinner/thanh tua/gradient —
       đổi trực tiếp sẽ kéo theo cả hiệu ứng. Bản tối cần sáng hơn để đủ tương phản. */
    --accent-text: #67e8f9;
    /* Màu chữ cho vùng NGOÀI thẻ card (#action-zone, tiêu đề báo cáo).
       Vùng này LUÔN nằm trên nền tối của body (kể cả trong khung báo cáo sáng),
       nên phải giữ màu sáng cố định. */
    --text-on-dark: #b9c4d6;
    --brand-blue: #0b5fc4;
    --gold: #eab308;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #f87171;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 24px 60px -24px rgba(0, 0, 0, 0.65);
    --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

    /* Các lớp phủ mờ dùng lại nhiều nơi — tách biến để đổi 1 chỗ khi qua theme sáng */
    --surface-1: rgba(255,255,255,0.03);
    --surface-2: rgba(255,255,255,0.05);
    --surface-hover: rgba(255,255,255,0.035);
    --surface-soft: rgba(255,255,255,0.025);
    --modal-bg: #0d1526;
    --autocomplete-bg: #0e1729;
    --input-bg: rgba(255,255,255,0.03);
    --input-bg-valid: rgba(255,255,255,0.035);
    --input-bg-focus: rgba(56,189,248,.06);
    --autofill-bg: #101a30;
}

/* =========================================================================
   THEME SÁNG — biến màu riêng cho TOÀN BỘ khung báo cáo #result-container
   (trang chủ/header/modal ngoài khung vẫn dùng biến TỐI ở :root, không đổi).
========================================================================= */
#result-container {
    --bg-card: #ffffff;
    --bg-card-solid: #ffffff;
    --bg-card-soft: #ffffff;
    --border-soft: rgba(15, 23, 42, 0.1);
    --border-accent: rgba(37, 99, 235, 0.35);
    --text-main: #0f172a;
    --text-dim: #475569;
    /* Chế độ Sáng: chữ phụ nằm trên thẻ card NỀN TRẮNG.
       Cũ #94a3b8 chỉ đạt ~2.4 trên nền trắng → đổi sang tông slate đậm hơn cho đủ tương phản
       (đo trên nền thẻ audio, chỗ tối nhất, đạt ~4.7). */
    --text-faint: #5c6b80;
    --accent: #2563eb;
    --accent-strong: #0284c7;
    --accent-deep: #0369a1;
    --accent-text: #0369a1;
    /* ⚠️ #result-container KHÔNG có nền riêng (trong suốt). Chỉ các thẻ .report-card
       mới có nền trắng; phần NGOÀI card (#action-zone, tiêu đề báo cáo) vẫn nằm trên
       nền TỐI của body ⇒ phải dùng màu chữ SÁNG cho vùng ngoài card (--text-on-dark),
       nếu không sẽ thành chữ tối trên nền tối (lỗi cũ: dòng mời mua chỉ đạt 2.67). */
    --text-on-dark: #b9c4d6;
    --brand-blue: #004b93;
    --shadow-card: 0 18px 40px -18px rgba(15, 23, 42, 0.18);

    --surface-1: rgba(15, 23, 42, 0.035);
    --surface-2: rgba(15, 23, 42, 0.055);
    --surface-hover: rgba(15, 23, 42, 0.04);
    --surface-soft: rgba(15, 23, 42, 0.03);
    --input-bg: #ffffff;
    --input-bg-valid: #ffffff;
    --input-bg-focus: rgba(37,99,235,.07);
    --autofill-bg: #eef4fb;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100dvh;
    font-family: var(--font);
    color: var(--text-main);
    background: var(--bg-deep);
    background-image:
        radial-gradient(ellipse 900px 500px at 85% -10%, rgba(56,189,248,0.16), transparent 60%),
        radial-gradient(ellipse 700px 500px at -10% 40%, rgba(37,99,235,0.14), transparent 60%),
        linear-gradient(180deg, #060812 0%, #0a1024 45%, #070b18 100%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Starfield: chấm nhỏ rải rác toàn trang (chỉ hiện rõ ở theme tối) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .55;
    background-image:
        radial-gradient(1.2px 1.2px at 8% 15%, rgba(255,255,255,.55), transparent),
        radial-gradient(1px 1px at 22% 68%, rgba(255,255,255,.4), transparent),
        radial-gradient(1.4px 1.4px at 38% 32%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 52% 80%, rgba(255,255,255,.35), transparent),
        radial-gradient(1.2px 1.2px at 68% 22%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 79% 60%, rgba(255,255,255,.4), transparent),
        radial-gradient(1.4px 1.4px at 91% 38%, rgba(255,255,255,.5), transparent),
        radial-gradient(1px 1px at 12% 88%, rgba(255,255,255,.3), transparent),
        radial-gradient(1.2px 1.2px at 60% 5%, rgba(255,255,255,.4), transparent),
        radial-gradient(1px 1px at 96% 82%, rgba(255,255,255,.35), transparent);
    background-repeat: no-repeat;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(56,189,248,.35); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56,189,248,.6); }

a { color: inherit; }

/* =========================================================================
   HEADER
========================================================================= */
#main-header {
    position: absolute; top: 0; left: 0; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 20px; z-index: 50;

    /* LỖI CŨ (vá 15/07/2026): header là thanh TRONG SUỐT nhưng phủ absolute hết
       chiều ngang và cao 92px (logo 48 + đệm 22×2), z-index 50 → nó NUỐT mọi cú
       click ở dải 92px trên cùng trang. Khung báo cáo #result-container nằm dưới
       (z-index 5) mà công tắc Sáng/Tối lại rơi đúng dải này ⇒ bấm không ăn
       (document.elementFromPoint trả về #main-header, không phải công tắc).
       KHÔNG chữa được bằng z-index: #result-container có position+z-index nên tự
       tạo stacking context — mọi z-index bên trong đều bị kẹt dưới mức 50 của header.
       ⇒ Cho cả thanh thôi bắt sự kiện chuột; chỉ 2 khối điều khiển THẬT bên trong
       mới nhận lại click. Phần trống của header trở nên "trong suốt" với chuột,
       trả click về đúng thứ nằm dưới. */
    pointer-events: none;
}
#main-header .brand-logo,
#main-header .header-actions { pointer-events: auto; }
@media (min-width: 1024px) { #main-header { padding: 22px 44px; } }
.brand-logo { display: flex; align-items: center; text-decoration: none; min-width: 0; }
.brand-logo img { height: 40px; object-fit: contain; flex-shrink: 0; }
@media (min-width: 640px) { .brand-logo img { height: 48px; } }

/* --- Nút Đăng nhập / Đăng ký ở góc phải header ---------------------------
   #main-header đã có justify-content:space-between nên khối này tự nằm bên phải.
   Trên mobile thu nhỏ chữ + padding để không đè lên logo. */
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-btn {
    font-family: var(--font);
    font-size: 13px; font-weight: 700; letter-spacing: .2px;
    padding: 9px 16px; border-radius: 999px;
    cursor: pointer; white-space: nowrap;
    transition: all .2s ease;
}
/* Nút phụ "Đăng nhập" — viền mờ, nền trong suốt */
.header-btn-ghost {
    background: transparent; color: var(--text-dim);
    border: 1px solid var(--border-soft);
}
.header-btn-ghost:hover { color: var(--text-main); border-color: var(--accent); }
/* Nút chính "Đăng ký" — nền gradient nhấn, hút mắt hơn */
.header-btn-solid {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: #fff; border: 1px solid transparent;
    box-shadow: 0 6px 16px -6px rgba(14,165,233,.6);
}
.header-btn-solid:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(14,165,233,.75); }
@media (max-width: 480px) {
    .header-btn { font-size: 12px; padding: 8px 12px; }
    .header-actions { gap: 6px; }
}
/* Khi đã ra khung báo cáo: ẨN 2 nút Đăng nhập/Đăng ký. Lúc này khách đang đọc kết
   quả, 2 nút chỉ gây nhiễu và nằm sát công tắc Sáng/Tối (dễ bấm nhầm). Bấm
   "Tra cứu lại" → traCuuLai() gỡ class report-active → 2 nút hiện lại như cũ. */
body.report-active .header-actions { display: none; }

/* =========================================================================
   FORM HERO (trang chủ — 2 cột: giới thiệu trái, form phải)
========================================================================= */
.form-container { width: 100%; max-width: 1180px; margin: auto; position: relative; z-index: 5; padding-top: 84px; }
@media (min-width: 1024px) { .form-container { max-width: 1120px; padding-top: 104px; } }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 72px;
        align-items: center;
    }
    .hero-left,
    .hero-right { width: 100%; min-width: 0; }
    .hero-left .hero-desc-new { margin-bottom: 0; }
}

/* --- Cột trái: giới thiệu --- */
.hero-eyebrow-new {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 14px;
}
.hero-eyebrow-new::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.hero-title-new { color: var(--text-main); font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; margin: 0; }
@media (min-width: 1024px) { .hero-title-new { font-size: 42px; } }
.hero-title-accent {
    background: linear-gradient(92deg, #7dd3fc 0%, var(--accent) 45%, #818cf8 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.hero-divider-new { width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--brand-blue), var(--accent-deep)); margin: 20px 0; }
.hero-desc-new { color: var(--text-dim); font-size: 15px; line-height: 1.75; max-width: 460px; margin: 0 0 36px; }

/* --- Cột phải: form --- */
.hero-right { width: 100%; }
.hero-form-label { color: var(--text-faint); font-size: 13.5px; text-align: center; margin-bottom: 14px; }

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    padding: 22px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    width: 100%;
    position: relative;
}
/* Đường sáng mảnh trên mép thẻ form — điểm nhấn "kính cao cấp" */
.form-card::before {
    content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125,211,252,.7), transparent);
    pointer-events: none;
}
@media (min-width: 1024px) { .form-card { padding: 30px; } }

.tab-pill-group { display: flex; gap: 8px; background: var(--surface-1); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 5px; margin-bottom: 22px; }
.tab-pill {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 700;
    letter-spacing: .3px; color: var(--text-faint); transition: all .2s ease;
}
.tab-pill svg { width: 15px; height: 15px; flex-shrink: 0; }
.tab-pill:hover { color: var(--text-main); }
.tab-pill.tab-pill-active { background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep)); color: #fff; box-shadow: 0 6px 16px -6px rgba(14,165,233,.6); }

.hero-form-lock {
    display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px;
    color: var(--text-faint); font-size: 12px; text-align: center; line-height: 1.5;
}
.hero-form-lock svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--text-faint); }

/* --- Dải 4 tính năng dưới cùng --- */
.hero-bottom-strip { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 64px; }
@media (min-width: 640px) { .hero-bottom-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
    .hero-bottom-strip {
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
        margin-top: 54px;
    }
    .hero-strip-item { min-width: 0; height: 100%; }
}
.hero-strip-item {
    background: var(--surface-1); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
    padding: 20px 18px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.hero-strip-item:hover {
    transform: translateY(-4px); border-color: var(--border-accent); background: var(--surface-2);
    box-shadow: 0 18px 36px -18px rgba(14,165,233,.4);
}
.hero-strip-icon {
    width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep)); color: #fff; margin-bottom: 14px;
}
.hero-strip-icon svg { width: 20px; height: 20px; }
.hero-strip-title { color: var(--text-main); font-weight: 700; font-size: 14.5px; margin-bottom: 5px; }
.hero-strip-desc { color: var(--text-faint); font-size: 12.5px; line-height: 1.55; }

.input-field {
    border: 1px solid var(--border-soft) !important;
    background-color: var(--input-bg) !important;
    border-radius: var(--radius-sm);
    padding: 12.5px 14px;
    width: 100%;
    outline: none;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    transition: border-color .2s ease, background-color .2s ease;
}
.input-field::placeholder { color: var(--text-faint) !important; font-weight: 400 !important; opacity: 1 !important; }
.input-field:focus { border-color: var(--border-accent) !important; background-color: var(--input-bg-focus) !important; }
.input-field:valid { background-color: var(--input-bg-valid) !important; }
select.input-field option { color: #0f172a; }
select.input-field:invalid { color: var(--text-faint) !important; }
.input-field:-webkit-autofill,
.input-field:-webkit-autofill:hover,
.input-field:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--autofill-bg) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}
select.input-field {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 13px;
    padding-right: 26px !important; cursor: pointer;
}

/* Icon nhỏ bên trái mỗi field (trang chủ) */
.field-icon { padding-left: 40px !important; }
input.field-icon-person, input.field-icon-pin {
    background-repeat: no-repeat; background-position: left 14px center; background-size: 16px;
}
input.field-icon-person {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
input.field-icon-pin {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 12-9 12s-9-5-9-12a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}
select.field-icon-calendar, select.field-icon-clock {
    background-repeat: no-repeat, no-repeat;
    background-position: right 10px center, left 14px center;
    background-size: 13px, 16px;
}
select.field-icon-calendar {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
}
select.field-icon-clock {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"),
        url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6883' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}
.autocomplete-list {
    position: absolute; bottom: 100%; margin-bottom: 6px; z-index: 9999; width: 100%;
    background: var(--autocomplete-bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    max-height: 300px; overflow-y: auto; display: none; box-shadow: 0 -14px 30px rgba(0,0,0,.5);
}
.autocomplete-item { font-size: 14px; color: var(--text-dim); padding: 10px 12px; cursor: pointer; }
.autocomplete-item:hover { background: rgba(56,189,248,.08); color: var(--text-main); }

.submit-btn {
    background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep));
    color: #fff; font-weight: 700; padding: 14px; border-radius: var(--radius-sm);
    cursor: pointer; text-transform: uppercase; letter-spacing: .4px; font-size: 14px;
    border: none; display: flex; align-items: center; justify-content: center; gap: 9px;
    margin: 14px auto 0; box-shadow: 0 10px 24px -8px rgba(14,165,233,.55);
    transition: transform .15s ease, box-shadow .15s ease;
}
/* Icon mũi tên MẢNH (stroke 1.6) đặt SAU chữ; hover trượt nhẹ sang phải */
.submit-btn::after {
    content: '';
    width: 17px; height: 17px; flex-shrink: 0; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform .2s ease;
}
.submit-btn:hover::after { transform: translateX(4px); }
.submit-btn:disabled::after { display: none; }
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -8px rgba(14,165,233,.7); }
.submit-btn:active { transform: translateY(0); }

/* Vệt sáng chạy quanh viền nút "Tạo bản đồ ngay" (cá nhân + cặp đôi) —
   dùng ::before vì ::after của .submit-btn đã dùng cho icon mũi tên. */
#submit-btn, #submit-partner-btn { position: relative; }
#submit-btn::before, #submit-partner-btn::before {
    content: ""; position: absolute; inset: -3px; border-radius: calc(var(--radius-sm) + 3px); padding: 1.6px;
    background: conic-gradient(from var(--spin-ang),
        transparent 0deg, transparent 205deg,
        rgba(56,189,248,.12) 280deg, rgba(125,211,252,.85) 332deg,
        #ffffff 353deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: btnSweepSpin 5.2s linear infinite;
    pointer-events: none; z-index: 0;
    opacity: 1; transition: opacity .6s ease;
}
/* body.modal-open: gắn/gỡ bởi openAuthModal()/closeModal() trong logic.js. Modal Đăng nhập/
   Đăng ký che khuất nút này nên vệt sáng chạy mà không ai nhìn thấy — tạm dừng cho đỡ tốn CPU,
   giúp gõ/bấm bên trong modal mượt hơn (animate conic-gradient không tăng tốc được bằng GPU). */
body.modal-open #submit-btn::before,
body.modal-open #submit-partner-btn::before {
    animation-play-state: paused;
}

.back-arrow-btn, [onclick*="goBack"] {
    background: var(--surface-1) !important; border-radius: 999px !important;
    border: 1px solid var(--border-soft) !important; color: var(--text-dim);
    display: inline-flex !important; align-items: center; justify-content: center;
    width: 44px; height: 44px; transition: all .2s ease; cursor: pointer;
}
.back-arrow-btn:hover, [onclick*="goBack"]:hover { color: var(--accent); border-color: var(--border-accent); }
.back-arrow-btn svg, [onclick*="goBack"] svg { width: 20px; height: 20px; }

/* =========================================================================
   AUTH MODAL (Đăng nhập / Đăng ký)
========================================================================= */
/* KHÔNG dùng backdrop-filter:blur() ở đây: phía sau modal có animation chạy vô hạn
   (vệt sáng conic-gradient ở nút "Tạo bản đồ ngay") nên trình duyệt phải tính blur
   mỗi khung hình dù modal đứng yên -> giật khi gõ/bấm. Nền đục hoàn toàn (--bg-deep,
   không alpha) thay thế cho hiệu ứng mờ. */
.modal { display: none; position: fixed; inset: 0; background: var(--bg-deep); z-index: 1000; justify-content: center; align-items: center; padding: 20px; }
.modal-content {
    background: var(--modal-bg); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    padding: 30px; max-width: 500px; width: 100%; text-align: center; box-shadow: var(--shadow-card);
    color: var(--text-main);
}
.modal-content .text-gray-700 { color: var(--text-dim) !important; }
.modal-content .border-gray-200 { border-color: var(--border-soft) !important; }
#tab-auth-login.text-\[\#004b93\], #tab-auth-reg.text-\[\#004b93\] { color: var(--accent) !important; }
#tab-auth-login, #tab-auth-reg { color: var(--text-faint); }
#auth-tab-indicator.bg-\[\#004b93\] { background: var(--accent) !important; }
.modal-content .border-\[\#004b93\]\/20 { border-color: var(--border-soft) !important; }
.modal-content input.input-field { text-align: center; }

/* =========================================================================
   GLOBAL LOADING (cinematic)
========================================================================= */
.global-loading-overlay {
    display: none; position: fixed; inset: 0; background: rgba(3, 6, 14, 0.94);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 999999;
    justify-content: center; align-items: center; flex-direction: column;
}
.global-loading-overlay .spinner {
    border: 4px solid rgba(255,255,255,.08); border-top: 4px solid var(--accent-strong);
    border-radius: 50%; width: 54px; height: 54px; animation: spin .85s linear infinite;
    filter: drop-shadow(0 0 12px rgba(34,211,238,.6));
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.global-loading-overlay p { margin-top: 20px; font-weight: 700; color: var(--accent-strong); letter-spacing: 1.4px; font-size: 14px; text-transform: uppercase; }

/* =========================================================================
   KHUNG BÁO CÁO — TIÊU ĐỀ + THÔNG TIN NGƯỜI DÙNG
========================================================================= */
#result-container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 30px 14px 60px; position: relative; z-index: 5; }
@media (min-width: 1024px) { #result-container { padding: 44px 24px 80px; } }

.report-title-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

/* .report-title: ẩn tiêu đề "Kết quả tra cứu" khỏi màn hình nhưng vẫn giữ cho
   trình đọc màn hình / SEO — kỹ thuật "sr-only" (không chiếm chỗ, không tạo
   khoảng trắng, khác với visibility:hidden vẫn chiếm layout). */
.report-title {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ⭐ margin-bottom = NÚM ĐIỀU CHỈNH DUY NHẤT của khoảng hở "thông tin → chart".
   Sau khi bỏ transform:scale (xem `.chart-svg-wrapper svg`), chart không còn khoảng
   chết ở đỉnh nên con số này CHÍNH LÀ khoảng hở nhìn thấy, y hệt ở mọi cỡ màn.
   22 → 44px (gấp đôi, yêu cầu 15/07). Muốn thoáng/khít hơn: sửa đúng số này. */
#user-info-display { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 44px; }
.user-info-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 13.5px; font-weight: 500; }
.user-info-pill svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.user-info-pill b { color: var(--text-main); font-weight: 700; }

/* =========================================================================
   GRID: BẢN ĐỒ NĂNG LƯỢNG + TỔNG QUAN CHỈ SỐ
========================================================================= */
/* Gộp 2 thẻ (Bodygraph + Tổng quan chỉ số) vào 1 khung duy nhất: .report-grid tự
   mang nền/viền/bóng đổ (giống .report-card trước đây); 2 thẻ con bên trong CHỈ còn
   padding, ngăn cách bằng 1 đường kẻ xám NGẮN (70% chiều dài, canh giữa, KHÔNG
   chạm mép khung) — dùng ::before thay vì border (border luôn full chiều dài). */
.report-grid {
    display: grid; grid-template-columns: 1fr; gap: 0;
    background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    margin-top: 20px;
}
@media (min-width: 1024px) { .report-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }

.report-grid > .report-card {
    background: none; border: none; box-shadow: none; backdrop-filter: none; border-radius: 0;
}
/* Khoảng trắng ở ĐÁY khung báo cáo (từ chỉ số cuối xuống mép dưới thẻ): GẤP ĐÔI đệm
   đáy sẵn có của .report-card — 20 → 40px (mobile), 24 → 48px (desktop), yêu cầu 15/07.
   ⚠️ Chỉ nhắm `.report-grid > .report-card` chứ KHÔNG sửa thẳng `.report-card`, vì
   #active-detail-card (thẻ luận giải bên dưới) cũng mang class đó — sửa gốc sẽ nới
   đáy cả thẻ luận giải, không đúng ý. */
.report-grid > .report-card { padding-bottom: 40px; }
@media (min-width: 1024px) { .report-grid > .report-card { padding-bottom: 48px; } }
/* ĐIỆN THOẠI: 2 thẻ xếp DỌC nên đệm đáy của thẻ CHART không còn là "đáy khung báo cáo"
   — nó biến thành khoảng hở giữa chart và thẻ tổng quan (desktop thì 2 thẻ nằm cạnh
   nhau nên cả hai đều chạm đáy khung, không có vấn đề này). ⇒ Chỉ thẻ CUỐI (tổng quan)
   giữ đệm đáy 40px đã nhân đôi; thẻ chart bóp còn 15px.
   Khoảng hở NHÌN THẤY từ chart xuống tiêu đề "TỔNG QUAN CHỈ SỐ" = 14px (đệm đáy sẵn
   có của .chart-svg-wrapper) + 23px (đệm này) + 20px (đệm trên thẻ tổng quan) = 57px,
   tức GIẢM 30% so với 82px trước đó (yêu cầu 15/07).
   (Số này từng là 15px khi chart còn dùng transform:scale — lúc đó có thêm 8px "khoảng
   chết" cộng vào. Bỏ scale → mất 8px đó → bù lại thành 23px để giữ nguyên 57px.) */
@media (max-width: 1023px) {
    .report-grid > .report-card:not(:last-child) { padding-bottom: 23px; }
}
.report-grid > .report-card:not(:first-child) {
    position: relative;
}
.report-grid > .report-card:not(:first-child)::before {
    content: '';
    position: absolute;
    background: var(--border-soft);
    /* mobile: xếp dọc → đường kẻ NGANG ở mép trên, dài 70%, canh giữa theo chiều ngang */
    top: 0; left: 15%; width: 70%; height: 1px;
}
@media (min-width: 1024px) {
    .report-grid > .report-card:not(:first-child)::before {
        /* desktop: xếp ngang → đường kẻ DỌC ở mép trái, dài 70%, canh giữa theo chiều dọc */
        top: 15%; left: 0; width: 1px; height: 70%;
    }
}
/* ẨN đường kẻ NGANG trên điện thoại (yêu cầu 15/07): khi 2 thẻ xếp DỌC, chúng đã
   tách nhau rõ bằng khoảng trắng + tiêu đề riêng của từng thẻ, thêm đường kẻ chỉ rối.
   Desktop VẪN GIỮ đường kẻ DỌC vì 2 cột nằm sát nhau, cần vạch phân tách. */
@media (max-width: 1023px) {
    .report-grid > .report-card:not(:first-child)::before { display: none; }
}

/* Dòng gợi ý "Click vào chỉ số…" — nằm BÊN TRONG thẻ tổng quan, giữa tiêu đề và
   danh sách chỉ số (chuyển lên từ cuối lưới ngày 15/07 — xem pay.html).
   ⚠️ TỪNG BỊ KHAI BÁO 2 LẦN (ở đây + cuối file) — đúng loại lỗi .report-title từng
   dính: khối cuối chỉ ghi đè `padding` nên `margin-top: -50px` của khối này vẫn sống
   ngầm, kéo dòng gợi ý đè lên chỉ số cuối bảng. Nay CHỈ CÒN khai báo này.
   ĐỪNG khai báo .report-grid-hint ở nơi nào khác nữa.

   Không còn `grid-column` / `margin-top` âm / padding 2 bên: nay nó là con của
   .report-card (thẻ đã có sẵn đệm 20px mobile, 26px desktop) chứ không còn là ô của
   lưới → thêm đệm ngang nữa sẽ thành đệm chồng đệm.
   padding-bottom = khoảng hở xuống chỉ số đầu tiên. */
.report-grid-hint {
    display: flex; justify-content: center;
    padding: 0 0 18px;
}
.report-grid-hint-inner {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    padding-bottom: 10px;
    /* 16px → 14px (giảm 2 cỡ, yêu cầu 15/07): đây là dòng gợi ý phụ, trước đây to
       ngang chữ chính (.detail-body 16px) nên hút mắt quá mức cần thiết. */
    color: var(--text-faint); font-size: 14px; text-align: center;
}
/* Đường kẻ dưới dòng gợi ý: 150% → 70% bề ngang khối chữ (yêu cầu 15/07), canh giữa.
   Vì .report-grid-hint-inner là inline-flex ôm sát nội dung nên % ở đây tính theo
   bề ngang icon + chữ, KHÔNG phải bề ngang thẻ. */
.report-grid-hint-inner::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 0;
    width: 70%; height: 1px;
    background: var(--border-soft);
    transform: translateX(-50%);
}
.report-grid-hint svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent); }

@media (min-width: 1024px) {
    .report-grid, #active-detail-card {
        width: 100vw; max-width: min(1516px, calc(100vw - 32px));
        margin-left: 50%; transform: translateX(-50%);
    }
}

.report-card {
    background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 20px; position: relative; overflow: hidden;
}
@media (min-width: 1024px) { .report-card { padding: 24px 26px; } }
.report-card-title {
    font-size: 17px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--accent-deep); margin: 0 0 32px; display: flex; align-items: center; gap: 8px;
}
.report-card-title span { display: inline-block; padding-bottom: 6px; border-bottom: 1px solid var(--border-accent); }

/* Chart card: starfield lấp lánh phía sau bodygraph */
#chart-card { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.chart-svg-wrapper {
    width: 100%; display: flex; justify-content: center; align-items: center; position: relative; border-radius: var(--radius-md);
    background: transparent;
    padding: 14px 0;
}
/* Chart co lại bằng `width`, KHÔNG dùng `transform: scale()`.
   ─────────────────────────────────────────────────────────────────────────────
   LỖI CŨ (sửa 15/07): transform:scale chỉ thu nhỏ phần NHÌN THẤY, ô layout vẫn giữ
   nguyên 100% → sinh "khoảng chết" rỗng ở trên & dưới chart. Khoảng chết này TỈ LỆ
   THUẬN với bề rộng thẻ (đo được: 8px ở mobile 390px, 47px ở desktop 1600px) nên
   KHÔNG THỂ bù bằng một `margin-top` âm cố định: số -40px cũ vừa vặn ở desktop nhưng
   over-kéo ở mobile → chart ĐÈ LÊN khối thông tin (hở -10px).
   NAY dùng width: ô layout ôm sát chart → hết khoảng chết ⇒ bỏ luôn margin âm, và
   khoảng hở thông tin→chart chỉ còn phụ thuộc DUY NHẤT margin-bottom của
   #user-info-display, GIỐNG NHAU ở mọi cỡ màn. Kèm theo: hết rủi ro .report-card
   (overflow:hidden) cắt mép chart, nên tăng cỡ chart không còn phải dò chừng.
   Chart to y hệt như cũ: 85.68% ≡ scale(.8568). */
.chart-svg-wrapper svg { width: 85.68% !important; height: auto !important; }
/* Dưới 1024px khung báo cáo rút còn 1 CỘT → thẻ chart chiếm trọn chiều ngang, thừa
   khoảng trắng 2 bên → cho chart to thêm 10% (85.68 × 1.1 = 94.25). */
@media (max-width: 1023px) {
    .chart-svg-wrapper svg { width: 94.25% !important; }
}

/* Danh sách chỉ số — thẻ dùng flex để danh sách LẤP ĐẦY chiều cao (ngang thẻ chart),
   hiện được nhiều chỉ số hơn thay vì cắt ở 460px rồi bỏ trống phần dưới */
#overview-card { display: flex; flex-direction: column; min-height: 0; }
#properties-list { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 6px; }
@media (max-width: 1023px) { #properties-list { max-height: 480px; } }
.ov-row {
    display: flex;
    /* flex-start (KHÔNG phải center): chỉ số có giá trị dài phải xuống 2 dòng
       (vd "Trung tâm xác định"). Với center, tên chỉ số bị canh giữa cả khối 2
       dòng → dòng đầu của giá trị nhô LÊN so với tên. Dùng flex-start + cùng
       line-height 1.4 (= 21px, đúng bằng ô icon 21px) nên icon, tên và DÒNG ĐẦU
       của giá trị luôn thẳng hàng; dòng 2 xuống dưới. */
    align-items: flex-start;
    gap: 10px;
    /* Đệm 11px để hàng cao ~44px cho ngón tay (xem lại ở khối "vùng chạm" cuối file:
       trên máy tính dùng chuột thì bóp lại 7px cho gọn). */
    padding: 11px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;

    /* Phản hồi ngay lập tức */
    transition: none;
}

.ov-row:hover {
    background: var(--surface-hover);

    /* Bỏ chuyển động ngang gây cảm giác trễ */
    transform: none;
}
.ov-row.ov-active {
    background: linear-gradient(90deg, rgba(56,189,248,.16), rgba(56,189,248,.04));
    border-color: var(--border-accent);
    box-shadow: inset 3px 0 0 var(--accent);
}
.ov-icon { width: 21px; height: 21px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface-2); color: var(--text-faint); }
.ov-row.ov-active .ov-icon { color: var(--accent); background: rgba(56,189,248,.15); }
.ov-icon svg { width: 12px; height: 12px; }
/* FORMAT CHUNG của nhãn & giá trị chỉ số — dùng ở HAI nơi:
   • Bảng tổng quan          → .ov-label / .ov-value
   • Dòng "Kết quả:" ở thẻ luận giải → .detail-kq-label / .detail-kq-value
   Gộp khai báo để 2 nơi LUÔN giống hệt nhau (yêu cầu "dùng chung format"):
   đổi màu/cỡ chữ ở đây là cả 2 chỗ tự đổi theo, không phải sửa 2 lần.
   font-weight ghi TƯỜNG MINH (không để kế thừa) vì .detail-kq-* nằm trong thẻ
   luận giải có font-weight riêng — không ghi rõ thì 2 nơi sẽ lệch nét đậm. */
.ov-label, .detail-kq-label { color: var(--text-main); font-size: 15px; font-weight: 400; line-height: 1.4; }
/* line-height 1.4 khớp với .ov-label và ô icon (21px) → dòng đầu luôn thẳng hàng. */
.ov-value, .detail-kq-value { font-size: 15px; font-weight: 600; color: var(--accent-text); line-height: 1.4; }

/* Phần LAYOUT riêng của bảng tổng quan (chỉ dùng trong flex .ov-row, không phải "format") */
.ov-label { white-space: nowrap; flex-shrink: 0; }
.ov-value { margin-left: auto; text-align: right; }
.ov-row.ov-active .ov-label { color: var(--text-main); }
.ov-wave { display: inline-flex; align-items: flex-end; gap: 2px; margin-right: 6px; height: 11px; vertical-align: middle; }
.ov-wave span { width: 2.5px; background: var(--accent-strong); border-radius: 2px; animation: wavebar .9s ease-in-out infinite; }
.ov-wave span:nth-child(1) { height: 5px; animation-delay: -.6s; }
.ov-wave span:nth-child(2) { height: 11px; animation-delay: -.3s; }
.ov-wave span:nth-child(3) { height: 7px; animation-delay: 0s; }
@keyframes wavebar { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }

/* =========================================================================
   THẺ LUẬN GIẢI — "CHỌN 1 XEM 1"
========================================================================= */
/* padding-bottom: khoảng trắng dưới dòng "Đọc nội dung luận giải" xuống mép dưới thẻ.
   GẤP ĐÔI đệm đáy mặc định của .report-card — 20 → 40px (mobile), 24 → 48px (desktop),
   yêu cầu 15/07. Khai báo RIÊNG cho #active-detail-card chứ không sửa `.report-card`
   vì class đó dùng chung với thẻ chart + tổng quan (2 thẻ đó đã nới đáy riêng ở khối
   `.report-grid > .report-card` phía trên — cùng con số nhưng KHÁC yêu cầu, đừng gộp). */
#active-detail-card { margin-top: 32px; padding-bottom: 40px; }
@media (min-width: 1024px) { #active-detail-card { padding-bottom: 48px; } }
.detail-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.detail-avatar {
    width: 120px; height: 120px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border-accent); box-shadow: 0 0 0 6px rgba(56,189,248,.08), 0 0 24px rgba(56,189,248,.25);
}
@media (min-width: 1024px) {
    .detail-avatar { width: 145px; height: 145px; }
}
/* margin-bottom = khoảng cách từ TÊN chỉ số xuống INTRO ngay dưới (.detail-result
   không có margin-top nên toàn bộ khoảng hở do dòng này quyết định). 4px → 8px
   theo yêu cầu "tăng gấp đôi" 15/07. */
.detail-title { font-size: 21px; font-weight: 800; color: var(--text-main); text-transform: uppercase; letter-spacing: .3px; margin: 0 0 8px; }
/* ⚠️ TÊN ID NGƯỢC VỚI NỘI DUNG (di sản — xem renderActiveDetail trong logic.js):
      #active-detail-result (.detail-result) chứa INTRO chỉ số
      #active-detail-intro  (.detail-body)   chứa dòng KẾT QUẢ
   Giữ nguyên tên ID để khỏi phải sửa đồng loạt 3 file HTML + logic.js. */

/* INTRO chỉ số — lấy format của TÊN chỉ số ở bảng tổng quan (.ov-label: màu
   --text-main, 15px), TĂNG 1 CỠ → 16px, đậm VỪA (600). Trước đây dùng màu nhấn
   + nét 700 nên vừa chỏi màu vừa gắt gần bằng tiêu đề ngay phía trên nó.
   line-height 1.6 (không phải 1.4 như .ov-label): intro là đoạn văn xuống nhiều
   dòng, cần thoáng hơn dòng đơn của bảng tổng quan. */
/* text-align: justify → canh đều 2 bên cho khối intro (áp dụng CẢ mobile lẫn desktop,
   yêu cầu 15/07). Trước đây không khai báo nên chữ chỉ canh trái, mép phải lởm chởm. */
.detail-result { color: var(--text-main); font-weight: 600; font-size: 16px; line-height: 1.6; margin-bottom: 14px; text-align: justify; }

/* --- ĐIỆN THOẠI: intro XUỐNG DƯỚI ảnh, tên chỉ số canh TÂM ảnh ---------------
   VẤN ĐỀ: .detail-head là flex [ảnh 120px | cột chữ]. Trên màn hẹp, cột chữ chỉ
   còn ~200px nên intro bị ép vỡ vụn thành cả chục dòng chữ chạy dài cạnh ảnh.
   MUỐN: hàng 1 = [ảnh | TÊN chỉ số] (tên canh giữa theo tâm ảnh),
         hàng 2 = intro chiếm trọn chiều ngang.
   VƯỚNG: intro nằm trong 1 div BỌC chung với tên (xem pay.html), không phải con
   trực tiếp của flex → không tự xuống hàng riêng được.
   CÁCH XỬ LÝ: `display: contents` làm div bọc BIẾN MẤT khỏi bố cục, đẩy tên +
   intro thành con TRỰC TIẾP của .detail-head → khi đó flex-wrap + flex-basis:100%
   mới ép được intro xuống hàng riêng — máy tính vẫn giữ nguyên bố cục 2 cột. */
@media (max-width: 640px) {
    .detail-head { flex-wrap: wrap; align-items: center; row-gap: 14px; }
    .detail-head > div { display: contents; }
    /* flex:1 + min-width:0 → tên ở lại hàng 1 cạnh ảnh (không bị đẩy xuống) và
       cho phép co lại khi tên dài. margin-bottom:0 để canh ĐÚNG tâm ảnh —
       còn 8px thì tên bị lệch lên trên nửa khoảng đó. */
    .detail-title { flex: 1; min-width: 0; margin-bottom: 0; }
    .detail-result { flex-basis: 100%; }
}

/* Dòng KẾT QUẢ: "Kết quả: <GIÁ TRỊ IN HOA>" — nhãn cố định, format nhãn/giá trị
   dùng chung với bảng tổng quan (xem khối .ov-label/.ov-value phía trên).
   text-align: left để ghi đè `justify` kế thừa từ .detail-body (justify làm giãn
   chữ xấu nếu giá trị dài phải xuống dòng, vd chỉ số cặp đôi "A | B"). */
#active-detail-intro { line-height: 1.4; text-align: left; }
.detail-kq-value { text-transform: uppercase; }
.detail-body { color: var(--text-main); font-size: 16px; line-height: 1.75; text-align: justify; }
.detail-body p { margin: 0 0 12px; }
.detail-body p:last-child { margin-bottom: 0; }
/* --- Tiêu đề bên trong nội dung luận giải (HTML do CKEditor sinh ra) ------
   QUAN TRỌNG: Tailwind CDN (preflight) reset h1..h6 về font-size/font-weight
   "inherit" → nếu không khai báo lại, thẻ H3 sẽ hiển thị Y HỆT đoạn văn thường
   (16px / weight 400) và bài luận giải mất hoàn toàn cấu trúc phân cấp.
   → Bắt buộc khai báo font-size + font-weight tường minh cho từng cấp. */
.detail-body h1, .detail-body h2, .detail-body h3,
.detail-body h4, .detail-body h5, .detail-body h6 {
    color: var(--text-main);
    /* 800 → 700 → 600 → 500 → 400 (yêu cầu 15/07): khách vẫn thấy dày dù đã giảm nhiều lần —
       hạ về đúng weight "regular" của đoạn văn, không còn cách mảnh hơn nữa trong bộ font hiện
       có (Plus Jakarta Sans chỉ nạp 400/500/600/700/800, xin weight nhỏ hơn sẽ không có thật mà
       trình duyệt tự quy về 400). Phân cấp tiêu đề giờ dựa vào CỠ CHỮ (font-size bên dưới) thay
       vì độ đậm. */
    font-weight: 400;
    margin: 22px 0 10px;
    line-height: 1.4;
}
.detail-body h1 { font-size: 24px; }
.detail-body h2 { font-size: 21px; }
.detail-body h3 { font-size: 18.5px; }
.detail-body h4 { font-size: 17px; }
.detail-body h5, .detail-body h6 { font-size: 16px; }
/* Cứu cánh: người soạn hay quên chọn Heading mà chỉ bôi đậm cả dòng (p > strong).
   Nhận diện bằng :has() và đẩy giãn cách như một tiêu đề thật. */
.detail-body p:has(> strong:only-child),
.detail-body p:has(> b:only-child) { margin-top: 22px; margin-bottom: 10px; line-height: 1.4; }
/* Tiêu đề nằm ngay dòng đầu thì bỏ khoảng đệm trên cho khít mép thẻ */
.detail-body h1:first-child, .detail-body h2:first-child, .detail-body h3:first-child,
.detail-body h4:first-child, .detail-body h5:first-child, .detail-body h6:first-child { margin-top: 0; }
/* (Rule ảnh .detail-body img đã chuyển xuống khối "TIẾP CẬN & TRẢI NGHIỆM" ở cuối file
   để có kèm xử lý responsive — không khai báo 2 nơi nữa.) */
.detail-body strong, .detail-body b { color: var(--text-main); }

.locked-overlay {
    background: var(--surface-1); border: 1px dashed var(--border-accent); padding: 22px 16px; border-radius: var(--radius-md);
    text-align: center; color: var(--accent); font-weight: 700; cursor: pointer; transition: all .2s ease;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.locked-overlay svg { width: 26px; height: 26px; }
.locked-overlay:hover { color: var(--accent-strong); border-color: var(--accent-strong); background: rgba(56,189,248,.06); }

/* =========================================================================
   AUDIO PLAYER
========================================================================= */
#audio-player-card {
    margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-md);
    background: var(--surface-soft);
    /* Viền đậm + rõ hơn (1px mờ → 2px màu nhấn) để khung player nổi bật hẳn lên khỏi nền thẻ,
       thay vì gần như hòa lẫn như viền --border-soft cũ. */
    border: 2px solid var(--border-accent);
    position: relative;
}
/* Vệt sáng chạy quanh viền khung player — dùng lại animation btnSweepSpin của nút mở khóa,
   chỉ đổi border-radius cho khớp viền bo góc vuông (không phải pill). */
#audio-player-card::after {
    content: ""; position: absolute; inset: -3px; border-radius: calc(var(--radius-md) + 3px); padding: 1.8px;
    background: conic-gradient(from var(--spin-ang),
        transparent 0deg, transparent 205deg,
        rgba(56,189,248,.12) 280deg, rgba(125,211,252,.85) 332deg,
        #ffffff 353deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: btnSweepSpin 5.2s linear infinite;
    pointer-events: none; z-index: 0;
    opacity: 1; transition: opacity .6s ease;
}
.audio-top-row, .audio-controls-row, audio { position: relative; z-index: 1; }
.audio-top-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 10px; flex-wrap: wrap; }
/* Luôn 1 dòng, không rớt dòng — min-width:0 để item flex được phép co lại
   (mặc định flex item không co dưới content-width, chặn cả white-space:nowrap
   lẫn text-overflow:ellipsis hoạt động đúng trên màn hẹp). */
#audio-now-playing { font-size: 14.5px; font-weight: 700; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#audio-now-playing .lbl { color: var(--text-faint); font-weight: 500; margin-right: 4px; }
/* Icon minh họa NẰM GIỮA câu gợi ý ("Click ▶ để nghe…, Click ▷| để chuyển…").
   Dùng cho CẢ 2 icon play + next nên đặt tên chung .lbl-hint-icon (tên cũ
   .lbl-next-icon chỉ hợp với 1 icon → dễ hiểu nhầm).
   ⚠️ BẪY TAILWIND (cùng loại với heading trong luận giải — xem .detail-body h1..h6):
   preflight của Tailwind CDN đặt `svg { display: block }` → icon thành khối riêng,
   cắt câu gợi ý thành NHIỀU HÀNG. `white-space: nowrap` của #audio-now-playing KHÔNG
   cứu được vì đây là ngắt KHỐI, không phải ngắt chữ.
   ⇒ inline-block: icon nằm gọn trong dòng chữ mà vẫn giữ được width/height.
   color: --accent → icon XANH nổi bật giữa dòng chữ xám (2 icon đều vẽ bằng
   currentColor: play tô `fill`, next tô `stroke` → 1 khai báo màu ăn cho cả hai). */
.lbl-hint-icon { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin: 0 1px; color: var(--accent); }
#audio-time { font-size: 12.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* Chỉ số đang KHÓA (chưa thanh toán) -> tắt vệt sáng viền, tránh gây hiểu lầm là nghe được */
#audio-player-card.audio-locked::after { display: none; }

.audio-controls-row { display: flex; align-items: center; gap: 13px; flex-wrap: wrap; }
.audio-controls-row #audio-seek { min-width: 90px; }
.audio-btn-round {
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--text-dim); cursor: pointer;
    transition: all .18s ease; flex-shrink: 0;
}
.audio-btn-round:hover { color: var(--text-main); border-color: var(--border-accent); }
.audio-btn-round svg { width: 16px; height: 16px; }
#audio-playpause {
    width: 46px; height: 46px; background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep));
    border: none; color: #fff; box-shadow: 0 8px 20px -6px rgba(14,165,233,.6);
    position: relative; overflow: visible;
}
#audio-playpause:hover { color: #fff; transform: scale(1.04); }
#audio-playpause svg { width: 18px; height: 18px; }
@keyframes playPulse {
    0%, 100% { box-shadow: 0 8px 20px -6px rgba(14,165,233,.6); }
    50% { box-shadow: 0 0 0 8px rgba(56,189,248,.14), 0 8px 24px -6px rgba(14,165,233,.8); }
}
#audio-playpause.is-playing { animation: playPulse 2.2s ease-in-out infinite; }

/* ── Trạng thái KHÓA: chỉ số trả phí chưa mở khóa — play gạch chéo, không phát được ── */
.audio-locked #audio-playpause { background: linear-gradient(135deg, #55617a, #3b4560); box-shadow: none; animation: none; }
.audio-locked #audio-playpause svg { opacity: .5; }
.audio-locked #audio-playpause::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 118%; height: 2.5px;
    background: #e2e8f0; border-radius: 2px; box-shadow: 0 0 5px rgba(0,0,0,.4);
    transform: translate(-50%, -50%) rotate(-45deg); pointer-events: none;
}
.audio-locked #audio-seek { opacity: .45; pointer-events: none; }
.audio-lock-badge {
    display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 3px 10px;
    border-radius: 999px; background: rgba(234,179,8,.13); border: 1px solid rgba(234,179,8,.4);
    color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .3px; vertical-align: middle;
}
.audio-lock-badge svg { width: 11px; height: 11px; }

#audio-seek {
    flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 4px; cursor: pointer;
    background: linear-gradient(90deg, var(--accent-strong) 0%, var(--accent-strong) var(--seek-pct, 0%), var(--surface-2) var(--seek-pct, 0%), var(--surface-2) 100%);
}
#audio-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(56,189,248,.4); cursor: pointer; }
#audio-seek::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(56,189,248,.4); border: none; cursor: pointer; }
#audio-seek::-moz-range-track { height: 5px; border-radius: 4px; background: var(--surface-2); }

.detail-toggle-divider { margin-top: 16px; height: 1px; background: var(--border-soft); }
.detail-toggle-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
    padding: 12px 2px 2px; color: var(--accent); font-weight: 700; font-size: 14.5px; user-select: none;
}
.detail-toggle-row:hover { color: var(--accent-strong); }
.detail-toggle-row svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Gạch chân + vệt sáng chạy 1 chiều (trái -> phải, không quay lại) dưới text
   "Đọc nội dung luận giải" -> thu hút mắt người xem bấm mở nội dung. */
.detail-toggle-row span {
    position: relative; display: inline-block; overflow: hidden;
    padding-bottom: 5px; border-bottom: 1.5px solid var(--border-soft);
}
.detail-toggle-row span::after {
    content: ""; position: absolute; bottom: 0; left: -30%;
    width: 30%; height: 1.5px;
    background: linear-gradient(90deg, transparent, var(--accent-strong) 50%, #ffffff 75%, transparent);
    animation: toggleUnderlineSweep 2.4s linear infinite;
    pointer-events: none;
    opacity: 1; transition: opacity .6s ease;
}
@keyframes toggleUnderlineSweep {
    0% { left: -30%; }
    100% { left: 100%; }
}
/* Dừng hẳn sau 10 giây, ĐỒNG BỘ với 3 vệt sáng viền ở trên (xem stopSweepAfter() trong logic.js).
   opacity:0 (không chỉ pause) — pause đơn thuần sẽ để lại 1 đoạn sáng đứng khựng giữa chừng trên
   gạch chân, nhìn như lỗi hiển thị; ẩn hẳn (mờ dần .6s) mới sạch mắt. */
.detail-toggle-row.sweep-stopped span::after {
    animation-play-state: paused;
    opacity: 0;
}

/* Nội dung luận giải chi tiết — ẨN mặc định, hiện khi bấm "Đọc nội dung luận giải" */
#detail-body-wrap { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

/* Bản sao của .detail-toggle-row đặt Ở CUỐI nội dung luận giải (trong #detail-body-wrap) — để
   khách gập nội dung lại được mà KHÔNG phải cuộn ngược lên đầu tìm nút.
   2 nút "Xem..." (đầu, #detail-toggle-row) và "Ẩn..." (cuối, bản này) không còn dùng chung 1 vị
   trí đổi chữ qua lại như trước — mỗi nút đứng yên 1 chỗ, chữ CỐ ĐỊNH, chỉ đổi HIỆN/ẨN theo
   trạng thái: đóng -> chỉ nút đầu hiện; mở -> nút đầu tự ẩn (toggleDetailBody() trong logic.js),
   nút cuối này tự hiện theo vì nằm trong wrap đang mở, không cần JS riêng cho nó. */
.detail-toggle-row-bottom { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

/* =========================================================================
   KHU VỰC HÀNH ĐỘNG: MỞ KHÓA / TẢI FILE / GỬI MAIL / TRA CỨU LẠI
========================================================================= */
#action-zone { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
/* Dùng --text-on-dark (KHÔNG dùng --text-dim): khu vực này luôn nằm trên nền tối của body,
   kể cả khi bật chế độ Sáng. Dùng --text-dim sẽ ra chữ tối trên nền tối. */
#payment-intro { color: var(--text-on-dark); text-align: center; font-size: 14.5px; font-weight: 500; max-width: 640px; padding: 0 10px; }

.pill-btn {
    font-weight: 700; padding: 14px 30px; border-radius: 999px; cursor: pointer; font-size: 14px;
    text-transform: uppercase; letter-spacing: .3px; border: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    /* Chữ trong nút KHÔNG được xuống dòng: trên màn hẹp, "Gửi qua mail" từng bị
       ngắt dòng làm nút cao vống lên 68px trong khi nút bên cạnh chỉ 49px → lệch nhau. */
    white-space: nowrap;
    min-height: 48px;   /* mọi nút hành động cao bằng nhau, đủ vùng chạm */
}
.pill-btn-primary {
    background: linear-gradient(120deg, var(--success) 0%, var(--success-dark) 45%, var(--success) 100%);
    background-size: 220% 100%;
    color: #fff; box-shadow: 0 12px 26px -8px rgba(16,185,129,.55);
    animation: ctaSheen 5s ease-in-out infinite;
}
@keyframes ctaSheen { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.pill-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -8px rgba(16,185,129,.7); }
.pill-btn-ghost { background: var(--surface-1); color: var(--text-dim); border: 1px solid var(--border-soft); }
.pill-btn-ghost:hover { color: var(--text-main); border-color: var(--border-accent); }
.pill-btn-accent { background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep)); color: #fff; box-shadow: 0 12px 26px -8px rgba(14,165,233,.55); }
.pill-btn-accent:hover { transform: translateY(-1px); }
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ── RUNG NHẸ nút "MỞ KHÓA NỘI DUNG" khi khách bấm ô khóa trong nội dung luận giải
   (attentionUnlockBtn() trong logic.js) — hút chú ý về đúng nút cần bấm. Thay cho hiệu ứng
   phát sáng + vệt sáng quay viền cũ (lặp 3 lần, kéo dài 3.3s, nhìn rối) bằng 1 cú rung ngắn,
   rõ ràng và ít gây nhiễu hơn. */
@property --spin-ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes attentionShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-6px); }
    30% { transform: translateX(5px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
    90% { transform: translateX(1px); }
}
.btn-attention { animation: attentionShake .5s ease-in-out; }

/* ── VỆT SÁNG CHẠY QUANH VIỀN nút "MỞ KHÓA NỘI DUNG" — trang trí thường trực
   (mô phỏng hiệu ứng glow-sweep của trang home: một vệt sáng cyan chạy vòng viền).
   Thuần CSS: gắn ::after để không đụng ::before của .btn-attention;
   nút ẩn khi đã thanh toán -> animation tự dừng, không tốn tài nguyên. ── */
@keyframes btnSweepSpin { to { --spin-ang: 360deg; } }
#btn-main-action.pill-btn-primary { position: relative; }
#btn-main-action.pill-btn-primary::after {
    content: ""; position: absolute; inset: -3px; border-radius: 999px; padding: 2.1px;
    background: conic-gradient(from var(--spin-ang),
        transparent 0deg, transparent 205deg,
        rgba(56,189,248,.12) 280deg, rgba(125,211,252,.85) 332deg,
        #ffffff 353deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: btnSweepSpin 5.2s linear infinite;
    pointer-events: none; z-index: 2;
    opacity: 1; transition: opacity .6s ease;
}

/* Dừng hẳn 3 vệt sáng chạy viền trên sau 10 giây (JS thêm class .sweep-stopped khi đủ giờ —
   xem stopSweepAfter() trong logic.js) thay vì chạy infinite suốt phiên xem báo cáo, đỡ tốn CPU
   vẽ lại conic-gradient mỗi khung hình. Phải viết TRÙNG độ đặc hiệu (#id + class) với khai báo
   animation gốc ở trên — nếu chỉ dùng .sweep-stopped suông thì thua vì #id luôn thắng class.
   opacity:0 (không chỉ pause) — pause đơn thuần sẽ đứng khựng vệt sáng lại giữa chừng ở một góc
   bất kỳ trên viền, nhìn như lỗi hiển thị; ẩn hẳn (mờ dần .6s) mới sạch mắt. */
#submit-btn.sweep-stopped::before,
#submit-partner-btn.sweep-stopped::before,
#audio-player-card.sweep-stopped::after,
#btn-main-action.pill-btn-primary.sweep-stopped::after {
    animation-play-state: paused;
    opacity: 0;
}

#unpaid-actions, #paid-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; width: 100%; }
#paid-actions { display: none; }
.email-inline-group { display: flex; align-items: center; gap: 0; border: 1px solid var(--border-soft); border-radius: 999px; overflow: hidden; background: var(--surface-1); }
.email-inline-group input#target-email {
    border: none !important; background: transparent !important; padding: 13px 16px !important; font-size: 13.5px !important;
    color: var(--text-main) !important; width: 210px; outline: none;
}
.email-inline-group input#target-email::placeholder { color: var(--text-faint) !important; }
.email-inline-group button { border-radius: 0 999px 999px 0 !important; padding: 13px 22px !important; }
/* --- Khu vực nút sau khi thanh toán, trên ĐIỆN THOẠI ----------------------
   LỖI CŨ: các nút tự co theo chữ nên cao thấp lệch nhau — "Tải file" cao 49px
   còn "Gửi qua mail" bị xuống dòng thành 68px → nhìn xộc xệch.
   NAY: xếp DỌC, mỗi nút chiếm trọn chiều ngang và cao bằng nhau. */
@media (max-width: 640px) {
    #unpaid-actions, #paid-actions { flex-direction: column; gap: 10px; }
    #unpaid-actions > *, #paid-actions > * { width: 100%; }
    #paid-actions .pill-btn { width: 100%; }
    .email-inline-group { width: 100%; }
    .email-inline-group input#target-email { flex: 1; width: auto; min-width: 0; }
    /* Nút trong ô email giữ dạng viên thuốc bên phải, KHÔNG kéo full chiều ngang.
       Bóp padding lại để chừa chỗ cho ô nhập email (email thường dài, ô quá hẹp
       thì gõ xong không nhìn thấy đầu chuỗi). */
    .email-inline-group .pill-btn {
        width: auto !important;
        flex-shrink: 0;
        padding: 13px 14px !important;
        font-size: 12.5px;
    }
    .email-inline-group input#target-email { padding: 13px 12px !important; font-size: 13px !important; }
}
/* Màn hình rất hẹp (≤380px): giấu chữ trong nút gửi mail, chỉ chừa icon phong bì —
   nhường tối đa chiều ngang cho ô nhập email. */
@media (max-width: 380px) {
    .email-inline-group .pill-btn { font-size: 0; gap: 0; padding: 13px 15px !important; }
    .email-inline-group .pill-btn svg { width: 17px; height: 17px; }
}

/* =========================================================================
   NÚT CUỘN LÊN ĐẦU TRANG
========================================================================= */
#btn-scroll-top {
    position: fixed; bottom: 20px; right: 20px; width: 45px; height: 45px;
    background: linear-gradient(135deg, var(--brand-blue), var(--accent-deep)); border-radius: 50%;
    align-items: center; justify-content: center; cursor: pointer; opacity: .35; z-index: 999990;
    transition: opacity .3s, transform .2s; box-shadow: 0 6px 16px rgba(0,0,0,.5);
}
#btn-scroll-top:active { transform: translateY(-3px) scale(.95); }

/* =========================================================================
   HIỆU ỨNG XUẤT HIỆN (entrance) — trang chủ mượt và "đắt" hơn khi tải
========================================================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-left { animation: fadeUp .65s ease both; }
.hero-right { animation: fadeUp .65s .12s ease both; }
.hero-bottom-strip .hero-strip-item { animation: fadeUp .6s ease both; }
.hero-bottom-strip .hero-strip-item:nth-child(1) { animation-delay: .22s; }
.hero-bottom-strip .hero-strip-item:nth-child(2) { animation-delay: .3s; }
.hero-bottom-strip .hero-strip-item:nth-child(3) { animation-delay: .38s; }
.hero-bottom-strip .hero-strip-item:nth-child(4) { animation-delay: .46s; }

/* Người dùng bật "giảm chuyển động" trong hệ điều hành -> tắt animation trang trí
   (giữ lại spinner vì đó là phản hồi chức năng, đứng hình sẽ tưởng treo) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .global-loading-overlay .spinner { animation-duration: .85s !important; animation-iteration-count: infinite !important; }
    /* Các vệt sáng chạy viền (nút mở khóa, khung player, nút tạo bản đồ) rất nhẹ, không gây khó chịu
       như hiệu ứng lớn -> giữ chạy kể cả khi hệ điều hành bật "giảm chuyển động" */
    #btn-main-action.pill-btn-primary::after,
    #audio-player-card::after,
    #submit-btn::before,
    #submit-partner-btn::before {
        animation-duration: 5.2s !important; animation-iteration-count: infinite !important;
    }
    .detail-toggle-row span::after {
        animation-duration: 2.4s !important; animation-iteration-count: infinite !important;
    }
    /* Sóng "đang phát" ở dòng chỉ số: cũng chỉ là phản hồi chức năng nhỏ (báo đang nghe),
       không phải hiệu ứng trang trí lớn -> giữ chạy như spinner, không đứng hình. */
    .ov-wave span {
        animation-duration: .9s !important; animation-iteration-count: infinite !important;
    }
}

/* =========================================================================
   RESPONSIVE FIX CHUNG
========================================================================= */
@media (max-width: 1023px) {
    body { padding: 20px 12px; }
    html { background-color: var(--bg-deep); }
}
@media (min-width: 1024px) { body { padding: 30px 20px; } }


/* =========================================================================
   ẨN ICON TRONG FORM TRÊN MOBILE (MÀN HÌNH < 768PX)
========================================================================= */
@media (max-width: 768px) {
    /* Trả lại khoảng lề trái (padding) mặc định thay vì chừa chỗ cho icon */
    .field-icon {
        padding-left: 14px !important;
    }
/* Ẩn icon Nơi sinh (Ghim) và Họ Tên (Person) */
    input.field-icon-pin,
    input.field-icon-person {
        background-image: none !important;
    }

    /* Ẩn icon Lịch và Đồng hồ (nhưng BẮT BUỘC phải giữ lại icon mũi tên trỏ xuống) */
    select.field-icon-calendar, 
    select.field-icon-clock {
        background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
        background-position: right 10px center !important;
        background-size: 13px !important;
    }
}

/* Bỏ ánh sáng xanh quanh nút tạo bản đồ */
#form-container .submit-btn,
#form-container .submit-btn:hover,
#form-container .submit-btn:focus,
#form-container .submit-btn:focus-visible {
    box-shadow: none !important;
    filter: none !important;
    outline: none;
}

/* Hiện toàn bộ danh sách chỉ số, không dùng thanh cuộn nội bộ */
#properties-list {
    flex: 0 0 auto !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
}

#chart-image-container,
#svg-combined,
#chart-image-container svg,
#svg-combined svg {
    background: transparent !important;
}

#chart-card,
#chart-card-cd {
    justify-content: flex-start !important;
}

/* Khoảng trống trên chart.
   ─────────────────────────────────────────────────────────────────────────────
   LỖI CŨ: thẻ chart bị grid kéo cao BẰNG thẻ 16 chỉ số (cao hơn ~200px), mà
   wrapper vừa `flex:1` (nuốt hết phần dư) vừa `align-items:center` (kế thừa từ
   .chart-svg-wrapper) → phần dư bị chia đôi, đẩy chart tụt xuống 100px, tạo mảng
   trống mênh mông giữa thông tin người tra cứu và bản đồ.
   NAY: căn chart lên MÉP TRÊN của wrapper (padding-top:0).
   ĐÃ GỠ `margin-top: -40px` (15/07): nó chỉ tồn tại để bù "khoảng chết" do
   transform:scale sinh ra — nay chart co bằng `width` nên không còn khoảng chết,
   giữ margin âm sẽ kéo chart đè lên khối thông tin. Xem ghi chú tại
   `.chart-svg-wrapper svg` phía trên.
   ⇒ Khoảng hở thông tin→chart giờ chỉnh DUY NHẤT ở #user-info-display { margin-bottom }. */
#chart-card .chart-svg-wrapper,
#chart-card-cd .chart-svg-wrapper {
    flex: 1;
    align-items: flex-start;
    padding-top: 0;
}

#overview-card .report-card-title,
#active-detail-card .report-card-title {
    width: 100%;
    justify-content: center;
    text-align: center;
}

#active-detail-card {
    box-shadow:
        inset 3px 0 0 var(--accent),
        var(--shadow-card);
}

/* (Đã gỡ khai báo `.report-title { visibility: hidden }` trùng lặp ở đây —
   gộp vào khai báo .report-title duy nhất phía trên, xem ghi chú tại đó.) */

/* =========================================================================
   TIẾP CẬN & TRẢI NGHIỆM (bổ sung 15/07/2026)
   Gom tại đây để dễ tìm, thay vì rải rác trong file.
========================================================================= */

/* --- 1. Viền focus khi dùng BÀN PHÍM ------------------------------------
   Trước đây mọi nút đều `outline: none` → người dùng bàn phím (Tab) không biết
   mình đang đứng ở nút nào. Dùng :focus-visible nên CHỈ hiện khi điều hướng
   bằng bàn phím, bấm chuột vẫn sạch sẽ như cũ. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.ov-row:focus-visible,
.tab-pill:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

/* --- 2. Vùng chạm tối thiểu 44x44px (chuẩn WCAG 2.5.5 / Apple HIG) -------
   Ngón tay cần ~44px; trước đó nút header 36px, công tắc sáng/tối 52x28,
   dòng chỉ số cao 39px → dễ bấm nhầm trên điện thoại. */
.header-btn { min-height: 44px; }
.ov-row { min-height: 44px; }
/* Ngoại lệ máy tính (chuột chính xác, không phải ngón tay): bỏ trần 44px và bóp
   đệm 11px → 7px. Hàng chỉ số 44px → 35px, danh sách 16 chỉ số thấp đi ~140px
   nên thẻ chỉ số gần bằng chiều cao thẻ chart → 2 thẻ cân nhau, chart bớt dư đáy.
   Điện thoại/máy tính bảng giữ nguyên 44px cho dễ bấm. */
@media (min-width: 1024px) and (pointer: fine) {
    .ov-row { min-height: 0; padding: 7px 10px; }
}
.audio-btn-round { min-width: 44px; min-height: 44px; }
/* Logo: nâng vùng bấm lên 44px (ảnh vẫn cao 40px như cũ, chỉ nới chỗ bấm). */
.brand-logo { min-height: 44px; }

/* Thanh tua audio: THANH nhìn thấy vẫn mảnh 5px cho đẹp, nhưng vùng CHẠM
   phải đủ dày — trước đây chỉ cao đúng 5px nên trên điện thoại gần như
   không kéo trúng. Thêm padding dọc + tăng núm kéo trên màn cảm ứng. */
#audio-seek {
    padding: 20px 0;              /* 5px thanh + 2*20px đệm = 45px vùng chạm (≥44px) */
    background-clip: content-box; /* giữ dải màu đúng 5px, không bị đệm kéo giãn */
    box-sizing: content-box;
}
@media (max-width: 640px) {
    #audio-seek::-webkit-slider-thumb { width: 18px; height: 18px; }
    #audio-seek::-moz-range-thumb { width: 18px; height: 18px; }
}

/* --- 3. Ảnh trong nội dung luận giải -------------------------------------
   Cũ: ép cứng `max-width:165px; float:left` → ảnh minh họa lớn do admin chèn
   bị co nhỏ còn 165px và trôi sang trái, vỡ bố cục bài đọc.
   Nay: cho ảnh rộng tối đa 45% khung (trần 280px) trên màn rộng; trên điện
   thoại thì bỏ float, ảnh chiếm trọn chiều ngang cho dễ nhìn. */
.detail-body img {
    max-width: min(280px, 45%);
    height: auto;
    border-radius: var(--radius-sm);
    float: left;
    margin: 4px 16px 12px 0;
}
@media (max-width: 640px) {
    .detail-body img {
        float: none;
        max-width: 100%;
        margin: 10px auto 14px;
        display: block;
    }
}

/* --- Nút "Tra cứu lại" (.pill-btn-ghost trong #action-zone) --------------------
   Vùng #action-zone LUÔN nằm trên nền TỐI của body (xem ghi chú --text-on-dark
   ở đầu file) → viền/chữ phải sáng để đủ tương phản (đo được rgba(148,163,184,.6)
   trên nền rgb(5,6,13) đạt 3.39:1, đạt chuẩn WCAG 1.4.11 cho viền/thành phần
   giao diện ≥3:1). */
#action-zone .pill-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #97a3ba;
    border-color: rgba(148, 163, 184, 0.6);
}
#action-zone .pill-btn-ghost:hover {
    color: #eef2f8;
    border-color: rgba(56, 189, 248, 0.32);
}

/* =========================================================================
   TUỲ CHỈNH KÍCH THƯỚC NÚT TẠO BẢN ĐỒ
========================================================================= */
#submit-btn, 
#submit-partner-btn {
    width: 65% !important; /* Bạn có thể tăng giảm số này (VD: 50%, 75% hoặc 300px) */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Khuyến nghị: Giữ nút full chiều ngang trên điện thoại để người dùng dễ bấm */
@media (max-width: 640px) {
    #submit-btn, 
    #submit-partner-btn {
        width: 100% !important;
    }
}

/* =========================================================================
   CANH GIỮA TIÊU ĐỀ KHUNG BÁO CÁO (CÁ NHÂN & CẶP ĐÔI)
========================================================================= */
#capdoi-result .report-card-title,
#chart-card .report-card-title {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* =========================================================================
   CHỈNH ĐƯỜNG KẺ DƯỚI TIÊU ĐỀ DÀI HƠN 30% VÀ CANH GIỮA
========================================================================= */
/* Xóa viền cũ và thiết lập vị trí tương đối cho thẻ span */
.report-card-title span {
    border-bottom: none !important;
    position: relative;
    display: inline-block;
    padding-bottom: 8px; /* Khoảng cách từ chữ xuống đường kẻ */
}

/* Vẽ đường kẻ mới dài 130% */
.report-card-title span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Kéo đường kẻ lùi lại một nửa để canh chính giữa */
    width: 130%; /* Độ dài bằng 130% so với chữ (dài hơn 30%) */
    height: 1px; /* Độ dày của đường kẻ */
    background: var(--border-accent); /* Màu đường kẻ giống màu viền cũ */
}

/* (Đã gỡ khối .report-grid-hint TRÙNG LẶP ở đây ngày 15/07/2026 — gộp về khai báo
   duy nhất ở phần "GRID: BẢN ĐỒ NĂNG LƯỢNG + TỔNG QUAN CHỈ SỐ" phía trên. Lý do
   xem ghi chú tại đó: khối này chỉ ghi đè `padding` nên `margin-top: -50px` của
   khối trên vẫn sống ngầm → rất khó lần ra khi chỉnh khoảng cách.) */