
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* =========================================================
   LOKSEWA TAYARI — COMPLETE DASHBOARD STYLESHEET
   Version: 4.0
   Dashboard + Settings + Profile + Help + About
========================================================= */

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

:root {
    --primary: #5479ed;
    --primary-dark: #3659b8;
    --primary-light: #edf2ff;
    --primary-soft: rgba(84, 121, 237, 0.10);

    --success: #159b70;
    --success-light: #e7f8f1;

    --warning: #e58a32;
    --warning-light: #fff4e6;

    --danger: #e05252;
    --danger-light: #fff0f0;

    --purple: #7955d9;
    --blue: #3987dc;

    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-secondary: #f8faff;

    --text: #202a3b;
    --text-secondary: #586579;
    --muted: #8993a4;

    --border: #e8edf5;
    --border-strong: #dce3ee;

    --shadow-sm: 0 2px 8px rgba(29, 43, 76, 0.04);
    --shadow-md: 0 8px 24px rgba(29, 43, 76, 0.07);
    --shadow-lg: 0 18px 50px rgba(29, 43, 76, 0.13);

    --radius-sm: 10px;
    --radius-md: 15px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --transition: 0.25s ease;

    --font-main: 'DM Sans', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

/* =========================================================
   2. DARK THEME
========================================================= */

body[data-theme="dark"] {
    --bg: #111827;
    --surface: #1b2535;
    --surface-secondary: #222e40;

    --text: #f0f4fa;
    --text-secondary: #c0cad8;
    --muted: #8c9bb0;

    --border: #303d50;
    --border-strong: #405069;

    --primary-light: rgba(84, 121, 237, 0.16);
    --primary-soft: rgba(84, 121, 237, 0.13);

    --success-light: rgba(21, 155, 112, 0.14);
    --warning-light: rgba(229, 138, 50, 0.14);
    --danger-light: rgba(224, 82, 82, 0.14);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.28);
}

/* =========================================================
   3. RESET & GLOBAL
========================================================= */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    transition:
        background var(--transition),
        color var(--transition);
}

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

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

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

img {
    display: block;
    max-width: 100%;
}

ul {
    list-style-position: inside;
}

::selection {
    background: var(--primary);
    color: #ffffff;
}

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

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

::-webkit-scrollbar-thumb {
    background: #c7d0df;
    border-radius: 20px;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #45536a;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(84, 121, 237, 0.35);
    outline-offset: 3px;
}

/* =========================================================
   4. TYPOGRAPHY
========================================================= */

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text);
    line-height: 1.3;
}

p {
    color: var(--text-secondary);
}

.eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

/* =========================================================
   5. NAVIGATION
========================================================= */

.navbar {
    width: 100%;
    min-height: 82px;
    padding: 0 5.5%;
    background: var(--surface);
    border-bottom: 1px solid var(--border);

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

    position: sticky;
    top: 0;
    z-index: 1000;

    transition: background var(--transition);
}

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

.brand-logo {
    width: 43px;
    height: 43px;
    border-radius: 13px;

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

    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;

    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 800;

    box-shadow: 0 5px 14px rgba(84, 121, 237, 0.25);
}

.brand h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand h2 span {
    color: var(--primary);
}

.brand small {
    display: block;
    margin-top: 1px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 7px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 13px;
    border-radius: 9px;

    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;

    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

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

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

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

    transition: var(--transition);
}

.settings-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

/* MORE MENU */

.more-wrapper {
    position: relative;
}

.more-btn {
    width: 39px;
    height: 39px;

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

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

    font-size: 25px;
    line-height: 1;

    transition: var(--transition);
}

.more-btn:hover,
.more-btn[aria-expanded="true"] {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;

    width: 225px;
    padding: 7px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: var(--shadow-lg);

    z-index: 1200;

    display: none;
}

.dropdown.show,
.dropdown.active {
    display: block;
    animation: dropdownEnter 0.18s ease;
}

.dropdown button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;

    padding: 11px 12px;
    border: none;
    border-radius: 8px;

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

    text-align: left;
    font-size: 12px;
    font-weight: 600;

    transition: var(--transition);
}

.dropdown button:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 4px;
}

.dropdown .reset-menu-btn {
    color: var(--danger);
}

.dropdown .reset-menu-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}

@keyframes dropdownEnter {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

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

/* =========================================================
   6. MAIN CONTAINER
========================================================= */

.container {
    width: min(1400px, 90%);
    margin: 35px auto 0;
}

/* =========================================================
   7. WELCOME CARD
========================================================= */

.welcome-card {
    min-height: 210px;
    padding: 30px 34px;

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

    position: relative;
    overflow: hidden;

    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 90% 15%, rgba(255,255,255,0.17), transparent 30%),
        linear-gradient(115deg, #3659b8 0%, #5479ed 55%, #7192f4 100%);

    box-shadow: 0 12px 30px rgba(84, 121, 237, 0.17);
}

.welcome-card::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: 17%;
    bottom: -220px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 50%;
    box-shadow:
        0 0 0 35px rgba(255,255,255,0.04),
        0 0 0 70px rgba(255,255,255,0.03);
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
    max-width: 650px;
}

