* { margin: 0; padding: 0; box-sizing: border-box; font-family: "Segoe UI", Arial, sans-serif; }

:root {
    --tsa-red: #d61f2c;
    --tsa-red-dark: #b91824;
    --tsa-blue: #173c77;
    --tsa-blue-dark: #112d59;
    --tsa-ink: #202633;
    --tsa-muted: #738092;
    --tsa-line: #eef2f6;
    --tsa-soft: #f6f8fb;
    --tsa-pending: #f1f3f6;
    --tsa-mark: #f39a18;
    --tsa-success: #43c46d;
}

body {
    background: #ffffff;
    color: var(--tsa-ink);
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tsa-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 30px 16px;
    background: #ffffff;
    border-bottom: 1px solid var(--tsa-line);
}

.logo-area {
    margin-right: 0;
}

.title-area {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
}

.tsa-main-layout {
    display: flex;
    flex: 1;
    padding: 0 0 0 32px;
    gap: 0;
    height: calc(100vh - 101px);
}

.tsa-left-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
    padding: 18px 28px 22px 0;
}

.tsa-left-pane {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0;
    overflow-y: auto;
}

.tsa-footer {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-shrink: 0;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.btn-nav {
    min-height: 52px;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    border: 1px solid transparent;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn-nav:hover {
    transform: translateY(-1px);
}

.btn-nav:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.btn-prev {
    min-width: 52px;
    background: #e9edf3;
    color: #4b5563;
}

.btn-next {
    background: var(--tsa-blue);
    color: #ffffff;
    padding: 0 22px;
}

.btn-next:hover {
    background: var(--tsa-blue-dark);
}

.current-time {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--tsa-muted);
    white-space: nowrap;
}

.current-timer-text {
    font-size: 25px;
    font-weight: 600;
    color: var(--tsa-blue);
    letter-spacing: -0.02em;
}

.tsa-right-pane {
    width: 520px;
    min-width: 520px;
    max-width: 520px;
    background: #ffffff;
    padding: 28px 24px 20px;
    border-left: 1px solid var(--tsa-line);
    display: flex;
    flex-direction: column;
}

.info-box,
.timer-box {
    margin-bottom: 22px;
}

.info-heading {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 18px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #434f60;
}

.info-value {
    font-weight: 500;
    color: #111827;
    text-align: right;
}

.timer-box {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.timer-meta {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--tsa-line);
    border-radius: 14px;
    background: #ffffff;
}

.timer-label {
    font-size: 14px;
    color: #3d4656;
}

.timer-countdown {
    font-size: 24px;
    font-weight: 600;
    color: var(--tsa-blue);
    letter-spacing: -0.03em;
}

.btn-nop-bai {
    min-width: 94px;
    border: none;
    border-radius: 14px;
    background: var(--tsa-red);
    color: #ffffff;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.btn-nop-bai:hover {
    background: var(--tsa-red-dark);
    transform: translateY(-1px);
}

.legend-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 14px;
    color: #4b5563;
}

.legend-label {
    font-weight: 600;
    margin-right: 2px;
}

.legend-item {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dot-gray {
    background: var(--tsa-pending);
    color: #707b8e;
}

.dot-blue {
    background: #2c8cff;
    color: #ffffff;
}

.dot-orange {
    background: #ffffff;
    color: #7b4a00;
    border: 2px solid var(--tsa-mark);
}

.grid-box {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.o-cau-hoi {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 999px;
    background: var(--tsa-pending);
    color: #7f8898;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.o-cau-hoi:hover {
    transform: translateY(-1px);
}

.o-cau-hoi.da-lam {
    background: #2c8cff;
    color: #ffffff;
}

.o-cau-hoi.danh-dau {
    border-color: var(--tsa-mark);
}

.o-cau-hoi.hien-tai {
    background: var(--tsa-blue-dark);
    color: #ffffff;
    border: 2px solid var(--tsa-mark);
}

.progress-box {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--tsa-line);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
    color: #374151;
    margin-bottom: 10px;
    align-items: flex-end;
}

.progress-text strong {
    font-size: 20px;
    color: #15304d;
    font-weight: 600;
}

.progress-unit {
    font-size: 15px;
    color: #4b5563;
}

.progress-bar-bg {
    height: 6px;
    background: #edf1f6;
    margin-bottom: 6px;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--tsa-red);
    transition: width 0.3s;
}

