:root {
    --green: #16865a;
    --green-dark: #116b47;
    --green-light: #eaf5ee;
    --green-soft: #f3f8f4;
    --ink: #17251d;
    --muted: #7b887f;
    --border: #e8eee9;
    --surface: #ffffff;
    --page: #f5f8f5;
    --font-body: "DM Sans", sans-serif;
    --font-heading: "Manrope", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--page);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 14px;
}

button,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

.dashboard-layout {
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 250px;
    height: 100vh;
    padding: 30px 20px 20px;
    background: #fff;
    border-right: 1px solid var(--border);
}

/* Sidebar Brand */

.brand {
    display: flex;
    align-items: center;
    margin: 0 0 52px 5px;
    text-decoration: none;
}

.brand-fallback {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.brand-symbol {
    display: grid;
    flex: 0 0 38px;
    place-items: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 9px;
}

.brand-symbol img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-name {
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.7px;
    white-space: nowrap;
}

.brand-name span {
    color: var(--green);
}

.sidebar-label {
    margin: 0 0 13px 10px;
    color: #a0aaa3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 45px;
    padding: 0 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #718078;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
    background: #f5f8f5;
    color: var(--green);
}

.nav-link.active {
    background: var(--green-light);
    color: var(--green-dark);
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 19px;
    font-size: 18px;
}

.tools-label {
    margin-top: 39px;
}

.sign-out-link {
    font-family: var(--font-body);
}

.sidebar-bottom {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: auto;
    padding: 15px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.sidebar-help-icon {
    display: grid;
    flex: 0 0 27px;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    font-weight: 700;
}

.sidebar-bottom strong {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
}

.sidebar-bottom p {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

/* Main area */

.main-content {
    min-height: 100vh;
    margin-left: 250px;
}

.topbar {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding: 0 42px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #99a39c;
    font-size: 12px;
}

.breadcrumb strong {
    color: var(--ink);
    font-weight: 700;
}

.breadcrumb-divider {
    color: #c5cec7;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 27px;
}

.today-label {
    color: #7d8981;
    font-size: 12px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 2px solid #e1f0e6;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
}

.user-profile-info {
    display: grid;
    gap: 3px;
}

.user-profile-info strong {
    max-width: 145px;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-info span {
    color: var(--muted);
    font-size: 10px;
}

.page-content {
    width: min(100%, 1500px);
    margin: 0 auto;
    padding: 35px 42px 25px;
}

/* Welcome */

.welcome-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 175px;
    overflow: hidden;
    margin-bottom: 23px;
    padding: 32px 37px;
    border-radius: 15px;
    background: #123d2c;
    color: #fff;
}

.eyebrow {
    margin-bottom: 9px;
    color: #91b9a2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.welcome-section h1 {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: clamp(23px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: -1.3px;
}

.welcome-section h1 span {
    color: #a9e0bd;
}

.welcome-description {
    position: relative;
    z-index: 1;
    margin-top: 10px;
    color: #c1d8ca;
    font-size: 12px;
}

.welcome-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 42%;
    height: 100%;
    overflow: hidden;
    opacity: 0.85;
}

.decoration-circle {
    position: absolute;
    border: 1px solid rgba(183, 226, 196, 0.19);
    border-radius: 50%;
}

.circle-one {
    top: -115px;
    right: -25px;
    width: 310px;
    height: 310px;
}

.circle-two {
    top: -75px;
    right: 15px;
    width: 230px;
    height: 230px;
}

.decoration-line {
    position: absolute;
    top: 50%;
    right: 80px;
    width: 130px;
    height: 130px;
    border: 1px solid rgba(183, 226, 196, 0.18);
    border-radius: 25px;
    transform: translateY(-50%) rotate(35deg);
}

/* Statistics */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 23px;
}

.stat-card {
    min-width: 0;
    padding: 19px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stat-label {
    color: #78857d;
    font-size: 11px;
    font-weight: 600;
}

.stat-icon {
    display: grid;
    flex: 0 0 30px;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
}

.green-icon {
    background: #e9f5ed;
    color: #16865a;
}

.purple-icon {
    background: #f0edfb;
    color: #7965bd;
}

.orange-icon {
    background: #fff3e8;
    color: #d8893d;
}

.blue-icon {
    background: #eaf2fc;
    color: #5386c4;
}

.stat-value {
    margin-top: 15px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1.4px;
}

.stat-note {
    margin-top: 5px;
    color: #9aa49d;
    font-size: 10px;
}

/* Content layout */

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(275px, 0.9fr);
    align-items: start;
    gap: 20px;
}

.content-main,
.content-aside {
    display: grid;
    gap: 20px;
}

.panel {
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 21px;
}

.section-heading .eyebrow,
.readiness-card .eyebrow {
    margin-bottom: 6px;
    color: #91a096;
}

.section-heading h2,
.readiness-card h2 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-description {
    margin-top: 5px;
    color: #929d95;
    font-size: 11px;
}

.section-count {
    padding: 7px 10px;
    border-radius: 20px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

/* Subject cards */

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.subject-card {
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.subject-card:hover {
    border-color: #b4d9c1;
    transform: translateY(-2px);
}

.subject-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
}

.subject-number {
    color: #a4aea7;
    font-size: 10px;
    font-weight: 700;
}

.subject-symbol {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--green-light);
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
}

.subject-card h3 {
    margin-bottom: 5px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
}

.subject-card p {
    color: #929d95;
    font-size: 10px;
}

.subject-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
}

