
/* =====================================
   STUDENT AI — DESIGN SYSTEM
   ===================================== */

:root {
    --navy: #15213b;
    --navy-light: #223455;
    --primary: #4361ee;
    --primary-hover: #304bd0;
    --background: #f5f7fc;
    --surface: #ffffff;
    --text: #1d2939;
    --muted: #66748b;
    --border: #e4e9f2;
    --success: #138a60;
    --danger: #c03935;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(29, 45, 78, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

h1, h2, h3 {
    color: var(--text);
    line-height: 1.25;
}

h1 {
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.8px;
    margin: 0 0 10px;
}

h2 {
    font-size: 19px;
    margin: 0 0 12px;
}

p {
    margin-top: 8px;
}

.muted {
    color: var(--muted);
    line-height: 1.65;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin: 34px auto 60px;
}

/* Navigation */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 14px max(20px, calc((100% - 1160px) / 2));
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.brand {
    color: var(--navy);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.topbar > a:not(.brand) {
    font-weight: 600;
}

.topbar form {
    margin: 0;
}

.topbar form button {
    margin: 0;
}

/* Dashboard welcome */

.welcome {
    margin-bottom: 30px;
    padding: 30px;
    border-radius: 20px;
    background: linear-gradient(120deg, #182846, #3156a8);
    color: white;
    box-shadow: var(--shadow);
}

.welcome h1 {
    color: white;
}

.welcome p {
    color: #d9e4ff;
}

.welcome .role {
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.16);
    color: white;
}

/* Cards and responsive grids */

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

.feature-card {
    display: block;
    min-width: 0;
    padding: 24px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 12px rgba(29, 45, 78, 0.025);
    transition: transform 0.18s ease, box-shadow 0.18s ease,
                border-color 0.18s ease;
}

a.feature-card:hover {
    color: var(--text);
    border-color: #c8d4ff;
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.feature-card h2 {
    margin-top: 12px;
}

.feature-card p {
    color: var(--muted);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 15px;
    background: #edf1ff;
    font-size: 26px;
}

/* Forms and controls */

label {
    display: block;
    margin: 17px 0 7px;
    color: var(--text);
    font-weight: 650;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #d5dce8;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.13);
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    margin-top: 20px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

button:hover {
    background: var(--primary-hover);
}

button:active {
    transform: scale(0.98);
}

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

button.secondary {
    background: #edf1ff;
    color: #2f4cc5;
}

button.secondary:hover {
    background: #dfe6ff;
}

button.danger {
    background: #fff0ef;
    color: var(--danger);
}

button.danger:hover {
    background: #ffe0dd;
}

.error {
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff0ef;
    color: #a12d27;
}

/* Login and registration */

.auth-card {
    width: min(440px, calc(100% - 32px));
    margin: 7vh auto;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 16px 55px rgba(29, 45, 78, 0.09);
}

.auth-card h1 {
    font-size: 29px;
}

.auth-card form button {
    width: 100%;
}

.auth-card > p:last-child {
    margin-top: 24px;
    text-align: center;
}

/* Search and study materials */

.search-form {
    display: flex;
    gap: 12px;
    margin: 22px 0;
}

.search-form button {
    flex-shrink: 0;
    min-width: 110px;
    margin: 0;
}

.upload-card {
    margin: 25px 0;
}

.material-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.material-card h2 {
    overflow-wrap: anywhere;
}

.material-card > a {
    display: inline-block;
    margin-top: 8px;
    font-weight: 650;
}

/* Chat interface */

.chat-panel {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 300px;
    max-height: 58vh;
    overflow-y: auto;
    padding: 10px 4px 22px;
    scroll-behavior: smooth;
}

.message {
    max-width: min(82%, 720px);
    padding: 13px 16px;
    border-radius: 15px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message.assistant {
    align-self: flex-start;
    background: #eef2f9;
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: #e7edff;
    color: #233b91;
    border-bottom-right-radius: 4px;
}

.chat-form {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.chat-form textarea {
    flex: 1;
    resize: vertical;
    min-height: 48px;
}

.chat-form button {
    min-width: 90px;
    margin: 0;
}

/* Tables */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    color: var(--muted);
    background: #f8f9fc;
    font-size: 13px;
    font-weight: 700;
}

td, th {
    padding: 13px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

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

/* Mobile and tablet */

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

    .container {
        margin-top: 26px;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }

    .topbar {
        min-height: 62px;
        gap: 10px;
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .brand {
        font-size: 18px;
    }

    .container {
        width: calc(100% - 28px);
        margin: 22px auto 40px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .welcome {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    .auth-card {
        padding: 25px 21px;
    }

    .search-form,
    .chat-form {
        flex-direction: column;
    }

    .search-form button,
    .chat-form button {
        width: 100%;
    }

    .chat-panel {
        padding: 14px;
    }

    .messages {
        min-height: 260px;
        max-height: 52vh;
    }

    .message {
        max-width: 94%;
    }

    table {
        min-width: 480px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
/* Shared navigation across all authenticated pages */

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.site-nav > a {
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
}

.site-nav > a:hover {
    color: var(--primary);
}

.site-nav form {
    margin: 0;
}

.site-nav form button {
    margin: 0;
}

.nav-toggle {
    display: none;
    margin: 0;
}

@media (max-width: 760px) {
    .topbar {
        justify-content: space-between;
    }

    .nav-toggle {
        display: inline-flex;
        min-height: 40px;
        padding: 8px 12px;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    .site-nav.nav-open {
        display: flex;
    }

    .site-nav > a {
        display: block;
        padding: 10px 8px;
        border-radius: 8px;
    }

    .site-nav > a:hover {
        background: #f0f3ff;
    }

    .site-nav form button {
        width: 100%;
    }
}

/* =====================================
   STUDENT AI — CHAT EXPERIENCE
   ===================================== */

.chat-page {
    max-width: 1000px;
}

.chat-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

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

.chat-heading h1 {
    margin-bottom: 8px;
}

.chat-heading .muted {
    margin-bottom: 0;
}

.chat-heading-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: #e9edff;
    font-size: 36px;
}

.chat-panel {
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.chat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.chat-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.chat-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--navy);
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.chat-profile h2 {
    margin: 0;
    font-size: 15px;
}

.chat-subtitle {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.chat-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a36a;
}

.chat-tip {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 18px 20px 0;
    padding: 12px 14px;
    border: 1px solid #e2e8ff;
    border-radius: 12px;
    background: #f5f7ff;
    color: #45567e;
    font-size: 13px;
}

.chat-panel .messages {
    min-height: 340px;
    max-height: 55vh;
    padding: 24px 22px;
}

.chat-panel .message {
    width: fit-content;
    max-width: min(82%, 720px);
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.75;
}

.chat-panel .message.assistant {
    border: 1px solid var(--border);
    background: #f5f7fb;
    color: var(--text);
    border-bottom-left-radius: 5px;
}

.chat-panel .message.user {
    border: 1px solid #dce5ff;
    background: #eaf0ff;
    color: #233b91;
    border-bottom-right-radius: 5px;
}

.chat-panel .chat-form {
    align-items: flex-end;
    margin: 0 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}

.chat-panel .chat-form textarea {
    min-height: 50px;
    max-height: 160px;
    padding: 13px 15px;
    border-radius: 13px;
    background: #fbfcff;
}

.chat-panel .chat-form button {
    min-height: 48px;
    min-width: 92px;
    margin: 0;
    border-radius: 12px;
}

.chat-panel .chat-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 0 22px 14px;
    color: var(--muted);
    font-size: 11px;
}

.chat-panel .chat-footer p {
    margin: 0;
    font-size: 12px;
}

.chat-disclaimer {
    margin: 15px 4px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 600px) {
    .chat-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .chat-heading-icon {
        width: 54px;
        height: 54px;
        border-radius: 16px;
        font-size: 27px;
    }

    .chat-toolbar {
        align-items: flex-start;
        padding: 16px;
    }

    .chat-badge {
        font-size: 0;
        padding: 8px;
    }

    .chat-badge .status-dot {
        width: 9px;
        height: 9px;
    }

    .chat-tip {
        margin: 14px 12px 0;
        font-size: 12px;
    }

    .chat-panel .messages {
        min-height: 280px;
        max-height: 52vh;
        padding: 18px 12px;
    }

    .chat-panel .message {
        max-width: 94%;
    }

    .chat-panel .chat-form {
        margin: 0 12px;
    }

    .chat-panel .chat-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 0 14px 14px;
    }
}

/* =====================================
   STUDY MATERIALS — RESOURCE LIBRARY
   ===================================== */

.materials-page {
    max-width: 1120px;
}

.materials-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 30px;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    background: linear-gradient(120deg, #ffffff, #eef2ff);
}

.materials-hero h1 {
    margin-bottom: 8px;
}

.materials-hero .muted {
    max-width: 650px;
    margin-bottom: 0;
}

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

.materials-hero-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: #dfe7ff;
    font-size: 36px;
}

.materials-search-section {
    margin-bottom: 30px;
}

.materials-page .materials-search {
    align-items: center;
    gap: 12px;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    box-shadow: 0 4px 15px rgba(29, 45, 78, 0.035);
}

.search-icon {
    padding-left: 9px;
    color: var(--muted);
    font-size: 25px;
    line-height: 1;
}

.materials-page .materials-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    box-shadow: none;
}

.materials-page .materials-search input:focus {
    box-shadow: none;
}

.materials-page .materials-search button {
    margin: 0;
}

.materials-search-note {
    margin: 10px 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.materials-upload-panel {
    margin-bottom: 36px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

.materials-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.materials-section-heading h2 {
    margin: 0;
}

.materials-section-heading p {
    margin: 5px 0 0;
    font-size: 13px;
}

.materials-section-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eaf0ff;
    color: var(--primary);
    font-size: 24px;
    font-weight: 800;
}

.materials-upload-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 18px;
}

.materials-field {
    min-width: 0;
}

.materials-field label {
    margin-top: 12px;
}

.materials-file-field {
    grid-column: 1 / -1;
}

.materials-field input[type="file"] {
    padding: 10px;
    background: #fafbff;
}

.materials-field .muted {
    margin: 6px 0;
    font-size: 12px;
}

.materials-upload-action {
    grid-column: 1 / -1;
}

.materials-upload-action button {
    margin-top: 12px;
}

.materials-results {
    margin-top: 10px;
}

.results-heading {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.materials-library-badge,
.material-file-label {
    padding: 6px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.6px;
}

.material-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
}

.material-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 21px;
    border-radius: 16px;
}

.material-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.pdf-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 52px;
    border: 1px solid #ffdcd9;
    border-radius: 11px;
    background: #fff1ef;
    color: #c33b35;
    font-size: 12px;
    font-weight: 850;
}

.material-card-content {
    flex: 1;
}

.material-card-content h2 {
    margin: 5px 0 9px;
    overflow-wrap: anywhere;
    font-size: 17px;
}

.material-card-content > .muted {
    font-size: 12px;
}

.material-subject-label {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 750;
}

.material-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.material-view-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 750;
}

.material-card-actions form {
    margin: 0;
}

.material-delete-button {
    min-height: 35px;
    margin: 0;
    padding: 7px 11px;
    font-size: 12px;
}

.materials-empty {
    grid-column: 1 / -1;
    padding: 45px 20px;
    border: 1px dashed #cbd4e5;
    border-radius: 18px;
    background: #fafbff;
    text-align: center;
}

.materials-empty-icon {
    margin-bottom: 12px;
    font-size: 36px;
}

.materials-empty h2 {
    margin-bottom: 8px;
}

.materials-empty .muted {
    max-width: 440px;
    margin: 0 auto 12px;
}

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

@media (max-width: 600px) {
    .materials-hero {
        padding: 23px 18px;
        border-radius: 16px;
    }

    .materials-hero-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 25px;
    }

    .materials-upload-panel {
        padding: 18px;
    }

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

    .materials-file-field,
    .materials-upload-action {
        grid-column: auto;
    }

    .materials-page .materials-search {
        flex-wrap: wrap;
    }

    .materials-page .materials-search input {
        width: calc(100% - 55px);
    }

    .materials-page .materials-search button {
        width: 100%;
    }

    .material-list {
        grid-template-columns: 1fr;
    }

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

/* =====================================
   CLASS TIMETABLE
   ===================================== */

.timetable-page {
    max-width: 1120px;
}

.timetable-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    padding: 30px;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    background: linear-gradient(120deg, #ffffff, #eef2ff);
}

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

.timetable-hero h1 {
    margin-bottom: 8px;
}

.timetable-hero > div:first-child > .muted {
    margin-bottom: 18px;
}

.timetable-hero-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 78px;
    height: 78px;
    border-radius: 22px;
    background: #dfe7ff;
    font-size: 37px;
}

.timetable-lunch {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border: 1px solid #f5dfb3;
    border-radius: 12px;
    background: #fff9eb;
    color: #855b14;
}

.timetable-lunch > span:first-child {
    font-size: 21px;
}

.timetable-lunch > span:last-child,
.timetable-class-time > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.timetable-lunch strong {
    font-size: 12px;
}

.timetable-lunch > span:last-child > span {
    font-size: 12px;
}

.timetable-admin-panel {
    margin-bottom: 35px;
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

.timetable-section-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.timetable-section-heading h2 {
    margin: 0;
}

.timetable-section-heading p {
    margin: 5px 0 0;
    font-size: 13px;
}

.timetable-heading-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: #eaf0ff;
    color: var(--primary);
    font-size: 26px;
    font-weight: 700;
}

.timetable-add-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px 18px;
}

.timetable-field {
    min-width: 0;
}

.timetable-field label {
    margin-top: 12px;
}

.timetable-submit {
    display: flex;
    align-items: end;
}

.timetable-submit button {
    margin-top: 12px;
}

.timetable-schedule {
    margin-top: 8px;
}

.schedule-heading {
    justify-content: space-between;
}

.timetable-week-badge {
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

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

.timetable-day-card {
    min-width: 0;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: white;
    box-shadow: 0 4px 16px rgba(29, 45, 78, 0.035);
}

.timetable-day-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.timetable-day-marker {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #eaf0ff;
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
}

.timetable-day-heading h3 {
    margin: 0;
    font-size: 17px;
}

.timetable-day-heading p {
    margin: 4px 0 0;
    font-size: 12px;
}

.timetable-class-list {
    display: flex;
    flex-direction: column;
}

.timetable-class {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 17px 0;
    border-bottom: 1px solid #edf0f6;
}

.timetable-class:last-child {
    border-bottom: 0;
}

.timetable-class-time {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    color: var(--primary);
    font-size: 12px;
}

.timetable-class-time > span:first-child {
    font-size: 17px;
}

.timetable-class-time strong {
    font-size: 13px;
    font-weight: 800;
}

.timetable-class-time > span:last-child > span {
    color: var(--muted);
    font-size: 11px;
}

.timetable-class-details {
    min-width: 0;
}

.timetable-class-details h4 {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.timetable-class-details .muted {
    margin: 0;
    font-size: 12px;
}

.timetable-class form {
    grid-column: 2;
    justify-self: start;
    margin: 0;
}

.timetable-delete {
    margin: 0;
    padding: 6px 10px;
    font-size: 11px;
}

.timetable-empty-day {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 0 5px;
    color: var(--muted);
}

.timetable-empty-day > span {
    font-size: 23px;
}

.timetable-empty-day p {
    margin: 0;
    font-size: 13px;
}

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

    .timetable-hero {
        padding: 23px 18px;
    }

    .timetable-hero-icon {
        width: 54px;
        height: 54px;
        border-radius: 15px;
        font-size: 26px;
    }

    .timetable-admin-panel {
        padding: 18px;
    }

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

    .timetable-submit {
        display: block;
    }

    .timetable-submit button {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .timetable-class {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 9px;
    }

    .timetable-day-card {
        padding: 15px;
    }
}

/* =====================================
   ADMIN DASHBOARD
   ===================================== */

.admin-page {
    max-width: 1120px;
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
    padding: 30px;
    border: 1px solid #e0e7ff;
    border-radius: 20px;
    background: linear-gradient(120deg, #ffffff, #eef2ff);
}

.admin-eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.admin-hero h1 {
    margin-bottom: 8px;
}

.admin-hero .muted {
    margin-bottom: 16px;
}

.admin-hero-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: #dfe7ff;
    font-size: 35px;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #ccebd9;
    border-radius: 999px;
    background: #f0fbf4;
    color: #267348;
    font-size: 12px;
    font-weight: 700;
}

.admin-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2ca765;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.admin-stat-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: white;
    box-shadow: 0 4px 16px rgba(29, 45, 78, 0.035);
}

.admin-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 19px;
}

.admin-stat-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    font-size: 22px;
}

