/* ============================================================
   student-sidebar.css — global student sidebar
   Mirrors the teacher sidebar shape (left-rail nav + collapse arrow)
   so students get a consistent multi-page workspace experience.
   Loaded on: student-app.html, the student-{calendar,analytics,
   journal,messages}.html pages, and class.html when
   the signed-in user has role=Student (in which case the teacher
   chrome is hidden via body.tc-student-mode).
   ============================================================ */

/* Layout: collapsible left rail. Mirrors shared/layout.css's .left-sidebar
   shape but namespaced to .ss-* for the student-side styling. */
.ss-page {
    display: flex;
    min-height: 100vh;
    background: #f8faf9;
}

.ss-sidebar {
    width: 200px;
    flex: 0 0 200px;
    background: #fff;
    border-right: 1px solid var(--tc-border, #ece7dd);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width 0.18s ease, flex-basis 0.18s ease;
    z-index: 50;
}

/* Rail-collapse: shrinks to a 52px strip showing icons only.
   Never goes to 0 — the user must always have a visible expand handle. */
.ss-page.ss-collapsed .ss-sidebar {
    width: 52px;
    flex: 0 0 52px;
}
.ss-page.ss-collapsed .ss-logo-text,
.ss-page.ss-collapsed .ss-nav-item > span:not(.ss-nav-icon),
.ss-page.ss-collapsed .ss-nav-badge,
.ss-page.ss-collapsed .ss-sec,
.ss-page.ss-collapsed .ss-class-list,
.ss-page.ss-collapsed .ss-sec-head {
    display: none !important;
}
.ss-page.ss-collapsed .ss-logo {
    justify-content: center;
    padding: 14px 0;
}
.ss-page.ss-collapsed .ss-nav-item {
    justify-content: center;
    padding: 9px 0;
}

/* Collapse / expand arrow — pinned to the sidebar's right edge.
   Always visible so the user can always re-expand. */
.ss-toggle {
    position: absolute;
    top: 18px;
    right: -14px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--tc-border, #ece7dd);
    box-shadow: 0 2px 6px rgba(15,23,42,0.08);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 60;
    color: #6b7280;
    font-size: 14px; font-weight: 700; line-height: 1;
    transition: transform 0.15s, color 0.15s;
}
.ss-toggle:hover { color: var(--tc-accent-dark, #059669); transform: scale(1.05); }
.ss-page.ss-collapsed .ss-toggle { transform: rotate(180deg); }
.ss-page.ss-collapsed .ss-toggle:hover { transform: rotate(180deg) scale(1.05); }

/* Sidebar logo strip */
.ss-logo {
    display: flex; align-items: center; gap: 7px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--tc-border-soft, #f0ece3);
    text-decoration: none; color: inherit;
}
.ss-logo svg { width: 20px; height: 20px; }
.ss-logo-text { font-size: 14px; font-weight: 800; color: #0c1b33; }
.ss-logo-text .accent { color: var(--tc-accent-dark, #059669); }

/* Top global nav (Home / Calendar / Analytics / Journal / Messages).
   Tuned to match the teacher .tc-nav-item (shared/layout.css) so that the
   home → notebook hop feels like one app, not two. */
.ss-topnav {
    padding: 8px 6px;
    display: flex; flex-direction: column; gap: 1px;
}
.ss-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #374151;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    position: relative;
}
.ss-nav-item:hover { background: #f3f4f6; color: #111; }
.ss-nav-item.active {
    background: var(--tc-accent-tint, #ecfdf5);
    color: var(--tc-accent-dark, #059669);
    font-weight: 600;
}
.ss-nav-item .ss-nav-icon {
    width: 17px; height: 17px; flex-shrink: 0;
    color: currentColor;
    display: inline-flex; align-items: center; justify-content: center;
}
.ss-nav-item .ss-nav-icon svg { width: 17px; height: 17px; display: block; }
.ss-nav-badge {
    margin-left: auto;
    background: var(--tc-danger, #a23838);
    color: #fff;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    line-height: 1;
}
.ss-nav-badge[hidden] { display: none; }
/* Dot variant — soft "something new here" marker with no count (Journal /
   Calendar / Analytics). Messages keeps the numbered pill. */
.ss-nav-badge.ss-dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }

/* Section heading (MY CLASSES) */
.ss-sec {
    padding: 8px 6px;
    border-top: 1px solid var(--tc-border-soft, #f0ece3);
}
.ss-sec-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 10px 3px;
    font-size: 10px; font-weight: 800;
    color: #6b7280;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.ss-sec-add {
    background: none; border: none; cursor: pointer;
    color: #6b7280; padding: 0; font-size: 16px; line-height: 1;
}
.ss-sec-add:hover { color: var(--tc-accent-dark, #059669); }

/* MY CLASSES list (active class highlighted) */
.ss-class-list {
    display: flex; flex-direction: column; gap: 1px;
    margin-top: 3px;
}
.ss-class-item {
    display: flex; align-items: center; gap: 7px;
    padding: 7px 10px;
    border-radius: 7px;
    text-decoration: none;
    color: #374151;
    font-size: 12.5px; font-weight: 600;
    cursor: pointer;
}
.ss-class-item:hover { background: #f3f4f6; color: #111; }
.ss-class-item.active {
    background: var(--tc-accent-dark, #059669); color: #fff;
}
.ss-class-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #94a3b8; flex-shrink: 0;
}
.ss-class-item.active .ss-class-dot { background: #fff; }
/* Missing-work dot (right edge of a class row) — data-driven by
   tcStudentWorkQueue in student-sidebar.js; red even on the active row. */
.ss-class-missing {
    width: 8px; height: 8px; border-radius: 50%;
    background: #dc2626; margin-left: auto; flex: none;
}
.ss-class-missing[hidden] { display: none; }
.ss-class-item.active .ss-class-missing { background: #fecaca; }

/* Name + meta column inside each badge. Standalone student pages keep
   the compact look (small name, hidden meta); class.html in tc-student-mode
   overrides these to the teacher's larger pill+name+meta shape in
   class-placeholder.css. */
.ss-class-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
.ss-class-name {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss-class-meta {
    display: none;
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss-class-empty {
    padding: 6px 10px; font-size: 11px; color: #9ca3af; font-style: italic;
}

/* ---- Per-class kebab (Phase B) ----
   Wrap each class row in a flex container so the <a> can absorb the click
   area while the kebab button sits as a sibling — putting a <button> inside
   an <a> is invalid HTML and breaks default link semantics. Wrapper owns
   the hover/active background so the kebab area highlights with the row;
   the inner <a> stays transparent and just controls its own text color. */
.ss-class-item-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 7px;
    transition: background-color 0.12s;
}
.ss-class-item-wrap:hover { background: #f3f4f6; }
/* Active row paints with the per-student color so calendar + sidebar stay
   in sync. Falls back to var(--tc-accent-dark, #059669) if no --cls-color is set on the wrapper. */
.ss-class-item-wrap.active { background: var(--cls-color, #059669); }
.ss-class-item-wrap .ss-class-item {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent !important;
}
/* Active row text + dot go white so they read on any picked palette color. */
.ss-class-item-wrap.active .ss-class-item,
.ss-class-item-wrap.active .ss-class-name,
.ss-class-item-wrap.active .ss-class-meta { color: #fff !important; }
.ss-class-item-wrap.active .ss-class-dot { background: #fff !important; }
.ss-class-kebab {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.12s, background-color 0.12s, color 0.12s;
}
.ss-class-kebab svg { width: 14px; height: 14px; }
.ss-class-item-wrap:hover .ss-class-kebab,
.ss-class-item-wrap.active .ss-class-kebab,
.ss-class-kebab:focus-visible { opacity: 1; }
/* Keep the kebab visible while its menu is open, even if the pointer
   leaves the row — otherwise the button fades out under its own open menu. */
.ss-class-item-wrap:has(.ss-class-kebab-dd:not([hidden])) .ss-class-kebab { opacity: 1; }
.ss-class-kebab:hover { background: #e5e7eb; color: #111; }
.ss-class-item-wrap.active .ss-class-kebab { color: rgba(255,255,255,0.85); }
.ss-class-item-wrap.active .ss-class-kebab:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* Dropdown sits below the row, right-aligned. z-index above the rest of the
   sidebar so it floats over neighboring class items. */
.ss-class-kebab-dd {
    position: absolute;
    top: 100%;
    right: 4px;
    min-width: 180px;
    margin-top: 4px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--tc-border, #ece7dd);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
}
/* Flip variant: rows near the bottom of the viewport hang the menu UP from
   the row instead so it never runs off-screen. Recomputed on every open and
   on every root↔palette content swap (_ssPlaceKebabDd). */
.ss-class-kebab-dd.drop-up {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}
.ss-class-kebab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #111;
    text-align: left;
    cursor: pointer;
}
.ss-class-kebab-item:hover { background: #f3f4f6; color: var(--tc-accent-dark, #059669); }
.ss-class-kebab-item-icon {
    display: inline-flex; align-items: center; justify-content: center;
    color: inherit;
}
.ss-class-kebab-reset {
    margin-top: 4px;
    border-top: 1px solid var(--tc-border-soft, #f0ece3);
    padding-top: 10px;
    color: #6b7280;
    font-size: 12px;
}
.ss-class-kebab-reset:hover { color: #111; }

/* Palette view */
.ss-class-kebab-palette-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #6b7280;
}
.ss-class-kebab-back {
    width: 20px;
    height: 20px;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #6b7280;
}
.ss-class-kebab-back:hover { background: #f3f4f6; color: #111; }
.ss-class-kebab-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 4px 8px 6px;
}
.ss-class-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: transform 0.1s, box-shadow 0.1s;
}
.ss-class-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 1px #9ca3af;
}
.ss-class-swatch.is-selected {
    box-shadow: 0 0 0 2px #1a1a1a;
}
.ss-class-swatch.is-selected::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Collapsed sidebar: hide kebab + dropdown (only the dot is visible) */
.ss-page.ss-collapsed .ss-class-kebab,
.ss-page.ss-collapsed .ss-class-kebab-dd {
    display: none !important;
}

/* Leave-class option is destructive — different palette than Pick color
   so it can't be hit by accident. */
.ss-class-kebab-leave {
    color: #b91c1c;
}
.ss-class-kebab-leave:hover {
    background: #fef2f2;
    color: #991b1b;
}

/* ---- Leave-class confirmation modal (Phase C) ---- */
.sslr-overlay { z-index: 10000; }
.sslr-modal {
    max-width: 460px;
    padding: 24px 26px 22px;
}
.sslr-icon {
    font-size: 30px;
    line-height: 1;
    margin-bottom: 8px;
}
.sslr-modal .ssjc-title {
    color: #991b1b;
    margin: 0 0 12px;
}
.sslr-warn {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    color: #4b1a1a;
    font-size: 13px;
    line-height: 1.55;
}
.sslr-warn p { margin: 0 0 8px; }
.sslr-warn p:last-child { margin-bottom: 0; }
.sslr-warn ul {
    margin: 6px 0 10px 18px;
    padding: 0;
}
.sslr-warn li { margin-bottom: 4px; }
.sslr-confirm-line {
    margin-top: 10px;
    color: #1a1a1a;
    font-weight: 500;
}
.sslr-input {
    text-align: center;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
}
.ssjc-btn.sslr-send {
    background: var(--tc-danger, #a23838);
    color: #fff;
}
.ssjc-btn.sslr-send:hover:not(:disabled) { background: #b91c1c; }

/* Top header strip across all student pages (small, just shows page title) */
.ss-topbar {
    background: #fff;
    border-bottom: 1px solid var(--tc-border, #ece7dd);
    height: 56px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 40;
}
.ss-topbar-title {
    font-size: 16px; font-weight: 700; color: #111;
}
.ss-topbar-right { display: flex; align-items: center; gap: 14px; }
.ss-topbar-user { font-size: 13px; color: #555; font-weight: 500; }
.ss-topbar-signout {
    background: #f3f4f6; border: 1px solid #d1d5db;
    border-radius: 6px; padding: 6px 14px;
    font-size: 13px; color: #555; cursor: pointer; font-family: inherit;
}
.ss-topbar-signout:hover { background: #e5e7eb; }

/* Content area (everything to the right of sidebar) */
.ss-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
}

/* Mobile: collapse by default */
@media (max-width: 720px) {
    .ss-page:not(.ss-collapsed) .ss-sidebar { box-shadow: 4px 0 20px rgba(0,0,0,0.18) }
}

/* Join-Class modal — shown when the student clicks the "+" in MY CLASSES.
   Students cannot create classes, so this is the only join affordance. */
.ssjc-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 2200;
    animation: ssjcFade 0.15s ease;
}
@keyframes ssjcFade { from { opacity: 0 } to { opacity: 1 } }
.ssjc-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
    padding: 26px 28px 22px;
    font-family: inherit;
}
.ssjc-title {
    font-size: 20px; font-weight: 800; color: #0c1b33;
    margin: 0 0 6px;
}
.ssjc-sub {
    font-size: 13px; color: #6b7280;
    margin: 0 0 18px;
}
.ssjc-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 18px; font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    font-family: 'SF Mono', Menlo, monospace;
    color: #0c1b33;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.ssjc-input:focus {
    outline: none;
    border-color: var(--tc-accent-dark, #059669);
}
.ssjc-msg {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}
.ssjc-msg.err { color: var(--tc-danger, #a23838); }
.ssjc-msg.ok  { color: var(--tc-accent-dark, #059669); }
.ssjc-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 18px;
}
.ssjc-btn {
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
}
.ssjc-btn.cancel {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}
.ssjc-btn.cancel:hover { background: #f3f4f6; }
.ssjc-btn.primary {
    background: var(--tc-accent-dark, #059669);
    color: #fff;
}
.ssjc-btn.primary:hover { background: var(--tc-accent-darker, #047857); }
.ssjc-btn:disabled { opacity: 0.6; cursor: default; }

/* ============================================================
   Welcome overlay — first-time notebook open for a class.
   Shown by student-class-bootstrap.js when studentNotebooks
   has welcomeSeen=false. Dismissing flips the flag and routes
   to the active (today-closest) lesson.
   ============================================================ */
.ssw-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 2300;
    padding: 24px;
    animation: ssjcFade 0.18s ease;
}
.ssw-modal {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.32);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 32px 36px 28px;
    font-family: inherit;
}
.ssw-eyebrow {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--tc-accent-dark, #059669);
    margin-bottom: 8px;
}
.ssw-title {
    font-size: 26px; font-weight: 800; color: #0c1b33;
    margin: 0 0 6px;
    line-height: 1.2;
}
.ssw-lede {
    font-size: 14.5px; color: #4b5563;
    margin: 0 0 22px;
    line-height: 1.5;
}
.ssw-list {
    display: flex; flex-direction: column; gap: 14px;
    margin: 0 0 22px;
}
.ssw-item {
    display: flex; gap: 13px;
    padding: 12px 14px;
    background: #f8faf9;
    border: 1px solid var(--tc-border, #ece7dd);
    border-radius: 10px;
}
.ssw-item-icon {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    background: var(--tc-accent-tint, #ecfdf5);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--tc-accent-dark, #059669);
}
.ssw-item-icon svg { width: 18px; height: 18px; }
.ssw-item-body { flex: 1; }
.ssw-item-title {
    font-size: 13.5px; font-weight: 700; color: #0c1b33;
    margin-bottom: 2px;
}
.ssw-item-desc {
    font-size: 12.5px; color: #4b5563;
    line-height: 1.45;
}
.ssw-actions {
    display: flex; justify-content: flex-end;
}
.ssw-cta {
    background: var(--tc-accent-dark, #059669);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}
.ssw-cta:hover { background: var(--tc-accent-darker, #047857); }
.ssw-cta:disabled { opacity: 0.6; cursor: default; }

/* ============================================================
   UNIFIED STUDENT CHROME (top bar + sidebar)
   Applies on:
     - body.tc-student-mode  → class.html notebook view (under body zoom:0.75)
     - body.tc-student-shell → standalone student pages (no body zoom)
   Both render the same logical structure: 48px global top bar (logo +
   Today's Lesson slot + kebab + account), 240px left rail (anchored
   top:48px/bottom:0), teacher-style class badges, floating gutter
   collapse chip.
   ============================================================ */

/* Standalone student pages don't load shared/layout.css, so we have to
   re-declare .top-banner here. On class.html, layout.css already styles
   .top-banner — this rule's identical so cascade is a no-op. */
body.tc-student-shell {
    margin: 0;
    background: #f5f5f5;
    font-family: 'Bricolage Grotesque', Arial, sans-serif;
}
body.tc-student-shell .top-banner {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 48px;
    gap: 16px;
}
body.tc-student-shell .tc-topbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex: 0 0 auto;
}
body.tc-student-shell .tc-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
body.tc-student-shell .tc-logo-wordmark {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0C1B33;
    font-size: 18px;
    white-space: nowrap;
}
body.tc-student-shell .tc-logo-wordmark .tc-accent { color: var(--tc-accent-dark, #059669); }
body.tc-student-shell .tc-topbar-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ---- Student top-bar search ----------------------------------------------
   layout.css (which styles .tc-topbar-search on the teacher side) is NOT loaded
   on standalone student pages, so re-declare here. Dead-centered on the page,
   mirroring the teacher rule; falls back to in-flow on narrow widths. */
body.tc-student-shell .tc-topbar-search,
body.tc-student-mode .tc-topbar-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* Student right cluster (today pill + bell + avatar) is smaller than the
       teacher's, so it can stay centered down to a narrower viewport. */
    width: min(520px, calc(100vw - 760px));
    max-width: 520px;
    display: flex;
    align-items: center;
    z-index: 1;
}
@media (max-width: 1120px) {
    body.tc-student-shell .tc-topbar-search,
    body.tc-student-mode .tc-topbar-search {
        position: static;
        transform: none;
        flex: 1 1 auto;
        width: auto;
        z-index: auto;
    }
}
body.tc-student-shell .tc-topbar-search-icon,
body.tc-student-mode .tc-topbar-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    display: flex;
    pointer-events: none;
}
body.tc-student-shell .tc-topbar-search-input,
body.tc-student-mode .tc-topbar-search-input {
    width: 100%;
    height: 34px;
    padding: 0 12px 0 36px;
    border: 1px solid #e3e8e6;
    border-radius: 9px;
    background: #f5f7f6;
    font-family: inherit;
    font-size: 13.5px;
    color: #1f2422;
    outline: none;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
body.tc-student-shell .tc-topbar-search-input::placeholder,
body.tc-student-mode .tc-topbar-search-input::placeholder { color: #9aa29b; }
body.tc-student-shell .tc-topbar-search-input:focus,
body.tc-student-mode .tc-topbar-search-input:focus {
    background: #fff;
    border-color: #a7f3d0;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}
body.tc-student-shell .tc-topbar-search-results,
body.tc-student-mode .tc-topbar-search-results {
    position: absolute;
    top: 42px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ece7dd;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
    max-height: 62vh;
    overflow-y: auto;
    z-index: 1500;
    padding: 6px 0;
}
body.tc-student-shell .tc-topbar-search-results[hidden],
body.tc-student-mode .tc-topbar-search-results[hidden] { display: none; }
body.tc-student-shell .tc-search-group,
body.tc-student-mode .tc-search-group {
    padding: 8px 14px 4px;
    font-size: 10.5px;
    font-weight: 800;
    color: #9aa29b;
    text-transform: uppercase;
    letter-spacing: .05em;
}
body.tc-student-shell .tc-search-row,
body.tc-student-mode .tc-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    text-decoration: none;
    color: #1f2422;
    font-size: 13.5px;
}
body.tc-student-shell .tc-search-row:hover,
body.tc-student-mode .tc-search-row:hover { background: #f5f7f6; }
body.tc-student-shell .tc-search-row-main,
body.tc-student-mode .tc-search-row-main {
    flex: 1 1 auto;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tc-student-shell .tc-search-row-sub,
body.tc-student-mode .tc-search-row-sub {
    flex: 0 0 auto;
    color: #9aa29b;
    font-size: 12px;
}
body.tc-student-shell .tc-search-dot,
body.tc-student-mode .tc-search-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
body.tc-student-shell .tc-search-empty,
body.tc-student-mode .tc-search-empty {
    padding: 14px;
    text-align: center;
    font-size: 13px;
    color: #9aa29b;
}
body.tc-student-shell .tc-search-loading-hint,
body.tc-student-mode .tc-search-loading-hint {
    text-align: left;
    font-size: 11px;
    font-style: italic;
    padding: 8px 14px;
}

/* "Today's Lesson" pill in the topbar — same styling under both shells. */
body.tc-student-mode .tc-topbar-today-btn,
body.tc-student-shell .tc-topbar-today-btn {
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tc-accent-dark, #059669);
    background: var(--tc-accent-tint-soft, #f0fdf4);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    line-height: 1;
}
body.tc-student-mode .tc-topbar-today-btn:hover,
body.tc-student-shell .tc-topbar-today-btn:hover {
    background: #dcfce7;
    border-color: #86efac;
    color: var(--tc-accent-darker, #047857);
}

/* Kebab + account buttons in the topbar — small icon buttons with
   click-to-open dropdowns. Same shell under both contexts. */
body.tc-student-mode .ss-topbar-kebab-wrap,
body.tc-student-shell .ss-topbar-kebab-wrap,
body.tc-student-mode .ss-topbar-account-wrap,
body.tc-student-shell .ss-topbar-account-wrap {
    position: relative;
}
body.tc-student-mode .ss-topbar-kebab-btn,
body.tc-student-shell .ss-topbar-kebab-btn {
    width: 34px; height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
body.tc-student-mode .ss-topbar-kebab-btn:hover,
body.tc-student-shell .ss-topbar-kebab-btn:hover {
    background: #f3f4f6;
    border-color: var(--tc-border, #ece7dd);
}
/* ============================================================
   Launcher pill (.tcl-*) — ONE canonical floating vertical pill used by BOTH
   the global student pages (shared/student-sidebar.js) AND the notebook
   (student-class-bootstrap.js). This stylesheet loads on every student surface
   incl. class.html, so a single definition keeps the two pills in lockstep
   (they were drifting clones — .ssp-* / .tc-topright-* — before).
   Buttons are deliberately large + pronounced; the pill sits well below the
   48px top bar. NOTE: student surfaces run under body{zoom:.75}, so these px
   render at ~75% — sizes are picked with that in mind. */
/* The launcher pill is ONE connected, rectangular gray column whose top cap IS
   the collapse chevron — same family as the left sidebar toggle. Radius 9 (NOT
   the old oval 18), soft-gray icons, light shadow. Each button is 32px square so
   it reads at the SAME size as the left .ss-toggle chevron chip (which is 32px);
   the buttons stay connected as one pill with 1px dividers between them. */
.tcl-pill {
    position: fixed; top: 84px; right: 18px; z-index: 90;
    background: #fff; border: 1px solid var(--tc-border, #ece7dd); border-radius: 9px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
    overflow: hidden; display: flex; flex-direction: column;
}
.tcl-btn {
    width: 32px; height: 32px; border: 0; background: transparent; padding: 0;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    color: #9ca3af; transition: color 0.15s, background-color 0.15s;
}
.tcl-btn:hover { color: var(--tc-accent-dark, #059669); background: var(--tc-accent-tint-soft, #f0fdf4); }
.tcl-btn:disabled { opacity: .5; cursor: default; }
.tcl-btn svg { width: 18px; height: 18px; display: block; }
.tcl-btn + .tcl-btn { border-top: 1px solid var(--tc-border, #ece7dd); }
/* Collapsed: hide every button except the chevron cap — leaving a radius-9
   soft-gray chip identical to the left sidebar toggle. The cap shrinks to 30px so
   the pill's outer size is 30 + 1px border ×2 = 32px, pixel-matching .ss-toggle
   (the 32px expanded buttons each include no own border; the collapsed cap must
   absorb the pill's border to land at 32px outer). */
.tcl-pill.tcl-collapsed > .tcl-btn:not(.tcl-btn--toggle) { display: none; }
.tcl-pill.tcl-collapsed > .tcl-btn--toggle { width: 30px; height: 30px; }
/* Full-screen: the whole pill rides up to the top edge. */
body.tc-student-fullscreen .tcl-pill { top: 16px; }

/* ONE menu card: create-actions group, a divider, then up to 5 recent rows. */
.tcl-menu {
    position: fixed; z-index: 95;
    background: #fff; border: 1px solid var(--tc-border, #ece7dd); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.08);
    padding: 7px; min-width: 244px; max-width: 300px;
    display: flex; flex-direction: column; gap: 2px;
    transform: translateX(8px);
    opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s;
}
.tcl-menu.is-open { opacity: 1; pointer-events: auto; transform: translateX(0); }
.tcl-menu-group { display: flex; flex-direction: column; gap: 2px; }
.tcl-menu-item {
    display: flex; align-items: center; gap: 11px; width: 100%;
    font-family: inherit; font-size: 14px; font-weight: 600; color: #374151;
    background: transparent; border: 0; border-radius: 9px;
    padding: 10px 12px; cursor: pointer; white-space: nowrap; text-align: left;
    transition: background .12s, color .12s;
}
.tcl-menu-item:hover { background: #f1f9f4; color: var(--tc-accent-dark, #059669); }
.tcl-menu-ico { display: inline-flex; flex: 0 0 auto; color: #6b7280; }
.tcl-menu-ico svg { width: 18px; height: 18px; display: block; }
.tcl-menu-sep { height: 1px; background: var(--tc-border, #ece7dd); margin: 6px 6px; border: 0; }
.tcl-menu-head {
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #9ca3af; padding: 2px 12px 5px;
}
.tcl-menu-rows { display: flex; flex-direction: column; gap: 1px; }
.tcl-menu-empty { font-size: 12.5px; color: #9ca3af; font-style: italic; padding: 7px 12px; }
.tcl-recent-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: transparent; border: 0; border-radius: 9px;
    padding: 8px 12px; cursor: pointer; text-align: left;
    transition: background .12s;
}
.tcl-recent-item:hover { background: #f1f9f4; }
.tcl-recent-ico {
    flex: 0 0 auto; width: 22px; height: 22px; display: inline-flex;
    align-items: center; justify-content: center; color: #6b7280;
}
.tcl-recent-ico svg { width: 18px; height: 18px; display: block; }
.tcl-recent-thumb { width: 24px; height: 18px; object-fit: cover; border-radius: 3px; border: 1px solid var(--tc-border, #ece7dd); }
.tcl-recent-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tcl-recent-name { font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.tcl-recent-meta { font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
body.tc-student-mode .ss-topbar-account-btn,
body.tc-student-shell .ss-topbar-account-btn {
    width: 34px; height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tc-accent, #10b981);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s;
}
body.tc-student-mode .ss-topbar-account-btn:hover,
body.tc-student-shell .ss-topbar-account-btn:hover {
    background: var(--tc-accent-darker, #047857);
}
body.tc-student-mode .ss-topbar-kebab-dropdown,
body.tc-student-shell .ss-topbar-kebab-dropdown,
body.tc-student-mode .ss-topbar-account-dropdown,
body.tc-student-shell .ss-topbar-account-dropdown {
    position: absolute;
    top: 42px;
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--tc-border, #ece7dd);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
    padding: 6px 0;
    z-index: 1500;
}
body.tc-student-mode .ss-topbar-account-dropdown,
body.tc-student-shell .ss-topbar-account-dropdown {
    min-width: 220px;
}
body.tc-student-mode .ss-topbar-account-email,
body.tc-student-shell .ss-topbar-account-email {
    padding: 8px 14px;
    font-size: 12px;
    color: #6b7280;
    border-bottom: 1px solid var(--tc-border-soft, #f0ece3);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tc-student-mode .ss-topbar-kebab-item,
body.tc-student-shell .ss-topbar-kebab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: #111;
    cursor: pointer;
    transition: background-color 0.12s;
}
body.tc-student-mode .ss-topbar-kebab-item:hover,
body.tc-student-shell .ss-topbar-kebab-item:hover {
    background: #f3f4f6;
}
body.tc-student-mode .ss-topbar-kebab-item-icon,
body.tc-student-shell .ss-topbar-kebab-item-icon {
    width: 16px; height: 16px;
    display: inline-flex;
}
/* Settings dropdown placeholder (gear menu) — real settings TBD. */
body.tc-student-mode .ss-topbar-kebab-head,
body.tc-student-shell .ss-topbar-kebab-head {
    padding: 4px 14px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    border-bottom: 1px solid var(--tc-border-soft, #f0ece3);
    margin-bottom: 4px;
}
body.tc-student-mode .ss-topbar-kebab-empty,
body.tc-student-shell .ss-topbar-kebab-empty {
    padding: 4px 14px 6px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
}

/* Google Calendar status row inside the account dropdown. */
body.tc-student-mode .ss-topbar-gcal,
body.tc-student-shell .ss-topbar-gcal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: 4px 0;
    border-top: 1px solid var(--tc-border-soft, #f0ece3);
    border-bottom: 1px solid var(--tc-border-soft, #f0ece3);
    cursor: pointer;
    transition: background-color 0.12s;
}
body.tc-student-mode .ss-topbar-gcal:hover,
body.tc-student-shell .ss-topbar-gcal:hover { background: #f3f4f6; }
body.tc-student-mode .ss-topbar-gcal-ic,
body.tc-student-shell .ss-topbar-gcal-ic { width: 16px; height: 16px; display: inline-flex; flex-shrink: 0; }
body.tc-student-mode .ss-topbar-gcal-body,
body.tc-student-shell .ss-topbar-gcal-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
body.tc-student-mode .ss-topbar-gcal-title,
body.tc-student-shell .ss-topbar-gcal-title { font-size: 13px; color: #111; }
body.tc-student-mode .ss-topbar-gcal-status,
body.tc-student-shell .ss-topbar-gcal-status {
    font-size: 11px; color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
body.tc-student-mode .ss-topbar-gcal-status.connected,
body.tc-student-shell .ss-topbar-gcal-status.connected { color: var(--tc-accent-darker, #047857); }
body.tc-student-mode .ss-topbar-gcal-link,
body.tc-student-shell .ss-topbar-gcal-link {
    font-size: 12px; font-weight: 600; color: #3b5b8a; flex-shrink: 0;
}

/* ---- Page-container geometry ----
   Standalone student pages: .ss-page sits under the 48px top bar with
   margin-top: 48px and holds the fixed sidebar + content.
   class.html student-mode: same shape, but .page-container/.main-content
   (from layout.css) supply the offset — only the .ss-sidebar positioning
   below applies there. */
body.tc-student-shell {
    overflow: hidden;
}
/* Apply the same body zoom as the teacher app (shared/layout.css sets
   body { zoom: 0.75 } on class.html). This makes the standalone student
   pages render at the same scale as the teacher / notebook view, so the
   chrome dimensions line up across every student surface. */
body.tc-student-shell {
    zoom: 0.75;
}
body.tc-student-shell .ss-page {
    margin-top: 48px;
    /* Under body zoom:0.75, a plain `height: calc(100vh - 48px)` only fills
       ~75% of the visible viewport, leaving a tall empty band that reads as
       the page being "cut off" halfway down. Divide by the zoom factor so the
       scroll container (.ss-content, height:100%) stretches to the real bottom
       of the screen. The student-calendar page already does this via a
       :has(.scal-page) override; this base rule now matches it. */
    height: calc((100vh - 48px) / 0.75);
    background: #f5f5f5;
}

/* Sidebar — fixed, anchored top:48px / bottom:0 so it fills the viewport
   under body zoom (a height:100vh value would render at ~75% visually). */
body.tc-student-mode .ss-sidebar,
body.tc-student-shell .ss-sidebar {
    position: fixed;
    left: 0;
    top: 48px;
    bottom: 0;
    height: auto;
    width: 240px;
    flex: 0 0 240px;
    z-index: 5;
    background: #fff;
    border-right: 1px solid var(--tc-border, #ece7dd);
    display: flex;
    flex-direction: column;
}
body.tc-student-shell .ss-content {
    margin-left: 240px;
    height: 100%;
    overflow-y: auto;
    transition: margin-left 0.18s ease;
}

/* Hide the per-page .ss-topbar (Home / Calendar / Messages page-title bar).
   The global 48px topbar carries the chrome now. */
body.tc-student-mode .ss-topbar,
body.tc-student-shell .ss-topbar {
    display: none !important;
}

/* No-flash insurance for class.html: student-class-bootstrap.js sets
   html.tc-student-mode SYNCHRONOUSLY before any DOM paint when the cached
   role is 'student'. Hide the teacher top-banner + left-sidebar children
   until the bootstrap has swapped in student chrome and body picks up
   tc-student-mode. Once body has the class, the rule no longer matches
   (body:not(.tc-student-mode) selector flips), and the now-student-populated
   .top-banner reveals with student content. */
html.tc-student-mode body:not(.tc-student-mode) .top-banner,
html.tc-student-mode body:not(.tc-student-mode) .left-sidebar {
    visibility: hidden !important;
}
/* And after the body class is set, the teacher .left-sidebar stays out of
   the way — the .ss-sidebar inserted before it owns the rail. */
body.tc-student-mode .left-sidebar {
    display: none !important;
}

/* Hide the in-sidebar logo strip on every student surface — the logo lives
   in the global topbar now. (Previously this was only applied to standalone
   pages, which left a duplicate TeachComplete wordmark on class.html.) */
body.tc-student-mode .ss-logo,
body.tc-student-shell .ss-logo {
    display: none !important;
}

/* ---- Shared sidebar nav + section heading sizing ----
   Mirrors the teacher .tc-nav-item / .tc-sec-head so all student surfaces
   feel like the same app. */
body.tc-student-mode .ss-topnav,
body.tc-student-shell .ss-topnav {
    padding: 12px 10px;
    gap: 4px;
}
body.tc-student-mode .ss-nav-item,
body.tc-student-shell .ss-nav-item {
    gap: 14px;
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 18px;
    font-weight: 500;
}
body.tc-student-mode .ss-nav-item.active,
body.tc-student-shell .ss-nav-item.active {
    background: var(--tc-accent-tint, #ecfdf5);
    color: var(--tc-accent-dark, #059669);
    font-weight: 600;
}
body.tc-student-mode .ss-nav-item .ss-nav-icon,
body.tc-student-shell .ss-nav-item .ss-nav-icon {
    width: 26px; height: 26px;
}
body.tc-student-mode .ss-nav-item .ss-nav-icon svg,
body.tc-student-shell .ss-nav-item .ss-nav-icon svg {
    width: 26px; height: 26px;
}
body.tc-student-mode .ss-sec,
body.tc-student-shell .ss-sec {
    padding: 10px 8px 4px;
    border-top: 1px solid #eef0f2;
}
body.tc-student-mode .ss-sec-head,
body.tc-student-shell .ss-sec-head {
    padding: 10px 10px 8px 14px;
    font-size: 14px;
    font-weight: 800;
    color: #9ca3af;
    letter-spacing: 0.6px;
}
body.tc-student-mode .ss-sec-add,
body.tc-student-shell .ss-sec-add {
    font-size: 18px;
}

/* ---- Class badges: vertical color pill + name + meta (teacher-style) ---- */
body.tc-student-mode .ss-class-list,
body.tc-student-shell .ss-class-list {
    gap: 2px;
    margin-top: 4px;
}
body.tc-student-mode .ss-class-item,
body.tc-student-shell .ss-class-item {
    padding: 11px 12px 11px 14px;
    gap: 14px;
    border-radius: 9px;
    font-size: 17px;
    font-weight: 700;
    color: #111;
    align-items: center;
}
body.tc-student-mode .ss-class-item:hover,
body.tc-student-shell .ss-class-item:hover {
    background: #f3f4f6;
    color: #111;
}
body.tc-student-mode .ss-class-item.active,
body.tc-student-shell .ss-class-item.active {
    /* Inner anchor stays transparent — wrapper paints the active bg from
       --cls-color (set in JS per enrollment). */
    background: transparent;
    color: #fff;
}
body.tc-student-mode .ss-class-item-wrap.active,
body.tc-student-shell .ss-class-item-wrap.active {
    background: var(--cls-color, #059669);
}
body.tc-student-mode .ss-class-item-wrap.active .ss-class-name,
body.tc-student-shell .ss-class-item-wrap.active .ss-class-name,
body.tc-student-mode .ss-class-item-wrap.active .ss-class-meta,
body.tc-student-shell .ss-class-item-wrap.active .ss-class-meta {
    color: #fff !important;
}
body.tc-student-mode .ss-class-dot,
body.tc-student-shell .ss-class-dot {
    width: 4px;
    height: auto;
    align-self: stretch;
    min-height: 36px;
    border-radius: 999px;
    /* Inline style on the dot (set in JS from the student's picked color)
       wins over this fallback. */
    background: #059669;
    flex-shrink: 0;
}
body.tc-student-mode .ss-class-item-wrap.active .ss-class-dot,
body.tc-student-shell .ss-class-item-wrap.active .ss-class-dot {
    background: #fff !important;
}
body.tc-student-mode .ss-class-info,
body.tc-student-shell .ss-class-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
body.tc-student-mode .ss-class-name,
body.tc-student-shell .ss-class-name {
    font-size: 17px;
    font-weight: 700;
    color: #111;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.tc-student-mode .ss-class-meta,
body.tc-student-shell .ss-class-meta {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Floating gutter collapse chip (mirrors teacher .sidebar-toggle-btn).
   Replaces the round-attached default .ss-toggle styling in tc-student
   contexts only — keeps the round circle for any future ss-page usage. */
/* Styled to match ONE button of the right-hand launcher pill (.tcl-btn): same
   ~41px square, rounded white chip, border, shadow + accent hover — so the
   left collapse control and the right pill read as the same component family,
   just mirrored to their respective edges. Aligned to the pill's top (84px). */
body.tc-student-mode .ss-toggle,
body.tc-student-shell .ss-toggle {
    position: fixed;
    top: 84px;
    left: 252px;
    right: auto;
    box-sizing: border-box;
    /* Compact, neat control — UNIFORM with the teacher's .sidebar-toggle-btn
       (shared/layout.css): 32px, light shadow, soft gray. Sits in line with the
       page's icon scale, not a heavy floating chip. */
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid var(--tc-border, #ece7dd);
    box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 4px 12px rgba(15,23,42,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    line-height: 1;
    z-index: 15;
    transition: left 0.18s ease, color 0.15s, background-color 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.18s ease;
}
body.tc-student-mode .ss-toggle svg,
body.tc-student-shell .ss-toggle svg { width: 18px; height: 18px; display: block; }
body.tc-student-mode .ss-toggle:hover,
body.tc-student-shell .ss-toggle:hover {
    transform: none;
    color: var(--tc-accent-dark, #059669);
    border-color: #a7f3d0;
    background: var(--tc-accent-tint-soft, #f0fdf4);
    box-shadow: 0 2px 4px rgba(5,150,105,0.08), 0 6px 16px rgba(5,150,105,0.06);
    opacity: 1;
}

/* Standalone-page collapse: shrink the rail + slide the chip. The
   .ss-collapsed class is set on .ss-page by ssToggleSidebar for the
   standalone shell (tc-student-collapsed is for class.html student-mode). */
/* Collapsed = the rail is fully GONE (width 0, content reclaimed); only the
   fixed .ss-toggle chip remains, parked in the far-left gutter — same model as
   the notebook + the right pill. */
body.tc-student-shell .ss-page.ss-collapsed .ss-sidebar {
    width: 0;
    flex: 0 0 0;
    overflow: visible;       /* fixed .ss-toggle child must not be clipped */
    border-right: 0;
    background: transparent;
}
body.tc-student-shell .ss-page.ss-collapsed ~ .ss-toggle,
body.tc-student-shell .ss-page.ss-collapsed .ss-toggle {
    left: 18px;   /* mirror the right pill's right:18px exactly */
    transform: rotate(180deg);
}
body.tc-student-shell .ss-page.ss-collapsed .ss-content {
    margin-left: 0;
}
body.tc-student-shell .ss-page.ss-collapsed .ss-topnav,
body.tc-student-shell .ss-page.ss-collapsed .ss-logo,
body.tc-student-shell .ss-page.ss-collapsed .ss-nav-item > span:not(.ss-nav-icon),
body.tc-student-shell .ss-page.ss-collapsed .ss-nav-badge,
body.tc-student-shell .ss-page.ss-collapsed .ss-sec,
body.tc-student-shell .ss-page.ss-collapsed .ss-class-list,
body.tc-student-shell .ss-page.ss-collapsed .ss-sec-head {
    display: none !important;
}

/* ===== Notification bell (student topbar) ===================================
   Ported from shared/layout.css so the bell renders correctly on student pages,
   which don't load layout.css. Scoped to the student shells (tc-student-shell on
   standalone student pages, tc-student-mode on class.html) so it never restyles
   the TEACHER bell on class.html (which loads both this file and layout.css).
   The dropdown rows come from shared/notifications-preview.css (.tcnp-rich). */
body.tc-student-shell .tc-topbar-bell-wrap,
body.tc-student-mode .tc-topbar-bell-wrap { position: relative; display: inline-flex; }
body.tc-student-shell .tc-topbar-bell,
body.tc-student-mode .tc-topbar-bell {
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent; border-radius: 8px;
    color: #4b5563; cursor: pointer; position: relative;
    transition: background-color 0.15s, border-color 0.15s;
}
body.tc-student-shell .tc-topbar-bell:hover,
body.tc-student-mode .tc-topbar-bell:hover { background: #f3f4f6; border-color: var(--tc-border, #ece7dd); }
body.tc-student-shell .tc-topbar-bell svg,
body.tc-student-mode .tc-topbar-bell svg { width: 18px; height: 18px; }
body.tc-student-shell .tc-topbar-bell-badge,
body.tc-student-mode .tc-topbar-bell-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--tc-danger, #a23838); color: #fff; border-radius: 999px;
    font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
/* The author display above beats the UA [hidden]{display:none} rule, so the
   initial <span hidden>0</span> markup rendered a permanent red 0 on every
   student page. Explicitly honor [hidden]. */
body.tc-student-shell .tc-topbar-bell-badge[hidden],
body.tc-student-mode .tc-topbar-bell-badge[hidden] { display: none !important; }
body.tc-student-shell .tc-topbar-bell-panel,
body.tc-student-mode .tc-topbar-bell-panel {
    position: absolute; top: 44px; right: 0; width: 320px; max-width: 92vw;
    background: #fff; border: 1px solid var(--tc-border, #ece7dd); border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); padding: 12px 0; z-index: 1500;
}
body.tc-student-shell .tc-topbar-bell-panel::before,
body.tc-student-mode .tc-topbar-bell-panel::before {
    content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
