:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-soft: #f8f9fc;
    --sidebar: #0e1625;
    --sidebar-soft: #172235;
    --sidebar-border: rgba(255,255,255,.07);

    --text: #172033;
    --muted: #6d7787;
    --muted-2: #9098a7;

    --border: #e4e8f0;
    --accent: #6958e8;
    --accent-2: #8a7cf7;
    --accent-soft: #efedff;

    --success: #11916a;
    --success-soft: #e9f8f2;

    --warning: #c57a13;
    --warning-soft: #fff4df;

    --danger: #d85858;

    --shadow:
        0 18px 50px rgba(21, 32, 51, .075);

    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 11px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
}

button,
input,
select {
    font: inherit;
}

.demo-banner {
    min-height: 38px;
    padding: 8px 22px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    background:
        linear-gradient(
            90deg,
            #f3e9ff,
            #eeeaff,
            #f6efff
        );

    border-bottom:
        1px solid #dfd7fb;

    color: #5744b9;
    font-size: 12px;
    position: relative;
    z-index: 50;
}

.demo-banner strong {
    font-size: 11px;
    letter-spacing: .08em;
}

.demo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 5px rgba(105, 88, 232, .10);
}

.app-shell {
    min-height:
        calc(100vh - 38px);

    display: grid;
    grid-template-columns:
        248px
        minmax(0, 1fr);
}

.sidebar {
    height:
        calc(100vh - 38px);

    position: sticky;
    top: 38px;

    display: flex;
    flex-direction: column;

    padding: 26px 18px 20px;

    color: #fff;

    background:
        radial-gradient(
            circle at 20% 0%,
            rgba(105, 88, 232, .16),
            transparent 30%
        ),
        var(--sidebar);

    border-right:
        1px solid rgba(0,0,0,.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 0 9px 24px;
}

.brand-mark {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            145deg,
            #796cf0,
            #5445d4
        );

    font-size: 18px;
    font-weight: 850;

    box-shadow:
        0 12px 28px rgba(91, 73, 214, .3);
}

.brand-copy strong,
.brand-copy span {
    display: block;
}

.brand-copy strong {
    font-size: 17px;
    letter-spacing: .02em;
}

.brand-copy span {
    margin-top: 2px;

    font-size: 11px;
    color: #909bae;
}

.sidebar-context {
    margin: 0 5px 18px;
    padding: 13px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border:
        1px solid var(--sidebar-border);

    border-radius: 12px;

    background:
        rgba(255,255,255,.035);
}

.sidebar-context span {
    color: #8490a4;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-context strong {
    color: #c8c1ff;
    font-size: 11px;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.nav-link {
    min-height: 44px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 10px 12px;

    color: #9ca7b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;

    border-radius: 10px;

    transition:
        background .18s ease,
        color .18s ease,
        transform .18s ease;
}

.nav-link:hover,
.nav-link.active {
    background:
        var(--sidebar-soft);

    color: #fff;
}

.nav-link:hover {
    transform:
        translateX(2px);
}

.nav-icon {
    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 8px;

    background:
        rgba(255,255,255,.05);

    color: #8e83ef;
    font-size: 9px;
    font-weight: 800;
}

.nav-link.active .nav-icon {
    background:
        rgba(111, 94, 234, .18);

    color: #c6bfff;
}

.sidebar-protection {
    margin-top: auto;
    padding: 14px;

    display: flex;
    gap: 10px;
    align-items: flex-start;

    border:
        1px solid rgba(65, 207, 157, .12);

    border-radius: 13px;

    background:
        rgba(17, 145, 106, .07);
}

.protection-indicator {
    width: 8px;
    height: 8px;

    margin-top: 5px;
    flex: 0 0 auto;

    border-radius: 50%;
    background: #3bc895;

    box-shadow:
        0 0 0 5px rgba(59, 200, 149, .08);
}

.sidebar-protection strong,
.sidebar-protection small {
    display: block;
}

.sidebar-protection strong {
    font-size: 11px;
    color: #d7f5e9;
}

.sidebar-protection small {
    margin-top: 3px;
    font-size: 9px;
    color: #75a695;
    line-height: 1.4;
}

.sidebar-footer {
    padding: 17px 10px 0;
    margin-top: 16px;

    border-top:
        1px solid var(--sidebar-border);
}

.sidebar-footer span,
.sidebar-footer strong {
    display: block;
}

.sidebar-footer span {
    color: #758196;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-footer strong {
    margin-top: 4px;
    font-size: 11px;
}

.main {
    width: 100%;
    max-width: 1540px;
    margin: 0 auto;

    padding:
        34px 38px 25px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;

    margin-bottom: 25px;
}

.topbar-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mobile-menu {
    display: none;

    width: 38px;
    height: 38px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface);
    color: var(--text);

    cursor: pointer;
}

