:root {
    --bg: #f3efe8;
    --surface: rgba(255, 255, 255, 0.92);
    --ink: #1d2433;
    --muted: #667085;
    --line: rgba(29, 36, 51, 0.1);
    --brand: #0e6b5c;
    --brand-rgb: 14, 107, 92;
    --brand-strong: #0a5146;
    --brand-soft: rgba(14, 107, 92, 0.1);
    --accent-warm: #d88b32;
    --accent-rgb: 216, 139, 50;
    --sidebar-start: #182230;
    --sidebar-end: #0f1722;
    --page-accent-a: rgba(216, 139, 50, 0.18);
    --page-accent-b: rgba(14, 107, 92, 0.16);
    --warning: #b54708;
    --danger: #b42318;
    --success: #027a48;
    --shadow: 0 24px 60px rgba(20, 23, 38, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(216, 139, 50, 0.18), transparent 34%),
        radial-gradient(circle at right, rgba(14, 107, 92, 0.16), transparent 30%),
        linear-gradient(180deg, #f8f5ef 0%, #f1ece3 100%);
}

.portal-shell, .app-shell, .install-shell { min-height: 100vh; display: flex; flex-direction: column; }
.portal-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 0; flex: 1; }
.sidebar { display: flex; flex-direction: column; justify-content: flex-start; gap: 1.25rem; padding: 1.5rem; background: linear-gradient(180deg, #182230 0%, #0f1722 100%); color: #fff; }
.sidebar-top { display: grid; gap: 0.55rem; }
.sidebar-title { margin: 0.25rem 0; }
.sidebar-user { color: rgba(255,255,255,0.72); }
.sidebar-address { color: rgba(255,255,255,0.72); font-size: 0.9rem; line-height: 1.4; }
.sidebar-brandmark {
    width: 100%;
    min-height: 132px;
    display: grid;
    place-items: center;
    padding: 1rem 0.9rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.sidebar-logo {
    width: 100%;
    max-width: 210px;
    max-height: 112px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.sidebar-contact-card { width: 100%; margin: 0 0 0.9rem; padding: 0.8rem 0.9rem; border-radius: 14px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14); }
.sidebar-contact-card .sidebar-address { margin: 0 0 0.55rem; }
.sidebar-contact-line { display: flex; align-items: center; gap: 0.45rem; margin: 0.25rem 0 0; color: rgba(255,255,255,0.88); font-size: 0.92rem; word-break: break-word; }
.teacher-quiz-builder { display: grid; gap: 1rem; margin-top: 0.5rem; }
.teacher-quiz-builder fieldset { border: 1px solid #d6dae5; border-radius: 16px; padding: 1rem; background: #f8fafc; }
.teacher-quiz-builder legend { padding: 0 0.4rem; font-weight: 700; color: #1f2937; }
.message-inline-image { display: block; max-width: 180px; max-height: 140px; border-radius: 12px; border: 1px solid #d6dae5; background: #fff; object-fit: cover; }
.nav-links { display: grid; gap: 0.65rem; }
.sidebar > form:last-child { margin-top: auto; }
.nav-links a { color: #fff; text-decoration: none; padding: 0.95rem 1rem; border-radius: 16px; background: rgba(255,255,255,0.06); display: flex; align-items: center; gap: 0.85rem; min-height: 52px; transition: background 0.2s ease, transform 0.2s ease; }
.nav-links a:hover { background: rgba(255,255,255,0.12); transform: translateX(2px); }
.nav-links a.is-active { background: rgba(255,255,255,0.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.nav-icon { width: 1.35rem; text-align: center; font-size: 1rem; opacity: 0.95; }
.portal-mobile-bar { display: none; }
.portal-mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}
.portal-mobile-menu-toggle__icon {
    display: inline-grid;
    gap: 0.22rem;
}
.portal-mobile-menu-toggle__icon span {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}
.portal-mobile-menu-toggle__label {
    letter-spacing: 0.04em;
}
.portal-main { padding: 1.5rem; display: grid; gap: 0.9rem; align-content: start; grid-auto-rows: max-content; }
.portal-main > * { width: 100%; max-width: none; }
.global-app-footer {
    margin-top: auto;
    padding: 1rem 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(29, 36, 51, 0.72);
}
.content-header,
.page-header {
    width: 100%;
    max-width: none;
    margin-bottom: 0;
}
.full-width { width: 100%; }

.landing, .install-page, .error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 1.5rem 2rem;
}

.welcome-logo {
    max-width: min(320px, 70vw);
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 0 1rem;
}

.auth-branding {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1rem 0;
}

.auth-logo {
    max-width: min(320px, 72vw);
    max-height: 110px;
    object-fit: contain;
}

.auth-page {
    width: min(760px, 100%);
    display: block;
    padding: 0;
    margin-top: 0.35rem;
}

.auth-card {
    width: 100%;
}

.dashboard-page {
    min-height: 100vh;
    padding: 1.5rem;
}

.hero, .card {
    width: min(980px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.portal-main .card,
.portal-main .hero,
.portal-main .content-header {
    width: 100%;
    max-width: none;
}

.hero, .card { padding: 2rem; }
.hero { padding: 4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; color: var(--brand); font-weight: 700; font-size: 0.76rem; }
h1 { margin: 0 0 1rem; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; }
.section-title { margin: 0; font-size: clamp(1.4rem, 2vw, 2rem); }
.lead { max-width: 50rem; color: var(--muted); font-size: 1.1rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.95rem 1.25rem; border-radius: 999px; border: none; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; cursor: pointer; }
.button.secondary { background: #d0d5dd; color: #344054; }
.button.danger { background: var(--danger); color: #fff; }
.button-large { min-height: 52px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.25rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.registration-form-shell { display: grid; gap: 1.25rem; }
.registration-card { display: grid; gap: 1rem; }
.registration-card__header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.registration-card__header h2,
.registration-subsection h3 { margin: 0; }
.registration-card__header .muted-text { max-width: 34rem; margin: 0; }
.registration-subsection { display: grid; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.registration-field-wide { grid-column: 1 / -1; }
.registration-toggle { display: flex; align-items: center; gap: 0.6rem; }
.registration-toggle input { width: auto; min-height: 0; }
.registration-card--actions { grid-template-columns: 1fr auto; align-items: center; }
.settings-sections { display: grid; gap: 1.35rem; margin-top: 1.5rem; }
.settings-panel { display: grid; gap: 1rem; padding: 1.5rem; border-radius: 24px; background: rgba(255,255,255,0.74); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,0.58); }
.settings-panel__header { display: grid; gap: 0.35rem; }
.settings-panel__header h2 { margin: 0; }
.settings-logo-preview { display: flex; align-items: center; justify-content: center; min-height: 140px; }
.settings-form-actions { justify-content: flex-end; margin-top: 0.25rem; }
.grid-span-2 { grid-column: span 2; }
.grid-span-3 { grid-column: 1 / -1; }
.single-column { grid-template-columns: 1fr; }
label { display: grid; gap: 0.45rem; font-weight: 600; font-size: 0.95rem; }
input, select, textarea { width: 100%; padding: 0.95rem 1rem; border-radius: 14px; border: 1px solid rgba(29, 36, 51, 0.16); background: #fff; font: inherit; min-height: 48px; }
textarea { min-height: 110px; }
.field-help { color: var(--muted); font-size: 0.82rem; font-weight: 500; line-height: 1.45; }
.checks { display: grid; gap: 0.75rem; }
.check-row { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, 0.7); }
.check-row small { grid-column: 1 / -1; color: var(--muted); }
.badge { display: inline-flex; align-items: center; justify-content: center; padding: 0.35rem 0.7rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.badge.success { color: var(--success); background: rgba(2, 122, 72, 0.1); }
.badge.warning { color: var(--warning); background: rgba(181, 71, 8, 0.12); }
.badge.danger { color: var(--danger); background: rgba(180, 35, 24, 0.1); }
.badge.neutral { color: #475467; background: rgba(71, 84, 103, 0.1); }
.muted-text { color: var(--muted); }
.alert { border-radius: 16px; padding: 1rem 1.1rem; margin: 1rem 0; }
.alert.danger { color: var(--danger); background: rgba(180, 35, 24, 0.08); border: 1px solid rgba(180, 35, 24, 0.12); }
.alert.success { color: var(--success); background: rgba(2, 122, 72, 0.08); border: 1px solid rgba(2, 122, 72, 0.12); }
.widget-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin-top: 0; align-items: start; }
.widget-grid--dashboard { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.8rem; }
.widget-card { background: rgba(255,255,255,0.92); border: 1px solid var(--line); border-radius: 26px; padding: 1.2rem; display: grid; gap: 0.8rem; box-shadow: 0 20px 40px rgba(17, 24, 39, 0.05); align-content: start; }
.widget-grid--dashboard .widget-card { min-height: 175px; }
.widget-grid--dashboard .widget-card--feature { grid-column: span 2; min-height: 200px; }
.widget-card h2 { margin: 0; font-size: 1.12rem; }
.widget-card--feature { background: linear-gradient(180deg, rgba(14, 107, 92, 0.12) 0%, rgba(255,255,255,0.94) 100%); border-color: rgba(14, 107, 92, 0.2); }
.widget-value { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.widget-value--small { font-size: 1.3rem; }
.widget-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.1rem; }
.quick-action-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.dashboard-hero { width: 100%; display: grid; gap: 0.8rem; }
.dashboard-hero--student { background: linear-gradient(135deg, rgba(14, 107, 92, 0.12), rgba(216, 139, 50, 0.08)); }
.dashboard-zone { display: grid; gap: 0.7rem; }
.dashboard-zone__header { display: grid; gap: 0.35rem; }
.dashboard-zone__header .section-title { margin: 0; }
.admin-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: start; }
.admin-dashboard-grid--top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-dashboard-grid--top .admin-module--wide { grid-column: 1 / -1; }
.admin-module { gap: 0.75rem; align-content: start; min-height: 195px; position: relative; overflow: hidden; }
.admin-module::before { content: ""; position: absolute; inset: 0 0 auto auto; width: 140px; height: 140px; background: radial-gradient(circle, rgba(14, 107, 92, 0.12), rgba(14, 107, 92, 0)); transform: translate(28%, -28%); pointer-events: none; }
.admin-module--wide { grid-column: span 2; }
.admin-module__header { display: flex; align-items: start; justify-content: space-between; gap: 0.8rem; }
.admin-module__identity { display: flex; align-items: center; gap: 0.85rem; }
.admin-module__icon { width: 3.2rem; height: 3.2rem; border-radius: 20px; display: inline-grid; place-items: center; background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18)); color: var(--brand); font-size: 1.5rem; box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08); flex: 0 0 auto; }
.admin-module__header h2 { margin: 0.15rem 0 0; font-size: 1.18rem; line-height: 1.25; }
.admin-module__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.65rem; }
.admin-stat { padding: 0.8rem 0.9rem; border-radius: 18px; background: rgba(14, 107, 92, 0.06); border: 1px solid rgba(14, 107, 92, 0.12); }
.admin-stat__label { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.admin-stat__value { margin: 0; font-size: 1.35rem; font-weight: 700; line-height: 1.15; }
.mini-series { display: grid; gap: 0.65rem; }
.mini-series__row { display: grid; grid-template-columns: minmax(92px, 110px) 1fr auto; gap: 0.75rem; align-items: center; }
.mini-series__label, .mini-series__value { font-size: 0.82rem; color: var(--muted); }
.mini-series__bar { height: 10px; border-radius: 999px; background: rgba(29, 36, 51, 0.08); overflow: hidden; }
.mini-series__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #d88b32); }
.quick-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.7rem; }
.admin-module--actions .button { width: 100%; }
.table-card { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem 0.85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.payments-period-filter { align-items: end; }
.payments-table-card { display: grid; gap: 1rem; }
.payments-table-card__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.payments-table__summary-row.is-paid { background: rgba(2, 122, 72, 0.03); }
.payments-table__summary-row td { vertical-align: middle; }
.payments-table__editor-row td { padding: 0 0.85rem 1rem; background: rgba(14, 107, 92, 0.04); }
.payment-editor-form { padding: 1.15rem 0.2rem 0.1rem; display: grid; gap: 1rem; }
.payment-adjustments { display: grid; gap: 0.8rem; }
.payment-adjustments h3 { margin: 0; }
.payment-adjustments__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.9rem; }
.payment-adjustment-card { padding: 1rem; border-radius: 20px; background: rgba(255,255,255,0.9); border: 1px solid var(--line); display: grid; gap: 0.7rem; }
.notification-audit-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 0.9fr) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.2rem;
}
.notification-audit-panel .stats-grid {
    margin-bottom: 1rem;
}
.notification-audit-table-wrap {
    overflow-x: auto;
}
.notification-audit-table td .badge,
.notification-audit-table th .badge {
    white-space: nowrap;
}
.notification-audit-table .muted-text {
    display: block;
    margin-top: 0.35rem;
}
.ratings-filters {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.25rem;
}
.ratings-list {
    display: grid;
    gap: 1rem;
}
.rating-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1.15rem 1.2rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}
.rating-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
}
.rating-card__scores {
    display: flex;
    gap: 1rem;
    align-items: start;
    flex-wrap: wrap;
}
.rating-card__stars {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: #e0a100;
}
.rating-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--muted);
    margin-top: 0.7rem;
}
.rating-card__comment {
    margin-top: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: rgba(247, 248, 252, 0.9);
    border: 1px solid rgba(208, 213, 221, 0.8);
}
.rating-card__comment p {
    margin: 0.45rem 0 0;
}
.stack-list { display: grid; gap: 0.65rem; margin-top: 0.8rem; }
.admin-module .stack-list,
.widget-grid--dashboard .widget-card .stack-list {
    max-height: 180px;
    overflow: auto;
    align-content: start;
    padding-right: 0.2rem;
    scrollbar-gutter: stable;
}
.inline-form { display: flex; align-items: end; gap: 0.85rem; flex-wrap: wrap; }
.compact-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 0; }
.widget-card--secretary-summary { min-height: 0; }
.secretary-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}
.secretary-kpi-card {
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
}
.secretary-kpi-card .admin-stat__label {
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
}
.secretary-kpi-card .admin-stat__value {
    font-size: 1.15rem;
}
.secretary-kpi-note { margin: 0; }
.logo-preview img { max-width: 180px; max-height: 120px; object-fit: contain; border-radius: 16px; border: 1px solid var(--line); background: #fff; padding: 0.75rem; }
.single-column-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.file-input-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.file-dropzone {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 1.25rem 1rem;
    border: 1px dashed rgba(29, 36, 51, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(248,250,252,0.94));
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.file-dropzone:hover,
.file-dropzone:focus-visible,
.file-dropzone.is-dragover {
    border-color: rgba(14, 107, 92, 0.5);
    background: linear-gradient(180deg, rgba(14, 107, 92, 0.06), rgba(255,255,255,0.96));
    box-shadow: 0 12px 28px rgba(14, 107, 92, 0.08);
    transform: translateY(-1px);
    outline: none;
}
.file-dropzone.has-files {
    border-style: solid;
    border-color: rgba(14, 107, 92, 0.28);
}
.file-dropzone__icon {
    width: 3rem;
    height: 3rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(14, 107, 92, 0.1);
    color: var(--brand);
    font-size: 1.5rem;
}
.file-dropzone__title {
    font-weight: 700;
    color: var(--ink);
}
.file-dropzone__hint,
.file-dropzone__status {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}
.file-dropzone__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: none;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(14, 107, 92, 0.18);
}
.line-item-editor { border: 1px solid var(--line); border-radius: 20px; padding: 1rem; background: rgba(255,255,255,0.75); }
.line-item-editor h3 { margin-top: 0; }
.line-item-table input { min-width: 0; }
.action-cell { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.invoice-editor { padding-top: 0.5rem; }
.portal-action-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.session-card { width: 100%; }
.session-card__header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.session-card__header h2 { margin: 0 0 0.4rem; font-size: 1.3rem; }
.session-card__badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.session-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.session-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.session-card--occupied {
    background: linear-gradient(135deg, rgba(255, 244, 244, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(180, 35, 24, 0.2);
    box-shadow: 0 20px 40px rgba(180, 35, 24, 0.08);
}
.session-card--occupied .session-summary-item {
    border-color: rgba(180, 35, 24, 0.12);
    background: rgba(255,255,255,0.82);
}
.session-card__availability-banner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 13rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(180, 35, 24, 0.1);
    color: var(--danger);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid rgba(180, 35, 24, 0.18);
}
.session-card--lesson {
    background: linear-gradient(135deg, rgba(245, 250, 255, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(35, 97, 180, 0.16);
}
.session-card--class {
    background: linear-gradient(135deg, rgba(244, 251, 249, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(14, 107, 92, 0.16);
}
.session-card--season {
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(216, 139, 50, 0.18);
}
.session-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.session-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18));
    color: var(--brand);
    font-size: 1.45rem;
    box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08);
    flex: 0 0 auto;
}
.session-card__identity h3 {
    margin: 0.12rem 0 0.4rem;
}
.session-card--occupied .session-card__icon {
    background: linear-gradient(135deg, rgba(180, 35, 24, 0.12), rgba(216, 139, 50, 0.18));
    color: var(--danger);
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.08);
}
.session-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.session-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}
.session-summary-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.78);
}
.session-summary-item p {
    margin: 0;
}
.session-manage-details {
    margin-top: 0.1rem;
}
.schedule-report-card {
    display: grid;
    gap: 1rem;
}
.schedule-report-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.schedule-report-card__header h2 {
    margin: 0.15rem 0 0;
}
.schedule-report-table {
    min-width: 1080px;
}
.schedule-report-table tbody tr:last-child td {
    border-bottom: none;
}
.schedule-report-table td {
    background: rgba(255,255,255,0.76);
}
.schedule-report-table .session-row--occupied td {
    background: rgba(180, 35, 24, 0.06);
}
.schedule-availability-cell {
    display: grid;
    gap: 0.35rem;
}
.session-availability-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: rgba(14, 107, 92, 0.1);
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.session-availability-chip--occupied {
    background: rgba(180, 35, 24, 0.12);
    color: var(--danger);
}
.session-availability-chip--rescheduled {
    background: rgba(181, 71, 8, 0.12);
    color: var(--warning);
}
.schedule-table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.schedule-table-actions .inline-form {
    margin: 0;
}
.session-editor-row[hidden] {
    display: none !important;
}
.session-editor-row td {
    padding-top: 0;
    background: rgba(248, 250, 252, 0.92);
}
.session-editor-panel,
.session-manage-details {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(29, 36, 51, 0.08);
}
.session-edit-panel__header {
    display: grid;
    gap: 0.35rem;
    padding-bottom: 0.15rem;
}
.session-edit-panel__header h4,
.session-edit-panel__header p {
    margin: 0;
}
.session-reschedule-only[hidden] {
    display: none !important;
}
.session-reschedule-panel {
    display: grid;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: 22px;
    border: 1px solid rgba(14, 107, 92, 0.14);
    background: linear-gradient(180deg, rgba(14, 107, 92, 0.06), rgba(255,255,255,0.88));
}
.session-reschedule-panel__header {
    display: grid;
    gap: 0.35rem;
}
.session-reschedule-panel__header h4 {
    margin: 0;
    font-size: 1.15rem;
}
.session-reschedule-panel__header .muted-text {
    margin: 0;
}
.session-reschedule-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}
.session-edit-actions[hidden] {
    display: none !important;
}
.session-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.5rem 1rem; margin-top: 1rem; }
.danger-zone { margin-top: 0.5rem; }
.form-actions { display: flex; align-items: end; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.course-card { width: 100%; display: grid; gap: 1rem; align-content: start; }
.course-card__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-weight: 700; font-size: 1.25rem; background: rgba(14, 107, 92, 0.12); color: var(--brand); }
.button--disabled { opacity: 0.72; pointer-events: none; }
.teacher-session-block {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}
.teacher-session-block__title {
    margin: 0;
    font-weight: 700;
}
.teacher-session-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.72);
}
.teacher-session-row__meta {
    display: grid;
    gap: 0.35rem;
}
.teacher-session-row__title {
    margin: 0;
    font-weight: 700;
}
.teacher-session-row__status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}
.teacher-session-form {
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(220px, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}
.teacher-session-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 48px;
}
.teacher-session-form__hint {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.4;
}
.teacher-assignment-grid {
    display: grid;
    gap: 0.85rem;
    grid-column: 1 / -1;
}
.teacher-assignment-grid__label {
    margin: 0;
    font-weight: 700;
}
.teacher-rate-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.8fr);
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.72);
}
.class-editor-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1.15rem;
}
.class-editor-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-radius: 26px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    box-shadow: 0 18px 32px rgba(15, 24, 43, 0.07);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86)),
        #fff;
}
.class-editor-card--lesson {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.84)),
        linear-gradient(135deg, rgba(101, 142, 255, 0.18), rgba(101, 142, 255, 0.04));
}
.class-editor-card--group {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.84)),
        linear-gradient(135deg, rgba(216, 139, 50, 0.18), rgba(216, 139, 50, 0.04));
}
.class-editor-card--season {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.84)),
        linear-gradient(135deg, rgba(14, 107, 92, 0.18), rgba(14, 107, 92, 0.04));
}
.class-editor-card--dirty {
    border-color: rgba(14, 107, 92, 0.28);
    box-shadow: 0 18px 32px rgba(14, 107, 92, 0.11);
}
.class-editor-card__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.class-editor-card__heading {
    display: grid;
    gap: 0.35rem;
}
.class-editor-card__heading h3 {
    margin: 0;
}
.class-editor-card__heading .muted-text {
    margin: 0;
    max-width: 64ch;
}
.class-editor-card__hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}
.class-editor-card__facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}
.class-editor-fact {
    display: grid;
    gap: 0.28rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.78);
}
.class-editor-fact__label {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}
.class-editor-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.class-editor-card__actions .inline-form {
    margin: 0;
}
.class-editor-card__panel {
    padding-top: 1rem;
    border-top: 1px solid rgba(29, 36, 51, 0.08);
}
.class-editor-card__save-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
}
.class-editor-card__change-note {
    margin: 0;
}
.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
    font-weight: 700;
}
.checkbox-inline input[type="checkbox"] {
    width: auto;
    min-height: 0;
    margin: 0;
}
.teacher-pay-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}
.teacher-pay-tile {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.78);
}
.teacher-pay-tile__label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}
.teacher-pay-tile__value {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}
.section-split-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.section-split-header h2 {
    margin: 0.1rem 0 0.3rem;
}
.teacher-directory-grid {
    display: grid;
    gap: 1rem;
}
.teacher-card {
    display: grid;
    gap: 1.1rem;
    align-content: start;
}
.teacher-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.teacher-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.teacher-card__icon {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 20px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18));
    color: var(--brand);
    font-size: 1.6rem;
    box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08);
}
.teacher-card__header h2 {
    margin: 0.12rem 0 0.4rem;
}
.teacher-card__earnings {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.85rem;
}
.teacher-earnings-pill {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(14, 107, 92, 0.08);
    border: 1px solid rgba(14, 107, 92, 0.12);
    min-width: 150px;
}
.teacher-earnings-pill strong {
    font-size: 1.3rem;
    line-height: 1.1;
}
.teacher-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}
.teacher-summary-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.72);
}
.teacher-summary-item p {
    margin: 0;
}
.teacher-summary-item--wide {
    grid-column: span 2;
}
.teacher-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}
.teacher-doc-group {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.72);
}
.teacher-doc-group__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.teacher-doc-group__header h3 {
    margin: 0;
    font-size: 1rem;
}
.teacher-doc-list {
    display: grid;
    gap: 0.7rem;
}
.teacher-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(29, 36, 51, 0.08);
}
.teacher-doc-row:first-child {
    padding-top: 0;
    border-top: 0;
}
.teacher-manage-details {
    border: 1px solid rgba(29, 36, 51, 0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.72);
    padding: 0.2rem 1rem 1rem;
}
.teacher-manage-details summary {
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    padding: 0.85rem 0;
}
.teacher-manage-details summary::-webkit-details-marker {
    display: none;
}
.teacher-card__footer {
    display: flex;
    justify-content: flex-end;
}
.teacher-list-actions {
    justify-content: flex-end;
}
.user-directory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.user-card {
    display: grid;
    gap: 1rem;
    align-content: start;
    width: 100%;
}
.user-card--family {
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(216, 139, 50, 0.18);
}
.user-card--teaching {
    background: linear-gradient(135deg, rgba(245, 250, 255, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(35, 97, 180, 0.16);
}
.user-card--staff {
    background: linear-gradient(135deg, rgba(244, 251, 249, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(14, 107, 92, 0.16);
}
.user-card--general {
    background: linear-gradient(135deg, rgba(250, 248, 255, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(132, 74, 201, 0.14);
}
.user-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.user-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18));
    color: var(--brand);
    font-size: 1.45rem;
    box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08);
    flex: 0 0 auto;
}
.user-card__identity h3 {
    margin: 0.12rem 0 0.4rem;
}
.user-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
}
.user-summary-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.76);
}
.user-summary-item p {
    margin: 0;
}
.user-summary-item--wide {
    grid-column: span 2;
}
.user-manage-details {
    margin-top: 0.1rem;
}
.user-manage-details summary {
    display: none;
}
.user-edit-actions[hidden] {
    display: none !important;
}
.enrollment-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.enrollment-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.enrollment-card--lesson {
    background: linear-gradient(135deg, rgba(245, 250, 255, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(35, 97, 180, 0.16);
}
.enrollment-card--class {
    background: linear-gradient(135deg, rgba(244, 251, 249, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(14, 107, 92, 0.16);
}
.enrollment-card--season {
    background: linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(216, 139, 50, 0.18);
}
.enrollment-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.enrollment-card__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.enrollment-card__icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18));
    color: var(--brand);
    font-size: 1.45rem;
    box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08);
    flex: 0 0 auto;
}
.enrollment-card__identity h3 {
    margin: 0.12rem 0 0.4rem;
}
.enrollment-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.enrollment-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}
.enrollment-summary-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(255,255,255,0.78);
}
.enrollment-summary-item p {
    margin: 0;
}
.enrollment-summary-item--wide {
    grid-column: span 2;
}
.enrollment-manage-details {
    margin-top: 0.1rem;
}
.enrollment-manage-details[hidden] {
    display: none !important;
}
.enrollment-manage-details summary {
    display: none;
}
.enrollment-edit-actions[hidden] {
    display: none !important;
}

