:root{font-family:Manrope,system-ui,sans-serif;color:#253b34;background:#f6f7f4;font-size:15px;--accent:#28644f;--muted:#596a60;--line:#e0e6dd;--control:46px}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;scroll-padding-bottom:110px}body{margin:0;min-height:100vh;min-height:100dvh}button,input,select,textarea{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid #d3ddd2;border-radius:9px;background:white;color:inherit;padding:10px 14px;min-height:var(--control);font-weight:600;line-height:1.4}@media (hover: hover) and (pointer: fine){button:hover,.call-button:hover{background:#edf3e9}}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:white}@media (hover: hover) and (pointer: fine){button.primary:hover{background:#1e503e}}a{color:inherit;text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.date-control:focus-within{outline:3px solid #91b8a1;outline-offset:3px}::selection{background:#c7dfc9}input,select,textarea{width:100%;max-width:100%;min-width:0;min-height:var(--control);border:1px solid #c8d4c4;border-radius:9px;padding:10px;background:white;color:#253b34;caret-color:var(--accent);font-size:16px}input[type=date],input[type=time]{appearance:none;-webkit-appearance:none}textarea{resize:vertical}small{font-size:12px;color:var(--muted);font-weight:400}p{line-height:1.6;color:var(--muted)}h1,h2,h3{margin:0;overflow-wrap:anywhere}h1{font-size:34px;font-weight:700;letter-spacing:-1px;line-height:1.2}h2{font-size:18px;letter-spacing:-.3px}h3{font-size:16px}main,section,article,.lesson>div{min-width:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
/* Navigation and page frame */
aside{position:fixed;inset:0 auto 0 0;width:232px;background:#edf0e9;padding:32px 23px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;font-size:25px;font-weight:800;letter-spacing:-1px}.mark{background:var(--accent);color:white;border-radius:12px;width:37px;height:40px;display:grid;place-items:center;margin-right:11px;font-size:29px}.brand-dot{color:#43836b}.owner{margin:36px 0 26px;font-weight:700;font-size:14px;line-height:1.8}nav{display:grid;gap:7px}nav a{display:flex;gap:12px;align-items:center;padding:13px;border-radius:9px;font-weight:600;color:var(--muted)}nav a.active{background:#dce5d9;color:#214f3c}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.side-bottom{margin-top:auto;font-size:12px;line-height:1.8;color:var(--muted)}main{margin-left:232px;padding:22px 36px;max-width:1560px}.demo{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted);min-height:40px}.demo span{color:var(--muted)}#export{margin-left:auto;border:0;background:transparent;font-size:12px;padding:7px;min-height:40px}header{display:flex;align-items:center;justify-content:space-between;margin:26px 0 24px;gap:16px}header>div{min-width:0}#dateLabel{font-size:12px;color:var(--muted);margin-bottom:7px}.subtext{font-size:13px;line-height:1.6;margin:0 0 14px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:26px}.panel{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.panel-head{padding:18px 20px;display:flex;justify-content:space-between;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.panel-head small{white-space:nowrap}.empty{padding:28px 20px;color:var(--muted);font-size:14px}.tabs{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}.tabs button.selected{background:#dce5d9;border-color:#bbcdb7}.day-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:16px;max-width:490px}.day-controls button,.date-control{height:var(--control);min-height:var(--control);padding:8px;font-size:14px;border-radius:9px}.date-control{position:relative;display:flex;align-items:center;justify-content:center;border:1px solid #c8d4c4;background:white;font-weight:600;white-space:nowrap}.date-control input{position:absolute;inset:0;opacity:0;width:100%;height:100%;padding:0;cursor:pointer}
/* Pupil directory: price, schedule, balance, contact and actions in tight groups. */
.grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.student{background:white;border:1px solid var(--line);padding:16px;border-radius:12px;min-width:0}.student-top{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:center}.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#e6eee1;color:#426b4a;font-weight:700;font-size:12px}.student h2{font-size:16px;line-height:1.4;letter-spacing:-.3px}.student-price{font-size:13px;font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}.student-schedule{font-size:13px;line-height:1.6;margin:8px 0 9px;overflow-wrap:anywhere}.student-balance{display:flex;gap:7px;flex-wrap:wrap;align-items:center;font-size:12px;padding:8px 0;border-top:1px solid #edf0ea}.student-balance>span:first-child{color:var(--muted)}.student-balance strong{font-weight:600}.student-debt{color:#80551c}.student-parent{font-size:13px;line-height:1.5;margin:6px 0 9px;overflow-wrap:anywhere}.student-actions{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:8px;align-items:center}.student-actions button,.call-button{min-height:var(--control);font-size:12px;padding:9px 8px;line-height:1.4;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:9px}.call-button{border:1px solid #d3ddd2;background:#f2f6ef;color:#28644f;font-weight:600}.no-phone{font-size:12px;color:var(--muted);line-height:1.5;text-align:center}.parent-contact{display:grid;gap:3px;font-size:14px;margin:12px 0;line-height:1.5}.parent-contact small{font-size:13px}.phone-link{display:inline-flex;align-items:center;color:#28644f;font-weight:600;min-height:var(--control);text-decoration:underline;text-underline-offset:3px;width:fit-content}.detail{padding:22px}.detail p{font-size:14px;overflow-wrap:anywhere}.detail h2{margin-bottom:12px}.detail .tabs{display:flex}.back{margin-bottom:14px}.summary-line{display:flex;justify-content:space-between;gap:15px;font-size:14px;line-height:1.6;padding:12px 0;border-bottom:1px solid var(--line)}.summary-line strong{font-variant-numeric:tabular-nums}.summary-line span{min-width:0}
/* Lessons and timetable */
.lesson{padding:18px 20px;border-bottom:1px solid #edf0eb;display:grid;grid-template-columns:57px minmax(0,1fr);gap:14px}.lesson:last-child{border:0}.time{font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.4}.time small{display:block;font-size:12px;margin-top:3px;white-space:nowrap}.student-line{display:flex;justify-content:space-between;gap:10px;align-items:start}.student-line h3{line-height:1.4}.pill{display:inline-block;padding:3px 7px;border-radius:6px;font-size:12px;font-weight:600;line-height:1.5;background:#eef2ec;color:#46634d}.pill.due{background:#fff2df;color:#825a22}.pill.done{background:#e6f1e9;color:#2d6442}.lesson-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0 10px;font-size:13px;line-height:1.6}.direction{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:5px;font-size:12px;line-height:1.5;font-weight:600}.direction::before{content:'';width:5px;height:5px;background:currentColor;border-radius:50%;flex-shrink:0}.direction.speech{background:#e7eee5;color:#355b3b}.direction.prep{background:#ece9f8;color:#5b4787}.direction.club{background:#e8edf4;color:#3e5975}.actions{display:flex;flex-wrap:wrap;gap:8px}.actions button{font-size:13px;min-height:var(--control);padding:9px 12px}.rail{padding-top:3px}.rail h2{margin-bottom:15px}.note{background:#e8eee2;border-radius:12px;padding:20px;margin-top:22px}.note p{font-size:13px;margin:9px 0 0;color:#4d6350}.week-wrap{overflow:auto}.week{display:grid;grid-template-columns:repeat(5,minmax(155px,1fr));gap:10px}.week-day{background:#edf1e9;border-radius:10px;padding:10px;min-height:220px}.week-day h3{font-size:13px;padding:4px 2px 12px}.week-event{display:block;width:100%;text-align:left;border:1px solid #dfe6db;border-radius:8px;padding:11px;margin-bottom:8px;line-height:1.5;font-size:13px}.week-event:last-child{margin-bottom:0}.week-event .event-time{display:block;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums}.event-time small{display:block;font-size:12px;font-weight:400;margin-top:2px}.event-info{min-width:0}.event-info b{display:block;margin:6px 0;font-size:14px;overflow-wrap:anywhere}.week-event.speech-event{background:#f5f8f2;border-color:#d7e2d1}.week-event.prep-event{background:#f6f3fc;border-color:#e1d9f0}.week-event.club-event{background:#f2f5fa;border-color:#dae2ec}@media (hover: hover) and (pointer: fine){.week-event:hover{filter:brightness(.98)}}.event-members{display:block;line-height:1.5;margin-top:5px;font-size:12px}.attendance{margin:9px 0}.attendance>div{display:flex;align-items:center;gap:6px;border-bottom:1px solid #e5e9e2;padding:5px 0;font-size:13px;flex-wrap:wrap}.attendance>div>span{flex:1;min-width:65px}.attendance button{min-height:var(--control);font-size:12px;padding:8px}.attendance button[aria-pressed=true]{background:#dce9db;border-color:#7f9d7c}
/* Payments and forms */
table{border-collapse:collapse;width:100%;font-size:14px}th,td{text-align:left;padding:16px 18px;border-bottom:1px solid var(--line)}th{font-size:12px;color:var(--muted);font-weight:500}td:last-child{font-variant-numeric:tabular-nums}.form-panel{background:#edf2e9;border:1px solid #d6e1d0;border-radius:12px;padding:22px;margin-bottom:22px;scroll-margin-top:16px}.form-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:16px 0}label{display:grid;gap:6px;font-size:13px;line-height:1.5}.form-panel p{font-size:13px;line-height:1.6}footer{display:flex;justify-content:space-between;margin-top:26px;color:var(--muted);font-size:12px;padding:18px 0}#toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#253b34;color:white;border-radius:10px;padding:14px 20px;font-size:14px;line-height:1.5;display:none;z-index:20;max-width:calc(100vw - 32px)}
@media(max-width:1250px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.layout{grid-template-columns:minmax(0,1fr)}.rail{display:none}main{padding:22px 26px}}
@media(max-width:900px) and (min-width:701px){.grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:700px){
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}aside{inset:auto 0 0;width:100%;height:calc(68px + env(safe-area-inset-bottom));z-index:10;padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));background:#fff;border-top:1px solid var(--line)}.brand,.owner,.side-bottom{display:none}nav{display:flex;justify-content:space-around;gap:3px}nav a{flex:1;min-width:0;flex-direction:column;font-size:12px;gap:3px;min-height:52px;padding:5px 3px;line-height:1.5}nav svg{width:22px;height:22px}main{margin:0;padding:9px 14px calc(88px + env(safe-area-inset-bottom))}.demo{font-size:12px;min-height:38px;gap:8px}.demo span{display:none}#export{font-size:12px;min-height:38px;padding:5px 4px}header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;margin:12px 0 18px;align-items:center}#dateLabel{font-size:12px;margin-bottom:5px;line-height:1.5}h1{font-size:26px;letter-spacing:-.7px}header button{max-width:120px;font-size:13px;height:var(--control);min-height:var(--control);padding:6px 10px;line-height:1.2}h2{font-size:17px}h3{font-size:16px}.subtext{font-size:13px;margin:0 0 12px}.panel-head{padding:13px 14px}.empty{padding:23px 16px;font-size:14px}.tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.tabs button{font-size:13px;min-height:var(--control);padding:8px}.day-controls{gap:7px;max-width:none;margin-bottom:14px}.day-controls button,.date-control{font-size:14px;height:var(--control);padding:7px}
.grid{grid-template-columns:minmax(0,1fr);gap:10px}.student{padding:13px 14px}.student h2{font-size:17px}.student-top{gap:8px;grid-template-columns:32px minmax(0,1fr) auto}.avatar{width:32px;height:32px;font-size:12px}.student-price{font-size:14px}.student-schedule{font-size:13px;margin:6px 0 7px}.student-balance{font-size:13px;padding:7px 0 3px}.student-parent{font-size:13px;margin:6px 0 8px}.student-actions button,.call-button{font-size:13px;height:var(--control);padding:8px}.no-phone{font-size:12px}.detail{padding:18px 15px}.detail p{font-size:14px}.detail .tabs{display:flex}.summary-line{font-size:14px;padding:10px 0}.parent-contact{font-size:14px}.parent-contact small{font-size:13px}
.lesson{grid-template-columns:54px minmax(0,1fr);gap:10px;padding:15px 13px}.time{font-size:15px}.time small{font-size:12px}.student-line{flex-direction:column;gap:5px;align-items:flex-start}.student-line h3{font-size:16px}.pill{font-size:12px;padding:2px 6px}.lesson-meta{font-size:13px;gap:6px;margin:7px 0 9px}.direction{font-size:12px;padding:2px 6px}.lesson .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 7px}.lesson .actions button{font-size:13px;min-height:var(--control);padding:8px 6px}.lesson .actions button[data-action=complete]{grid-column:1;grid-row:1}.lesson .actions button[data-action=pay]{grid-column:2;grid-row:1}.lesson .actions button[data-action=move]{grid-column:1;grid-row:2}.lesson .actions button[data-action=cancel]{grid-column:2;grid-row:2}.lesson .actions button[data-action=move],.lesson .actions button[data-action=cancel]{background:transparent;border-color:transparent;color:var(--muted)}.lesson .actions:not(:has([data-action=pay])) button[data-action=complete]{grid-column:1/-1}.week-wrap{overflow:visible}.week{grid-template-columns:minmax(0,1fr);gap:12px}.week-day{min-height:0;padding:10px}.week-day h3{font-size:14px;padding:2px 2px 10px}.week-event{display:flex;align-items:center;gap:12px;min-height:70px;padding:10px 11px;margin-bottom:7px}.week-event .event-time{width:53px;flex-shrink:0;font-size:15px}.event-time small{font-size:12px}.event-info b{font-size:15px;margin:0 0 4px}.event-members{font-size:12px}.attendance button{font-size:12px}
.payment-table,.payment-table tbody{display:block;width:100%}.payment-table thead{display:none}.payment-table tr{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:14px;border-bottom:1px solid var(--line)}.payment-table tr:last-child{border:0}.payment-table td{display:block;padding:0;border:0;min-width:0;font-size:14px;overflow-wrap:anywhere}.payment-table td:first-child{grid-column:1/-1;font-size:15px;font-weight:700}.payment-table td[data-label]::before{content:attr(data-label);display:block;font-size:12px;font-weight:400;color:var(--muted);margin-bottom:3px}.balance-table tr{grid-template-columns:1fr 1fr 80px;align-items:center}.balance-table td:first-child{grid-column:1/3}.balance-table td:nth-child(2){grid-column:1;grid-row:2}.balance-table td:nth-child(3){grid-column:2;grid-row:2}.balance-table td:last-child:has(button){grid-column:3;grid-row:1/3}.payment-table button{width:100%;font-size:13px;min-height:var(--control);padding:8px}.form-panel{padding:17px 14px}.form-fields{grid-template-columns:minmax(0,1fr);gap:12px;margin:14px 0}.form-panel label{font-size:13px}.form-panel .actions button{flex:1}.form-panel input,.form-panel select{height:var(--control)}footer{margin-top:18px;padding:12px 0;font-size:12px}footer span{display:none}#toast{bottom:calc(84px + env(safe-area-inset-bottom));width:max-content}
}
@media(max-width:370px){main{padding-left:11px;padding-right:11px}h1{font-size:23px}header button{max-width:105px;font-size:12px}.student-top{grid-template-columns:28px minmax(0,1fr) auto;gap:6px}.avatar{width:28px;height:28px}.student h2{font-size:16px}.student-price{font-size:13px}.student-actions{grid-template-columns:1.3fr 1fr}.student-actions button,.call-button{font-size:12px}.lesson{grid-template-columns:49px minmax(0,1fr);gap:8px;padding:14px 11px}.time small{font-size:12px}.lesson .actions button{font-size:12px}.tabs button{font-size:12px}.day-controls button,.date-control{font-size:13px}.balance-table tr{grid-template-columns:1fr 1fr 68px;gap:6px}}

/* The name is a semantic button; its hit area covers the pupil tile. */
.student{position:relative}.student-open{position:static;display:inline;background:transparent;border:0;border-radius:0;padding:0;min-height:0;height:auto;font:inherit;font-weight:inherit;line-height:inherit;color:inherit;text-align:left}.student-open::after{content:'';position:absolute;inset:0;border-radius:12px;z-index:1}@media (hover: hover) and (pointer: fine){.student-open:hover{background:transparent}}@media (hover: hover) and (pointer: fine){.student:has(.student-open:hover){border-color:#a4b89e;background:#fcfdfb}}.student-open:focus-visible{outline:none}.student-open:focus-visible::after{outline:3px solid #91b8a1;outline-offset:3px}.student-actions{display:flex;justify-content:space-between;gap:12px;min-height:46px;margin-top:5px}.student-actions .student-parent{margin:0;flex:1}.student-actions .call-button{position:relative;z-index:2;flex-shrink:0;min-width:105px}.student-actions .no-phone{max-width:110px;text-align:right}.student-actions .student-open{height:auto;min-height:0}
.finance-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.month-filter{max-width:240px;margin-bottom:16px}.finance-report .panel-head strong{font-size:22px;white-space:nowrap}.finance-lines{padding:4px 20px}.finance-lines>div{display:flex;justify-content:space-between;align-items:start;gap:20px;padding:13px 0;border-bottom:1px solid var(--line);font-size:14px;line-height:1.5}.finance-lines>div:last-child{border:0}.finance-lines strong{white-space:nowrap;font-variant-numeric:tabular-nums}.finance-lines .finance-sub{font-size:13px;color:var(--muted);padding:8px 0 8px 14px;border:0}.finance-total{color:#28644f;font-weight:700}.finance-explanation{margin:16px 0;font-size:13px;max-width:75ch}.receipt-row{display:flex;justify-content:space-between;gap:18px;padding:16px 20px;border-bottom:1px solid var(--line);font-size:14px;line-height:1.6}.receipt-row:last-child{border:0}.receipt-row>div:first-child{flex:1;min-width:0}.receipt-row small,.receipt-row span{display:block;font-size:12px;color:var(--muted);margin-top:3px}.receipt-row>strong,.receipt-row>div:last-child>strong{white-space:nowrap;font-variant-numeric:tabular-nums}.receipt-row button{display:block;margin-top:8px;font-size:12px}.report-day{border:0;border-radius:0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:15px;width:100%;padding:14px 20px;font-size:14px;text-align:left}.report-day:last-child{border:0}.history-note{font-size:12px;line-height:1.6;margin:8px 0;color:var(--muted)}#syncStatus{font-size:12px;color:#426b4a}#logout{font-size:12px;border:0;background:transparent;padding:7px;min-height:38px}.sync-warning{padding:16px;background:#fff2df;color:#734e1b;border-radius:10px;line-height:1.6;font-size:14px;margin-bottom:14px}.auth-page{display:grid;place-items:center;min-height:100dvh;padding:24px;background:#edf0e9}.login-box{width:100%;max-width:400px;background:white;border-radius:16px;padding:32px}.login-mark{display:grid;place-items:center;width:44px;height:46px;background:var(--accent);color:white;font-size:32px;font-weight:700;border-radius:12px;margin-bottom:25px}.login-box h1{font-size:29px}.login-box p{font-size:14px}.login-box form{display:grid;gap:16px;margin:24px 0 10px}.login-box small{line-height:1.7}.login-box #error{color:#903c2f;margin:0;min-height:0}.login-box input{height:48px}.login-box button{height:48px}
@media(max-width:700px){.finance-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-report .panel-head{align-items:start}.finance-report .panel-head h2{font-size:16px}.finance-report .panel-head strong{font-size:20px}.finance-lines{padding:2px 14px}.finance-lines>div{gap:12px;font-size:13px;padding:12px 0}.receipt-row{padding:14px;font-size:13px;gap:12px}.report-day{padding:14px;font-size:14px}.month-filter{max-width:100%}.demo{flex-wrap:wrap;gap:2px 7px}.demo #syncStatus{display:inline;font-size:11px}.demo>span:not(#syncStatus){display:none}#export{margin-left:auto}#logout{min-height:38px;font-size:12px}.login-box{padding:26px}.finance-explanation{font-size:13px}}
#exportDevice{font-size:12px;padding:0 7px;min-height:38px;border:0;background:transparent;color:var(--muted);text-decoration:underline;text-underline-offset:3px}footer{flex-wrap:wrap;gap:8px}
.detail-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.detail-heading h2{margin:0}.detail-heading button{font-size:12px;padding:8px 10px}.check-label{display:flex;align-items:center;gap:9px;line-height:1.5}.check-label input{width:20px;min-height:20px;height:20px;flex-shrink:0;accent-color:var(--accent)}
/* Each activity owns one full-card color; no repeated category badges. */
.week-day{background:#eef0ec}.week-event.speech-event,.lesson.speech-event{background:#e5efdf;border-color:#cddfc5}.week-event.prep-event,.lesson.prep-event{background:#eee5f7;border-color:#dcccE9}.week-event.neuro-event,.lesson.neuro-event{background:#e0edf7;border-color:#c3d9eb}.week-event.math-event,.lesson.math-event{background:#f7edce;border-color:#e7d8aa}.week-event.club-event,.lesson.club-event{background:#f6e4db;border-color:#e7cbbd}.week-event .event-info b{margin-bottom:0}.week-event .event-members{margin-top:6px;color:#4f6056}.lesson-meta:empty{display:none}@media (hover: hover) and (pointer: fine){.week-event:hover{filter:brightness(.97)}}.week-event:focus-visible{outline:3px solid #28644f;outline-offset:2px}
@media(min-width:701px){.week-event{padding:13px 12px;min-height:105px}.week-event .event-info b{margin-top:9px}}
@media(max-width:700px){.week-event{min-height:65px;padding:10px 11px}.week-event .event-info b{margin:0}.week-event .event-members{margin-top:4px}}
/* Pupil directory: one compact row per child, no card grid. */
.pupils-wrap{border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden}.pupils-table{width:100%;table-layout:fixed;border-collapse:collapse}.pupils-table th{font-size:12px;padding:12px 14px;background:#edf1e9;color:#526459;font-weight:600}.pupils-table th:first-child{width:20%}.pupils-table th:nth-child(2){width:29%}.pupils-table th:nth-child(3){width:11%}.pupils-table th:nth-child(4){width:14%}.pupils-table th:nth-child(5){width:20%}.pupils-table th:last-child{width:60px}.pupils-table td{padding:9px 14px;font-size:13px;line-height:1.5;vertical-align:middle;overflow-wrap:anywhere;border-bottom:1px solid #e8ece5}.pupils-table tbody tr{cursor:pointer}.pupils-table tbody tr:last-child td{border-bottom:0}@media (hover: hover) and (pointer: fine){.pupils-table tbody tr:hover{background:#f0f5ec}}.pupils-table tbody tr:focus-within{background:#eef4e9}.pupils-table small{display:block;font-size:12px;line-height:1.5;margin-top:2px}.pupil-open{background:transparent;border:0;border-radius:4px;padding:0;min-height:44px;text-align:left;font-weight:700;font-size:14px;line-height:1.5;display:block;width:100%}@media (hover: hover) and (pointer: fine){.pupil-open:hover{background:transparent}}.pupil-price{font-weight:600;font-variant-numeric:tabular-nums}.pupil-price>span{font-size:12px;font-weight:400}.muted{color:var(--muted)}.pupil-call-link{display:flex;width:44px;height:44px;align-items:center;justify-content:center;color:#28644f;border-radius:8px}@media (hover: hover) and (pointer: fine){.pupil-call-link:hover{background:#dfead8}}.pupil-call-link svg{width:19px;height:19px}.phone-missing{display:block;text-align:center}.pupils-table .pupil-call{padding:6px 8px}.pupils-table .pupil-balance small.student-debt{color:#80551c}
@media(max-width:1050px) and (min-width:701px){.pupils-table td,.pupils-table th{padding-left:10px;padding-right:10px}.pupils-table th:first-child{width:22%}.pupils-table th:nth-child(2){width:27%}.pupils-table th:nth-child(5){width:18%}}
@media(max-width:700px){.pupils-table,.pupils-table tbody{display:block;width:100%}.pupils-table thead{display:none}.pupils-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:2px 10px;padding:10px 12px;border-bottom:1px solid var(--line);align-items:center}.pupils-table tbody tr:last-child{border-bottom:0}.pupils-table td{display:block;border:0;padding:0;min-width:0}.pupils-table .pupil-name{grid-column:1;grid-row:1}.pupil-open{font-size:15px;min-height:28px}.pupils-table .pupil-price{grid-column:2;grid-row:1;font-size:14px;white-space:nowrap}.pupils-table .pupil-call{grid-column:3;grid-row:1/4;padding:0;align-self:center}.pupils-table .pupil-slot{grid-column:1/3;grid-row:2;color:var(--muted);font-size:12px;line-height:1.6}.pupil-slot small{display:inline;margin-left:7px;font-size:12px}.pupils-table .pupil-balance{grid-column:1;grid-row:3;font-size:12px;line-height:1.5}.pupil-balance::before{content:'Аванс: ';color:var(--muted)}.pupil-balance:has(>.muted:only-child)::before{content:'Аванс: '}.pupils-table .pupil-parent{grid-column:2;grid-row:3;font-size:12px;text-align:right;max-width:135px}.pupil-parent small{display:none}.pupil-balance small{display:block}.pupil-call-link{height:46px;width:44px;background:#eff4e9}.pupil-price>span{font-size:12px}.pupils-wrap{border-radius:10px}}
@media(max-width:370px){.pupils-table tbody tr{gap:2px 7px;padding:10px}.pupils-table .pupil-parent{max-width:105px}.pupil-open{font-size:14px}}
@media(max-width:700px){.pupils-table .pupil-price{text-align:right}.pupil-balance.no-billing::before{content:none}.pupil-balance.no-billing>.muted{display:none}}
@media(max-width:700px){.pupils-table .pupil-balance.no-billing::before{content:none}}
/* Time and pupil share the first line; each participant opens their own card. */
.week .week-event{display:grid;grid-template-columns:53px minmax(0,1fr);gap:10px;align-items:start;padding:8px 10px;min-height:66px;text-align:left}.week .event-time{width:auto;background:transparent;border:0;border-radius:5px;padding:6px 0;min-height:46px;text-align:left;font-size:14px;line-height:1.4;font-weight:700;white-space:nowrap}.week .event-time small{font-size:11px;line-height:1.5;margin-top:1px;white-space:nowrap}.week .event-info{min-width:0;padding:0}.event-title,.event-person{background:transparent;border:0;border-radius:4px;padding:4px 0;min-height:32px;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere;color:inherit}.event-title{display:block;width:100%;font-size:14px;font-weight:700;margin:1px 0 0}.week .event-members{margin:0;font-size:12px;line-height:1.5;display:flex;flex-wrap:wrap;gap:0 9px}.event-members .event-person{font-size:12px;font-weight:400;min-height:32px;padding:5px 0}.event-names{padding-top:1px;line-height:1.5}.event-primary-person{font-size:14px;font-weight:700;min-height:32px;display:inline;padding:4px 0}.event-join{font-size:13px}@media (hover: hover) and (pointer: fine){.event-title:hover,.event-person:hover{background:transparent;text-decoration:underline;text-underline-offset:3px}}@media (hover: hover) and (pointer: fine){.week .week-event:hover{filter:none}}@media (hover: hover) and (pointer: fine){.week .event-time:hover{background:rgba(255,255,255,.3)}}
@media(max-width:700px){.week .week-event{padding:8px 11px;grid-template-columns:55px minmax(0,1fr);min-height:64px}.event-primary-person,.event-title{font-size:15px}.week .event-time{font-size:15px}.week .event-time small{font-size:12px}.event-members .event-person{font-size:13px;min-height:36px}}
.week .week-event:has(.event-members) .event-info{display:contents}.week .week-event:has(.event-members) .event-title{grid-column:2;grid-row:1}.week .week-event .event-members{grid-column:1/-1;gap:0 10px;margin-top:0}.week .week-event .event-members .event-person{min-height:26px;padding:3px 0}
@media(max-width:700px){.week .week-event .event-members .event-person{min-height:36px;padding:7px 0}}
/* Shared text metrics and top-aligned hit areas prevent time/name baseline drift. */
.week .event-time,.week .event-title,.week .event-primary-person{display:flex;align-items:flex-start;justify-content:flex-start;min-height:44px;margin:0;padding:0;font-size:14px;line-height:20px;font-weight:700}.week .event-names{display:flex;flex-wrap:wrap;align-items:flex-start;gap:0 4px;margin:0;padding:0;line-height:20px}.week .event-primary-person{display:inline-flex}.week .event-join{line-height:20px;margin:0;padding:0;font-size:14px}.week .event-info{align-self:start}
@media(max-width:700px){.week .event-time,.week .event-title,.week .event-primary-person{font-size:15px;line-height:22px}.week .event-names,.week .event-join{line-height:22px}}
/* Group register: paired compact rows, with attendance controls close to names. */
.lesson:has(.attendance){padding-top:14px;padding-bottom:14px}.lesson .attendance{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px;max-width:880px;margin:8px 0 10px}.lesson .attendance>div{display:grid;grid-template-columns:minmax(0,1fr) 52px 66px;gap:5px;align-items:center;min-width:0;padding:4px 0;font-size:13px;line-height:1.4}.lesson .attendance>div>span{min-width:0;overflow-wrap:anywhere}.lesson .attendance button{padding:6px 4px;min-height:36px;height:36px;border-radius:7px;font-size:12px;white-space:nowrap}.lesson .attendance button[aria-pressed=true][data-status=absent]{background:#f7e4d9;border-color:#cba98e;color:#7a452e}.lesson:has(.attendance) .actions{gap:6px}.lesson:has(.attendance) .actions button{min-height:40px;padding:8px 12px}.lesson:has(.attendance) .history-note{margin:5px 0;font-size:12px}
@media(max-width:850px){.lesson .attendance{grid-template-columns:minmax(0,1fr);max-width:510px;gap:0;margin:6px 0 8px}.lesson .attendance>div{padding:3px 0;grid-template-columns:minmax(0,1fr) 52px 66px}.lesson .attendance button{height:44px;min-height:44px}.lesson:has(.attendance) .actions{display:flex;flex-wrap:wrap;gap:5px}.lesson:has(.attendance) .actions button{min-height:44px;flex:1;font-size:12px;padding:7px 8px}.lesson:has(.attendance) .actions button[data-action=complete]{grid-column:auto}}
@media(max-width:700px){.lesson:has(.attendance){grid-template-columns:46px minmax(0,1fr);gap:9px;padding:13px 11px}.lesson .attendance>div{font-size:13px;grid-template-columns:minmax(0,1fr) 46px 60px;gap:4px}.lesson .attendance button{font-size:12px}.lesson:has(.attendance) .student-line{gap:3px}}
@media(max-width:370px){.lesson:has(.attendance){grid-template-columns:1fr}.lesson:has(.attendance)>.time{display:flex;gap:7px;align-items:center}.lesson:has(.attendance)>.time small{margin:0}.lesson:has(.attendance) .attendance{margin-top:6px}}

/* Day lesson actions share the heading row; narrow screens keep full touch targets. */
.lesson-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.lesson-heading h3{margin:0;line-height:1.4;min-width:0}.lesson .lesson-heading .actions{display:flex;flex-wrap:wrap;gap:6px;margin:0}.lesson .lesson-heading .actions button{flex:0 0 auto;white-space:nowrap}.lesson-summary{margin-top:5px}.lesson-summary:has(.pill:empty){display:none}.lesson .lesson-meta{margin:5px 0 0}.lesson-heading .actions:empty{display:none}
@media(min-width:701px){.lesson>.time{padding-top:10px}.lesson .lesson-heading .actions button{min-height:40px;padding:8px 10px}.lesson-heading{min-height:40px}.lesson-summary .pill{font-size:11px}}
@media(max-width:700px){.lesson-heading{gap:8px}.lesson .lesson-heading .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:4px 7px;order:2}.lesson .lesson-heading .actions button{min-height:44px}.lesson-heading h3{width:100%}.lesson-summary{margin-top:7px}}

/* Compact single-line day register on wide screens. */
@media(min-width:1000px){.layout:has(.lesson){grid-template-columns:minmax(0,1fr)}.layout:has(.lesson)>.rail{display:none}.lesson{grid-template-columns:112px minmax(0,1fr);padding:12px 18px;align-items:start}.lesson>.time{display:flex;align-items:center;gap:8px;padding-top:10px;white-space:nowrap}.lesson>.time small{margin:0;font-size:11px}.lesson-heading{flex-wrap:nowrap;gap:12px}.lesson-heading h3{flex:1}.lesson-heading .lesson-summary,.lesson .lesson-heading .lesson-meta{margin:0;white-space:nowrap}.lesson-heading .lesson-summary .pill{font-size:11px}.lesson-heading .lesson-meta{font-size:13px}.lesson .lesson-heading .actions{flex-wrap:nowrap;flex-shrink:0}}
@media(max-width:999px){.lesson-heading .lesson-summary,.lesson .lesson-heading .lesson-meta{margin:0}.lesson-heading .actions{margin-left:auto}.lesson-heading h3{flex:1}}
@media(max-width:700px){.lesson-heading h3{flex:auto}.lesson-heading .lesson-summary,.lesson-heading .lesson-meta{order:1}.lesson .lesson-heading .actions{order:2}}