.welcome-label {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.75);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
}

.welcome-content h2 {
    margin-bottom: 8px;
    color: #ffffff;
    font-size: clamp(27px, 3vw, 35px);
    font-weight: 800;
}

.welcome-content p {
    max-width: 500px;
    color: rgba(255,255,255,0.83);
    font-size: 13px;
}

.welcome-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 22px;
}

.welcome-info div {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 600;
}

.welcome-info i {
    font-size: 13px;
}

/* =========================================================
   PROFILE PREVIEW
   Profile Photo + Student Information
========================================================= */

.profile-section {
    display: flex;
    align-items: center;
    gap: 15px;

    padding: 13px 18px;

    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    position: relative;
    z-index: 1;

    min-width: 0;
}

/* PROFILE AVATAR */

.profile-avatar {
    width: 65px;
    height: 65px;
    min-width: 65px;

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

    position: relative;
    overflow: hidden;

    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;

    background: #ffffff;

    cursor: pointer;

    isolation: isolate;
}

/* PROFILE IMAGE */

.profile-avatar img {
    display: block !important;

    width: 100%;
    height: 100%;

    position: absolute;
    inset: 0;

    object-fit: cover;
    object-position: center;

    border-radius: 50%;
}

/* REMOVE BLUE INITIAL / PROFILE ICON */

.profile-avatar #profileInitial,
.profile-avatar > span,
.profile-avatar > i,
.profile-avatar .profile-icon {
    display: none !important;
}

/* CAMERA ICON */

.profile-avatar .camera-icon {
    position: absolute;
    right: 0;
    bottom: 0;

    width: 23px;
    height: 23px;

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

    border: 2px solid #ffffff;
    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

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

    z-index: 2;
}

/* PROFILE DETAILS */

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 3px;

    min-width: 0;
}

.profile-details strong {
    color: #ffffff;

    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;

    line-height: 1.4;

    overflow-wrap: anywhere;
}

.profile-details > span {
    color: rgba(255, 255, 255, 0.82);

    font-size: 10px;
    font-weight: 500;

    line-height: 1.4;
}

/* PROFILE BADGE */

.profile-details .profile-badge {
    width: fit-content;

    margin-top: 5px;
    padding: 4px 9px;

    border-radius: 20px;

    background: rgba(255, 255, 255, 0.19);
    color: #ffffff;

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

    line-height: 1.3;
}

/* PROFILE HOVER EFFECT */

.profile-avatar {
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* MOBILE RESPONSIVE */

@media (max-width: 520px) {

    .profile-section {
        gap: 12px;
        padding: 11px 13px;
    }

    .profile-avatar {
        width: 58px;
        height: 58px;
        min-width: 58px;
    }

    .profile-details strong {
        font-size: 13px;
    }

    .profile-details > span {
        font-size: 9px;
    }

    .profile-details .profile-badge {
        font-size: 8px;
    }
}

@media (max-width: 360px) {

    .profile-section {
        gap: 9px;
        padding: 9px 10px;
    }

    .profile-avatar {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
}

/* =========================================================
   8. QUICK STATISTICS
========================================================= */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
    margin-top: 22px;
}

.stat-card {
    min-height: 112px;
    padding: 19px;

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

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon,
.summary-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;

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

    border-radius: 13px;
    font-size: 21px;
    font-weight: 700;
}

.purple {
    background: rgba(121, 85, 217, 0.12);
    color: var(--purple);
}

.green {
    background: rgba(21, 155, 112, 0.12);
    color: var(--success);
}

.orange {
    background: rgba(229, 138, 50, 0.13);
    color: var(--warning);
}

.blue {
    background: rgba(57, 135, 220, 0.12);
    color: var(--blue);
}

.stat-card span {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.stat-card h2 {
    margin: 2px 0;
    font-size: 23px;
    font-weight: 800;
}

.stat-card small {
    color: var(--muted);
    font-size: 9px;
}

/* =========================================================
   9. ANALYTICS GRID
========================================================= */

.analytics-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
    gap: 22px;
    margin-top: 23px;
}

.panel {
    padding: 23px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

.panel-heading h2,
.column-heading h2 {
    font-size: 19px;
    font-weight: 800;
}

.panel-heading p {
    margin-top: 5px;
    font-size: 11px;
}

.panel-heading select,
.timer-subject select,
.setting-item select,
.form-group select {
    min-width: 120px;
    padding: 9px 11px;

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

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

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

.panel-heading select:focus,
.timer-subject select:focus,
.setting-item select:focus,
.form-group select:focus {
    border-color: var(--primary);
}

/* =========================================================
   9. PERFORMANCE CHART
========================================================= */

.chart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-top: 24px;
    padding: 0 2px;
}

.chart-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.chart-summary strong {
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
}

.graph-container {
    width: 100%;
    height: 265px;

    margin-top: 15px;

    position: relative;
    overflow: hidden;
}

.graph-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}


/* =========================================================
   10. SYLLABUS PROGRESS
========================================================= */

.syllabus-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}