.subject-card-bottom span:last-child {
    font-size: 15px;
}

/* Performance */

.performance-list {
    display: grid;
    gap: 20px;
}

.performance-item {
    display: grid;
    gap: 9px;
}

.performance-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.performance-item-top strong {
    font-size: 11px;
    font-weight: 700;
}

.performance-item-top span {
    color: #75837a;
    font-size: 10px;
    font-weight: 700;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 20px;
    background: #edf1ee;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--green);
    transition: width 0.5s ease;
}

.performance-empty {
    padding: 17px;
    border-radius: 9px;
    background: var(--green-soft);
    color: #7d8d82;
    font-size: 11px;
    line-height: 1.6;
}

/* Readiness card */

.readiness-card {
    padding: 23px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--border);
}

.readiness-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.readiness-star {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #eaf5ee;
    color: var(--green);
    font-size: 16px;
}

.readiness-ring {
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 23px auto 20px;
    border-radius: 50%;
    background: conic-gradient(var(--green) 0deg, #e9efea 0deg);
    transition: background 0.4s ease;
}

.readiness-ring-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: #fff;
}

.readiness-ring-inner strong {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1px;
}

.readiness-ring-inner span {
    margin-top: 3px;
    color: #929d95;
    font-size: 10px;
}

.readiness-card-copy {
    text-align: center;
}

.readiness-card-copy strong {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
}

.readiness-card-copy p {
    max-width: 235px;
    margin: 7px auto 0;
    color: #89958d;
    font-size: 10px;
    line-height: 1.6;
}

.benchmark {
    margin-top: 23px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.benchmark-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    color: #7e8a82;
    font-size: 10px;
}

.benchmark-label strong {
    color: var(--green);
}

.benchmark-track {
    height: 6px;
    overflow: hidden;
    border-radius: 20px;
    background: #edf1ee;
}

.benchmark-track span {
    display: block;
    width: 75%;
    height: 100%;
    border-radius: inherit;
    background: var(--green);
}

.benchmark p {
    margin-top: 9px;
    color: #a0aaa3;
    font-size: 9px;
    line-height: 1.5;
}

/* Activity */

.activity-list {
    display: grid;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    border-bottom: 1px solid #f0f3f0;
}

.activity-item:first-child {
    padding-top: 0;
}

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

.activity-icon {
    display: grid;
    flex: 0 0 34px;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--green-light);
    color: var(--green);
    font-size: 13px;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-details strong {
    display: block;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-details span {
    display: block;
    margin-top: 4px;
    color: #9aa49d;
    font-size: 9px;
}

.activity-score {
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.loading-state,
.empty-state,
.error-state {
    padding: 18px 10px;
    color: #929d95;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.error-state {
    color: #b74b4b;
}

/* Footer and mobile navigation */

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 28px;
    padding: 18px 0 5px;
    border-top: 1px solid var(--border);
    color: #a0aaa3;
    font-size: 10px;
}

.dashboard-footer span:first-child {
    color: #65736a;
    font-weight: 700;
}

.mobile-menu-btn,
.sidebar-overlay {
    display: none;
}

/* Responsive */

@media (max-width: 1150px) {
    .page-content {
        padding-right: 25px;
        padding-left: 25px;
    }

    .topbar {
        padding-right: 25px;
        padding-left: 25px;
    }

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

    .content-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    }
}

@media (max-width: 850px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        position: fixed;
        z-index: 15;
        inset: 0;
        display: block;
        background: rgba(12, 28, 19, 0.38);
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 35px;
        height: 35px;
        padding: 7px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 3px;
        background: #405248;
    }

    .topbar {
        gap: 15px;
    }

    .breadcrumb {
        margin-right: auto;
    }
}