.progress-percent {
    text-align: right;
    font-size: 14px;
    color: #667085;
    margin-bottom: 18px;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #33a05b;
    font-weight: 600;
}

.connection-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--tsa-success);
    box-shadow: 0 0 0 4px rgba(67, 196, 109, 0.14);
}

.question-container {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--tsa-line);
    border-radius: 22px;
    padding: 22px 24px 26px;
    box-shadow: 0 10px 30px rgba(18, 37, 63, 0.05);
}

.question-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.question-number {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--tsa-pending);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 20px;
    color: #444f61;
    flex-shrink: 0;
}

.question-text {
    font-size: 19px;
    line-height: 1.7;
    color: #232d3d;
    flex: 1;
    margin-top: 2px;
}

.question-text img {
    max-width: 100%;
    height: auto;
}

.bookmark-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #fff6eb;
    border: none;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    color: #f39a18;
    font-size: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bookmark-btn:hover,
.bookmark-btn.active {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(243, 154, 24, 0.18);
}

.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-left: 56px;
    margin-top: 8px;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: color 0.18s ease;
    font-size: 17px;
    line-height: 1.6;
}

.answer-option input {
    display: none;
}

.btn-gia {
    width: 38px;
    height: 38px;
    background: #eef1f5;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    margin-top: 1px;
}

.btn-vuong {
    border-radius: 12px;
}

.answer-option input:checked + .btn-gia {
    background: #2c8cff;
    box-shadow: inset 0 0 0 8px #2c8cff, 0 0 0 6px rgba(44, 140, 255, 0.12);
}

.answer-option:has(input:checked) {
    color: #18324f;
    font-weight: 600;
}

.table-dung-sai {
    width: calc(100% - 56px);
    margin: 10px 0 0 56px;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid var(--tsa-line);
    border-radius: 18px;
    overflow: hidden;
}

.table-dung-sai th,
.table-dung-sai td {
    border: 1px solid var(--tsa-line);
    padding: 14px 12px;
    text-align: center;
    font-size: 16px;
}

.table-dung-sai th {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    background: #fbfcfe;
}

.table-dung-sai td.text-left {
    text-align: left;
    font-size: 17px;
    color: #2b3341;
    line-height: 1.55;
}

.table-dung-sai input {
    display: inline-block !important;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2c8cff;
    margin: 0 auto;
}

.table-dung-sai td:has(input:checked) {
    background-color: #eef6ff;
    transition: background-color 0.2s;
}

.input-dien-khuyet {
    border: none;
    border-bottom: 2px solid #9fc8ff;
    width: min(var(--blank-width, 120px), 100%);
    min-width: 96px;
    max-width: min(360px, 100%);
    font-size: 18px;
    font-family: inherit;
    color: #163b74;
    text-align: center;
    outline: none;
    background-color: transparent;
    padding: 4px 10px 5px;
    margin: 0 5px 3px;
    transition: width 0.12s ease, border-color 0.2s ease, background-color 0.2s ease;
    font-weight: 600;
    vertical-align: baseline;
}

.input-dien-khuyet:focus {
    border-bottom-color: #2c8cff;
}

.input-dien-khuyet.input-dung {
    border: 1px solid #34a853 !important;
    border-bottom-width: 2px !important;
    background: #e6f4ea !important;
    border-radius: 8px;
}

.input-dien-khuyet.input-sai {
    border: 1px solid #ea4335 !important;
    border-bottom-width: 2px !important;
    background: #fce8e6 !important;
    border-radius: 8px;
}

.feedback-dien-khuyet {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    padding-left: 56px;
}