/* COLUMN HEADING */

.column-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.column-heading h2,
.column-heading h3 {
    min-width: 0;
    overflow-wrap: anywhere;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 11px;

    border-radius: 20px;

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

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

    white-space: nowrap;
    flex-shrink: 0;
}


/* SYLLABUS CARD */

.syllabus-card {
    width: 100%;
    min-width: 0;

    padding: 19px;

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

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

    transition: var(--transition);
}


/* SYLLABUS HEADING */

.syllabus-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-width: 0;
}

.syllabus-heading > div:first-child {
    min-width: 0;
}

.syllabus-heading h3 {
    color: var(--text);

    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;

    line-height: 1.4;
    overflow-wrap: anywhere;
}

.syllabus-heading p {
    margin-top: 4px;

    color: var(--muted);
    font-size: 10px;
    font-weight: 500;

    line-height: 1.5;
}

.chapter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 10px;

    border-radius: 20px;

    background: var(--success-light);
    color: var(--success);

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

    white-space: nowrap;
    flex-shrink: 0;
}


/* =========================================================
   CHART CONTENT
========================================================= */

.chart-content {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);

    align-items: center;
    gap: 17px;

    margin-top: 20px;
    min-width: 0;
}


/* DONUT CHART */

.donut-chart {
    width: 110px;
    height: 110px;
    min-width: 110px;

    position: relative;

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

.donut-chart canvas {
    display: block;

    width: 100% !important;
    height: 100% !important;
}


/* DONUT CENTER */

.donut-center {
    position: absolute;
    inset: 0;

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

    text-align: center;

    pointer-events: none;
    z-index: 1;
}

.donut-center strong {
    color: var(--text);

    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;

    line-height: 1.2;
}

.donut-center span {
    margin-top: 3px;

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

    line-height: 1.3;
}


/* =========================================================
   CHAPTER LIST
========================================================= */

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 7px;

    width: 100%;
    min-width: 0;
}


/* INDIVIDUAL CHAPTER */

.chapter-item {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    width: 100%;
    min-width: 0;

    padding: 7px 8px;

    border-radius: 8px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.chapter-item:hover {
    background: var(--primary-light);
    transform: translateX(2px);
}


/* CHAPTER STATUS DOT */

.chapter-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;

    margin-top: 4px;

    border-radius: 50%;

    background: #cbd3df;

    flex-shrink: 0;
}


/* COMPLETED STATUS */

.chapter-item.completed .chapter-dot {
    background: var(--success);
}


/* PENDING STATUS */

.chapter-item:not(.completed) .chapter-dot {
    background: #cbd3df;
}


/* =========================================================
   CHAPTER NAME
   SAME FONT SIZE FOR COMPLETED AND PENDING
========================================================= */

.chapter-name {
    display: block;

    width: 100%;
    min-width: 0;

    color: var(--text-secondary);

    font-size: 10px !important;
    font-weight: 600 !important;

    line-height: 1.5;

    overflow-wrap: anywhere;
    word-break: normal;
}


/* COMPLETED CHAPTER TEXT */

.chapter-item.completed .chapter-name {
    color: var(--success);
    font-size: 10px !important;
    font-weight: 600 !important;
}


/* PENDING CHAPTER TEXT */

.chapter-item:not(.completed) .chapter-name {
    color: var(--text-secondary);
    font-size: 10px !important;
    font-weight: 600 !important;
}


/* =========================================================
   RESPONSIVE DESIGN
========================================================= */

@media (max-width: 760px) {

    .graph-container {
        height: 235px;
    }

    .syllabus-card {
        padding: 16px;
    }

    .chart-content {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 13px;
    }

    .donut-chart {
        width: 105px;
        height: 105px;
        min-width: 105px;
    }

    .chapter-list {
        gap: 5px;
    }
}


/* TABLET AND MOBILE */

@media (max-width: 520px) {

    .chart-summary {
        margin-top: 18px;
    }

    .chart-summary strong {
        font-size: 17px;
    }

    .graph-container {
        height: 210px;
    }

    .syllabus-card {
        padding: 14px;
    }

    .syllabus-heading h3 {
        font-size: 13px;
    }

    .chart-content {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 10px;

        margin-top: 16px;
    }

    .donut-chart {
        width: 95px;
        height: 95px;
        min-width: 95px;
    }

    .donut-center strong {
        font-size: 18px;
    }

    .chapter-item {
        gap: 7px;
        padding: 6px;
    }

    .chapter-name,
    .chapter-item.completed .chapter-name,
    .chapter-item:not(.completed) .chapter-name {
        font-size: 10px !important;
        font-weight: 600 !important;
    }
}


