/* ============================================================
   ADAPT OS — STUDENT EDITION
   Complete Application Stylesheet
   ============================================================ */

/* ============================================================
   1. ROOT VARIABLES
   ============================================================ */

:root {
    --bg-main: #080d19;
    --bg-secondary: #0d1424;
    --bg-tertiary: #121b2e;

    --surface: rgba(18, 27, 46, 0.88);
    --surface-solid: #111a2d;
    --surface-light: rgba(255, 255, 255, 0.045);
    --surface-hover: rgba(255, 255, 255, 0.075);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);

    --text-primary: #f5f7fb;
    --text-secondary: #aab4c7;
    --text-muted: #6f7b91;

    --accent: #6c63ff;
    --accent-light: #8a83ff;
    --accent-dark: #5148dc;

    --success: #27d69b;
    --warning: #ffb84d;
    --danger: #ff647c;
    --info: #4ca6ff;

    --shadow-sm: 0 8px 25px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.35);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;

    --sidebar-width: 270px;
    --topbar-height: 76px;

    --transition-fast: 0.18s ease;
    --transition: 0.28s ease;
    --transition-slow: 0.45s ease;

    font-family: "Inter", sans-serif;
}


/* ============================================================
   2. RESET
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(108, 99, 255, 0.11),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 10%,
            rgba(76, 166, 255, 0.08),
            transparent 25%
        ),
        var(--bg-main);

    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

input,
textarea,
select {
    outline: none;
}

textarea {
    resize: vertical;
}

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

::selection {
    background: rgba(108, 99, 255, 0.35);
    color: #fff;
}


/* ============================================================
   3. SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* ============================================================
   4. APPLICATION SHELL
   ============================================================ */

.app-shell {
    min-height: 100vh;
    display: flex;
}

.main-area {
    min-width: 0;
    flex: 1;
    margin-left: var(--sidebar-width);
}


/* ============================================================
   5. SIDEBAR
   ============================================================ */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    height: 100vh;

    display: flex;
    flex-direction: column;

    padding: 22px 16px;

    background:
        linear-gradient(
            180deg,
            rgba(15, 23, 40, 0.98),
            rgba(8, 13, 25, 0.98)
        );

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

    z-index: 1000;

    overflow-y: auto;

    transition:
        transform var(--transition),
        width var(--transition);
}

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

    padding: 2px 8px 26px;
}

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

    display: grid;
    place-items: center;

    border-radius: 14px;

    backgrond:
        linear-gradient(
            135deg,
            var(--accent),
            #3c8dff
        );

    box-shadow:
        0 10px 30px rgba(108, 99, 255, 0.35);

    font-family: "Space Grotesk", sans-serif;
    font-size: 21px;
    font-weight: 700;
}

.brand-text h1 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.brand-text span {
    display: block;
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-close {
    display: none;

    position: absolute;
    top: 20px;
    right: 15px;

    width: 35px;
    height: 35px;

    border-radius: 10px;

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

    font-size: 24px;
}

.main-navigation {
    flex: 1;
}

.nav-heading {
    margin: 19px 10px 8px;

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.nav-item {
    position: relative;

    width: 100%;
    min-height: 44px;

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

    padding: 0 12px;
    margin-bottom: 4px;

    border-radius: 12px;

    background: transparent;
    color: var(--text-secondary);

    text-align: left;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.nav-item:hover {
    background: var(--surface-light);
    color: var(--text-primary);
    transform: translateX(2px);
}

.nav-item.active {
    background:
        linear-gradient(
            90deg,
            rgba(108, 99, 255, 0.22),
            rgba(108, 99, 255, 0.07)
        );

    color: #fff;

    box-shadow:
        inset 3px 0 0 var(--accent);
}

.nav-icon {
    width: 23px;
    min-width: 23px;

    display: grid;
    place-items: center;

    color: currentColor;

    font-size: 17px;
    font-weight: 700;
}

.nav-item span:nth-child(2) {
    font-size: 13px;
    font-weight: 600;
}

.nav-badge,
.new-badge {
    margin-left: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 21px;
    height: 21px;

    padding: 0 6px;

    border-radius: 20px;

    background: rgba(255, 100, 124, 0.15);
    color: var(--danger);

    font-size: 10px;
    font-weight: 800;
}

.new-badge {
    background: rgba(39, 214, 155, 0.12);
    color: var(--success);
    font-size: 8px;
}

.sidebar-bottom {
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

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

    margin-top: 12px;
    padding: 10px;

    border-radius: 14px;

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

.profile-avatar,
.topbar-avatar {
    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #765cff,
            #3f8cff
        );

    color: white;
    font-weight: 800;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

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

.profile-details strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
}

.profile-details span {
    display: block;
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 9px;
}

.profile-menu {
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
}


/* ============================================================
   6. TOPBAR
   ============================================================ */

.topbar {
    position: sticky;
    top: 0;

    height: var(--topbar-height);

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

    padding: 0 30px;

    background:
        rgba(8, 13, 25, 0.72);

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

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    z-index: 900;
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--text-muted);

    font-size: 12px;
}

.breadcrumb strong {
    color: var(--text-primary);
}

.breadcrumb-arrow {
    opacity: 0.5;
}

.menu-toggle {
    display: none;

    width: 40px;
    height: 40px;

    margin-right: 12px;

    border-radius: 11px;

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

    font-size: 20px;
}

.topbar-actions {
    gap: 9px;
}

.topbar-icon-button,
.topbar-avatar {
    position: relative;

    width: 39px;
    height: 39px;

    border-radius: 12px;

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

    transition: all var(--transition-fast);
}

.topbar-icon-button:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.topbar-avatar {
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--danger);

    box-shadow: 0 0 0 3px var(--bg-secondary);
}


/* ============================================================
   7. PAGE CONTAINER
   ============================================================ */

.page-container {
    width: min(1500px, 100%);
    margin: auto;
    padding: 30px;
}

.page {
    display: none;

    animation: pageEnter 0.4s ease both;
}

.page.active {
    display: block;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   8. HERO
   ============================================================ */

.hero-section {
    position: relative;

    min-height: 320px;

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

    padding: 45px;

    overflow: hidden;

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

    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(108, 99, 255, 0.22),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.11),
            rgba(76, 166, 255, 0.04)
        ),
        var(--surface-solid);

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

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 700px;
}