.feedback-dien-khuyet .dung {
    color: #34a853;
    font-weight: 700;
}

.feedback-dien-khuyet .sai {
    color: #ea4335;
    font-weight: 700;
}

.drag-container {
    padding: 16px;
    border: 1px dashed #bfd4f4;
    background: #f8fbff;
    border-radius: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 66px;
}

.drag-item {
    padding: 10px 16px;
    background: #ffffff;
    border: 1px solid #b4c9e6;
    color: #183b74;
    border-radius: 12px;
    cursor: grab;
    font-weight: 600;
    font-family: inherit;
    user-select: none;
    font-size: 15px;
}

.drop-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 42px;
    border: 2px dashed #b9d0ee;
    background: #fff;
    border-radius: 12px;
    vertical-align: middle;
    margin: 0 5px;
    color: #15397f;
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px;
}

.drop-zone.filled {
    border: 1px solid #15397f;
    background: #eef4ff;
    border-style: solid;
}

.o-cau-hoi.cau-dung {
    background-color: #4caf50 !important;
    color: #ffffff !important;
    border: none !important;
}

.o-cau-hoi.cau-sai {
    background-color: #f44336 !important;
    color: #ffffff !important;
    border: none !important;
}

#giao-dien-ket-qua { height: 100vh; overflow-y: auto; background-color: #f4f5f7; padding: 20px 0;}
.certificate-container { max-width: 850px; margin: 0 auto; background: white; padding: 40px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.cert-top { display: flex; gap: 30px; justify-content: space-between; }
.cert-info { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.info-line { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.info-lbl { color: #333; font-weight: 500;}
.info-val { background-color: #e5e7eb; padding: 6px 15px; border-radius: 4px; font-weight: bold; color: #111; width: 55%; }
.cert-photo { width: 140px; height: 180px; background: #eee; border-radius: 4px; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; }
.cert-photo img { 
    width: 130px; /* Tăng kích thước chiều rộng */
    height: auto; 
    object-fit: contain; 
}
.cert-bottom { display: flex; gap: 40px; align-items: stretch; margin-top: 20px;}
.overall-box { background-color: #ce1f28; color: white; border-radius: 12px; padding: 30px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ob-text { font-size: 18px; margin-bottom: 20px; font-weight: bold;}
.ob-score-area { display: flex; align-items: baseline; gap: 10px; }
.ob-score { font-size: 70px; font-weight: bold; line-height: 1; }
.ob-range { font-size: 18px; font-weight: bold; }
.section-scores { flex: 1.2; display: flex; flex-direction: column; gap: 15px; justify-content: center;}
.ss-title { font-size: 16px; font-weight: bold; margin-bottom: 5px; color: #111; }
.ss-item { display: flex; align-items: center; gap: 15px; }
.ss-badge { background-color: #ce1f28; color: white; border-radius: 8px; padding: 10px 15px; display: flex; align-items: center; gap: 8px; min-width: 130px; justify-content: center; }
.ss-num { font-size: 26px; font-weight: bold; line-height: 1; }
.ss-range { font-size: 14px; }
.ss-text { font-size: 14px; color: #333; line-height: 1.4; }
.ss-text strong { color: #ce1f28; font-size: 15px; }

@media (max-width: 980px) {
    body {
        height: auto;
        overflow: auto;
    }

    .tsa-header {
        padding: 12px 16px;
        gap: 12px;
    }

    .logo-area {
        margin-right: 0;
    }

    .logo-area img {
        height: 46px !important;
    }

    .title-area {
        font-size: 16px;
        line-height: 1.35;
    }

    .tsa-main-layout {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 70px);
        padding: 18px;
        gap: 18px;
    }

    .tsa-right-pane {
        order: 1;
        min-width: 0;
        max-width: none;
        width: 100%;
        padding: 18px;
    }

    .tsa-left-wrapper {
        order: 2;
        height: auto;
        min-height: 0;
    }

    .tsa-left-pane {
        padding: 22px;
        overflow: visible;
    }

    .grid-box {
        grid-template-columns: repeat(10, minmax(28px, 1fr));
    }

    .tsa-footer {
        height: auto;
        flex-wrap: wrap;
        justify-content: space-between;
        padding-bottom: 8px;
    }

    .answers-grid,
    .feedback-dien-khuyet {
        padding-left: 0;
    }

    .cert-top,
    .cert-bottom {
        flex-direction: column;
    }

    .certificate-container {
        margin: 0 16px;
        padding: 28px 20px;
    }
}

@media (max-width: 640px) {
    .tsa-header {
        align-items: flex-start;
    }

    .title-area {
        font-size: 14px;
    }

    .tsa-main-layout {
        padding: 12px;
        gap: 12px;
    }

    .tsa-right-pane,
    .tsa-left-pane {
        border-radius: 12px;
        padding: 14px;
    }

    .timer-box {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .btn-nop-bai {
        width: 100%;
        min-height: 44px;
    }

    .grid-box {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
    }

    .o-cau-hoi {
        min-height: 40px;
        border-radius: 12px;
        aspect-ratio: auto;
    }

    .question-header {
        gap: 10px;
    }

    .question-number {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .question-text,
    .answer-option {
        font-size: 15px;
    }

    .answer-option {
        padding: 12px;
        gap: 12px;
    }

    .table-dung-sai {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .input-dien-khuyet {
        min-width: 78px;
        margin: 4px 2px;
    }

    .tsa-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
        margin: 0 -12px;
        padding: 10px 12px;
        background: rgba(244, 245, 247, 0.96);
        border-top: 1px solid #dde1e7;
    }

    .nav-buttons,
    .btn-nav {
        width: 100%;
    }

    .nav-buttons {
        display: grid;
        grid-template-columns: 0.7fr 1.3fr;
    }

    .current-time {
        width: 100%;
        justify-content: space-between;
    }

    .info-line {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .info-val {
        width: 100%;
    }

    .ob-score {
        font-size: 52px;
    }
}

/* HS shared pages: auth, ranking, history */
body.hs-auth-page,
body.hs-data-page {
    --hs-red: #ce1f28;
    --hs-red-dark: #a8171f;
    --hs-red-soft: #fff1f2;
    --hs-blue: #15397f;
    --hs-blue-soft: #eaf1ff;
    --hs-green: #1f9d55;
    --hs-ink: #20242c;
    --hs-muted: #667085;
    --hs-line: #e8e2d7;
    --hs-paper: #f7f4ec;
    --hs-card: #ffffff;
    --hs-shadow: 0 18px 45px rgba(21, 57, 127, 0.08);
    min-height: 100vh;
    height: auto;
    display: block;
    overflow: auto;
    color: var(--hs-ink);
    background: var(--hs-paper);
    position: relative;
}

body.hs-auth-page::before,
body.hs-data-page::before {
    content: "";
    position: fixed;
    inset: 80px 0 0;
    background-image: linear-gradient(180deg, rgba(247, 244, 236, 0.9), rgba(247, 244, 236, 0.94)), url("images/anhnentrungtam.png?hs_v=08375e873ff5e5546283");
    background-image: linear-gradient(180deg, rgba(247, 244, 236, 0.9), rgba(247, 244, 236, 0.94)), image-set(url("images/anhnentrungtam.webp?hs_v=e5d7036f7e61df4af964") type("image/webp"), url("images/anhnentrungtam.png?hs_v=08375e873ff5e5546283") type("image/png"));
    background-size: cover;
    background-position: center bottom;
    z-index: -1;
}

.hs-page-header {
    min-height: 74px;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(232, 226, 215, 0.9);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.hs-header-inner {
    max-width: 1240px;
    min-height: 74px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hs-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    color: var(--hs-blue);
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.hs-brand img {
    height: 54px;
    width: auto;
    display: block;
}

.hs-back-link,
.hs-header-link {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--hs-blue);
    text-decoration: none;
    font-weight: 900;
    border-radius: 8px;
    padding: 0 14px;
}

.hs-back-link {
    border-left: 1px solid var(--hs-line);
    border-radius: 0;
    padding-left: 18px;
}

.hs-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hs-header-link {
    color: #4b5563;
}

.hs-header-link.active,
.hs-header-link:hover,
.hs-back-link:hover {
    color: var(--hs-red);
    background: var(--hs-red-soft);
}

.hs-auth-main {
    max-width: 1040px;
    min-height: calc(100vh - 74px);
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1fr);
    gap: 28px;
    align-items: center;
}

.hs-auth-visual,
.hs-auth-card,
.hs-data-card,
.hs-stat-card {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(232, 226, 215, 0.95);
    border-radius: 8px;
    box-shadow: var(--hs-shadow);
}

.hs-auth-visual {
    min-height: 520px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(255, 255, 255, 0.9) 48%, rgba(234, 241, 255, 0.96)),
        url("images/anhnentrungtam.png?hs_v=08375e873ff5e5546283");
    background-image:
        linear-gradient(135deg, rgba(255, 241, 242, 0.96), rgba(255, 255, 255, 0.9) 48%, rgba(234, 241, 255, 0.96)),
        image-set(url("images/anhnentrungtam.webp?hs_v=e5d7036f7e61df4af964") type("image/webp"), url("images/anhnentrungtam.png?hs_v=08375e873ff5e5546283") type("image/png"));
    background-size: cover;
    background-position: center bottom;
}

.hs-auth-kicker,
.hs-data-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--hs-red-soft);
    color: var(--hs-red);
    font-size: 13px;
    font-weight: 900;
}

.hs-auth-visual h1 {
    margin: 22px 0 12px;
    color: var(--hs-blue);
    font-size: 38px;
    line-height: 1.15;
}

.hs-auth-visual p {
    max-width: 440px;
    color: var(--hs-muted);
    font-size: 16px;
    line-height: 1.65;
}

.hs-auth-feature-list {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.hs-auth-feature-list span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-weight: 800;
}

.hs-auth-feature-list i {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--hs-blue-soft);
    color: var(--hs-blue);
}

.hs-auth-card {
    padding: 34px;
    position: relative;
}

.hs-auth-card-header {
    text-align: center;
    margin-bottom: 24px;
}

.hs-auth-card-header img {
    height: 64px;
    margin-bottom: 12px;
}

.hs-auth-card-header h2 {
    margin: 0 0 8px;
    color: var(--hs-blue);
    font-size: 28px;
}

.hs-auth-card-header p {
    margin: 0;
    color: var(--hs-muted);
    line-height: 1.5;
}

.hs-form {
    display: grid;
    gap: 16px;
}

.hs-field {
    display: grid;
    gap: 8px;
}

.hs-field label {
    color: #334155;
    font-size: 14px;
    font-weight: 900;
}

.hs-input-wrap {
    position: relative;
}

.hs-input-wrap i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #98a2b3;
}

.hs-input-wrap input,
.hs-select {
    width: 100%;
    min-height: 50px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: var(--hs-ink);
    font-size: 15px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hs-input-wrap input {
    padding: 0 14px 0 42px;
}

.hs-select {
    padding: 0 14px;
}

.hs-input-wrap input:focus,
.hs-select:focus {
    border-color: var(--hs-blue);
    box-shadow: 0 0 0 4px rgba(21, 57, 127, 0.08);
}

.hs-primary-button,
.hs-secondary-button,
.hs-ghost-button {
    min-height: 50px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
}

.hs-primary-button {
    width: 100%;
    background: var(--hs-red);
    color: white;
    box-shadow: 0 12px 24px rgba(206, 31, 40, 0.18);
}

.hs-primary-button:hover {
    background: var(--hs-red-dark);
}

.hs-primary-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.hs-secondary-button {
    color: var(--hs-red);
    background: white;
    border-color: rgba(206, 31, 40, 0.35);
}

.hs-secondary-button:hover {
    background: var(--hs-red-soft);
}

.hs-ghost-button {
    color: var(--hs-blue);
    background: var(--hs-blue-soft);
}

.hs-auth-footer {
    margin-top: 22px;
    text-align: center;
    color: var(--hs-muted);
    line-height: 1.8;
    font-size: 14px;
}

.hs-auth-footer a {
    color: var(--hs-red);
    font-weight: 900;
    text-decoration: none;
}

.hs-auth-footer a:hover {
    text-decoration: underline;
}

.hs-loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.86);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--hs-blue);
    font-weight: 900;
}

.hs-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 4px solid #edf2f7;
    border-top-color: var(--hs-red);
    animation: hsSpin 0.8s linear infinite;
}

@keyframes hsSpin {
    to { transform: rotate(360deg); }
}

.hs-data-main {
    max-width: 1160px;
    margin: 0 auto;
    padding: 34px 24px 72px;
}

.hs-data-hero {
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
}

.hs-data-hero h1 {
    margin: 12px 0 8px;
    color: var(--hs-blue);
    font-size: 34px;
    line-height: 1.2;
}

.hs-data-hero p {
    margin: 0;
    max-width: 620px;
    color: var(--hs-muted);
    line-height: 1.6;
}

.hs-data-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hs-data-card {
    padding: 24px;
}

.hs-filter-row {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr);
    gap: 14px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hs-line);
    margin-bottom: 20px;
}

.hs-filter-row label {
    color: #334155;
    font-weight: 900;
}

.hs-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.hs-table {
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
}

.hs-table th,
.hs-table td {
    padding: 15px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f4;
}

.hs-table th {
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.hs-table th:first-child {
    border-top-left-radius: 8px;
}

.hs-table th:last-child {
    border-top-right-radius: 8px;
}

.hs-table tbody tr:hover {
    background: #fff9f2;
}

.hs-table .center {
    text-align: center;
}

.hs-rank {
    min-width: 42px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
    font-weight: 900;
}

.hs-rank.rank-1 {
    background: #fff7d6;
    color: #b7791f;
}

.hs-rank.rank-2 {
    background: #eef2f7;
    color: #667085;
}

.hs-rank.rank-3 {
    background: #fff1e6;
    color: #b45309;
}

.hs-score {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--hs-red);
    font-size: 18px;
    font-weight: 900;
}

.hs-score-badge {
    min-width: 76px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
    font-weight: 900;
    cursor: pointer;
}

.hs-score-badge.good {
    background: #ecfdf3;
    color: #027a48;
}

.hs-score-badge.avg {
    background: #fffaeb;
    color: #b54708;
}

.hs-filter-status {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--hs-blue-soft);
    color: var(--hs-blue);
    font-weight: 800;
}

.hs-filter-status a {
    color: var(--hs-red);
    font-weight: 900;
    text-decoration: none;
}

.hs-empty-row {
    padding: 34px !important;
    text-align: center !important;
    color: var(--hs-muted);
}

@media (max-width: 860px) {
    .hs-header-inner,
    .hs-auth-main,
    .hs-data-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hs-auth-main {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 24px;
    }

    .hs-auth-visual {
        min-height: 0;
    }

    .hs-data-hero,
    .hs-filter-row {
        grid-template-columns: 1fr;
    }

    .hs-data-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .hs-header-inner {
        min-height: 68px;
        gap: 10px;
    }

    .hs-brand img {
        height: 46px;
    }

    .hs-back-link {
        font-size: 14px;
        padding-left: 12px;
    }

    .hs-header-actions {
        display: none;
    }

    .hs-auth-main {
        padding-top: 18px;
        padding-bottom: 28px;
    }

    .hs-auth-visual {
        display: none;
    }

    .hs-auth-card,
    .hs-data-card {
        padding: 20px;
    }

    .hs-auth-card-header h2,
    .hs-data-hero h1 {
        font-size: 26px;
    }

    .hs-data-main {
        padding-top: 22px;
    }
}
