:root {
    --student-blue: #0b5bd3;
    --student-blue-dark: #073f9e;
    --student-blue-soft: #eaf3ff;
    --student-ink: #0f172a;
    --student-muted: #64748b;
    --student-line: #dbe7f5;
    --student-bg: #f5f9ff;
    --student-card: #ffffff;
    --student-green: #16a34a;
    --student-orange: #f59e0b;
    --student-red: #ef4444;
    --student-purple: #7c3aed;
    --student-shadow: 0 16px 42px rgba(15, 23, 42, .10);
    --student-soft-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}

body {
    background: radial-gradient(circle at 12% 10%, #e6f2ff 0, rgba(230, 242, 255, 0) 34%), var(--student-bg);
    color: var(--student-ink);
}

.student-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
}

.student-topbar {
    background: linear-gradient(120deg, var(--student-blue-dark), var(--student-blue));
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .18);
}

.topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    min-width: 260px;
}

.topbar-brand strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.15;
}

.topbar-brand small {
    display: block;
    color: rgba(255,255,255,.80);
    margin-top: 2px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 14px;
    font-size: 1.45rem;
}

.topbar-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 1;
}

.topbar-nav a,
.topbar-user {
    color: rgba(255,255,255,.92);
    text-decoration: none;
    border-radius: 14px;
    padding: 10px 12px;
    line-height: 1;
    white-space: nowrap;
}

.topbar-nav a:hover,
.topbar-nav a.active {
    background: rgba(255,255,255,.14);
    color: #fff;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid rgba(255,255,255,.20);
    margin-left: 4px;
    padding-left: 18px;
}

.topbar-user strong,
.topbar-user small {
    display: block;
}

.topbar-user small {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255,255,255,.75);
    font-size: .78rem;
    margin-top: 3px;
}

.avatar-dot {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
}

.logout-link {
    border: 1px solid rgba(255,255,255,.22);
}

.mobile-nav-toggle {
    display: none;
    color: #fff;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 12px;
    padding: 8px 12px;
}

.student-home,
.login-home {
    padding: 22px 0 34px;
}

.student-alert {
    border-radius: 16px;
    padding: 13px 16px;
    margin: 0 0 16px;
    border: 1px solid var(--student-line);
    background: #fff;
    box-shadow: var(--student-soft-shadow);
}