.eyebrow,
.panel-label {
    color: var(--accent-light);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.hero-content h2,
.page-heading h2,
.research-hero h2,
.focus-page h2 {
    margin-top: 9px;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.hero-content h2 span {
    color: var(--accent-light);
}

.hero-content p,
.page-heading p,
.research-hero p,
.focus-page > p {
    max-width: 650px;

    margin-top: 14px;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 25px;
}

.hero-visual {
    position: relative;

    width: 310px;
    height: 230px;

    display: grid;
    place-items: center;
}

.orb {
    position: absolute;

    border-radius: 50%;

    filter: blur(2px);

    animation: floatOrb 6s ease-in-out infinite;
}

.orb-one {
    width: 150px;
    height: 150px;

    background: rgba(108, 99, 255, 0.24);
}

.orb-two {
    width: 90px;
    height: 90px;

    background: rgba(76, 166, 255, 0.2);

    transform: translate(80px, 40px);

    animation-delay: -2s;
}

@keyframes floatOrb {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

.hero-card {
    position: relative;
    z-index: 2;

    width: 235px;

    padding: 22px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;

    background: rgba(12, 18, 32, 0.7);

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

    backdrop-filter: blur(18px);
}

.hero-card span {
    color: var(--text-muted);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hero-card strong {
    display: block;

    margin: 10px 0 17px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
}

.mini-progress {
    height: 6px;

    overflow: hidden;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.08);
}

.mini-progress span {
    display: block;
    height: 100%;

    border-radius: inherit;

    background: linear-gradient(
        90deg,
        var(--accent),
        var(--info)
    );
}

.hero-card small {
    display: block;

    margin-top: 9px;

    color: var(--text-muted);

    font-size: 9px;
}


/* ============================================================
   9. BUTTONS
   ============================================================ */

.primary-button,
.secondary-button,
.danger-button,
.small-button {
    min-height: 42px;

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

    padding: 0 17px;

    border-radius: 11px;

    font-size: 12px;
    font-weight: 700;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.primary-button {
    background:
        linear-gradient(
            135deg,
            var(--accent),
            #4c91ff
        );

    color: #fff;

    box-shadow:
        0 9px 25px rgba(108, 99, 255, 0.25);
}

.primary-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(108, 99, 255, 0.34);
}

.secondary-button {
    background: var(--surface-light);
    color: var(--text-primary);

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

.secondary-button:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.danger-button {
    background: rgba(255, 100, 124, 0.1);
    color: var(--danger);

    border: 1px solid rgba(255, 100, 124, 0.18);
}

.danger-button:hover {
    background: rgba(255, 100, 124, 0.17);
}

.small-button {
    min-height: 32px;

    padding: 0 10px;

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

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

    font-size: 10px;
}

.full-width {
    width: 100%;
}

.text-button {
    background: transparent;
    color: var(--accent-light);

    font-size: 10px;
    font-weight: 700;
}

.text-button:hover {
    color: #fff;
}


/* ============================================================
   10. DASHBOARD STATISTICS
   ============================================================ */

.stats-grid {
    display: grid;

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

    gap: 14px;

    margin-top: 20px;
}

.stat-card {
    min-height: 105px;

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

    padding: 20px;

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

    background: var(--surface);

    transition:
        transform var(--transition),
        border-color var(--transition);

    backdrop-filter: blur(15px);
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
}

.stat-icon {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);

    font-weight: 800;
}

.stat-card span {
    display: block;

    color: var(--text-muted);

    font-size: 10px;
    font-weight: 600;
}

.stat-card strong {
    display: block;

    margin-top: 5px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 24px;
}


/* ============================================================
   11. PANELS
   ============================================================ */

.dashboard-grid {
    display: grid;

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

    gap: 18px;

    margin-top: 18px;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0.01)
        ),
        var(--surface);

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

    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;

    padding: 22px 22px 17px;
}

.panel-header h3 {
    margin-top: 5px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
}

.study-plan-list,
.deadline-list,
.subject-progress-list {
    padding: 0 22px 22px;
}

.empty-state {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    color: var(--text-secondary);

    text-align: center;
}

.empty-state.small {
    min-height: 180px;
}

.empty-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 16px;

    background: var(--surface-light);

    color: var(--accent-light);

    font-size: 20px;
}

