/* =========================================================
   VLE Dashboard — Stylesheet
   Design direction: a study-desk / notebook feel — warm paper
   background, a deep chalkboard-green sidebar, and each content
   type (sessions / assignments / quizzes / roster) colour-coded
   consistently throughout. All colours, spacing and type live in
   the CSS variables below so the whole theme — or the brand name
   and logo in config/site.php — can be swapped from one place.
   ========================================================= */

:root {
    /* ---- palette ---- */
    --color-bg:        #F6F3EA;  /* warm paper */
    --color-surface:   #FFFFFF;
    --color-ink:       #202B23;  /* near-black, green-tinted */
    --color-muted:     #6E6A5C;
    --color-border:    #E4DFCD;

    --color-primary:       #2F6F4E; /* chalkboard green — sessions */
    --color-primary-dark:  #1F4E36;
    --color-primary-light: #DCEAE1;

    --color-amber:        #C97D2E; /* highlighter amber — assignments */
    --color-amber-light:  #F6E3C8;

    --color-indigo:       #3B5B8C; /* ink indigo — quizzes */
    --color-indigo-light: #DCE4F2;

    --color-clay:         #8B5E3C; /* clay — roster / students */
    --color-clay-light:   #EBDDCF;

    --color-danger:       #B23B31;
    --color-danger-dark:  #8F2E26;
    --color-success-bg:   #E1EEE3;
    --color-success-text: #1F6B3D;
    --color-error-bg:     #F7DEDA;
    --color-error-text:   #96271E;

    /* ---- type ---- */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* ---- layout ---- */
    --radius:    12px;
    --radius-sm: 8px;
    --spacing:   18px;
    --sidebar-width: 260px;
    --shadow-sm: 0 1px 3px rgba(32, 43, 34, 0.08);
    --shadow-md: 0 10px 26px rgba(32, 43, 34, 0.14);
    --shadow-lg: 0 20px 44px rgba(32, 43, 34, 0.20);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-ink);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); transition: color 0.15s var(--ease); }
.muted { color: var(--color-muted); }
.small { font-size: 0.85em; }

h1, h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; }
h1 { font-size: 1.6rem; position: relative; display: inline-block; padding-bottom: 8px; }
h1::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 46px; height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-amber));
    animation: growLine 0.5s var(--ease) 0.1s both;
}
@keyframes growLine { from { width: 0; opacity: 0; } to { width: 46px; opacity: 1; } }

/* ---------------- Top bar ---------------- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
    transition: box-shadow 0.25s var(--ease);
}
.topbar.is-scrolled { box-shadow: var(--shadow-md); }

.brand-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 36px; height: 36px; border-radius: 50%; display: block; transition: transform 0.3s var(--ease); }
.brand-lockup:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--color-primary-dark);
    letter-spacing: 0.01em;
    transition: color 0.15s var(--ease);
}
.brand-lockup:hover .brand-name { color: var(--color-primary); }
.brand-lockup-center { flex-direction: column; gap: 8px; margin-bottom: 4px; }
.brand-logo-lg { width: 56px; height: 56px; }
.brand-name-lg { font-size: 1.4rem; }

.topbar-user { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.user-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.user-avatar-photo { object-fit: cover; background: none; }
.role-tag {
    font-size: 0.68rem;
    color: var(--color-muted);
    background: var(--color-bg);
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---------------- Layout ---------------- */
.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 61px); }

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--color-primary-dark);
    color: #EDEAD9;
    padding: var(--spacing);
    min-height: calc(100vh - 61px);
}
.sidebar h2 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    margin-bottom: 10px;
}
.sidebar .muted { color: rgba(255,255,255,0.55); }

.course-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 360px;
    overflow-y: auto;
}
.course-list li { margin-bottom: 4px; }
.course-list a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #EDEAD9;
    border-left: 3px solid transparent;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease), padding-left 0.15s var(--ease);
}
.course-list a:hover { background: rgba(255,255,255,0.08); padding-left: 16px; }
.course-list a.active {
    background: rgba(255,255,255,0.12);
    border-left-color: var(--color-amber);
    font-weight: 600;
    color: #fff;
}
.course-badge {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.08);
    border-left: 3px solid var(--color-amber);
    color: #EDEAD9;
}

.sidebar-section-heading { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.14); }
.form-compact input, .form-compact textarea { font-size: 0.85rem; }
.sidebar .form label { color: rgba(255,255,255,0.8); }
.sidebar .form input,
.sidebar .form textarea {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}
.sidebar .form input::placeholder,
.sidebar .form textarea::placeholder { color: rgba(255,255,255,0.45); }
.sidebar .form input:focus,
.sidebar .form textarea:focus {
    background: rgba(255,255,255,0.14);
    border-color: var(--color-amber);
    box-shadow: none;
}

.content {
    flex: 1;
    padding: 26px;
    max-width: 900px;
    animation: fadeIn 0.35s ease;
}

