* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }
body { background-color: #f4f5f7; color: #333; min-height: 100vh; height: 100vh; display: flex; flex-direction: column; overflow: hidden;}

.tsa-header { display: flex; align-items: center; padding: 15px 30px; background-color: white; border-bottom: 2px solid #eaeaea; }
.logo-area { margin-right: 20px; }
.title-area { font-size: 18px; font-weight: bold; color: #333;}
.tsa-main-layout { display: flex; flex: 1; padding: 25px 30px; gap: 30px; height: calc(100vh - 75px);}

.tsa-left-wrapper { flex: 7.5; display: flex; flex-direction: column; gap: 20px; height: 100%;}
.tsa-left-pane { flex: 1; background-color: white; border-radius: 8px; border: 1px solid #e0e0e0; padding: 30px; overflow-y: auto;}
.tsa-footer { height: 50px; display: flex; align-items: center; gap: 30px; flex-shrink: 0;}
.nav-buttons { display: flex; gap: 10px; }
.btn-nav { border: 1px solid #ccc; border-radius: 4px; padding: 10px 20px; font-weight: bold; cursor: pointer; font-size: 14px;}
.btn-prev { background-color: #f8f9fa; color: #777;}
.btn-next { background-color: #15397f; color: white; padding: 10px 30px; border: none;}
.btn-next:hover { background-color: #0e2a63; }
.current-time { font-size: 14px; color: #555; display: flex; align-items: center; gap: 15px;}
.current-timer-text { font-size: 20px; font-weight: bold; color: #15397f;}

.tsa-right-pane { flex: 2.5; min-width: 380px; max-width: 460px; background-color: #ffffff; padding: 25px; border-radius: 8px; border: 1px solid #e0e0e0; display: flex; flex-direction: column;}
.info-box, .timer-box { margin-bottom: 20px;}
.info-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 14px;}
.info-label { font-weight: bold; font-size: 16px; color: #333; margin-bottom: 10px; display: block;}
.timer-box { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd;}
.timer-countdown { font-size: 26px; font-weight: bold; color: #15397f;}
.btn-nop-bai { background-color: #cc0000; color: white; border: none; padding: 10px 20px; border-radius: 4px; font-weight: bold; cursor: pointer; font-size: 15px;}
.legend-box { display: flex; align-items: center; gap: 15px; font-size: 14px; margin-bottom: 20px; flex-wrap: wrap;}
.legend-item { display: flex; align-items: center; gap: 6px; color: #555;}
.legend-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;}
.dot-gray { background-color: #d1d5db; border: none; }
.dot-blue { background-color: #15397f; border: none; }
.dot-orange { background-color: #d1d5db; border: 2px solid #ff9800; }

.grid-box { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; margin-bottom: 20px;}
.o-cau-hoi { width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; background-color: #f0f0f0; color: #666; border: 1px solid #ddd; font-weight: bold; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 13px;}
.o-cau-hoi.da-lam { background-color: #15397f; color: white; border: none;}
.o-cau-hoi.danh-dau { border: 2px solid #ff9800 !important; }
.o-cau-hoi.da-lam.danh-dau { border: 2px solid #ff9800 !important; }
.progress-box { margin-top: auto; padding-top: 20px; border-top: 1px solid #ddd;}
.progress-text { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; align-items: flex-end;}
.progress-text span:last-child { font-size: 20px; font-weight: bold; color: #333;}
.progress-bar-bg { height: 4px; background-color: #e0e0e0; margin-bottom: 5px; border-radius: 2px; overflow: hidden;}
.progress-bar-fill { height: 100%; background-color: #cc0000; transition: width 0.3s;}
.progress-percent { text-align: right; font-size: 12px; color: #666; margin-bottom: 20px;}

.question-container { position: relative; }
.question-header { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.question-number { width: 40px; height: 40px; border-radius: 50%; background-color: #e0e0e0; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 16px; color: #555; flex-shrink: 0;}
.question-text { font-size: 16px; line-height: 1.6; color: #333; flex: 1; margin-top: 8px;}
.bookmark-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: #ffffff; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0; cursor: pointer; color: #98a2b3; font-size: 22px; transition: color 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s;}
.bookmark-btn:hover { color: #ff9800; border-color: #ff9800; background-color: #fff8ed; box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.12); }
.bookmark-btn.active { color: #ff9800; background-color: #fff3e0; border-color: #ff9800; }
.answers-grid { display: flex; flex-direction: column; gap: 15px; padding-left: 55px; margin-top: 20px;}
.answer-option { display: flex; align-items: flex-start; gap: 15px; cursor: pointer; padding: 15px; background-color: #fcfcfc; border: 1px solid #e0e0e0; border-radius: 8px; transition: 0.2s; font-size: 16px;}
.answer-option input { display: none; }
.btn-gia { width: 22px; height: 22px; background-color: #e0e0e0; display: inline-block; flex-shrink: 0; transition: 0.2s; margin-top: 2px;}
.btn-tron { border-radius: 50%; }
.btn-vuong { border-radius: 4px; }
.answer-option input:checked + .btn-gia { background-color: #15397f; }

.table-dung-sai { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; }
.table-dung-sai th, .table-dung-sai td { border: 1px solid #e0e0e0; padding: 15px; text-align: center; }
.table-dung-sai td.text-left { text-align: left; font-size: 16px; color: #333; line-height: 1.5; }
/* --- SỬA LỖI BẢNG ĐÚNG/SAI --- */
.table-dung-sai input { 
    display: inline-block !important; /* Ép hiển thị nút chọn */
    width: 22px; 
    height: 22px; 
    cursor: pointer; 
    accent-color: #15397f; /* Màu xanh đồng bộ hệ thống */
    margin: 0 auto;
}

/* Đổi màu nền của ô khi học sinh tích chọn để dễ nhìn hơn */
.table-dung-sai td:has(input:checked) {
    background-color: #e8f0fe;
    transition: 0.2s;
}
.input-dien-khuyet { border: none; border-bottom: 1px solid #64b5f6; width: min(var(--blank-width, 120px), 100%); min-width: 96px; max-width: min(360px, 100%); font-size: 16px; font-family: inherit; color: #15397f; text-align: left; outline: none; background-color: transparent; padding: 2px 10px; margin: 0 5px 3px; transition: width 0.12s ease, border-color 0.2s ease, background-color 0.2s ease; font-weight: bold; vertical-align: baseline;}
.input-dien-khuyet:focus { border-bottom: 2px solid #15397f; }
.input-dien-khuyet.input-dung { border: 1px solid #34a853 !important; border-bottom-width: 2px !important; background: #e6f4ea !important; border-radius: 4px; }
.input-dien-khuyet.input-sai { border: 1px solid #ea4335 !important; border-bottom-width: 2px !important; background: #fce8e6 !important; border-radius: 4px; }
.feedback-dien-khuyet { margin-top: 12px; font-size: 14px; line-height: 1.6; padding-left: 55px; }
.feedback-dien-khuyet .dung { color: #34a853; font-weight: bold; }
.feedback-dien-khuyet .sai { color: #ea4335; font-weight: bold; }
.drag-container { padding: 15px; border: 1px solid #bbdefb; background-color: #f8fbfd; border-radius: 8px; display: flex; gap: 10px; flex-wrap: wrap; min-height: 66px;}
.drag-item { padding: 8px 15px; background-color: white; border: 1px solid #15397f; color: #15397f; border-radius: 4px; cursor: grab; font-weight: bold; font-family: inherit; user-select: none; font-size: 15px;}
.drop-zone { display: inline-flex; align-items: center; justify-content: center; min-width: 80px; height: 38px; border: 2px dashed #90caf9; background-color: #fff; border-radius: 4px; vertical-align: middle; margin: 0 5px; color: #15397f; font-weight: bold; cursor: pointer; padding: 0 10px;}
.drop-zone.filled { border: 1px solid #15397f; background-color: #e8eaf6; border-style: solid; }

.o-cau-hoi.cau-dung { background-color: #4caf50 !important; color: white !important; border: none !important; }
.o-cau-hoi.cau-sai { background-color: #f44336 !important; color: white !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; }
/* --- LÀM NỔI BẬT ĐÁP ÁN TRẮC NGHIỆM KHI ĐƯỢC CHỌN --- */
/* Đổi màu nền và viền của cả khối đáp án */
.answer-option:has(input:checked) {
    background-color: #e8f0fe;
    border-color: #15397f;
}

/* Làm in đậm chữ của đáp án được chọn */
.answer-option:has(input:checked) div {
    color: #15397f;
    font-weight: bold;
}

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