.empty-state h3,
.empty-state h4 {
    color: var(--text-primary);
}

.empty-state h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.empty-state h4 {
    font-size: 13px;
}

.empty-state p {
    max-width: 350px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.6;
}


/* ============================================================
   12. QUICK LAUNCH
   ============================================================ */

.quick-launch-grid {
    display: grid;

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

    gap: 10px;

    padding: 0 22px 22px;
}

.quick-launch {
    min-height: 105px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 15px;

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

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

    text-align: left;

    transition: all var(--transition-fast);
}

.quick-launch:hover {
    transform: translateY(-3px);
    background: var(--surface-hover);
    border-color: rgba(108, 99, 255, 0.25);
}

.quick-launch > span {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    margin-bottom: 9px;

    border-radius: 9px;

    background: rgba(108, 99, 255, 0.13);
    color: var(--accent-light);

    font-size: 13px;
    font-weight: 800;
}

.quick-launch strong {
    font-size: 12px;
}

.quick-launch small {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
}


/* ============================================================
   13. PAGE HEADINGS
   ============================================================ */

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 28px;
}

.page-heading h2 {
    font-size: clamp(29px, 4vw, 42px);
}


/* ============================================================
   14. SUBJECTS
   ============================================================ */

.subject-grid {
    display: grid;

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

    gap: 16px;
}

.subject-card {
    position: relative;

    min-height: 230px;

    padding: 22px;

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

    background: var(--surface);

    overflow: hidden;

    transition:
        transform var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.subject-card::before {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    top: -70px;
    right: -70px;

    border-radius: 50%;

    background: rgba(108, 99, 255, 0.13);
}

.subject-card:hover {
    transform: translateY(-5px);
    border-color: rgba(108, 99, 255, 0.25);
    box-shadow: var(--shadow-md);
}

.subject-card-header {
    position: relative;

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

.subject-card-icon {
    width: 47px;
    height: 47px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);

    font-weight: 800;
}

.subject-card h3 {
    position: relative;

    margin-top: 17px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 19px;
}

.subject-card p {
    position: relative;

    min-height: 38px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.6;
}

.subject-progress {
    margin-top: 18px;
}

.progress-track {
    height: 6px;

    overflow: hidden;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.07);
}

.progress-fill {
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--info)
        );
}

.progress-meta {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 9px;
}


/* ============================================================
   15. FILTER BAR
   ============================================================ */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 18px;
}

.filter-button {
    padding: 9px 14px;

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

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

    font-size: 10px;
    font-weight: 700;
}

.filter-button:hover,
.filter-button.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: rgba(108, 99, 255, 0.25);
    color: var(--accent-light);
}


/* ============================================================
   16. ASSIGNMENTS
   ============================================================ */

.assignment-list {
    display: grid;
    gap: 11px;
}

.assignment-item {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 17px;

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

    background: var(--surface);

    transition: all var(--transition-fast);
}

.assignment-item:hover {
    background: var(--surface-hover);
    transform: translateX(2px);
}

.assignment-check {
    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border: 1px solid var(--border-strong);
    border-radius: 8px;

    background: transparent;
    color: transparent;
}

.assignment-item.completed .assignment-check {
    background: var(--success);
    border-color: var(--success);
    color: #06150f;
}

.assignment-info {
    min-width: 0;
    flex: 1;
}

.assignment-info h3 {
    font-size: 13px;
}

.assignment-info p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 10px;
}

.assignment-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.priority {
    padding: 5px 8px;

    border-radius: 7px;

    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.priority.high {
    background: rgba(255, 100, 124, 0.12);
    color: var(--danger);
}

.priority.medium {
    background: rgba(255, 184, 77, 0.12);
    color: var(--warning);
}

.priority.low {
    background: rgba(39, 214, 155, 0.12);
    color: var(--success);
}

.deadline {
    color: var(--text-muted);
    font-size: 9px;
}


/* ============================================================
   17. PRACTICE
   ============================================================ */

.practice-selection {
    display: grid;

    grid-template-columns:
        1.15fr 0.85fr;

    gap: 18px;
}

.selection-card,
.practice-info-card {
    padding: 30px;

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

    background: var(--surface);
}

.large-icon {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    border-radius: 16px;

    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);

    font-size: 22px;
    font-weight: 800;
}

.selection-card h3,
.practice-info-card h3 {
    margin-top: 17px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 22px;
}

.selection-card > p,
.practice-info-card > p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.7;
}

.form-group {
    margin-top: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    color: var(--text-secondary);

    font-size: 10px;
    font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select,
.search-field input,
.search-field textarea {
    width: 100%;

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

    background: rgba(255, 255, 255, 0.035);
    color: var(--text-primary);

    padding: 12px 13px;

    font-size: 11px;

    transition:
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.search-field input:focus {
    border-color: rgba(108, 99, 255, 0.55);
    background: rgba(108, 99, 255, 0.045);
}

.form-group select option,
.setting-row select option {
    background: #111a2d;
    color: #fff;
}

.practice-info-card {
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(108, 99, 255, 0.16),
            transparent 35%
        ),
        var(--surface);
}

.feature-list {
    display: grid;
    gap: 11px;

    margin-top: 25px;
}

.feature-list div {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--text-secondary);

    font-size: 11px;
}