.eyebrow {
    display: inline-block;

    color: var(--accent);
    font-size: 10px;
    font-weight: 850;

    letter-spacing: .14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin:
        5px 0 5px;

    font-size:
        clamp(27px, 3vw, 34px);

    letter-spacing: -.045em;
}

.topbar p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.environment-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 13px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;

    color: #505b6c;
    font-size: 11px;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;
    background: var(--success);

    box-shadow:
        0 0 0 4px rgba(17, 145, 106, .10);
}

.hero {
    min-height: 270px;

    padding: 34px 36px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;

    overflow: hidden;
    position: relative;

    border-radius: 24px;

    color: #fff;

    background:
        radial-gradient(
            circle at 88% 22%,
            rgba(255,255,255,.16),
            transparent 19%
        ),
        radial-gradient(
            circle at 74% 120%,
            rgba(132, 113, 255, .44),
            transparent 33%
        ),
        linear-gradient(
            130deg,
            #131d2e 0%,
            #252552 54%,
            #6759e8 100%
        );

    box-shadow:
        0 24px 60px rgba(27, 30, 72, .16);
}

.hero::after {
    content: "";

    width: 340px;
    height: 340px;

    position: absolute;
    right: -150px;
    bottom: -210px;

    border-radius: 50%;
    border:
        1px solid rgba(255,255,255,.09);
}

