:root { color-scheme: light; --ink:#17211b; --muted:#657269; --line:#dfe6e1; --paper:#fff; --wash:#f3f6f3; --green:#215c3d; --green-2:#dcecdf; --red:#9b352d; --red-2:#f5dfdc; }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.5 Inter,Segoe UI,Arial,sans-serif; color:var(--ink); background:var(--wash); }
a { color:var(--green); text-decoration:none; }
button,input,select { font:inherit; }
.topbar { height:64px; display:flex; align-items:center; gap:32px; padding:0 32px; background:#13261c; color:#fff; }
.brand { color:#fff; font-size:20px; font-weight:800; letter-spacing:.02em; }
.topbar nav { display:flex; gap:22px; }
.topbar nav a { color:#dce7df; }
.nav-toggle { display:none; min-height:38px; padding:0 13px; border:1px solid #6d8577; border-radius:8px; color:#fff; background:transparent; font-weight:700; cursor:pointer; }
.account { margin-left:auto; display:flex; align-items:center; gap:16px; color:#dce7df; }
.account form { margin:0; }
.link-button { border:0; background:none; color:#fff; cursor:pointer; padding:0; }
.page { max-width:1500px; margin:0 auto; padding:34px 32px 60px; }
.page-heading { display:flex; justify-content:space-between; align-items:end; margin-bottom:24px; }
h1,h2,p { margin-top:0; }
h1 { margin-bottom:0; font-size:34px; line-height:1.1; }
h2 { font-size:20px; }
.eyebrow { margin-bottom:6px; color:var(--green); font-size:12px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.muted,.hint { color:var(--muted); }
.hint { font-size:13px; }
.metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:20px; }
.metrics article,.panel { background:var(--paper); border:1px solid var(--line); border-radius:14px; box-shadow:0 8px 24px rgba(20,38,28,.04); }
.metrics article { padding:24px; display:flex; flex-direction:column; }
.metrics strong { font-size:34px; line-height:1; }
.metrics span { margin-top:8px; color:var(--muted); }
.panel { padding:26px; }
.narrow { max-width:620px; }
.button,button.primary,button.secondary { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 18px; border-radius:9px; font-weight:700; cursor:pointer; }
.primary { border:1px solid var(--green); background:var(--green); color:#fff; }
.secondary { border:1px solid #b9c8bd; background:#fff; color:var(--green); }
.stack { display:grid; gap:18px; }
label { display:grid; gap:7px; font-weight:700; }
input,select { min-height:42px; padding:8px 11px; border:1px solid #bdc8c0; border-radius:8px; background:#fff; color:var(--ink); }
.login-page { min-height:100vh; background:#e8ece7; }
.login-page .topbar { display:none; }
.login-page .page { max-width:none; min-height:100vh; padding:0; }
.login-shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr); }
.login-identity { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:space-between; min-height:100vh; overflow:hidden; padding:clamp(130px,18vh,190px) clamp(38px,7vw,112px) 48px; color:#f4f0e4; background:#153226; }
.login-identity::before { position:absolute; z-index:-2; inset:0; content:""; background:radial-gradient(circle at 86% 15%,rgba(220,193,119,.18),transparent 28%),linear-gradient(135deg,transparent 0 52%,rgba(255,255,255,.035) 52% 52.25%,transparent 52.25%); }
.login-identity::after { position:absolute; z-index:-1; width:520px; height:520px; right:-250px; bottom:-250px; content:""; border:1px solid rgba(234,218,169,.22); border-radius:50%; box-shadow:0 0 0 80px rgba(255,255,255,.018),0 0 0 160px rgba(255,255,255,.012); }
.login-mark { position:absolute; top:38px; left:clamp(38px,7vw,112px); display:grid; place-items:center; width:44px; height:44px; border:1px solid rgba(244,240,228,.45); font:700 22px/1 Georgia,serif; }
.login-copy { max-width:640px; }
.login-kicker { display:flex; align-items:center; gap:10px; margin-bottom:30px; color:#dcc179; font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; }
.login-kicker span { width:28px; height:1px; background:currentColor; }
.login-copy h1 { margin:0 0 28px; font:400 clamp(48px,5.6vw,82px)/.98 Georgia,"Times New Roman",serif; letter-spacing:-.045em; }
.login-copy>p:last-child { max-width:480px; margin:0; color:#bac8c0; font-size:17px; line-height:1.7; }
.login-note { margin:0; color:#91a69a; font-size:12px; letter-spacing:.04em; }
.login-access { display:flex; flex-direction:column; justify-content:center; padding:120px clamp(38px,8vw,130px) 64px; background:#f7f5ef; }
.login-form-heading { max-width:460px; margin-bottom:38px; }
.login-form-heading h2 { margin:0 0 12px; font:400 42px/1.08 Georgia,"Times New Roman",serif; letter-spacing:-.025em; }
.login-form-heading>p:last-child { margin:0; color:#718078; }
.login-form { display:grid; gap:22px; width:100%; max-width:460px; }
.login-form label { gap:9px; color:#30453a; font-size:13px; letter-spacing:.025em; }
.login-form input { min-height:54px; padding:12px 15px; border:1px solid #c9cec7; border-radius:2px; background:#fffefb; box-shadow:0 1px 0 rgba(17,46,32,.03); transition:border-color .18s,box-shadow .18s; }
.login-form input::placeholder { color:#9ca59f; }
.login-form input:focus { outline:none; border-color:#2f694d; box-shadow:0 0 0 3px rgba(47,105,77,.11); }
.login-submit { justify-content:space-between!important; min-height:56px!important; margin-top:4px; padding:0 20px!important; border-radius:2px!important; background:#173d2d!important; transition:background .18s,transform .18s; }
.login-submit:hover { background:#21543e!important; transform:translateY(-1px); }
.login-submit span { font-size:21px; font-weight:400; }
.login-help { max-width:460px; margin:26px 0 0; color:#7f8983; font-size:12px; }
.alert { margin-bottom:18px; padding:13px 16px; border-radius:9px; }
.alert.error { background:var(--red-2); color:var(--red); }
.alert.success { background:var(--green-2); color:var(--green); }
.alert.warning { background:#fff2cc; color:#6f5310; }
.filters { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-bottom:18px; padding:16px; background:#fff; border:1px solid var(--line); border-radius:12px; }
.filters label:first-child { min-width:360px; flex:1; }
.timetable-heading { margin-bottom:14px; }
.timetable-filters { margin-bottom:10px; padding:12px; }
.timetable-filters input,.timetable-filters select,.timetable-filters button { min-height:38px; }
.timetable-filters { grid-template-columns:repeat(6,minmax(135px,1fr)); }
.lesson-add-form { display:flex; align-items:end; gap:8px; margin-bottom:8px; }
.lesson-add-form label { display:grid; gap:4px; color:var(--muted); font-size:12px; }
.lesson-add-form input,.lesson-add-form button { min-height:38px; }
.timetable-summary { display:flex; align-items:center; gap:22px; margin-bottom:10px; padding:10px 14px; background:#173d2d; color:#fff; border-radius:10px; }
.timetable-summary>div { display:grid; gap:1px; }
.timetable-summary>div span { color:#b9cec1; font-size:11px; letter-spacing:.05em; text-transform:uppercase; }
.timetable-summary>div strong { font-size:14px; }
.attendance-legend { margin:0 0 0 auto; color:#d9e4dd; font-size:12px; white-space:nowrap; }
.attendance-legend span { display:inline-grid; place-items:center; width:21px; height:21px; margin-left:8px; border-radius:5px; font-size:15px; font-weight:800; }
.attendance-legend span:first-child { margin-left:0; }
.legend-present { color:#174d30; background:#dcecdf; }
.legend-absent { color:#8d2c26; background:#f5dfdc; }
.legend-empty { color:#657269; background:#f1f3f1; }
.table-shell { overflow:auto; max-height:calc(100vh - 360px); min-height:280px; background:#fff; border:1px solid var(--line); border-radius:10px; }
.table-shell:focus-visible { outline:3px solid rgba(33,92,61,.2); outline-offset:2px; }
.table-navigation { display:flex; align-items:center; justify-content:flex-end; gap:12px; margin:0 0 8px; }
.table-navigation[hidden] { display:none; }
.table-navigation-hint { margin-right:auto; color:var(--muted); font-size:12px; }
.table-navigation>div { display:flex; gap:7px; }
.table-navigation button { min-height:36px; padding:0 13px; }
.table-navigation button:disabled { opacity:.45; cursor:default; }
.report-table-shell { max-height:560px; min-height:0; }
.report-table { width:100%; border-collapse:collapse; }
.report-table th,.report-table td { padding:11px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.report-table th { position:sticky; top:0; background:#edf4f0; z-index:1; }
.timetable { width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
.timetable th,.timetable td { min-width:40px; height:42px; padding:3px; text-align:center; border-right:1px solid var(--line); border-bottom:1px solid var(--line); white-space:nowrap; }
.timetable th { position:sticky; top:0; z-index:3; height:48px; background:#e9f0eb; font-size:12px; }
.timetable .sticky-name { position:sticky; left:0; min-width:190px; max-width:190px; padding-left:10px; overflow:hidden; text-align:left; text-overflow:ellipsis; background:#fff; z-index:2; }
.timetable th.sticky-name { z-index:4; background:#e9f0eb; }
.timetable tfoot td { position:sticky; bottom:0; background:#f2f5f2; font-weight:800; }
.timetable tfoot .sticky-name { background:#f2f5f2; }
.timetable .group-divider th,.timetable .group-divider td { background:#dce9df; color:var(--green); font-weight:800; }
.timetable .group-divider .sticky-name { z-index:2; background:#dce9df; }
.timetable .group-divider td:last-child { text-align:left; color:var(--muted); font-size:12px; }
.timetable .no-lesson { color:#b4bcb7; background:#f7f8f7; }
.timetable .compact-empty { padding:16px!important; }
.lesson-column { width:40px; }
.lesson-day { display:block; font-size:15px; line-height:16px; }
.lesson-month { display:block; color:var(--muted); font-size:9px; line-height:12px; }
.price-column, .balance-column { min-width:88px!important; }
.finance-total { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:0 0 14px; padding:16px 18px; border-radius:10px; background:#173d2d; color:#fff; }
.finance-total span,.account-balance span { font-size:12px; color:#b9cec1; }
.finance-total strong { font-size:26px; }
.account-balance { display:grid; gap:2px; min-width:120px; text-align:right; }
.account-balance strong { font-size:18px; }
.archived-accounts { margin:14px 0; }
.total-column { min-width:52px!important; }
.attendance { width:30px; height:30px; padding:0; border-radius:6px; border:1px solid var(--line); font-size:18px; font-weight:800; cursor:pointer; }
.attendance.present { color:var(--green); background:var(--green-2); border-color:#9fc5a7; }
.attendance.absent { color:var(--red); background:var(--red-2); border-color:#dfaaa5; }
.attendance.unmarked { color:#8b968f; background:#f6f7f6; }
.bulk-bar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:8px; padding:10px 12px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.bulk-bar label,.bulk-actions { display:flex; align-items:center; gap:7px; }
.bulk-bar b { display:inline-grid; place-items:center; width:19px; height:19px; border-radius:50%; color:#fff; background:var(--green); font-size:11px; }
.bulk-bar select { min-width:135px; }
.bulk-step,.bulk-bar label>span,.bulk-actions>span { color:var(--muted); font-size:12px; }
.bulk-selection-count { margin-left:auto; color:var(--muted); font-size:12px; }
.bulk-selection-count.field-error { color:var(--red); font-weight:700; }
.record-link { align-self:center; white-space:nowrap; }
.child-card-grid { align-items:start; }
.record-list.compact article { grid-template-columns:1fr; gap:3px; }
.child-action-form { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.enrollment-list { display:grid; gap:8px; }
.enrollment-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid var(--line); border-radius:8px; }
.enrollment-item>div { display:grid; gap:3px; }
.enrollment-item span { color:var(--muted); font-size:12px; }
.enrollment-item form { display:flex; gap:6px; align-items:center; }
.enrollment-item input,.enrollment-item button { min-height:36px; }
.enrollment-item.inactive { background:#f5f6f5; opacity:.75; }
.select-column { min-width:42px!important; width:42px; }
.teacher-replacements { margin-bottom:8px; padding:0 12px; background:#fff; border:1px solid var(--line); border-radius:8px; }
.teacher-replacements summary { padding:9px 0; color:var(--green); font-size:13px; font-weight:700; cursor:pointer; }
.teacher-replacements-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px; padding:2px 0 12px; }
.teacher-replacements-grid label { display:grid; grid-template-columns:42px 1fr; align-items:center; gap:6px; font-size:12px; }
.schedule-form { display:grid; grid-template-columns:1fr 150px 150px auto; gap:10px; align-items:end; padding:2px 0 8px; }
.schedule-form>label { display:grid; gap:4px; color:var(--muted); font-size:12px; }
.weekday-picker { display:flex; flex-wrap:wrap; align-items:center; gap:7px; }
.weekday-picker>span { width:100%; color:var(--muted); font-size:12px; }
.weekday-picker label { display:flex; align-items:center; gap:3px; min-height:38px; padding:0 8px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.weekday-picker input { width:auto; min-height:auto; }
.schedule-note { margin:0 0 10px; font-size:12px; }
.teacher-select { width:100%; min-height:32px; padding:4px 7px; font-size:12px; font-weight:400; }
.empty { padding:40px!important; color:var(--muted); }
.two-columns { display:grid; grid-template-columns:1fr 420px; gap:20px; align-items:start; }
.user-list { display:grid; }
.user-list>div { display:grid; grid-template-columns:1fr 180px 180px; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); }
.user-list span { color:var(--muted); }
.audit-list { padding:0 24px; }
.audit-list article { display:grid; grid-template-columns:150px 130px 160px 1fr; gap:14px; align-items:start; padding:14px 0; border-bottom:1px solid var(--line); }
.audit-list time,.audit-list span { color:var(--muted); }
.audit-list code { overflow-wrap:anywhere; white-space:normal; }
.record-list article { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:15px 0; border-bottom:1px solid var(--line); }
.record-list article>div { display:grid; gap:4px; }
.record-list span { color:var(--muted); }
.lead-list { display:grid; gap:14px; }
.lead-card { position:relative; }
.lead-details { display:grid; grid-template-columns:1.1fr 1.1fr 1.8fr 150px; gap:18px; margin-bottom:18px; }
.lead-details>div { display:grid; align-content:start; gap:3px; }
.lead-details span,.lead-details small { color:var(--muted); }
.lead-details span { font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.lead-approval { display:grid; grid-template-columns:2fr 2fr 170px 160px auto; gap:10px; align-items:end; padding-top:16px; border-top:1px solid var(--line); }
.lead-match-warning { margin:12px 0 0; }
.lead-reject { margin-top:10px; }
.lead-quick-create { margin:14px 0; padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#f8faf8; }
.lead-quick-create summary { cursor:pointer; font-weight:750; color:var(--green); }
.lead-quick-create>p { margin:8px 0 0; }
.lead-quick-create-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; padding-top:14px; }
.lead-quick-create-grid form { padding:13px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.max-chat-layout { display:grid; grid-template-columns:330px 1fr; gap:18px; align-items:start; }
.max-dialog-list { display:grid; gap:4px; max-height:72vh; overflow:auto; padding:10px; }
.max-dialog-list a { display:grid; gap:3px; padding:12px; border-radius:9px; color:var(--ink); }
.max-dialog-list a.active { background:var(--green-2); }
.max-dialog-list span,.max-dialog-list small,.max-chat-heading span { color:var(--muted); }
.max-chat-panel { padding:0; overflow:hidden; }
.max-chat-heading { display:grid; padding:18px 22px; border-bottom:1px solid var(--line); }
.max-chat-history { display:flex; flex-direction:column; gap:10px; min-height:380px; max-height:58vh; overflow:auto; padding:20px; }
.max-bubble { max-width:72%; padding:11px 14px; border-radius:12px; background:#eef2ef; }
.max-bubble.outgoing { align-self:flex-end; background:var(--green-2); }
.max-bubble p { margin:0; white-space:pre-wrap; }
.max-bubble footer { margin-top:5px; color:var(--muted); font-size:11px; }
.max-bubble .link-button { color:var(--red); font-size:12px; }
.max-reply-form { display:grid; grid-template-columns:1fr auto; gap:10px; padding:16px 20px; border-top:1px solid var(--line); }
.max-reply-form textarea { min-height:74px; padding:10px; border:1px solid #bdc8c0; border-radius:8px; resize:vertical; }
.directory-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.directory-grid .wide { grid-column:1/-1; }
.directory-grid ul { min-height:60px; max-height:220px; overflow:auto; margin:0 0 18px; padding-left:20px; color:var(--muted); }
.inline-form,.group-form { display:flex; gap:9px; }
.inline-form input { flex:1; }
.group-form { display:grid; grid-template-columns:1.2fr 1fr 1fr 140px 1fr auto; }
.columns-list { columns:3; }
.group-directory-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:360px; margin-bottom:18px; overflow:auto; }
.group-directory-list article { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px; border:1px solid var(--line); border-radius:8px; }
.group-directory-list article>div { display:grid; min-width:0; }
.group-directory-list article span { overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.group-directory-list form { display:flex; gap:6px; }
.group-directory-list select,.group-directory-list button { min-height:36px; }
.payment-public { background:#f4f1e9; }
.payment-public .topbar { justify-content:center; }
.payment-public .brand { font-family:Georgia,"Times New Roman",serif; font-size:24px; }
.payment-public .page { display:grid; place-items:start center; padding-top:64px; }
.payment-card { width:min(100%,620px); padding:38px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 20px 60px rgba(23,61,45,.09); }
.payment-card h1 { margin:4px 0 12px; font:400 42px/1.05 Georgia,"Times New Roman",serif; }
.payment-form { display:grid; gap:18px; margin:28px 0 20px; }
.payment-form label { display:grid; gap:7px; }
.payment-form input,.payment-form select { min-height:50px; }
.payment-form button { min-height:52px; }
.payment-legal { margin:0; color:var(--muted); font-size:12px; line-height:1.55; }
@media (max-width:1000px) { .topbar { position:relative; z-index:20; height:auto; min-height:64px; flex-wrap:wrap; gap:12px; padding:12px 16px; } .brand { order:1; } .nav-toggle { display:inline-flex; order:2; margin-left:auto; align-items:center; } .account { order:3; margin-left:0; } .topbar nav { display:none; order:4; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; gap:2px 12px; padding:10px 0 4px; border-top:1px solid #365044; } .topbar nav.open { display:grid; } .topbar nav a { padding:8px 6px; } }
@media (max-width:800px) { .metrics { grid-template-columns:repeat(2,1fr); } .page { padding:24px 12px; } .login-shell { grid-template-columns:1fr; } .login-identity { min-height:42vh; padding:120px 28px 36px; } .login-copy h1 { font-size:48px; } .login-copy>p:last-child { font-size:15px; } .login-note { display:none; } .login-access { min-height:58vh; padding:54px 28px; } .login-form-heading h2 { font-size:36px; } .timetable-filters label,.filters label:first-child { min-width:min(100%,260px); width:100%; } .timetable-summary { align-items:flex-start; flex-wrap:wrap; gap:10px 18px; } .attendance-legend { width:100%; margin-left:0; } .table-shell { max-height:62vh; } .table-navigation { position:sticky; top:0; z-index:6; padding:7px; border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.96); } .table-navigation-hint { display:none; } .table-navigation>div { width:100%; } .table-navigation button { flex:1; } .timetable .sticky-name { min-width:165px; max-width:165px; } .lead-details,.lead-approval,.lead-quick-create-grid,.schedule-form,.max-chat-layout,.max-reply-form { grid-template-columns:1fr; } .max-dialog-list { max-height:240px; } .max-bubble { max-width:90%; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; transition:none!important; } }
.child-card-link { color: #174b36; text-decoration: underline; text-underline-offset: 3px; }
.child-tariff { display: block; margin-top: 5px; font-weight: 400; white-space: normal; }
.benefit-badge { display: block; width: fit-content; padding: 3px 6px; margin-top: 5px; background: #fff0a8; color: #614b00; border-radius: 5px; font-size: 12px; white-space: normal; }
.timetable .benefit-row .sticky-name { background: #fffbed; }
.child-note { margin-top: 5px; font-size: 12px; font-weight: 400; white-space: normal; }
.child-note summary { cursor: pointer; }
.child-note-form textarea { width: 100%; min-height: 64px; box-sizing: border-box; }
.child-note-form [role="status"] { display: block; white-space: normal; }
.admin-link-command { display: block; overflow-wrap: anywhere; padding: 12px; background: #f0f5f2; }
.site-admin-form { display:grid; gap:14px; }
.site-admin-form label { display:grid; gap:6px; }
.site-admin-form textarea { width:100%; padding:10px; border:1px solid var(--line); border-radius:8px; resize:vertical; }
.site-admin-form h2 { margin:18px 0 0; }
.site-admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.site-doc-admin { margin-top:18px; }
.site-doc-admin .inline-form { flex-wrap:wrap; align-items:end; }
.site-doc-admin .inline-form input,.site-doc-admin .inline-form select { min-width:210px; flex:1; }
.site-document-list { display:grid; margin-top:18px; }
.site-document-list>div { display:grid; grid-template-columns:1fr 1fr auto; gap:12px; align-items:center; padding:11px 0; border-top:1px solid var(--line); }
.site-document-list span { color:var(--muted); font-size:12px; }
@media (max-width:800px) { .site-admin-grid,.site-document-list>div { grid-template-columns:1fr; } }