.feature-list span {
    color: var(--success);
    font-weight: 800;
}


/* ============================================================
   18. EXAMS
   ============================================================ */

.exam-grid {
    display: grid;

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

    gap: 16px;
}

.exam-card {
    padding: 23px;

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

    background: var(--surface);

    transition: all var(--transition);
}

.exam-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 99, 255, 0.25);
}

.exam-card-header {
    display: flex;
    justify-content: space-between;
}

.exam-card h3 {
    margin-top: 16px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.exam-card p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.6;
}

.exam-details {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;

    margin: 17px 0;
}

.exam-detail {
    padding: 6px 8px;

    border-radius: 7px;

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

    font-size: 8px;
}


/* ============================================================
   19. RESULTS
   ============================================================ */

.result-summary-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;
}

.result-summary-card {
    padding: 22px;

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

    background: var(--surface);
}

.result-summary-card span {
    color: var(--text-muted);
    font-size: 10px;
}

.result-summary-card strong {
    display: block;

    margin-top: 7px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 27px;
}

.results-table-wrapper {
    overflow-x: auto;
    padding: 0 22px 22px;
}

.results-table {
    width: 100%;
    border-collapse: collapse;

    font-size: 10px;
}

.results-table th,
.results-table td {
    padding: 14px 10px;

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

    text-align: left;
}

.results-table th {
    color: var(--text-muted);
    font-size: 9px;
    text-transform: uppercase;
}


/* ============================================================
   20. RESEARCH LAB
   ============================================================ */

.research-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 24px;
}

.research-hero h2 {
    font-size: clamp(30px, 4vw, 43px);
}

.research-status {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 9px 12px;

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

    background: var(--surface-light);

    color: var(--text-secondary);

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

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

    border-radius: 50%;

    background: var(--success);

    box-shadow: 0 0 0 4px rgba(39, 214, 155, 0.1);
}

.research-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 310px;

    gap: 18px;
}

.research-main {
    min-height: 650px;
}

.research-search {
    padding: 22px;

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

.research-search textarea {
    width: 100%;

    min-height: 125px;

    padding: 16px;

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

    background: rgba(0, 0, 0, 0.14);
    color: var(--text-primary);

    font-size: 12px;
    line-height: 1.6;
}

.research-search textarea:focus {
    border-color: rgba(108, 99, 255, 0.5);
}

.research-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;

    margin-top: 11px;
}

.research-workspace {
    min-height: 450px;
    padding: 25px;
}

.research-welcome {
    min-height: 410px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.research-logo {
    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(108, 99, 255, 0.2),
            rgba(76, 166, 255, 0.12)
        );

    color: var(--accent-light);

    font-size: 28px;

    box-shadow:
        0 15px 45px rgba(108, 99, 255, 0.14);
}

.research-welcome h3 {
    margin-top: 17px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
}

.research-welcome p {
    max-width: 460px;

    margin-top: 7px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.7;
}

.research-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;

    margin-top: 20px;
}

.research-suggestions button {
    padding: 9px 12px;

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

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

    font-size: 9px;
}

.research-suggestions button:hover {
    color: var(--accent-light);
    border-color: rgba(108, 99, 255, 0.3);
}

.research-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.saved-research-list {
    padding: 0 18px 18px;
}

.research-tips {
    padding: 22px;
}

.research-tips h3 {
    margin-top: 7px;

    font-family: "Space Grotesk", sans-serif;
}

.research-tips p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.7;
}


/* ============================================================
   21. NOTES
   ============================================================ */

.notes-toolbar {
    display: flex;
    gap: 10px;

    margin-bottom: 17px;
}

.search-field {
    min-height: 42px;

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

    flex: 1;

    padding: 0 12px;

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

    background: var(--surface);

    color: var(--text-muted);
}

.search-field input {
    border: none;
    background: transparent;
    padding: 0;
}

.notes-toolbar > select {
    min-width: 160px;

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

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

    padding: 0 12px;

    font-size: 10px;
}

.notes-grid {
    display: grid;

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

    gap: 15px;
}

.note-card {
    min-height: 210px;

    padding: 19px;

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

    background: var(--surface);

    transition: all var(--transition);
}

.note-card:hover {
    transform: translateY(-4px);
    border-color: rgba(108, 99, 255, 0.25);
}

.note-card h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
}

.note-card p {
    margin-top: 10px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.7;
}

.note-category {
    display: inline-flex;

    margin-bottom: 11px;
    padding: 5px 7px;

    border-radius: 6px;

    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-light);

    font-size: 8px;
    font-weight: 800;
}


/* ============================================================
   22. PLANNER / CALENDAR
   ============================================================ */

.calendar-panel {
    padding: 22px;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    margin-bottom: 22px;
}

.calendar-header h3 {
    min-width: 150px;

    font-family: "Space Grotesk", sans-serif;
    text-align: center;
}

.calendar-nav {
    width: 35px;
    height: 35px;

    border-radius: 10px;

    background: var(--surface-light);
    color: var(--text-secondary);
}

