:root {
    --text: #222;
    /* Finish-tokenizing pass (Phase 1) -- constant across seasons. */
    --border-soft: #dddddd;                 /* chip and pill borders */
    --brand-wash: rgba(79, 70, 229, 0.15);
    --on-brand: #ffffff;                    /* text on a --brand (well, --s-accent) fill */
    /* The actual brand mark's colors -- fixed, not seasonal (originally NAV_SPEC.md, journal-
       only; now the site-wide header logo). A logo staying put while a seasonal accent layer
       shifts elsewhere on the page is the normal relationship between a brand mark and a theme,
       not an inconsistency -- so these deliberately don't read off --s-*. */
    --cff-ink: #1A1A1A;
    --cff-orange: #E8943D;
}

/* Seasonal theming (SEASONAL_THEMING_SPEC.md) -- these resolve from --s-* custom properties set
   on <body> itself (base.html, via app.py's inject_season context processor), with today's exact
   pre-season values as the fallback so a page rendered before that (or an unresolved var for any
   other reason) never blanks out. Deliberately on `body`, NOT `:root`: --s-* only ever exists on
   <body>'s own inline style, and a var() fallback resolves using values visible at the element
   where it's declared -- :root is an ANCESTOR of <body>, so it can never see a property <body>
   itself sets, and silently keeps using the fallback forever, on every page, in every season.
   (Confirmed live: --brand computed to the #4f46e5 fallback with --s-ink set on body, when this
   block still lived on :root.) --brand-dark had no clean seasonal equivalent (see 2e's note) --
   every former consumer now reads --s-accent directly instead. */
