:root {
    color-scheme: light;
    --ink: #172b2d;
    --muted: #718081;
    --line: #dce4e0;
    --paper: #f4f7f3;
    --surface: #ffffff;
    --green: #147d68;
    --green-dark: #0e5e52;
    --lime: #d9f19b;
    --amber: #f5c66a;
    --rose: #f7e4d8;
    --mono: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
    font-family: "DM Sans", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(ellipse at 80% 0%, #e4f0df 0, transparent 34rem), var(--paper); }
a { color: inherit; }
button, input, select { font: inherit; }
.site-header { height: 78px; padding: 0 clamp(18px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; gap: 16px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; text-decoration: none; font: 800 18px/1.05 "Manrope", sans-serif; letter-spacing: 0; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--green); border-radius: 10px 3px 10px 3px; color: white; font: 800 20px "Manrope", sans-serif; }
.brand small, .user-name small { display: block; margin-top: 4px; color: var(--muted); font: 500 10px/1 "DM Sans", sans-serif; }

/* Header Centered Organisation Switcher */
.header-center { display: flex; align-items: center; justify-content: center; flex: 1; max-width: 460px; margin: 0 16px; }
.header-org-form { display: flex; align-items: center; width: 100%; max-width: 400px; }
.header-org-form select { 
    width: 100%; 
    height: 42px; 
    padding: 0 38px 0 16px; 
    border: 1.5px solid #c2d5c7; 
    border-radius: 8px; 
    background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Cpath%20fill%3D%22%23147d68%22%20d%3D%22M2%204l4%204%204-4z%22%2F%3E%3C%2Fsvg%3E") no-repeat calc(100% - 14px) center; 
    font-size: 13px; 
    font-weight: 700; 
    color: var(--ink); 
    cursor: pointer; 
    outline: none; 
    appearance: none; 
    -webkit-appearance: none;
    box-shadow: 0 2px 6px rgba(20, 125, 104, 0.08); 
    transition: all .16s ease; 
}
.header-org-form select:hover { 
    border-color: var(--green); 
    box-shadow: 0 3px 10px rgba(20, 125, 104, 0.14); 
    background-color: #fafdfa; 
}
.header-org-form select:focus { 
    border-color: var(--green); 
    box-shadow: 0 0 0 3px rgba(20, 125, 104, 0.2); 
    background-color: #ffffff; 
}
.header-org-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; background: #f2f7f3; border: 1px solid #cce0d1; border-radius: 6px; font-size: 13px; }
.header-org-badge strong { color: var(--ink); }

.header-account { display: flex; gap: 18px; align-items: center; flex-shrink: 0; }
.user-name { font-size: 13px; font-weight: 700; text-align: right; }
.online-dot { display: inline-block; width: 7px; height: 7px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--green); }
.inline-form { display: inline; }
.page-shell { max-width: 1440px; min-height: calc(100vh - 135px); margin: auto; padding: 48px clamp(18px, 5vw, 76px) 64px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.page-heading h1, .auth-copy h1, .setup-notice h1 { margin: 7px 0 10px; font: 800 clamp(30px, 4vw, 48px)/1.08 "Manrope", sans-serif; letter-spacing: 0; }
.page-heading h1 span { color: var(--green); }
.page-intro { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0; color: var(--green); font: 700 10px/1.4 var(--mono); letter-spacing: 0; text-transform: uppercase; }
.button { min-height: 42px; padding: 0 16px; display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid transparent; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-dark { background: var(--ink); color: white; }
.button-dark:hover { background: #294346; }
.button-accent { background: var(--green); color: white; }
.button-accent:hover { background: var(--green-dark); }
.button-quiet { min-height: 34px; padding: 0 10px; background: transparent; color: var(--muted); }
.button-line { border-color: var(--line); background: white; color: var(--ink); }
.button-full { width: 100%; margin-top: 6px; }
.admin-badge, .count-tag { padding: 7px 10px; border-radius: 3px; color: var(--green-dark); background: #e2f0de; font: 700 10px var(--mono); }
.schedule-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; }
.view-tabs { display: flex; padding: 3px; background: #f1f4f0; border-radius: 4px; }
.view-tabs a { padding: 8px 12px; border-radius: 3px; color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700; }
.view-tabs a.active { color: white; background: var(--green-dark); }
.date-filter { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.date-filter label { color: var(--muted); font-size: 11px; font-weight: 600; }
.date-filter input, .date-filter select { min-height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 3px; background: white; color: var(--ink); font-size: 12px; }
.date-filter .button { min-height: 38px; }
.legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend-upcoming { background: var(--lime); }.legend-completed { background: #c8d4d1; }.legend-break { background: var(--amber); }
.schedule-frame { overflow: hidden; border: 1px solid var(--line); background: white; box-shadow: 0 8px 26px rgba(23,43,45,.04); }
.table-scroll { overflow-x: auto; }
.timetable { width: 100%; min-width: 950px; border-collapse: collapse; table-layout: fixed; }
.timetable th, .timetable td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timetable thead th { height: 72px; padding: 10px 5px 8px; background: #f9fbf8; text-align: center; font: 700 10px var(--mono); }
.timetable thead th span { display: block; margin-bottom: 6px; color: var(--green-dark); }
.timetable thead th small { color: #495a5b; font: 600 10px/1.45 var(--mono); }
.timetable .row-heading { width: 140px; padding: 10px 13px; text-align: left; background: #f4f7f3; font-size: 12px; }
.timetable tbody .row-heading strong { display: block; }
.timetable tbody .row-heading small { display: block; margin-top: 4px; color: var(--muted); font: 10px var(--mono); }
.timetable td { height: 66px; padding: 8px; text-align: center; }
.lesson-cell b { display: block; font: 700 12px var(--mono); }
.lesson-cell b span { color: var(--green-dark); }
.lesson-cell small { display: block; margin-top: 5px; overflow: hidden; color: #617071; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lesson-cell.is-upcoming { background: #f3f8e8; }
.lesson-cell.is-completed { background: #e8eeeb; color: #62706d; }
.lesson-cell.is-open { background: #fff; }
.empty-dash { color: #bdc9c3; }
.break-column { width: 44px; background: #fff4dc !important; color: #8a641d; }
.timetable thead .break-column span { writing-mode: vertical-rl; margin: 0 auto 5px; }
.break-cell { width: 44px; padding: 3px !important; background: #fff3d7; color: #795919; }
.break-cell span { writing-mode: vertical-rl; font: 700 9px var(--mono); }
.empty-board { min-height: 280px; padding: 48px 24px; display: flex; align-items: center; flex-direction: column; justify-content: center; text-align: center; }
.empty-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px dashed #9bb1a4; border-radius: 50%; color: var(--green); font-size: 22px; }
.empty-board h2 { margin: 16px 0 5px; font: 700 18px "Manrope", sans-serif; }
.empty-board p, .empty-state { color: var(--muted); font-size: 12px; }
.empty-board .button { margin-top: 12px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 18px; align-items: start; }
.admin-column { display: grid; gap: 18px; }
.panel { padding: 20px; border: 1px solid var(--line); background: white; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.panel-heading h2 { margin: 5px 0 0; font: 700 18px "Manrope", sans-serif; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; }
.form-grid label, .compact-form label, .allocation-form label, .stack-form label { display: grid; gap: 6px; color: #526263; font-size: 11px; font-weight: 700; }
.form-grid input, .form-grid select, .compact-form input, .compact-form select, .allocation-form input, .allocation-form select, .stack-form input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: #fff; color: var(--ink); font-size: 12px; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; }
.input-suffix input { border: 0; }.input-suffix small { padding: 0 10px; color: var(--muted); font: 10px var(--mono); }
.break-builder { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > .button { justify-self: start; }
.compact-form { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.compact-form label { flex: 1 1 120px; }
.compact-form .button { min-height: 39px; }
.section-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.slot-summary { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 16px; }
.slot-summary span { padding: 6px 7px; background: #edf4e9; border-radius: 2px; color: #526263; font-size: 9px; }
.slot-summary b { margin-left: 3px; font-family: var(--mono); }.slot-summary .mini-break { background: #fff1d1; }
.simple-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 14px; }
.simple-list div { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; padding: 8px; background: #f7f9f6; font-size: 10px; }
.simple-list b { color: var(--green-dark); font: 700 10px var(--mono); }.simple-list span { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.simple-list small { grid-column: 2; overflow: hidden; color: var(--muted); text-overflow: ellipsis; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.tag-list span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 2px; color: #687777; font-size: 10px; }
.tag-list b { color: var(--green-dark); }
.allocation-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: end; }
.allocation-form .button { grid-column: 1 / -1; justify-self: start; }
.panel > .date-filter { margin-top: 14px; }.date-filter label { display: flex; align-items: center; gap: 8px; }
.allocation-list { margin-top: 14px; border-top: 1px solid var(--line); }
.allocation-list > div { min-height: 48px; display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid #edf0ed; }
.allocation-list time { color: var(--green-dark); font: 700 10px var(--mono); }.allocation-list span b, .allocation-list span small { display: block; }.allocation-list span b { font-size: 11px; }.allocation-list span small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.icon-button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 3px; color: #8b5143; background: white; cursor: pointer; font-size: 19px; }
.notice { margin-bottom: 20px; padding: 12px 15px; border-left: 3px solid var(--green); background: white; font-size: 12px; }.notice-error { border-color: #c15641; background: #fff6f2; }.notice-success { border-color: var(--green); background: #eff8e8; }
.auth-layout { max-width: 900px; min-height: 510px; margin: 20px auto; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); background: white; box-shadow: 0 12px 38px #172b2d0d; }
.auth-copy { padding: 52px 44px; display: flex; align-items: flex-start; flex-direction: column; justify-content: center; color: white; background: var(--green-dark); }
.auth-copy .eyebrow { color: var(--lime); }.auth-copy h1 { max-width: 360px; margin-top: 15px; }.auth-copy p:not(.eyebrow) { color: #d4e5dc; font-size: 13px; }.auth-copy span { color: #b0d0c0; font: 10px var(--mono); }
.auth-rule { width: 55px; height: 2px; margin: 28px 0 18px; background: var(--lime); }
.auth-panel { padding: 54px 48px; align-self: center; }.auth-panel h2 { margin: 6px 0 26px; font: 700 27px "Manrope", sans-serif; }.stack-form { display: grid; gap: 17px; }.auth-switch { margin: 21px 0 0; color: var(--muted); font-size: 11px; }.auth-switch a { color: var(--green-dark); font-weight: 700; }
.setup-notice { max-width: 680px; margin: 70px auto; padding: 40px; border: 1px solid var(--line); background: white; }.setup-notice p:last-child { color: var(--muted); line-height: 1.7; font-size: 13px; }
.site-footer { min-height: 56px; padding: 0 clamp(18px, 5vw, 76px); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #899492; font: 9px var(--mono); }.site-footer b { color: var(--green); }

/* Organisation Stats & Indicators */
.org-stats-inline { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.org-stats-inline span { padding: 2px 6px; background: #f2f6f2; border-radius: 3px; }
.org-stats-inline span strong { color: var(--green-dark); font-family: var(--mono); }
.full-grid-col { grid-column: 1 / -1; }
.timetable-filter-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Readable Form Organisation Indicator */
.form-active-org { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: #f5f8f5; border: 1px solid #dce8dd; border-left: 3px solid var(--green); border-radius: 4px; margin-bottom: 6px; }
.form-active-org-row { width: 100%; margin-bottom: 14px; }
.curriculum-card-form { display: flex; flex-direction: column; gap: 14px; }
.curriculum-inputs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; width: 100%; align-items: end; }
.curriculum-inputs-grid label { display: grid; gap: 6px; color: #526263; font-size: 11px; font-weight: 700; }
.curriculum-inputs-grid input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; outline: none; background: #fff; color: var(--ink); font-size: 12px; }
.form-active-org .eyebrow { font-size: 9px; margin-bottom: 2px; }
.form-active-org-content { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.form-active-org-content strong { color: var(--ink); }
.toolbar-org-indicator { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; background: #f2f7f3; border: 1px solid #d9e6da; border-radius: 4px; font-size: 12px; }
.toolbar-org-indicator strong { color: var(--ink); }

/* Admin Navigation & Controls */
.admin-nav { display: flex; gap: 8px; margin-bottom: 24px; padding: 6px; background: white; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
.admin-nav-item { display: inline-flex; align-items: center; gap: 9px; padding: 10px 15px; border-radius: 4px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700; transition: background .15s ease, color .15s ease; white-space: nowrap; }
.admin-nav-item:hover { background: #f3f7f2; color: var(--ink); }
.admin-nav-item .nav-num { font: 700 11px var(--mono); padding: 2px 6px; background: #ebf0ea; border-radius: 3px; color: var(--ink); }
.admin-nav-item .nav-badge { font: 600 10px var(--mono); color: var(--muted); background: #f0f4f1; padding: 2px 7px; border-radius: 12px; }
.admin-nav-item.active { background: var(--green-dark); color: white; }
.admin-nav-item.active .nav-num { background: rgba(255,255,255,.2); color: var(--lime); }
.admin-nav-item.active .nav-badge { background: rgba(255,255,255,.18); color: white; }

.heading-actions { display: flex; align-items: center; gap: 10px; }
.count-tag-group { display: flex; align-items: center; gap: 8px; }

/* Admin Grids */
.admin-grid-split { grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); }
.admin-grid-form-side { grid-template-columns: minmax(320px, .85fr) minmax(0, 1.35fr); }

/* Admin Data Tables */
.admin-table-wrapper { width: 100%; overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 4px; background: white; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th { padding: 10px 13px; background: #f9fbf8; color: var(--muted); font: 700 10px var(--mono); text-transform: uppercase; border-bottom: 1px solid var(--line); text-align: left; }
.admin-table td { padding: 10px 13px; border-bottom: 1px solid #edf0ed; color: var(--ink); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafcfa; }
.table-actions-col { width: 130px; text-align: right !important; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* Buttons & Badges */
.button-sm { min-height: 28px; padding: 0 9px; font-size: 11px; font-weight: 700; border-radius: 3px; }
.button-danger { background: #ba3927; color: white; border-color: #ba3927; }
.button-danger:hover { background: #962a1b; }
.button-danger-line { border-color: #ecc0b8; background: #fff8f7; color: #a82d1c; }
.button-danger-line:hover { background: #a82d1c; color: white; border-color: #a82d1c; }
.button-danger-sm { min-height: 28px; padding: 0 8px; font-size: 11px; font-weight: 700; border: 1px solid #ecc0b8; background: #fff8f7; color: #a82d1c; border-radius: 3px; cursor: pointer; transition: all .14s ease; }
.button-danger-sm:hover { background: #a82d1c; color: white; border-color: #a82d1c; }

.badge-code { display: inline-block; padding: 3px 6px; border-radius: 3px; background: #e3efe8; color: var(--green-dark); font: 700 11px var(--mono); }
.badge-sub { display: inline-block; margin-left: 4px; padding: 2px 5px; border-radius: 3px; background: #f0f3ef; color: #5a6b6c; font: 600 10px var(--mono); }
.tag-status { display: inline-block; padding: 2px 6px; border-radius: 2px; font: 700 9px var(--mono); }
.tag-period { background: #e4f3eb; color: var(--green-dark); }
.tag-break { background: #fff0d0; color: #8a641d; }
.time-pill { font: 700 11px var(--mono); color: var(--green-dark); }
.muted-name { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.muted-link { color: inherit; text-decoration: none; }
.muted-link:hover { text-decoration: underline; }

/* Edit Panel & Banners */
.panel-highlight { border-color: #d1b465; box-shadow: 0 4px 18px rgba(193, 150, 48, 0.09); }
.edit-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 13px; margin-bottom: 14px; background: #fff8eb; border: 1px solid #edd49e; border-left: 4px solid #c98818; border-radius: 3px; font-size: 12px; color: #6e4c0d; }
.edit-banner a { font-weight: 700; color: #6e4c0d; text-decoration: underline; }
.field-hint { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.panel-note { margin: -6px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.empty-state-card { padding: 32px 18px; text-align: center; border: 1px dashed var(--line); border-radius: 4px; background: #fbfdfa; }
.empty-state-card p { margin: 0 0 6px; color: var(--muted); font-size: 12px; }

/* Allocations Toolbar */
.allocation-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; padding: 12px 16px; background: white; border: 1px solid var(--line); border-radius: 4px; }
.allocation-toolbar .date-filter { margin-left: 0; }
.allocation-summary-pill { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.allocation-summary-pill span { color: var(--muted); }
.allocation-summary-pill strong { font-family: var(--mono); color: var(--green-dark); }
.compact-actions { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.form-actions-full { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; }

/* Admin Live Interactive Timetable & Toolbar */
.admin-schedule-toolbar { justify-content: space-between; gap: 14px; }
.toolbar-info-group { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.admin-interactive-timetable .interactive-cell { cursor: pointer; position: relative; transition: all .16s ease; outline: none; }
.admin-interactive-timetable .interactive-cell:hover, 
.admin-interactive-timetable .interactive-cell:focus-visible { box-shadow: inset 0 0 0 2px var(--green); transform: scale(1.01); z-index: 2; }
.admin-interactive-timetable .interactive-cell.has-lesson:hover { background: #e8f4ed; }
.admin-interactive-timetable .interactive-cell.is-empty { background: #fafcf9; }
.admin-interactive-timetable .interactive-cell.is-empty:hover { background: #f0f7ef; }
.cell-add-plus { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px dashed #b2c9bc; color: var(--green); font-size: 14px; font-weight: 700; margin: 0 auto; transition: all .15s ease; }
.admin-interactive-timetable .interactive-cell.is-empty:hover .cell-add-plus { border-color: var(--green); background: var(--green); color: white; transform: scale(1.1); }
.cell-edit-badge { position: absolute; top: 4px; right: 4px; font-size: 10px; color: var(--green-dark); opacity: 0; transition: opacity .15s ease; background: rgba(255,255,255,.9); border-radius: 2px; padding: 1px 3px; }
.admin-interactive-timetable .interactive-cell.has-lesson:hover .cell-edit-badge { opacity: 1; }

/* Modal Dialog */
.modal-backdrop { position: fixed; inset: 0; background: rgba(17, 33, 35, 0.65); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(2px); animation: modalFadeIn .16s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { background: white; border-radius: 6px; padding: 24px 28px; width: 94%; max-width: 500px; box-shadow: 0 18px 48px rgba(10, 24, 25, 0.28); position: relative; max-height: 90vh; overflow-y: auto; border: 1px solid var(--line); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.modal-header h2 { margin: 4px 0 0; font: 700 20px "Manrope", sans-serif; }
.modal-close { border: none; background: transparent; font-size: 26px; color: var(--muted); cursor: pointer; padding: 0 6px; line-height: 1; border-radius: 3px; }
.modal-close:hover { color: var(--ink); background: #edf2ee; }
.modal-fixed-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; background: #f6faf6; border: 1px solid #d8e5d9; border-radius: 4px; margin-bottom: 18px; }
.fixed-info-item { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.info-label { color: var(--muted); font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: 0.5px; }
.info-value { font-weight: 700; color: var(--ink); font-size: 12px; }
.badge-fixed-time { color: var(--green-dark); font-family: var(--mono); }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }

@media (max-width: 940px) {
    .admin-grid, .admin-grid-split, .admin-grid-form-side { grid-template-columns: 1fr; }
    .schedule-toolbar { gap: 12px; }
    .legend { width: 100%; }
}
@media (max-width: 860px) {
    .site-header { height: auto; min-height: 72px; padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
    .header-center { order: 3; width: 100%; max-width: 100%; margin: 2px 0 0; justify-content: stretch; }
    .header-org-form { width: 100%; justify-content: space-between; }
    .header-org-form select { flex: 1; max-width: none; }
}
@media (max-width: 640px) {
    .site-header { padding: 10px 14px; }.brand { font-size: 16px; }.brand-mark { width: 32px; height: 32px; }.user-name { font-size: 11px; }.header-account { gap: 6px; }
    .page-shell { padding: 30px 14px 42px; }.page-heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 23px; }.page-heading h1 { font-size: 33px; }.page-intro { max-width: 340px; line-height: 1.6; }
    .schedule-toolbar { align-items: flex-start; flex-direction: column; padding: 12px; }.date-filter { width: 100%; margin-left: 0; flex-wrap: wrap; }.date-filter input { flex: 1; min-width: 130px; }.date-filter label { width: 100%; }.legend { gap: 10px; }
    .panel { padding: 15px; }.form-grid, .allocation-form { grid-template-columns: 1fr; }.break-builder { grid-column: auto; }.form-grid > .button, .allocation-form .button { grid-column: auto; }.simple-list { grid-template-columns: 1fr; }
    .auth-layout { grid-template-columns: 1fr; margin: 0; }.auth-copy { min-height: 210px; padding: 28px; }.auth-copy h1 { font-size: 31px; }.auth-rule { margin: 14px 0; }.auth-copy span { display: none; }.auth-panel { padding: 32px 25px; }
    .site-footer { padding: 0 14px; font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }