:root{font-family:Inter,system-ui,-apple-system,sans-serif;color:var(--tg-theme-text-color,#111827);background:var(--tg-theme-bg-color,#f3f4f6);font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;padding-bottom:86px}header{position:sticky;top:0;z-index:20;padding:calc(12px + env(safe-area-inset-top)) 16px 12px;background:var(--tg-theme-bg-color,#fff);border-bottom:1px solid #e5e7eb}header div{display:flex;align-items:center;justify-content:space-between;gap:12px}header small{color:#6b7280}main{max-width:1120px;margin:auto}.page{padding:16px}.page h2{margin:8px 0}.muted{color:#6b7280}.bottom-nav{position:fixed;z-index:50;bottom:0;left:0;right:0;display:flex;overflow:auto;gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:var(--tg-theme-bg-color,#fff);border-top:1px solid #e5e7eb}.bottom-nav a{min-width:max-content;padding:10px 12px;border-radius:12px;text-decoration:none;color:inherit;font-size:13px}.bottom-nav a.active{background:var(--tg-theme-button-color,#2563eb);color:var(--tg-theme-button-text-color,#fff)}.toolbar,.segmented{display:flex;gap:8px}.toolbar button,.segmented button{border:0;border-radius:10px;padding:9px 12px;background:#e5e7eb}.segmented{margin:14px 0}.segmented button{flex:1}.segmented .active{background:#111827;color:#fff}.state{min-height:180px;display:flex;align-items:center;justify-content:center;gap:10px}.error{color:#b91c1c}.spinner{width:20px;height:20px;border:3px solid #d1d5db;border-top-color:#111827;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.day-list,.cards{display:grid;gap:10px}.lesson{width:100%;text-align:left;border:0;border-left:4px solid #2563eb;background:#fff;padding:10px;border-radius:10px;display:grid;gap:3px;box-shadow:0 1px 2px #0001}.lesson span{font-size:13px}.status-completed{border-left-color:#16a34a}.status-cancelled,.status-missed{border-left-color:#9ca3af;opacity:.7}.week-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));overflow:auto;gap:8px}.week-grid section{min-height:340px;background:#f9fafb;padding:8px;border-radius:12px}.week-grid h4{position:sticky;top:0;margin:0 0 8px;padding:6px}.week-grid .lesson{margin-bottom:7px}.month-grid{display:grid;grid-template-columns:repeat(7,minmax(120px,1fr));overflow:auto;border:1px solid #e5e7eb}.month-grid>div{min-height:130px;padding:6px;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;background:#fff}.month-grid .outside{opacity:.45}.month-grid small{float:right}.month-grid .lesson{margin-top:5px;padding:5px;font-size:11px}.hero-card,.person-card,.stat-card,.preview{background:#fff;border-radius:16px;padding:16px;display:grid;gap:8px;box-shadow:0 1px 3px #0001}.hero-card b{font-size:26px}.inline-form{display:flex;gap:8px;margin:12px 0}.inline-form input{flex:1}.form{display:grid;gap:14px;max-width:680px}.form label{display:grid;gap:6px;font-weight:600}.form input,.form select,.inline-form input{border:1px solid #d1d5db;background:#fff;border-radius:12px;padding:12px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.form .check{display:flex;grid-template-columns:auto 1fr;align-items:center}.primary,.inline-form button{border:0;border-radius:12px;padding:12px 16px;background:var(--tg-theme-button-color,#2563eb);color:var(--tg-theme-button-text-color,#fff);font-weight:700}.error-box,.success-box{padding:12px;border-radius:12px}.error-box{background:#fee2e2;color:#991b1b}.success-box{background:#dcfce7;color:#166534}.stat-card strong{font-size:24px}@media(max-width:700px){.week-grid{grid-template-columns:repeat(7,190px)}.month-grid{grid-template-columns:repeat(7,120px)}header small{display:none}.page{padding:12px}.form-row{grid-template-columns:1fr}}.filters{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.filters select,.inline-controls select,.inline-controls input,.invite-row input,.modal input,.modal select{border:1px solid #d1d5db;border-radius:10px;padding:10px;background:#fff;min-width:0}.inline-controls,.invite-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.inline-controls select,.invite-row input{flex:1}.person-card button,.modal-actions button,.inline-controls button,.invite-row button{border:0;border-radius:10px;padding:9px 11px;background:#e5e7eb}.danger-link{justify-self:start;background:transparent!important;color:#b91c1c!important;padding-left:0!important}.danger{width:100%;border:1px solid #fecaca!important;background:#fff!important;color:#b91c1c!important;border-radius:12px;padding:12px}.modal-backdrop{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;background:#0007;display:flex;align-items:flex-end;justify-content:center;padding-top:40px}.modal{width:min(640px,100%);max-height:92vh;overflow:auto;background:var(--tg-theme-bg-color,#fff);border-radius:20px 20px 0 0;padding:18px calc(18px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));box-shadow:0 -10px 40px #0003}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0}.modal-head button{border:0;background:transparent;font-size:20px}.detail-grid{display:grid;grid-template-columns:auto 1fr;gap:8px 14px;margin:18px 0}.detail-grid span{color:#6b7280}.modal-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.compact{padding:12px 0}.day-open{border:0;background:transparent;font-weight:700;padding:2px 4px;border-radius:6px}.day-open:hover{background:#e5e7eb}@media(min-width:701px){.modal-backdrop{align-items:center;padding:20px}.modal{border-radius:20px}}@media(max-width:700px){.filters{grid-template-columns:1fr}.inline-form{display:grid;grid-template-columns:1fr 100px}.inline-form button{grid-column:1/-1}}textarea{font:inherit}.form textarea{border:1px solid #d1d5db;background:#fff;border-radius:12px;padding:12px;resize:vertical}.check-group{border:1px solid #d1d5db;border-radius:12px;padding:12px;display:grid;gap:8px}.check-group legend{padding:0 6px;font-weight:700}.finance-block{margin:14px 0;padding:14px;border:1px solid #e5e7eb;border-radius:14px;background:#f9fafb}.finance-block h4{margin:0}.payment-action{width:100%;border:0;border-radius:12px;padding:11px 14px;background:#dbeafe;color:#1d4ed8;font-weight:700}.paid-text{color:#15803d}.unpaid-text{color:#b91c1c}.payment-badge{font-size:11px;font-weight:700}.payment-badge.paid{color:#15803d}.payment-badge.unpaid{color:#b91c1c}.delete-actions{display:grid;gap:8px;margin-top:8px}.warning-box{padding:12px;border-radius:12px;background:#fef3c7;color:#92400e;margin:10px 0}.finance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.finance-chart{height:190px;display:flex;align-items:flex-end;gap:6px;padding:16px 8px 28px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;overflow-x:auto}.chart-week{height:100%;min-width:34px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}.chart-bar{width:22px;min-height:4px;border-radius:6px 6px 2px 2px;background:#2563eb}.chart-week.forecast .chart-bar{opacity:.45}.chart-week small{font-size:9px;white-space:nowrap}.person-card>button,.payment-action{justify-self:start}@media(max-width:700px){.finance-grid{grid-template-columns:1fr 1fr}.finance-chart{height:160px}}html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] #root,html[data-theme=dark] .app-shell{background:#0f1115;color:#f3f4f6}html[data-theme=dark] header,html[data-theme=dark] .bottom-nav,html[data-theme=dark] .modal{background:#161b22;color:#f3f4f6;border-color:#2a3038}html[data-theme=dark] header small,html[data-theme=dark] .muted,html[data-theme=dark] .detail-grid span{color:#9ca3af}html[data-theme=dark] .lesson,html[data-theme=dark] .hero-card,html[data-theme=dark] .person-card,html[data-theme=dark] .stat-card,html[data-theme=dark] .preview,html[data-theme=dark] .month-grid>div,html[data-theme=dark] .week-grid section,html[data-theme=dark] .finance-chart{background:#171c22;color:#f3f4f6;box-shadow:0 1px 3px #0007}html[data-theme=dark] .month-grid,html[data-theme=dark] .month-grid>div,html[data-theme=dark] .finance-chart,html[data-theme=dark] .finance-block,html[data-theme=dark] .check-group{border-color:#2a3038}html[data-theme=dark] .finance-block{background:#12171d}html[data-theme=dark] .form input,html[data-theme=dark] .form select,html[data-theme=dark] .form textarea,html[data-theme=dark] .inline-form input,html[data-theme=dark] .filters select,html[data-theme=dark] .inline-controls select,html[data-theme=dark] .inline-controls input,html[data-theme=dark] .invite-row input,html[data-theme=dark] .modal input,html[data-theme=dark] .modal select{background:#11161c;border-color:#374151;color:#f3f4f6}html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#6b7280}html[data-theme=dark] .toolbar button,html[data-theme=dark] .segmented button,html[data-theme=dark] .person-card button,html[data-theme=dark] .modal-actions button,html[data-theme=dark] .inline-controls button,html[data-theme=dark] .invite-row button{background:#252b33;color:#e5e7eb}html[data-theme=dark] .segmented .active,html[data-theme=dark] .bottom-nav a.active,html[data-theme=dark] .primary,html[data-theme=dark] .inline-form button{background:var(--tg-theme-button-color,#3b82f6);color:var(--tg-theme-button-text-color,#fff)}html[data-theme=dark] .danger{background:#161b22!important;border-color:#7f1d1d!important;color:#f87171!important}html[data-theme=dark] .danger-link{color:#f87171!important}html[data-theme=dark] .error-box{background:#451a1a;color:#fecaca}html[data-theme=dark] .success-box{background:#052e16;color:#bbf7d0}html[data-theme=dark] .warning-box{background:#422006;color:#fde68a}html[data-theme=dark] .payment-action{background:#172554;color:#bfdbfe}html[data-theme=dark] .paid-text,html[data-theme=dark] .payment-badge.paid{color:#86efac}html[data-theme=dark] .unpaid-text,html[data-theme=dark] .payment-badge.unpaid{color:#fca5a5}html[data-theme=dark] .day-open{color:#f3f4f6}html[data-theme=dark] .day-open:hover{background:#252b33}.reports-page{max-width:1180px;margin:0 auto;display:grid;gap:14px}.reports-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 0 2px}.reports-heading h2{margin:3px 0 6px}.eyebrow{font-size:11px;letter-spacing:.12em;font-weight:800;color:#2563eb;margin:0}.reports-file-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#dcfce7;color:#166534;font-size:14px;font-weight:900;flex-shrink:0;border:1px solid #bbf7d0}.report-panel{border:1px solid #e5e7eb;border-radius:18px;background:#fff;padding:18px;display:grid;gap:14px;box-shadow:0 1px 3px #00000008}.report-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.report-panel-title h3{margin:0 0 5px;font-size:17px}.report-panel-title p{margin:0;font-size:13px}.report-period-tabs{width:max-content;max-width:100%}.report-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.report-fields label{display:grid;gap:7px;font-weight:650;font-size:13px;min-width:0}.report-fields input,.report-fields select{width:100%;min-width:0;padding:11px 12px;border:1px solid #d1d5db;border-radius:11px;background:#fff;color:inherit}.report-date-fields{grid-template-columns:repeat(2,minmax(0,1fr));max-width:680px}.report-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.report-mode-card{display:grid;grid-template-columns:18px 1fr;align-items:start;gap:6px 10px;text-align:left;padding:15px;border:1px solid #d1d5db;border-radius:14px;background:#fff;color:inherit}.report-mode-card strong{font-size:14px}.report-mode-card small{grid-column:2;color:#6b7280;line-height:1.45;font-size:12px}.report-mode-card.selected{border-color:#2563eb;background:#eff6ff;box-shadow:inset 0 0 0 1px #2563eb}.report-radio-dot{width:16px;height:16px;border:1.5px solid #9ca3af;border-radius:50%;margin-top:1px}.report-mode-card.selected .report-radio-dot{border:5px solid #2563eb}.report-section-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.report-section-option{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid #e5e7eb;border-radius:12px;cursor:pointer;min-width:0}.report-section-option input{width:17px;height:17px;accent-color:#2563eb;flex-shrink:0;margin-top:2px}.report-section-option span{display:grid;gap:3px;min-width:0}.report-section-option strong{font-size:13px}.report-section-option small{font-size:12px;line-height:1.4;color:#6b7280}.text-button{background:transparent;border:0;color:#2563eb;font-weight:700;padding:5px 0}.report-finance-note{border:1px solid #fcd34d;border-radius:14px;padding:14px 16px;background:#fffbeb;color:#78350f}.report-finance-note p{margin:6px 0 0;font-size:13px;line-height:1.5}.report-download-row{display:flex;align-items:center;justify-content:space-between;gap:14px;border-radius:16px;padding:16px;background:#eff6ff;border:1px solid #bfdbfe}.report-download-row>div{display:grid;gap:5px}.report-download-row small{color:#4b5563;font-size:12px;line-height:1.4}.report-download-button{min-width:220px}html[data-theme=dark] .report-panel{background:#171c22;border-color:#2a3038}html[data-theme=dark] .reports-file-mark{background:#052e16;border-color:#166534;color:#bbf7d0}html[data-theme=dark] .report-fields input,html[data-theme=dark] .report-fields select{background:#11161c;border-color:#374151;color:#f3f4f6}html[data-theme=dark] .report-mode-card{background:#11161c;border-color:#374151}html[data-theme=dark] .report-mode-card small,html[data-theme=dark] .report-section-option small,html[data-theme=dark] .report-download-row small{color:#9ca3af}html[data-theme=dark] .report-mode-card.selected{background:#172554;border-color:#3b82f6}html[data-theme=dark] .report-section-option{border-color:#2a3038}html[data-theme=dark] .report-finance-note{background:#422006;border-color:#92400e;color:#fde68a}html[data-theme=dark] .report-download-row{background:#172554;border-color:#1d4ed8}@media(max-width:700px){.reports-heading{align-items:flex-start}.reports-file-mark{width:46px;height:46px;border-radius:12px}.report-panel{padding:14px}.report-fields,.report-date-fields,.report-mode-grid,.report-section-list{grid-template-columns:1fr}.report-download-row{align-items:stretch;flex-direction:column}.report-download-button{width:100%;min-width:0}.report-period-tabs{width:100%}.report-period-tabs button{flex:1;min-width:0;padding:8px 5px;font-size:12px}}.report-delivery-buttons{display:flex;flex-direction:column;gap:8px;width:100%}.report-delivery-buttons button{width:100%}