.class-season-only-field[hidden] {
    display: none !important;
}
.schedule-builder-form {
    align-items: start;
}
.schedule-planner-card {
    display: grid;
    gap: 1rem;
    padding: 1.05rem;
    border-radius: 24px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.78);
}
.schedule-planner-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    flex-wrap: wrap;
}
.schedule-planner-card__header h3 {
    margin: 0.15rem 0 0;
}
.schedule-weekly-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 46px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(29, 36, 51, 0.1);
    background: rgba(244, 251, 249, 0.92);
    font-weight: 700;
}
.schedule-weekly-toggle input {
    width: auto;
    min-height: 0;
    margin: 0;
}
.schedule-weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.schedule-weekday-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.schedule-weekday-chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}
.schedule-weekday-chip span {
    min-width: 3.35rem;
    min-height: 2.85rem;
    padding: 0.72rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(255,255,255,0.95);
    display: inline-grid;
    place-items: center;
    font-weight: 700;
}
.schedule-weekday-chip input:checked + span {
    background: rgba(14, 107, 92, 0.12);
    border-color: rgba(14, 107, 92, 0.28);
    color: var(--brand);
}
.teacher-scheduling-summary {
    display: grid;
    gap: 1rem;
    padding: 1.05rem 1.1rem;
    border-radius: 24px;
    border: 1px solid rgba(14, 107, 92, 0.12);
    background: linear-gradient(180deg, rgba(244, 251, 249, 0.96), rgba(255,255,255,0.9));
}
.teacher-scheduling-summary__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    flex-wrap: wrap;
}
.teacher-scheduling-summary__header h3 {
    margin: 0.15rem 0 0;
}
.teacher-scheduling-summary__header .muted-text {
    max-width: 34rem;
    margin: 0;
}
.teacher-scheduling-summary__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.9rem;
}
.teacher-scheduling-summary__panel {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.88);
}
.teacher-scheduling-summary__list {
    display: grid;
    gap: 0.55rem;
}
.teacher-scheduling-summary__list .muted-text {
    margin: 0;
}
.teacher-scheduling-summary__items {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.45rem;
    color: var(--ink);
}
.teacher-scheduling-summary__items li {
    line-height: 1.45;
}
.schedule-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.55rem;
}
.schedule-month-grid__head {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    text-align: center;
    padding-bottom: 0.15rem;
}
.schedule-day-cell {
    position: relative;
    min-height: 4.8rem;
    padding: 0.7rem 0.65rem;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(255,255,255,0.95);
    display: grid;
    align-content: space-between;
    gap: 0.25rem;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.schedule-day-cell:hover {
    border-color: rgba(14, 107, 92, 0.24);
    box-shadow: 0 10px 24px rgba(15, 24, 43, 0.06);
    transform: translateY(-1px);
}
.schedule-day-cell input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.schedule-day-cell__weekday {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}
.schedule-day-cell__day {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
}
.schedule-day-cell input:checked + .schedule-day-cell__weekday,
.schedule-day-cell input:checked + .schedule-day-cell__weekday + .schedule-day-cell__day {
    color: var(--brand);
}
.schedule-day-cell:has(input:checked) {
    background: linear-gradient(135deg, rgba(244, 251, 249, 0.98), rgba(255,255,255,0.96));
    border-color: rgba(14, 107, 92, 0.28);
    box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08);
}
.schedule-day-cell--blocked {
    cursor: not-allowed;
    border-color: rgba(180, 35, 24, 0.18);
    background: linear-gradient(135deg, rgba(255, 244, 244, 0.98), rgba(255,255,255,0.95));
}
.schedule-day-cell--blocked:hover {
    border-color: rgba(180, 35, 24, 0.18);
    box-shadow: none;
    transform: none;
}
.schedule-day-cell--limited {
    border-color: rgba(181, 71, 8, 0.18);
    background: linear-gradient(135deg, rgba(255, 248, 240, 0.98), rgba(255,255,255,0.95));
}
.schedule-day-cell__note {
    font-size: 0.66rem;
    line-height: 1.35;
    color: var(--muted);
}
.schedule-day-cell--blocked .schedule-day-cell__note {
    color: var(--danger);
    font-weight: 700;
}
.schedule-day-cell--limited .schedule-day-cell__note {
    color: var(--warning);
    font-weight: 700;
}
.schedule-day-cell--blank {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
    pointer-events: none;
}
.survey-rating {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.45rem;
}
.survey-rating__option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(255,255,255,0.9);
    font-weight: 700;
}
.survey-rating__option input {
    width: auto;
    min-height: 0;
    margin: 0;
}
.survey-rating__option span {
    color: #d88b32;
    letter-spacing: 0.08em;
}
.directory-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.directory-filter-grid { margin-top: 0; margin-bottom: 1.5rem; align-items: end; }
.view-toggle { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.students-workspace { width: 100%; max-width: none; min-height: calc(100vh - 8rem); align-self: start; }
.students-workspace__header { margin-bottom: 1.5rem; }
.students-workspace .lead { max-width: 72rem; }
.lead-workspace { display: grid; gap: 1.5rem; }
.lead-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.lead-summary-card {
    display: grid;
    gap: 0.45rem;
    padding: 1.1rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(20, 33, 61, 0.07);
    box-shadow: 0 14px 32px rgba(15, 24, 43, 0.06);
}
.lead-summary-card .widget-value { margin: 0; }
.lesson-plan-editor-card {
    display: grid;
    gap: 1rem;
}
.lesson-plan-form {
    margin-top: 0;
}
.lesson-plan-editor-actions {
    grid-column: 1 / -1;
}
.lesson-plan-library {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.lesson-plan-card {
    display: grid;
    gap: 1rem;
    align-content: start;
}
.lesson-plan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}
.lesson-plan-card__header h3 {
    margin: 0.15rem 0 0.55rem;
}
.lesson-plan-card__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.lesson-plan-card__actions form {
    margin: 0;
}
.lesson-plan-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
.lesson-plan-card__section {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.76);
}
.lesson-plan-card__section p {
    margin: 0;
    line-height: 1.55;
}
.lesson-plan-card__section--wide {
    grid-column: 1 / -1;
}
.teacher-availability-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.teacher-availability-list,
.teacher-timeoff-list {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.1rem;
}
.teacher-availability-item,
.teacher-timeoff-item {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(255,255,255,0.8);
}
.teacher-availability-item p,
.teacher-timeoff-item p {
    margin: 0.3rem 0 0;
}
.teacher-availability-item__actions {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
    flex-shrink: 0;
}
.teacher-availability-item__actions form {
    margin: 0;
}
.teacher-timeoff-all-day {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 48px;
}
.teacher-timeoff-all-day input {
    width: auto;
    min-height: 0;
    margin: 0;
}
.marketing-dashboard-filters { align-items: end; }
.lead-intake-card { width: 100%; }
.lead-catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.lead-card { display: grid; gap: 1rem; }
.lead-card__header { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.lead-card__header h2 { margin: 0.2rem 0 0; font-size: 1.2rem; }
.lead-card__meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.85rem; }
.lead-card__meta div { display: grid; gap: 0.2rem; }
.lead-card__meta strong { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.student-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.student-notes-panel {
    margin-top: 1rem;
    border: 1px solid rgba(21, 50, 67, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.student-notes-panel summary {
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-weight: 700;
    color: #1d2433;
    list-style: none;
}

.student-notes-panel summary::-webkit-details-marker {
    display: none;
}

.student-notes-form {
    display: grid;
    gap: 0.8rem;
    padding: 0 1rem 1rem;
}

.student-notes-form textarea {
    min-height: 92px;
}
.student-directory-card { gap: 1rem; }
.student-directory-card h2 { margin: 0; font-size: 1.1rem; }
.student-directory-card__top { display: flex; align-items: center; gap: 1rem; }
.student-directory-card__meta { display: grid; gap: 0.85rem; }
.student-directory-card__meta div { display: grid; gap: 0.2rem; }
.student-directory-card__meta strong { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.calendar-grid { display: grid; gap: 0.75rem; margin-top: 1.25rem; }
.calendar-grid__weekdays, .calendar-grid__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.75rem; }
.calendar-grid__weekdays span { font-weight: 700; color: var(--muted); padding: 0 0.25rem; }
.calendar-grid__cell { min-height: 160px; border: 1px solid var(--line); border-radius: 18px; padding: 0.75rem; background: rgba(255,255,255,0.8); display: grid; align-content: start; gap: 0.45rem; }
.calendar-grid__cell.is-muted { opacity: 0.6; }
.calendar-grid__cell.is-today { border-color: rgba(14, 107, 92, 0.32); box-shadow: 0 0 0 2px rgba(14, 107, 92, 0.08); }
.calendar-grid__date-row { display: flex; align-items: center; justify-content: space-between; gap: 0.45rem; }
.calendar-grid__date { font-weight: 700; }
.calendar-grid__count {
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(14, 107, 92, 0.12);
    color: var(--brand);
    display: inline-grid;
    place-items: center;
    font-size: 0.76rem;
    font-weight: 700;
}
.school-calendar-layout { grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr); align-items: start; }
.school-calendar-main,
.school-calendar-sidebar { width: 100%; }
.school-calendar-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 0.75rem; }
.school-calendar-month { margin: 0; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.05; }
.school-calendar-filter-grid,
.calendar-date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    width: 100%;
}
.school-calendar-grid { margin-top: 1rem; }
.school-calendar-upcoming { display: grid; gap: 0.85rem; }
.school-calendar-sidebar .stack-list { gap: 0.85rem; }
.school-calendar-manage-list { margin-top: 1rem; }
.calendar-grid__cell-link { color: inherit; text-decoration: none; display: block; }
.calendar-grid__cell.is-selected { border-color: rgba(35, 97, 180, 0.35); box-shadow: 0 0 0 2px rgba(35, 97, 180, 0.12); }
.calendar-flyer-preview {
    display: block;
    max-width: min(280px, 100%);
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}
.public-calendar-page {
    gap: 1.5rem;
    width: min(1380px, calc(100% - 2rem));
    margin: 0 auto 2rem;
}
.public-contact-page {
    gap: 1.5rem;
    width: min(980px, calc(100% - 2rem));
    margin: 0 auto 2rem;
}
.public-calendar-hero,
.public-calendar-section,
.public-calendar-detail-card { width: 100%; }
.public-school-contact-card {
    width: 100%;
}
.public-school-contact-card__grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 0.9fr);
    gap: 1rem 1.5rem;
    align-items: center;
}
.public-school-contact-card__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.public-school-contact-card__brand h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.public-school-contact-card__logo {
    width: clamp(84px, 12vw, 120px);
    max-height: 120px;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.92);
    padding: 0.5rem;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}
.public-school-contact-card__details {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
}
.public-school-contact-card__details p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.public-school-contact-card__details strong {
    color: var(--ink);
}
.public-school-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}
.public-school-year-card { display: grid; gap: 0.8rem; }
.public-school-year-card.is-selected {
    border-color: rgba(35, 97, 180, 0.35);
    box-shadow: 0 0 0 2px rgba(35, 97, 180, 0.12);
}
.public-school-year-card__title {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.public-school-year-miniweekdays,
.public-school-year-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.35rem;
}
.public-school-year-miniweekdays span {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
}
.public-school-year-month { display: grid; gap: 0.35rem; }
.public-school-year-day {
    min-height: 2.4rem;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255,255,255,0.82);
    color: var(--ink);
    text-decoration: none;
    display: grid;
    place-items: center;
    font-weight: 700;
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.public-school-year-day:hover { transform: translateY(-1px); border-color: rgba(14, 107, 92, 0.26); }
.public-school-year-day.is-muted { opacity: 0.42; }
.public-school-year-day.has-events { background: rgba(14, 107, 92, 0.12); color: var(--brand); }
.public-school-year-day.is-selected { border-color: rgba(35, 97, 180, 0.45); box-shadow: 0 0 0 2px rgba(35, 97, 180, 0.12); }
.public-school-year-summary {
    display: grid;
    gap: 0.45rem;
    padding-top: 0.35rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.public-school-year-summary__count { margin: 0; font-weight: 700; }
.public-school-year-summary__list { margin: 0; padding-left: 1rem; display: grid; gap: 0.35rem; }
.public-calendar-detail-card { display: grid; gap: 1rem; }
.public-calendar-detail-item {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 1rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.74);
}
.public-calendar-detail-item__copy { display: grid; gap: 0.6rem; }
.public-calendar-detail-item__flyer { display: grid; align-items: start; }
.public-calendar-flyer-image {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}
.calendar-empty { color: var(--muted); font-size: 0.86rem; }
.calendar-chip { border-radius: 12px; padding: 0.45rem 0.55rem; font-size: 0.82rem; line-height: 1.35; }
.calendar-chip span { color: var(--muted); }
.calendar-chip--class { background: rgba(14, 107, 92, 0.1); }
.calendar-chip--meeting { background: rgba(35, 97, 180, 0.1); }
.calendar-chip--deadline { background: rgba(180, 96, 35, 0.12); }
.calendar-chip--announcement { background: rgba(132, 74, 201, 0.1); }
.calendar-chip--assignment { background: rgba(216, 139, 50, 0.16); }
.calendar-chip--billing { background: rgba(180, 35, 24, 0.1); }
.calendar-empty { color: var(--muted); font-size: 0.8rem; padding: 0.25rem 0.1rem; }
.empty-state { display: grid; gap: 0.35rem; }
.empty-state__title { margin: 0; font-weight: 700; }
.empty-card { justify-items: start; }
.list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.85rem; padding: 0.2rem 0; }
.list-row__title { margin: 0; font-weight: 700; }
.dashboard-library-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}
.dashboard-library-book {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}
.dashboard-library-book__cover {
    display: block;
    text-decoration: none;
}
.dashboard-library-book__cover .library-book-cover-image,
.dashboard-library-book__cover .library-book-card__cover {
    width: 100%;
    min-height: 0;
    aspect-ratio: 2 / 3;
}
.dashboard-library-book__body {
    display: grid;
    gap: 0.2rem;
}
.dashboard-library-book .button {
    width: 100%;
    justify-content: center;
}
.birthday-card {
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 239, 213, 0.92), rgba(255, 255, 255, 0.96) 45%, rgba(255, 232, 240, 0.94));
    border: 1px solid rgba(216, 139, 50, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}