.student-alert.error { border-color: #fecaca; background: #fff1f2; color: #991b1b; }
.student-alert.warning { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.student-alert.success { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.student-alert.info { border-color: #bfdbfe; background: #eff6ff; color: #1e40af; }

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 18px;
    margin-bottom: 18px;
}

.hero-card,
.dashboard-card,
.login-hero-card {
    background: var(--student-card);
    border: 1px solid rgba(219, 231, 245, .95);
    border-radius: 24px;
    box-shadow: var(--student-soft-shadow);
}

.hero-main-card {
    min-height: 320px;
    padding: 34px;
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f6fbff 70%, #eaf4ff 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--student-blue);
    background: var(--student-blue-soft);
    border: 1px solid #cfe3ff;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.hero-copy h1,
.login-copy h1 {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: 0 0 16px;
    color: #071a49;
}

.hero-copy p,
.login-copy p {
    color: #475569;
    line-height: 1.75;
    font-size: 1.02rem;
    max-width: 720px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 18px;
}

.btn-primary-dashboard,
.btn-secondary-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-primary-dashboard {
    color: #fff;
    background: linear-gradient(135deg, var(--student-blue), #064ac2);
    box-shadow: 0 12px 24px rgba(11, 91, 211, .24);
}

.btn-primary-dashboard:hover { color: #fff; transform: translateY(-1px); }

.btn-secondary-dashboard {
    color: var(--student-blue);
    background: #fff;
    border-color: #cfe0f5;
}

.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 650px;
    background: rgba(239, 246, 255, .9);
    border: 1px solid #cfe3ff;
    border-radius: 16px;
    padding: 13px 15px;
}

.privacy-note span {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #dbeafe;
}

.privacy-note p { margin: 0; font-size: .94rem; line-height: 1.55; }

.hero-illustration {
    display: grid;
    place-items: center;
    min-height: 230px;
}

.screen-art {
    width: min(260px, 100%);
    height: 176px;
    border-radius: 24px;
    border: 10px solid #1d4ed8;
    background: linear-gradient(180deg, #fff, #eaf4ff);
    position: relative;
    box-shadow: 0 22px 42px rgba(29, 78, 216, .20);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding-bottom: 28px;
}

.screen-art:after {
    content: '';
    position: absolute;
    left: 35%;
    right: 35%;
    bottom: -24px;
    height: 10px;
    border-radius: 99px;
    background: #1d4ed8;
}

.screen-art .bar {
    width: 18px;
    border-radius: 8px 8px 0 0;
    background: #93c5fd;
}
.screen-art .b1 { height: 34px; }
.screen-art .b2 { height: 58px; }
.screen-art .b3 { height: 78px; }
.screen-art .b4 { height: 104px; background: #2563eb; }
.lock-art {
    position: absolute;
    right: -28px;
    bottom: 22px;
    width: 68px;
    height: 68px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: #0b5bd3;
    color: #fff;
    box-shadow: 0 14px 30px rgba(11, 91, 211, .30);
    font-size: 1.6rem;
}

.status-card {
    padding: 24px;
}

.card-heading,
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-heading h2,
.dashboard-card h2,
.section-title-row h2 {
    font-size: 1.12rem;
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.status-pill,
.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .8rem;
    font-weight: 800;
}
.status-pill.success,
.status-badge.success { background: #dcfce7; color: #15803d; }
.status-badge.warning { background: #ffedd5; color: #c2410c; }
.status-badge.muted { background: #f1f5f9; color: #64748b; }
.status-badge.info { background: #dbeafe; color: #1d4ed8; }

.status-timeline {
    display: grid;
    gap: 10px;
}

.status-row {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 0;
    border-bottom: 1px solid #eef4fb;
}
.status-row:last-child { border-bottom: 0; }
.status-row > span {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 900;
}
.status-row strong { display: block; font-size: .96rem; }
.status-row small { display: block; color: var(--student-muted); margin-top: 3px; line-height: 1.45; }
.status-row.done > span { background: #dcfce7; color: #15803d; }
.status-row.warning > span { background: #ffedd5; color: #c2410c; }
.status-row.info > span { background: #dbeafe; color: #1d4ed8; }
.status-row.muted > span { background: #f1f5f9; color: #64748b; }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px;
}
.summary-grid div {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    background: #fbfdff;
}
.summary-grid span,
.summary-grid strong,
.summary-grid small { display: block; }
.summary-grid strong { font-size: 1.05rem; margin-top: 4px; color: #0b5bd3; }
.summary-grid small { color: var(--student-muted); margin-top: 2px; font-size: .76rem; }

.dashboard-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}
.three-columns { grid-template-columns: 1.08fr .92fr .92fr; }
.two-columns { grid-template-columns: 1fr 1fr; }

.dashboard-card {
    padding: 22px;
}

.section-title-row a,
.section-title-row span {
    font-size: .86rem;
    color: var(--student-blue);
    text-decoration: none;
    font-weight: 700;
}

.notice-list,
.course-status-list {
    display: grid;
    gap: 10px;
}
.notice-item,
.course-status-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fbfdff;
    border: 1px solid #edf3fb;
}
.notice-icon,
.course-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: grid;
    place-items: center;
}
.notice-icon.blue { background: #dbeafe; }
.notice-icon.orange { background: #ffedd5; }
.notice-icon.green { background: #dcfce7; }
.notice-icon.purple { background: #ede9fe; }
.notice-item strong,
.course-status-item strong { display: block; font-size: .92rem; }
.notice-item p,
.course-status-item small { margin: 3px 0 0; color: var(--student-muted); font-size: .82rem; line-height: 1.45; }
.notice-item time { color: var(--student-muted); font-size: .78rem; white-space: nowrap; }

.process-card { overflow: hidden; }
.process-steps {
    display: grid;
    grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr;
    gap: 8px;
    align-items: start;
}
.process-step {
    text-align: center;
}
.process-step > span {
    width: 58px;
    height: 58px;
    margin: 0 auto 9px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: #f2f7ff;
    border: 1px solid #dbeafe;
    color: var(--student-blue);
    font-weight: 900;
    font-size: 1.25rem;
}
.process-step strong { display: block; font-size: .84rem; color: #0f172a; }
.process-step p { margin: 6px 0 0; color: var(--student-muted); font-size: .76rem; line-height: 1.35; }
.process-arrow { color: #94a3b8; font-size: 1.3rem; padding-top: 20px; }

.course-status-item { grid-template-columns: 42px 1fr auto; }
.empty-state-mini {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--student-muted);
    background: #f8fafc;
}

.products-band,
.resources-band { margin-bottom: 18px; }
.product-grid-home {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.product-card-home {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px;
    background: #fbfdff;
}
.product-card-home img,
.product-icon-fallback {
    width: 86px;
    height: 74px;
    object-fit: cover;
    border-radius: 14px;
    background: #eaf3ff;
}
.product-icon-fallback {
    display: grid;
    place-items: center;
    font-size: 2rem;
}
.product-card-home h3 { font-size: .95rem; margin: 0 0 4px; color: #0b5bd3; }
.product-card-home p { margin: 0 0 8px; color: var(--student-muted); font-size: .82rem; line-height: 1.35; }
.product-card-home a {
    display: inline-flex;
    text-decoration: none;
    color: #fff;
    background: var(--student-blue);
    padding: 7px 11px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 800;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.resource-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    background: #fbfdff;
}
.resource-card > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #eaf3ff;
}
.resource-card strong { display: block; font-size: .92rem; }
.resource-card small { display: block; color: var(--student-muted); margin-top: 3px; line-height: 1.35; }
.resource-card em { font-size: 1.5rem; color: #94a3b8; font-style: normal; }

.security-card ul {
    margin: 12px 0 0;
    padding-left: 20px;
    color: #334155;
    line-height: 1.75;
}
.contact-card dl {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 9px 12px;
    margin: 12px 0 0;
}
.contact-card dt { color: var(--student-muted); }
.contact-card dd { margin: 0; font-weight: 700; }

.login-topbar { position: relative; }
.login-only-nav { flex: 0 0 auto; }
.login-home { min-height: calc(100vh - 76px); }
.login-hero-card {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 28px;
    padding: 42px;
    background: linear-gradient(135deg, #fff 0%, #f6fbff 62%, #eaf4ff 100%);
    margin-bottom: 18px;
}
.google-login-main { font-size: 1rem; margin-top: 10px; }
.login-note { margin-top: 20px; }
.login-status-preview {
    background: rgba(255,255,255,.78);
    border: 1px solid #dbeafe;
    border-radius: 22px;
    padding: 22px;
}
.login-info-row .dashboard-card p {
    color: var(--student-muted);
    line-height: 1.65;
    margin-bottom: 0;
}

@media (max-width: 1180px) {
    .dashboard-hero,
    .three-columns,
    .two-columns,
    .login-hero-card {
        grid-template-columns: 1fr;
    }
    .product-grid-home,
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-main-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .student-shell { width: min(100% - 24px, 1440px); }
    .topbar-inner { min-height: 68px; }
    .topbar-brand { min-width: 0; }
    .topbar-brand strong { font-size: 1rem; }
    .topbar-brand small { font-size: .75rem; }
    .mobile-nav-toggle { display: inline-flex; }
    .topbar-nav {
        display: none;
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        background: #0b4fbd;
        padding: 10px;
        border-radius: 18px;
        box-shadow: var(--student-shadow);
        align-items: stretch;
        flex-direction: column;
    }
    .topbar-nav.open { display: flex; }
    .topbar-user { border-left: 0; margin-left: 0; padding-left: 12px; }
    .hero-main-card,
    .status-card,
    .dashboard-card,
    .login-hero-card { border-radius: 18px; padding: 18px; }
    .hero-copy h1,
    .login-copy h1 { font-size: 2rem; }
    .process-steps { grid-template-columns: 1fr; }
    .process-arrow { display: none; }
    .summary-grid,
    .product-grid-home,
    .resource-grid { grid-template-columns: 1fr; }
    .notice-item,
    .course-status-item { grid-template-columns: 42px 1fr; }
    .notice-item time,
    .course-status-item em { grid-column: 2; justify-self: start; }
    .product-card-home { grid-template-columns: 72px 1fr; }
    .product-card-home img,
    .product-icon-fallback { width: 72px; height: 66px; }
    .contact-card dl { grid-template-columns: 1fr; }
}

/* ===== Scores page: đồng bộ dashboard template ===== */
.score-dashboard-page {
    padding-bottom: 42px;
}

.score-hero-card {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    margin-bottom: 18px;
}

.score-hero-main,
.score-profile-card,
.score-summary-tile {
    background: var(--student-card);
    border: 1px solid rgba(219, 231, 245, .95);
    border-radius: 24px;
    box-shadow: var(--student-soft-shadow);
}

.score-hero-main {
    min-height: 260px;
    padding: 34px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 88% 32%, rgba(59, 130, 246, .16), rgba(59, 130, 246, 0) 28%),
        linear-gradient(135deg, #ffffff 0%, #f7fbff 68%, #eaf4ff 100%);
}

.score-hero-main:after {
    content: '▥';
    position: absolute;
    right: 34px;
    bottom: 20px;
    width: 118px;
    height: 118px;
    display: grid;
    place-items: center;
    border-radius: 36px;
    color: rgba(11, 91, 211, .16);
    background: rgba(219, 234, 254, .52);
    font-size: 4.8rem;
    font-weight: 900;
}

.score-hero-main h1 {
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.06;
    letter-spacing: -.04em;
    margin: 0 0 14px;
    color: #071a49;
    max-width: 760px;
}

.score-hero-main > p {
    max-width: 720px;
    color: #475569;
    line-height: 1.75;
    font-size: 1.02rem;
    margin: 0 0 20px;
}

.score-privacy-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 720px;
    background: rgba(239, 246, 255, .92);
    border: 1px solid #cfe3ff;
    border-radius: 16px;
    padding: 13px 15px;
    position: relative;
    z-index: 1;
}

.score-privacy-strip span {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dbeafe;
}

.score-privacy-strip p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
    font-size: .94rem;
}

.score-profile-card {
    padding: 24px;
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-content: start;
}

.profile-avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #dbeafe, #eef6ff);
    color: var(--student-blue);
    font-size: 1.55rem;
}

.score-profile-card h2 {
    margin: 4px 0 8px;
    color: #0f172a;
    font-size: 1.35rem;
}

.score-profile-card p {
    margin: 4px 0;
    color: #475569;
}

.compact-tags {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.score-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.score-summary-tile {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    background: #fbfdff;
}

.score-summary-tile > span {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #eaf3ff;
    color: var(--student-blue);
    font-size: 1.35rem;
}

.score-summary-tile strong,
.score-summary-tile small {
    display: block;
}

.score-summary-tile strong {
    color: #0f172a;
    font-size: 1.12rem;
    line-height: 1.2;
}

.score-summary-tile small {
    color: var(--student-muted);
    margin-top: 3px;
    line-height: 1.35;
}

.score-empty-state {
    text-align: center;
    padding: 42px 24px;
    margin-bottom: 18px;
}

.empty-icon-large {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 24px;
    background: #eaf3ff;
    font-size: 2rem;
}

.score-empty-state h2 {
    font-size: 1.55rem;
    margin: 0 0 10px;
}

.score-empty-state p {
    color: var(--student-muted);
    max-width: 720px;
    margin: 0 auto 20px;
    line-height: 1.7;
}

.empty-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.score-sheet-list {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.score-sheet-panel {
    overflow: hidden;
}

.score-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef4fb;
}

.score-sheet-header h2 {
    font-size: 1.35rem;
    margin: 3px 0 7px;
    color: #0f172a;
}

.modern-final-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.modern-final-box {
    min-width: 132px;
    border-radius: 18px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border: 1px solid #bfdbfe;
    text-align: right;
    box-shadow: 0 8px 20px rgba(11, 91, 211, .08);
}

.modern-final-box small {
    display: block;
    color: #475569;
    font-weight: 800;
    margin-bottom: 4px;
}

.modern-final-box strong {
    display: block;
    color: var(--student-blue);
    font-size: 1.85rem;
    line-height: 1;
}

.score-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dbe7f5;
    border-radius: 18px;
    background: #fff;
}

.score-template-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.score-template-table th,
.score-template-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf3fb;
    vertical-align: top;
    text-align: left;
}

.score-template-table th {
    color: #334155;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    background: #f8fbff;
}

.score-template-table tr:last-child td {
    border-bottom: 0;
}

.score-template-table tbody tr:hover {
    background: #fbfdff;
}

.score-template-table tbody tr.is-final-row {
    background: linear-gradient(90deg, #eff6ff, #ffffff);
}

.score-template-table td strong {
    color: #0f172a;
}

.score-cell-value {
    color: #0b5bd3;
    font-weight: 900;
    font-size: 1.04rem;
    white-space: nowrap;
}

.score-note-cell {
    color: #475569;
    line-height: 1.55;
}

.score-footnote {
    margin: 12px 0 0;
    color: var(--student-muted);
    font-size: .9rem;
    line-height: 1.55;
}

.score-mobile-list {
    display: none;
}

.legacy-score-list {
    display: grid;
    gap: 10px;
}

.legacy-score-item {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fbfdff;
    overflow: hidden;
}

.legacy-score-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.legacy-score-item summary::-webkit-details-marker {
    display: none;
}

.legacy-score-item summary span {
    font-weight: 800;
    color: #0f172a;
}

.legacy-score-item summary strong {
    color: #0b5bd3;
    font-size: 1.12rem;
}

.score-comment {
    margin: 0 16px 12px;
    color: #475569;
    line-height: 1.55;
}

.small-detail-table {
    margin: 0 14px 14px;
}

.small-detail-table .score-template-table {
    min-width: 620px;
}

.score-bottom-grid {
    margin-top: 4px;
}

@media (max-width: 1180px) {
    .score-hero-card,
    .score-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .score-hero-main,
    .score-profile-card {
        border-radius: 18px;
        padding: 18px;
    }

    .score-hero-main:after {
        display: none;
    }

    .score-profile-card {
        grid-template-columns: 48px 1fr;
    }

    .profile-avatar {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .score-sheet-header {
        flex-direction: column;
    }

    .modern-final-stack {
        justify-content: flex-start;
        width: 100%;
    }

    .modern-final-box {
        text-align: left;
        flex: 1 1 150px;
    }

    .score-table-wrap {
        display: none;
    }

    .score-mobile-list {
        display: grid;
        gap: 10px;
    }

    .score-mobile-item {
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        background: #fbfdff;
        padding: 13px;
    }

    .score-mobile-item.is-final {
        border-color: #bfdbfe;
        background: #eff6ff;
    }

    .score-mobile-item > div {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        justify-content: space-between;
    }

    .score-mobile-item strong {
        color: #0f172a;
    }

    .score-mobile-item em {
        display: block;
        margin-top: 9px;
        color: #0b5bd3;
        font-style: normal;
        font-size: 1.35rem;
        font-weight: 900;
    }

    .score-mobile-item p {
        margin: 8px 0 0;
        color: #475569;
        line-height: 1.55;
    }

    .small-detail-table {
        display: block;
        overflow-x: auto;
    }
}

/* ===== Scores page v2: polished personal grade dashboard ===== */
.score-v2-page {
    min-height: calc(100vh - 76px);
    padding: 0 0 42px;
    background:
        radial-gradient(circle at 12% 4%, rgba(191, 219, 254, .45), transparent 28%),
        radial-gradient(circle at 90% 12%, rgba(147, 197, 253, .28), transparent 30%),
        linear-gradient(180deg, #f3f8ff 0%, #f8fbff 48%, #ffffff 100%);
}

.score-v2-page .student-shell {
    width: min(1460px, calc(100% - 56px));
}

.score-v2-topbar .topbar-nav a.active {
    background: rgba(255,255,255,.18);
    box-shadow: inset 0 -3px 0 rgba(255,255,255,.75);
}

.score-v2-alert {
    margin: 18px 0 0;
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.score-v2-hero {
    margin: 0 -28px 22px;
    padding: 42px 28px 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: center;
    background:
        linear-gradient(110deg, rgba(255,255,255,.96), rgba(239,246,255,.94) 64%, rgba(219,234,254,.7));
    border-bottom: 1px solid rgba(191, 219, 254, .7);
    position: relative;
    overflow: hidden;
}

.score-v2-hero:before {
    content: '';
    position: absolute;
    inset: auto 70px 28px auto;
    width: 420px;
    height: 220px;
    background: radial-gradient(circle, rgba(37, 99, 235, .08), transparent 68%);
    pointer-events: none;
}

.score-v2-badge,
.score-v2-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0b5bd3;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .08em;
    font-weight: 900;
}

.score-v2-badge {
    padding: 9px 14px;
    border-radius: 999px;
    background: #eaf3ff;
    border: 1px solid #bfdbfe;
    margin-bottom: 14px;
}

.score-v2-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 4vw, 3.25rem);
    line-height: 1.04;
    color: #06133d;
    letter-spacing: -.045em;
}

.score-v2-hero p {
    margin: 0;
    max-width: 760px;
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.75;
}

.score-v2-privacy-line {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 15px;
    border-radius: 16px;
    background: rgba(255,255,255,.78);
    border: 1px solid #dbeafe;
    color: #1e3a8a;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.score-v2-privacy-line em {
    font-style: normal;
    color: #64748b;
}

.score-v2-illustration {
    position: relative;
    height: 230px;
}

.score-v2-illustration:before {
    content: '';
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 30px;
    height: 12px;
    border-radius: 999px;
    background: rgba(30, 64, 175, .12);
    filter: blur(1px);
}

.score-v2-illustration .chart-bar {
    position: absolute;
    bottom: 54px;
    width: 44px;
    border-radius: 14px 14px 7px 7px;
    background: linear-gradient(180deg, #93c5fd, #1d4ed8);
    box-shadow: 0 18px 26px rgba(37, 99, 235, .22);
}

.score-v2-illustration .b1 { left: 60px; height: 72px; }
.score-v2-illustration .b2 { left: 118px; height: 108px; }
.score-v2-illustration .b3 { left: 176px; height: 148px; }

.score-v2-illustration .grad-cap {
    position: absolute;
    right: 44px;
    bottom: 45px;
    font-size: 5.2rem;
    filter: drop-shadow(0 18px 18px rgba(30, 64, 175, .20));
}

.score-v2-illustration .sheet-icon {
    position: absolute;
    right: 28px;
    top: 22px;
    width: 96px;
    height: 126px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    color: rgba(30, 64, 175, .34);
    background: rgba(255,255,255,.52);
    border: 1px solid rgba(147, 197, 253, .5);
    font-size: 4.3rem;
    transform: rotate(3deg);
}

.score-v2-summary-grid {
    display: grid;
    grid-template-columns: 1.35fr .9fr 1fr 1fr;
    gap: 18px;
    margin-bottom: 20px;
}

.score-v2-summary-card,
.score-v2-main-card,
.score-v2-empty-card {
    background: #fff;
    border: 1px solid rgba(219, 231, 245, .95);
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}

.score-v2-summary-card {
    min-height: 158px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.score-v2-summary-card.identity-card {
    border-left: 5px solid #0b5bd3;
}

.score-v2-round-icon {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 1.6rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}

.score-v2-round-icon.blue { background: linear-gradient(135deg, #dbeafe, #1d4ed8); color: #fff; }
.score-v2-round-icon.green { background: linear-gradient(135deg, #dcfce7, #16a34a); color: #fff; }
.score-v2-round-icon.gold { background: linear-gradient(135deg, #fef3c7, #d97706); color: #fff; }

.score-v2-summary-card h2 {
    margin: 5px 0 8px;
    font-size: 1.32rem;
    color: #0f172a;
}

.score-v2-summary-card p {
    margin: 4px 0;
    color: #334155;
    line-height: 1.55;
}

.score-v2-class-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #0b5bd3;
    font-weight: 900;
    font-size: .88rem;
}

.stat-card {
    justify-content: center;
    text-align: center;
    flex-direction: column;
}

.stat-card .score-v2-round-icon { margin-bottom: 4px; }
.score-v2-stat { display: block; font-size: 2rem; color: #0f172a; line-height: 1; margin: 8px 0 4px; }
.score-v2-date { display: block; font-size: 1.3rem; color: #0f172a; line-height: 1.35; margin-top: 8px; }
.stat-card small { color: #334155; }
.blue-soft { background: linear-gradient(135deg, #ffffff, #f1f7ff); }
.green-soft { background: linear-gradient(135deg, #ffffff, #f0fdf4); }
.gold-soft { background: linear-gradient(135deg, #ffffff, #fffbeb); }

.score-muted { color: #64748b; }

.score-v2-main-card {
    padding: 26px;
    margin-bottom: 18px;
}

.score-v2-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    color: #0b5bd3;
}

.score-v2-section-title span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eaf3ff;
    border: 1px solid #bfdbfe;
}

.score-v2-section-title h2 { margin: 0; font-size: 1.45rem; color: #0b5bd3; }
.score-v2-sheet-list { display: grid; gap: 18px; }

.score-v2-sheet-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid #cfe3ff;
    background: linear-gradient(180deg, #fbfdff, #ffffff);
}

.score-v2-sheet-head {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
    align-items: start;
    margin-bottom: 18px;
}

.score-v2-course-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe, #0b5bd3);
    color: #fff;
    font-size: 1.6rem;
}

.score-v2-course-info h3 {
    margin: 2px 0 7px;
    font-size: 1.28rem;
    color: #0f172a;
}

.score-v2-course-info p {
    margin: 4px 0;
    color: #64748b;
    line-height: 1.5;
}

.score-v2-updated { color: #475569 !important; }

.score-v2-final-box {
    min-width: 136px;
    padding: 14px 16px;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #0b5bd3, #073f9e);
    box-shadow: 0 16px 28px rgba(11, 91, 211, .22);
}

.score-v2-final-box small {
    display: block;
    font-weight: 800;
    opacity: .92;
    margin-bottom: 4px;
}

.score-v2-final-box strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.score-v2-final-box.small-only strong { font-size: 1.1rem; }

.score-v2-table-wrap {
    overflow-x: auto;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #fff;
}

.score-v2-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

.score-v2-table th,
.score-v2-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf4ff;
    vertical-align: top;
}

.score-v2-table th {
    background: #eff6ff;
    color: #0b5bd3;
    font-weight: 900;
    text-align: left;
}

.score-v2-table th:nth-child(2),
.score-v2-table td:nth-child(2) { width: 170px; text-align: center; }
.score-v2-table th:nth-child(3),
.score-v2-table td:nth-child(3) { width: 30%; }
.score-v2-table tr:last-child td { border-bottom: 0; }
.score-v2-table tbody tr:hover { background: #f8fbff; }
.score-v2-table tbody tr.is-final-row { background: linear-gradient(90deg, #eff6ff, #ffffff); }
.score-v2-table td strong { color: #0f172a; }
.score-v2-point { color: #0b5bd3; font-size: 1.02rem; font-weight: 900; }
.score-v2-note { color: #475569; line-height: 1.55; }

.score-v2-final-pill {
    display: inline-flex;
    margin-left: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    font-size: .72rem;
    font-weight: 900;
}

.score-v2-mini-empty {
    padding: 18px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px dashed #bfdbfe;
    color: #475569;
}

.score-v2-note-strip {
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 18px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    display: grid;
    grid-template-columns: auto repeat(4, 1fr);
    gap: 12px 18px;
    align-items: center;
    color: #1e3a8a;
    font-size: .9rem;
}

.score-v2-note-strip span:before {
    content: '●';
    color: #0b5bd3;
    font-size: .65rem;
    margin-right: 7px;
}

.score-v2-empty-card {
    text-align: center;
    padding: 46px 28px;
}

.score-v2-empty-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 26px;
    background: #eaf3ff;
    font-size: 2rem;
}

.score-v2-empty-card h2 { margin: 0 0 10px; color: #0f172a; }
.score-v2-empty-card p { max-width: 700px; margin: 0 auto 20px; color: #64748b; line-height: 1.7; }
.score-v2-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.score-v2-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 14px; font-weight: 900; text-decoration: none; }
.score-v2-btn.primary { color: #fff; background: linear-gradient(135deg, #0b5bd3, #073f9e); }
.score-v2-btn.secondary { color: #0b5bd3; background: #eff6ff; border: 1px solid #bfdbfe; }

@media (max-width: 1180px) {
    .score-v2-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .score-v2-hero { grid-template-columns: 1fr; }
    .score-v2-illustration { display: none; }
    .score-v2-note-strip { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .score-v2-page .student-shell { width: min(100% - 24px, 1460px); }
    .score-v2-hero { margin: 0 -12px 16px; padding: 24px 12px; }
    .score-v2-summary-grid { grid-template-columns: 1fr; gap: 12px; }
    .score-v2-summary-card { min-height: auto; padding: 18px; align-items: flex-start; }
    .stat-card { text-align: left; flex-direction: row; justify-content: flex-start; }
    .score-v2-main-card { padding: 16px; border-radius: 20px; }
    .score-v2-sheet-card { padding: 16px; }
    .score-v2-sheet-head { grid-template-columns: 48px 1fr; }
    .score-v2-course-icon { width: 48px; height: 48px; font-size: 1.25rem; }
    .score-v2-final-box { grid-column: 1 / -1; width: 100%; text-align: left; }
    .score-v2-table { min-width: 0; }
    .score-v2-table thead { display: none; }
    .score-v2-table,
    .score-v2-table tbody,
    .score-v2-table tr,
    .score-v2-table td { display: block; width: 100%; }
    .score-v2-table tr { padding: 12px; border-bottom: 1px solid #e2e8f0; }
    .score-v2-table tr:last-child { border-bottom: 0; }
    .score-v2-table td { padding: 6px 0; border-bottom: 0; text-align: left !important; }
    .score-v2-table td:nth-child(2):before { content: 'Điểm: '; color: #64748b; font-weight: 700; }
    .score-v2-table td:nth-child(3):before { content: 'Ghi chú: '; color: #64748b; font-weight: 700; }
    .score-v2-note-strip { grid-template-columns: 1fr; }
}

/* Product affiliate additions */
.product-price-home{display:inline-flex;align-items:center;margin:2px 0 8px;padding:4px 8px;border-radius:999px;background:#fff7ed;color:#c2410c;font-weight:700;font-size:12px}.product-card-home a{display:inline-flex;align-items:center;justify-content:center;margin-top:8px}.product-card-home img{background:#eef2ff}.product-card-home p{min-height:42px}.products-band .section-title-row span{max-width:620px;text-align:right}
@media(max-width:760px){.products-band .section-title-row{align-items:flex-start}.products-band .section-title-row span{text-align:left}.product-card-home p{min-height:auto}}

/* ===== Homepage professional layout + clickable product cards ===== */
.student-shell {
    width: min(1320px, calc(100% - 44px));
}
.student-home {
    padding: 34px 0 46px;
}
.student-topbar {
    background: linear-gradient(120deg, #073f9e 0%, #0b5bd3 58%, #0750b4 100%);
}
.topbar-inner {
    min-height: 78px;
}
.topbar-brand strong {
    letter-spacing: -.01em;
}
.topbar-nav a,
.topbar-user {
    font-weight: 750;
}
.dashboard-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, .82fr);
    gap: 22px;
    margin-bottom: 22px;
}
.hero-card,
.dashboard-card,
.login-hero-card {
    border-color: rgba(191, 219, 254, .76);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}
.hero-main-card {
    min-height: 342px;
    padding: 42px;
    border-radius: 26px;
}
.hero-copy h1 {
    max-width: 620px;
    font-size: clamp(2.35rem, 4vw, 4rem);
}
.hero-copy p {
    max-width: 620px;
    font-size: 1.03rem;
}
.status-card {
    padding: 28px;
}
.dashboard-grid.two-columns {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 22px;
    margin-bottom: 22px;
}
.process-card,
.course-status-card {
    min-height: 236px;
}
.process-steps {
    align-items: start;
}
.course-status-item {
    min-height: 60px;
    border-color: #e6eef8;
    background: #fbfdff;
}
.products-band-pro {
    padding: 22px;
    margin: 0 0 22px;
    border-radius: 26px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}
.product-section-head {
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}
.product-section-head h2 {
    margin-bottom: 4px;
}
.product-section-head p {
    margin: 0;
    color: #64748b;
    font-size: .92rem;
    line-height: 1.5;
}
.affiliate-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 520px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #0b5bd3;
    border: 1px solid #bfdbfe;
    font-size: .86rem;
    font-weight: 800;
    text-align: right;
}
.affiliate-note:before {
    content: 'ⓘ';
    font-weight: 900;
}
.product-grid-pro {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.product-card-pro,
.product-card-home.product-card-pro {
    position: relative;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 16px;
    min-height: 168px;
    padding: 16px;
    border: 1px solid #dbe7f5;
    border-radius: 20px;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .055);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
    overflow: hidden;
}
.product-card-pro:after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 10% 15%, rgba(11, 91, 211, .08), transparent 36%);
    opacity: 0;
    transition: opacity .18s ease;
    pointer-events: none;
}
.product-card-pro:hover {
    transform: translateY(-3px);
    border-color: #93c5fd;
    box-shadow: 0 18px 42px rgba(11, 91, 211, .14);
    background: #fcfdff;
}
.product-card-pro:hover:after {
    opacity: 1;
}
.product-media-pro {
    width: 128px;
    height: 128px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.product-card-pro img,
.product-card-home.product-card-pro img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    padding: 8px;
}
.product-card-pro .product-icon-fallback {
    width: 100%;
    height: 100%;
    border-radius: 0;
    font-size: 2.3rem;
    background: transparent;
}
.product-info-pro {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.product-info-pro strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
    color: #0b5bd3;
    font-size: .98rem;
    line-height: 1.35;
    font-weight: 900;
}
.product-info-pro em {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.45;
    font-style: normal;
}
.product-bottom-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}
.product-bottom-pro b {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #0b5bd3;
    font-size: .84rem;
    font-weight: 900;
    white-space: nowrap;
}
.product-bottom-pro b span {
    transition: transform .18s ease;
}
.product-card-pro:hover .product-bottom-pro b span {
    transform: translateX(3px);
}
.product-price-home {
    margin: 0;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.products-band .empty-state-mini {
    grid-column: 1 / -1;
}

@media (max-width: 1280px) {
    .product-card-pro,
    .product-card-home.product-card-pro {
        grid-template-columns: 104px 1fr;
        min-height: 154px;
    }
    .product-media-pro { width: 104px; height: 104px; }
}
@media (max-width: 1180px) {
    .dashboard-hero,
    .dashboard-grid.two-columns { grid-template-columns: 1fr; }
    .product-grid-pro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .student-shell { width: min(100% - 24px, 1320px); }
    .student-home { padding-top: 18px; }
    .hero-main-card { padding: 22px; }
    .product-section-head { flex-direction: column; }
    .affiliate-note { text-align: left; border-radius: 14px; }
    .product-grid-pro { grid-template-columns: 1fr; }
    .product-card-pro,
    .product-card-home.product-card-pro { grid-template-columns: 92px 1fr; padding: 12px; min-height: 132px; }
    .product-media-pro { width: 92px; height: 92px; border-radius: 16px; }
    .product-info-pro strong { min-height: auto; font-size: .94rem; }
    .product-info-pro em { min-height: auto; }
    .product-bottom-pro { align-items: flex-start; flex-direction: column; }
    .product-bottom-pro b { margin-left: 0; }
}
