:root {
    --ink: #2d261f;
    --muted: #756b61;
    --line: #e5ddd3;
    --surface: #ffffff;
    --canvas: #f8f4ee;
    --soft: #f2eadf;
    --green: #4f6f3a;
    --green-2: #668b4b;
    --admin: #985122;
    --admin-dark: #713816;
    --admin-soft: #faeadb;
    --teacher: #4f6f3a;
    --student: #b7661e;
    --parent: #76516e;
    --danger: #a52136;
    --warning: #9a6414;
    --success: #17734a;
    --shadow: 0 18px 55px rgba(67, 45, 28, 0.11);
    --radius: 20px;
    --radius-sm: 12px;
    --sidebar-width: 272px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
.icon { width: 21px; height: 21px; flex: 0 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 3px solid rgba(33, 101, 168, .32); outline-offset: 2px; }

/* Авторизация */
.auth-page { background: #f3eee7; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr); }
.auth-intro { min-height: 100%; padding: clamp(28px, 5vw, 72px); color: #fff; background: radial-gradient(circle at 82% 18%, rgba(220, 151, 75, .28), transparent 25%), linear-gradient(145deg, #263921, #405c31 55%, #74401f); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-intro::after { content: ""; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; position: absolute; right: -180px; bottom: -190px; box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025); }
.auth-brand, .brand { display: flex; align-items: center; gap: 13px; }
.auth-brand { position: relative; z-index: 1; }
.auth-brand strong, .auth-brand small, .brand strong, .brand small { display: block; }
.auth-brand strong { font-size: 18px; }
.auth-brand small { opacity: .7; margin-top: 2px; }
.brand-mark, .login-mobile-logo { width: 46px; height: 46px; display: grid; place-items: center; background: #fff; color: var(--green); border-radius: 14px; font-size: 22px; font-weight: 850; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.auth-message { max-width: 720px; position: relative; z-index: 1; padding: 80px 0; }
.auth-kicker { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); font-size: 13px; font-weight: 750; letter-spacing: .08em; }
.auth-message h1 { margin: 22px 0 20px; font-size: clamp(46px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; }
.auth-message p { max-width: 600px; margin-bottom: 0; color: rgba(255,255,255,.75); font-size: clamp(17px, 2vw, 20px); line-height: 1.6; }
.role-palette { display: flex; flex-wrap: wrap; gap: 9px; position: relative; z-index: 1; }
.role-color { padding: 8px 11px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 12px; font-weight: 700; }
.role-color::before { content: ""; width: 8px; height: 8px; display: inline-block; margin-right: 7px; border-radius: 50%; background: currentColor; }
.role-color-admin { color: #ffb5ce; }.role-color-teacher { color: #93e3bb; }.role-color-student { color: #9eceff; }.role-color-parent { color: #d8b5ff; }
.auth-panel { display: grid; place-items: center; padding: clamp(22px, 5vw, 80px); }
.login-card { width: min(100%, 500px); padding: clamp(26px, 4vw, 44px); background: #fff; border: 1px solid rgba(30,65,47,.08); border-radius: 28px; box-shadow: var(--shadow); }
.login-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.login-mobile-logo { display: none; background: var(--green); color: #fff; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--admin); font-size: 11px; font-weight: 850; letter-spacing: .12em; line-height: 1.25; text-transform: uppercase; }
.login-card .eyebrow { color: var(--green); }
.login-card h1, .login-card h2 { margin-bottom: 8px; font-size: clamp(27px, 4vw, 36px); letter-spacing: -.035em; }
.muted { color: var(--muted); line-height: 1.55; }
.stack-form { display: grid; gap: 18px; margin-top: 28px; }
.field { display: grid; gap: 7px; align-content: start; }
.field > span:first-child, .field > label:first-child { font-size: 13px; font-weight: 750; color: #39433f; }
.field small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.field input, .field select, .field textarea, .filter-bar input, .filter-bar select, .search-field input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #ccd7d1; border-radius: 11px; transition: border .16s, box-shadow .16s; }
.field textarea { min-height: 86px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(143,33,71,.10); outline: 0; }
.password-field { display: flex; align-items: stretch; border: 1px solid #ccd7d1; border-radius: 11px; overflow: hidden; background: #fff; }
.password-field:focus-within { border-color: var(--admin); box-shadow: 0 0 0 3px rgba(143,33,71,.10); }
.auth-page .password-field:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7,80,50,.10); }
.password-field input { min-width: 0; border: 0 !important; box-shadow: none !important; border-radius: 0; }
.password-field button { border: 0; padding: 0 12px; color: var(--green); background: #fff; cursor: pointer; font-size: 12px; font-weight: 800; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 11px; text-decoration: none; font-weight: 780; cursor: pointer; transition: transform .15s, background .15s, border .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--admin); box-shadow: 0 9px 23px rgba(143,33,71,.17); }
.auth-page .button-primary { background: var(--green); box-shadow: 0 9px 23px rgba(7,80,50,.17); }
.button-primary:hover { background: var(--admin-dark); }
.auth-page .button-primary:hover { background: #043e26; }
.button-secondary { color: var(--admin); background: var(--admin-soft); border-color: #ebcbd7; }
.button-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.button-danger { color: #9b1d35; background: #fff0f3; border-color: #efc0ca; }
.button-danger:hover { color: #fff; background: #a62039; border-color: #a62039; }
.button-wide { width: 100%; min-height: 49px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; }
.first-run { display: grid; gap: 4px; margin-top: 28px; padding: 16px; background: var(--soft); border-radius: 13px; font-size: 13px; }
.first-run span { color: var(--muted); }.first-run a { color: var(--green); font-weight: 800; margin-top: 5px; }
.alert { margin: 16px 0; padding: 13px 15px; border: 1px solid; border-radius: 12px; line-height: 1.5; }
.alert ul { margin: 0; padding-left: 20px; }.alert-error { color: #7f172b; background: #fff0f3; border-color: #f0bcc7; }.alert-success { color: #115f3c; background: #edf9f3; border-color: #bce5cf; }.alert-warning { color: #72520c; background: #fff8df; border-color: #efd98a; }
.simple-auth { padding: 30px 16px; }.setup-wrap { width: min(100%, 760px); margin: 0 auto; }.setup-card { width: 100%; max-width: none; }.back-link { display: inline-block; margin: 0 0 18px; color: var(--green); font-weight: 750; text-decoration: none; }

/* Выбор роли */
.role-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at top left, #fff, transparent 35%), #f2f5f3; }
.role-wrap { width: min(100%, 900px); }.role-heading { max-width: 650px; margin-bottom: 28px; }.role-heading h1 { margin-bottom: 10px; font-size: clamp(32px, 5vw, 50px); letter-spacing: -.045em; }.role-heading p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.role-card { --role-color: var(--ink); width: 100%; display: flex; align-items: center; gap: 15px; padding: 22px; color: var(--ink); text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 30px rgba(22,38,30,.06); cursor: pointer; transition: transform .15s, box-shadow .15s, border .15s; }
.role-card:hover { transform: translateY(-3px); border-color: var(--role-color); box-shadow: 0 18px 40px rgba(22,38,30,.11); }.role-card-admin { --role-color: var(--admin); }.role-card-teacher { --role-color: var(--teacher); }.role-card-student { --role-color: var(--student); }.role-card-parent { --role-color: var(--parent); }
.role-card-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--role-color, var(--admin)); border-radius: 14px; }.role-card-copy { min-width: 0; flex: 1; }.role-card-copy strong, .role-card-copy small { display: block; }.role-card-copy strong { margin-bottom: 5px; font-size: 18px; }.role-card-copy small { color: var(--muted); line-height: 1.4; }
.role-logout { margin-top: 24px; }.text-button { display: inline-flex; gap: 8px; align-items: center; padding: 8px 0; color: var(--muted); background: transparent; border: 0; cursor: pointer; }.text-button .icon { width: 18px; }
.pending-card { --role-color: var(--teacher); width: min(100%, 580px); padding: 42px; background: #fff; border-radius: 24px; box-shadow: var(--shadow); }.role-theme-student .pending-card { --role-color: var(--student); }.role-theme-parent .pending-card { --role-color: var(--parent); }.pending-card h1 { font-size: 38px; }.pending-card p { color: var(--muted); line-height: 1.6; }.pending-card .role-card-icon { margin-bottom: 24px; }

/* Каркас администратора */
.app-shell { --role-color: var(--admin); }
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column; padding: 22px 16px; color: #fffaf5; background: linear-gradient(180deg, #603417, #3d2516); box-shadow: 12px 0 35px rgba(61,37,22,.13); }
.brand { padding: 2px 10px 24px; }.brand .brand-mark { width: 42px; height: 42px; color: var(--admin); border-radius: 12px; }.brand strong { font-size: 15px; }.brand small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: 11px; }
.sidebar-nav { display: grid; gap: 4px; overflow-y: auto; padding-right: 2px; }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: rgba(255,255,255,.67); background: transparent; border: 0; border-radius: 11px; text-decoration: none; text-align: left; font-weight: 670; cursor: pointer; }.nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }.nav-link.is-active { color: #fff; background: var(--admin); box-shadow: 0 9px 24px rgba(143,33,71,.3); }.nav-link.is-disabled { opacity: .46; cursor: default; }.nav-link .icon { width: 19px; height: 19px; }.nav-soon { margin-left: auto; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-footer { display: grid; gap: 8px; margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.08); }.sidebar-footer form { margin: 0; }.nav-logout { width: 100%; }.role-switch { display: flex; align-items: center; gap: 10px; padding: 10px; color: #fff; border-radius: 11px; text-decoration: none; }.role-switch:hover { background: rgba(255,255,255,.07); }.role-switch > span { min-width: 0; flex: 1; }.role-switch small, .role-switch strong { display: block; }.role-switch small { color: rgba(255,255,255,.48); font-size: 10px; }.role-switch strong { margin-top: 2px; font-size: 13px; }.role-switch > .icon:last-child { width: 15px; }
.app-main { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { height: 72px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 0 clamp(20px, 3vw, 42px); background: rgba(244,247,245,.92); border-bottom: 1px solid rgba(210,220,214,.8); backdrop-filter: blur(13px); }.topbar-title { min-width: 0; flex: 1; }.topbar-title small, .topbar-title strong { display: block; }.topbar-title small { color: var(--muted); font-size: 11px; }.topbar-title strong { margin-top: 2px; font-size: 16px; }.topbar-user { display: flex; align-items: center; gap: 9px; }.role-dot { width: 8px; height: 8px; background: var(--admin); border-radius: 50%; }.topbar-name { font-size: 13px; font-weight: 700; }.avatar, .table-avatar { display: grid; place-items: center; color: #fff; background: var(--admin); font-weight: 800; border-radius: 11px; }.avatar { width: 37px; height: 37px; font-size: 12px; }.icon-button { width: 42px; height: 42px; display: none; place-items: center; padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.page-content { width: min(100%, 1540px); margin: 0 auto; padding: clamp(24px, 3vw, 42px); padding-bottom: 80px; }
.page-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }.page-hero > div:first-child { max-width: 780px; }.page-hero h1 { margin-bottom: 9px; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; }.page-hero p { margin-bottom: 0; color: var(--muted); line-height: 1.6; }.compact-hero { align-items: center; }.year-pill { min-width: 210px; display: flex; align-items: center; gap: 11px; padding: 13px 16px; color: var(--admin); background: var(--admin-soft); border: 1px solid #eccfda; border-radius: 14px; }.year-pill .icon { width: 24px; height: 24px; }.year-pill small, .year-pill strong { display: block; }.year-pill small { color: #805164; font-size: 10px; }.year-pill strong { margin-top: 2px; }.year-pill.is-empty { color: var(--muted); background: #fff; border-color: var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }.stat-card { display: flex; align-items: center; gap: 13px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: 0 6px 20px rgba(31,46,39,.035); }.stat-icon, .quick-icon { display: grid; place-items: center; color: var(--admin); background: var(--admin-soft); border-radius: 11px; }.stat-icon { width: 44px; height: 44px; }.stat-card strong, .stat-card small { display: block; }.stat-card strong { font-size: 25px; letter-spacing: -.03em; }.stat-card small { color: var(--muted); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(30,43,36,.045); }.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .7fr); gap: 20px; }.setup-panel, .quick-panel, .user-form-panel, .users-list-panel { padding: clamp(19px, 2.4vw, 28px); }.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }.panel-heading h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.025em; }.progress-number { color: var(--admin); font-size: 24px; }.progress-track { width: 100%; height: 8px; display: block; margin-bottom: 21px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; }.progress-track::-webkit-progress-bar { background: #eee5e9; }.progress-track::-webkit-progress-value { background: linear-gradient(90deg, var(--admin), #cc4d7b); border-radius: 999px; }.progress-track::-moz-progress-bar { background: linear-gradient(90deg, var(--admin), #cc4d7b); border-radius: 999px; }
.setup-list { display: grid; }.setup-step { display: flex; align-items: center; gap: 13px; min-height: 66px; padding: 10px 3px; color: var(--ink); border-top: 1px solid #edf0ee; text-decoration: none; }.setup-step:hover:not(.is-disabled) .setup-copy strong { color: var(--admin); }.setup-step > .icon { width: 18px; color: #a0aaa5; }.setup-status { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: var(--admin); background: var(--admin-soft); border-radius: 50%; font-size: 12px; font-weight: 850; }.setup-step.is-done .setup-status { color: #fff; background: var(--success); }.setup-status .icon { width: 16px; }.setup-copy { min-width: 0; flex: 1; }.setup-copy strong, .setup-copy small { display: block; }.setup-copy strong { margin-bottom: 4px; font-size: 14px; }.setup-copy small { color: var(--muted); font-size: 12px; }.setup-step.is-disabled { opacity: .62; }
.quick-panel { align-self: start; }.quick-action { display: flex; align-items: center; gap: 12px; padding: 14px 0; color: var(--ink); border-top: 1px solid #edf0ee; text-decoration: none; }.quick-action > span:nth-child(2) { min-width: 0; flex: 1; }.quick-action strong, .quick-action small { display: block; }.quick-action strong { margin-bottom: 4px; font-size: 14px; }.quick-action small { color: var(--muted); font-size: 11px; line-height: 1.4; }.quick-action > .icon { width: 17px; color: #a0aaa5; }.quick-icon { width: 38px; height: 38px; flex: 0 0 auto; }.quick-icon .icon { width: 18px; }.quick-action.is-disabled { opacity: .55; }
.mobile-nav { display: none; }.sidebar-backdrop { display: none; }

/* Цветовая тема учителя использует тот же универсальный каркас страниц */
.app-shell[data-role="teacher"] { --admin: var(--teacher); --admin-dark: #38542a; --admin-soft: #eaf2e4; }
.app-shell[data-role="teacher"] .sidebar { background: linear-gradient(180deg, #344b29, #24381f); box-shadow: 12px 0 35px rgba(36,56,31,.14); }
.app-shell[data-role="teacher"] .brand .brand-mark { color: var(--teacher); }
.app-shell[data-role="teacher"] .eyebrow { color: var(--teacher); }
.app-shell[data-role="teacher"] .role-dot { background: var(--teacher); }

/* Цветовая тема ученика */
.app-shell[data-role="student"] { --admin: var(--student); --admin-dark: #8b4914; --admin-soft: #fbeadb; }
.app-shell[data-role="student"] .sidebar { background: linear-gradient(180deg, #7a431e, #4b2c1a); box-shadow: 12px 0 35px rgba(75,44,26,.16); }
.app-shell[data-role="student"] .brand .brand-mark { color: var(--student); }
.app-shell[data-role="student"] .eyebrow { color: var(--student); }
.app-shell[data-role="student"] .role-dot { background: var(--student); }

/* Формы и список людей */
.users-layout { display: grid; grid-template-columns: minmax(370px, .74fr) minmax(600px, 1.26fr); gap: 20px; align-items: start; }.user-form-panel { position: sticky; top: 92px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.field-full { grid-column: 1 / -1; }.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }.record-id, .count-badge { display: inline-flex; padding: 5px 8px; color: var(--muted); background: var(--soft); border-radius: 8px; font-size: 11px; }.role-fieldset { min-width: 0; margin: 4px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }.role-fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 800; }.role-fieldset > p { margin-bottom: 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }.role-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }.role-option { --role-option: var(--ink); cursor: pointer; }.role-option input { position: absolute; opacity: 0; pointer-events: none; }.role-option > span { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 10px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }.role-option input:checked + span { color: var(--role-option); background: color-mix(in srgb, var(--role-option) 8%, white); border-color: color-mix(in srgb, var(--role-option) 35%, white); }.role-option input:focus-visible + span { outline: 3px solid rgba(33,101,168,.25); }.role-option .icon { width: 17px; }.role-option-admin { --role-option: var(--admin); }.role-option-teacher { --role-option: var(--teacher); }.role-option-student { --role-option: var(--student); }.role-option-parent { --role-option: var(--parent); }
.switch-row { display: grid; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }.switch-control { display: flex; align-items: center; gap: 10px; cursor: pointer; }.switch-control input { position: absolute; opacity: 0; }.switch-ui { width: 38px; height: 22px; flex: 0 0 auto; padding: 2px; background: #c6cfca; border-radius: 999px; transition: background .15s; }.switch-ui::after { content: ""; width: 18px; height: 18px; display: block; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .15s; }.switch-control input:checked + .switch-ui { background: var(--success); }.switch-control input:checked + .switch-ui::after { transform: translateX(16px); }.switch-control input:focus-visible + .switch-ui { outline: 3px solid rgba(33,101,168,.25); }.switch-control strong, .switch-control small { display: block; }.switch-control strong { font-size: 13px; }.switch-control small { margin-top: 2px; color: var(--muted); font-size: 11px; }.warning-switch input:checked + .switch-ui { background: var(--admin); }
.form-note { display: grid; gap: 4px; margin-top: 20px; padding: 14px; color: #5d4b27; background: #fff9e9; border: 1px solid #f0dfab; border-radius: 12px; font-size: 12px; line-height: 1.45; }
.filter-bar { display: grid; grid-template-columns: minmax(190px, 1fr) 145px 135px auto auto; gap: 9px; margin-bottom: 17px; }.filter-bar select, .filter-bar input { min-height: 40px; padding: 8px 10px; font-size: 12px; }.filter-bar .button { min-height: 40px; padding: 8px 11px; font-size: 12px; }.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }.data-table th { padding: 11px 12px; color: var(--muted); background: #f5f7f6; text-align: left; font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }.data-table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: middle; }.data-table tr.is-muted { opacity: .57; }.person-cell { min-width: 220px; display: flex; align-items: center; gap: 10px; }.table-avatar { width: 34px; height: 34px; flex: 0 0 auto; font-size: 10px; }.person-cell strong, .person-cell small { display: block; }.person-cell strong { margin-bottom: 4px; font-size: 12px; }.person-cell small { color: var(--muted); font-size: 10px; line-height: 1.4; }.badge-list { display: flex; flex-wrap: wrap; gap: 5px; }.role-badge, .status-badge { display: inline-flex; padding: 4px 7px; border-radius: 999px; white-space: nowrap; font-size: 9px; font-weight: 800; }.role-badge-admin { color: var(--admin-dark); background: var(--admin-soft); }.role-badge-teacher { color: #0c5b39; background: #e5f5ed; }.role-badge-student { color: #174e83; background: #e6f0fa; }.role-badge-parent { color: #57317a; background: #f0e8f8; }.role-badge-super { color: #77520e; background: #fff2ce; }.status-active { color: #11613c; background: #e5f5ed; }.status-off { color: #68716d; background: #e9eeeb; }.table-action { text-align: right !important; }.icon-action { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: var(--admin); background: var(--admin-soft); border-radius: 8px; text-decoration: none; font-weight: 750; }.icon-action .icon { width: 14px; height: 14px; }.empty-cell { padding: 35px !important; color: var(--muted); text-align: center; }.table-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }

/* Люди и права: семейные связи */
.people-subnav { display: flex; flex-wrap: wrap; gap: 7px; margin: -11px 0 20px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 7px 24px rgba(30,43,36,.035); }
.people-subnav a { display: inline-flex; align-items: center; min-height: 37px; padding: 8px 13px; color: var(--muted); border-radius: 9px; text-decoration: none; font-size: 12px; font-weight: 800; }
.people-subnav a:hover, .people-subnav a.is-active { color: var(--admin); background: var(--admin-soft); }
.family-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 20px; }
.family-layout { display: grid; grid-template-columns: minmax(300px, .62fr) minmax(620px, 1.38fr); gap: 20px; align-items: start; }
.family-parent-panel, .family-links-panel { min-width: 0; padding: clamp(19px, 2.4vw, 28px); }
.family-parent-panel { position: sticky; top: 88px; }
.family-search { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-bottom: 14px; }
.family-search input { min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #ccd7d1; border-radius: 10px; }
.family-search .button { min-height: 40px; padding: 8px 11px; }
.family-parent-list, .family-link-list { display: grid; gap: 8px; }
.family-parent-list { max-height: 590px; overflow: auto; padding-right: 3px; }
.family-parent-card { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; padding: 11px; color: var(--ink); background: #f8faf9; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.family-parent-card:hover, .family-parent-card.is-active { color: var(--admin); background: var(--admin-soft); border-color: #e4b8c8; }
.family-parent-card.is-muted, .family-link-card.is-muted { opacity: .6; }
.family-parent-card strong, .family-parent-card small, .family-child-person strong, .family-child-person small { display: block; }
.family-parent-card strong, .family-child-person strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.family-parent-card small, .family-child-person small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.family-parent-card > .icon { width: 16px; }
.family-selected-heading { align-items: flex-start; }
.family-selected-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.family-add-form { display: grid; grid-template-columns: minmax(230px, 1.4fr) minmax(150px, .7fr) minmax(160px, .8fr) auto; align-items: end; gap: 11px; margin-bottom: 24px; padding: 16px; background: #f7faf8; border: 1px solid var(--line); border-radius: 13px; }
.family-add-form .field > span:first-child, .family-link-card .field > span:first-child { font-size: 10px; }
.family-add-form select, .family-link-card select { min-height: 40px; padding: 8px 9px; font-size: 11px; }
.family-primary-check { min-height: 40px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.family-primary-check input { width: 18px; height: 18px; accent-color: var(--admin); }
.family-primary-check strong, .family-primary-check small { display: block; }
.family-primary-check strong { font-size: 11px; }.family-primary-check small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.family-add-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 10px; }
.family-links-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 12px; }
.family-links-heading h3 { margin: 0; font-size: 17px; }.family-links-heading .eyebrow { margin-bottom: 3px; }
.family-link-card { display: grid; grid-template-columns: minmax(190px, 1.2fr) minmax(135px, .55fr) minmax(100px, .42fr) auto; align-items: end; gap: 11px; padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.family-child-person { min-width: 0; display: flex; align-items: center; gap: 10px; align-self: center; }
.family-link-actions { display: flex; gap: 6px; }.family-link-actions .button { min-height: 40px; padding: 8px 10px; font-size: 10px; }
.family-empty { display: grid; gap: 5px; padding: 24px 15px; color: var(--muted); text-align: center; background: #f8faf9; border: 1px dashed #ccd7d1; border-radius: 11px; }
.family-empty strong { color: var(--ink); font-size: 13px; }.family-empty span { font-size: 10px; line-height: 1.5; }.family-empty-large { min-height: 250px; place-content: center; }

/* Импорт пользователей */
.import-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 20px; align-items: start; }
.import-upload-panel, .import-help-panel, .import-preview-panel { padding: clamp(19px, 2.4vw, 28px); }
.import-rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.import-rules > div { display: grid; gap: 4px; padding: 13px; background: var(--soft); border-radius: 11px; }
.import-rules strong { font-size: 12px; }
.import-rules span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.template-link { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 14px; color: var(--admin); background: var(--admin-soft); border: 1px solid #eccfda; border-radius: 12px; text-decoration: none; }
.template-link > span { min-width: 0; flex: 1; }
.template-link strong, .template-link small { display: block; }
.template-link small { margin-top: 3px; color: #805164; font-size: 11px; }
.template-link > .icon:last-child { width: 16px; }
.upload-form { display: grid; gap: 12px; }
.file-drop { min-height: 122px; display: flex; align-items: center; justify-content: center; gap: 13px; padding: 22px; background: #fbfcfb; border: 2px dashed #c9d4ce; border-radius: 14px; cursor: pointer; transition: border .15s, background .15s; }
.file-drop:hover, .file-drop:focus-within { background: var(--admin-soft); border-color: var(--admin); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; color: var(--admin); background: var(--admin-soft); border-radius: 50%; }
.file-drop strong, .file-drop small { display: block; }
.file-drop small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.column-help { margin: 0; }
.column-help > div { padding: 10px 0; border-top: 1px solid var(--line); }
.column-help dt { color: var(--admin); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 800; }
.column-help dd { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.security-note { margin: 17px 0 0; padding: 13px; color: #644c1e; background: #fff8e7; border: 1px solid #efdda9; border-radius: 11px; font-size: 12px; line-height: 1.5; }
.import-preview-panel { margin-top: 20px; }
.import-table small { color: var(--muted); }
.import-row-error { background: #fff6f7; }
.status-error { color: #851d31; background: #fde7ec; }
.import-confirm { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 16px; background: #edf9f3; border: 1px solid #bce5cf; border-radius: 12px; }
.import-confirm strong, .import-confirm span { display: block; }
.import-confirm span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.import-progress-panel { width: min(100%, 680px); margin: clamp(30px, 8vh, 90px) auto; padding: clamp(28px, 5vw, 52px); text-align: center; }
.import-progress-panel h1 { margin: 9px 0 10px; font-size: clamp(28px, 5vw, 42px); letter-spacing: -.04em; }
.import-progress-panel p { margin-bottom: 25px; color: var(--muted); line-height: 1.55; }
.import-progress-panel form { margin: 20px 0 12px; }
.import-progress-panel > small { color: var(--muted); line-height: 1.45; }
.progress-lock { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 18px; color: #fff; background: var(--admin); border-radius: 17px; box-shadow: 0 10px 25px rgba(143,33,71,.2); }
.progress-lock .icon { width: 26px; height: 26px; }
.progress-large { display: block; margin-bottom: 10px; color: var(--admin); font-size: 27px; }
.import-progress-track { height: 11px; margin-bottom: 0; }

/* Годы, предметы, классы и группы */
.management-layout { display: grid; grid-template-columns: minmax(280px, .56fr) minmax(580px, 1.44fr); gap: 20px; align-items: start; }
.management-sidebar { position: sticky; top: 92px; padding: 20px; }
.management-main { display: grid; gap: 20px; min-width: 0; }
.management-form-panel, .periods-panel, .groups-panel { padding: clamp(20px, 2.5vw, 29px); }
.entity-list { display: grid; gap: 8px; }
.entity-list-item { display: flex; align-items: center; gap: 11px; padding: 13px; color: var(--ink); background: #fafbfa; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border .15s, background .15s, transform .15s; }
.entity-list-item:hover { transform: translateY(-1px); border-color: #d2a9b8; }
.entity-list-item.is-active { background: var(--admin-soft); border-color: #ddb2c2; }
.entity-list-item > .icon:last-child { width: 16px; color: var(--muted); }
.entity-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--admin); background: var(--admin-soft); border-radius: 11px; }
.entity-icon .icon { width: 18px; }
.entity-icon.large { width: 58px; height: 58px; margin: 0 auto 17px; border-radius: 17px; }
.entity-icon.large .icon { width: 27px; height: 27px; }
.entity-copy { min-width: 0; flex: 1; }
.entity-copy strong, .entity-copy small { display: block; }
.entity-copy strong { margin-bottom: 4px; font-size: 13px; }
.entity-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.year-status { padding: 4px 7px; border-radius: 999px; white-space: nowrap; font-size: 8px; font-weight: 850; }
.year-status-active { color: #0f623c; background: #dff3e9; }
.year-status-planned { color: #72500f; background: #fff0c8; }
.year-status-closed { color: #68716d; background: #e9eeeb; }
.period-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 20px; }
.period-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px; color: var(--muted); background: #f4f6f5; border: 1px solid var(--line); border-radius: 11px; }
.period-summary strong { font-size: 11px; }.period-summary span { font-size: 10px; font-weight: 800; }
.period-summary.is-complete { color: var(--success); background: #edf9f3; border-color: #bce5cf; }
.period-list { display: grid; margin-bottom: 24px; }
.period-row { display: flex; align-items: center; gap: 11px; min-height: 61px; padding: 10px 2px; border-top: 1px solid var(--line); }
.period-number { width: 31px; height: 31px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--admin); border-radius: 9px; font-size: 12px; font-weight: 850; }
.period-copy { min-width: 0; flex: 1; }.period-copy strong, .period-copy small { display: block; }.period-copy strong { margin-bottom: 4px; font-size: 13px; }.period-copy small { color: var(--muted); font-size: 10px; }
.period-form, .group-form { padding-top: 23px; border-top: 1px solid var(--line); }
.form-subheading h3 { margin: 0; font-size: 18px; }
.empty-message { margin: 12px 0; padding: 18px; color: var(--muted); background: #f6f8f7; border-radius: 11px; text-align: center; font-size: 12px; }
.empty-state-panel { padding: clamp(36px, 6vw, 70px); text-align: center; }.empty-state-panel h2 { margin-bottom: 8px; }.empty-state-panel p { max-width: 520px; margin: 0 auto 20px; color: var(--muted); line-height: 1.55; }
.catalog-layout { display: grid; grid-template-columns: minmax(330px, .7fr) minmax(560px, 1.3fr); gap: 20px; align-items: start; }
.catalog-form-panel, .catalog-list-panel { padding: clamp(20px, 2.5vw, 28px); }.catalog-form-panel { position: sticky; top: 92px; }
.simple-filter { grid-template-columns: minmax(200px, 1fr) auto auto; }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.subject-card { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 14px; color: var(--ink); background: #fbfcfb; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border .15s, transform .15s; }
.subject-card:hover { transform: translateY(-1px); border-color: #d2a9b8; }.subject-card.is-selected { background: var(--admin-soft); border-color: #ddb2c2; }
.subject-letter { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--admin); border-radius: 11px; font-weight: 850; }
.subject-copy { min-width: 0; flex: 1; }.subject-copy strong, .subject-copy small, .subject-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.subject-copy strong { margin-bottom: 3px; font-size: 13px; }.subject-copy small { color: var(--muted); font-size: 10px; }.subject-copy em { margin-top: 5px; color: #8d9691; font-size: 9px; font-style: normal; }
.year-filter { display: flex; align-items: end; gap: 12px; margin-bottom: 20px; padding: 15px 18px; }.year-filter .field { width: min(100%, 420px); }
.class-number { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--admin); border-radius: 11px; font-size: 15px; font-weight: 850; }
.panel-description { margin: -8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.group-list { display: grid; margin-bottom: 22px; }
.group-card { display: flex; align-items: center; gap: 11px; min-height: 65px; padding: 11px 2px; border-top: 1px solid var(--line); }
.group-level { min-width: 78px; padding: 6px 8px; border-radius: 8px; text-align: center; font-size: 9px; font-weight: 850; }
.group-level-basic { color: #0c5b39; background: #e5f5ed; }.group-level-profile { color: #174e83; background: #e6f0fa; }.group-level-mixed { color: #57317a; background: #f0e8f8; }
.group-copy { min-width: 0; flex: 1; }.group-copy strong, .group-copy small { display: block; }.group-copy strong { margin-bottom: 4px; font-size: 13px; }.group-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }

/* Состав класса и распределение по группам */
.class-roster-link { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 14px; color: var(--ink); background: var(--admin-soft); border: 1px solid #e6bdcc; border-radius: 13px; text-decoration: none; transition: transform .15s, border .15s; }
.class-roster-link:hover { transform: translateY(-1px); border-color: var(--admin); }
.class-roster-link > span:nth-child(2) { min-width: 0; flex: 1; }.class-roster-link strong, .class-roster-link small { display: block; }.class-roster-link strong { margin-bottom: 4px; font-size: 13px; }.class-roster-link small { color: #805164; font-size: 11px; line-height: 1.4; }.class-roster-link > .icon:last-child { width: 17px; color: var(--admin); }
.class-roster-layout { display: grid; grid-template-columns: minmax(620px, 1.35fr) minmax(330px, .65fr); gap: 20px; align-items: start; }
.roster-panel, .enroll-panel, .enrollment-edit-panel, .subject-membership-panel { padding: clamp(19px, 2.4vw, 28px); }
.roster-actions { display: grid; gap: 20px; }.enroll-panel { min-width: 0; }.enrollment-edit-panel { scroll-margin-top: 92px; }
.date-range { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.compact-stack-form { gap: 14px; margin-top: 0; }.field.is-hidden { display: none; }
.available-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 14px; }.available-filter input, .available-filter .button { min-height: 40px; font-size: 12px; }
.enrollment-date-field { margin-bottom: 14px; }.selection-toolbar { display: grid; gap: 6px; margin-bottom: 10px; padding: 11px; background: #f6f8f7; border-radius: 10px; }.selection-toolbar small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.plain-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 780; cursor: pointer; }.plain-check input { width: 16px; height: 16px; accent-color: var(--admin); }
.available-students { max-height: 390px; display: grid; gap: 7px; margin-bottom: 13px; padding-right: 3px; overflow-y: auto; }
.student-check-card { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 10px; background: #fbfcfb; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }.student-check-card:hover { border-color: #d4a9b9; }.student-check-card > input { position: absolute; opacity: 0; pointer-events: none; }.student-check-card > span:last-child { min-width: 0; flex: 1; }.student-check-card strong, .student-check-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.student-check-card strong { font-size: 11px; }.student-check-card small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.check-mark { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; color: transparent; background: #fff; border: 1px solid #c8d2cd; border-radius: 7px; }.check-mark .icon { width: 14px; height: 14px; }.student-check-card > input:checked + .check-mark { color: #fff; background: var(--admin); border-color: var(--admin); }.student-check-card > input:focus-visible + .check-mark { outline: 3px solid rgba(33,101,168,.25); }
.button:disabled { opacity: .48; transform: none; cursor: not-allowed; }
.group-memberships { margin-top: 32px; scroll-margin-top: 90px; }.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }.section-heading h2 { margin-bottom: 7px; font-size: 27px; letter-spacing: -.035em; }.section-heading p { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.subject-membership-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }.subject-membership-panel { min-width: 0; scroll-margin-top: 92px; }
.membership-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }.membership-heading h3 { margin: 0 0 3px; font-size: 23px; }.membership-heading > div > small { color: var(--muted); font-size: 10px; }.effective-date { width: 155px; flex: 0 0 auto; }.effective-date input { min-height: 40px; padding: 8px 9px; font-size: 11px; }
.membership-list { max-height: 520px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }.membership-row { min-height: 69px; display: grid; grid-template-columns: minmax(120px, .75fr) minmax(250px, 1.25fr); align-items: center; gap: 12px; padding: 9px 11px; border-top: 1px solid var(--line); }.membership-row:first-child { border-top: 0; }.membership-row > span { min-width: 0; }.membership-row strong, .membership-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.membership-row strong { font-size: 11px; }.membership-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }.membership-row select { width: 100%; min-height: 37px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid #ccd7d1; border-radius: 9px; font-size: 10px; }
.membership-controls { display: grid; grid-template-columns: minmax(145px, 1fr) 104px; gap: 7px; }.membership-controls > span { min-width: 0; }.membership-controls > span > small { margin: 0 0 4px; font-size: 8px; font-weight: 780; text-transform: uppercase; }
.membership-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }.membership-footer small { color: var(--muted); font-size: 10px; line-height: 1.4; }

/* Учебный план */
.plan-context { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(220px, .8fr) auto; align-items: end; gap: 13px; margin-bottom: 20px; padding: 15px 18px; }.plan-context .field select { min-height: 41px; padding: 8px 10px; font-size: 12px; }
.assignment-layout { display: grid; grid-template-columns: minmax(620px, 1.35fr) minmax(330px, .65fr); gap: 20px; align-items: start; }.assignment-list-panel, .assignment-form-panel { padding: clamp(20px, 2.5vw, 29px); }.assignment-form-panel { position: sticky; top: 92px; scroll-margin-top: 92px; }
.assignment-section + .assignment-section { margin-top: 25px; padding-top: 23px; border-top: 1px solid var(--line); }.assignment-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }.assignment-section-title h3 { margin: 0; font-size: 17px; }.assignment-section-title span { padding: 4px 8px; color: var(--muted); background: var(--soft); border-radius: 8px; font-size: 10px; font-weight: 800; }
.assignment-cards { display: grid; gap: 8px; }.assignment-card { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 12px; background: #fbfcfb; border: 1px solid var(--line); border-radius: 12px; }.assignment-card.is-muted { opacity: .55; }.assignment-subject { min-width: 64px; max-width: 90px; padding: 8px; overflow: hidden; color: #fff; background: var(--admin); border-radius: 9px; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 850; }.assignment-copy { min-width: 0; flex: 1; }.assignment-copy strong, .assignment-copy small, .assignment-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.assignment-copy strong { margin-bottom: 3px; font-size: 12px; }.assignment-copy small { color: var(--muted); font-size: 10px; }.assignment-copy em { margin-top: 5px; color: #8b948f; font-size: 9px; font-style: normal; }.group-assignment-card .group-level { min-width: 78px; }.assignment-links { margin-top: 13px; }

/* Редактор недельного расписания */
.schedule-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, .45fr); gap: 20px; align-items: start; }.schedule-board-panel, .schedule-form-panel { padding: clamp(18px, 2.2vw, 27px); }.schedule-form-panel { position: sticky; top: 92px; scroll-margin-top: 92px; }.schedule-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }.schedule-toolbar h2 { margin: 0; font-size: 23px; }
.day-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }.day-pill { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; color: var(--muted); background: #f5f7f6; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: 10px; font-weight: 800; }.day-pill.is-active { color: #fff; background: var(--admin); border-color: var(--admin); }
.schedule-grid-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; }.schedule-grid { min-width: calc(72px + var(--schedule-days) * 170px); display: grid; grid-template-columns: 72px repeat(var(--schedule-days), minmax(170px, 1fr)); background: var(--line); gap: 1px; }.schedule-corner, .schedule-day-head, .schedule-slot-number, .schedule-cell { background: #fff; }.schedule-corner, .schedule-day-head { min-height: 54px; display: grid; place-content: center; position: sticky; top: 0; z-index: 3; background: #f5f7f6; }.schedule-corner { left: 0; z-index: 4; color: var(--muted); font-size: 10px; }.schedule-day-head { text-align: center; }.schedule-day-head strong, .schedule-day-head small { display: block; }.schedule-day-head strong { color: var(--admin); font-size: 13px; }.schedule-day-head small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.schedule-slot-number { min-height: 105px; display: grid; place-content: center; position: sticky; left: 0; z-index: 2; text-align: center; }.schedule-slot-number strong, .schedule-slot-number small { display: block; }.schedule-slot-number strong { font-size: 19px; }.schedule-slot-number small { color: var(--muted); font-size: 8px; }.schedule-cell { min-height: 105px; display: flex; flex-direction: column; gap: 6px; padding: 7px; }.schedule-cell.has-lessons { background: #fffdfd; }
.schedule-entry { position: relative; color: var(--ink); background: var(--admin-soft); border: 1px solid #e8c6d3; border-radius: 9px; }.schedule-entry-group { background: #edf4fb; border-color: #cbdced; }.schedule-entry > a { display: block; padding: 8px 8px 8px 29px; text-decoration: none; }.schedule-entry strong, .schedule-entry small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.schedule-entry strong { font-size: 11px; }.schedule-entry small { margin-top: 3px; color: var(--muted); font-size: 8px; }.schedule-swap-check { width: 18px; height: 18px; position: absolute; left: 7px; top: 8px; z-index: 2; cursor: pointer; }.schedule-swap-check input { position: absolute; opacity: 0; }.schedule-swap-check span { width: 18px; height: 18px; display: block; background: #fff; border: 1px solid #c4d0ca; border-radius: 5px; }.schedule-swap-check input:checked + span { background: var(--admin); border-color: var(--admin); box-shadow: inset 0 0 0 4px #fff; }
.parity-badge { display: inline-flex; margin: 6px 0 0 29px; padding: 3px 5px; border-radius: 5px; font-size: 7px; font-style: normal; font-weight: 850; }.parity-all { color: #11613c; background: #dff3e9; }.parity-odd { color: #714d0a; background: #fff0c8; }.parity-even { color: #174e83; background: #e1edf8; }.schedule-cell-add { min-height: 29px; display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: auto; color: #8b948f; border: 1px dashed #ccd6d1; border-radius: 8px; text-decoration: none; font-size: 8px; font-weight: 800; }.schedule-cell-add:hover { color: var(--admin); border-color: var(--admin); }.schedule-cell-add .icon { width: 12px; height: 12px; }
.swap-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; padding: 12px; background: #f5f7f6; border-radius: 11px; }.swap-toolbar strong, .swap-toolbar small { display: block; }.swap-toolbar strong { font-size: 11px; }.swap-toolbar small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }.has-swap-selection .swap-toolbar { background: var(--admin-soft); }
.schedule-position-fields { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 10px; }.parity-options { display: grid; gap: 7px; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }.parity-options legend { padding: 0 5px; font-size: 12px; font-weight: 800; }.parity-options label { cursor: pointer; }.parity-options input { position: absolute; opacity: 0; }.parity-options label > span { display: block; padding: 9px 10px; color: var(--muted); background: #f8faf9; border: 1px solid var(--line); border-radius: 9px; }.parity-options input:checked + span { color: var(--admin); background: var(--admin-soft); border-color: #d9aabd; }.parity-options strong, .parity-options small { display: block; }.parity-options strong { font-size: 10px; }.parity-options small { margin-top: 2px; font-size: 8px; }.danger-action { width: 100%; min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; color: var(--danger); background: #fff3f5; border: 1px solid #efc7cf; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 800; }.danger-action .icon { width: 15px; }.schedule-rules { margin-top: 18px; padding: 13px; color: #5e4b25; background: #fff9e9; border: 1px solid #efdda9; border-radius: 11px; font-size: 10px; line-height: 1.5; }.schedule-rules strong { display: block; margin-bottom: 5px; }.schedule-rules ul { margin: 0; padding-left: 17px; }

/* Учебный календарь */
.calendar-layout { display: grid; grid-template-columns: minmax(560px, 1.25fr) minmax(350px, .75fr); gap: 20px; align-items: start; }
.calendar-list-panel, .calendar-form-panel { padding: clamp(20px, 2.5vw, 29px); }.calendar-form-panel { position: sticky; top: 92px; scroll-margin-top: 92px; }
.calendar-exception-list { display: grid; }.calendar-exception { min-width: 0; display: flex; align-items: center; gap: 13px; min-height: 72px; padding: 10px 2px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; }.calendar-exception:hover .exception-copy strong { color: var(--admin); }.calendar-exception > .icon { width: 17px; color: var(--muted); }
.exception-date { width: 78px; flex: 0 0 auto; padding: 9px; color: var(--admin); background: var(--admin-soft); border-radius: 10px; text-align: center; }.exception-working_day .exception-date { color: #126243; background: #e2f4ea; }.exception-day_off .exception-date { color: #84570d; background: #fff0cb; }
.exception-date strong, .exception-date small, .exception-copy strong, .exception-copy small { display: block; }.exception-date strong { font-size: 13px; }.exception-date small { margin-top: 3px; font-size: 8px; }.exception-copy { min-width: 0; flex: 1; }.exception-copy strong, .exception-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.exception-copy strong { margin-bottom: 4px; font-size: 13px; }.exception-copy small { color: var(--muted); font-size: 10px; }.calendar-date-fields { grid-template-columns: 1fr 1fr; }

/* Конкретные уроки недели */
.lesson-context { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(300px, 1.2fr) minmax(190px, .65fr); align-items: end; gap: 13px; margin-bottom: 20px; padding: 15px 18px; }.lesson-context .field select { min-height: 41px; padding: 8px 10px; font-size: 11px; }
.lesson-actions-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; padding: 15px 18px; }.lesson-actions-panel > div:first-child { min-width: 0; }.lesson-actions-panel strong, .lesson-actions-panel small { display: block; }.lesson-actions-panel strong { margin-bottom: 4px; font-size: 13px; }.lesson-actions-panel small { color: var(--muted); font-size: 10px; line-height: 1.45; }.lesson-actions-panel form { margin: 0; }
.lesson-day-pills .day-pill { gap: 5px; }.lesson-day-pills .day-pill span { opacity: .72; font-size: 8px; }
.lesson-week-layout { display: grid; grid-template-columns: minmax(560px, 1.35fr) minmax(350px, .65fr); gap: 20px; align-items: start; }.lesson-days { display: grid; gap: 14px; min-width: 0; }.lesson-day-card { padding: clamp(17px, 2vw, 24px); }.lesson-day-card > header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }.lesson-day-card h2 { margin: 0; font-size: 21px; }.lesson-list { display: grid; }.lesson-row { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 9px 2px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; }.lesson-row:hover:not(.is-locked) .lesson-copy strong { color: var(--admin); }.lesson-row.is-locked { cursor: default; opacity: .66; }.lesson-row > .icon { width: 17px; color: var(--muted); }
.lesson-slot { width: 42px; height: 42px; display: grid; place-content: center; flex: 0 0 auto; color: var(--admin); background: var(--admin-soft); border-radius: 10px; text-align: center; }.lesson-slot strong, .lesson-slot small { display: block; }.lesson-slot strong { font-size: 16px; }.lesson-slot small { font-size: 7px; }.lesson-copy { min-width: 0; flex: 1; }.lesson-copy strong, .lesson-copy small, .lesson-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.lesson-copy strong { margin-bottom: 3px; font-size: 12px; }.lesson-copy small { color: var(--muted); font-size: 9px; }.lesson-copy em { margin-top: 4px; color: #8a948f; font-size: 8px; font-style: normal; }.lesson-status { flex: 0 0 auto; }
.lesson-status-planned { color: #704c0b; background: #fff0ca; }.lesson-status-held { color: #11613c; background: #dff3e9; }.lesson-status-cancelled { color: #8a2336; background: #f9e1e6; }.lesson-row.status-cancelled .lesson-slot { color: #8a2336; background: #f9e1e6; }.lesson-row.status-cancelled .lesson-copy strong { text-decoration: line-through; }
.lesson-form-panel { position: sticky; top: 92px; padding: clamp(20px, 2.5vw, 28px); scroll-margin-top: 92px; }.lesson-form-panel .schedule-rules p { margin: 0; }.lesson-adjacent-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -7px 0 16px; }.lesson-adjacent-nav .button { min-height: 34px; padding: 7px 10px; font-size: 9px; }.period-lock-form { margin: 0; }.period-lock-form .icon-action { border: 0; cursor: pointer; }

/* Главная страница учителя */
.teacher-page-content { width: min(100%, 1480px); }.teacher-hero { padding: clamp(20px, 3vw, 31px); background: radial-gradient(circle at 88% 10%, rgba(71,175,123,.14), transparent 28%), #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 32px rgba(30,43,36,.045); }.teacher-hero h1 { color: #153c2b; }
.teacher-rule-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding: 14px 17px; color: #16583a; background: #eaf8f1; border: 1px solid #bfe6d1; border-radius: 13px; }.teacher-rule-banner > .icon { width: 22px; }.teacher-rule-banner span { min-width: 0; }.teacher-rule-banner strong, .teacher-rule-banner small { display: block; }.teacher-rule-banner strong { margin-bottom: 3px; font-size: 12px; }.teacher-rule-banner small { color: #48715e; font-size: 10px; line-height: 1.45; }
.teacher-dashboard-grid { display: grid; grid-template-columns: minmax(620px, 1.4fr) minmax(300px, .6fr); gap: 20px; align-items: start; }.teacher-timeline-panel, .teacher-week-panel { padding: clamp(19px, 2.4vw, 28px); }.teacher-week-panel { align-self: start; }.teacher-lesson-list { display: grid; }.teacher-lesson-row { min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 74px; padding: 10px 2px; border-top: 1px solid var(--line); }.teacher-lesson-time { width: 43px; height: 43px; display: grid; place-content: center; flex: 0 0 auto; color: #fff; background: var(--teacher); border-radius: 11px; text-align: center; }.teacher-lesson-time strong, .teacher-lesson-time small, .teacher-lesson-date strong, .teacher-lesson-date small, .teacher-lesson-copy strong, .teacher-lesson-copy small { display: block; }.teacher-lesson-time strong { font-size: 16px; }.teacher-lesson-time small { font-size: 7px; }.teacher-lesson-date { width: 71px; flex: 0 0 auto; }.teacher-lesson-date strong { color: var(--teacher); font-size: 10px; }.teacher-lesson-date small { margin-top: 3px; color: var(--muted); font-size: 8px; }.teacher-lesson-copy { min-width: 0; flex: 1; }.teacher-lesson-copy strong, .teacher-lesson-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.teacher-lesson-copy strong { margin-bottom: 4px; font-size: 12px; }.teacher-lesson-copy small { color: var(--muted); font-size: 9px; }.teacher-lesson-link { color: var(--ink); text-decoration: none; transition: color .15s, background .15s, padding .15s; }.teacher-lesson-link:hover { padding-left: 8px; padding-right: 8px; color: var(--teacher); background: #f5faf7; border-radius: 10px; }.teacher-heading-link { color: inherit; text-decoration: none; }.teacher-heading-link:hover { color: var(--teacher); }
.teacher-empty { padding: 30px 15px; text-align: center; }.teacher-empty h3 { margin-bottom: 7px; }.teacher-empty p { max-width: 460px; margin: 0 auto; color: var(--muted); font-size: 11px; line-height: 1.5; }.teacher-week-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }.teacher-week-counts a { padding: 13px 7px; color: var(--ink); background: #f3f8f5; border-radius: 10px; text-align: center; text-decoration: none; transition: background .15s, transform .15s; }.teacher-week-counts a:hover { background: #e6f4ec; transform: translateY(-1px); }.teacher-week-counts strong, .teacher-week-counts span { display: block; }.teacher-week-counts strong { color: var(--teacher); font-size: 22px; }.teacher-week-counts span { margin-top: 3px; color: var(--muted); font-size: 8px; }.teacher-week-panel > p { margin: 17px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.teacher-section { margin-top: 34px; }.teacher-assignment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.teacher-assignment-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px; }.teacher-assignment-link, .teacher-period-link, .teacher-stat-link { color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }.teacher-assignment-link:hover, .teacher-period-link:hover, .teacher-stat-link:hover { transform: translateY(-2px); border-color: #acd8c1; box-shadow: 0 13px 30px rgba(22,115,74,.1); }.teacher-subject-mark { min-width: 58px; max-width: 82px; padding: 9px 7px; overflow: hidden; color: #fff; background: var(--teacher); border-radius: 10px; text-align: center; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 850; }.teacher-assignment-copy { min-width: 0; flex: 1; }.teacher-assignment-copy strong, .teacher-assignment-copy small, .teacher-assignment-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.teacher-assignment-copy strong { margin-bottom: 4px; font-size: 11px; }.teacher-assignment-copy small { color: var(--muted); font-size: 9px; }.teacher-assignment-copy em { margin-top: 5px; color: #1f6f4b; font-size: 8px; font-style: normal; font-weight: 800; }
.teacher-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }.teacher-module-card { min-width: 0; display: grid; grid-template-columns: 43px minmax(0, 1fr); gap: 12px; position: relative; padding: 17px; text-decoration: none; }.teacher-module-card.is-coming { background: #fbfcfb; }.teacher-module-card.is-ready { border-color: #b9dfcc; transition: transform .15s, box-shadow .15s; }.teacher-module-card.is-ready:hover { transform: translateY(-2px); box-shadow: 0 13px 32px rgba(22,115,74,.12); }.teacher-module-icon { width: 43px; height: 43px; display: grid; place-items: center; color: var(--teacher); background: var(--admin-soft); border-radius: 11px; }.teacher-module-icon .icon { width: 20px; }.teacher-module-card strong, .teacher-module-card small { display: block; }.teacher-module-card strong { margin: 2px 0 5px; font-size: 12px; }.teacher-module-card small { color: var(--muted); font-size: 9px; line-height: 1.45; }.teacher-module-card em { grid-column: 2; width: max-content; padding: 3px 6px; color: #6b7771; background: #edf1ef; border-radius: 6px; font-size: 7px; font-style: normal; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }.teacher-module-card.is-ready em { color: #0e6540; background: #e5f5ed; }
.teacher-period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }.teacher-period-card { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px; }.teacher-period-card > span:nth-child(2) { min-width: 0; flex: 1; }.teacher-period-card > span:nth-child(2) strong, .teacher-period-card > span:nth-child(2) small, .teacher-period-card > span:nth-child(2) em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.teacher-period-card > span:nth-child(2) strong { margin-bottom: 4px; font-size: 12px; }.teacher-period-card > span:nth-child(2) small { color: var(--muted); font-size: 9px; }.teacher-period-card > span:nth-child(2) em { margin-top: 5px; color: var(--teacher); font-size: 8px; font-style: normal; font-weight: 800; }.teacher-period-card.is-locked { opacity: .65; }

/* Сводка учителя по связке «класс — предмет» */
.class-subject-hero { align-items: center; }.class-subject-hero p { margin-bottom: 0; }.class-subject-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }.class-subject-actions .button { min-width: 150px; }.class-subject-actions .icon { width: 17px; }
.class-subject-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 18px 0; padding: 14px 18px; }.class-subject-toolbar form { width: min(100%, 470px); }.class-subject-toolbar .field select { min-height: 42px; font-size: 12px; }.class-subject-stats { margin-bottom: 20px; }
.class-subject-layout { display: grid; gap: 20px; }.class-subject-students, .class-subject-lessons { min-width: 0; padding: clamp(19px, 2.4vw, 28px); }.class-subject-table-wrap { max-height: 620px; overflow: auto; }.class-subject-table { min-width: 960px; }.class-subject-table th { position: sticky; top: 0; z-index: 2; background: #f4f7f5; }.class-subject-table td { vertical-align: middle; }.class-subject-person strong, .class-subject-person small, .metric-value, .metric-note { display: block; }.class-subject-person strong { font-size: 12px; }.class-subject-person small, .metric-note { margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; }.metric-value { color: var(--teacher); font-size: 16px; }.debt-count { min-width: 28px; display: inline-grid; place-items: center; min-height: 28px; padding: 3px 7px; color: #557068; background: #edf3f0; border-radius: 8px; font-weight: 850; }.debt-count.has-debt { color: #a62039; background: #fde9ed; }
.class-subject-lesson-list { display: grid; }.class-subject-lesson { min-width: 0; display: flex; align-items: center; gap: 13px; min-height: 72px; padding: 10px 4px; color: var(--ink); border-top: 1px solid var(--line); text-decoration: none; transition: padding .15s, background .15s; }.class-subject-lesson:hover { padding-left: 10px; padding-right: 10px; background: #f5faf7; border-radius: 11px; }.class-subject-lesson-copy { min-width: 0; flex: 1; }.class-subject-lesson-copy strong, .class-subject-lesson-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.class-subject-lesson-copy strong { margin-bottom: 5px; font-size: 12px; }.class-subject-lesson-copy small { color: var(--muted); font-size: 9px; }.class-subject-arrow { color: var(--teacher); font-size: 18px; font-weight: 850; }

/* Учебно-методический план */
.methodical-hero { margin-bottom: 19px; }
.methodical-context { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)) auto; align-items: end; gap: 11px; margin-bottom: 20px; padding: 15px 18px; }
.methodical-context .field { min-width: 0; }
.methodical-context .field select { min-height: 41px; padding: 8px 10px; font-size: 11px; }
.methodical-context .button { min-height: 41px; }
.methodical-layout { display: grid; grid-template-columns: minmax(560px, 1.4fr) minmax(360px, .6fr); gap: 20px; align-items: start; }
.methodical-layout.is-readonly { grid-template-columns: 1fr; }
.methodical-plan-panel, .methodical-editor { min-width: 0; padding: clamp(20px, 2.5vw, 29px); }
.methodical-plan-heading { align-items: flex-start; }
.methodical-plan-heading h2 { margin-bottom: 5px; }
.methodical-plan-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.methodical-lock-note { display: flex; align-items: flex-start; gap: 10px; margin: -5px 0 18px; padding: 12px 13px; color: #69511d; background: #fff8e7; border: 1px solid #efdda9; border-radius: 11px; }
.methodical-lock-note > .icon { width: 18px; flex: 0 0 auto; }
.methodical-lock-note strong, .methodical-lock-note small { display: block; }
.methodical-lock-note strong { margin-bottom: 3px; font-size: 11px; }.methodical-lock-note small { font-size: 9px; line-height: 1.45; }
.methodical-plan-list { display: grid; }
.methodical-block-heading { display: flex; align-items: center; gap: 10px; margin: 24px -9px 0; padding: 12px 14px; color: #fff; background: var(--admin); border-radius: 11px; }
.methodical-block-heading:first-child { margin-top: 0; }
.methodical-block-heading span { padding: 4px 7px; background: rgba(255,255,255,.15); border-radius: 7px; white-space: nowrap; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.methodical-block-heading strong { font-size: 12px; line-height: 1.35; }
.methodical-section-heading { display: flex; align-items: baseline; gap: 9px; padding: 14px 4px 9px; border-bottom: 1px solid var(--line); }
.methodical-section-heading span { color: var(--admin); white-space: nowrap; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.methodical-section-heading strong { font-size: 11px; line-height: 1.4; }
.methodical-row { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) minmax(115px, auto) 18px; align-items: start; gap: 11px; padding: 13px 4px; color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s, padding .15s; }
.methodical-row:hover:not([aria-disabled="true"]), .methodical-row.is-selected { margin: 0 -8px; padding-left: 12px; padding-right: 12px; background: var(--admin-soft); border-radius: 10px; }
.methodical-row[aria-disabled="true"] { cursor: default; }
.methodical-row > .icon { width: 16px; margin-top: 10px; color: var(--muted); }
.methodical-number { width: 36px; height: 36px; display: grid; place-items: center; color: #fff; background: var(--admin); border-radius: 10px; font-size: 12px; font-weight: 850; }
.methodical-row.is-held .methodical-number { color: #59645f; background: #e4e9e6; }
.methodical-row-copy { min-width: 0; }
.methodical-row-copy strong, .methodical-row-copy small { display: block; }
.methodical-row-copy strong { margin: 2px 0 7px; font-size: 12px; line-height: 1.45; }
.methodical-row-copy small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.methodical-row-copy b { color: #4e5a54; }
.methodical-row-meta { display: grid; justify-items: end; gap: 6px; padding-top: 2px; }
.methodical-row-meta small { color: var(--muted); font-size: 9px; font-weight: 800; }
.methodical-row-meta em { display: flex; align-items: center; gap: 4px; color: #68716d; font-size: 8px; font-style: normal; font-weight: 750; }.methodical-row-meta em .icon { width: 12px; }
.methodical-editor { position: sticky; top: 92px; scroll-margin-top: 92px; }
.methodical-editor .panel-heading { align-items: flex-start; }
.methodical-editor .panel-heading .eyebrow { margin-bottom: 5px; }
.methodical-editor-lock { display: flex; gap: 8px; margin-bottom: 15px; padding: 11px; color: #68521e; background: #fff8e7; border: 1px solid #efdda9; border-radius: 10px; font-size: 10px; line-height: 1.45; }.methodical-editor-lock .icon { width: 16px; flex: 0 0 auto; }
.methodical-number-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.methodical-hierarchy-fields { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }.methodical-hierarchy-fields .field-grow { min-width: 0; }
.methodical-row-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }.methodical-row-actions form, .methodical-row-actions .button { width: 100%; }
.methodical-delete-form { margin-top: 8px; }.methodical-delete-form .danger-action:disabled { opacity: .45; cursor: not-allowed; }
.student-page-content { width: min(100%, 1400px); }

/* Уроки и журнал */
.journal-hero { margin-bottom: 19px; }
.journal-selector { display: grid; grid-template-columns: minmax(220px, 1.15fr) minmax(120px, .55fr) minmax(200px, 1fr) minmax(300px, 1.45fr) auto; align-items: end; gap: 10px; margin-bottom: 20px; padding: 15px 18px; }
.journal-selector .field { min-width: 0; }.journal-selector .field select { min-height: 43px; padding: 8px 9px; font-size: 12px; }.journal-selector .button { min-height: 43px; padding-inline: 12px; }
.journal-lesson-header { display: grid; grid-template-columns: minmax(105px, auto) minmax(0, 1fr) minmax(105px, auto); align-items: center; gap: 18px; margin-bottom: 13px; padding: 16px 19px; }
.journal-adjacent { display: flex; align-items: center; gap: 7px; color: var(--admin); text-decoration: none; font-size: 11px; font-weight: 800; }.journal-adjacent.is-next { justify-content: flex-end; }.journal-adjacent.is-disabled { color: #a4ada8; pointer-events: none; }
.journal-lesson-title { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: left; }.journal-lesson-title > span:last-child { min-width: 0; }.journal-lesson-title strong, .journal-lesson-title small, .journal-lesson-title em, .journal-period-sequence { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.journal-lesson-title strong { margin-bottom: 4px; font-size: 14px; }.journal-lesson-title small { color: var(--muted); font-size: 9px; }.journal-period-sequence { margin-top: 5px; color: var(--admin); font-size: 10px; font-weight: 850; }.journal-lesson-title em { margin-top: 5px; color: var(--admin); font-size: 8px; font-style: normal; font-weight: 750; }
.journal-slot { width: 47px; height: 47px; display: grid; place-content: center; flex: 0 0 auto; color: #fff; background: var(--admin); border-radius: 12px; text-align: center; font-size: 18px; font-weight: 850; }.journal-slot small { color: rgba(255,255,255,.76); font-size: 7px; font-weight: 700; }
.journal-lock-note { margin: 0 0 18px; }.journal-period-note { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 10px 14px; color: #1b6244; background: #eaf7f0; border: 1px solid #c2e5d1; border-radius: 11px; }.journal-period-note span { font-size: 10px; font-weight: 850; }.journal-period-note small { color: #527260; font-size: 9px; }
.journal-form { display: grid; gap: 20px; padding-bottom: 86px; }.journal-content-panel, .journal-results-panel, .journal-files-panel { min-width: 0; padding: clamp(20px, 2.5vw, 29px); }.journal-content-panel .panel-heading { align-items: flex-start; }
.journal-plan-field select { font-weight: 700; }.journal-theme-preview { margin: 14px 0 18px; padding: 14px 16px; background: var(--admin-soft); border: 1px solid color-mix(in srgb, var(--admin) 22%, white); border-radius: 12px; }.journal-theme-preview span, .journal-theme-preview strong { display: block; }.journal-theme-preview span { margin-bottom: 5px; color: var(--admin); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }.journal-theme-preview strong { font-size: 13px; line-height: 1.45; }
.journal-homework-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.journal-plan-copy { min-height: 35px; margin-top: 11px; padding: 7px 10px; font-size: 9px; }
.journal-results-heading { align-items: flex-start; }.journal-results-heading h2 { margin-bottom: 5px; }.journal-results-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.journal-scroll-hint { display: flex; align-items: center; gap: 8px; margin: -7px 0 10px; color: var(--muted); font-size: 9px; }.journal-scroll-hint .icon { width: 14px; color: var(--admin); }.journal-table-wrap { max-width: 100%; overflow: auto; padding-bottom: 8px; border: 1px solid var(--line); border-radius: 13px; scrollbar-gutter: stable both-edges; overscroll-behavior-inline: contain; }.journal-table { width: 100%; min-width: 1040px; border-collapse: separate; border-spacing: 0; font-size: 12px; }.journal-table th { position: sticky; top: 0; z-index: 4; min-width: 72px; padding: 9px 6px; color: #44514b; background: #f2f6f4; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; font-size: 11px; }.journal-table th + th, .journal-table td + td { border-left: 1px solid var(--line); }.journal-table td { padding: 8px 6px; background: #fff; border-bottom: 1px solid var(--line); vertical-align: top; text-align: center; }.journal-table tbody tr:last-child td { border-bottom: 0; }.journal-table tbody tr.has-debt td { background: #fff7f8; }
.journal-table .journal-student-column { width: 160px; min-width: 160px; position: sticky; left: 0; z-index: 3; text-align: left; }.journal-table th.journal-student-column { z-index: 6; background: #eef4f1; }.journal-table td.journal-student-column { background: #fbfcfb; }.journal-table tbody tr.has-debt td.journal-student-column { background: #fff1f3; }.journal-table .journal-attendance-column { width: 96px; min-width: 96px; }.journal-table .journal-score-column { width: 68px; min-width: 68px; padding-left: 5px; padding-right: 5px; }
.journal-table select, .journal-table textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #ccd7d1; border-radius: 8px; }.journal-table select { min-height: 36px; padding: 5px 5px; font-size: 12px; font-weight: 650; }.journal-table textarea { min-height: 48px; margin-top: 5px; padding: 6px; resize: vertical; font-size: 11px; line-height: 1.35; }.journal-table select:focus, .journal-table textarea:focus { border-color: var(--admin); outline: 2px solid color-mix(in srgb, var(--admin) 15%, transparent); }
.journal-student-cell { display: flex; align-items: center; gap: 8px; }.journal-student-cell > span:last-child, .journal-student-link { min-width: 0; }.journal-student-link { display: block; color: inherit; text-decoration: none; }.journal-student-link:hover strong { color: var(--admin); text-decoration: underline; text-underline-offset: 3px; }.journal-student-cell strong, .journal-student-cell small, .journal-student-link strong, .journal-student-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.journal-student-cell strong { font-size: 12px; }.journal-student-cell small { margin-top: 4px; color: var(--muted); font-size: 10px; }.journal-student-number { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--admin); border-radius: 8px; font-size: 10px; font-weight: 850; }
.journal-fill-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 5px; }.journal-fill-buttons button { min-width: 23px; height: 23px; padding: 1px 4px; color: var(--admin); background: #fff; border: 1px solid color-mix(in srgb, var(--admin) 25%, white); border-radius: 6px; cursor: pointer; font-size: 9px; font-weight: 850; }.journal-fill-buttons button:hover { color: #fff; background: var(--admin); }.journal-fill-buttons button:disabled { opacity: .35; cursor: not-allowed; }.journal-fill-buttons button:disabled:hover { color: var(--admin); background: #fff; }
.journal-grade-cell { width: 160px; min-width: 160px; }.journal-total-cell { min-width: 62px; }.journal-total-cell strong, .journal-total-cell small { display: block; }.journal-total-cell strong { color: var(--admin); font-size: 20px; }.journal-total-cell small { color: var(--muted); font-size: 9px; }
.journal-mastery-column { width: 112px; min-width: 112px; }.journal-mastery-column.is-hidden { display: none !important; }.journal-mastery-cell input { width: 72px; min-height: 36px; padding: 5px 7px; border: 1px solid #ccd7d1; border-radius: 8px; text-align: center; font-size: 14px; font-weight: 850; }.journal-mastery-cell small { display: block; margin-top: 6px; color: var(--admin); font-size: 9px; font-weight: 800; line-height: 1.4; }
.journal-mock-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 13px 14px; background: var(--admin-soft); border: 1px solid color-mix(in srgb, var(--admin) 24%, white); border-radius: 11px; }.journal-mock-note > span { min-width: 0; }.journal-mock-note strong, .journal-mock-note small { display: block; }.journal-mock-note strong { color: var(--admin); font-size: 11px; }.journal-mock-note small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.journal-file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.journal-file-section { min-width: 0; padding: 15px; background: #f8faf9; border: 1px solid var(--line); border-radius: 13px; }.journal-file-section > strong { display: block; margin-bottom: 11px; font-size: 11px; }.journal-file-list { display: grid; gap: 6px; margin-bottom: 10px; }
.journal-file-card { min-width: 0; display: flex; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }.journal-file-card > a { min-width: 0; display: flex; align-items: center; gap: 8px; flex: 1; padding: 9px; color: var(--ink); text-decoration: none; }.journal-file-card > a > .icon { width: 17px; color: var(--admin); }.journal-file-card > a > span { min-width: 0; }.journal-file-card strong, .journal-file-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.journal-file-card strong { font-size: 9px; }.journal-file-card small { margin-top: 3px; color: var(--muted); font-size: 7px; }.journal-file-card > button { width: 37px; display: grid; place-items: center; flex: 0 0 auto; color: var(--danger); background: #fff7f8; border: 0; border-left: 1px solid #f1d5da; cursor: pointer; }.journal-file-card > button .icon { width: 14px; }.journal-file-card > button:disabled { opacity: .4; cursor: not-allowed; }.journal-no-files { padding: 8px; color: var(--muted); text-align: center; font-size: 8px; }
.journal-file-input { min-height: 53px; display: flex; align-items: center; gap: 9px; padding: 10px; color: var(--admin); background: var(--admin-soft); border: 1px dashed color-mix(in srgb, var(--admin) 36%, white); border-radius: 10px; cursor: pointer; }.journal-file-input > .icon { width: 18px; }.journal-file-input span { min-width: 0; }.journal-file-input strong, .journal-file-input small { display: block; }.journal-file-input strong { font-size: 9px; }.journal-file-input small { margin-top: 3px; color: var(--muted); font-size: 7px; }.journal-file-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }.journal-file-input.is-disabled { opacity: .45; cursor: not-allowed; }
.journal-pending-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }.journal-pending-file { max-width: 100%; display: flex; align-items: center; gap: 5px; padding: 5px 6px; color: #126141; background: #e5f5ed; border-radius: 7px; font-size: 7px; }.journal-pending-file > span { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.journal-pending-file button { width: 17px; height: 17px; display: grid; place-items: center; padding: 0; color: #fff; background: #267654; border: 0; border-radius: 50%; cursor: pointer; }
.journal-save-bar { position: sticky; bottom: 13px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; color: #fff; background: rgba(28,45,37,.96); border: 1px solid rgba(255,255,255,.11); border-radius: 14px; box-shadow: 0 15px 40px rgba(20,35,28,.24); backdrop-filter: blur(12px); }.journal-save-bar > span { min-width: 0; }.journal-save-bar strong, .journal-save-bar small { display: block; }.journal-save-bar strong { margin-bottom: 3px; font-size: 11px; }.journal-save-bar small { color: rgba(255,255,255,.65); font-size: 8px; line-height: 1.4; }.journal-save-bar .button { min-width: 180px; background: var(--admin); }.journal-form.is-dirty .journal-save-bar { box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin) 45%, transparent), 0 15px 40px rgba(20,35,28,.24); }

/* Предупреждение о долгах с фиксированным четырнадцатидневным сроком */
.debt-warning-banner { margin: 0 0 18px; overflow: hidden; color: #742033; background: #fff7f8; border: 1px solid #efc0c9; border-radius: 14px; box-shadow: 0 8px 24px rgba(117,31,50,.07); }.debt-warning-banner summary { display: flex; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; list-style: none; }.debt-warning-banner summary::-webkit-details-marker { display: none; }.debt-warning-banner summary > span:nth-child(2) { min-width: 0; flex: 1; }.debt-warning-banner summary strong, .debt-warning-banner summary small { display: block; }.debt-warning-banner summary small { margin-top: 3px; color: #94616c; font-size: 10px; }.debt-warning-banner summary > b { min-width: 31px; height: 31px; display: grid; place-items: center; color: #fff; background: var(--danger); border-radius: 9px; }.debt-warning-icon { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--danger); border-radius: 50%; font-weight: 900; }.debt-warning-list { border-top: 1px solid #f1d2d8; }.debt-warning-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(140px, .8fr) minmax(160px, .8fr); gap: 12px; align-items: center; padding: 11px 15px; border-top: 1px solid #f7e4e7; }.debt-warning-row:first-child { border-top: 0; }.debt-warning-row span strong, .debt-warning-row span small { display: block; }.debt-warning-row span small { margin-top: 3px; color: #936873; font-size: 9px; }.debt-warning-deadline { text-align: right; }

/* Шкалы оценивания */
.grading-context { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; padding: 17px; }.grading-editor { padding: clamp(20px, 2.6vw, 30px); }.grading-max { max-width: 330px; margin-bottom: 16px; }.grading-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; }.grading-table { width: 100%; border-collapse: collapse; }.grading-table th, .grading-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: center; }.grading-table th { color: #53615a; background: #f2f6f4; font-size: 10px; }.grading-table tbody tr:last-child td { border-bottom: 0; }.grading-table input, .grading-table select { width: 100%; min-width: 78px; min-height: 38px; padding: 7px 8px; border: 1px solid #ccd7d1; border-radius: 8px; text-align: center; font-weight: 750; }.grading-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; }.grading-actions span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.teacher-day-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }.teacher-day-nav a { padding: 8px 10px; color: var(--admin); background: var(--admin-soft); border: 1px solid color-mix(in srgb, var(--admin) 20%, white); border-radius: 9px; text-decoration: none; font-size: 9px; font-weight: 850; }

/* Пробные экзамены */
.mock-context { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(280px, 1.6fr) minmax(180px, .8fr); gap: 12px; margin-bottom: 18px; padding: 17px; }.mock-layout { display: grid; grid-template-columns: minmax(280px, .42fr) minmax(560px, 1.58fr); gap: 18px; align-items: start; }.mock-list-panel, .mock-results-panel { min-width: 0; padding: clamp(18px, 2.4vw, 27px); }.mock-list-panel { position: sticky; top: 88px; }.mock-exam-list { display: grid; gap: 7px; margin-bottom: 20px; }.mock-exam-item { display: block; padding: 11px 12px; color: var(--ink); background: #f7faf8; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }.mock-exam-item.is-active { color: var(--admin); background: var(--admin-soft); border-color: color-mix(in srgb, var(--admin) 30%, white); }.mock-exam-item strong, .mock-exam-item small { display: block; }.mock-exam-item strong { font-size: 11px; }.mock-exam-item small { margin-top: 4px; color: var(--muted); font-size: 8px; }.mock-create-form { padding-top: 17px; border-top: 1px solid var(--line); }.mock-create-form h3 { margin: 0; font-size: 15px; }.mock-results-panel .panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }.mock-results-table input { width: 100%; min-height: 38px; padding: 7px 9px; border: 1px solid #ccd7d1; border-radius: 8px; }.mock-results-table td:first-child strong, .mock-results-table td:first-child small { display: block; }.mock-results-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: 9px; }.mock-results-table td:nth-child(2) { width: 130px; }.mock-results-table td:nth-child(3), .mock-results-table td:nth-child(4) { width: 90px; text-align: center; }.mock-save-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; }.mock-save-row span { color: var(--muted); font-size: 9px; }

@media (max-width: 1240px) {
    .users-layout { grid-template-columns: 1fr; }.user-form-panel { position: static; }.dashboard-grid { grid-template-columns: 1fr; }.quick-panel { display: grid; grid-template-columns: repeat(3, 1fr); column-gap: 18px; }.quick-panel .panel-heading { grid-column: 1 / -1; }.quick-action { border-top: 0; border-left: 1px solid var(--line); padding: 8px 0 8px 16px; }.quick-action:nth-of-type(1) { border-left: 0; padding-left: 0; }
    .family-layout { grid-template-columns: 1fr; }.family-parent-panel { position: static; }.family-parent-list { max-height: 330px; }.family-add-form { grid-template-columns: minmax(220px, 1fr) minmax(145px, .6fr) minmax(150px, .65fr); }.family-add-form .button { grid-column: 1 / -1; }.family-link-card { grid-template-columns: minmax(190px, 1fr) minmax(140px, .6fr) minmax(100px, .45fr); }.family-link-actions { grid-column: 1 / -1; justify-content: flex-end; }
    .catalog-layout { grid-template-columns: 1fr; }.catalog-form-panel { position: static; }
    .class-roster-layout { grid-template-columns: 1fr; }.roster-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }.enroll-panel:only-child { grid-column: 1 / -1; }.subject-membership-grid { grid-template-columns: 1fr; }
    .assignment-layout, .schedule-layout, .calendar-layout, .lesson-week-layout { grid-template-columns: 1fr; }.assignment-form-panel, .schedule-form-panel, .calendar-form-panel, .lesson-form-panel { position: static; }.schedule-grid { min-width: calc(72px + var(--schedule-days) * 155px); grid-template-columns: 72px repeat(var(--schedule-days), minmax(155px, 1fr)); }
    .teacher-dashboard-grid { grid-template-columns: 1fr; }.teacher-assignment-grid, .teacher-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .methodical-layout, .mock-layout { grid-template-columns: 1fr; }.methodical-editor, .mock-list-panel { position: static; }
    .journal-selector { grid-template-columns: repeat(3, minmax(150px, 1fr)); }.journal-selector .button { width: 100%; }
}

@media (max-width: 900px) {
    .auth-layout { grid-template-columns: 1fr; }.auth-intro { display: none; }.auth-panel { min-height: 100vh; padding: 20px; }.login-mobile-logo { display: grid; }
    .sidebar { transform: translateX(-104%); transition: transform .22s ease; }.sidebar-open .sidebar { transform: translateX(0); }.sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(18,15,16,.5); backdrop-filter: blur(2px); }.sidebar-open .sidebar-backdrop { display: block; }.app-main { margin-left: 0; }.menu-button { display: grid; }.topbar-name, .role-dot { display: none; }.page-content { padding-bottom: 96px; }.mobile-nav { height: 68px; position: fixed; inset: auto 0 0 0; z-index: 35; display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(14px); }.mobile-nav-link { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0 2px; color: #75807a; background: transparent; border: 0; text-decoration: none; font-size: 9px; cursor: pointer; }.mobile-nav-link .icon { width: 19px; height: 19px; }.mobile-nav-link.is-active { color: var(--admin); }.mobile-nav-link.is-disabled { opacity: .38; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }.quick-panel { display: block; }.quick-action, .quick-action:nth-of-type(1) { border-top: 1px solid var(--line); border-left: 0; padding: 14px 0; }
    .import-layout { grid-template-columns: 1fr; }
    .management-layout { grid-template-columns: 1fr; }.management-sidebar { position: static; }.entity-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .roster-actions { grid-template-columns: 1fr; }
    .plan-context, .lesson-context, .methodical-context, .grading-context, .mock-context { grid-template-columns: 1fr 1fr; }.lesson-context .field:last-of-type { grid-column: 1 / -1; }
    .journal-lesson-header { grid-template-columns: 90px minmax(0, 1fr) 90px; }.journal-file-grid { grid-template-columns: 1fr; }
    .journal-table-wrap { overflow: visible; border: 0; }.journal-table { min-width: 0; display: block; }.journal-table thead { display: none; }.journal-table tbody { display: grid; gap: 12px; }.journal-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }.journal-table tbody tr.has-debt { border-color: #efc2ca; background: #fff8f9; }.journal-table td, .journal-table td + td { min-width: 0; width: auto; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px; padding: 8px 6px; background: transparent !important; border: 0; border-bottom: 1px solid #edf0ee; text-align: left; }.journal-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 800; }.journal-table .journal-student-column, .journal-table .journal-attendance-column, .journal-table .journal-score-column { width: auto; min-width: 0; position: static; }.journal-table .journal-student-column { grid-column: 1 / -1; }.journal-table .journal-student-cell { display: flex; }.journal-table .journal-student-cell::before { display: none; }.journal-grade-cell { grid-template-columns: 108px minmax(0, 1fr) !important; }.journal-total-cell strong, .journal-total-cell small { display: inline; }.journal-total-cell small { margin-left: 4px; }
}

@media (max-width: 680px) {
    .debt-warning-row { grid-template-columns: 1fr; gap: 7px; }.debt-warning-deadline { text-align: left; }.debt-warning-banner summary { align-items: flex-start; }.debt-warning-banner summary > b { min-width: 27px; height: 27px; }
    .auth-panel { padding: 0; align-items: stretch; }.login-card { width: 100%; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; justify-content: center; }.simple-auth .login-card { min-height: auto; border-radius: 20px; }.role-grid { grid-template-columns: 1fr; }.role-card { padding: 18px; }.pending-card { padding: 28px 22px; }
    .topbar { height: 64px; padding: 0 14px; }.topbar-title small { display: none; }.page-content { padding: 22px 14px 92px; }.page-hero, .compact-hero { align-items: stretch; flex-direction: column; gap: 15px; }.page-hero h1 { font-size: 29px; }.year-pill { min-width: 0; width: 100%; }.stats-grid { gap: 10px; }.stat-card { padding: 14px; }.stat-icon { width: 38px; height: 38px; }.stat-card strong { font-size: 21px; }.stat-card small { font-size: 11px; }.setup-panel, .quick-panel, .user-form-panel, .users-list-panel { padding: 17px; border-radius: 16px; }.form-grid { grid-template-columns: 1fr; }.field-full { grid-column: auto; }.role-options { grid-template-columns: 1fr 1fr; }.filter-bar { grid-template-columns: 1fr 1fr; }.filter-bar .search-field { grid-column: 1 / -1; }.filter-bar .button { width: 100%; }.responsive-table thead { display: none; }.responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; }.table-wrap { border: 0; overflow: visible; }.responsive-table tr { margin-bottom: 12px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }.responsive-table td { display: grid; grid-template-columns: 82px 1fr; gap: 8px; padding: 8px 0; border: 0; text-align: left !important; }.responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: 10px; font-weight: 750; }.responsive-table .empty-cell { display: block; }.person-cell { min-width: 0; }.icon-action { justify-content: center; }.users-list-panel { background: transparent; border: 0; box-shadow: none; padding-left: 0; padding-right: 0; }.users-list-panel .panel-heading, .users-list-panel .filter-bar { padding-left: 2px; padding-right: 2px; }
    .people-subnav { flex-direction: column; }.people-subnav a { width: 100%; }.family-stats { grid-template-columns: 1fr; }.family-parent-panel, .family-links-panel { padding: 16px; }.family-search { grid-template-columns: 1fr 1fr; }.family-search input { grid-column: 1 / -1; }.family-add-form, .family-link-card { grid-template-columns: 1fr; }.family-add-form .button, .family-link-actions { grid-column: auto; }.family-link-actions { justify-content: stretch; }.family-link-actions .button { flex: 1; }.family-primary-check { padding: 4px 0; }
    .import-rules { grid-template-columns: 1fr; }.import-upload-panel, .import-help-panel, .import-preview-panel { padding: 17px; }.import-confirm { align-items: stretch; flex-direction: column; }.import-confirm .button { width: 100%; }
    .entity-list { grid-template-columns: 1fr; }.period-summary-grid, .subject-grid { grid-template-columns: 1fr; }.management-form-panel, .periods-panel, .groups-panel, .catalog-form-panel, .catalog-list-panel { padding: 17px; }.period-row, .group-card { align-items: flex-start; flex-wrap: wrap; }.period-copy, .group-copy { min-width: calc(100% - 55px); }.period-row .icon-action, .group-card .icon-action { margin-left: auto; }.year-filter { align-items: stretch; flex-direction: column; }.year-filter .field { width: 100%; }
    .roster-panel, .enroll-panel, .enrollment-edit-panel, .subject-membership-panel { padding: 17px; }.section-heading, .membership-heading, .membership-footer { align-items: stretch; flex-direction: column; }.effective-date { width: 100%; }.membership-row { grid-template-columns: 1fr; gap: 7px; }.membership-footer .button { width: 100%; }
    .plan-context, .lesson-context, .methodical-context { grid-template-columns: 1fr; }.lesson-context .field:last-of-type { grid-column: auto; }.assignment-list-panel, .assignment-form-panel, .schedule-board-panel, .schedule-form-panel, .calendar-list-panel, .calendar-form-panel, .lesson-form-panel, .lesson-day-card, .methodical-plan-panel, .methodical-editor { padding: 17px; }.assignment-card { align-items: flex-start; flex-wrap: wrap; }.assignment-copy { min-width: calc(100% - 105px); }.assignment-card .icon-action { margin-left: auto; }.schedule-toolbar, .swap-toolbar, .lesson-actions-panel { align-items: stretch; flex-direction: column; }.swap-toolbar .button, .lesson-actions-panel .button-row, .lesson-actions-panel form, .lesson-actions-panel .button { width: 100%; }.lesson-row { align-items: flex-start; flex-wrap: wrap; }.lesson-copy { min-width: calc(100% - 60px); }.lesson-status { margin-left: 54px; }.lesson-row > .icon { margin-left: auto; }.calendar-date-fields { grid-template-columns: 1fr; }
    .methodical-plan-heading { align-items: stretch; flex-direction: column; }.methodical-plan-heading .button { width: 100%; }.methodical-row { grid-template-columns: 36px minmax(0, 1fr); }.methodical-row-meta { grid-column: 2; justify-items: start; }.methodical-row > .icon { display: none; }.methodical-block-heading { align-items: flex-start; flex-direction: column; }.methodical-hierarchy-fields { grid-template-columns: 82px minmax(0, 1fr); }
    .journal-selector { grid-template-columns: 1fr; padding: 14px; }.journal-lesson-header { grid-template-columns: 1fr 1fr; gap: 11px; }.journal-lesson-title { grid-column: 1 / -1; grid-row: 1; justify-content: flex-start; }.journal-adjacent { grid-row: 2; }.journal-adjacent.is-next { justify-self: end; }.journal-adjacent span { display: none; }.journal-homework-grid { grid-template-columns: 1fr; }.journal-content-panel, .journal-results-panel, .journal-files-panel { padding: 17px; }.journal-content-panel .panel-heading { align-items: stretch; flex-direction: column; }.journal-mock-note { align-items: stretch; flex-direction: column; }.journal-mock-note .button { width: 100%; }.journal-table tr { grid-template-columns: 1fr; }.journal-table .journal-student-column { grid-column: auto; }.journal-table td, .journal-table td + td, .journal-grade-cell { grid-template-columns: 92px minmax(0, 1fr) !important; }.journal-save-bar { bottom: 75px; align-items: stretch; flex-direction: column; }.journal-save-bar .button { width: 100%; min-width: 0; }.journal-form { padding-bottom: 170px; }.grading-context, .mock-context { grid-template-columns: 1fr; }.grading-actions, .mock-save-row { align-items: stretch; flex-direction: column; }.grading-actions .button, .mock-save-row .button { width: 100%; }.teacher-day-nav { justify-content: flex-start; }
    .teacher-hero { padding: 19px; }.teacher-rule-banner { align-items: flex-start; }.teacher-timeline-panel, .teacher-week-panel { padding: 17px; }.teacher-lesson-row { align-items: flex-start; flex-wrap: wrap; }.teacher-lesson-copy { min-width: calc(100% - 140px); }.teacher-lesson-row > .status-badge { margin-left: 126px; }.teacher-assignment-grid, .teacher-module-grid, .teacher-period-grid { grid-template-columns: 1fr; }.teacher-section { margin-top: 28px; }
    .class-subject-actions, .class-subject-actions .button { width: 100%; }.class-subject-toolbar { align-items: stretch; flex-direction: column; }.class-subject-toolbar form { width: 100%; }.class-subject-students, .class-subject-lessons { padding: 17px; }.class-subject-table { min-width: 0; }.class-subject-table-wrap { max-height: none; overflow: visible; }.class-subject-lesson { align-items: flex-start; flex-wrap: wrap; }.class-subject-lesson-copy { min-width: calc(100% - 58px); }.class-subject-lesson > .status-badge { margin-left: 56px; }.class-subject-arrow { margin-left: auto; }
}

@media (max-width: 420px) {
    .topbar-user .avatar { display: none; }.stats-grid { grid-template-columns: 1fr 1fr; }.stat-card { gap: 9px; }.stat-icon { width: 34px; height: 34px; }.stat-icon .icon { width: 17px; }.role-options { grid-template-columns: 1fr; }.filter-bar { grid-template-columns: 1fr; }.filter-bar .search-field { grid-column: auto; }.mobile-nav-link span { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .membership-controls { grid-template-columns: 1fr; }
    .schedule-position-fields { grid-template-columns: 1fr; }.schedule-stats .stat-card strong { font-size: 17px; }.day-pill { flex: 1 0 48px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Цветовая тема родителя */
.app-shell[data-role="parent"] { --admin: var(--parent); --admin-dark: #593b53; --admin-soft: #f4eaf1; }
.app-shell[data-role="parent"] .sidebar { background: linear-gradient(180deg, #563b51, #392736); box-shadow: 12px 0 35px rgba(57,39,54,.14); }
.app-shell[data-role="parent"] .brand .brand-mark { color: var(--parent); }
.app-shell[data-role="parent"] .eyebrow { color: var(--parent); }
.app-shell[data-role="parent"] .role-dot { background: var(--parent); }

/* Универсальные отчёты */
.report-page-content { width: min(100%, 1660px); }
.report-hero { margin-bottom: 18px; }
.report-filters { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 13px; align-items: end; margin-bottom: 14px; padding: 17px; border-radius: 16px; }
.report-filters .field { gap: 5px; }.report-filters .field > span { font-size: 10px; }.report-filters select { min-height: 41px; padding: 8px 10px; font-size: 11px; }
.report-filters .button { min-height: 41px; }.report-check { min-height: 41px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; color: var(--muted); background: #f8faf9; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 750; }.report-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--admin); }
.report-tabs { display: flex; gap: 6px; margin: 0 0 18px; padding: 5px; overflow-x: auto; background: #e9efec; border-radius: 13px; scrollbar-width: thin; }.report-tabs a { min-width: max-content; display: flex; align-items: center; gap: 7px; padding: 9px 14px; color: #647069; border-radius: 9px; text-decoration: none; font-size: 11px; font-weight: 800; }.report-tabs a:hover { color: var(--admin); }.report-tabs a.is-active { color: #fff; background: var(--admin); box-shadow: 0 6px 18px color-mix(in srgb, var(--admin) 22%, transparent); }.report-tabs a span { min-width: 20px; padding: 2px 5px; color: var(--danger); background: #fff; border-radius: 999px; text-align: center; font-size: 8px; }.report-tabs > button { min-width: max-content; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 8px 11px; color: var(--admin); background: #fff; border: 1px solid color-mix(in srgb, var(--admin) 18%, white); border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 800; }.report-tabs > button .icon { width: 15px; }
.report-empty { padding: 34px; text-align: center; }.report-empty strong { display: block; margin-bottom: 7px; font-size: 18px; }.report-empty p { margin: 0; color: var(--muted); }.report-empty-mini { padding: 28px 10px; color: var(--muted); text-align: center; font-size: 11px; }

.report-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }.report-stat { min-width: 0; padding: 17px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 6px 22px rgba(30,43,36,.04); }.report-stat span, .report-stat strong, .report-stat small { display: block; }.report-stat span { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }.report-stat strong { margin: 7px 0 4px; color: var(--admin); font-size: 29px; letter-spacing: -.04em; }.report-stat small { color: #85908a; font-size: 9px; }.report-stat.is-danger { background: #fff7f8; border-color: #efc5cd; }.report-stat.is-danger strong { color: var(--danger); }
.report-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr); gap: 14px; margin-bottom: 14px; }.report-chart-card { min-width: 0; padding: 20px; }.report-chart-card header { margin-bottom: 12px; }.report-chart-card header small, .report-chart-card header strong { display: block; }.report-chart-card header small { margin-bottom: 4px; color: var(--admin); font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }.report-chart-card header strong { font-size: 15px; }
.report-trend { width: 100%; height: auto; min-height: 180px; overflow: visible; }.report-chart-grid { stroke: #e3e9e6; stroke-width: 1; }.report-chart-axis, .report-chart-label { fill: #7a8680; font-size: 10px; }.report-chart-line { fill: none; stroke: var(--admin); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }.report-chart-point { fill: #fff; stroke: var(--admin); stroke-width: 4; }
.report-donut-wrap { display: flex; align-items: center; justify-content: center; gap: 24px; min-height: 210px; }.report-donut { width: 154px; height: 154px; position: relative; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(#2c8c60 0 var(--p5), #5d8fca var(--p5) calc(var(--p5) + var(--p4)), #d9a348 calc(var(--p5) + var(--p4)) calc(var(--p5) + var(--p4) + var(--p3)), #c73f55 calc(var(--p5) + var(--p4) + var(--p3)) 100%); }.report-donut::after { content: ""; width: 94px; height: 94px; position: absolute; background: #fff; border-radius: 50%; }.report-donut > span { position: relative; z-index: 1; text-align: center; }.report-donut strong, .report-donut small { display: block; }.report-donut strong { font-size: 24px; }.report-donut small { color: var(--muted); font-size: 8px; }.report-legend { display: grid; gap: 7px; font-size: 9px; font-weight: 800; }.report-legend span::before { content: ""; width: 8px; height: 8px; display: inline-block; margin-right: 7px; border-radius: 3px; }.report-legend .g5::before { background: #2c8c60; }.report-legend .g4::before { background: #5d8fca; }.report-legend .g3::before { background: #d9a348; }.report-legend .g2::before, .report-legend .gr::before { background: #c73f55; }
.report-subject-card { padding: 21px; }.report-bars { display: grid; gap: 10px; }.report-bar-row { display: grid; grid-template-columns: minmax(120px, 190px) minmax(120px, 1fr) 45px; align-items: center; gap: 12px; font-size: 10px; }.report-bar-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }.report-bar-row > div { height: 9px; overflow: hidden; background: #edf2ef; border-radius: 999px; }.report-bar-row i { height: 100%; display: block; background: linear-gradient(90deg, var(--admin), color-mix(in srgb, var(--admin) 55%, #7bc69f)); border-radius: inherit; }.report-bar-row strong { color: var(--admin); text-align: right; }

.report-grade-panel, .report-table-panel, .report-final-panel { margin-bottom: 14px; padding: 20px; }.report-grade-scroll, .report-final-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }.report-grade-table, .report-final-table { width: 100%; min-width: max-content; border-collapse: separate; border-spacing: 0; font-size: 10px; }.report-grade-table th, .report-grade-table td, .report-final-table th, .report-final-table td { min-width: 88px; padding: 10px 9px; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; }.report-grade-table th, .report-final-table th { position: sticky; top: 0; z-index: 3; color: #5d6963; background: #f2f6f4; }.report-grade-table th:first-child, .report-grade-table td:first-child, .report-final-table th:first-child, .report-final-table td:first-child { border-left: 0; }.report-grade-table tbody tr:last-child td, .report-final-table tbody tr:last-child td { border-bottom: 0; }.report-grade-table th span, .report-grade-table th small { display: block; }.report-grade-table th small { margin-top: 3px; color: #8a958f; font-size: 7px; }.report-grade-table .report-person-column { width: 210px; min-width: 210px; position: sticky; left: 0; z-index: 2; text-align: left; }.report-grade-table th.report-person-column { z-index: 5; background: #edf3f0; }.report-grade-table td.report-person-column { background: #fbfcfb; }.report-grade-cell { white-space: nowrap; }.report-average-cell, .report-annual { color: var(--admin); font-size: 13px; font-weight: 850; }
.report-grade { display: inline-flex; align-items: center; justify-content: center; position: relative; margin: 1px 3px; padding: 2px; color: var(--ink); background: transparent; text-decoration: none; font-size: 19px; font-weight: 900; cursor: help; }.report-grade.is-excellent, .report-grade.is-good, .report-grade.is-neutral { color: var(--ink); background: transparent; }.report-grade.is-danger, .report-grade.is-debt { color: var(--danger); background: transparent; }.report-grade[data-tooltip]::after { content: attr(data-tooltip); width: 230px; position: absolute; left: 50%; bottom: calc(100% + 9px); z-index: 30; padding: 8px 10px; color: #fff; background: #26342d; border-radius: 8px; box-shadow: 0 8px 28px rgba(20,35,28,.24); opacity: 0; pointer-events: none; transform: translate(-50%, 4px); white-space: normal; font-size: 8px; font-weight: 650; line-height: 1.45; transition: opacity .14s, transform .14s; }.report-grade[data-tooltip]:hover::after, .report-grade[data-tooltip]:focus::after { opacity: 1; transform: translate(-50%, 0); }.report-no-grade, .report-not-applicable { color: #a5aea9; font-size: 16px; }.report-not-applicable { font-size: 11px; }

.report-summary-table td:not(:first-child), .report-summary-table th:not(:first-child) { text-align: center; }.report-brain-total { color: var(--admin); font-size: 16px; }.report-detail-list { display: grid; gap: 10px; }.report-detail { overflow: hidden; }.report-detail summary { display: flex; align-items: center; gap: 12px; padding: 15px 18px; cursor: pointer; list-style: none; }.report-detail summary::-webkit-details-marker { display: none; }.report-detail summary > span { min-width: 0; flex: 1; }.report-detail summary strong, .report-detail summary small { display: block; }.report-detail summary small { margin-top: 3px; color: var(--muted); font-size: 8px; }.report-detail summary b { min-width: 38px; color: var(--admin); font-size: 20px; text-align: right; }.report-detail[open] summary { background: var(--admin-soft); }.report-detail .table-wrap { margin: 0 16px 16px; }.report-detail td small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }.report-detail-link { min-width: 29px; height: 29px; display: inline-grid; place-items: center; color: #fff; background: var(--admin); border-radius: 8px; text-decoration: none; font-weight: 850; }

.report-debt-toolbar { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; }.report-debt-toolbar a { min-width: max-content; padding: 8px 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; font-size: 10px; font-weight: 800; }.report-debt-toolbar a.is-active { color: #fff; background: var(--danger); border-color: var(--danger); }.report-debt-table td:nth-child(4) { min-width: 190px; }.report-debt-table td:nth-child(5) { min-width: 260px; }.report-debt-table td:nth-child(5) strong, .report-debt-table td:nth-child(5) small { display: block; }.report-debt-table td:nth-child(5) small { margin-top: 5px; color: var(--muted); }.report-debt-value { display: inline; margin-right: 7px; color: var(--danger); background: transparent; font-size: 19px; font-weight: 900; }.report-open-lesson { min-height: 34px; padding: 7px 10px; font-size: 9px; }.report-readonly { color: #98a29d; font-size: 8px; }

.report-category-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }.report-category { min-width: 0; padding: 16px; border-top: 4px solid #9aa49f; }.report-category header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }.report-category header strong { min-width: 0; flex: 1; font-size: 11px; }.report-category header b { min-width: 30px; height: 30px; display: grid; place-items: center; color: #fff; background: #8b9690; border-radius: 9px; }.report-category > small { display: block; min-height: 26px; margin-bottom: 8px; color: var(--muted); font-size: 8px; line-height: 1.45; }.report-category.is-excellent { border-top-color: #25865a; }.report-category.is-excellent header b { background: #25865a; }.report-category.is-near { border-top-color: #5d8fca; }.report-category.is-near header b { background: #5d8fca; }.report-category.is-good { border-top-color: #7a62ba; }.report-category.is-good header b { background: #7a62ba; }.report-category.is-almost-good { border-top-color: #d39a37; }.report-category.is-almost-good header b { background: #d39a37; }.report-category.is-risk { border-top-color: var(--danger); }.report-category.is-risk header b { background: var(--danger); }.report-person-chips { display: flex; flex-wrap: wrap; gap: 5px; }.report-person-chips span { max-width: 100%; padding: 5px 7px; overflow: hidden; color: #56625c; background: #f0f4f2; border-radius: 7px; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }.report-list-empty { color: #9aa39f; font-size: 9px; }
.report-final-panel .panel-heading p { margin: 7px 0 0; font-size: 10px; }.report-final-table th:first-child, .report-final-table td:first-child { min-width: 210px; position: sticky; left: 0; z-index: 2; text-align: left; }.report-final-table th:first-child { z-index: 5; background: #edf3f0; }.report-final-table td:first-child { background: #fbfcfb; }.report-final-table td:nth-child(2) { min-width: 120px; text-align: left; }
.report-rule-note { margin-top: 15px; padding: 13px 15px; color: #59665f; background: #eef3f0; border-radius: 11px; font-size: 9px; line-height: 1.55; }.report-rule-note strong { color: var(--ink); }
.report-grade.is-draft { opacity: .58; text-decoration: underline dotted; text-underline-offset: 3px; }

@media (max-width: 1280px) {
    .report-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }.report-dashboard-grid { grid-template-columns: 1fr; }.report-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .report-filters { grid-template-columns: repeat(2, minmax(140px, 1fr)); }.report-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.report-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.report-grade-table .report-person-column, .report-final-table th:first-child, .report-final-table td:first-child { position: static; }.report-grade-table th, .report-final-table th { position: static; }
}
@media (max-width: 680px) {
    .report-filters { grid-template-columns: 1fr; padding: 13px; }.report-filters .button { width: 100%; }.report-tabs a { padding: 9px 11px; }.report-stat { padding: 14px; }.report-stat strong { font-size: 24px; }.report-dashboard-grid { gap: 10px; }.report-chart-card, .report-subject-card, .report-grade-panel, .report-table-panel, .report-final-panel { padding: 14px; }.report-donut-wrap { flex-direction: column; gap: 15px; }.report-legend { grid-template-columns: repeat(3, 1fr); }.report-bar-row { grid-template-columns: 90px minmax(90px, 1fr) 39px; gap: 7px; }.report-category-grid { grid-template-columns: 1fr; }.report-grade-table .report-person-column { min-width: 150px; }.report-detail .table-wrap { margin: 0 10px 10px; }
}
@media (max-width: 420px) {
    .report-stat-grid { grid-template-columns: 1fr 1fr; }.report-stat span { font-size: 7px; }.report-stat small { font-size: 8px; }.report-trend { min-height: 150px; }.report-legend { grid-template-columns: repeat(2, 1fr); }
}

@media print {
    @page { margin: 12mm; size: landscape; }
    body, .app-shell { background: #fff !important; }
    .sidebar, .topbar, .mobile-nav, .report-filters, .report-tabs, .report-rule-note { display: none !important; }
    .app-main { margin: 0 !important; }.page-content, .report-page-content { width: 100% !important; max-width: none !important; padding: 0 !important; }.report-hero { margin-bottom: 10px; }.report-hero p { display: none; }
    .panel, .report-stat { break-inside: avoid; box-shadow: none !important; }.report-grade-scroll, .report-final-scroll, .table-wrap { overflow: visible !important; }.report-grade-table, .report-final-table { min-width: 100% !important; font-size: 7px; }.report-grade-table th, .report-grade-table td, .report-final-table th, .report-final-table td { min-width: 0; padding: 5px 4px; }.report-grade-table .report-person-column { min-width: 110px; position: static; }.report-grade[data-tooltip]::after { display: none; }
}

/* Делегированные замены расписания */
.permission-hero,.schedule-change-hero{align-items:center}.permission-summary{display:flex;gap:40px;margin-bottom:14px}.permission-summary div{display:flex;align-items:baseline;gap:9px}.permission-summary strong{color:var(--admin);font-size:28px}.permission-summary span{color:var(--muted);font-size:10px;font-weight:750}.permission-filters{display:grid;grid-template-columns:minmax(220px,1fr) 220px auto;align-items:end;gap:12px;margin-bottom:14px}.permission-list{display:grid}.permission-row{display:grid;grid-template-columns:42px minmax(180px,1fr) minmax(210px,1fr) auto;align-items:center;gap:14px;padding:14px 4px;border-bottom:1px solid var(--line)}.permission-row:last-child{border-bottom:0}.permission-row.is-granted{background:linear-gradient(90deg,var(--admin-soft),transparent 55%)}.permission-person strong,.permission-person small,.permission-state small{display:block}.permission-person small,.permission-state small{margin-top:3px;color:var(--muted);font-size:8px}.permission-state{display:flex;flex-direction:column;align-items:flex-start}.status-muted{color:var(--muted);background:#eef2f0}

.schedule-change-context{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:12px;margin-bottom:12px}.schedule-change-week-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:12px;text-align:center}.schedule-change-week-nav>:last-child{justify-self:end}.schedule-change-days{display:flex;gap:7px;margin-bottom:12px;overflow-x:auto}.schedule-change-days .day-pill{min-width:70px;display:grid;gap:3px;padding:10px 13px;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:11px;text-align:center;text-decoration:none;font-size:9px;font-weight:850}.schedule-change-days .day-pill span{font-size:8px}.schedule-change-days .day-pill.is-active{color:#fff;background:var(--admin);border-color:var(--admin)}.schedule-change-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.85fr);align-items:start;gap:14px}.schedule-change-board,.schedule-change-form-panel{padding:16px}.schedule-change-board-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.schedule-change-board-head h2{margin:3px 0 0}.schedule-change-slots{display:grid;gap:7px}.schedule-change-slot{display:grid;grid-template-columns:48px minmax(0,1fr) 82px;align-items:stretch;min-height:66px;border:1px solid var(--line);border-radius:12px;overflow:hidden}.schedule-change-slot.has-lessons{border-color:#cbd8d1}.change-slot-number{display:grid;place-content:center;text-align:center;background:#f1f5f3}.change-slot-number strong{color:var(--admin);font-size:20px}.change-slot-number small{color:var(--muted);font-size:7px}.change-slot-content{display:grid;gap:5px;padding:7px}.change-slot-empty{align-self:center;color:#9aa49f;font-size:9px}.change-lesson-card{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;color:var(--ink);background:#fff;border:1px solid transparent;border-radius:9px;text-decoration:none}.change-lesson-card:hover{border-color:var(--admin);background:var(--admin-soft)}.change-lesson-card>span:first-child strong,.change-lesson-card>span:first-child small,.change-lesson-card em{display:block}.change-lesson-card small{margin-top:2px;color:var(--muted);font-size:8px}.change-lesson-card em{margin-top:3px;color:var(--admin);font-size:7px;font-style:normal;font-weight:850}.change-lesson-card.status-cancelled{opacity:.68}.change-lesson-card.is-locked{cursor:not-allowed}.change-slot-add{display:grid;place-content:center;gap:3px;color:var(--admin);background:var(--admin-soft);text-align:center;text-decoration:none;font-size:8px;font-weight:850}.change-slot-add svg{margin:auto}.schedule-change-form-panel{position:sticky;top:84px}.selected-change-lesson{display:grid;grid-template-columns:52px 1fr;align-items:center;gap:12px;margin-bottom:14px;padding:10px;background:#f5f7f6;border-radius:12px}.selected-change-lesson span:last-child strong,.selected-change-lesson span:last-child small{display:block}.selected-change-lesson small{margin-top:4px;color:var(--muted);font-size:8px}.schedule-position-fields{display:grid;grid-template-columns:1fr 95px;gap:10px}.change-form-actions{display:grid;grid-template-columns:1fr auto;gap:8px}.danger-action{padding:9px 12px;color:var(--danger);background:#fff;border:1px solid #e8becb;border-radius:10px;font:inherit;font-size:9px;font-weight:850;cursor:pointer}.schedule-rules{margin-top:14px;padding:12px 14px;color:#57635d;background:#f1f4f2;border-radius:11px;font-size:9px;line-height:1.55}.schedule-rules strong{color:var(--ink)}.schedule-rules p{margin:5px 0 0}.schedule-rules ul{margin:6px 0 0;padding-left:17px}.schedule-change-history{margin-top:14px}.change-history-list{display:grid}.change-history-row{display:grid;grid-template-columns:90px minmax(190px,1fr) minmax(220px,1.4fr);align-items:center;gap:14px;padding:11px 3px;border-bottom:1px solid var(--line)}.change-history-row:last-child{border-bottom:0}.change-history-row span strong,.change-history-row span small{display:block}.change-history-row span small{margin-top:3px;color:var(--muted);font-size:8px}.change-history-row p{margin:0;color:#56615b;font-size:9px}.change-type-badge{padding:6px 8px;color:var(--admin);background:var(--admin-soft);border-radius:8px;text-align:center;font-size:8px;font-weight:850}

@media(max-width:1000px){.schedule-change-layout{grid-template-columns:1fr}.schedule-change-form-panel{position:static}.permission-row{grid-template-columns:42px 1fr auto}.permission-state{grid-column:2}.permission-row form{grid-column:3;grid-row:1/3}}
@media(max-width:680px){.permission-filters,.schedule-change-context{grid-template-columns:1fr}.permission-summary{gap:18px}.permission-row{grid-template-columns:38px 1fr}.permission-row form,.permission-state{grid-column:2;grid-row:auto}.schedule-change-week-nav{grid-template-columns:1fr 1fr}.schedule-change-week-nav strong{grid-column:1/-1;grid-row:1}.schedule-change-slot{grid-template-columns:42px minmax(0,1fr)}.change-slot-add{grid-column:1/-1;min-height:34px}.change-history-row{grid-template-columns:80px 1fr}.change-history-row p{grid-column:1/-1}.change-form-actions{grid-template-columns:1fr}.schedule-position-fields{grid-template-columns:1fr 90px}}

/* Бурундук 3.0: архив, журнал и библиотечный учёт */
.archive-banner{display:flex;align-items:center;gap:12px;margin:0 0 16px;padding:14px 16px;color:#67481f;background:#fff6df;border:1px solid #ead39d;border-radius:14px}.archive-banner>.icon{width:22px;color:#9b6a22}.archive-banner span,.archive-banner strong,.archive-banner small{display:block}.archive-banner small{margin-top:3px;color:#806d52;font-size:11px;line-height:1.4}
.permission-table-panel{padding:18px}.permission-toggles{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:9px}.permission-toggle-form{display:grid;grid-template-columns:minmax(130px,1fr) auto;align-items:center;gap:10px;padding:10px 11px;background:#fff;border:1px solid var(--line);border-radius:11px}.permission-toggle-form span,.permission-toggle-form strong,.permission-toggle-form small{display:block}.permission-toggle-form small{margin-top:3px;color:var(--muted);font-size:9px}.permission-toggle-form .button{min-height:34px;padding:7px 10px;font-size:10px}
.bur-journal-table{min-width:1100px}.bur-journal-table th:nth-last-child(-n+3){min-width:118px}.bur-journal-table .journal-student-column{min-width:190px}.bur-journal-table select,.bur-journal-table textarea{width:100%;border:1px solid #d8cec2;border-radius:9px;background:#fff;color:var(--ink)}.bur-journal-table select{min-height:40px;padding:7px}.bur-journal-table textarea{min-width:210px;padding:9px;resize:vertical;line-height:1.35}.bur-journal-table .journal-grade-cell{min-width:74px}.bur-journal-table .journal-grade-cell select{font-size:16px;font-weight:850;text-align:center}.status-select.status-done{color:#2f6b36;background:#edf7e9}.status-select.status-not_done{color:#9b2f2f;background:#fff0ed}.status-select.status-not_assigned{color:var(--muted);background:#f6f2ed}.bur-comment-cell{min-width:230px}
.textbook-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.textbook-manage-grid{grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr)}.textbook-manage-grid hr{height:1px;margin:20px 0;border:0;background:var(--line)}.textbook-individual-panel{margin:18px 0;padding:22px}.textbook-mass-form{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr)) repeat(2,minmax(120px,.55fr)) auto;align-items:end;gap:10px;margin-bottom:12px;padding:13px;background:#faf7f2;border:1px solid var(--line);border-radius:13px}.textbook-ledger{margin-top:18px}.textbook-table{min-width:980px}.textbook-table .table-subline{display:block;margin-top:3px;color:var(--muted);font-size:9px}.inline-return{display:grid;grid-template-columns:130px 150px auto;align-items:center;gap:6px}.inline-return input,.inline-return select{min-height:34px;padding:6px 7px;border:1px solid #d8cec2;border-radius:8px}.inline-return .button{min-height:34px;padding:7px 10px;font-size:10px}
.topbar{background:rgba(248,244,238,.93);border-bottom-color:rgba(221,210,198,.9)}

@media(max-width:1180px){.permission-toggles{grid-template-columns:1fr}.textbook-mass-form{grid-template-columns:repeat(3,minmax(150px,1fr))}.textbook-mass-form .button{min-height:42px}.inline-return{grid-template-columns:1fr}}
@media(max-width:760px){.permission-table-panel{padding:14px}.permission-toggles{grid-column:1/-1;width:100%}.permission-toggle-form{grid-template-columns:1fr}.permission-toggle-form .button{width:100%}.textbook-stats{grid-template-columns:1fr}.textbook-manage-grid{grid-template-columns:1fr}.textbook-individual-panel{padding:16px}.textbook-mass-form{grid-template-columns:1fr}.bur-journal-table{min-width:0}.bur-comment-cell{min-width:0}}

@media print{.print-hidden,.archive-banner{display:none!important}.textbook-ledger{margin:0;padding:0;border:0;box-shadow:none}.textbook-table{min-width:100%;font-size:8px}.textbook-table th,.textbook-table td{padding:6px}.textbook-stats{display:none}}