.birthday-card__icons {
    display: inline-block;
    margin-right: 0.3rem;
}
.birthday-card__message {
    margin: 0.45rem 0 0;
    color: var(--muted);
    line-height: 1.6;
}
.info-box {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
    margin-top: 1rem;
}
.section-divider {
    margin: 1rem 0 0.5rem;
    border: 0;
    border-top: 1px solid var(--line);
}
.legal-page {
    gap: 1rem;
}
.legal-hero,
.legal-card {
    width: min(980px, 100%);
}
.legal-copy {
    color: var(--ink);
    line-height: 1.75;
    white-space: normal;
}
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 600;
}
.checkbox-row input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    min-height: 0;
    margin-top: 0.2rem;
}
.recovery-code-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.recovery-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.7rem 0.9rem;
    border-radius: 14px;
    background: rgba(14, 107, 92, 0.08);
    border: 1px dashed rgba(14, 107, 92, 0.28);
    font-weight: 700;
    letter-spacing: 0.08em;
}
.metric-block { display: grid; gap: 0.5rem; }
.progress-meter { width: 100%; height: 10px; border-radius: 999px; background: rgba(29, 36, 51, 0.08); overflow: hidden; }
.progress-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #35a58f); }
.dashboard-card-heading { display: flex; align-items: center; gap: 0.9rem; line-height: 1.2; }
.dashboard-card-icon { width: 3rem; height: 3rem; border-radius: 18px; display: inline-grid; place-items: center; background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18)); color: var(--brand); font-size: 1.35rem; box-shadow: inset 0 0 0 1px rgba(14, 107, 92, 0.08); flex: 0 0 auto; }
.widget-card--feature .dashboard-card-icon { width: 3.4rem; height: 3.4rem; font-size: 1.55rem; background: linear-gradient(135deg, rgba(14, 107, 92, 0.18), rgba(216, 139, 50, 0.24)); }
.title-with-icon { display: flex; align-items: center; gap: 0.7rem; }
.section-icon { width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; background: rgba(14, 107, 92, 0.12); color: var(--brand); font-size: 1.1rem; }
.mini-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; margin-right: 0.35rem; opacity: 0.9; }
.button .mini-icon, .button.secondary .mini-icon { margin-right: 0.45rem; }
.library-manager-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.library-feature-card {
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 1.2rem;
    align-items: stretch;
}
.library-feature-card__cover {
    min-height: 220px;
    border-radius: 28px;
    padding: 1.35rem;
    display: grid;
    align-content: space-between;
    background:
        linear-gradient(165deg, rgba(16, 27, 47, 0.96), rgba(14, 107, 92, 0.88)),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    color: #f8f4ec;
}
.library-feature-card__cover p {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.82);
    font-size: 0.86rem;
}
.library-feature-card__body {
    display: grid;
    align-content: center;
    gap: 0.7rem;
}
.library-feature-card__body .lead {
    max-width: none;
    margin: 0;
}
.library-catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.library-catalog-grid--shelf {
    grid-template-columns: repeat(auto-fill, minmax(128px, 136px));
    gap: 1.1rem 0.95rem;
    justify-content: start;
}
.library-book-card {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(20, 33, 61, 0.07);
    box-shadow: 0 18px 40px rgba(15, 24, 43, 0.08);
}
.library-book-card__cover {
    min-height: 180px;
    border-radius: 24px;
    padding: 1.25rem;
    display: grid;
    align-content: space-between;
    background:
        linear-gradient(160deg, rgba(16, 27, 47, 0.95), rgba(14, 107, 92, 0.88)),
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0));
    color: #f8f4ec;
}
.library-book-card__icon {
    width: 3.8rem;
    height: 3.8rem;
    display: inline-grid;
    place-items: center;
    border-radius: 22px;
    background: rgba(255,255,255,0.12);
    font-size: 1.9rem;
}
.library-book-card__cover p {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
}
.library-book-card__body { display: grid; gap: 0.45rem; }
.library-book-card__body h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; }
.library-book-card__meta { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.25rem; }
.library-book-card__cover--compact {
    min-height: 0;
    aspect-ratio: 2 / 3;
    padding: 1rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 12px 22px rgba(15, 24, 43, 0.18);
    position: relative;
    overflow: hidden;
    align-content: end;
    gap: 0.55rem;
    border: 1px solid rgba(20, 33, 61, 0.08);
}
.library-book-cover-image {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    box-shadow: 0 12px 22px rgba(15, 24, 43, 0.18);
    border: 1px solid rgba(20, 33, 61, 0.08);
    background: #eef2f6;
}
.library-book-card__cover--compact::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 8px;
    background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(255,255,255,0.06));
    opacity: 0.9;
}
.library-book-card__cover--compact > * {
    position: relative;
    z-index: 1;
}
.library-book-card__cover-title {
    display: block;
    font-size: 1.18rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #f8f4ec;
    text-wrap: balance;
}
.library-book-card__cover-author {
    display: block;
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(248, 244, 236, 0.84);
}
.library-book-card__cover--tone-1 { background: linear-gradient(180deg, #19324a 0%, #2d5f73 100%); }
.library-book-card__cover--tone-2 { background: linear-gradient(180deg, #3a2430 0%, #8a4f5e 100%); }
.library-book-card__cover--tone-3 { background: linear-gradient(180deg, #2f2d4f 0%, #665f9b 100%); }
.library-book-card__cover--tone-4 { background: linear-gradient(180deg, #284235 0%, #4d8666 100%); }
.library-book-card__cover--tone-5 { background: linear-gradient(180deg, #4a3120 0%, #a06c45 100%); }
.library-book-card__cover--tone-6 { background: linear-gradient(180deg, #253244 0%, #536f90 100%); }
.library-book-tile {
    display: grid;
    align-content: start;
}
.library-book-tile[hidden] {
    display: none !important;
}
.library-book-tile__link {
    display: grid;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
}
.library-book-tile__body {
    display: grid;
    gap: 0.16rem;
    justify-items: start;
}
.library-book-tile__title {
    font-size: 0.92rem;
    line-height: 1.28;
    font-weight: 700;
    color: var(--ink);
}
.library-book-tile__byline {
    display: grid;
    gap: 0.12rem;
    min-height: 2.2rem;
}
.library-book-tile__byline span {
    font-size: 0.8rem;
    line-height: 1.4;
}
.library-book-tile__link:hover .library-book-tile__title {
    color: var(--brand);
}
.library-empty-state { padding: 2rem 1rem; }
.library-search-card .grid-form { align-items: end; }
.library-search-picker {
    display: grid;
    gap: 0.45rem;
    position: relative;
}
.library-search-picker__input {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
    border: 1px solid rgba(29, 36, 51, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}
.library-search-picker__input:focus {
    outline: none;
    border-color: rgba(14, 107, 92, 0.34);
    box-shadow: 0 0 0 4px rgba(14, 107, 92, 0.08);
}
.entity-search-results {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    z-index: 20;
    display: grid;
    gap: 0.25rem;
    padding: 0.45rem;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(29, 36, 51, 0.12);
    border-radius: 1rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
    max-height: 16rem;
    overflow: auto;
}
.entity-search-results[hidden] {
    display: none !important;
}
.entity-search-option {
    width: 100%;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    color: var(--ink);
    display: grid;
    gap: 0.12rem;
    padding: 0.7rem 0.85rem;
    text-align: left;
    cursor: pointer;
}
.entity-search-option:hover,
.entity-search-option:focus {
    background: rgba(14, 107, 92, 0.08);
    outline: none;
}
.entity-search-option__label {
    font-weight: 700;
}
.entity-search-option__meta {
    color: var(--muted);
    font-size: 0.82rem;
}
.entity-search-option--book {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 3.25rem minmax(0, 1fr);
}
.entity-search-option__media {
    display: grid;
}
.entity-search-option__cover {
    aspect-ratio: 2 / 3;
    background: #eef2f6;
    border: 1px solid rgba(20, 33, 61, 0.08);
    border-radius: 0.7rem;
    box-shadow: 0 8px 18px rgba(15, 24, 43, 0.12);
    display: block;
    object-fit: cover;
    overflow: hidden;
    width: 100%;
}
.entity-search-option__cover--placeholder {
    align-items: center;
    color: var(--muted);
    display: grid;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.entity-search-option__content {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
}
.entity-search-option--book .entity-search-option__label {
    line-height: 1.3;
    white-space: normal;
}
.library-upload-warning {
    margin: -0.1rem 0 0;
    color: var(--danger);
    font-weight: 700;
    font-size: 0.92rem;
}
.library-management-list {
    margin-top: 1rem;
}
.library-management-row {
    align-items: center;
    padding: 0.85rem 0;
}
.library-management-row__actions {
    align-items: center;
    justify-content: flex-end;
}
.library-management-row__actions select {
    min-width: 220px;
}
.compact-grid__full {
    grid-column: 1 / -1;
}
.library-edit-items {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
}
.library-management-toolbar {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}
.library-management-search {
    max-width: 420px;
}
.library-management-summary {
    margin: 0;
}
.library-edit-item {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,0.9);
    overflow: hidden;
}
.library-edit-item__summary {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem 1.1rem;
    cursor: pointer;
    list-style: none;
}
.library-edit-item__summary::-webkit-details-marker {
    display: none;
}
.library-edit-item__thumb {
    display: inline-grid;
    width: 72px;
}
.library-edit-item__thumb .library-book-cover-image,
.library-edit-item__thumb .library-book-card__cover {
    width: 72px;
    height: 102px;
    min-height: 102px;
}
.library-edit-item__meta {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}
.library-edit-item__title {
    font-size: 1rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--ink);
}
.library-edit-item__byline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    color: var(--muted);
    font-size: 0.88rem;
}
.library-edit-item__body {
    display: grid;
    gap: 0.85rem;
    padding: 0 1.1rem 1.1rem;
    border-top: 1px solid var(--line);
}
.library-edit-item__body .grid-form {
    margin-top: 0.9rem;
}
.library-management-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}
.library-catalog-pagination {
    align-items: center;
    justify-content: center;
}
.library-catalog-pagination__status {
    padding: 0.65rem 0.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}
.library-page-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(29, 36, 51, 0.14);
    background: rgba(255,255,255,0.95);
    color: var(--ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.library-page-button:disabled {
    opacity: 0.48;
    cursor: default;
}
.library-page-button.is-active {
    background: var(--brand);
    color: #fff;
    border-color: transparent;
}
.library-featured-summary {
    display: grid;
    gap: 0.6rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(14, 107, 92, 0.06);
    border: 1px solid rgba(14, 107, 92, 0.12);
}
.library-featured-summary h3 {
    margin: 0;
    font-size: 1.15rem;
}
.library-loan-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}
.library-loan-card:last-child {
    border-bottom: 0;
}
.library-loan-row {
    align-items: flex-start;
}
.library-loan-editor {
    padding: 1rem 1rem 0;
    border-top: 1px solid rgba(29, 36, 51, 0.08);
    background: rgba(14, 107, 92, 0.04);
    border-radius: 18px;
}
.library-loan-editor .grid-form {
    margin-top: 0;
    align-items: end;
}
.library-reader-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(216, 139, 50, 0.14), transparent 42%),
        linear-gradient(180deg, #f7f1e7 0%, #f4efe7 100%);
}
.library-reader-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
}
.library-reader-shell:fullscreen,
.library-reader-shell--immersive {
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    gap: 0;
    background:
        radial-gradient(circle at top, rgba(216, 139, 50, 0.14), transparent 42%),
        linear-gradient(180deg, #f7f1e7 0%, #f4efe7 100%);
}
.library-reader-shell:fullscreen .library-reader-header,
.library-reader-shell--immersive .library-reader-header {
    display: none;
}
.library-reader-shell:fullscreen .library-reader-stage,
.library-reader-shell--immersive .library-reader-stage {
    min-height: 100vh;
    height: 100vh;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
.library-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 35px rgba(15, 24, 43, 0.09);
}
.library-reader-header h1 { margin: 0; }
.library-reader-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.65rem; }
.library-reader-actions .button { width: auto; }
.library-reader-fullscreen-button {
    opacity: 0.82;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.library-reader-fullscreen-button.is-active {
    box-shadow: 0 12px 28px rgba(var(--brand-rgb), 0.28);
    opacity: 1;
    transform: translateY(-1px);
}
.library-reader-pagecount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: rgba(14, 107, 92, 0.08);
    color: var(--ink);
    font-weight: 700;
}
.library-reader-stage {
    min-height: 0;
    padding: 1rem;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(18, 29, 48, 0.96), rgba(12, 21, 36, 0.98));
    box-shadow: 0 24px 55px rgba(15, 24, 43, 0.22);
}
.library-reader-book {
    position: relative;
    min-height: calc(100vh - 170px);
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(180deg, #fdfaf4 0%, #f6f0e2 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.library-reader-book::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 50%;
    width: 22px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(16, 27, 47, 0.08), rgba(16, 27, 47, 0.18), rgba(16, 27, 47, 0.08));
    pointer-events: none;
    z-index: 1;
}
.library-reader-renderer {
    position: relative;
    z-index: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    height: 100%;
    padding: 1rem;
}
.library-reader-pagewrap {
    min-height: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    grid-template-rows: auto auto 1fr;
    align-content: center;
    gap: 0.75rem;
    overflow: hidden;
}
.library-reader-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    align-content: start;
    gap: 0.9rem;
    padding: 0.35rem 0 0;
}
.library-reader-fallback__message {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
    text-align: center;
}
.library-reader-fallback__frame {
    width: 100%;
    min-height: 72vh;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 35px rgba(15, 24, 43, 0.14);
}
.library-reader-spread {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    align-content: center;
    justify-content: center;
    gap: 0.35rem;
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.12s ease-out;
}
.library-reader-spread--double {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}
.library-reader-spread--zoomed {
    transition: none;
}
.library-reader-status {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}
.library-reader-canvas {
    position: relative;
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 35px rgba(15, 24, 43, 0.18);
}
.library-reader-canvas[hidden] {
    display: none !important;
}
.library-reader-nav {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.library-reader-nav:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
}
.library-reader-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.library-reader-touch-hint {
    margin: 0;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(18, 29, 48, 0.82);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: center;
}
.library-reader-shell:fullscreen .library-reader-renderer,
.library-reader-shell--immersive .library-reader-renderer {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0.2rem;
    height: 100vh;
}
.library-reader-shell:fullscreen .library-reader-pagewrap,
.library-reader-shell--immersive .library-reader-pagewrap {
    min-height: 100vh;
    height: 100vh;
    grid-template-rows: 1fr;
    align-content: center;
    justify-items: center;
    place-items: center;
}
.library-reader-shell:fullscreen .library-reader-book,
.library-reader-shell--immersive .library-reader-book {
    min-height: 100vh;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}
.library-reader-book--fallback::before {
    display: none;
}
.library-reader-shell--fallback .library-reader-renderer {
    grid-template-columns: minmax(0, 1fr);
}
.library-reader-shell--fallback .library-reader-nav {
    display: none;
}
.library-reader-shell--fallback .library-reader-pagewrap {
    grid-template-rows: auto auto minmax(0, 1fr);
}
.library-reader-shell--fallback .library-reader-stage {
    background: linear-gradient(180deg, rgba(18, 29, 48, 0.96), rgba(12, 21, 36, 0.98));
}
.library-reader-shell--stacked .library-reader-stage {
    padding: 0;
    border-radius: 20px;
}
.library-reader-shell--stacked .library-reader-book {
    min-height: 0;
    height: auto;
    overflow: auto;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.library-reader-shell--stacked .library-reader-book::before {
    display: none;
}
.library-reader-shell--stacked .library-reader-renderer {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 0;
    height: auto;
    min-height: 0;
    padding: 0;
}
.library-reader-shell--stacked .library-reader-pagewrap {
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto auto;
    place-items: start center;
    align-content: start;
    justify-items: center;
    overflow: auto;
    gap: 0;
    padding: 0;
}
.library-reader-shell--stacked .library-reader-spread {
    height: auto;
    min-height: 0;
    place-items: start center;
    align-content: start;
    justify-content: center;
    gap: 0;
}
.library-reader-shell--stacked .library-reader-nav {
    display: none;
}
.library-reader-shell--stacked .library-reader-canvas {
    margin: 0 auto;
    border-radius: 0;
    box-shadow: none;
}
.library-reader-shell--stacked:fullscreen .library-reader-renderer,
.library-reader-shell--stacked.library-reader-shell--immersive .library-reader-renderer {
    height: auto;
    min-height: 100vh;
    padding: 0;
    align-items: start;
}
.library-reader-shell--stacked:fullscreen .library-reader-pagewrap,
.library-reader-shell--stacked.library-reader-shell--immersive .library-reader-pagewrap {
    min-height: 100vh;
    height: auto;
    grid-template-rows: auto auto auto;
    place-items: start center;
    align-content: start;
    justify-items: center;
    overflow: auto;
    gap: 0;
    padding: 0;
}
.library-reader-shell:fullscreen .library-reader-book::before,
.library-reader-shell--immersive .library-reader-book::before {
    display: none;
}
.library-reader-shell:fullscreen .library-reader-canvas,
.library-reader-shell--immersive .library-reader-canvas {
    max-width: 100%;
    max-height: calc(100vh - 1rem);
    border-radius: 0;
}
.library-reader-shell:fullscreen .library-reader-spread,
.library-reader-shell--immersive .library-reader-spread {
    min-height: 100%;
    height: 100%;
    place-content: center;
    gap: 0;
}
.library-reader-shell:fullscreen .library-reader-nav,
.library-reader-shell--immersive .library-reader-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    transform: translateY(-50%);
    width: clamp(34px, 3.8vw, 52px);
    min-width: clamp(34px, 3.8vw, 52px);
    height: min(32vh, 240px);
    border-radius: 24px;
    background: rgba(18, 29, 48, 0.42);
    box-shadow: 0 18px 30px rgba(15, 24, 43, 0.2);
}
.library-reader-shell:fullscreen .library-reader-nav--prev,
.library-reader-shell--immersive .library-reader-nav--prev {
    left: 0.2rem;
}
.library-reader-shell:fullscreen .library-reader-nav--next,
.library-reader-shell--immersive .library-reader-nav--next {
    right: 0.2rem;
}
.library-reader-shell:fullscreen .library-reader-pagecount,
.library-reader-shell--immersive .library-reader-pagecount {
    display: none;
}
.library-reader-shell:fullscreen .library-reader-spread--double .library-reader-canvas:first-child,
.library-reader-shell--immersive .library-reader-spread--double .library-reader-canvas:first-child {
    justify-self: end;
    align-self: center;
}
.library-reader-shell:fullscreen .library-reader-spread--double .library-reader-canvas:last-child,
.library-reader-shell--immersive .library-reader-spread--double .library-reader-canvas:last-child {
    justify-self: start;
    align-self: center;
}
.library-reader-shell:fullscreen .library-reader-spread:not(.library-reader-spread--double) .library-reader-canvas,
.library-reader-shell--immersive .library-reader-spread:not(.library-reader-spread--double) .library-reader-canvas {
    justify-self: center;
    align-self: center;
}

@media (max-width: 980px) {
    .class-editor-stack {
        gap: 1.15rem;
    }
    .class-editor-card {
        padding: 1rem;
        gap: 0.95rem;
        border-radius: 22px;
    }
    .class-editor-card__hero,
    .class-editor-card__save-row {
        grid-template-columns: 1fr;
        display: grid;
        justify-content: stretch;
    }
    .class-editor-card__heading {
        gap: 0.5rem;
    }
    .class-editor-card__hero-actions,
    .class-editor-card__actions {
        justify-content: stretch;
    }
    .class-editor-card__hero-actions .button,
    .class-editor-card__actions .button {
        width: 100%;
    }
    .class-editor-card__actions .inline-form {
        width: 100%;
    }
    .class-editor-card__actions .inline-form .button {
        width: 100%;
    }
    .class-editor-card__facts {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
    .class-editor-fact {
        border-radius: 16px;
        padding: 0.85rem 0.9rem;
    }
    .class-editor-card__panel {
        padding: 0.95rem;
        border-radius: 18px;
        background: rgba(255,255,255,0.66);
        border: 1px solid rgba(29, 36, 51, 0.08);
    }
    .class-editor-card__panel .grid-form,
    .class-editor-card__panel .compact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 0;
    }
    .class-editor-card__panel .grid-form > label,
    .class-editor-card__panel .grid-form > .compact-grid__full {
        padding: 0.8rem 0.85rem;
        border-radius: 16px;
        border: 1px solid rgba(29, 36, 51, 0.08);
        background: rgba(255,255,255,0.86);
    }
    .class-editor-card__panel .grid-form > .compact-grid__full {
        display: grid;
        gap: 0.65rem;
    }
    .class-editor-card__panel .grid-form > label input,
    .class-editor-card__panel .grid-form > label select,
    .class-editor-card__panel .grid-form > label textarea {
        margin-top: 0.45rem;
    }
    .class-editor-card__panel .teacher-assignment-grid {
        padding: 0;
        border: none;
        background: transparent;
        gap: 0.7rem;
    }
    .teacher-rate-row {
        grid-template-columns: 1fr;
        padding: 0.85rem;
        border-radius: 16px;
    }
    .teacher-assignment-grid__label {
        font-size: 0.92rem;
    }
    .class-editor-card__save-row {
        padding: 0;
        background: transparent;
        border: none;
    }
    .class-editor-card__save-row .button {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }

    .portal-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 1rem 1rem 0;
    }

    .portal-layout.is-mobile-nav-collapsed .sidebar {
        display: none;
    }

    .portal-layout.is-mobile-nav-collapsed .portal-main {
        padding-top: 0.2rem;
    }

    .portal-main {
        padding: 1rem;
    }

    .sidebar {
        gap: 0.9rem;
        padding: 0.9rem 0.85rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .sidebar-top {
        justify-items: stretch;
    }

    .sidebar-brandmark {
        min-height: 0;
        width: 100%;
        aspect-ratio: 16 / 5.5;
        padding: 0.45rem 0.65rem;
        border-radius: 24px;
    }

    .sidebar-logo {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
    }

    .sidebar-contact-card {
        margin: 0;
        padding: 0.7rem 0.8rem;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem 0.7rem;
    }

    .sidebar-address {
        display: none;
    }

    .sidebar-contact-line {
        margin: 0;
        font-size: 0.86rem;
    }

    .sidebar-title {
        margin: 0.15rem 0 0;
        font-size: 1.05rem;
    }

    .sidebar-user {
        margin: 0;
        font-size: 0.92rem;
    }

    .single-column-form {
        gap: 0.6rem;
        margin-top: 0.45rem;
    }

    .nav-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .nav-links a {
        min-height: 84px;
        padding: 0.8rem 0.55rem;
        border-radius: 20px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.45rem;
        text-align: center;
        font-size: 0.78rem;
        line-height: 1.2;
    }

    .nav-icon {
        width: auto;
        font-size: 1.3rem;
    }

    .widget-grid,
    .widget-grid--dashboard,
    .admin-dashboard-grid,
    .admin-dashboard-grid--top,
    .quick-action-grid,
    .lead-catalog-grid,
    .student-card-grid,
    .class-grid,
    .school-calendar-layout,
    .library-manager-grid {
        grid-template-columns: 1fr;
    }

    .admin-module--wide,
    .widget-grid--dashboard .widget-card--feature {
        grid-column: auto;
    }

    .quick-action-row,
    .widget-actions {
        display: grid;
    }

    .lead-card__header,
    .session-card__header {
        flex-direction: column;
    }

    .lead-card__meta,
    .calendar-date-grid,
    .secretary-kpi-grid {
        grid-template-columns: 1fr;
    }

    .school-calendar-sidebar {
        order: 0;
    }

    .mobile-module {
        cursor: default;
        transition: border-radius 0.2s ease, box-shadow 0.2s ease;
        min-height: 168px;
        padding: 1rem;
    }

    .mobile-module__toggle {
        position: relative;
        padding-right: 0;
        cursor: pointer;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        text-align: center;
    }

    .mobile-module__toggle::after {
        content: '+';
        position: absolute;
        top: 0.1rem;
        right: 0.1rem;
        width: 1.8rem;
        height: 1.8rem;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: rgba(14, 107, 92, 0.1);
        color: var(--brand);
        font-weight: 800;
        font-size: 1.05rem;
    }

    .mobile-module:not(.is-collapsed) > .mobile-module__toggle::after {
        content: '-';
    }

    .mobile-module.is-collapsed {
        gap: 0;
        align-content: stretch;
    }

    .mobile-module.is-collapsed > :not(:first-child) {
        display: none;
    }

    .mobile-module.is-collapsed .mobile-module__toggle {
        margin-bottom: 0;
    }

    .mobile-module.is-collapsed .dashboard-card-heading,
    .mobile-module.is-collapsed .admin-module__identity {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.85rem;
        text-align: center;
        width: 100%;
    }

    .mobile-module.is-collapsed .dashboard-card-icon,
    .mobile-module.is-collapsed .admin-module__icon {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2rem;
        border-radius: 24px;
    }

    .mobile-module.is-collapsed .dashboard-card-heading > span:last-child,
    .mobile-module.is-collapsed .admin-module__identity h2 {
        display: block;
        font-size: 0.98rem;
        line-height: 1.3;
        max-width: 12rem;
    }

    .mobile-module.is-collapsed h2,
    .mobile-module.is-collapsed .section-title,
    .mobile-module.is-collapsed .admin-module__header {
        text-align: center;
        justify-content: center;
    }

    .mobile-module.is-collapsed .eyebrow,
    .mobile-module.is-collapsed .badge,
    .mobile-module.is-collapsed .muted-text {
        display: none;
    }

    .mobile-module:not(.is-collapsed) {
        grid-column: 1 / -1;
        min-height: 0;
        padding: 1.2rem;
    }
}

@media (max-width: 720px) {
    .hero, .card { padding: 1.4rem; border-radius: 20px; }
    .portal-layout { grid-template-columns: 1fr; }
    .portal-main { padding: 1rem; }
    .class-editor-card {
        padding: 1rem;
        gap: 0.9rem;
        border-radius: 22px;
    }
    .class-editor-card__hero,
    .class-editor-card__save-row {
        grid-template-columns: 1fr;
        display: grid;
        justify-content: stretch;
    }
    .class-editor-card__heading {
        gap: 0.5rem;
    }
    .class-editor-card__hero-actions,
    .class-editor-card__actions {
        justify-content: stretch;
    }
    .class-editor-card__hero-actions .button,
    .class-editor-card__actions .button {
        width: 100%;
    }
    .class-editor-card__actions .inline-form {
        width: 100%;
    }
    .class-editor-card__actions .inline-form .button {
        width: 100%;
    }
    .class-editor-card__facts {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    .class-editor-fact {
        border-radius: 16px;
        padding: 0.85rem 0.9rem;
    }
    .class-editor-card__panel {
        padding: 0.9rem;
        border-radius: 18px;
        background: rgba(255,255,255,0.64);
        border: 1px solid rgba(29, 36, 51, 0.08);
    }
    .class-editor-card__panel .grid-form,
    .class-editor-card__panel .compact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 0;
    }
    .class-editor-card__panel .grid-form > label,
    .class-editor-card__panel .grid-form > .compact-grid__full {
        padding: 0.8rem 0.85rem;
        border-radius: 16px;
        border: 1px solid rgba(29, 36, 51, 0.08);
        background: rgba(255,255,255,0.85);
    }
    .class-editor-card__panel .grid-form > .compact-grid__full {
        display: grid;
        gap: 0.65rem;
    }
    .class-editor-card__panel .grid-form > label input,
    .class-editor-card__panel .grid-form > label select,
    .class-editor-card__panel .grid-form > label textarea {
        margin-top: 0.45rem;
    }
    .class-editor-card__panel .teacher-assignment-grid {
        padding: 0;
        border: none;
        background: transparent;
        gap: 0.7rem;
    }
    .teacher-rate-row {
        grid-template-columns: 1fr;
        padding: 0.85rem;
        border-radius: 16px;
    }
    .teacher-assignment-grid__label {
        font-size: 0.92rem;
    }
    .class-editor-card__save-row {
        padding: 0;
        background: transparent;
        border: none;
    }
    .class-editor-card__save-row .button {
        width: 100%;
    }
    .sidebar {
        gap: 0.9rem;
        padding: 0.9rem 0.85rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .sidebar-top { justify-items: stretch; }
    .sidebar-brandmark {
        min-height: 0;
        width: 100%;
        aspect-ratio: 16 / 5.5;
        padding: 0.45rem 0.65rem;
        border-radius: 24px;
    }
    .sidebar-logo {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
    }
    .sidebar-contact-card {
        margin: 0;
        padding: 0.7rem 0.8rem;
    }
    .sidebar-address {
        display: none;
    }
    .sidebar-contact-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem 0.7rem;
    }
    .sidebar-contact-line {
        margin: 0;
        font-size: 0.86rem;
    }
    .sidebar-title {
        margin: 0.15rem 0 0;
        font-size: 1.05rem;
    }
    .sidebar-user {
        margin: 0;
        font-size: 0.92rem;
    }
    .single-column-form {
        gap: 0.6rem;
        margin-top: 0.45rem;
    }
    .nav-links {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.6rem;
    }
    .nav-links a {
        min-height: 84px;
        padding: 0.8rem 0.55rem;
        border-radius: 20px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.45rem;
        text-align: center;
        font-size: 0.78rem;
        line-height: 1.2;
    }
    .nav-icon {
        width: auto;
        font-size: 1.3rem;
    }
    .registration-card__header,
    .registration-card--actions { display: grid; grid-template-columns: 1fr; }
    .admin-dashboard-grid,
    .admin-dashboard-grid--top,
    .widget-grid--dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-module--wide { grid-column: auto; }
    .widget-grid--dashboard .widget-card--feature { grid-column: auto; }
    .lead-catalog-grid { grid-template-columns: 1fr; }
    .lead-card__header { flex-direction: column; }
    .lead-card__meta { grid-template-columns: 1fr; }
    .grid-span-2,
    .grid-span-3 { grid-column: auto; }
    .session-card__header { flex-direction: column; }
    .teacher-session-row,
    .teacher-session-form,
    .teacher-rate-row { grid-template-columns: 1fr; }
    .teacher-session-row { flex-direction: column; }
    .teacher-session-row__status,
    .teacher-session-form__actions { justify-content: flex-start; }
    .calendar-grid {
        gap: 0.35rem;
        margin-top: 1rem;
    }
    .calendar-grid__weekdays,
    .calendar-grid__week {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.35rem;
    }
    .calendar-grid__weekdays span {
        font-size: 0.72rem;
        text-align: center;
        padding: 0;
    }
    .calendar-grid__cell {
        min-height: 3.9rem;
        padding: 0.35rem;
        border-radius: 16px;
        gap: 0.2rem;
    }
    .calendar-grid__date {
        font-size: 0.9rem;
    }
    .calendar-grid__count {
        min-width: 1.1rem;
        height: 1.1rem;
        padding: 0;
        font-size: 0.65rem;
    }
    .calendar-chip,
    .calendar-empty {
        display: none;
    }
    .school-calendar-layout { grid-template-columns: 1fr; }
    .school-calendar-sidebar { order: 0; }
    .school-calendar-toolbar { margin-bottom: 1rem; }
    .school-calendar-month { font-size: 1.7rem; }
    .school-calendar-filter-grid,
    .calendar-date-grid { grid-template-columns: 1fr 1fr; }
    .nav-links a { min-height: 56px; }
    .button { width: 100%; }
    .quick-action-row, .widget-actions { display: grid; }
    .list-row { flex-direction: column; align-items: flex-start; }
    .secretary-kpi-grid { grid-template-columns: 1fr 1fr; }
    .mobile-module {
        cursor: default;
        transition: border-radius 0.2s ease, box-shadow 0.2s ease;
        min-height: 168px;
        padding: 1rem;
    }
    .mobile-module__toggle {
        position: relative;
        padding-right: 0;
        cursor: pointer;
        min-height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        text-align: center;
    }
    .mobile-module__toggle::after {
        content: '+';
        position: absolute;
        top: 0.1rem;
        right: 0.1rem;
        width: 1.8rem;
        height: 1.8rem;
        border-radius: 999px;
        display: grid;
        place-items: center;
        background: rgba(14, 107, 92, 0.1);
        color: var(--brand);
        font-weight: 800;
        font-size: 1.05rem;
    }
    .mobile-module:not(.is-collapsed) > .mobile-module__toggle::after { content: '–'; }
    .mobile-module.is-collapsed {
        gap: 0;
        align-content: stretch;
    }
    .mobile-module.is-collapsed > :not(:first-child) { display: none; }
    .mobile-module.is-collapsed .mobile-module__toggle { margin-bottom: 0; }
    .mobile-module.is-collapsed .dashboard-card-heading,
    .mobile-module.is-collapsed .admin-module__identity {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.85rem;
        text-align: center;
        width: 100%;
    }
    .mobile-module.is-collapsed .dashboard-card-heading {
        justify-content: center;
    }
    .mobile-module.is-collapsed .dashboard-card-icon,
    .mobile-module.is-collapsed .admin-module__icon {
        width: 4.5rem;
        height: 4.5rem;
        font-size: 2rem;
        border-radius: 24px;
    }
    .mobile-module.is-collapsed .dashboard-card-heading > span:last-child,
    .mobile-module.is-collapsed .admin-module__identity h2 {
        display: block;
        font-size: 0.98rem;
        line-height: 1.3;
        max-width: 12rem;
    }
    .mobile-module.is-collapsed h2,
    .mobile-module.is-collapsed .section-title {
        text-align: center;
    }
    .mobile-module.is-collapsed .eyebrow,
    .mobile-module.is-collapsed .badge,
    .mobile-module.is-collapsed .muted-text {
        display: none;
    }
    .mobile-module.is-collapsed .admin-module__header {
        justify-content: center;
    }
    .mobile-module:not(.is-collapsed) {
        grid-column: 1 / -1;
        min-height: 0;
        padding: 1.2rem;
    }
    .dashboard-zone__header {
        margin-bottom: 0.15rem;
    }
    .dashboard-zone__header .muted-text,
    .content-header .lead {
        font-size: 0.95rem;
    }
    .billing-rules-page {
        display: grid;
        gap: 1rem;
    }
    .billing-rules-page > .widget-grid {
        grid-template-columns: 1fr;
    }
    .billing-rules-page .card,
    .billing-rules-page .widget-card {
        padding: 1rem;
        border-radius: 22px;
    }
    .billing-rules-page .mobile-collapsible {
        min-height: 132px;
    }
    .billing-rules-page .mobile-collapsible.is-collapsed {
        display: grid;
        align-items: center;
    }
    .billing-rules-page .mobile-collapsible.is-collapsed > h2 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.85rem;
        text-align: center;
        font-size: 1rem;
        line-height: 1.35;
        min-height: 100%;
        margin: 0;
    }
    .billing-rules-page .mobile-collapsible.is-collapsed > h2 .mini-icon {
        width: 4.25rem;
        height: 4.25rem;
        margin: 0;
        border-radius: 22px;
        background: linear-gradient(135deg, rgba(14, 107, 92, 0.14), rgba(216, 139, 50, 0.18));
        font-size: 1.8rem;
    }
    .billing-rules-page .single-column-form,
    .billing-rules-page .grid-form,
    .billing-rules-page .compact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 0.9rem;
    }
    .billing-rules-page .widget-actions {
        grid-template-columns: 1fr;
    }
    .billing-rules-page .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .billing-rules-page .data-table {
        min-width: 720px;
    }
    .billing-rules-page .widget-card .widget-value {
        font-size: 1.8rem;
    }
    .teacher-card__earnings,
    .teacher-summary-grid,
    .teacher-doc-grid,
    .user-summary-grid,
    .enrollment-summary-grid {
        grid-template-columns: 1fr;
    }
    .teacher-summary-item--wide,
    .user-summary-item--wide,
    .enrollment-summary-item--wide {
        grid-column: auto;
    }
    .teacher-doc-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .teacher-card__footer,
    .teacher-list-actions,
    .user-card__header,
    .enrollment-card__header,
    .session-card__header {
        justify-content: stretch;
    }
    .user-directory-grid,
    .enrollment-card-grid,
    .session-card-grid {
        grid-template-columns: 1fr;
    }
    .user-card__identity,
    .enrollment-card__identity,
    .session-card__identity {
        align-items: flex-start;
    }
    .enrollment-card__actions {
        width: 100%;
    }
    .session-card__actions {
        width: 100%;
    }
    .enrollment-card__actions .button,
    .enrollment-card__actions .inline-form,
    .session-card__actions .button,
    .session-card__actions .inline-form {
        width: 100%;
    }
    .enrollment-card__actions .inline-form .button,
    .session-card__actions .inline-form .button {
        width: 100%;
    }
    .enrollment-manage-details .grid-form,
    .enrollment-manage-details .compact-grid,
    .session-manage-details .grid-form,
    .session-manage-details .compact-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 0;
    }
    .schedule-planner-card__header {
        flex-direction: column;
    }
    .teacher-scheduling-summary__header {
        flex-direction: column;
    }
    .teacher-scheduling-summary__grid {
        grid-template-columns: 1fr;
    }
    .schedule-weekly-toggle {
        width: 100%;
        justify-content: flex-start;
    }
    .schedule-weekday-picker {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .schedule-month-grid {
        gap: 0.35rem;
    }
    .schedule-month-grid__head {
        font-size: 0.68rem;
    }
    .schedule-day-cell {
        min-height: 4rem;
        padding: 0.55rem 0.45rem;
        border-radius: 14px;
    }
    .schedule-day-cell__weekday {
        font-size: 0.62rem;
    }
    .schedule-day-cell__day {
        font-size: 1rem;
    }
    .schedule-day-cell__note {
        font-size: 0.58rem;
    }
    .schedule-report-card__header {
        flex-direction: column;
    }
    .notification-audit-filters {
        grid-template-columns: 1fr;
    }
    .ratings-filters {
        grid-template-columns: 1fr;
    }
    .rating-card__header {
        flex-direction: column;
    }
    .schedule-table-actions {
        min-width: 170px;
    }
    .schedule-table-actions .button,
    .schedule-table-actions .inline-form,
    .schedule-table-actions .inline-form .button {
        width: 100%;
    }
    .lesson-plan-library,
    .lesson-plan-card__grid,
    .teacher-availability-grid {
        grid-template-columns: 1fr;
    }
    .lesson-plan-card__header,
    .teacher-availability-item,
    .teacher-timeoff-item {
        flex-direction: column;
        align-items: stretch;
    }
    .lesson-plan-card__actions,
    .lesson-plan-card__actions form,
    .lesson-plan-card__actions .button,
    .teacher-availability-item form,
    .teacher-availability-item .button,
    .teacher-timeoff-item form,
    .teacher-timeoff-item .button {
        width: 100%;
    }
    .library-manager-grid,
    .library-catalog-grid,
    .library-feature-card {
        grid-template-columns: 1fr;
    }
    .library-book-card__cover {
        min-height: 148px;
    }
    .library-catalog-grid--shelf {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.95rem 0.65rem;
    }
    .library-book-card__cover--compact {
        padding: 0.7rem 0.65rem;
    }
    .library-book-cover-image {
        border-radius: 9px;
    }
    .library-book-card__cover-title {
        font-size: 0.88rem;
    }
    .library-book-card__cover-author {
        font-size: 0.68rem;
    }
    .library-book-tile__title {
        font-size: 0.84rem;
    }
    .library-book-tile__byline {
        min-height: 0;
    }
    .library-management-row {
        flex-direction: column;
        align-items: stretch;
    }
    .library-management-row__actions {
        justify-content: stretch;
    }
    .library-management-row__actions select,
    .library-management-row__actions .button {
        width: 100%;
    }
    .library-edit-item__summary {
        grid-template-columns: 1fr;
        justify-items: start;
    }
    .library-edit-item__thumb {
        width: 88px;
    }
    .library-edit-item__thumb .library-book-cover-image,
    .library-edit-item__thumb .library-book-card__cover {
        width: 88px;
        height: 126px;
        min-height: 126px;
    }
    .library-reader-shell {
        padding: 0.7rem;
    }
    .library-reader-shell:fullscreen,
    .library-reader-shell--immersive {
        padding: 0;
        gap: 0;
    }
    .library-reader-header {
        grid-template-columns: 1fr;
        display: grid;
        padding: 0.95rem;
    }
    .library-reader-actions {
        justify-content: stretch;
    }
    .library-reader-actions .button {
        width: 100%;
    }
    .library-reader-pagecount {
        width: 100%;
    }
    .library-reader-stage {
        padding: 0.55rem;
        border-radius: 24px;
    }
    .library-reader-shell:fullscreen .library-reader-stage,
    .library-reader-shell--immersive .library-reader-stage {
        padding: 0;
        border-radius: 0;
    }
    .library-reader-book {
        min-height: calc(100vh - 155px);
        border-radius: 18px;
    }
    .library-reader-book::before {
        display: none;
    }
    .library-reader-renderer {
        grid-template-columns: 1fr;
        padding: 0.8rem;
    }
    .library-reader-nav {
        width: 100%;
        height: 46px;
        font-size: 1.15rem;
    }
    .library-reader-shell:fullscreen .library-reader-renderer,
    .library-reader-shell--immersive .library-reader-renderer {
        grid-template-columns: minmax(0, 1fr);
        padding: 0.2rem;
        gap: 0;
    }
    .library-reader-shell:fullscreen .library-reader-canvas,
    .library-reader-shell--immersive .library-reader-canvas {
        max-height: calc(100vh - 0.4rem);
    }
    .library-reader-shell:fullscreen .library-reader-nav,
    .library-reader-shell--immersive .library-reader-nav {
        width: 28px;
        min-width: 28px;
        height: min(24vh, 150px);
        font-size: 0.95rem;
    }
    .library-reader-shell:fullscreen .library-reader-spread,
    .library-reader-shell--immersive .library-reader-spread {
        gap: 0;
    }
.global-app-footer {
    padding: 0.8rem 1rem 1.1rem;
    font-size: 0.72rem;
    letter-spacing: 0.09em;
}
}

.briefcase-shared-card,
.briefcase-management-card {
    display: grid;
    gap: 1rem;
}

.briefcase-section-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.briefcase-download-list,
.briefcase-user-file-list,
.briefcase-unsend-list {
    display: grid;
    gap: 0.9rem;
}

.briefcase-folder-group {
    background: rgba(244, 248, 252, 0.9);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 22px;
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
}

.briefcase-folder-head {
    align-items: center;
    display: flex;
    gap: 0.85rem;
}

.briefcase-folder-head h4 {
    margin: 0 0 0.2rem;
}

.briefcase-folder-head .muted {
    margin: 0;
}

.briefcase-folder-icon {
    align-items: center;
    background: rgba(31, 126, 111, 0.12);
    border-radius: 16px;
    color: #0f4f57;
    display: inline-flex;
    font-size: 1.15rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.briefcase-download-item,
.briefcase-user-file,
.briefcase-inline-file {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 0.9rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 1rem 1.1rem;
}

.briefcase-inline-file {
    background: rgba(247, 250, 253, 0.96);
}

.briefcase-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}

.briefcase-file-actions .button {
    margin: 0;
}

.briefcase-file-icon {
    align-items: center;
    background: linear-gradient(160deg, #1b7f6d, #0f4f57);
    border-radius: 18px;
    color: #fff;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 700;
    height: 3.5rem;
    justify-content: center;
    letter-spacing: 0.08em;
    min-width: 3.5rem;
    padding: 0.4rem;
    text-transform: uppercase;
}

.briefcase-user-table-wrap {
    overflow-x: auto;
}

.briefcase-user-table {
    width: 100%;
}

.briefcase-card-list {
    display: grid;
    gap: 1rem;
}

.briefcase-management-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
    justify-content: space-between;
}

.briefcase-search-form {
    align-items: end;
    display: flex;
    flex: 1 1 26rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.briefcase-search-label {
    color: #0f4f57;
    display: grid;
    flex: 1 1 18rem;
    font-size: 0.78rem;
    font-weight: 700;
    gap: 0.35rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.briefcase-search-label input[type="search"] {
    min-width: 0;
}

.briefcase-results-summary {
    margin: 0;
}

.briefcase-manage-card {
    background: rgba(248, 250, 253, 0.96);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 24px;
    display: grid;
    gap: 1rem;
    padding: 1rem 1.15rem 1.25rem;
}

.briefcase-manage-card__head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.briefcase-manage-card__head h3 {
    margin: 0;
}

.briefcase-manage-card__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.briefcase-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
}

.briefcase-detail-row td {
    background: rgba(248, 250, 253, 0.94);
    padding: 0;
}

.briefcase-detail-shell {
    display: grid;
    gap: 1rem;
    padding: 1rem 1.2rem 1.25rem;
}

.briefcase-manage-card .briefcase-row-actions {
    justify-content: flex-start;
}

.briefcase-manage-card .briefcase-detail-shell {
    padding: 0;
}

.briefcase-inline-panels {
    display: grid;
    gap: 1rem;
}

.briefcase-inline-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px dashed rgba(32, 53, 83, 0.14);
    border-radius: 18px;
    display: none;
    gap: 0.8rem;
    padding: 1rem;
}

.briefcase-inline-panel.is-active {
    display: grid;
}

.briefcase-inline-panel h3,
.briefcase-user-inbox h3 {
    margin: 0;
}

.briefcase-user-inbox {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 18px;
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.briefcase-inbox-head {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.briefcase-toggle.is-active {
    background: rgba(15, 79, 87, 0.12);
    border-color: rgba(15, 79, 87, 0.3);
    color: #0f4f57;
}

.briefcase-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: space-between;
}

.button.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    pointer-events: none;
}

@media (min-width: 920px) {
    .briefcase-detail-shell {
        align-items: start;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }
}

@media (max-width: 880px) {
    .briefcase-download-item,
    .briefcase-user-file,
    .briefcase-inline-file {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .briefcase-download-item .button,
    .briefcase-user-file .button,
    .briefcase-file-actions,
    .briefcase-file-actions .button,
    .briefcase-inline-file form,
    .briefcase-inline-file .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .briefcase-file-actions {
        justify-content: stretch;
    }
}

@media (max-width: 720px) {
    .briefcase-section-head,
    .briefcase-inbox-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .briefcase-user-table thead {
        display: none;
    }

    .briefcase-user-table,
    .briefcase-user-table tbody,
    .briefcase-user-table tr,
    .briefcase-user-table td {
        display: block;
        width: 100%;
    }

    .briefcase-user-row,
    .briefcase-detail-row {
        border-top: 1px solid rgba(32, 53, 83, 0.08);
    }

    .briefcase-user-row td,
    .briefcase-detail-row td {
        padding-left: 0;
        padding-right: 0;
    }

    .briefcase-row-actions {
        justify-content: flex-start;
    }

    .briefcase-row-actions .button {
        flex: 1 1 9rem;
    }

    .briefcase-manage-card__head {
        flex-direction: column;
    }

    .briefcase-management-toolbar,
    .briefcase-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .briefcase-search-form {
        width: 100%;
    }
}

.marketing-workspace-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0 0 1.1rem;
}

.marketing-workspace-nav a {
    background: rgba(226, 232, 240, 0.72);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 999px;
    color: var(--text);
    font-weight: 600;
    padding: 0.7rem 1rem;
    text-decoration: none;
}

.marketing-workspace-nav a.is-active {
    background: rgba(15, 79, 87, 0.12);
    border-color: rgba(15, 79, 87, 0.25);
    color: #0f4f57;
}

.marketing-pipeline-board {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.marketing-pipeline-column {
    display: grid;
    gap: 1rem;
    min-height: 18rem;
}

.marketing-pipeline-column__header {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
}

.marketing-pipeline-column__header h2 {
    margin: 0.15rem 0 0;
}

.marketing-pipeline-stack {
    display: grid;
    gap: 0.9rem;
}

.marketing-pipeline-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(32, 53, 83, 0.08);
    border-radius: 20px;
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.marketing-pipeline-card.is-overdue {
    border-color: rgba(190, 70, 70, 0.26);
    box-shadow: inset 0 0 0 1px rgba(190, 70, 70, 0.08);
}

.marketing-pipeline-card__top {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
}

.marketing-pipeline-card__top h3 {
    margin: 0;
}

.marketing-pipeline-card__meta {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    font-size: 0.9rem;
}

.marketing-pipeline-card__warning {
    color: #b9382f;
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
}

.marketing-two-column-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.marketing-decision-table td {
    min-width: 140px;
}

.marketing-decision-table td:last-child {
    min-width: 220px;
}

.newsletter-workspace {
    display: grid;
    gap: 1.25rem;
}

.newsletter-form {
    display: grid;
    gap: 1.2rem;
}

.newsletter-template-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
}

.newsletter-editor-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 1rem;
    align-items: start;
}

.newsletter-editor-panel,
.newsletter-preview-panel {
    display: grid;
    gap: 0.85rem;
}

.newsletter-preview-panel__header {
    display: grid;
    gap: 0.35rem;
}

.newsletter-preview-panel__header p {
    margin: 0;
}

.newsletter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem;
    border: 1px solid rgba(29, 36, 51, 0.1);
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
}

.newsletter-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.newsletter-toolbar__group + .newsletter-toolbar__group {
    padding-left: 0.75rem;
    border-left: 1px solid rgba(29, 36, 51, 0.08);
}

.newsletter-toolbar__group--selects {
    align-items: center;
}

.newsletter-toolbar__field {
    display: block;
    min-width: auto;
}

.newsletter-toolbar__field span {
    display: none;
}

.newsletter-toolbar__field select,
.newsletter-toolbar__field input[type="color"] {
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: #fff;
    font-size: 0.88rem;
}

.newsletter-toolbar__field--size {
    min-width: 4.5rem;
}

.newsletter-toolbar__field--color {
    min-width: 2.65rem;
}

.newsletter-toolbar__field input[type="color"] {
    padding: 0.15rem;
    width: 100%;
}

.newsletter-toolbar button {
    min-height: 34px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(240, 244, 248, 0.9);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.newsletter-toolbar__icon-button {
    width: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    line-height: 1;
}

.newsletter-toolbar__icon-button span {
    display: inline-block;
}

.newsletter-toolbar__mini-button {
    min-width: 48px;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    font-size: 0.76rem;
    letter-spacing: 0.01em;
}

.newsletter-image-tools {
    display: grid;
    gap: 0.6rem;
    padding: 0.95rem;
    border: 1px solid rgba(14, 107, 92, 0.18);
    border-radius: 18px;
    background: rgba(241, 251, 248, 0.88);
}

.newsletter-image-tools__label {
    color: #0e6b5c;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.newsletter-image-tools__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.newsletter-image-tools__actions button {
    min-height: 38px;
    padding: 0.6rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 107, 92, 0.14);
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.newsletter-image-tools__actions button.danger {
    border-color: rgba(177, 53, 53, 0.18);
    color: #9f2f2f;
}

.newsletter-html-tools {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem;
    border: 1px solid rgba(21, 50, 67, 0.12);
    border-radius: 18px;
    background: rgba(248, 251, 252, 0.96);
}

.newsletter-html-tools__label {
    color: #153243;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.newsletter-html-tools textarea {
    min-height: 180px;
    width: 100%;
    resize: vertical;
    border-radius: 18px;
    border: 1px solid rgba(29, 36, 51, 0.14);
    background: #fff;
    color: var(--ink);
    font: 500 0.95rem/1.6 Consolas, "Courier New", monospace;
    padding: 1rem;
}

.newsletter-html-tools__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.newsletter-html-tools__actions button {
    min-height: 40px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(240, 244, 248, 0.95);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.newsletter-editor-frame,
.newsletter-preview {
    min-height: 420px;
    padding: 1.25rem;
    border-radius: 24px;
    border: 1px solid rgba(29, 36, 51, 0.12);
    background: rgba(255,255,255,0.9);
}

.newsletter-editor {
    min-height: 390px;
    outline: none;
    line-height: 1.7;
}

.newsletter-editor[data-empty="1"]::before {
    content: attr(data-placeholder);
    color: var(--muted);
}

.newsletter-editor img,
.newsletter-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 18px;
}

.newsletter-editor [data-newsletter-image="1"] {
    transition: box-shadow 0.2s ease, outline-color 0.2s ease;
}

.newsletter-editor [data-newsletter-image="1"].is-selected {
    outline: 3px solid rgba(14, 107, 92, 0.28);
    outline-offset: 8px;
    border-radius: 22px;
}

.newsletter-preview {
    overflow: auto;
}

.newsletter-preview__empty {
    color: var(--muted);
}

.newsletter-form-actions {
    justify-content: flex-start;
}

.newsletter-table td {
    min-width: 120px;
}

.newsletter-table td:first-child {
    min-width: 280px;
}

.newsletter-delivery-row td {
    padding: 0;
    background: rgba(248, 250, 252, 0.92);
}

.newsletter-delivery-panel {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

.newsletter-delivery-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.newsletter-delivery-panel__header h3 {
    margin: 0.2rem 0 0;
    font-size: 1.05rem;
}

.newsletter-delivery-list {
    display: grid;
    gap: 0.8rem;
}

.newsletter-delivery-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(29, 36, 51, 0.08);
}

.newsletter-delivery-item__identity,
.newsletter-delivery-item__meta {
    display: grid;
    gap: 0.3rem;
}

.newsletter-delivery-item__meta {
    justify-items: end;
    text-align: right;
}

.newsletter-body-store {
    display: none;
}

.donor-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.donor-checkbox-inline {
    margin-top: 0.5rem;
}

.donor-receipt-panel {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(21, 50, 67, 0.12);
}

.donor-receipt-form {
    align-items: end;
    margin-top: 1rem;
}

.donor-table .action-cell {
    min-width: 12rem;
}

.volunteer-table .action-cell {
    min-width: 12rem;
}

.asset-inventory-card + .asset-inventory-card {
    margin-top: 1.25rem;
}

.asset-inventory-table .action-cell {
    min-width: 12rem;
}

.asset-inventory-editor-form {
    padding-top: 0.4rem;
}

.operating-expenses-card + .operating-expenses-card {
    margin-top: 1.25rem;
}

.operating-expenses-table .action-cell {
    min-width: 10rem;
}

.finance-month-total {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 0.4rem;
    padding: 1.5rem;
}

.finance-month-total__value {
    font-size: clamp(2.4rem, 5vw, 4.3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #17342f;
}

.finance-month-total__period {
    margin: 0;
    color: #5f706d;
    font-weight: 600;
}

.finance-accordion {
    overflow: hidden;
}

.finance-accordion + .finance-accordion {
    margin-top: 1rem;
}

.finance-accordion__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 1.3rem;
}

.finance-accordion__summary::-webkit-details-marker {
    display: none;
}

.finance-accordion__summary h2 {
    margin: 0.2rem 0 0;
}

.finance-accordion__meta {
    display: grid;
    justify-items: end;
    gap: 0.2rem;
    color: #41514f;
}

.finance-accordion__meta strong {
    font-size: 1.1rem;
    color: #17342f;
}

.finance-accordion__body {
    border-top: 1px solid rgba(23, 52, 47, 0.08);
    padding: 0 1.3rem 1.3rem;
}

.finance-add-row td {
    padding-top: 0.8rem;
    text-align: center;
}

.finance-add-row__button {
    min-width: 14rem;
}

@media (max-width: 720px) {
    .finance-accordion__summary {
        grid-template-columns: 1fr;
        display: grid;
        justify-items: start;
    }

    .finance-accordion__meta {
        justify-items: start;
    }

    .marketing-workspace-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketing-workspace-nav a {
        text-align: center;
    }

    .marketing-pipeline-board,
    .marketing-two-column-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-template-picker,
    .newsletter-editor-shell {
        grid-template-columns: 1fr;
    }

    .newsletter-toolbar {
        display: grid;
        padding: 0.8rem;
    }

    .newsletter-toolbar__group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
    }

    .newsletter-toolbar__group + .newsletter-toolbar__group {
        padding-left: 0;
        padding-top: 0.55rem;
        border-left: 0;
        border-top: 1px solid rgba(29, 36, 51, 0.08);
    }

    .newsletter-toolbar__group--selects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .newsletter-toolbar__field {
        min-width: 0;
    }

    .newsletter-toolbar button,
    .newsletter-toolbar__icon-button,
    .newsletter-toolbar__mini-button {
        width: 100%;
        min-width: 0;
    }

    .newsletter-image-tools__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .newsletter-image-tools__actions button {
        width: 100%;
    }

    .newsletter-html-tools__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .newsletter-html-tools__actions button {
        width: 100%;
    }

    .newsletter-editor-frame,
    .newsletter-preview {
        min-height: 300px;
    }

    .newsletter-delivery-panel__header,
    .newsletter-delivery-item {
        flex-direction: column;
    }

    .newsletter-delivery-item__meta {
        justify-items: start;
        text-align: left;
    }

    .donor-workspace-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .public-calendar-page {
        width: min(100%, calc(100% - 1rem));
    }

    .public-contact-page {
        width: min(100%, calc(100% - 1rem));
    }

    .public-calendar-detail-item {
        grid-template-columns: 1fr;
    }

    .public-school-year-grid {
        grid-template-columns: 1fr;
    }

    .public-school-contact-card__grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .public-school-contact-card__brand {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .calendar-grid__weekdays {
        display: none;
    }

    .calendar-grid__week {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .calendar-grid__cell {
        min-height: 7.5rem;
        padding: 0.85rem;
        gap: 0.45rem;
    }

    .calendar-grid__cell::before {
        content: attr(data-weekday-short);
        display: block;
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--muted);
    }

    .calendar-grid__date-row {
        justify-content: space-between;
        align-items: start;
    }

    .calendar-grid__date {
        font-size: 1.35rem;
        line-height: 1;
    }

    .calendar-grid__count {
        min-width: 1.4rem;
        height: 1.4rem;
        font-size: 0.7rem;
    }

    .calendar-chip,
    .calendar-empty {
        display: block;
    }
}

@media (max-width: 1200px) and (min-width: 901px) {
    .public-school-year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.theme-choice-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.theme-choice {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--line);
    border-radius: 20px;
    cursor: pointer;
    display: grid;
    gap: 0.7rem;
    padding: 1rem;
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.theme-choice:hover {
    transform: translateY(-1px);
}

.theme-choice input {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.theme-choice.is-selected,
.theme-choice:has(input:checked) {
    border-color: rgba(var(--brand-rgb), 0.34);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.08);
}

.theme-choice__swatch {
    border-radius: 18px;
    display: block;
    height: 78px;
    width: 100%;
}

.theme-choice__label {
    font-size: 0.96rem;
    font-weight: 700;
}

.theme-choice__swatch--default {
    background:
        linear-gradient(115deg, #182230 0 28%, transparent 28%),
        linear-gradient(135deg, #0f1722 0%, #0e6b5c 62%, #d88b32 100%);
}

.theme-choice__swatch--red {
    background:
        linear-gradient(115deg, #3a1414 0 28%, transparent 28%),
        linear-gradient(135deg, #230d0d 0%, #c73a32 62%, #f08b47 100%);
}

.theme-choice__swatch--purple {
    background:
        linear-gradient(115deg, #241743 0 28%, transparent 28%),
        linear-gradient(135deg, #170f2d 0%, #7c48d6 62%, #c38af1 100%);
}

.theme-choice__swatch--green {
    background:
        linear-gradient(115deg, #103225 0 28%, transparent 28%),
        linear-gradient(135deg, #081c13 0%, #1c8f57 62%, #8fd19e 100%);
}

.theme-choice__swatch--blue {
    background:
        linear-gradient(115deg, #112845 0 28%, transparent 28%),
        linear-gradient(135deg, #0b172b 0%, #1f6fd6 62%, #7db8ff 100%);
}

.theme-choice__swatch--orange {
    background:
        linear-gradient(115deg, #3a220d 0 28%, transparent 28%),
        linear-gradient(135deg, #221206 0%, #d96c1a 62%, #f7b24f 100%);
}

body.theme-red {
    --brand: #c73a32;
    --brand-rgb: 199, 58, 50;
    --brand-strong: #8f231e;
    --brand-soft: rgba(199, 58, 50, 0.1);
    --accent-warm: #f08b47;
    --accent-rgb: 240, 139, 71;
    --sidebar-start: #3a1414;
    --sidebar-end: #230d0d;
    --page-accent-a: rgba(240, 139, 71, 0.2);
    --page-accent-b: rgba(199, 58, 50, 0.16);
}

body.theme-purple {
    --brand: #7c48d6;
    --brand-rgb: 124, 72, 214;
    --brand-strong: #5a30a6;
    --brand-soft: rgba(124, 72, 214, 0.1);
    --accent-warm: #c38af1;
    --accent-rgb: 195, 138, 241;
    --sidebar-start: #241743;
    --sidebar-end: #170f2d;
    --page-accent-a: rgba(195, 138, 241, 0.18);
    --page-accent-b: rgba(124, 72, 214, 0.16);
}

body.theme-green {
    --brand: #1c8f57;
    --brand-rgb: 28, 143, 87;
    --brand-strong: #13663d;
    --brand-soft: rgba(28, 143, 87, 0.1);
    --accent-warm: #8fd19e;
    --accent-rgb: 143, 209, 158;
    --sidebar-start: #103225;
    --sidebar-end: #081c13;
    --page-accent-a: rgba(143, 209, 158, 0.18);
    --page-accent-b: rgba(28, 143, 87, 0.16);
}

body.theme-blue {
    --brand: #1f6fd6;
    --brand-rgb: 31, 111, 214;
    --brand-strong: #154e9a;
    --brand-soft: rgba(31, 111, 214, 0.1);
    --accent-warm: #7db8ff;
    --accent-rgb: 125, 184, 255;
    --sidebar-start: #112845;
    --sidebar-end: #0b172b;
    --page-accent-a: rgba(125, 184, 255, 0.18);
    --page-accent-b: rgba(31, 111, 214, 0.15);
}

body.theme-orange {
    --brand: #d96c1a;
    --brand-rgb: 217, 108, 26;
    --brand-strong: #a64b0d;
    --brand-soft: rgba(217, 108, 26, 0.1);
    --accent-warm: #f7b24f;
    --accent-rgb: 247, 178, 79;
    --sidebar-start: #3a220d;
    --sidebar-end: #221206;
    --page-accent-a: rgba(247, 178, 79, 0.18);
    --page-accent-b: rgba(217, 108, 26, 0.16);
}

body[class*="theme-"] {
    background:
        radial-gradient(circle at top left, var(--page-accent-a), transparent 34%),
        radial-gradient(circle at right, var(--page-accent-b), transparent 30%),
        linear-gradient(180deg, #f8f5ef 0%, #f1ece3 100%);
}

body[class*="theme-"] .sidebar {
    background: linear-gradient(180deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
}

body[class*="theme-"] .widget-card--feature {
    background: linear-gradient(180deg, rgba(var(--brand-rgb), 0.12) 0%, rgba(255,255,255,0.94) 100%);
    border-color: rgba(var(--brand-rgb), 0.2);
}

body[class*="theme-"] .dashboard-hero--student {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.12), rgba(var(--accent-rgb), 0.08));
}

body[class*="theme-"] .admin-module::before {
    background: radial-gradient(circle, rgba(var(--brand-rgb), 0.12), rgba(var(--brand-rgb), 0));
}

body[class*="theme-"] .admin-module__icon,
body[class*="theme-"] .dashboard-card-icon,
body[class*="theme-"] .widget-card--feature .dashboard-card-icon,
body[class*="theme-"] .section-icon,
body[class*="theme-"] .course-card__icon {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.14), rgba(var(--accent-rgb), 0.18));
    box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.08);
    color: var(--brand);
}

body[class*="theme-"] .admin-stat,
body[class*="theme-"] .payments-table__editor-row td {
    background: rgba(var(--brand-rgb), 0.06);
    border-color: rgba(var(--brand-rgb), 0.12);
}

body[class*="theme-"] .mini-series__bar span,
body[class*="theme-"] .progress-meter span {
    background: linear-gradient(90deg, var(--brand), var(--accent-warm));
}

body[class*="theme-"] .calendar-grid__cell.is-today {
    border-color: rgba(var(--brand-rgb), 0.32);
    box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.08);
}

body[class*="theme-"] input:focus,
body[class*="theme-"] select:focus,
body[class*="theme-"] textarea:focus {
    border-color: rgba(var(--brand-rgb), 0.34);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.08);
    outline: none;
}

.music-games-hero {
    align-items: center;
    background:
        radial-gradient(circle at top left, rgba(89, 237, 211, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(255, 180, 69, 0.18), transparent 30%),
        linear-gradient(135deg, #091223 0%, #132343 58%, #0d1d37 100%);
    color: #f3f7ff;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    overflow: hidden;
    position: relative;
}

.music-games-hero h2 {
    color: #ffffff;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0 0 0.65rem;
}

.music-games-hero p,
.music-games-hero .eyebrow {
    color: rgba(243, 247, 255, 0.9);
}

.music-games-hero__copy {
    display: grid;
    gap: 0.9rem;
}

.music-games-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.music-games-hero__art {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 250px;
    position: relative;
}

.music-games-hero__orb {
    border-radius: 999px;
    filter: blur(4px);
    position: absolute;
}

.music-games-hero__orb--one {
    background: rgba(89, 237, 211, 0.34);
    height: 170px;
    left: 12%;
    top: 10%;
    width: 170px;
}

.music-games-hero__orb--two {
    background: rgba(255, 180, 69, 0.26);
    height: 130px;
    right: 12%;
    top: 20%;
    width: 130px;
}

.music-games-hero__orb--three {
    background: rgba(122, 170, 255, 0.28);
    bottom: 10%;
    height: 110px;
    left: 38%;
    width: 110px;
}

.music-games-hero__staff {
    align-items: center;
    background: rgba(243, 247, 255, 0.92);
    border: 1px solid rgba(163, 190, 255, 0.22);
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.24);
    display: grid;
    height: 210px;
    justify-items: center;
    overflow: hidden;
    padding: 1.25rem;
    position: relative;
    width: min(100%, 320px);
}

.music-games-hero__staff span {
    background: rgba(30, 47, 82, 0.68);
    border-radius: 999px;
    display: block;
    height: 4px;
    width: 100%;
}

.music-games-hero__staff i {
    background: linear-gradient(135deg, #0e4fc0, #f29a2e);
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(14, 79, 192, 0.32);
    display: block;
    height: 36px;
    left: 52%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    width: 56px;
}

.music-games-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.65fr) minmax(270px, 0.85fr);
}

.music-games-card {
    display: grid;
    gap: 1.2rem;
}

.music-games-card__header {
    align-items: start;
    gap: 1rem;
}

.music-games-card__header h2 {
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: clamp(1.5rem, 2vw, 2rem);
    margin: 0.2rem 0 0.35rem;
}

.music-games-stats {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.music-games-stat {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 255, 0.98));
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 24px;
    box-shadow: 0 16px 26px rgba(12, 29, 55, 0.06);
    display: grid;
    gap: 0.3rem;
    padding: 1rem 1.1rem;
}

.music-games-stat__label {
    color: #5d6a82;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.music-games-stat__value {
    color: #16213a;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
}

.music-games-levels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.music-games-level {
    background: linear-gradient(180deg, rgba(245, 248, 255, 0.96), rgba(232, 239, 252, 0.96));
    border: 1px solid rgba(var(--brand-rgb), 0.18);
    border-radius: 999px;
    color: #183154;
    cursor: pointer;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.8rem 1.1rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.music-games-level:hover {
    transform: translateY(-1px);
}

.music-games-level.is-active {
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.2), rgba(var(--accent-rgb), 0.22));
    border-color: rgba(var(--brand-rgb), 0.38);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.08);
}

.note-naming-game__board {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
}

.note-naming-stage {
    background:
        linear-gradient(180deg, rgba(7, 17, 34, 0.88), rgba(13, 27, 55, 0.94));
    border: 1px solid rgba(122, 170, 255, 0.18);
    border-radius: 30px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 24px 46px rgba(7, 17, 34, 0.14);
    display: grid;
    gap: 0.9rem;
    overflow: hidden;
    padding: 1rem;
    position: relative;
}

.note-naming-stage__canvas {
    border-radius: 24px;
    display: block;
    height: auto;
    width: 100%;
}

.note-naming-stage__hud {
    align-items: start;
    display: grid;
    gap: 0.35rem;
    min-height: 3.7rem;
    padding: 0 0.2rem;
}

.note-naming-stage__prompt {
    color: rgba(244, 247, 255, 0.94);
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.note-naming-stage__feedback {
    color: rgba(220, 232, 255, 0.92);
    font-size: 0.96rem;
    line-height: 1.45;
}

.note-naming-stage__feedback[data-tone="success"] {
    color: #85ffd8;
}

.note-naming-stage__feedback[data-tone="danger"] {
    color: #ffb4aa;
}

.note-naming-stage__feedback[data-tone="warning"] {
    color: #ffd48c;
}

.note-naming-game__keyboard {
    margin-top: 1rem;
}

.note-piano {
    background: linear-gradient(180deg, rgba(232, 239, 255, 0.18), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(173, 201, 255, 0.24);
    border-radius: 24px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 32px rgba(6, 13, 28, 0.24);
    padding: 0.85rem;
    position: relative;
}

.note-piano__white,
.note-piano__black {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.note-piano__black {
    align-items: start;
    inset: 0.85rem 0.85rem auto;
    pointer-events: none;
    position: absolute;
}

.note-piano__key {
    align-items: end;
    appearance: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-weight: 800;
    justify-content: center;
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.note-piano__key span {
    display: inline-flex;
    flex-direction: column;
    gap: 0.08rem;
    line-height: 1.05;
    text-align: center;
}

.note-piano__key small {
    font-size: 0.7em;
    font-weight: 700;
    opacity: 0.88;
}

.note-piano__key--white {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(228, 235, 248, 0.96));
    border-radius: 0 0 18px 18px;
    box-shadow: 0 10px 18px rgba(8, 17, 35, 0.18);
    color: #1b2741;
    font-size: 1rem;
    min-height: 122px;
    padding: 0.9rem 0.2rem 0.85rem;
}

.note-piano__key--white:hover,
.note-piano__key--white:focus-visible {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(213, 226, 255, 0.98));
    transform: translateY(1px);
}

.note-piano__key--black {
    background: linear-gradient(180deg, rgba(31, 41, 68, 0.98), rgba(9, 14, 25, 0.99));
    border: 1px solid rgba(193, 214, 255, 0.12);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 12px 18px rgba(3, 9, 22, 0.3);
    color: #f5f8ff;
    font-size: 0.75rem;
    height: 78px;
    justify-self: end;
    padding: 0.7rem 0.2rem 0.55rem;
    pointer-events: auto;
    width: 70%;
}

.note-piano__key--black:hover,
.note-piano__key--black:focus-visible {
    background: linear-gradient(180deg, rgba(53, 75, 128, 0.99), rgba(18, 27, 51, 0.99));
}

.note-piano__key--csharp { grid-column: 1; }
.note-piano__key--dsharp { grid-column: 2; }
.note-piano__key--fsharp { grid-column: 4; }
.note-piano__key--gsharp { grid-column: 5; }
.note-piano__key--asharp { grid-column: 6; }

.note-piano__key.is-pressed {
    transform: translateY(2px) scale(0.99);
}

.note-piano__key.is-correct {
    background: linear-gradient(180deg, #8dffdb, #3ad79e);
    color: #123826;
}

.note-piano__key.is-wrong {
    background: linear-gradient(180deg, #ffbcb3, #ff7d6d);
    color: #4b1310;
}

.note-naming-game__panel {
    display: grid;
    gap: 1rem;
}

.note-naming-panel__box {
    background: linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(240, 246, 255, 0.98));
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 24px;
    box-shadow: 0 16px 26px rgba(12, 29, 55, 0.05);
    padding: 1.15rem 1.2rem;
}

.note-naming-panel__box h3 {
    color: #16213a;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 1.2rem;
    margin: 0.2rem 0 0.45rem;
}

.music-games-checklist {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding-left: 1.1rem;
}

.music-games-checklist li {
    color: #405067;
    line-height: 1.5;
}

.note-naming-game__answers {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.note-answer-button {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 246, 255, 0.98));
    border: 1px solid rgba(var(--brand-rgb), 0.14);
    border-radius: 24px;
    box-shadow: 0 16px 26px rgba(12, 29, 55, 0.06);
    color: #13213b;
    cursor: pointer;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 800;
    min-height: 88px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.note-answer-button:hover {
    border-color: rgba(var(--brand-rgb), 0.34);
    box-shadow: 0 22px 32px rgba(12, 29, 55, 0.11);
    transform: translateY(-2px);
}

.note-answer-button:focus-visible {
    border-color: rgba(var(--brand-rgb), 0.34);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb), 0.08);
    outline: none;
}

.music-games-roadmap h2 {
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 1.8rem;
    margin: 0.15rem 0 0.45rem;
}

.music-games-roadmap__list {
    display: grid;
    gap: 0.95rem;
}

.music-games-roadmap__item {
    align-items: start;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.98), rgba(240, 245, 255, 0.98));
    border: 1px solid rgba(var(--brand-rgb), 0.12);
    border-radius: 22px;
    box-shadow: 0 14px 24px rgba(12, 29, 55, 0.05);
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 1rem 1.05rem;
}

.music-games-roadmap__number {
    align-items: center;
    background: linear-gradient(135deg, rgba(var(--brand-rgb), 0.18), rgba(var(--accent-rgb), 0.2));
    border-radius: 18px;
    color: #16325d;
    display: inline-flex;
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.music-games-roadmap__item h3 {
    font-family: "Trebuchet MS", "Gill Sans", sans-serif;
    font-size: 1.08rem;
    margin: 0 0 0.2rem;
}

@media (max-width: 1180px) {
    .music-games-layout,
    .note-naming-game__board,
    .music-games-hero {
        grid-template-columns: 1fr;
    }
}

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

    .note-naming-stage {
        padding: 0.9rem;
    }

    .note-naming-game__answers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .note-piano__white,
    .note-piano__black {
        gap: 0.42rem;
    }

    .note-piano__key--white {
        font-size: 0.9rem;
        min-height: 104px;
    }

    .note-piano__key--black {
        font-size: 0.65rem;
        height: 66px;
        width: 76%;
    }
}

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

    .note-naming-game__answers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .music-games-levels {
        flex-direction: column;
    }

    .music-games-level {
        width: 100%;
    }

    .music-games-hero__staff {
        min-height: 180px;
        width: 100%;
    }

    .note-naming-stage {
        border-radius: 24px;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .note-naming-stage__hud {
        min-height: 4.5rem;
    }

    .note-piano {
        padding: 0.65rem;
    }

    .note-piano__white,
    .note-piano__black {
        gap: 0.35rem;
    }

    .note-piano__black {
        inset: 0.65rem 0.65rem auto;
    }

    .note-piano__key--white {
        font-size: 0.72rem;
        min-height: 84px;
        padding-bottom: 0.58rem;
    }

    .note-piano__key--black {
        font-size: 0.5rem;
        height: 52px;
        width: 80%;
    }

    .note-naming-stage__prompt {
        font-size: 0.92rem;
    }

    .note-naming-stage__feedback {
        font-size: 0.84rem;
    }

    .note-answer-button {
        min-height: 70px;
    }
}

@media (max-width: 460px) {
    .music-games-stats,
    .note-naming-game__answers {
        grid-template-columns: 1fr;
    }

    .note-piano {
        padding: 0.55rem;
    }

    .note-piano__white,
    .note-piano__black {
        gap: 0.24rem;
    }

    .note-piano__black {
        inset: 0.55rem 0.55rem auto;
    }

    .note-piano__key--white {
        font-size: 0.62rem;
        min-height: 72px;
        padding-bottom: 0.5rem;
    }

    .note-piano__key--black {
        font-size: 0.42rem;
        height: 44px;
        width: 82%;
    }
}

.music-library-grid {
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.music-album-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(189, 202, 228, 0.55);
    border-radius: 28px;
    padding: 1.35rem;
    box-shadow: 0 22px 48px rgba(15, 29, 71, 0.08);
}

.music-album-card--catalog {
    padding: 0.85rem;
}

.music-album-card--catalog.is-selected {
    border-color: rgba(41, 108, 232, 0.42);
    box-shadow: inset 0 0 0 1px rgba(41, 108, 232, 0.16), 0 22px 48px rgba(15, 29, 71, 0.1);
}

.music-album-card__catalog-link {
    display: grid;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.music-album-card__catalog-meta {
    display: grid;
    gap: 0.2rem;
}

.music-album-card__catalog-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1d2433;
}

.music-album-card__catalog-subtitle {
    margin: 0;
    color: #5c6987;
    font-size: 0.88rem;
}

.music-album-card__header,
.music-player-card__hero {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(120px, 180px) 1fr;
    align-items: start;
}

.music-album-card__cover,
.music-player-card__cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(230, 240, 255, 0.92), rgba(208, 225, 250, 0.7));
    border: 1px solid rgba(186, 204, 233, 0.6);
}

.music-album-card__cover--detail,
.music-player-card__cover {
    max-width: 320px;
}

.music-album-card__cover--placeholder,
.music-player-card__cover--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-primary);
}

.music-album-card__description {
    margin: 0.95rem 0 0;
    color: #5c6987;
}

.music-track-list,
.music-manage-track-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.music-track-row,
.music-manage-track {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(189, 202, 228, 0.45);
    border-radius: 22px;
    background: rgba(247, 249, 255, 0.92);
}

.music-track-row.is-active {
    border-color: rgba(41, 108, 232, 0.45);
    box-shadow: inset 0 0 0 1px rgba(41, 108, 232, 0.2);
}

.music-track-row__meta {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    min-width: 0;
}

.music-track-row__cover {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    background: linear-gradient(145deg, rgba(236, 244, 255, 0.96), rgba(216, 228, 247, 0.78));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex: 0 0 auto;
}

.music-player-card__audio {
    width: 100%;
    margin-top: 0.85rem;
}

.music-manage-card {
    padding: 1.1rem;
    border-radius: 26px;
    border: 1px solid rgba(189, 202, 228, 0.55);
    background: rgba(251, 252, 255, 0.98);
}

.music-library-detail-card {
    display: grid;
    gap: 1rem;
}

.music-manage-track--detail {
    align-items: stretch;
}

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

    .music-album-card__header,
    .music-player-card__hero {
        grid-template-columns: 1fr;
    }

    .music-track-row,
    .music-manage-track {
        flex-direction: column;
        align-items: stretch;
    }

    .music-album-card__cover--detail,
    .music-player-card__cover {
        max-width: min(100%, 420px);
        justify-self: center;
    }
}

@media (max-width: 640px) {
    .music-library-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .music-album-card--catalog {
        padding: 0.7rem;
    }

    .music-album-card__cover,
    .music-player-card__cover {
        border-radius: 20px;
    }

    .music-album-card__catalog-title {
        font-size: 0.94rem;
    }

    .music-album-card__catalog-subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .music-library-grid {
        grid-template-columns: 1fr;
    }

    .music-album-card__cover--detail,
    .music-player-card__cover {
        max-width: 100%;
        width: min(100%, 320px);
    }
}

.portal-whatsapp-help {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    display: grid;
    justify-items: end;
    gap: 0.75rem;
}

.portal-whatsapp-help[hidden],
.portal-whatsapp-help__panel[hidden] {
    display: none !important;
}

.portal-whatsapp-help__trigger {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    box-shadow: 0 18px 42px rgba(18, 140, 126, 0.28);
    min-height: 56px;
    padding: 0.9rem 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.portal-whatsapp-help__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
}

.portal-whatsapp-help__panel {
    width: min(360px, calc(100vw - 2rem));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem;
    display: grid;
    gap: 0.8rem;
}

.portal-whatsapp-help__panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.portal-whatsapp-help__panel-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.portal-whatsapp-help__close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.portal-whatsapp-help__panel textarea {
    min-height: 130px;
    resize: vertical;
}

.portal-whatsapp-help__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .portal-whatsapp-help {
        right: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        justify-items: stretch;
    }

    .portal-whatsapp-help__trigger {
        justify-content: center;
    }

    .portal-whatsapp-help__panel {
        width: 100%;
    }
}

.portal-tab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin: 1.5rem 0;
}