/* SMALL MOBILE */

@media (max-width: 360px) {

    .chart-content {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }

    .donut-chart {
        width: 110px;
        height: 110px;
    }

    .chapter-list {
        width: 100%;
    }

    .chapter-item {
        padding: 7px 8px;
    }

    .chapter-name,
    .chapter-item.completed .chapter-name,
    .chapter-item:not(.completed) .chapter-name {
        font-size: 10px !important;
        font-weight: 600 !important;
    }

    .syllabus-heading {
        align-items: flex-start;
    }

    .chapter-count {
        font-size: 9px;
        padding: 5px 8px;
    }
}

/* =========================================================
   11. WEEKLY ROUTINE
========================================================= */

.routine-panel {
    margin-top: 23px;
}

.routine-heading {
    align-items: center;
}

.routine-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.routine-progress strong {
    color: var(--success);
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
}

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

.table-wrapper {
    width: 100%;
    margin-top: 22px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.routine-table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    background: var(--surface);
}

.routine-table th {
    padding: 13px 9px;
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--border);

    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    white-space: nowrap;
}

.routine-table th:first-child {
    min-width: 190px;
    text-align: left;
}

.routine-table td {
    padding: 11px 9px;
    border-bottom: 1px solid var(--border);

    color: var(--text-secondary);
    font-size: 10px;
    text-align: center;
}

.routine-table tr:last-child td {
    border-bottom: none;
}

.routine-table td:first-child {
    color: var(--text);
    font-weight: 700;
    text-align: left;
}

.routine-table tr:hover td {
    background: var(--surface-secondary);
}

.routine-check {
    width: 19px;
    height: 19px;

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

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

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

    font-size: 11px;
    transition: var(--transition);
}

.routine-check:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.routine-check.completed,
.routine-check.active {
    border-color: var(--success);
    background: var(--success);
    color: #ffffff;
}

.routine-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.routine-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
}

.completed-square,
.pending-square {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 3px;
}

.completed-square {
    background: var(--success);
}

.pending-square {
    background: #cbd3df;
}

.add-routine-btn {
    margin-top: 17px;
    padding: 10px 15px;

    border: 1px dashed var(--primary);
    border-radius: 9px;

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

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

    transition: var(--transition);
}

.add-routine-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* =========================================================
   12. STUDY TIMER
========================================================= */

.timer-panel {
    margin-top: 23px;
}

.timer-content {
    max-width: 570px;
    margin: 25px auto 5px;
    text-align: center;
}

.timer-subject {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.timer-subject label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

.timer-subject select {
    min-width: 170px;
}

.timer-display {
    margin-top: 22px;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: clamp(42px, 7vw, 58px);
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.timer-status {
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.timer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 23px;
}

.primary-btn,
.pause-timer-btn,
.stop-timer-btn,
.cancel-reset-btn,
.confirm-reset-btn,
.secondary-action-btn {
    min-height: 39px;
    padding: 10px 16px;

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

    border: 1px solid transparent;
    border-radius: 9px;

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

    transition: var(--transition);
}

.primary-btn {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(84, 121, 237, 0.18);
}

.primary-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.pause-timer-btn {
    background: var(--warning-light);
    color: var(--warning);
    border-color: rgba(229, 138, 50, 0.15);
}

.pause-timer-btn:hover {
    background: var(--warning);
    color: #ffffff;
}

.stop-timer-btn {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(224, 82, 82, 0.15);
}

.stop-timer-btn:hover {
    background: var(--danger);
    color: #ffffff;
}

.timer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 23px;
    padding: 11px;

    border-radius: 9px;
    background: var(--surface-secondary);

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

/* =========================================================
   13. BOTTOM SUMMARY
========================================================= */

.bottom-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 23px;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-card span {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.summary-card h2 {
    margin: 3px 0;
    font-size: 24px;
    font-weight: 800;
}

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

/* =========================================================
   14. FOOTER
========================================================= */

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

    margin-top: 28px;
    padding: 20px 0 25px;

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

.footer p,
.footer span {
    color: var(--muted);
    font-size: 10px;
}

/* =========================================================
   15. MODAL SYSTEM
========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;

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

    padding: 20px;

    background: rgba(14, 23, 40, 0.58);
    backdrop-filter: blur(5px);
}

.modal.active,
.modal.show {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}

.modal-content {
    width: min(100%, 470px);
    max-height: min(88vh, 850px);

    position: relative;
    overflow-y: auto;

    padding: 29px;

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

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

    animation: modalSlideIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

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

    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;

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

    border: none;
    border-radius: 9px;

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

    font-size: 22px;
    line-height: 1;

    transition: var(--transition);
}

.close-modal:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-content > h2 {
    margin-bottom: 17px;
    font-size: 21px;
}

/* =========================================================
   16. ADD ACTIVITY MODAL
========================================================= */

#activityModal .modal-content {
    width: min(100%, 420px);
}

#activityForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#activityForm label,
.form-group label {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
}

#activityForm input,
.form-group input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;

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

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

    font-size: 12px;
    transition: var(--transition);
}

#activityForm input:focus,
.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

#activityForm .primary-btn {
    margin-top: 7px;
}