/* ---------------- Course header (teacher) ---------------- */
.course-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.course-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------------- Panels (accordion cards) ---------------- */
.panel {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    animation: fadeIn 0.4s var(--ease) both;
    transition: box-shadow 0.2s var(--ease);
}
.panel:hover { box-shadow: var(--shadow-md); }
.content > .panel:nth-of-type(1) { animation-delay: 0.02s; }
.content > .panel:nth-of-type(2) { animation-delay: 0.07s; }
.content > .panel:nth-of-type(3) { animation-delay: 0.12s; }
.content > .panel:nth-of-type(4) { animation-delay: 0.17s; }
.content > .panel:nth-of-type(5) { animation-delay: 0.22s; }
.content > .panel:nth-of-type(6) { animation-delay: 0.27s; }
.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--color-primary);
}
.panel[data-accent="assignment"]::before { background: var(--color-amber); }
.panel[data-accent="quiz"]::before       { background: var(--color-indigo); }
.panel[data-accent="students"]::before  { background: var(--color-clay); }

.panel-toggle {
    all: unset;
    box-sizing: border-box;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px 6px;
    cursor: pointer;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: background 0.15s var(--ease);
}
.panel-toggle:hover { background: var(--color-bg); }
.panel-toggle h2 { font-size: 1.1rem; }
.panel-toggle .chevron {
    font-size: 0.95rem;
    color: var(--color-muted);
    transition: transform 0.3s var(--ease);
    flex-shrink: 0;
    margin-left: 12px;
}
.panel.collapsed .chevron { transform: rotate(-90deg); }

.panel-body {
    padding: 6px 22px 22px;
    max-height: 3000px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease), padding 0.35s var(--ease);
}
.panel.collapsed .panel-body {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.panel h3 { margin: 22px 0 8px; font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; }

/* No-JS fallback: if JS never runs, panels must still show everything. */
.no-js .panel-body { max-height: none !important; opacity: 1 !important; }
.no-js .join-link { display: inline-flex !important; }
.no-js .join-pending { display: none !important; }

/* ---------------- Forms ---------------- */
.form { display: flex; flex-direction: column; gap: 4px; }
.form label { font-size: 0.82rem; font-weight: 600; margin-top: 10px; }
.form input,
.form textarea {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    background: var(--color-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    background: #fff;
}
.form textarea { resize: vertical; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }

.inline-form { display: inline; }

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0) scale(0.97); box-shadow: none; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s var(--ease);
}
.btn-primary:hover::after { left: 130%; }
.btn-secondary { background: var(--color-bg); color: var(--color-ink); border: 1px solid var(--color-border); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: var(--color-danger-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--color-border); color: var(--color-ink); }
.btn-ghost:hover { background: var(--color-bg); }
.btn-small { padding: 6px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------------- Tables ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 8px; }
.data-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.data-table th, .data-table td {
    text-align: left;
    padding: 10px 10px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    vertical-align: top;
}
.data-table th { color: var(--color-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: var(--color-bg); }
.row-actions { display: flex; gap: 6px; white-space: nowrap; }
.data-table td input[type="checkbox"],
.data-table th input[type="checkbox"] { width: auto; accent-color: var(--color-primary); cursor: pointer; }

/* Shows roughly 10 rows, then scrolls — used for tables that can grow
   large (e.g. a 50-class recurring schedule) so the page itself stays a
   manageable length. The header row stays visible while scrolling. */
.table-scroll-tall { max-height: 460px; overflow-y: auto; }
.table-scroll-tall thead th {
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 1;
    box-shadow: 0 1px 0 var(--color-border);
}

/* ---------------- Due-date badges (filled in by JS) ---------------- */
.due-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
    letter-spacing: 0.01em;
}
.due-badge:empty { display: none; }
.due-badge.badge-overdue  { background: var(--color-error-bg);  color: var(--color-error-text); }
.due-badge.badge-soon     { background: var(--color-amber-light); color: #7A4A15; }
.due-badge.badge-ok       { background: var(--color-primary-light); color: var(--color-primary-dark); }
.due-badge.badge-starting { background: var(--color-indigo-light); color: var(--color-indigo); }

/* ---------------- Copy-link button ---------------- */
.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted);
    font-size: 0.85rem;
    padding: 3px 6px;
    border-radius: 4px;
    margin-left: 2px;
    vertical-align: middle;
    transition: color 0.15s ease, background 0.15s ease;
}
.copy-btn:hover { color: var(--color-primary); background: var(--color-primary-light); }
.copy-btn.copied { color: var(--color-primary-dark); animation: popIn 0.3s var(--ease); }

/* ---------------- Checkbox list (Manage Students) ---------------- */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px 0;
}
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    font-size: 0.9rem;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}
.checkbox-row:hover { background: var(--color-bg); }
.checkbox-row input { width: auto; accent-color: var(--color-clay); }