.portal-tab-strip__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    background: rgba(217, 225, 239, 0.7);
    color: #31415f;
    font-weight: 700;
    text-decoration: none;
}

.portal-tab-strip__tab.is-active {
    background: #2d74da;
    color: #fff;
}

.project-inline-editor {
    min-width: 15rem;
}

.project-inline-editor summary {
    list-style: none;
    cursor: pointer;
}

.project-inline-editor summary::-webkit-details-marker {
    display: none;
}

.project-inline-editor__form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.85rem;
    margin-top: 0.85rem;
    padding: 1rem;
    border: 1px solid rgba(45, 116, 218, 0.12);
    border-radius: 1rem;
    background: #f8fbff;
}

.project-inline-editor__form .full-span {
    grid-column: 1 / -1;
}

.project-inline-editor__form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: #24324d;
}

.project-inline-editor__form input,
.project-inline-editor__form select,
.project-inline-editor__form textarea {
    width: 100%;
}

.project-gantt {
    display: grid;
    gap: 1rem;
}

.project-gantt__range {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(4rem, 1fr));
    gap: 0.35rem;
    padding-left: 19rem;
    color: #60708f;
    font-size: 0.82rem;
    font-weight: 700;
}

.project-gantt__row {
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
}

.project-gantt__meta {
    display: grid;
    gap: 0.2rem;
}