/* =========================================================
   17. RESET MODAL
========================================================= */

.reset-modal-content {
    width: min(100%, 440px);
    text-align: center;
}

.reset-icon {
    width: 58px;
    height: 58px;

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

    margin: 5px auto 15px;

    border-radius: 18px;
    background: var(--danger-light);
    color: var(--danger);

    font-size: 27px;
}

.reset-modal-content h2 {
    font-size: 22px;
}

.reset-description {
    margin-top: 8px;
    font-size: 11px;
}

.reset-list {
    margin: 18px 0;
    padding: 14px 17px;

    border-radius: 10px;
    background: var(--surface-secondary);

    text-align: left;
}

.reset-list li {
    margin: 6px 0;
    color: var(--text-secondary);
    font-size: 11px;
}

.reset-warning {
    padding: 10px;
    border-radius: 8px;
    background: var(--warning-light);
    color: var(--warning);
    font-size: 10px;
    font-weight: 600;
}

.reset-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.cancel-reset-btn {
    background: var(--surface-secondary);
    color: var(--text-secondary);
    border-color: var(--border);
}

.cancel-reset-btn:hover {
    background: var(--border);
}

.confirm-reset-btn {
    background: var(--danger);
    color: #ffffff;
}

.confirm-reset-btn:hover {
    background: #c83d3d;
}

/* =========================================================
   18. SETTINGS MODAL
========================================================= */

.settings-modal-content {
    width: min(100%, 650px);
    padding: 30px;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 23px;
    padding-right: 30px;
}

.modal-icon {
    width: 47px;
    height: 47px;
    flex-shrink: 0;

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

    border-radius: 14px;
    background: var(--primary-light);
    color: var(--primary);

    font-size: 19px;
}

.modal-header h2 {
    font-size: 21px;
    font-weight: 800;
}

.modal-header p {
    margin-top: 3px;
    font-size: 11px;
}

.settings-section {
    padding: 18px 0;
    border-top: 1px solid var(--border);
}

