

/* Biến dùng chung (--bg-deep, --border-soft, --text-main, --accent, --radius-sm/lg,
   --input-bg*, --surface-1/2, --modal-bg, --shadow-card, --brand-blue, --accent-deep...)
   đã khai báo ở :root trong hd-site/src/input.css (biên dịch ra dist/output.css, nạp
   TRƯỚC file này ở tra-cuu.html) — không khai báo lại ở đây để tránh 2 nguồn dữ liệu
   lệch nhau. File này chỉ bổ sung biến RIÊNG của trang tra-cứu. */
:root {
    --bg-mid: #0a1024;
    --bg-card: rgba(15, 22, 41, 0.72);
    --bg-card-solid: #0e1526;
    --bg-card-soft: rgba(20, 28, 50, 0.55);

    --accent-strong: #22d3ee;
    --accent-text: #67e8f9;

    --text-on-dark: #b9c4d6;
    --gold: #eab308;
    --success: #10b981;
    --success-dark: #059669;
    --danger: #f87171;
    --font: var(--font-ui, 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif);

    --surface-hover: rgba(255,255,255,0.035);
    --surface-soft: rgba(255,255,255,0.025);
    --autocomplete-bg: #0e1729;
}

#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;

    --text-faint: #5c6b80;
    --accent: #2563eb;
    --accent-strong: #0284c7;
    --accent-deep: #0369a1;
    --accent-text: #0369a1;

    --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;
}

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; }


.form-container { width: 100%; max-width: 1180px; margin: auto; position: relative; z-index: 5; padding-top: 67px; }
@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; max-width: 540px; font-size: 16px; }
}

.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; }

.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;
}

.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(0,0,0,.35); }

.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); }

.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(0,0,0,.5);
}
.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 base đã khai báo ở input.css — chỉ giữ override riêng tra-cứu */
select.input-field option { color: #0f172a; }
select.input-field:invalid { color: var(--text-faint) !important; }

.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 {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    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 base đã khai báo ở input.css — chỉ giữ arrow icon riêng tra-cứu */
.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, #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 #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; }

/* .modal/.modal-content base đã khai báo ở input.css — chỉ giữ override riêng */
.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-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; }

#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 {
    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;
}

#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; }

.report-grid {
    display: grid; grid-template-columns: 1fr; gap: 0;
    background: var(--bg-card-solid); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    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;
}

.report-grid > .report-card { padding-bottom: 40px; }
@media (min-width: 1024px) { .report-grid > .report-card { padding-bottom: 48px; } }

@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);

    top: 0; left: 15%; width: 70%; height: 1px;
}
@media (min-width: 1024px) {
    .report-grid > .report-card:not(:first-child)::before {

        top: 15%; left: 0; width: 1px; height: 70%;
    }
}

@media (max-width: 1023px) {
    .report-grid > .report-card:not(:first-child)::before { display: none; }
}

.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;

    color: var(--text-faint); font-size: 14px; text-align: center;
}

.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); }

@keyframes hint-char-wave {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
.wave-char { display: inline-block; }
.wave-char.wave-go { animation: hint-char-wave .32s ease-in-out; }

@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-solid); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    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 { 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-svg-wrapper svg { width: 85.68% !important; height: auto !important; }

@media (max-width: 1023px) {
    .chart-svg-wrapper svg { width: 97.25% !important; }
}

#overview-card { display: flex; flex-direction: column; min-height: 0; }

/* flex/min-height/overflow/max-height cho #properties-list được đặt ở block cuối file (dòng ~895,
   có !important) nên bỏ ở đây tránh code chết gây hiểu nhầm. Chỉ giữ các prop còn tác dụng. */
#properties-list { display: flex; flex-direction: column; gap: 2px; margin-left: -8px; margin-right: -8px; }
.ov-row {
    display: flex;

    align-items: flex-start;

    gap: 5px;

    padding: 11px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;

    transition: none;
}

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

    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: 11px; height: 11px; border-radius: 50%; margin-top: 5px; 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: 6px; height: 6px; }

.ov-label, .detail-kq-label { color: var(--text-main); font-size: 15px; font-weight: 400; line-height: 1.4; }

.ov-value, .detail-kq-value { font-size: 15px; font-weight: 600; color: var(--accent-text); line-height: 1.4; }

.ov-label { white-space: nowrap; flex-shrink: 0; }

.ov-value { margin-left: auto; text-align: right; font-weight: 500; }
.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); } }

/* scroll-margin-top: khi scrollIntoView(block:'start'), đỉnh khung dừng cách đỉnh viewport
   một khoảng = header cố định (52px) + đệm. Mobile 72px (52+20), desktop 102px (52+50).
   Nhờ vậy tiêu đề "NỘI DUNG LUẬN GIẢI" luôn hiện dưới header, không bị cắt. */
#active-detail-card { margin-top: 32px; padding-bottom: 40px; scroll-margin-top: 72px; }
@media (min-width: 1024px) { #active-detail-card { padding-bottom: 48px; scroll-margin-top: 102px; } }
.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; }
}

.detail-title { font-size: 21px; font-weight: 800; color: var(--text-main); text-transform: uppercase; letter-spacing: .3px; margin: 0 0 8px; }

.detail-result { color: var(--text-main); font-weight: 600; font-size: 16px; line-height: 1.6; margin-bottom: 14px; text-align: justify; }