.calendar-nav:hover {
    background: var(--surface-hover);
    color: #fff;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;

    grid-template-columns:
        repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    margin-bottom: 7px;
}

.calendar-weekdays span {
    padding: 8px;

    color: var(--text-muted);

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

    text-align: center;
}

.calendar-day {
    position: relative;

    min-height: 80px;

    padding: 9px;

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

    background: rgba(255, 255, 255, 0.015);

    cursor: pointer;

    transition: background var(--transition-fast);
}

.calendar-day:hover {
    background: var(--surface-light);
}

.calendar-day-number {
    color: var(--text-secondary);
    font-size: 10px;
}

.calendar-day.today {
    background: rgba(108, 99, 255, 0.08);
}

.calendar-day.today .calendar-day-number {
    color: var(--accent-light);
    font-weight: 800;
}

.calendar-day.other-month {
    opacity: 0.35;
}

.calendar-event {
    margin-top: 7px;
    padding: 4px 5px;

    overflow: hidden;

    border-radius: 5px;

    background: rgba(108, 99, 255, 0.13);
    color: var(--accent-light);

    font-size: 7px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.planner-events {
    margin-top: 18px;
}

.planner-event-list {
    padding: 0 22px 22px;
}

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

    padding: 13px 0;

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

.planner-event:last-child {
    border-bottom: none;
}

.planner-event-date {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-light);

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

.planner-event-info {
    flex: 1;
}

.planner-event-info strong {
    font-size: 11px;
}

.planner-event-info span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
}


/* ============================================================
   23. FOCUS MODE
   ============================================================ */

.focus-page {
    min-height: 720px;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 35px;

    text-align: center;
}

.focus-page > p {
    max-width: 500px;
}

.focus-timer-card {
    width: min(620px, 100%);

    margin-top: 38px;
    padding: 42px 25px;

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

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(108, 99, 255, 0.13),
            transparent 50%
        ),
        var(--surface);

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

.focus-mode-label {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
}

.focus-timer {
    margin-top: 14px;

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(65px, 12vw, 110px);
    font-weight: 700;
    letter-spacing: -5px;
}

.focus-session-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: var(--text-muted);

    font-size: 10px;
}

.focus-controls {
    display: flex;
    justify-content: center;
    gap: 9px;

    margin-top: 27px;
}

.focus-presets {
    display: grid;

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

    width: min(620px, 100%);

    gap: 8px;

    margin-top: 15px;
}

.focus-preset {
    padding: 14px;

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

    background: var(--surface-light);
    color: var(--text-secondary);
}

.focus-preset.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: rgba(108, 99, 255, 0.3);
    color: var(--accent-light);
}

.focus-preset strong,
.focus-preset span {
    display: block;
}

.focus-preset strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 18px;
}

.focus-preset span {
    margin-top: 3px;
    font-size: 8px;
}


/* ============================================================
   24. TOOLBOX
   ============================================================ */

.tools-grid {
    display: grid;

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

    gap: 15px;
}

.tool-card {
    min-height: 170px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 20px;

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

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

    text-align: left;

    transition: all var(--transition);
}

.tool-card:hover {
    transform: translateY(-5px);

    border-color: rgba(108, 99, 255, 0.25);

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

.tool-icon {
    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 13px;

    background: rgba(108, 99, 255, 0.11);
    color: var(--accent-light);

    font-size: 18px;
    font-weight: 800;
}

.tool-card strong {
    font-size: 13px;
}

.tool-card small {
    margin-top: 5px;

    color: var(--text-muted);

    font-size: 9px;
}


/* ============================================================
   25. CODE LAB
   ============================================================ */

.code-lab {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    min-height: 650px;

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

    overflow: hidden;

    background: #070b14;
}

.code-editor-panel,
.code-preview-panel {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.code-editor-panel {
    border-right: 1px solid var(--border);
}

.editor-header {
    min-height: 48px;

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

    padding: 0 12px;

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

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-muted);

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

.editor-tab {
    min-height: 30px;

    padding: 0 9px;

    border-radius: 7px;

    background: transparent;
    color: var(--text-muted);

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

.editor-tab.active {
    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);
}

.code-editor {
    flex: 1;

    width: 100%;

    padding: 20px;

    border: none;
    outline: none;

    background: #070b14;
    color: #dce4f5;

    font-family: "Courier New", monospace;
    font-size: 12px;
    line-height: 1.7;

    tab-size: 2;
}

.hidden {
    display: none !important;
}

.code-preview-panel iframe {
    width: 100%;
    height: 100%;

    flex: 1;

    border: none;

    background: white;
}


/* ============================================================
   26. FILE CENTER
   ============================================================ */

.file-drop-zone {
    min-height: 230px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;

    border: 1px dashed rgba(108, 99, 255, 0.35);
    border-radius: var(--radius-lg);

    background: rgba(108, 99, 255, 0.035);

    text-align: center;

    transition: all var(--transition);
}

.file-drop-zone.dragging {
    background: rgba(108, 99, 255, 0.1);
    border-color: var(--accent);
}

.file-drop-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 14px;

    border-radius: 17px;

    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);

    font-size: 24px;
}

.file-drop-zone h3 {
    font-family: "Space Grotesk", sans-serif;
}

.file-drop-zone p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 10px;
}