body {
    --brand: var(--s-ink, #4f46e5);
    --brand-light: var(--s-tint, #e0e7ff);
    --bg: var(--s-desk, #f0f2f5);
    --muted: var(--s-muted, #666666);
    --border: var(--s-border, #e0e0ff);
    --surface: var(--s-surface, #ffffff);   /* cards, header, modals, sticky cells */
    --surface-2: var(--s-surface, #ffffff); /* chips, filter buttons */
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

.impersonation-banner {
    /* Same reasoning as .site-header below -- stacked explicitly so a page-level fixed
       decorative layer can never paint over it instead of its own background. */
    position: relative;
    z-index: 2;

    background: #fb923c;
    color: #431407;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.impersonation-banner a {
    color: #431407;
    font-weight: 700;
    text-decoration: underline;
    margin-left: 10px;
}

.impersonation-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
}

.impersonation-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 14px;
}

.impersonation-switch select {
    max-width: 220px;
    padding: 2px 6px;
    font-size: 0.8rem;
}
a:hover { color: var(--s-accent, #4338ca); }

.site-header {
    /* Explicitly stacked above page content -- so a page-level fixed decorative layer (e.g. the
       homework journal's outdoor-atmosphere/falling-leaves background) can never paint over the
       real nav, without that page needing to know the header's exact height. */
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 8px;
    background: var(--surface);
    padding: 14px 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.site-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--brand);
    font-size: 1.1rem;
    white-space: nowrap;
}

.site-header .brand .logo { height: 40px; width: auto; display: block; }

/* Hand-marker wordmark next to the owl mark: "Code" in ink, "for FUN" in orange, both Permanent
   Marker (font link in base.html) -- "for FUN" smaller since it's the trailing half of the
   mark, not a second heading. Was journal-only (NAV_SPEC.md); now the one brand mark everywhere. */
.site-header .brand .wordmark { display: inline-flex; align-items: baseline; gap: 6px; }
.site-header .brand .wordmark-code { font-family: 'Permanent Marker', cursive; font-size: 24px; color: var(--cff-ink); }
.site-header .brand .wordmark-fun { font-family: 'Permanent Marker', cursive; font-size: 19px; color: var(--cff-orange); }
/* Winter only: "For Fun" in the winter blue instead of Code For Fun orange (seasons.py accent_2). */
body.season-winter .site-header .brand .wordmark-fun { color: #4A82C3; }

@media (max-width: 640px) {
    .site-header .brand .wordmark { display: none; } /* owl mark alone */
}

.site-header nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.9rem;
}

.site-header nav a { color: var(--muted); white-space: nowrap; }
.site-header nav a:hover { color: var(--brand); }
/* Small "something to do here" dot after a nav link (e.g. My Profile with no home address). */
.nav-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%;
           background: #f59e0b; vertical-align: super; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
           clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Students nav dropdown (_students_nav_dropdown.html) -- click-toggled via nav_dropdown.js,
   not hover-only, so it works the same on a touch/tablet admin session as with a mouse. */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--muted);
    cursor: pointer;
}
/* background/transform reset: the site-wide button:hover rule otherwise paints the toggle
   as a dark pill with brand-colored (invisible) text. */
.nav-dropdown-toggle:hover, .nav-dropdown-toggle:active { color: var(--brand); background: none; transform: none; }
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    margin-top: 10px;
    min-width: 160px;
    padding: 6px 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.nav-dropdown.is-open .nav-dropdown-menu { display: block; }
/* The Games menu (_games_nav.html) also opens on hover; the invisible strip bridges the gap
   between the button and the menu so moving the mouse down doesn't close it. */
.nav-dropdown-hover:hover .nav-dropdown-menu, .nav-dropdown-hover:focus-within .nav-dropdown-menu { display: block; }
.nav-dropdown-hover .nav-dropdown-menu { left: 50%; transform: translateX(-50%); min-width: 0; width: max-content; }
.nav-dropdown-hover .nav-dropdown-menu a { text-align: center; padding: 8px 18px; }
.nav-dropdown-hover::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.nav-dropdown-menu a {
    display: block;
    padding: 7px 14px;
    font-size: 0.88rem;
    white-space: nowrap;
}
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 6px 0; }
.nav-dropdown-minor { color: var(--muted); font-size: 0.82rem; }

.site-header .user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.site-header .header-notification {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--muted);
    border-radius: 999px;
}
.site-header .header-notification:hover { color: var(--brand); background: var(--brand-light); }
.site-header .header-notification svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.site-header .header-notification-count { position:absolute; top:-5px; right:-7px; min-width:17px; height:17px; padding:0 4px; display:flex; align-items:center; justify-content:center; color:#fff; background:#dc2626; border:2px solid var(--surface); border-radius:999px; font-size:10px; font-weight:800; line-height:1; }

@media (max-width: 480px) {
    .site-header { padding: 12px 16px; }
    .site-header .brand { font-size: 1rem; }
    .site-header .brand .logo { height: 32px; width: auto; }
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumb-sep { color: #ccc; }
.breadcrumb-current { color: var(--text); font-weight: 600; }

.card {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 28px;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.04em;
}

.badge.locked { background: #f1f1f1; color: #999; }
.badge.completed { background: #dcfce7; color: #16a34a; }
.badge.in_progress { background: #fef9c3; color: #a16207; }
.badge.not_started { background: #f1f1f1; color: #888; }
.badge.complete { background: #dcfce7; color: #16a34a; }
.badge.incomplete { background: #fee2e2; color: #dc2626; }
.badge.thumbs_up { background: #dcfce7; color: #16a34a; }
.badge.neutral { background: #fef9c3; color: #a16207; }
.badge.thumbs_down { background: #fee2e2; color: #dc2626; }
.badge.present { background: #dbeafe; color: #2563eb; }
.badge.absent { background: #e5e7eb; color: #374151; }
.badge.note-only { background: #f1f1f1; color: #888; }

button, .btn {
    display: inline-block;
    padding: 12px 22px;
    background: var(--brand);
    color: var(--on-brand);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, transform 80ms ease, opacity 0.15s;
}

button:hover, .btn:hover { background: var(--s-accent, #4338ca); color: var(--on-brand); }
/* Instant press feedback -- no network round trip needed for this part, so it lands on every
   click regardless of how long the actual action takes (see base.html's global submit listener
   for the "still working on it" half of this, on real form submits). */
button:active, .btn:active { transform: scale(0.96); }
button:disabled, .btn:disabled, button.is-pending, .btn.is-pending {
    opacity: 0.65; cursor: not-allowed; transform: none;
}
button.is-pending, .btn.is-pending { cursor: wait; }

select, input[type="text"], input[type="file"] {
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    outline: none;
}

select:focus, input:focus { border-color: var(--brand); }

.home-address-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem 8rem;
    gap: 12px;
    max-width: 560px;
    margin-bottom: 14px;
}
.home-address-fields label { font-weight: 600; }
.home-address-fields input[type="text"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
}
.home-address-street { grid-column: 1 / -1; }
.home-address-note {
    display: block;
    margin: 4px 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--muted);
    overflow-wrap: anywhere;
}
@media (max-width: 520px) {
    .home-address-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-address-city { grid-column: 1 / -1; }
}

.progress-bar {
    background: #eee;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin: 8px 0 4px;
}

.progress-bar-fill {
    background: var(--brand);
    height: 100%;
}

.lesson-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.lesson-row:last-child { border-bottom: none; }

.lesson-row-main, .lesson-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lesson-row-main { flex: 1; }
.lesson-row-actions { flex-shrink: 0; }

.lesson-row.current-week {
    background: var(--brand-light);
    margin: 0 -28px;
    padding-left: 28px;
    padding-right: 28px;
    border-radius: 8px;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--text);
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.link-button:hover { background: none; color: var(--brand); text-decoration: underline; }

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

.lesson-table th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 10px;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
}

.lesson-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: middle;
}

.lesson-table tbody tr:last-child td { border-bottom: none; }
.lesson-table-empty { color: #ccc; }

.btn-small {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: 8px;
    background: var(--brand-light);
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, transform 80ms ease, opacity 0.15s;
}

.btn-small:hover { background: var(--brand); color: var(--on-brand); }
.btn-small:active { transform: scale(0.94); }
.btn-small.is-pending { opacity: 0.65; cursor: wait; transform: none; }

.attendance-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 0; border-bottom: 1px solid #f1f1f1;
}
.attendance-row:last-child { border-bottom: none; }
.attendance-student-name { flex: 0 0 140px; font-weight: 600; }
.attendance-name-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--border); }
.attendance-name-link:hover { border-bottom-color: var(--muted); }
/* Same instant-on-hover ::after tooltip as .attendance-cell-has-note below, driven by
   data-parent-preview instead of data-note -- kept as its own rule (not folded into that one)
   since it lives on an <a>, not a grid cell, and left-aligns under the name instead of
   centering above a cell. */
.attendance-name-link[data-parent-preview] { cursor: help; position: relative; }
.attendance-name-link[data-parent-preview]::after {
    content: attr(data-parent-preview);
    position: absolute;
    bottom: 130%;
    left: 0;
    background: #1f2937;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: pre-line;
    width: max-content;
    max-width: 240px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.08s ease;
    pointer-events: none;
    z-index: 20;
}
.attendance-name-link[data-parent-preview]:hover::after { opacity: 1; visibility: visible; }
.attendance-options { display: flex; gap: 6px; flex-wrap: wrap; }
.attendance-option { display: inline-flex; cursor: pointer; }
.attendance-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.attendance-option span {
    padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
    font-size: 0.8rem; color: var(--muted); background: var(--surface); white-space: nowrap; user-select: none;
}
.attendance-option.opt-thumbs_up input:checked + span { background: #16a34a; color: white; border-color: #16a34a; }
.attendance-option.opt-neutral input:checked + span { background: #a16207; color: white; border-color: #a16207; }
.attendance-option.opt-thumbs_down input:checked + span { background: #dc2626; color: white; border-color: #dc2626; }
.attendance-option.opt-present input:checked + span { background: #2563eb; color: white; border-color: #2563eb; }
.attendance-option.opt-absent input:checked + span { background: #374151; color: white; border-color: #374151; }
.attendance-note {
    flex: 1; min-width: 160px; padding: 7px 10px; border: 2px solid var(--border);
    border-radius: 8px; font-size: 0.82rem; color: var(--text); font-family: inherit;
}
.attendance-note:focus { border-color: var(--brand); outline: none; }
.attendance-remove-dropin {
    flex-shrink: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface); color: #dc2626;
    font-size: 1rem; line-height: 1; cursor: pointer;
}
.attendance-remove-dropin:hover { background: #fee2e2; border-color: #dc2626; }

.attendance-grid-wrap { overflow-x: auto; }
/* separate + 0 spacing, NOT collapse -- collapse silently breaks position:sticky on <th>/<td>
   in this browser (confirmed live: the sticky Student column already never actually stayed
   put while scrolled, pre-existing and unrelated to this comment's own change -- separate
   with zero spacing looks identical here since every border is just a bottom rule, no
   adjoining left/right/top borders that collapse vs. separate would visibly differ on). */
.attendance-grid-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.attendance-grid-table th, .attendance-grid-table td {
    padding: 8px 12px; text-align: center; font-size: 0.82rem;
    border-bottom: 1px solid #f1f1f1; white-space: nowrap;
}
.attendance-grid-table th { color: #999; font-weight: 600; font-size: 0.78rem; }
.attendance-grid-table .sticky-col {
    position: sticky; left: 0; background: var(--surface); text-align: left; z-index: 1;
}
/* Mirrors .sticky-col on the other edge -- the Attended tally stays visible without scrolling
   all the way across once a semester's worth of session columns piles up in between. */
.attendance-grid-table .sticky-col-right {
    position: sticky; right: 0; background: var(--surface); z-index: 1;
    box-shadow: -1px 0 0 #f1f1f1;
}
.attendance-cell { font-size: 1rem; display: inline-block; padding: 2px 6px; border-radius: 6px; }
.attendance-cell-empty { color: #e5e7eb; }
.attendance-cell-has-note { background: #fef9c3; box-shadow: 0 0 0 1px #fde68a; cursor: help; position: relative; }

/* Custom tooltip via data-note — instant on hover, unlike the browser's
   native title-attribute tooltip which imposes its own ~1.5s delay. */
.attendance-cell-has-note::after {
    content: attr(data-note);
    position: absolute;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 200px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.08s ease;
    pointer-events: none;
    z-index: 20;
}
.attendance-cell-has-note:hover::after { opacity: 1; visibility: visible; }

.unit-teaser {
    opacity: 0.55;
    filter: grayscale(1);
}

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.flash.success { background: #dcfce7; color: #16a34a; }
.flash.warning { background: #fef9c3; color: #a16207; }
.flash.error { background: #fee2e2; color: #dc2626; }

.impersonation-exit-overlay {
    align-items: center;
    background: rgba(17, 24, 39, 0.48);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 2000;
}

.impersonation-exit-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
    max-width: 480px;
    padding: 26px;
    width: 100%;
}

.impersonation-exit-modal h3 { margin: 0 0 10px; }
.impersonation-exit-modal p { color: #555; margin: 0 0 20px; line-height: 1.5; }

table.roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

table.roster-table th, table.roster-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #f1f1f1;
}

table.roster-table select { font-size: 0.8rem; padding: 6px 8px; }

.calendar-scroll { flex: 1; min-width: 260px; }

.calendar-header, .calendar-body { display: flex; }

.calendar-gutter { width: 36px; flex-shrink: 0; }

.calendar-day-label {
    flex: 1;
    min-width: 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.calendar-day-label:hover { color: var(--brand); border-bottom-color: var(--brand); }

.calendar-hour-mark {
    position: absolute;
    right: 8px;
    font-size: 0.7rem;
    color: var(--muted);
    transform: translateY(-50%);
}

.calendar-day-col {
    flex: 1;
    min-width: 0;
    position: relative;
    border-left: 1px solid #f1f1f1;
}

.calendar-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid #f5f5f5;
}

/* In-person at the Learning Center is the default. Online and offsite classes use modifiers.
   Keep meeting-mode colors fixed across seasonal themes. */
.cal-block {
    position: absolute;
    left: 2px;
    right: 2px;
    overflow: hidden;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.7rem;
    line-height: 1.25;
    background: #bbf7d0;
    color: #15803d;
    text-decoration: none;
    display: block;
    border: 1px solid rgba(21, 128, 61, 0.25);
    z-index: 2;
}

.cal-block:hover { border-color: #15803d; color: #15803d; }

.cal-block-crowded { padding: 3px 4px; font-size: 0.62rem; line-height: 1.15; }

.cal-block-unassigned { background: #fee2e2; color: #dc2626; border-color: rgba(220, 38, 38, 0.15); }
.cal-block-unassigned:hover { border-color: #dc2626; color: #dc2626; }
.cal-block-online { background: #bfdbfe; color: #1d4ed8; border-color: rgba(29, 78, 216, 0.25); }
.cal-block-online:hover { border-color: #1d4ed8; color: #1d4ed8; }
.cal-block-offsite { background: #f3e8ff; color: #9333ea; border-color: rgba(147, 51, 234, 0.15); }
.cal-block-offsite:hover { border-color: #9333ea; color: #9333ea; }
.cal-block-camp { background: #fed7aa; color: #9a3412; border-color: rgba(154, 52, 18, 0.25); }
.cal-block-camp:hover { border-color: #9a3412; color: #9a3412; }

.cal-block-title,
.cal-block-time,
.cal-block-instructor {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-block-title { font-weight: 700; }
.cal-block-time, .cal-block-instructor { opacity: 0.85; }
.cal-block-pacing { opacity: 0.75; font-style: italic; }

.cal-unavailable-stripe {
    position: absolute;
    left: 0; right: 0;
    pointer-events: none;
    z-index: 1;
    background-color: rgba(220, 38, 38, 0.06);
    background-image: repeating-linear-gradient(
        135deg,
        rgba(220, 38, 38, 0.14), rgba(220, 38, 38, 0.14) 6px,
        transparent 6px, transparent 14px
    );
}

.instructor-sidebar { width: 190px; flex-shrink: 0; }

.instructor-card {
    cursor: grab;
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px; margin-bottom: 6px;
    background: var(--brand-light); border: 1px solid var(--brand-wash);
    border-radius: 6px; font-size: 0.8rem;
}
.instructor-card.dragging { opacity: 0.4; }
.instructor-card-name { text-decoration: underline; text-decoration-color: transparent; }
.instructor-card:hover .instructor-card-name { text-decoration-color: currentColor; }
.instructor-card.instructor-card-availability-active {
    background: var(--brand); border-color: var(--s-accent, #4338ca); color: var(--on-brand);
}
.instructor-card.instructor-card-availability-active .instructor-card-load {
    background: rgba(255, 255, 255, 0.25); color: var(--on-brand);
}
.instructor-card.instructor-card-availability-active .instructor-card-load-active { background: var(--surface-2); color: var(--brand); }
.instructor-card-loads { display: flex; gap: 3px; }
.instructor-card-load {
    background: #d1d5db; color: #4b5563; border-radius: 10px;
    font-size: 0.65rem; padding: 1px 6px; min-width: 1.1em; text-align: center;
}
.instructor-card-load-active { background: var(--brand); color: var(--on-brand); }
.instructor-card-filter-btn {
    background: var(--surface-2); color: var(--brand); border-radius: 10px;
    font-size: 0.75rem; padding: 2px 7px; text-decoration: none;
    border: 1px solid rgba(79, 70, 229, 0.25); flex-shrink: 0;
}
.instructor-card-filter-btn:hover { background: var(--brand); color: var(--on-brand); }
.instructor-card.instructor-card-availability-active .instructor-card-filter-btn {
    background: rgba(255, 255, 255, 0.25); color: var(--on-brand); border-color: rgba(255, 255, 255, 0.4);
}

.cal-block-drop-ok { outline: 2px dashed #16a34a; outline-offset: 1px; }
.cal-block-drop-conflict { outline: 2px dashed #dc2626; outline-offset: 1px; }
.cal-block-drop-blocked { outline: 3px solid #7f1d1d; outline-offset: 1px; cursor: not-allowed; }
.cal-block-drop-warn { outline: 2px dashed #d97706; outline-offset: 1px; }

.badge-flag {
    background: #fee2e2; color: #dc2626; border-radius: 4px;
    font-size: 0.7rem; padding: 2px 6px; margin-right: 6px; white-space: nowrap;
}


[id^="class-"]:target {
    animation: target-flash 4s ease;
    border-radius: 10px;
}

@keyframes target-flash {
    0% { background: #fb923c; }
    20% { background: #fb923c; }
    100% { background: transparent; }
}

/* undo_toast.js -- marks an item pending while its grace period counts down */
.pending-delete { opacity: 0.35; pointer-events: none; }

/* tours.js -- small, out-of-the-way replay button on the 3 student feature-tour pages */
.tour-trigger-btn {
    position: fixed; bottom: 16px; right: 16px; z-index: 10;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-soft); border-radius: 20px;
    padding: 6px 14px; font-size: 0.78rem; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.tour-trigger-btn:hover { background: #f5f5f5; color: #4f46e5; border-color: #c7d2fe; }

/* feedback_widget.js -- staff-only feedback button + modal, base.html */
.feedback-trigger-btn {
    position: fixed; bottom: 16px; left: 16px; z-index: 10;
    background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-soft); border-radius: 20px;
    padding: 6px 14px; font-size: 0.78rem; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.feedback-trigger-btn:hover { background: #f5f5f5; color: #4f46e5; border-color: #c7d2fe; }

.feedback-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1000; align-items: center; justify-content: center;
}
.feedback-modal-overlay.open { display: flex; }
.feedback-modal { background: var(--surface-2); border-radius: 10px; padding: 20px; width: 90%; max-width: 420px; }
.feedback-modal h3 { margin-bottom: 10px; }
.feedback-modal textarea {
    width: 100%; min-height: 100px; padding: 10px; border: 1px solid var(--border-soft); border-radius: 6px;
    font-family: inherit; font-size: 0.9rem; resize: vertical; box-sizing: border-box;
}
.feedback-modal label { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); margin-top: 10px; }
.feedback-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.feedback-modal-status { font-size: 0.8rem; color: #999; margin-top: 8px; min-height: 1.2em; }

/* Class coverage: open sessions needing a substitute. Shown to program staff on every page until
   someone is assigned; it can't be dismissed. */
.coverage-banner { display:flex; align-items:center; justify-content:center; gap:10px 16px; flex-wrap:wrap; padding:10px 16px; background:#b42318; color:#fff; font-size:0.92rem; text-align:center; }
.coverage-banner strong { font-weight:700; }
.coverage-banner a { color:#fff; font-weight:700; text-decoration:underline; white-space:nowrap; }
.coverage-banner .coverage-banner-urgent { padding:2px 8px; border-radius:999px; background:#fff; color:#b42318; font-size:0.78rem; font-weight:700; }

/* QR-card students (After School, Camp): when their temporary login ends (app.py inject_access_end_notice). */
.access-end-notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #fffbeb;
    border: 1px solid #fcd34d; color: #78350f; font-size: 0.92rem; line-height: 1.45; }