@media (max-width: 700px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-aside {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .readiness-card,
    .activity-panel {
        min-width: 0;
    }
}

@media (max-width: 540px) {
    .topbar {
        min-height: 65px;
        padding: 0 16px;
    }

    .topbar-right {
        gap: 0;
    }

    .today-label,
    .user-profile-info {
        display: none;
    }

    .page-content {
        padding: 22px 15px;
    }

    .welcome-section {
        min-height: 165px;
        padding: 25px 21px;
    }

    .welcome-section h1 {
        max-width: 280px;
        font-size: 23px;
    }

    .welcome-description {
        max-width: 260px;
        font-size: 11px;
        line-height: 1.6;
    }

    .welcome-decoration {
        width: 35%;
        opacity: 0.45;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 25px;
    }

    .stat-note {
        min-height: 25px;
        font-size: 9px;
        line-height: 1.5;
    }

    .panel,
    .readiness-card {
        padding: 18px;
    }

    .subjects-grid {
        gap: 9px;
    }

    .subject-card {
        min-height: 145px;
        padding: 12px;
    }

    .content-aside {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 360px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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


.subject-card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.subject-card:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 4px;
}

/* Theme switch */

.theme-switch {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-height: 45px;
    margin-bottom: 15px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch:hover {
    background: var(--green-light);
    border-color: var(--green);
}

.theme-switch-icon {
    display: grid;
    place-items: center;
    width: 19px;
    font-size: 18px;
}

/* Dark theme */

body[data-theme="dark"] {
    --ink: #e6eee9;
    --muted: #9baaa1;
    --border: #293b31;
    --surface: #17251e;
    --page: #101a14;
    --green-light: #203e2e;
    --green-soft: #1b3024;

    background: var(--page);
    color: var(--ink);
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .topbar {
    background: #17251e;
    border-color: var(--border);
}

body[data-theme="dark"] .topbar {
    background: rgba(23, 37, 30, 0.96);
}

body[data-theme="dark"] .nav-link {
    color: #a6b5ab;
}

body[data-theme="dark"] .nav-link:hover,
body[data-theme="dark"] .nav-link.active {
    background: #203e2e;
    color: #8ed4a8;
}

body[data-theme="dark"] .theme-switch {
    background: #1b3024;
    border-color: var(--border);
    color: var(--ink);
}

body[data-theme="dark"] .theme-switch:hover {
    background: #254632;
}

body[data-theme="dark"] .sidebar-bottom,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .readiness-card,
body[data-theme="dark"] .subject-card {
    background: var(--surface);
    border-color: var(--border);
}

body[data-theme="dark"] .subject-card:hover {
    border-color: var(--green);
}

body[data-theme="dark"] .subject-card h3,
body[data-theme="dark"] .section-heading h2,
body[data-theme="dark"] .readiness-card h2,
body[data-theme="dark"] .stat-value,
body[data-theme="dark"] .user-profile-info strong,
body[data-theme="dark"] .performance-item-top strong,
body[data-theme="dark"] .activity-details strong,
body[data-theme="dark"] .readiness-ring-inner strong {
    color: var(--ink);
}

body[data-theme="dark"] .subject-card p,
body[data-theme="dark"] .section-description,
body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .stat-note,
body[data-theme="dark"] .today-label,
body[data-theme="dark"] .breadcrumb,
body[data-theme="dark"] .performance-item-top span,
body[data-theme="dark"] .activity-details span,
body[data-theme="dark"] .readiness-card-copy p,
body[data-theme="dark"] .readiness-ring-inner span {
    color: #9baaa1;
}

body[data-theme="dark"] .readiness-ring-inner {
    background: #17251e;
}

body[data-theme="dark"] .progress-track,
body[data-theme="dark"] .benchmark-track {
    background: #293b31;
}

body[data-theme="dark"] .activity-item {
    border-color: #293b31;
}

body[data-theme="dark"] .performance-empty {
    background: #1b3024;
    color: #a6b5ab;
}

body[data-theme="dark"] .sidebar-help-icon,
body[data-theme="dark"] .subject-symbol,
body[data-theme="dark"] .activity-icon {
    background: #203e2e;
    color: #8ed4a8;
}

body[data-theme="dark"] .mobile-menu-btn {
    background: #17251e;
    border-color: var(--border);
}

body[data-theme="dark"] .mobile-menu-btn span {
    background: #e6eee9;
}

body[data-theme="dark"] .dashboard-footer {
    border-color: var(--border);
}

body[data-theme="dark"] .dashboard-footer span:first-child {
    color: #c3d1c8;
}