.file-list {
    display: grid;
    gap: 9px;

    margin-top: 18px;
}

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

    padding: 14px;

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

    background: var(--surface);
}

.file-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: var(--surface-light);
    color: var(--accent-light);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-info strong {
    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 11px;
}

.file-info span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 8px;
}


/* ============================================================
   27. ANALYTICS
   ============================================================ */

.analytics-stat-grid {
    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;
}

.analytics-card {
    padding: 21px;

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

    background: var(--surface);
}

.analytics-card span {
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
}

.analytics-card strong {
    display: block;

    margin-top: 7px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 26px;
}

.analytics-card small {
    display: block;

    margin-top: 5px;

    color: var(--text-muted);

    font-size: 8px;
}

.analytics-grid {
    display: grid;

    grid-template-columns:
        1.3fr 0.7fr;

    gap: 18px;
}

.activity-chart {
    min-height: 330px;

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

    margin: 0 22px 22px;

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

    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 65px,
            rgba(255, 255, 255, 0.04) 66px
        );
}

.chart-placeholder {
    color: var(--text-muted);
    font-size: 10px;
    text-align: center;
}

.subject-analytics {
    padding: 0 22px 22px;
}


/* ============================================================
   28. SETTINGS
   ============================================================ */

.settings-layout {
    display: grid;

    grid-template-columns:
        220px minmax(0, 1fr);

    gap: 18px;
}

.settings-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.settings-tab {
    padding: 12px;

    border-radius: 10px;

    background: transparent;
    color: var(--text-muted);

    text-align: left;

    font-size: 10px;
    font-weight: 700;
}

.settings-tab:hover,
.settings-tab.active {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-light);
}

.settings-content {
    padding: 27px;

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

    background: var(--surface);
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section h3 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
}

.settings-section > p {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.6;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 17px 0;

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

.setting-row:first-of-type {
    margin-top: 18px;
}

.setting-row strong,
.setting-row small {
    display: block;
}

.setting-row strong {
    font-size: 11px;
}

.setting-row small {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 9px;
}

.setting-row select {
    min-width: 120px;

    padding: 9px 10px;

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

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

    font-size: 10px;
}

.toggle {
    position: relative;

    width: 43px;
    height: 24px;

    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle span {
    position: absolute;
    inset: 0;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.12);

    cursor: pointer;

    transition: var(--transition);
}

.toggle span::before {
    content: "";

    position: absolute;

    width: 18px;
    height: 18px;

    top: 3px;
    left: 3px;

    border-radius: 50%;

    background: #fff;

    transition: var(--transition);
}

.toggle input:checked + span {
    background: var(--accent);
}

.toggle input:checked + span::before {
    transform: translateX(19px);
}

.data-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 22px;
}

.about-version {
    display: flex;
    justify-content: space-between;

    margin-top: 24px;
    padding: 15px;

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

    background: var(--surface-light);

    font-size: 10px;
}

.about-version span {
    color: var(--text-muted);
}


/* ============================================================
   29. FOOTER
   ============================================================ */

.app-footer {
    margin-top: 55px;
    padding: 34px 30px 25px;

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

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.012),
            rgba(0, 0, 0, 0.08)
        );
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    max-width: 1500px;
    margin: auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.footer-logo {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #3f8cff
        );

    font-family: "Space Grotesk", sans-serif;
    font-weight: 800;
}

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

.footer-brand strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 13px;
}

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

    color: var(--text-muted);

    font-size: 8px;
}

.footer-description {
    max-width: 470px;

    color: var(--text-muted);

    font-size: 9px;
    line-height: 1.7;
}

.footer-bottom {
    max-width: 1500px;

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

    margin: 25px auto 0;
    padding-top: 18px;

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

    color: var(--text-muted);

    font-size: 9px;
}

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


/* ============================================================
   30. MODALS
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    z-index: 2000;
}

.modal.open {
    display: flex;

    animation: modalFade 0.2s ease both;
}

.modal-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    z-index: 2;

    width: min(600px, 100%);
    max-height: 90vh;

    overflow-y: auto;

    padding: 25px;

    border: 1px solid var(--border-strong);
    border-radius: 22px;

    background:
        linear-gradient(
            180deg,
            #121b2e,
            #0c1322
        );

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

    animation: modalUp 0.28s ease both;
}

@keyframes modalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalUp {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.modal-header h3 {
    margin-top: 5px;

    font-family: "Space Grotesk", sans-serif;
    font-size: 20px;
}

.modal-close {
    width: 34px;
    height: 34px;

    border-radius: 9px;

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

    font-size: 21px;
}

.modal-close:hover {
    background: var(--surface-hover);
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    margin-top: 24px;
}

.form-row {
    display: grid;

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

    gap: 12px;
}


/* ============================================================
   31. GLOBAL SEARCH MODAL
   ============================================================ */

.search-modal-card {
    width: min(700px, 100%);
}

.search-field.large {
    min-height: 50px;
}

.global-search-results {
    max-height: 450px;
    overflow-y: auto;

    margin-top: 14px;
}


/* ============================================================
   32. NOTIFICATIONS
   ============================================================ */