@media (max-width: 640px) {
    .detail-head { flex-wrap: wrap; align-items: center; row-gap: 14px; }
    .detail-head > div { display: contents; }

    .detail-title { flex: 1; min-width: 0; margin-bottom: 0; }
    .detail-result { flex-basis: 100%; }
}

#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; }

.detail-body h1, .detail-body h2, .detail-body h3,
.detail-body h4, .detail-body h5, .detail-body h6 {
    color: var(--text-main);

    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; }

.detail-body p:has(> strong:only-child),
.detail-body p:has(> b:only-child) { margin-top: 22px; margin-bottom: 10px; line-height: 1.4; }

.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; }

.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-card {
    margin-top: 18px; padding: 14px 16px; border-radius: var(--radius-md);
    background: var(--surface-soft);

    border: 2px solid var(--border-accent);
    position: relative;
}

#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; }

#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; }

.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; }

#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(0,0,0,.4);
    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(0,0,0,.4); }
    50% { box-shadow: 0 0 0 8px rgba(0,0,0,.1), 0 8px 24px -6px rgba(0,0,0,.5); }
}
#audio-playpause.is-playing { animation: playPulse 2.2s ease-in-out infinite; }

.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: calc(100% + 8px); height: 3px;
    background: #ef4444; border-radius: 2px; box-shadow: 0 0 6px rgba(239,68,68,.7);
    transform: translate(-50%, -50%) rotate(-45deg); pointer-events: none; z-index: 2;
}
.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: 13px; font-weight: 700; letter-spacing: .3px; vertical-align: middle;
}
.audio-lock-badge svg { width: 13px; height: 13px; }

/* Text promo mời mở khóa, hiển thị trong ô "Nội dung luận giải".
   Gốc 14.5px (#payment-intro cũ): mobile +1 = 15.5px, desktop +2 = 16.5px. */
.locked-promo {
    margin: 20px 0 22px; max-width: 705px; padding: 0 20px; color: var(--text-dim);
    font-weight: 500; font-size: 14.5px; line-height: 1.6; text-align: center;
}
@media (min-width: 1024px) { .locked-promo { font-size: 15.5px; } }

#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; }

.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%; }
}

.detail-toggle-row.sweep-stopped span::after {
    animation-play-state: paused;
    opacity: 0;
}

#detail-body-wrap { display: none; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

.detail-toggle-row-bottom { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-soft); }

#action-zone { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 18px; }

#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;

    white-space: nowrap;
    min-height: 48px;
}
.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(0,0,0,.35);
    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(0,0,0,.45); }
.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(0,0,0,.35); }
.pill-btn-accent:hover { transform: translateY(-1px); }
.pill-btn-orange { background: #e65100; color: #fff; border: none; box-shadow: 0 4px 14px -4px rgba(230,81,0,.45); }
.pill-btn-orange:hover { background: #bf360c; transform: translateY(-1px); }
#action-zone .pill-btn-orange { background: #e65100; color: #fff; border: none; box-shadow: 0 4px 14px -4px rgba(230,81,0,.45); transition: none !important; transform: translateZ(0); contain: paint; }
#action-zone .pill-btn-orange:hover { background: #bf360c; color: #fff; border: none; transition: none !important; }
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

@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; }

@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;
}

#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; }

@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; }

    .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; }
}

@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; }
}

#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); }

@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; }

@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; }

    #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;
    }

    .btn-bodygraph::before {
        animation-duration: 2.5s !important; animation-iteration-count: infinite !important;
    }

    #explore-now-btn.explore-btn--reveal {
        animation-duration: 1.2s !important; animation-iteration-count: 1 !important;
    }
    .detail-toggle-row span::after {
        animation-duration: 2.4s !important; animation-iteration-count: infinite !important;
    }

    .ov-wave span {
        animation-duration: .9s !important; animation-iteration-count: infinite !important;
    }
    .wave-char.wave-go {
        animation-duration: .32s !important; animation-iteration-count: 1 !important;
    }
}

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

@media (max-width: 768px) {

    .field-icon {
        padding-left: 14px !important;
    }

    input.field-icon-pin,
    input.field-icon-person {
        background-image: none !important;
    }

    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;
    }
}

#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;
}

#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;
}

#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);
}

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;
}

.header-btn { min-height: 44px; }
.ov-row { min-height: 44px; }

@media (min-width: 1024px) and (pointer: fine) {
    .ov-row { min-height: 0; padding: 7px 8px; }
}
.audio-btn-round { min-width: 44px; min-height: 44px; }

.brand-logo { min-height: 44px; }

#audio-seek {
    padding: 20px 0;
    background-clip: content-box;
    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; }
}

.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;
    }
}

#action-zone .pill-btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #97a3ba;
    border-color: rgba(148, 163, 184, 0.6);
    transition: none !important;
    transform: translateZ(0);
    will-change: auto;
    contain: paint;
}
#action-zone .pill-btn-ghost:hover {
    color: #eef2f8;
    border-color: rgba(56, 189, 248, 0.32);
    transition: none !important;
}

#submit-btn,
#submit-partner-btn {
    width: 65% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 640px) {
    #submit-btn,
    #submit-partner-btn {
        width: 100% !important;
    }
}

#capdoi-result .report-card-title,
#chart-card .report-card-title {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.report-card-title span {
    border-bottom: none !important;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.report-card-title span::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130%;
    height: 1px;
    background: var(--border-accent);
}

