:root { --primary:#6258d9; --text:#202238; --muted:#85889b; --line:#ececf3; --bg:#f7f8fc; --sidebar:#fff; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Manrope",sans-serif; color:var(--text); background:var(--bg); display:flex; min-height:100vh; }
button,input,select { font:inherit; }
button { cursor:pointer; }
.sidebar { position:fixed; inset:0 auto 0 0; width:238px; background:var(--sidebar); border-right:1px solid var(--line); display:flex; flex-direction:column; z-index:10; }
.brand { height:88px; display:flex; align-items:center; gap:11px; padding:0 24px; }
.brand-mark { width:38px; height:38px; border-radius:11px; background:var(--primary); color:white; display:grid; place-items:center; font-size:20px; font-weight:800; box-shadow:0 8px 18px rgba(98,88,217,.22); }
.brand strong,.brand span { display:block; }
.brand strong { font-size:15px; }
.brand span { font-size:12px; color:var(--muted); margin-top:-1px; }
.nav { padding:18px 12px; display:flex; flex-direction:column; gap:5px; }
.nav-item { width:100%; height:46px; border:0; border-radius:9px; background:transparent; color:#777a8d; display:flex; align-items:center; gap:13px; padding:0 14px; font-size:14px; font-weight:600; text-align:left; }
.nav-item:hover { background:#f7f7fb; color:var(--primary); }
.nav-item.active { background:#efeffd; color:var(--primary); }
.nav-icon { width:20px; text-align:center; font-size:20px; line-height:1; }
.sidebar-bottom { margin-top:auto; border-top:1px solid var(--line); padding:10px 12px 14px; }
.profile { height:65px; display:flex; align-items:center; gap:9px; padding:10px 8px 0; }
.avatar { width:38px; height:38px; border-radius:50%; background:#dce9ff; color:#3f66a8; display:grid; place-items:center; font-size:12px; font-weight:800; }
.profile-info { min-width:0; flex:1; }
.profile-info strong,.profile-info span { display:block; white-space:nowrap; }
.profile-info strong { font-size:12px; }
.profile-info span { font-size:10px; color:var(--muted); margin-top:3px; }
#roleLabel { font-size:10px; color:var(--muted); margin-top:3px; }
.more { border:0; background:transparent; color:#a5a7b4; }
.logout-button { width:32px; height:32px; border-radius:8px; font-size:15px; }
.logout-button:hover { background:#fdeeee; color:#c05e5e; }
.main { margin-left:238px; width:calc(100% - 238px); min-height:100vh; }
.topbar { height:88px; background:white; border-bottom:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; padding:0 34px; }
.eyebrow { margin:0 0 3px; color:#9699a9; font-size:11px; }
.topbar h1 { margin:0; font-size:21px; }
.top-actions { display:flex; align-items:center; gap:10px; }
.icon-button { width:42px; height:42px; border:1px solid var(--line); border-radius:9px; background:white; color:#6e7183; position:relative; font-size:20px; }
.notification-dot { position:absolute; width:7px; height:7px; border-radius:50%; background:#ef6a69; right:9px; top:8px; border:2px solid white; }
.primary-button { height:42px; border:0; border-radius:9px; background:var(--primary); color:white; padding:0 16px; font-size:13px; font-weight:700; box-shadow:0 7px 16px rgba(98,88,217,.16); }
.primary-button span { font-size:16px; }
.content { padding:24px 34px 40px; }
.stats-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
.stat-card { min-height:118px; background:white; border:1px solid var(--line); border-radius:12px; display:flex; align-items:flex-start; gap:13px; padding:20px 18px; }
.stat-icon { width:42px; height:42px; border-radius:10px; display:grid; place-items:center; font-size:19px; flex:none; }
.stat-icon.blue { background:#edf3ff; color:#557dd7; }.stat-icon.violet { background:#f0edff; color:#7569d7; }.stat-icon.green { background:#eaf7f1; color:#45a576; }.stat-icon.orange { background:#fff2e7; color:#db8b48; }
.stat-card span,.stat-card strong { display:block; }
.stat-card span { color:#8c8f9d; font-size:11px; margin:1px 0 7px; }
.stat-card strong { font-size:22px; line-height:1; }
.stat-card small { display:block; margin-top:10px; font-size:10px; }
.stat-card small em { color:#a1a3af; font-style:normal; }
.positive { color:#45a576; }.muted-small { color:#a1a3af; }
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(250px,.75fr); gap:16px; margin-top:16px; }
.panel { background:white; border:1px solid var(--line); border-radius:12px; }
.panel-header { height:68px; display:flex; align-items:center; justify-content:space-between; padding:0 20px; border-bottom:1px solid var(--line); }
.panel-header h2 { margin:0; font-size:14px; }.panel-header p { margin:4px 0 0; color:#9a9cab; font-size:10px; }
.select-button { height:32px; border:1px solid var(--line); border-radius:7px; background:white; color:#777a8b; font-size:10px; padding:0 9px; }
.chart-wrap { height:244px; display:flex; padding:18px 20px 10px 10px; }
.chart-y { width:46px; height:180px; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-end; padding-right:9px; color:#aaaeba; font-size:9px; }
.chart { position:relative; flex:1; height:210px; }
.grid-line { position:absolute; left:0; right:0; border-top:1px dashed #ececf3; }.l1{top:0}.l2{top:45px}.l3{top:90px}.l4{top:135px}
.chart svg { position:absolute; inset:0 0 30px 0; width:100%; height:180px; overflow:visible; }
.chart .area { fill:url(#area); }.chart .line { fill:none; stroke:#6861d8; stroke-width:3; stroke-linecap:round; }.points circle { fill:white; stroke:#6861d8; stroke-width:3; }
.chart-x { position:absolute; bottom:0; left:0; right:0; display:flex; justify-content:space-around; color:#9fa1ae; font-size:9px; }
.quick-actions { padding:8px 16px 10px; }.quick-actions button { width:100%; height:65px; border:0; border-bottom:1px solid #f0f0f5; background:white; display:flex; align-items:center; gap:11px; text-align:left; color:var(--text); }.quick-actions button:last-child { border-bottom:0; }
.quick-icon { width:38px; height:38px; border-radius:9px; display:grid; place-items:center; }.quick-icon.purple{background:#efedff;color:#7065d5}.quick-icon.blue{background:#edf4ff;color:#557dd7}.quick-icon.green{background:#eaf7f1;color:#45a576}
.quick-actions div { flex:1; }.quick-actions strong,.quick-actions small { display:block; }.quick-actions strong{font-size:12px}.quick-actions small{font-size:9px;color:#a0a2af;margin-top:4px}.quick-actions b{color:#aaaeba;font-size:20px}
.bottom-grid { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(250px,.75fr); gap:16px; margin-top:16px; }
.text-button { border:0; background:transparent; color:var(--primary); font-size:10px; font-weight:700; }
.student-list { padding:5px 20px 8px; }.student-row { height:54px; display:flex; align-items:center; border-bottom:1px solid #f2f2f6; }.student-row:last-child{border-bottom:0}.student-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:800;margin-right:10px}.student-info{flex:1}.student-info strong,.student-info span{display:block}.student-info strong{font-size:11px}.student-info span{font-size:9px;color:#9d9fad;margin-top:3px}.student-row>strong{font-size:10px;color:#77798a;font-weight:600}.student-row>b{width:55px;color:#4dac7d;font-size:9px;text-align:right}
.payment-summary { height:170px; display:flex; align-items:center; justify-content:center; gap:28px; }.donut{width:112px;height:112px;border-radius:50%;background:conic-gradient(#6861d8 0 78%,#f1b44c 78% 93%,#ee7d79 93% 100%);display:grid;place-items:center}.donut>div{width:78px;height:78px;border-radius:50%;background:white;display:grid;place-content:center;text-align:center}.donut strong,.donut span{display:block}.donut strong{font-size:17px}.donut span{font-size:8px;color:#9a9cab}.legend{width:130px}.legend div{height:36px;display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:7px;border-bottom:1px solid #f1f1f5;font-size:9px}.legend div:last-child{border:0}.legend i{width:7px;height:7px;border-radius:50%}.legend i.paid{background:#6861d8}.legend i.pending{background:#f1b44c}.legend i.debt{background:#ee7d79}.legend strong{font-size:10px}
.hidden { display:none !important; }.full-panel{min-height:400px}.search{height:38px;width:220px;border:1px solid var(--line);border-radius:8px;padding:0 12px;font-size:12px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse}th{text-align:left;height:42px;color:#9a9cab;font-size:10px;font-weight:600;border-bottom:1px solid var(--line);padding:0 20px}td{height:58px;border-bottom:1px solid #f1f1f5;font-size:11px;padding:0 20px}tbody tr:last-child td{border-bottom:0}.table-name{display:flex;align-items:center;gap:9px}.status{display:inline-flex;height:26px;align-items:center;padding:0 9px;border-radius:20px;font-size:9px;font-weight:700}.status.paid{background:#eaf7f1;color:#3b9870}.status.pending{background:#fff4df;color:#b38131}.status.debt{background:#fdeeee;color:#c05e5e}.status.active{background:#efeffd;color:#6258d9}.row-action{border:0;background:transparent;color:#9a9cab}.group-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.group-card{background:white;border:1px solid var(--line);border-radius:12px;padding:18px}.group-card-head{display:flex;justify-content:space-between}.group-card h3{margin:0;font-size:14px}.group-card .status{height:24px}.group-card p{font-size:10px;color:#9295a4}.progress{height:6px;border-radius:10px;background:#eff0f5;overflow:hidden;margin:16px 0 10px}.progress i{display:block;height:100%;background:#6861d8;border-radius:10px}.group-meta{display:flex;justify-content:space-between;font-size:10px;color:#858899}.attendance-toggle{display:flex;gap:6px}.attendance-toggle button{width:72px;height:32px;border:1px solid var(--line);border-radius:7px;background:white;color:#858899;font-size:10px}.attendance-toggle button.selected.present{background:#eaf7f1;border-color:#bfe3d1;color:#3b9870}.attendance-toggle button.selected.absent{background:#fdeeee;border-color:#f3cccc;color:#c05e5e}
.modal-backdrop{position:fixed;inset:0;background:rgba(28,29,48,.38);z-index:30;display:grid;place-items:center}.modal{width:min(520px,calc(100% - 32px));background:white;border-radius:14px;padding:20px}.modal-header{display:flex;justify-content:space-between;margin-bottom:20px}.modal-header h2{margin:0;font-size:17px}.modal-header p{margin:4px 0 0;color:#999bab;font-size:10px}.close-modal{border:0;background:transparent;color:#999bab;font-size:20px}.modal label{display:flex;flex-direction:column;gap:7px;font-size:11px;font-weight:700}.modal input,.modal select{height:42px;border:1px solid var(--line);border-radius:8px;padding:0 11px;font-size:12px;color:var(--text);outline:none}.modal input:focus,.modal select:focus{border-color:#aaa4ec}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.secondary-button{height:42px;border:1px solid var(--line);border-radius:8px;background:white;padding:0 14px;font-size:12px}.toast{position:fixed;right:24px;bottom:24px;height:46px;border-radius:9px;background:#24263a;color:white;display:flex;align-items:center;padding:0 18px;font-size:12px;z-index:40;box-shadow:0 10px 30px rgba(0,0,0,.18)}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.bottom-grid{grid-template-columns:1fr}.quick-actions{display:grid;grid-template-columns:repeat(3,1fr)}.quick-actions button{border-right:1px solid #f0f0f5;border-bottom:0}.quick-actions button:last-child{border-right:0}.group-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.sidebar{width:70px}.brand{padding:0 16px}.brand>div:last-child,.nav-item span:last-child,.profile-info,.profile .more{display:none}.brand-mark{width:38px}.nav{padding:18px 10px}.nav-item{justify-content:center;padding:0}.sidebar-bottom{padding:10px}.profile{padding:10px 6px;height:auto;flex-direction:column;gap:6px}.profile .logout-button{display:grid;place-items:center}.main{margin-left:70px;width:calc(100% - 70px)}.topbar{padding:0 18px}.content{padding:18px}.stats-grid{grid-template-columns:1fr 1fr}.group-grid{grid-template-columns:1fr}.quick-actions{display:block}.quick-actions button{border-right:0;border-bottom:1px solid #f0f0f5}.form-row{grid-template-columns:1fr}.search{width:150px}}
@media(max-width:520px){.stats-grid{grid-template-columns:1fr}.topbar h1{font-size:17px}.primary-button{padding:0 10px}.primary-button span{display:none}.top-actions{gap:5px}.icon-button{display:none}.group-grid{grid-template-columns:1fr}.bottom-grid{grid-template-columns:1fr}.student-row>strong{display:none}}

/* Role workspaces and editable records. */
.welcome{margin-bottom:24px}.welcome h2{font-size:24px;margin:0 0 8px}.welcome p{color:#666a80;font-size:15px;margin:0;line-height:1.6}
.section-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.section-toolbar p{color:#666a80}
.full-panel+.full-panel{margin-top:24px}.panel-header{height:auto;min-height:68px;padding:18px 20px;gap:16px;flex-wrap:wrap}.panel-header h2{font-size:17px}.panel-header p{font-size:13px;line-height:1.6;color:#666a80}.panel,.stat-card,.main{min-width:0}.stat-card>div{min-width:0}.filters{margin-top:20px}
.filters{display:flex;align-items:end;flex-wrap:wrap;gap:16px;padding:0 24px 22px}.filters label{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:600;color:#55596d}.filters input,.filters select{min-height:42px;min-width:150px;max-width:100%;padding:8px 12px;border:1px solid #d9dae6;background:white;border-radius:8px;color:var(--text)}.filters .checkbox-filter{flex-direction:row;align-items:center;min-height:42px;font-weight:500}.checkbox-filter input{min-width:18px;min-height:18px;width:18px;height:18px;accent-color:var(--primary)}
table th,table td{font-size:14px}table th{color:#62667c}table td{line-height:1.6}.status{font-size:12px}.text-button,.primary-button,.secondary-button,.search{font-size:14px}.student-avatar{background:#e7ecff;color:#6178b6;flex-shrink:0}.student-row{gap:16px;justify-content:space-between}.student-row>span{font-size:13px;color:#666a80}.table-name{min-width:150px}.group-card h3{font-size:17px}.group-card p,.group-meta{font-size:13px;line-height:1.6}.stat-card strong{font-size:25px;overflow-wrap:anywhere}.stat-card span{font-size:14px}.quick-actions strong{font-size:14px}.quick-actions button{gap:12px}.attendance-toggle button{width:auto;min-width:76px;height:38px;font-size:13px}.empty-state{padding:30px!important;text-align:center;color:#71758a;font-size:14px}.multiline{white-space:pre-wrap;min-width:230px;max-width:550px;overflow-wrap:anywhere}
.edit-dialog{border:1px solid var(--line);max-height:90vh;overflow:auto;color:var(--text);box-shadow:0 20px 80px #20223833}.edit-dialog::backdrop{background:#20223866}.dialog-fields{display:grid;gap:16px}.modal label{font-size:14px}.modal input,.modal select,.modal textarea{font:inherit;font-size:14px}.modal textarea{resize:vertical;border:1px solid var(--line);border-radius:8px;padding:10px;color:var(--text)}.form-error{color:#b03737;font-size:14px;line-height:1.5}.form-error:empty{display:none}.toast{height:auto;min-height:46px;max-width:calc(100vw - 48px);padding:12px 18px;line-height:1.5}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #a9a2ef;outline-offset:3px}.sidebar{overflow-y:auto}
@media(max-width:760px){.filters{padding:0 16px 18px}.panel-header{padding:18px 16px}.student-row{align-items:flex-start;flex-direction:column}.section-toolbar{align-items:flex-start;flex-wrap:wrap}.table-wrap{max-width:100%;overflow-x:auto}.content{min-width:0}.nav-item{min-height:46px}.filters label{max-width:100%}.welcome h2{font-size:21px}.profile{gap:10px}.profile-info strong{font-size:12px}}