.notification-panel {
    position: fixed;

    top: 82px;
    right: 25px;

    width: min(380px, calc(100vw - 30px));
    max-height: calc(100vh - 100px);

    overflow-y: auto;

    display: none;

    padding: 20px;

    border: 1px solid var(--border-strong);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #121b2e,
            #0b1220
        );

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

    z-index: 1500;
}

.notification-panel.open {
    display: block;

    animation: modalUp 0.2s ease both;
}

.notification-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;

    padding-bottom: 14px;

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

.notification-header h3 {
    margin-top: 5px;

    font-family: "Space Grotesk", sans-serif;
}

.notification-list {
    padding-top: 7px;
}

.notification-item {
    display: flex;
    gap: 10px;

    padding: 13px 0;

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

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: rgba(108, 99, 255, 0.1);
    color: var(--accent-light);
}

.notification-content strong {
    display: block;
    font-size: 10px;
}

.notification-content p {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
    line-height: 1.5;
}


/* ============================================================
   33. ASSESSMENT MODAL
   ============================================================ */

.fullscreen-modal {
    padding: 0;
}

.assessment-card {
    width: 100%;
    height: 100%;
    max-height: 100vh;

    display: flex;
    flex-direction: column;

    border-radius: 0;

    padding: 0;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(108, 99, 255, 0.08),
            transparent 45%
        ),
        #080d19;
}

.assessment-header {
    min-height: 78px;

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

    padding: 0 30px;

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

.assessment-header h3 {
    margin-top: 4px;

    font-family: "Space Grotesk", sans-serif;
}

.assessment-meta {
    display: flex;
    gap: 25px;
}

.assessment-meta div {
    text-align: right;
}

.assessment-meta small,
.assessment-meta strong {
    display: block;
}

.assessment-meta small {
    color: var(--text-muted);
    font-size: 8px;
}

.assessment-meta strong {
    margin-top: 3px;
    font-size: 11px;
}

.assessment-progress {
    height: 4px;

    background: rgba(255, 255, 255, 0.05);
}

.assessment-progress span {
    display: block;
    width: 0;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            var(--accent),
            var(--info)
        );

    transition: width 0.3s ease;
}

.assessment-body {
    flex: 1;

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

    padding: 30px;

    overflow-y: auto;
}