.settings-section h3 {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 10px;

    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.settings-section h3 i {
    color: var(--primary);
    font-size: 14px;
}

.setting-item {
    min-height: 66px;

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

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

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

.setting-item > div {
    flex: 1;
    min-width: 0;
}

.setting-item strong {
    display: block;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.setting-item p {
    margin-top: 3px;
    font-size: 10px;
}

.setting-item select,
.setting-item input[type="number"] {
    width: 150px;
    min-width: 120px;
    min-height: 37px;
    flex-shrink: 0;

    padding: 8px 10px;

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

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

    font-size: 10px;
}

.setting-item input[type="number"]:focus {
    border-color: var(--primary);
}

.secondary-action-btn {
    min-height: 36px;
    flex-shrink: 0;

    border: 1px solid var(--border);
    background: var(--surface-secondary);
    color: var(--text-secondary);

    cursor: pointer;
}

.secondary-action-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* SETTINGS SWITCH */

.setting-switch {
    width: 43px;
    height: 24px;
    flex-shrink: 0;

    position: relative;
    display: inline-block;
}

.setting-switch input {
    width: 0;
    height: 0;
    opacity: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;

    border-radius: 30px;
    background: #cbd3df;

    cursor: pointer;
    transition: var(--transition);
}

.switch-slider::before {
    content: "";
    width: 18px;
    height: 18px;

    position: absolute;
    top: 3px;
    left: 3px;

    border-radius: 50%;
    background: #ffffff;

    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.setting-switch input:checked + .switch-slider {
    background: var(--primary);
}

.setting-switch input:checked + .switch-slider::before {
    transform: translateX(19px);
}

.setting-switch input:focus-visible + .switch-slider {
    outline: 3px solid var(--primary-soft);
    outline-offset: 3px;
}

.settings-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

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

/* =========================================================
   19. PROFILE MODAL
========================================================= */

.profile-modal-content {
    width: min(100%, 530px);
}

.profile-edit-picture {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 15px;
    margin-bottom: 20px;

    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-secondary);
}

.profile-edit-picture img {
    width: 72px;
    height: 72px;
    flex-shrink: 0;

    border: 3px solid var(--border);
    border-radius: 50%;
    object-fit: cover;
}

.profile-edit-picture strong {
    color: var(--text);
    font-size: 12px;
}

.profile-edit-picture p {
    margin: 3px 0 9px;
    font-size: 10px;
}

.profile-edit-picture label {
    cursor: pointer;
}

#profileForm {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 41px;
    padding: 9px 11px;

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

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

    font-size: 11px;
}

.form-group select {
    min-width: 0;
}

.profile-actions {
    grid-column: 1 / -1;

    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 8px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

/* =========================================================
   20. HELP & SUPPORT MODAL
========================================================= */

.help-modal-content {
    width: min(100%, 650px);
}

.ai-support-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    padding: 18px;
    margin-bottom: 22px;

    border: 1px solid rgba(84, 121, 237, 0.17);
    border-radius: 13px;

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

.ai-support-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;

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

    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;

    font-size: 19px;
}

.ai-support-content {
    flex: 1;
}

.ai-label {
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.ai-support-content h3 {
    margin-top: 4px;
    font-size: 14px;
}

.ai-support-content p {
    margin: 5px 0 13px;
    font-size: 10px;
}

.help-section {
    margin-top: 21px;
}

.help-section > h3,
.support-contact h3 {
    margin-bottom: 13px;
    font-size: 14px;
}

.help-topic {
    display: flex;
    align-items: flex-start;
    gap: 12px;

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

.help-topic:last-child {
    border-bottom: none;
}

.help-topic-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;

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

    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);

    font-size: 13px;
}

.help-topic strong {
    color: var(--text);
    font-size: 11px;
}

.help-topic p {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.6;
}

.help-faq {
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.help-faq summary {
    position: relative;
    padding-right: 20px;

    color: var(--text);
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;
    list-style: none;
}

.help-faq summary::-webkit-details-marker {
    display: none;
}

.help-faq summary::after {
    content: "+";
    position: absolute;
    right: 2px;
    top: -3px;

    color: var(--primary);
    font-size: 18px;
}

.help-faq[open] summary::after {
    content: "−";
}

.help-faq p {
    padding-top: 9px;
    font-size: 10px;
    line-height: 1.7;
}

.support-contact {
    margin-top: 22px;
    padding: 17px;

    border-radius: 12px;
    background: var(--surface-secondary);
}

.support-contact h3 {
    margin-bottom: 5px;
}

.support-contact p {
    margin-bottom: 12px;
    font-size: 10px;
}

/* =========================================================
   21. ABOUT MODAL
========================================================= */

.about-modal-content {
    width: min(100%, 560px);
}

.about-brand {
    padding: 15px 15px 23px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.about-logo {
    width: 62px;
    height: 62px;

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

    margin: 0 auto 11px;
    border-radius: 18px;

    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #ffffff;

    font-family: var(--font-heading);
    font-size: 23px;
    font-weight: 800;

    box-shadow: 0 7px 18px rgba(84, 121, 237, 0.2);
}

.about-brand h2 {
    font-size: 23px;
}

.about-version {
    display: inline-block;
    margin-top: 7px;
    padding: 4px 10px;

    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);

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

.about-brand p {
    max-width: 350px;
    margin: 12px auto 0;
    font-size: 11px;
}

.about-section {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.about-section h3 {
    margin-bottom: 9px;
    font-size: 13px;
}

.about-section > p {
    margin-top: 7px;
    font-size: 10px;
    line-height: 1.8;
}

.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-top: 12px;
}

.about-feature-grid > div {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 11px;

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

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

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

.about-feature-grid i {
    color: var(--primary);
    font-size: 13px;
}

.developer-card {
    display: flex;
    align-items: center;
    gap: 15px;

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

    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-secondary);
}

.developer-avatar {
    width: 62px;
    height: 62px;
    flex-shrink: 0;

    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 50%;

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

.developer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.developer-avatar span {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;

    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

.developer-info {
    min-width: 0;
}

.developer-label {
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.developer-info h3 {
    margin-top: 3px;
    font-size: 15px;
}

.developer-info p {
    margin: 3px 0 7px;
    font-size: 9px;
}

.developer-info a {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
}

.developer-info a:hover {
    text-decoration: underline;
}

.about-footer {
    margin-top: 17px;
    text-align: center;
}

.about-footer p {
    font-size: 10px;
}

.about-footer span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
}

/* =========================================================
   22. AI ASSISTANT PREVIEW
========================================================= */

.ai-modal-content {
    width: min(100%, 570px);
    padding: 22px;
}

.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 5px 28px 17px 0;
    border-bottom: 1px solid var(--border);
}

.ai-chat-avatar {
    width: 43px;
    height: 43px;
    flex-shrink: 0;

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

    border-radius: 13px;
    background: var(--primary-light);
    color: var(--primary);

    font-size: 19px;
}

.ai-chat-header h2 {
    font-size: 15px;
}

.ai-chat-header p {
    margin-top: 3px;
    font-size: 10px;
}

.ai-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    margin-left: auto;
    padding: 5px 8px;

    border-radius: 20px;
    background: var(--warning-light);
    color: var(--warning);

    font-size: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.ai-status i {
    font-size: 7px;
}

.ai-chat-messages {
    min-height: 230px;
    max-height: 350px;
    overflow-y: auto;
    padding: 18px 0;
}

.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message-avatar {
    width: 31px;
    height: 31px;
    flex-shrink: 0;

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

    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary);

    font-size: 12px;
}

.message-content {
    max-width: 90%;
    padding: 12px 14px;

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

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

.message-content strong {
    color: var(--text);
    font-size: 10px;
}

.message-content p {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.7;
}

.message-content small {
    display: block;
    margin-top: 8px;
    color: var(--warning);
    font-size: 9px;
}

.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 13px 0;
    border-top: 1px solid var(--border);
}

.ai-suggestion {
    padding: 7px 10px;

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

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

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

    transition: var(--transition);
}

.ai-suggestion:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ai-chat-form {
    display: flex;
    gap: 8px;
}

.ai-chat-form input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    padding: 10px 13px;

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

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

    font-size: 10px;
}

.ai-chat-form button {
    width: 42px;
    min-height: 42px;

    border: none;
    border-radius: 9px;

    background: var(--primary);
    color: #ffffff;
}

.ai-chat-form button:disabled,
.ai-chat-form input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.ai-disclaimer {
    margin-top: 9px;
    text-align: center;
    color: var(--muted);
    font-size: 9px;
}

/* =========================================================
   23. FONT SIZE SETTINGS
========================================================= */

body[data-font-size="small"] {
    font-size: 13px;
}

body[data-font-size="small"] .container {
    font-size: 0.94em;
}

body[data-font-size="large"] {
    font-size: 16px;
}

body[data-font-size="large"] .container {
    font-size: 1.05em;
}

/* =========================================================
   24. ANIMATION PREFERENCE
========================================================= */

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

/* =========================================================
   25. ANIMATION CLASSES
========================================================= */

.animate-on-load {
    animation: contentEnter 0.55s ease both;
}

.animate-card {
    animation: contentEnter 0.5s ease both;
}

.animate-section {
    animation: contentEnter 0.6s ease both;
}

@keyframes contentEnter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

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

@media (max-width: 1100px) {
    .navbar {
        padding: 0 3%;
        gap: 12px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-link {
        padding: 9px 9px;
        font-size: 10px;
    }

    .container {
        width: 94%;
    }

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

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

    .syllabus-column {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .column-heading {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   27. RESPONSIVE — TABLETS
========================================================= */

@media (max-width: 760px) {
    .navbar {
        min-height: 72px;
        flex-wrap: wrap;
        padding: 11px 4%;
        gap: 10px;
    }

    .brand-logo {
        width: 39px;
        height: 39px;
    }

    .brand h2 {
        font-size: 17px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding: 4px 0 2px;
    }

    .nav-link {
        flex-shrink: 0;
        padding: 8px 11px;
    }

    .nav-actions {
        margin-left: auto;
    }

    .container {
        width: 92%;
        margin-top: 22px;
    }

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
        padding: 25px;
    }

    .profile-section {
        align-self: flex-start;
    }

    .quick-stats {
        gap: 12px;
    }

    .stat-card {
        padding: 15px;
    }

    .analytics-grid {
        gap: 16px;
    }

    .syllabus-column {
        grid-template-columns: 1fr;
    }

    .column-heading {
        grid-column: auto;
    }

    .panel {
        padding: 18px;
    }

    .graph-container {
        height: 230px;
    }

    .bottom-summary {
        gap: 12px;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   28. RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 520px) {
    body {
        font-size: 13px;
    }

    .navbar {
        padding: 10px 4%;
    }

    .brand small {
        font-size: 7px;
    }

    .settings-btn {
        width: 37px;
        height: 37px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .settings-btn i {
        font-size: 14px;
    }

    .more-btn {
        width: 37px;
        height: 37px;
    }

    .nav-link {
        font-size: 10px;
    }

    .container {
        width: 92%;
        margin-top: 17px;
    }

    .welcome-card {
        min-height: auto;
        padding: 22px 19px;
        border-radius: 18px;
    }

    .welcome-content h2 {
        font-size: 27px;
    }

    .welcome-content p {
        font-size: 11px;
    }

    .welcome-info {
        gap: 12px;
        margin-top: 15px;
    }

    .welcome-info div {
        font-size: 9px;
    }

    .profile-section {
        padding: 10px 12px;
    }

    .profile-avatar {
        width: 53px;
        height: 53px;
    }

    .quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-top: 14px;
    }

    .stat-card {
        min-height: 100px;
        padding: 12px 10px;
        gap: 9px;
    }

    .stat-icon {
        width: 35px;
        height: 35px;
        border-radius: 10px;
        font-size: 16px;
    }

    .stat-card span {
        font-size: 9px;
    }

    .stat-card h2 {
        font-size: 19px;
    }

    .stat-card small {
        font-size: 8px;
    }

    .analytics-grid,
    .routine-panel,
    .timer-panel {
        margin-top: 15px;
    }

    .panel {
        padding: 15px;
        border-radius: 15px;
    }

    .panel-heading h2,
    .column-heading h2 {
        font-size: 17px;
    }

    .panel-heading p {
        font-size: 10px;
    }

    .panel-heading select {
        min-width: 100px;
        padding: 8px;
        font-size: 9px;
    }

    .graph-container {
        height: 205px;
    }

    .chart-content {
        grid-template-columns: 95px 1fr;
        gap: 9px;
    }

    .donut-chart {
        width: 90px;
        height: 90px;
    }

    .donut-center strong {
        font-size: 17px;
    }

    .chapter-name {
        font-size: 9px;
    }

    .syllabus-card {
        padding: 15px 12px;
    }

    .routine-progress strong {
        font-size: 20px;
    }

    .routine-progress span {
        font-size: 8px;
    }

    .routine-legend {
        gap: 12px;
    }

    .routine-legend span {
        font-size: 9px;
    }

    .timer-display {
        font-size: 43px;
    }

    .timer-subject {
        flex-direction: column;
        gap: 7px;
    }

    .timer-controls {
        gap: 7px;
    }

    .timer-controls button {
        padding: 9px 11px;
        font-size: 10px;
    }

    .timer-note {
        align-items: flex-start;
        text-align: left;
        font-size: 9px;
    }

    .bottom-summary {
        grid-template-columns: 1fr;
        margin-top: 15px;
    }

    .summary-card {
        padding: 15px;
    }

    .summary-card h2 {
        font-size: 21px;
    }

    .footer {
        gap: 5px;
        margin-top: 20px;
    }

    .footer p,
    .footer span {
        font-size: 9px;
    }

    /* MODALS */

    .modal {
        padding: 10px;
        align-items: center;
    }

    .modal-content {
        max-height: 92vh;
        padding: 22px 17px;
        border-radius: 15px;
    }

    .modal-header {
        gap: 10px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .modal-header p {
        font-size: 10px;
    }

    .modal-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .settings-modal-content {
        padding: 22px 16px;
    }

    .setting-item {
        gap: 9px;
    }

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

    .setting-item p {
        max-width: 190px;
        font-size: 9px;
    }

    .setting-item select,
    .setting-item input[type="number"] {
        width: 118px;
        min-width: 105px;
        font-size: 9px;
    }

    .secondary-action-btn {
        padding: 8px 10px;
        font-size: 9px;
    }

    .settings-actions {
        flex-wrap: wrap;
    }

    .settings-actions button {
        flex: 1;
    }

    #profileForm {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        grid-column: auto;
    }

    .profile-edit-picture {
        gap: 11px;
        padding: 11px;
    }

    .profile-edit-picture img {
        width: 59px;
        height: 59px;
    }

    .about-feature-grid {
        gap: 7px;
    }

    .about-feature-grid > div {
        padding: 9px;
        font-size: 9px;
    }

    .developer-card {
        gap: 10px;
        padding: 11px;
    }

    .developer-avatar {
        width: 52px;
        height: 52px;
    }

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

    .developer-info a {
        font-size: 8px;
    }

    .ai-support-card {
        gap: 10px;
        padding: 13px;
    }

    .ai-support-icon {
        width: 35px;
        height: 35px;
        font-size: 15px;
    }

    .ai-support-content h3 {
        font-size: 12px;
    }

    .ai-support-content p {
        font-size: 9px;
    }

    .ai-status {
        font-size: 7px;
        padding: 4px 6px;
    }

    .ai-chat-header h2 {
        font-size: 13px;
    }

    .ai-chat-header p {
        font-size: 9px;
    }

    .ai-suggestion {
        font-size: 8px;
    }

    .reset-actions {
        flex-direction: column-reverse;
    }

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

/* =========================================================
   29. VERY SMALL MOBILE
========================================================= */

@media (max-width: 360px) {
    .brand h2 {
        font-size: 15px;
    }

    .brand-logo {
        width: 35px;
        height: 35px;
    }

    .nav-actions {
        gap: 6px;
    }

    .stat-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-content {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .chapter-list {
        width: 100%;
    }

    .setting-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .setting-item select,
    .setting-item input[type="number"] {
        width: 100%;
    }

    .setting-switch {
        align-self: flex-start;
    }

    .ai-chat-header {
        flex-wrap: wrap;
    }

    .ai-status {
        margin-left: 0;
    }
}