.hero-copy {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero-badges {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.badge,
.panel-chip,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .07em;
    text-transform: uppercase;
}

.badge {
    padding: 7px 10px;

    border:
        1px solid rgba(255,255,255,.14);

    background:
        rgba(255,255,255,.09);
}

.badge-demo {
    color: #f0ebff;

    background:
        rgba(149, 127, 255, .22);
}

.hero h2 {
    max-width: 720px;

    margin:
        15px 0 12px;

    font-size:
        clamp(27px, 4vw, 39px);

    line-height: 1.06;
    letter-spacing: -.045em;
}

.hero p {
    max-width: 720px;

    color: #d5d9e8;
    font-size: 14px;
    line-height: 1.65;
}

.hero-meta {
    margin-top: 25px;

    display: flex;
    gap: 35px;
    flex-wrap: wrap;
}

.hero-meta span,
.hero-meta strong {
    display: block;
}

.hero-meta span {
    margin-bottom: 4px;

    color: #aeb6cb;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.hero-meta strong {
    font-size: 12px;
}

.hero-score {
    min-width: 205px;

    padding: 27px 25px;

    position: relative;
    z-index: 2;

    border:
        1px solid rgba(255,255,255,.14);

    border-radius: 20px;

    background:
        rgba(255,255,255,.085);

    backdrop-filter:
        blur(10px);
}

.hero-score span,
.hero-score strong,
.hero-score small {
    display: block;
}

.hero-score span {
    color: #bfc4d8;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-score strong {
    margin: 6px 0 4px;

    font-size: 36px;
    letter-spacing: -.04em;
}

.hero-score small {
    color: #bcc2d4;
    font-size: 10px;
}

.stats-grid {
    margin: 19px 0;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
}

.metric-card,
.panel,
.empty-state {
    background: var(--surface);

    border:
        1px solid var(--border);

    box-shadow: var(--shadow);
}

.metric-card {
    padding: 20px;

    border-radius: 17px;
}

.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.metric-code {
    min-width: 29px;
    height: 25px;

    display: inline-grid;
    place-items: center;

    padding: 0 7px;

    border-radius: 8px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}

.metric-code.metric-ok {
    background: var(--success-soft);
    color: var(--success);
}

.metric-code.metric-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.metric-card > strong {
    display: block;

    margin: 12px 0 3px;

    font-size: 29px;
    letter-spacing: -.035em;
}

.metric-card > small {
    color: var(--muted-2);
    font-size: 10px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(290px, .75fr);

    gap: 18px;

    margin-bottom: 18px;
}

.panel {
    padding: 24px;

    border-radius: var(--radius-lg);

    scroll-margin-top: 60px;
}

.panel-heading {
    margin-bottom: 20px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-heading h3 {
    margin:
        5px 0 0;

    font-size: 19px;
    letter-spacing: -.025em;
}

.panel-heading p {
    margin:
        6px 0 0;

    color: var(--muted);
    font-size: 11px;
}

.panel-chip {
    min-height: 29px;
    padding: 0 10px;

    background: var(--accent-soft);
    color: var(--accent);
}

.panel-chip.safe {
    background: var(--success-soft);
    color: var(--success);
}

.class-comparison {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 13px;
}

.class-card {
    padding: 18px;

    background:
        linear-gradient(
            180deg,
            #fbfbfe,
            #f8f9fc
        );

    border:
        1px solid var(--border);

    border-radius: 15px;
}

.class-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 20px;
}

.class-card-head span,
.class-card-head strong {
    display: block;
}

.class-card-head span {
    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: .1em;
}

.class-card-head strong {
    margin-top: 4px;
    font-size: 13px;
}

.class-count {
    color: var(--muted);
    font-size: 9px;
    white-space: nowrap;
}

.score-line {
    margin-top: 15px;
}

.score-line > div:first-child {
    margin-bottom: 7px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.score-line span {
    color: var(--muted);
    font-size: 10px;
}

.score-line strong {
    font-size: 15px;
}

.score-track,
.progress-track,
.area-track {
    overflow: hidden;

    background: #e9ecf3;

    border-radius: 999px;
}

.score-track {
    height: 6px;
}

.score-track > span,
.progress-track > span,
.area-track > span {
    height: 100%;
    display: block;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #6656df,
            #8e80f6
        );
}

.score-track.secondary > span {
    background:
        linear-gradient(
            90deg,
            #4e7dda,
            #68a0f1
        );
}

.class-footer {
    margin-top: 18px;
    padding-top: 13px;

    display: flex;
    justify-content: space-between;
    gap: 10px;

    border-top:
        1px solid var(--border);

    color: var(--muted);
    font-size: 9px;
}

.class-footer strong {
    color: var(--text);
}

.overview-list {
    display: grid;
}

.overview-list > div {
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-bottom:
        1px solid var(--border);
}

.overview-list > div:last-child {
    border-bottom: 0;
}

.overview-list span {
    color: var(--muted);
    font-size: 10px;
}

.overview-list strong {
    font-size: 14px;
}

.area-panel {
    margin-bottom: 18px;
}

.area-chart {
    display: grid;
    gap: 10px;
}

.area-row {
    min-height: 63px;

    display: grid;
    grid-template-columns:
        minmax(190px, 1.2fr)
        minmax(200px, 2fr)
        80px;

    align-items: center;
    gap: 22px;

    padding:
        11px 12px;

    border-radius: 13px;
}

.area-row:hover {
    background: var(--surface-soft);
}

.area-name {
    display: flex;
    align-items: center;
    gap: 11px;
}

.area-number {
    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    flex: 0 0 auto;

    border-radius: 9px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}

.area-name strong,
.area-name small {
    display: block;
}

.area-name strong {
    font-size: 11px;
}

.area-name small {
    margin-top: 3px;

    color: var(--muted-2);
    font-size: 8px;
}

.area-track {
    height: 8px;
}

.area-score {
    text-align: right;
    font-size: 15px;
}

.area-value-mobile {
    display: none;
}

.filter-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-button {
    min-height: 31px;

    padding: 0 11px;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background: var(--surface);
    color: var(--muted);

    font-size: 9px;
    font-weight: 750;

    cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
    border-color: #d7d0ff;
    background: var(--accent-soft);
    color: var(--accent);
}

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

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.results-table th {
    padding:
        10px 12px;

    color: var(--muted-2);
    font-size: 8px;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: left;

    border-bottom:
        1px solid var(--border);
}

.results-table td {
    padding:
        13px 12px;

    color: #596477;
    font-size: 10px;

    border-bottom:
        1px solid #edf0f5;
}

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

.results-table tbody tr:hover {
    background: #fafbfe;
}

.student-name {
    color: var(--text);
    font-size: 11px;
}

.rank-badge {
    min-width: 32px;
    height: 28px;

    display: inline-grid;
    place-items: center;

    padding: 0 7px;

    border-radius: 9px;

    background: #f3f1ff;
    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}

.status-pill {
    min-height: 25px;
    padding: 0 9px;

    letter-spacing: 0;
    text-transform: none;
}

.status-pill.success {
    background: var(--success-soft);
    color: var(--success);
}

.status-pill.pending {
    background: var(--warning-soft);
    color: var(--warning);
}

.essay-panel,
.formula-panel {
    min-height: 100%;
}

.essay-progress {
    padding: 18px;

    background: var(--surface-soft);

    border:
        1px solid var(--border);

    border-radius: 15px;
}

.essay-progress-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 13px;
}