.question-card {
    width: min(850px, 100%);

    padding: 35px;

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

    background: var(--surface);

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

.question-label {
    color: var(--accent-light);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.question-card h2 {
    margin-top: 13px;

    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(20px, 3vw, 28px);
    line-height: 1.35;
}

.answer-options {
    display: grid;
    gap: 10px;

    margin-top: 25px;
}

.answer-option {
    position: relative;

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

    padding: 15px;

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

    background: var(--surface-light);

    color: var(--text-secondary);

    text-align: left;

    transition: all var(--transition-fast);
}

.answer-option:hover {
    background: var(--surface-hover);
    border-color: rgba(108, 99, 255, 0.3);
}

.answer-option.selected {
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.45);
    color: #fff;
}

.answer-letter {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: rgba(255, 255, 255, 0.06);

    font-size: 10px;
    font-weight: 800;
}

.assessment-footer {
    min-height: 80px;

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

    padding: 0 30px;

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


/* ============================================================
   34. TOASTS
   ============================================================ */

.toast-container {
    position: fixed;

    right: 20px;
    bottom: 20px;

    display: flex;
    flex-direction: column;
    gap: 9px;

    width: min(350px, calc(100vw - 40px));

    z-index: 5000;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 14px;

    border: 1px solid var(--border-strong);
    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #141e32,
            #0d1424
        );

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

    animation: toastIn 0.3s ease both;
}

.toast.success {
    border-color: rgba(39, 214, 155, 0.25);
}

.toast.error {
    border-color: rgba(255, 100, 124, 0.25);
}

.toast-icon {
    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: rgba(108, 99, 255, 0.12);
    color: var(--accent-light);

    font-size: 11px;
}

.toast strong {
    display: block;
    font-size: 10px;
}

.toast p {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 9px;
    line-height: 1.4;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ============================================================
   35. LIGHT THEME
   ============================================================ */

body.light-theme {
    --bg-main: #f3f6fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #edf1f7;

    --surface: rgba(255, 255, 255, 0.94);
    --surface-solid: #ffffff;
    --surface-light: rgba(12, 24, 45, 0.045);
    --surface-hover: rgba(12, 24, 45, 0.07);

    --border: rgba(12, 24, 45, 0.09);
    --border-strong: rgba(12, 24, 45, 0.15);

    --text-primary: #101828;
    --text-secondary: #475467;
    --text-muted: #667085;

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

body.light-theme .sidebar {
    background: #ffffff;
}

body.light-theme .topbar {
    background: rgba(255, 255, 255, 0.78);
}

body.light-theme .hero-section {
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(108, 99, 255, 0.12),
            transparent 30%
        ),
        #ffffff;
}

body.light-theme .hero-card {
    background: rgba(255, 255, 255, 0.82);
}

body.light-theme .modal-card,
body.light-theme .notification-panel {
    background: #ffffff;
}

body.light-theme .assessment-card {
    background: #f3f6fb;
}

body.light-theme .code-editor,
body.light-theme .code-lab {
    background: #101522;
    color: #e8edf7;
}


/* ============================================================
   36. COMPACT MODE
   ============================================================ */

body.compact-mode .nav-item {
    min-height: 38px;
}

body.compact-mode .page-container {
    padding-top: 20px;
}

body.compact-mode .panel-header {
    padding: 17px 18px 13px;
}

body.compact-mode .hero-section {
    min-height: 280px;
    padding: 32px;
}


/* ============================================================
   37. RESPONSIVE — LARGE TABLETS
   ============================================================ */

@media (max-width: 1200px) {

    :root {
        --sidebar-width: 235px;
    }

    .page-container {
        padding: 25px;
    }

    .hero-visual {
        width: 250px;
    }

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

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

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


/* ============================================================
   38. RESPONSIVE — TABLETS
   ============================================================ */

@media (max-width: 950px) {

    :root {
        --sidebar-width: 270px;
    }

    .sidebar {
        transform: translateX(-100%);

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

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

    .sidebar-close {
        display: block;
    }

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

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

    .sidebar-overlay {
        position: fixed;
        inset: 0;

        display: none;

        background: rgba(0, 0, 0, 0.55);

        z-index: 950;
    }

    .sidebar-overlay.open {
        display: block;
    }

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

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

    .practice-selection,
    .analytics-grid,
    .research-layout {
        grid-template-columns: 1fr;
    }

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

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-navigation {
        flex-direction: row;
        overflow-x: auto;
    }

    .settings-tab {
        white-space: nowrap;
    }
}


/* ============================================================
   39. RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 650px) {

    :root {
        --topbar-height: 66px;
    }

    body {
        font-size: 14px;
    }

    .topbar {
        padding: 0 14px;
    }

    .page-container {
        padding: 18px 14px;
    }

    .breadcrumb span:first-child,
    .breadcrumb-arrow {
        display: none;
    }

    .hero-section {
        min-height: auto;

        display: block;

        padding: 28px 22px;
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 12px;
    }

    .hero-visual {
        width: 100%;
        height: 170px;

        margin-top: 10px;
    }

    .hero-card {
        width: 205px;
    }

    .stats-grid,
    .result-summary-grid,
    .analytics-stat-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .stat-card {
        min-height: 92px;
        padding: 14px;
        gap: 9px;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .dashboard-grid {
        gap: 12px;
    }

    .page-heading {
        display: block;
    }

    .page-heading h2 {
        font-size: 31px;
    }

    .page-heading > .primary-button {
        margin-top: 17px;
    }

    .subject-grid,
    .notes-grid,
    .exam-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

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

    .assignment-item {
        align-items: flex-start;
    }

    .assignment-meta {
        display: none;
    }

    .practice-selection {
        gap: 12px;
    }

    .selection-card,
    .practice-info-card {
        padding: 22px;
    }

    .research-hero {
        display: block;
    }

    .research-status {
        width: fit-content;
        margin-top: 13px;
    }

    .research-sidebar {
        grid-template-columns: 1fr;
    }

    .research-main {
        min-height: 580px;
    }

    .research-actions {
        flex-direction: column;
    }

    .research-actions button {
        width: 100%;
    }

    .notes-toolbar {
        flex-direction: column;
    }

    .notes-toolbar > select {
        width: 100%;
        min-height: 42px;
    }

    .calendar-panel {
        padding: 10px;
    }

    .calendar-day {
        min-height: 55px;
        padding: 5px;
    }

    .calendar-weekdays span {
        font-size: 7px;
    }

    .calendar-event {
        display: none;
    }

    .focus-page {
        min-height: 620px;
    }

    .focus-timer-card {
        padding: 30px 16px;
    }

    .focus-timer {
        font-size: 72px;
    }

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

    .code-lab {
        grid-template-columns: 1fr;

        min-height: 800px;
    }

    .code-editor-panel {
        min-height: 400px;

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

    .code-preview-panel {
        min-height: 400px;
    }

    .settings-content {
        padding: 20px;
    }

    .setting-row {
        align-items: flex-start;
    }

    .footer-main,
    .footer-bottom {
        display: block;
    }

    .footer-description {
        margin-top: 16px;
    }

    .footer-bottom p + p {
        margin-top: 8px;
    }

    .app-footer {
        padding: 27px 18px 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .assessment-header {
        padding: 0 16px;
    }

    .assessment-meta {
        gap: 12px;
    }

    .assessment-body {
        padding: 16px;
    }

    .question-card {
        padding: 22px;
    }

    .assessment-footer {
        padding: 0 16px;
    }

    .notification-panel {
        right: 15px;
    }
}


/* ============================================================
   40. RESPONSIVE — VERY SMALL PHONES
   ============================================================ */

@media (max-width: 390px) {

    .stats-grid,
    .result-summary-grid,
    .analytics-stat-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions button {
        width: 100%;
    }

    .quick-launch-grid {
        grid-template-columns: 1fr;
    }

    .focus-timer {
        font-size: 60px;
        letter-spacing: -3px;
    }

    .topbar-icon-button {
        width: 35px;
        height: 35px;
    }
}


/* ============================================================
   41. ACCESSIBILITY
   ============================================================ */

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-light);
    outline-offset: 2px;
}


/* ============================================================
   42. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   END OF ADAPT OS STYLESHEET
   ============================================================ */