.roster-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.roster-avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-clay-light);
    color: var(--color-clay);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.75rem;
}
.roster-name-with-avatar { display: inline-flex; align-items: center; gap: 8px; }

.checkbox-list-row {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
    gap: 6px;
}
.checkbox-row-compact {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 6px 12px;
    gap: 6px;
}
.checkbox-row-compact:hover { background: var(--color-primary-light); }
.checkbox-row-compact input { accent-color: var(--color-primary); }

/* ---------------- Next Up cards (student dashboard) ---------------- */
.next-up-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 6px;
}
.next-up-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.next-up-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.next-up-course { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--color-primary-dark); }
.next-up-date { font-size: 0.85rem; color: var(--color-muted); }
.next-up-join { margin-top: 6px; align-self: flex-start; }

/* ---------------- PDF lesson-plan link ---------------- */
.pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s var(--ease);
}
.pdf-link:hover { transform: translateX(2px); text-decoration: underline; }
.current-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-top: 6px;
}

/* ---------------- My Profile (teacher: photo + bio editor) ---------------- */
.profile-editor {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}
.profile-picture-preview {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.profile-picture-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-picture-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 2.2rem;
}
.profile-form { flex: 1; min-width: 220px; }

/* ---------------- Your Teachers (student: photo + bio cards) ---------------- */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 6px;
}
.teacher-card {
    display: flex;
    gap: 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-clay);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.teacher-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.teacher-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--color-surface);
    box-shadow: var(--shadow-sm);
}
.teacher-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-photo-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-clay-light);
    color: var(--color-clay);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.9rem;
}
.teacher-info { flex: 1; min-width: 0; }
.teacher-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--color-ink); }
.teacher-courses { margin-top: 2px; }
.teacher-bio { margin: 8px 0 0; font-size: 0.88rem; line-height: 1.5; color: var(--color-ink); }

/* ---------------- Lesson Plans (student: titled notes + PDFs) ---------------- */
.lesson-plan-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}
.lesson-plan-list-scroll {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}
.lesson-plan-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-indigo);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.lesson-plan-card:hover { box-shadow: var(--shadow-sm); transform: translateX(2px); }
.lesson-plan-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.lesson-plan-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--color-ink); }
.lesson-plan-notes {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--color-ink);
    white-space: pre-line;
}

/* ---------------- Join gating (5 minutes before start) ---------------- */
.join-pending { display: none; font-variant-numeric: tabular-nums; }

/* ---------------- Danger list (delete a student account) ---------------- */
.danger-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}
.danger-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--color-error-bg);
    border: 1px solid rgba(178, 59, 49, 0.18);
    font-size: 0.88rem;
    transition: background 0.15s var(--ease);
}
.danger-list-row:hover { background: #f6d3ce; }

/* ---------------- Alerts ---------------- */
.alert {
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    animation: slideDown 0.3s var(--ease);
}
.alert-success { background: var(--color-success-bg); color: var(--color-success-text); border-left-color: var(--color-success-text); }
.alert-error   { background: var(--color-error-bg);   color: var(--color-error-text); border-left-color: var(--color-error-text); }

/* ---------------- Auth / login page ---------------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.12), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,0.10), transparent 45%),
        linear-gradient(150deg, var(--color-primary-dark), var(--color-primary) 55%, var(--color-amber));
    padding: 20px;
}
.auth-card {
    background: var(--color-surface);
    padding: 36px;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeIn 0.4s var(--ease);
}
.auth-card .brand-logo-lg { transition: transform 0.4s var(--ease); }
.auth-card:hover .brand-logo-lg { transform: rotate(-6deg) scale(1.05); }
.auth-card .form { text-align: left; }
.auth-card .subtitle { color: var(--color-muted); margin-top: 0; margin-bottom: 20px; }
.hint { margin-top: 22px; font-size: 0.8rem; color: var(--color-muted); line-height: 1.6; text-align: left; }

/* ---------------- Animations ---------------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 720px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; min-height: auto; }
    .content { max-width: 100%; padding: 18px; }
    .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
    h1 { font-size: 1.35rem; }
    .course-header { flex-direction: column; align-items: stretch; }
    .course-header-actions { width: 100%; display: flex; gap: 8px; }
    .course-header-actions .btn { flex: 1; }
    .course-header-actions form.inline-form { display: flex; flex: 1; }
    .course-header-actions form.inline-form .btn { width: 100%; }
    .panel-toggle { padding: 16px 16px 4px; }
    .panel-body { padding: 6px 16px 18px; }
}

@media (max-width: 460px) {
    .role-tag { display: none; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
    .row-actions { flex-wrap: wrap; }
    .auth-card { padding: 26px 22px; }
    .danger-list-row { flex-direction: column; align-items: stretch; text-align: center; }
    .teacher-card { flex-direction: column; align-items: center; text-align: center; }
    .profile-editor { justify-content: center; text-align: center; }
    .profile-picture-preview { margin: 0 auto; }
}