.essay-progress-header strong,
.essay-progress-header span {
    display: block;
}

.essay-progress-header > div strong {
    font-size: 18px;
}

.essay-progress-header > div span {
    margin-top: 3px;

    color: var(--muted);
    font-size: 9px;
}

.progress-track {
    height: 7px;
}

.pending-list {
    margin-top: 19px;
}

.section-label {
    display: block;

    margin-bottom: 8px;

    color: var(--muted-2);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .1em;
}

.pending-item {
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    border-bottom:
        1px solid var(--border);
}

.pending-item:last-child {
    border-bottom: 0;
}

.pending-item strong,
.pending-item span {
    display: block;
}

.pending-item strong {
    font-size: 10px;
}

.pending-item div span {
    margin-top: 3px;

    color: var(--muted);
    font-size: 8px;
}

.formula-box {
    padding: 17px;

    margin-bottom: 11px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: var(--surface-soft);
}

.formula-box span,
.formula-box strong {
    display: block;
}

.formula-box span {
    color: var(--muted);
    font-size: 9px;
}

.formula-box strong {
    margin-top: 6px;

    color: #393164;
    font-size: 15px;
}

.formula-note {
    margin:
        17px 2px 0;

    color: var(--muted);
    font-size: 10px;
    line-height: 1.55;
}

.process-panel {
    margin-bottom: 18px;
}

.process-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 11px;
}

.process-step {
    padding: 17px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    background: var(--surface-soft);
}

.process-step > span {
    width: 29px;
    height: 29px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    background: var(--accent-soft);
    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}

.process-step strong {
    display: block;

    margin:
        13px 0 6px;

    font-size: 11px;
}

.process-step p {
    margin: 0;

    color: var(--muted);
    font-size: 9px;
    line-height: 1.5;
}

.technical-strip {
    margin-top: 18px;
    padding-top: 17px;

    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    border-top:
        1px solid var(--border);
}

.technical-strip span,
.technical-strip strong {
    display: block;
}

.technical-strip span {
    color: var(--muted-2);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.technical-strip strong {
    margin-top: 5px;
    font-size: 10px;
}

.empty-state {
    padding: 50px;

    border-radius: 22px;
}

.empty-state h2 {
    max-width: 700px;

    margin:
        10px 0;

    font-size: 28px;
}

.empty-state p {
    color: var(--muted);
}

.footer {
    padding:
        10px 3px 3px;

    display: flex;
    justify-content: space-between;
    gap: 20px;

    color: var(--muted-2);
    font-size: 9px;
}

tr.is-hidden {
    display: none;
}

@media (
    max-width: 1180px
) {
    .stats-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns:
            1fr;
    }

    .process-grid,
    .technical-strip {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (
    max-width: 860px
) {
    .demo-banner {
        min-height: 44px;

        justify-content: flex-start;

        padding:
            9px 15px;

        font-size: 10px;
    }

    .demo-banner span:last-child {
        display: none;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        width: 245px;
        height:
            calc(100vh - 44px);

        position: fixed;
        left: -270px;
        top: 44px;

        z-index: 100;

        box-shadow:
            20px 0 50px rgba(11, 18, 30, .23);

        transition:
            left .22s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-menu {
        display: grid;
        place-items: center;
    }

    .main {
        padding:
            25px 18px;
    }

    .hero {
        padding:
            28px 24px;

        align-items: flex-start;
        flex-direction: column;
    }

    .hero-score {
        width: 100%;
    }

    .class-comparison {
        grid-template-columns:
            1fr;
    }

    .area-row {
        grid-template-columns:
            minmax(150px, 1fr)
            minmax(140px, 1.3fr)
            68px;

        gap: 12px;
    }
}

@media (
    max-width: 600px
) {
    .topbar {
        align-items: center;
    }

    .environment-chip {
        display: none;
    }

    .stats-grid {
        grid-template-columns:
            1fr 1fr;

        gap: 9px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-card > strong {
        font-size: 24px;
    }

    .panel {
        padding: 18px;
    }

    .panel-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .hero {
        min-height: 0;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero-meta {
        display: grid;
        gap: 13px;
    }

    .area-row {
        grid-template-columns:
            1fr;

        gap: 7px;

        padding:
            12px 4px;
    }

    .area-score {
        display: none;
    }

    .area-value-mobile {
        display: block;

        margin-bottom: 5px;

        font-size: 10px;
        font-weight: 750;
        text-align: right;
    }

    .process-grid,
    .technical-strip {
        grid-template-columns:
            1fr;
    }

    .footer {
        flex-direction: column;
        gap: 5px;
    }
}
