@font-face {
    font-display: swap;
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 800;
    src: url("/fonts/inter-latin.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Manrope";
    font-style: normal;
    font-weight: 500 800;
    src: url("/fonts/manrope-latin.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --background: #F8F7F2;
    --surface: #FFFFFF;
    --text-primary: #163D3A;
    --text-secondary: #55645E;
    --primary: #14665B;
    --primary-hover: #0F5148;
    --surface-soft: #E9F1E8;
    --highlight: #DCEC9A;
    --review: #B94F38;
    --border: #D6DED5;
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
    --soft: var(--background);
    --line: var(--border);
    --brand: var(--primary);
    --brand-dark: var(--primary-hover);
    --success: #14705F;
    --success-soft: #E1F0E8;
    --warning: #765B00;
    --warning-soft: #F5EDC9;
    --danger: #A63E35;
    --danger-soft: #F7E7E3;
    --shadow: 0 18px 48px rgba(22, 61, 58, .10);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
h1, h2, h3, .brand, .stat-card strong { font-family: "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.brand { align-items: center; color: inherit; display: inline-flex; font-size: 1.25rem; font-weight: 850; gap: 11px; text-decoration: none; }
.brand small { color: var(--muted); display: block; font-size: .65rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.brand-mark { align-items: center; background: linear-gradient(145deg, var(--brand), var(--brand-dark)); border-radius: 12px 12px 4px 12px; color: white; display: inline-flex; height: 40px; justify-content: center; transform: rotate(-3deg); width: 40px; }
.brand-light { color: white; }.brand-light small { color: #aaa3d0; }
.login-page { align-items: center; background: radial-gradient(circle at 10% 10%, #e9e4ff, transparent 32%), radial-gradient(circle at 90% 85%, #d7f5ee, transparent 30%), var(--soft); display: flex; min-height: 100vh; padding: 24px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); margin: auto; max-width: 470px; padding: 44px; width: 100%; }
.login-card .brand { margin-bottom: 50px; }.login-card h1 { font-size: 2.5rem; letter-spacing: -.055em; line-height: 1.06; margin: 0; }.login-card .muted { margin-bottom: 30px; }
.eyebrow { color: var(--brand); font-size: .72rem; font-weight: 850; letter-spacing: .13em; margin: 0 0 8px; text-transform: uppercase; }
.muted, .page-heading p, .dialog-header p, .media-copy, .teacher-card p { color: var(--muted); }
.field { color: var(--ink); display: grid; font-size: .83rem; font-weight: 720; gap: 7px; margin: 15px 0; }
.field input, .field select, .field textarea, .filters input, .filters select { background: var(--surface); border: 1px solid #c9c5d7; border-radius: 11px; color: var(--ink); min-height: 46px; padding: 10px 12px; width: 100%; }
.field textarea { resize: vertical; }.field small { color: var(--muted); font-size: .7rem; font-weight: 500; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(100,66,232,.25); outline-offset: 2px; }
.button { align-items: center; border: 1px solid transparent; border-radius: 11px; cursor: pointer; display: inline-flex; font-weight: 760; justify-content: center; min-height: 43px; padding: 9px 16px; text-decoration: none; }.button:disabled { cursor: wait; opacity: .55; }
.primary { background: var(--brand); color: white; }.secondary { background: white; border-color: var(--line); color: var(--brand-dark); }.full { width: 100%; }
.back-link { color: var(--brand); display: block; font-size: .82rem; font-weight: 700; margin-top: 25px; text-align: center; text-decoration: none; }
.error, .notice { background: var(--danger-soft); border-radius: 10px; color: var(--danger); font-size: .82rem; padding: 10px 12px; }
.error.success { background: var(--success-soft); color: var(--success); }
.notice.success { background: var(--success-soft); color: var(--success); }
.password-requirements { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 6px; grid-template-columns: 1fr 1fr; list-style: none; margin: -4px 0 15px; padding: 12px 14px; }
.password-requirements li { color: var(--muted); font-size: .75rem; font-weight: 650; }
.password-requirements li::before { content: "○"; display: inline-block; font-weight: 900; margin-right: 7px; }
.password-requirements li.valid { color: var(--success); }
.password-requirements li.valid::before { content: "✓"; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #201458, #17112f); color: white; display: flex; flex-direction: column; min-height: 100vh; padding: 25px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar nav { display: grid; gap: 7px; margin-top: 48px; }.nav-item { background: transparent; border: 0; border-radius: 11px; color: #c9c4e3; cursor: pointer; font-weight: 720; padding: 12px 14px; text-align: left; }.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.1); color: white; }
.sidebar-account { border-top: 1px solid rgba(255,255,255,.14); display: grid; margin-top: auto; padding: 19px 8px 0; }.sidebar-account span { color: #aaa3ca; font-size: .75rem; }.text-button { background: none; border: 0; color: #bcaeff; cursor: pointer; margin-top: 8px; padding: 0; text-align: left; }
.workspace { min-width: 0; }.topbar { align-items: center; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; height: 72px; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 15; backdrop-filter: blur(12px); }.topbar > div { display: grid; }.topbar span { color: var(--muted); font-size: .73rem; }.menu-button { background: none; border: 0; display: none; font-size: 1.3rem; }
.content { margin: 0 auto; max-width: 1460px; padding: 38px; }.page-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 28px; }.page-heading h1 { font-size: 2.35rem; letter-spacing: -.045em; margin: 0; }.page-heading p { margin: 6px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.filters { align-items: end; display: grid; gap: 13px; grid-template-columns: minmax(140px, .8fr) minmax(160px, 1fr) minmax(230px, 1.7fr) auto; padding: 18px; }.filters label { display: grid; font-size: .75rem; font-weight: 750; gap: 6px; }
.family-filters { grid-template-columns: minmax(180px, .8fr) minmax(280px, 2fr) auto; }
.notebook-filters { grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) auto; }
.stats-grid { display: grid; gap: 14px; grid-template-columns: repeat(3,1fr); margin: 17px 0; }.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; display: grid; padding: 18px; }.stat-card span { color: var(--muted); font-size: .75rem; }.stat-card strong { font-size: 1.75rem; }
.table-card { overflow: hidden; }.table-wrap { overflow-x: auto; }table { border-collapse: collapse; width: 100%; }th, td { border-bottom: 1px solid var(--line); padding: 14px 16px; text-align: left; vertical-align: middle; }th { color: var(--muted); font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; }td { font-size: .85rem; }td strong, td small { display: block; }td small { color: var(--muted); }.row-title { max-width: 430px; }.empty-row { color: var(--muted); padding: 45px; text-align: center; }
.pill { border-radius: 999px; display: inline-flex; font-size: .68rem; font-weight: 800; padding: 5px 9px; }.pill.ready { background: var(--success-soft); color: var(--success); }.pill.pending { background: var(--warning-soft); color: var(--warning); }.pill.draft { background: #ece9ff; color: var(--brand); }
.pill.notebook-pendingreview { background: var(--warning-soft); color: var(--warning); }
.pill.notebook-approved { background: var(--success-soft); color: var(--success); }
.pill.notebook-revisionrequired { background: var(--danger-soft); color: var(--danger); }
.media-meter { align-items: center; display: flex; gap: 8px; }.meter { background: var(--line); border-radius: 999px; height: 7px; overflow: hidden; width: 70px; }.meter i { background: var(--brand); display: block; height: 100%; }
.meter .media-fill-0 { width: 0; }.meter .media-fill-1 { width: 25%; }.meter .media-fill-2 { width: 50%; }.meter .media-fill-3 { width: 75%; }.meter .media-fill-4 { width: 100%; }
.pagination { align-items: center; display: flex; justify-content: space-between; padding: 15px; }.pagination span { color: var(--muted); font-size: .78rem; }
.cards-list { display: grid; gap: 14px; }.teacher-card { align-items: center; background: white; border: 1px solid var(--line); border-radius: 16px; display: flex; gap: 18px; justify-content: space-between; padding: 20px; }.teacher-card > div { flex: 1; }.teacher-card h3 { margin: 0; }.teacher-card p { font-size: .78rem; margin: 5px 0; }.subject-tags { display: flex; flex-wrap: wrap; gap: 6px; }.subject-tags span { background: var(--soft); border-radius: 999px; font-size: .68rem; padding: 4px 8px; }
.student-tags { display: flex; flex-wrap: wrap; gap: 7px; min-width: 220px; }.student-tags > span { background: var(--soft); border: 1px solid var(--line); border-radius: 10px; display: grid; padding: 7px 9px; }.student-tags strong { font-size: .76rem; }.student-tags small { font-size: .66rem; }
.family-identity { background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }.family-identity dl, .student-registration dl { display: grid; gap: 15px; grid-template-columns: 1fr 1fr; margin: 0; }.family-identity dl > div, .student-registration dl > div { min-width: 0; }.family-identity dt, .student-registration dt { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.family-identity dd, .student-registration dd { font-size: .82rem; font-weight: 700; margin: 4px 0 0; }.family-identity a { color: var(--brand); }.family-students { margin-top: 28px; }.student-registration-list { display: grid; gap: 10px; margin-top: 14px; }.student-registration { border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 16px; grid-template-columns: minmax(160px, .7fr) 1.3fr; padding: 16px; }.student-registration > div { display: grid; }.student-registration > div span { color: var(--muted); font-size: .75rem; }.technical-id { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }.empty-detail { background: var(--soft); border-radius: 12px; color: var(--muted); padding: 18px; }
.editor-dialog { background: transparent; border: 0; height: 100%; margin: 0 0 0 auto; max-height: none; max-width: 950px; padding: 0; width: min(950px, 100%); }.editor-dialog::backdrop { background: rgba(17,12,44,.58); backdrop-filter: blur(3px); }.dialog-panel { background: var(--surface); box-shadow: var(--shadow); min-height: 100%; padding: 30px; }.compact-dialog { max-width: 680px; }.dialog-header { align-items: flex-start; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 22px; padding-bottom: 18px; }.dialog-header h2 { font-size: 1.8rem; letter-spacing: -.035em; margin: 0; }.dialog-header p { margin: 5px 0 0; }.icon-button { background: var(--soft); border: 0; border-radius: 999px; cursor: pointer; font-size: 1.3rem; height: 38px; width: 38px; }
.notebook-dialog { max-width: 1120px; width: min(1120px, 100%); }
.notebook-review-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
.notebook-photo-panel { align-items: center; background: #efedf5; border: 1px solid var(--line); border-radius: 16px; display: flex; justify-content: center; min-height: 430px; overflow: hidden; }
.notebook-photo-panel img { display: block; height: auto; max-height: 72vh; max-width: 100%; object-fit: contain; width: 100%; }
.photo-loading { color: var(--muted); padding: 24px; text-align: center; }
.score-fieldset { margin-top: 0; }
.score-options { display: grid; gap: 8px; grid-template-columns: repeat(6, 1fr); }
.score-options label { cursor: pointer; }
.score-options input { opacity: 0; position: absolute; pointer-events: none; }
.score-options span { align-items: center; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; display: flex; font-size: .9rem; font-weight: 850; height: 42px; justify-content: center; }
.score-options input:checked + span { background: var(--brand); border-color: var(--brand); color: white; }
.score-options input:focus-visible + span { outline: 3px solid rgba(100,66,232,.25); outline-offset: 2px; }
.score-options input:disabled + span { cursor: default; opacity: .65; }
.score-guidance { background: var(--soft); border-radius: 11px; color: var(--muted); font-size: .76rem; line-height: 1.55; padding: 11px 13px; }
.editor-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }.span-2 { grid-column: span 2; }.toggle { align-items: center; display: flex; font-weight: 700; gap: 9px; margin: 12px 0; }.toggle input { height: 19px; width: 19px; }.dialog-actions { border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 18px; }
.media-section { border-top: 7px solid var(--soft); margin: 34px -30px -30px; padding: 30px; }.section-title { align-items: center; display: flex; justify-content: space-between; }.section-title h3 { font-size: 1.4rem; margin: 0; }.progress-badge { background: var(--brand-dark); border-radius: 999px; color: white; font-size: .78rem; font-weight: 800; padding: 7px 12px; }
.media-grid { display: grid; gap: 14px; margin-top: 18px; }.media-card { border: 1px solid var(--line); border-radius: 15px; padding: 18px; }.media-card-head { align-items: center; display: flex; justify-content: space-between; }.media-card h4 { margin: 0; }.media-form-grid { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }.media-card .dialog-actions { margin-top: 10px; padding-top: 12px; }.media-current { background: var(--soft); border-radius: 9px; color: var(--muted); display: block; font-size: .72rem; margin-top: 10px; overflow-wrap: anywhere; padding: 8px 10px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 20px 0; padding: 15px; }legend { font-size: .82rem; font-weight: 750; padding: 0 5px; }.checkbox-grid { display: grid; gap: 9px; grid-template-columns: 1fr 1fr; }.checkbox-item { align-items: center; display: flex; font-size: .8rem; gap: 7px; }.checkbox-item input { height: 18px; width: 18px; }
.toast { background: var(--ink); border-radius: 11px; bottom: 24px; box-shadow: var(--shadow); color: white; left: 50%; max-width: calc(100% - 30px); padding: 11px 17px; position: fixed; transform: translateX(-50%); z-index: 100; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; }.sidebar { display: none; left: 0; position: fixed; width: 250px; z-index: 40; }.sidebar.open { display: flex; }.menu-button { display: block; }.topbar { padding: 0 16px; }.content { padding: 25px 18px; }.filters { grid-template-columns: 1fr 1fr; }.search-field { grid-column: span 2; }.stats-grid { grid-template-columns: 1fr; }.editor-dialog { width: 100%; }.page-heading { align-items: flex-start; flex-direction: column; gap: 16px; }.notebook-review-layout { grid-template-columns: 1fr; }.notebook-photo-panel { min-height: 280px; } }
@media (max-width: 560px) { .login-card { padding: 30px 22px; }.login-card h1 { font-size: 2rem; }.filters, .editor-grid, .media-form-grid, .checkbox-grid, .student-registration, .family-identity dl, .student-registration dl, .password-requirements { grid-template-columns: 1fr; }.search-field, .span-2 { grid-column: span 1; }.dialog-panel { padding: 22px 17px; }.media-section { margin: 28px -17px -22px; padding: 22px 17px; }.topbar .secondary { display: none; }.teacher-card { align-items: flex-start; flex-direction: column; } }
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; --ink: #f2effa; --muted: #aca8bc; --surface: #171522; --soft: #11101a; --line: #353143; --brand: #927cff; --brand-dark: #d8d0ff; --success-soft: #163d37; --success: #73dac4; --warning-soft: #3a2b15; --warning: #ffc472; --danger-soft: #442029; --danger: #ff9aae; }.topbar { background: rgba(23,21,34,.92); }.secondary, .teacher-card { background: var(--surface); }.login-page { background: var(--soft); }.progress-badge { background: var(--brand); } }

/* Shared visual language with the student experience. */
:root {
    --sky: #176fc1;
    --sky-soft: #e3f2ff;
    --coral: #c8425a;
    --coral-soft: #ffe7ec;
    --admin-card-shadow: 0 10px 30px rgba(40, 27, 88, .075);
}
::selection { background: #e8e2ff; color: #27145e; }
.login-page {
    background:
        radial-gradient(circle at 8% 10%, rgba(107, 75, 234, .2), transparent 32rem),
        radial-gradient(circle at 90% 85%, rgba(18, 153, 133, .17), transparent 31rem),
        var(--soft);
}
.login-card {
    background: radial-gradient(circle at 100% 0, var(--sky-soft), transparent 14rem), var(--surface);
    border-top: 5px solid var(--brand);
}
.brand-mark { background: linear-gradient(145deg, #795cff, var(--brand) 52%, #35218c); box-shadow: 0 7px 18px rgba(95,63,230,.3); }
.primary { background: linear-gradient(135deg, #7154f5, var(--brand) 60%, #4929be); box-shadow: 0 8px 20px rgba(100,66,232,.2); }
.secondary:hover { background: #eeeaff; border-color: rgba(100,66,232,.35); }
.sidebar {
    background:
        radial-gradient(circle at 15% 4%, rgba(125, 98, 255, .37), transparent 18rem),
        radial-gradient(circle at 100% 82%, rgba(38, 173, 146, .22), transparent 18rem),
        linear-gradient(180deg, #21165d, #17112f 62%, #102b32);
}
.nav-item { border-left: 3px solid transparent; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.12); border-left-color: #8ce7d2; transform: translateX(2px); }
.topbar { box-shadow: 0 5px 20px rgba(38,25,85,.05); }
.topbar::after { background: linear-gradient(90deg, var(--brand), var(--sky), var(--success), var(--warning)); bottom: -1px; content: ""; height: 2px; left: 0; opacity: .65; position: absolute; right: 0; }
.content {
    background:
        radial-gradient(circle at 96% 5%, rgba(23,111,193,.07), transparent 28rem),
        radial-gradient(circle at 4% 36%, rgba(100,66,232,.07), transparent 25rem);
    min-height: calc(100vh - 72px);
}
.page-heading h1 { background: linear-gradient(95deg, var(--ink), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card, .stat-card, .teacher-card { border-color: rgba(116, 101, 157, .2); box-shadow: var(--admin-card-shadow); }
.filters { background: linear-gradient(110deg, var(--surface), #f8f6ff); border-left: 4px solid var(--brand); }
.stat-card { border-top: 4px solid var(--brand); position: relative; }
.stat-card:nth-child(2) { border-top-color: var(--sky); }
.stat-card:nth-child(3) { border-top-color: var(--success); }
.stat-card:nth-child(2) strong { color: var(--sky); }
.stat-card:nth-child(3) strong { color: var(--success); }
th { background: linear-gradient(180deg, #faf9fd, #f4f1fa); }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: #faf8ff; }
.meter i { background: linear-gradient(90deg, var(--brand), var(--sky), var(--success)); }
.teacher-card { border-left: 4px solid var(--sky); }
.student-registration { background: linear-gradient(105deg, var(--surface), var(--sky-soft)); }
.family-identity { background: linear-gradient(105deg, #f4f0ff, var(--surface)); border-left: 4px solid var(--brand); }
.editor-dialog::backdrop { background: rgba(17,12,44,.66); backdrop-filter: blur(6px); }
.dialog-panel { background: radial-gradient(circle at 100% 0, rgba(23,111,193,.07), transparent 24rem), var(--surface); }
.media-card:nth-child(4n+1) { border-left: 4px solid var(--brand); }
.media-card:nth-child(4n+2) { border-left: 4px solid var(--sky); }
.media-card:nth-child(4n+3) { border-left: 4px solid var(--success); }
.media-card:nth-child(4n+4) { border-left: 4px solid var(--coral); }
.notebook-photo-panel {
    background-color: #f1eff7;
    background-image: linear-gradient(45deg, #e8e5f0 25%, transparent 25%), linear-gradient(-45deg, #e8e5f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e8e5f0 75%), linear-gradient(-45deg, transparent 75%, #e8e5f0 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}
.score-options span { transition: transform .14s ease, background .14s ease; }
.score-options label:hover span { border-color: var(--brand); transform: translateY(-1px); }
.score-options input:checked + span { background: linear-gradient(135deg, var(--brand), #4a2abd); box-shadow: 0 6px 15px rgba(100,66,232,.23); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }
@media (prefers-color-scheme: dark) {
    :root { --sky: #78baff; --sky-soft: #173149; --coral: #ff9cad; --coral-soft: #42212a; --admin-card-shadow: 0 12px 30px rgba(0,0,0,.22); }
    .login-card, .filters, .dialog-panel { background: var(--surface); }
    .content { background-color: var(--soft); }
    .page-heading h1 { background: none; color: var(--ink); }
    .secondary:hover { background: #2c2743; }
    th { background: #211e2d; }
    tbody tr:hover { background: #201d2d; }
    .student-registration { background: linear-gradient(105deg, var(--surface), var(--sky-soft)); }
    .family-identity { background: linear-gradient(105deg, #292343, var(--surface)); }
    .notebook-photo-panel { background-color: #24212f; background-image: none; }
}

/* Reference-aligned editorial workspace. */
:root {
    color-scheme: light;
    --background: #F8F7F2;
    --surface: #FFFFFF;
    --text-primary: #163D3A;
    --text-secondary: #55645E;
    --primary: #14665B;
    --primary-hover: #0F5148;
    --surface-soft: #E9F1E8;
    --highlight: #DCEC9A;
    --review: #B94F38;
    --border: #D6DED5;
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
    --soft: var(--background);
    --line: var(--border);
    --brand: var(--primary);
    --brand-dark: var(--primary-hover);
    --success: #14705F;
    --success-soft: #E1F0E8;
    --warning: #765B00;
    --warning-soft: #F5EDC9;
    --danger: #A63E35;
    --danger-soft: #F7E7E3;
    --sky: #2D6772;
    --sky-soft: #E5F0F0;
    --coral: var(--review);
    --coral-soft: #F7E7E3;
    --shadow: 0 18px 48px rgba(22, 61, 58, .10);
    --admin-card-shadow: 0 7px 22px rgba(22, 61, 58, .06);
}

body {
    background: var(--background);
    color: var(--text-primary);
}

::selection {
    background: var(--highlight);
    color: var(--text-primary);
}

.brand {
    color: var(--text-primary);
    gap: 10px;
}

.brand-logo {
    display: block;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    width: 136px;
}

.brand small,
.brand-light small {
    color: var(--text-secondary);
    display: block;
}

.login-page {
    background: var(--background);
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 5px solid var(--primary);
    box-shadow: var(--shadow);
}

.primary {
    background: var(--primary);
    box-shadow: none;
    color: #FFFFFF;
}

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

.secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--primary-hover);
}

.secondary:hover {
    background: var(--surface-soft);
    border-color: #AFC4B5;
}

.field input,
.field select,
.field textarea,
.filters input,
.filters select {
    border-color: #AEBBB5;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.score-options input:focus-visible + span {
    outline: 3px solid #86AA45;
    outline-offset: 3px;
}

.admin-shell {
    background: var(--background);
}

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    color: var(--text-primary);
}

.nav-item {
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.nav-item.active,
.nav-item:hover {
    background: var(--surface-soft);
    border-left-color: var(--primary);
    color: var(--primary-hover);
    transform: none;
}

.sidebar-account {
    border-top-color: var(--border);
}

.sidebar-account span {
    color: var(--text-secondary);
}

.text-button {
    color: var(--primary);
}

.topbar {
    background: rgba(248, 247, 242, .96);
    border-bottom-color: var(--border);
    box-shadow: none;
}

.topbar::after {
    display: none;
}

.content {
    background: var(--background);
}

.page-heading h1 {
    background: none;
    color: var(--text-primary);
}

.card,
.stat-card,
.teacher-card {
    border-color: var(--border);
    box-shadow: var(--admin-card-shadow);
}

.filters {
    background: var(--surface);
    border-left: 4px solid var(--primary);
}

.stat-card {
    border-top: 4px solid var(--primary);
}

.stat-card:nth-child(2) {
    border-top-color: #7C9636;
}

.stat-card:nth-child(3) {
    border-top-color: var(--success);
}

.stat-card:nth-child(2) strong {
    color: #5D731F;
}

.stat-card:nth-child(3) strong {
    color: var(--success);
}

th {
    background: #F1F4EF;
}

tbody tr:hover {
    background: #F5F8F3;
}

.meter i {
    background: var(--primary);
}

.teacher-card {
    background: var(--surface);
    border-left: 4px solid var(--primary);
}

.student-registration,
.family-identity {
    background: var(--surface-soft);
}

.family-identity {
    border-left: 4px solid var(--primary);
}

.editor-dialog::backdrop {
    background: rgba(13, 45, 42, .62);
}

.dialog-panel {
    background: var(--surface);
}

.icon-button {
    color: var(--primary-hover);
    font-size: .78rem;
    font-weight: 750;
    min-width: 58px;
    padding: 0 10px;
    width: auto;
}

.media-card:nth-child(4n+1) {
    border-left-color: var(--primary);
}

.media-card:nth-child(4n+2) {
    border-left-color: #5D7A82;
}

.media-card:nth-child(4n+3) {
    border-left-color: var(--success);
}

.media-card:nth-child(4n+4) {
    border-left-color: var(--review);
}

.notebook-photo-panel {
    background: var(--surface-soft);
}

.score-options label:hover span {
    border-color: var(--primary);
    transform: none;
}

.score-options input:checked + span {
    background: var(--primary);
    box-shadow: none;
}

.progress-badge {
    background: var(--primary-hover);
}

.menu-button {
    color: var(--primary-hover);
    font-size: .78rem;
    font-weight: 750;
    min-height: 44px;
    padding-inline: 12px;
    width: auto;
}

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

.planning-builder {
    border-left: 4px solid var(--primary);
    padding: 22px;
}

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

.planning-fields .field {
    margin: 7px 0;
}

.planning-fields .span-2 {
    grid-column: span 2;
}

.planning-fields .span-3 {
    grid-column: span 3;
}

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

.planning-actions p {
    color: var(--text-secondary);
    font-size: .78rem;
    margin: 0;
    max-width: 680px;
}

.planning-list-card {
    margin-top: 20px;
}

.planning-list-heading {
    padding: 20px 22px 16px;
}

.planning-list-heading h2 {
    font-size: 1.35rem;
    margin: 0;
}

.planning-note {
    color: var(--text-secondary);
    max-width: 340px;
    white-space: normal;
}

.notebook-dialog {
    max-width: 1280px;
    width: min(1280px, 100%);
}

.notebook-prompt-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    margin-bottom: 22px;
    padding: 17px 19px;
}

.notebook-prompt-card h3 {
    font-size: 1rem;
    margin: 0 0 7px;
}

.notebook-prompt-card > p:last-child {
    margin: 0;
    white-space: pre-wrap;
}

.notebook-photo-section {
    min-width: 0;
}

.photo-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 9px;
}

.photo-toolbar .button {
    min-height: 38px;
    padding: 6px 11px;
}

.photo-toolbar output {
    color: var(--text-secondary);
    font-size: .76rem;
    font-weight: 800;
    min-width: 48px;
    text-align: center;
}

.notebook-photo-panel {
    align-items: flex-start;
    height: min(68vh, 760px);
    justify-content: flex-start;
    overflow: auto;
    position: relative;
}

.notebook-photo-panel img {
    flex: 0 0 auto;
    height: auto;
    max-height: none;
    transition: width .12s ease;
}

.notebook-photo-panel:fullscreen {
    background: #111815;
    border: 0;
    border-radius: 0;
    height: 100vh;
    padding: 18px;
    width: 100vw;
}

.ai-review-panel {
    background: #F4F7EC;
    border: 1px solid #CAD8B0;
    border-radius: 14px;
    margin-bottom: 20px;
    padding: 17px;
}

.ai-review-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 13px;
}

.ai-review-heading h3 {
    font-size: 1.1rem;
    margin: 0;
}

.ai-badge {
    background: var(--highlight);
    border-radius: 999px;
    color: var(--text-primary);
    font-size: .62rem;
    font-weight: 800;
    padding: 5px 8px;
    text-align: center;
}

.ai-score {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
}

.ai-score strong {
    color: var(--primary-hover);
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 1.18rem;
}

.ai-score span,
.ai-review-panel p {
    color: var(--text-secondary);
    font-size: .77rem;
}

.ai-warning,
.ai-caution,
.ai-accepted,
.ai-use-status {
    border-radius: 9px;
    margin: 11px 0;
    padding: 9px 11px;
}

.ai-warning {
    background: var(--warning-soft);
    color: var(--warning) !important;
}

.ai-caution {
    background: var(--surface);
}

.ai-accepted,
.ai-use-status {
    background: var(--success-soft);
    color: var(--success);
    font-size: .77rem;
}

.ai-details {
    border-top: 1px solid #CAD8B0;
    margin: 13px 0;
    padding-top: 11px;
}

.ai-details summary {
    cursor: pointer;
    font-size: .78rem;
    font-weight: 800;
}

.ai-details h4 {
    font-size: .72rem;
    margin: 12px 0 3px;
}

.ai-details p {
    margin: 0;
    white-space: pre-wrap;
}

.ai-loading::before {
    content: "◌";
    display: inline-block;
    margin-right: 7px;
}

@media (max-width: 900px) {
    .planning-fields {
        grid-template-columns: 1fr 1fr;
    }

    .planning-fields .span-3 {
        grid-column: span 2;
    }

    .notebook-photo-panel {
        height: 58vh;
    }
}

@media (max-width: 560px) {
    .planning-fields {
        grid-template-columns: 1fr;
    }

    .planning-fields .span-2,
    .planning-fields .span-3 {
        grid-column: span 1;
    }

    .planning-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-review-heading {
        flex-direction: column;
    }
}