.project-gantt__meta span {
    color: #60708f;
    font-size: 0.9rem;
}

.project-gantt__track {
    position: relative;
    min-height: 2.8rem;
    border-radius: 999px;
    background: rgba(226, 233, 245, 0.85);
    overflow: hidden;
}

.project-gantt__bar {
    position: absolute;
    top: 0.45rem;
    bottom: 0.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.85rem;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-gantt__bar.status-todo { background: #5f7fbf; }
.project-gantt__bar.status-in_progress { background: #2d74da; }
.project-gantt__bar.status-review { background: #8a5cff; }
.project-gantt__bar.status-done { background: #1a9a66; }
.project-gantt__bar.status-on_hold { background: #d27a00; }

.project-kanban {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 1rem;
}

.project-kanban__column {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    padding: 1rem;
    border-radius: 1.35rem;
    background: #f6f8fc;
    border: 1px solid rgba(45, 116, 218, 0.1);
}

.project-kanban__column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.project-kanban__column-header h3 {
    margin: 0;
}

.project-kanban__card {
    padding: 1rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 18px 45px rgba(30, 51, 96, 0.08);
    display: grid;
    gap: 0.5rem;
}

.project-kanban__card h4 {
    margin: 0;
    font-size: 1.1rem;
}

.pm-dashboard-shortcuts-card {
    position: relative;
    overflow: hidden;
    padding: 1.4rem 1.5rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 249, 253, 0.94));
}

.pm-dashboard-shortcuts-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 15rem;
    height: 15rem;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(14, 107, 92, 0.1), rgba(14, 107, 92, 0));
    transform: translate(28%, -38%);
    pointer-events: none;
}

.pm-dashboard-shortcuts {
    position: relative;
    z-index: 1;
    gap: 0.75rem;
}

.pm-dashboard-shortcuts__link.button.secondary {
    min-height: 3.4rem;
    padding: 0.95rem 1.35rem;
    border: 1px solid rgba(31, 41, 55, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(234, 240, 247, 0.92));
    color: #2b3954;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.pm-dashboard-shortcuts__link.button.secondary:hover,
.pm-dashboard-shortcuts__link.button.secondary:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(14, 107, 92, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(227, 239, 235, 0.96));
    color: #173c35;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 16px 28px rgba(14, 107, 92, 0.12);
    outline: none;
}

.pm-dashboard-shortcuts__link.button.secondary:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 8px 18px rgba(15, 23, 42, 0.08);
}

.empty-state.compact {
    padding: 1rem 0.75rem;
}

@media (max-width: 900px) {
    .project-gantt__range {
        padding-left: 0;
        grid-template-columns: repeat(auto-fit, minmax(3.5rem, 1fr));
    }

    .project-gantt__row {
        grid-template-columns: 1fr;
    }

    .pm-dashboard-shortcuts-card {
        padding: 1.15rem;
    }

    .pm-dashboard-shortcuts__link.button.secondary {
        width: 100%;
        justify-content: flex-start;
    }
}