.admin-icon-blue {
    background: #eaf0ff;
}

.admin-icon-purple {
    background: #f0eaff;
}

.admin-icon-orange {
    background: #fff0df;
}

.admin-stat-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.9px;
}

.admin-stat-number {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.admin-stat-card h2 {
    margin: 0 0 7px;
    font-size: 16px;
}

.admin-stat-card > .muted {
    margin: 0;
    font-size: 12px;
}

.admin-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    font-size: 13px;
    font-weight: 750;
}

.admin-directory {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}

.admin-directory-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.admin-directory-heading .admin-eyebrow {
    margin-bottom: 6px;
}

.admin-directory-heading h2 {
    margin: 0 0 6px;
}

.admin-directory-heading .muted {
    margin: 0;
    font-size: 13px;
}

.admin-count-badge {
    flex-shrink: 0;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f8faff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 14px 22px;
    background: #f8faff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td {
    padding: 15px 22px;
    border-top: 1px solid #edf0f6;
    font-size: 13px;
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: #fafbff;
}

.admin-person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 150px;
}

.admin-person-avatar {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 37px;
    height: 37px;
    border-radius: 12px;
    background: #eaf0ff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
}

.admin-person-name {
    font-weight: 700;
    overflow-wrap: anywhere;
}

.admin-email {
    overflow-wrap: anywhere;
}

.admin-role {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    white-space: nowrap;
}

.admin-role-admin {
    border: 1px solid #d9ceff;
    background: #f3efff;
    color: #6742b5;
}

.admin-role-student {
    border: 1px solid #cfe5ff;
    background: #eff7ff;
    color: #2464a2;
}

.admin-empty {
    padding: 38px 20px;
    text-align: center;
}

.admin-empty > span {
    font-size: 32px;
}

.admin-empty h3 {
    margin: 10px 0 7px;
}

.admin-empty .muted {
    margin: 0;
}

.admin-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
    padding: 17px 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafbff;
}

.admin-note > span {
    font-size: 20px;
}

.admin-note p {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    font-size: 13px;
}

.admin-note p > span {
    color: var(--muted);
    line-height: 1.6;
}

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

    .admin-stat-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .admin-hero {
        padding: 23px 18px;
    }

    .admin-hero-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 25px;
    }

    .admin-stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-stat-card:last-child {
        grid-column: auto;
    }

    .admin-stat-card {
        padding: 19px;
    }

    .admin-directory-heading {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .admin-table th,
    .admin-table td {
        padding: 12px 14px;
    }
}
