:root{
  --crm-bg:#f3f5f9;--crm-panel:#ffffff;--crm-panel-2:#f8fafc;--crm-text:#111318;--crm-muted:#6d7480;--crm-line:#e3e7ee;
  --crm-side:#0b0d12;--crm-side-2:#131722;--crm-accent:#f0443e;--crm-blue:#4667ff;--crm-cyan:#11a8d8;--crm-green:#14966c;
  --crm-amber:#d88b12;--crm-bad:#c8372d;--crm-shadow:0 24px 80px rgba(20,28,45,.08);--crm-radius:18px
}
html[data-theme="dark"]{--crm-bg:#090b10;--crm-panel:#11151c;--crm-panel-2:#171c24;--crm-text:#f7f8fb;--crm-muted:#9099a6;--crm-line:#28303c;--crm-shadow:0 24px 80px rgba(0,0,0,.32)}
body.crm-v10-enhanced{background:var(--crm-bg)!important;color:var(--crm-text)!important}
body.crm-v10-enhanced .shell{grid-template-columns:268px 1fr!important}
body.crm-v10-enhanced .side{background:linear-gradient(180deg,var(--crm-side),#0d1017 58%,#121622)!important;border-right:0!important;box-shadow:18px 0 60px rgba(17,20,28,.10);padding:20px 15px!important}
body.crm-v10-enhanced .brand{color:#fff!important;padding:8px 9px!important;border-radius:13px}
body.crm-v10-enhanced .brand img{filter:drop-shadow(0 5px 18px rgba(240,68,62,.18));width:44px!important;height:31px!important}
body.crm-v10-enhanced .brand b{color:#fff!important;letter-spacing:.02em}
body.crm-v10-enhanced .brand small{color:#7e8796!important}
body.crm-v10-enhanced .nav{display:block!important;overflow:auto;padding-right:2px}
body.crm-v10-enhanced .crm-nav-group{margin:18px 6px 7px;color:#5f6878;font:800 8px Manrope,Arial,sans-serif;letter-spacing:.16em;text-transform:uppercase}
body.crm-v10-enhanced .nav a{color:#aeb5c0!important;border:1px solid transparent;margin:3px 0!important;padding:10px 11px!important;border-radius:11px!important;justify-content:flex-start!important;display:flex!important}
body.crm-v10-enhanced .nav a:hover{background:#151a23!important;color:#fff!important}
body.crm-v10-enhanced .nav a.active{background:linear-gradient(135deg,rgba(70,103,255,.20),rgba(240,68,62,.16))!important;color:#fff!important;border-color:#272e3c!important;box-shadow:inset 3px 0 0 var(--crm-accent)}
body.crm-v10-enhanced .nav a i{font-style:normal!important;width:22px!important;color:#d7dbe2!important}
body.crm-v10-enhanced .nav a span{font-size:11px!important}
body.crm-v10-enhanced .side-bottom{border-top-color:#242a34!important}
body.crm-v10-enhanced .user-mini b{color:#fff!important}body.crm-v10-enhanced .user-mini small{color:#7f8997!important}
body.crm-v10-enhanced .avatar{background:linear-gradient(135deg,var(--crm-blue),var(--crm-accent))!important;color:#fff!important}
body.crm-v10-enhanced .logout{border-color:#2a303b!important;color:#8e97a4!important}
body.crm-v10-enhanced .main{background:var(--crm-bg)!important}
body.crm-v10-enhanced .top{background:rgba(255,255,255,.86)!important;backdrop-filter:blur(18px);border-bottom-color:var(--crm-line)!important}
html[data-theme="dark"] body.crm-v10-enhanced .top{background:rgba(17,21,28,.88)!important}
body.crm-v10-enhanced .content{width:min(1320px,calc(100% - 52px))!important}
body.crm-v10-enhanced .panel,body.crm-v10-enhanced .metric,body.crm-v10-enhanced .role-card,body.crm-v10-enhanced .card{border-color:var(--crm-line)!important;background:var(--crm-panel)!important;box-shadow:none}
body.crm-v10-enhanced .metric:hover,body.crm-v10-enhanced .panel:hover{border-color:#cfd5de!important}
html[data-theme="dark"] body.crm-v10-enhanced .metric:hover,html[data-theme="dark"] body.crm-v10-enhanced .panel:hover{border-color:#3a4453!important}
body.crm-v10-enhanced .btn{border-color:var(--crm-line)!important;background:var(--crm-panel)!important;color:var(--crm-text)!important}
body.crm-v10-enhanced .btn.primary{background:var(--crm-text)!important;color:var(--crm-panel)!important;border-color:var(--crm-text)!important}
body.crm-v10-enhanced .ey{color:var(--crm-accent)!important}
body.crm-v10-enhanced .table th{color:var(--crm-muted)!important}body.crm-v10-enhanced .table td{border-color:var(--crm-line)!important}
body.crm-v10-enhanced .drawer-panel{width:min(780px,100%)!important;background:var(--crm-panel)!important}
body.crm-v10-enhanced .student.enriched{display:grid!important;grid-template-columns:minmax(170px,1.5fr) minmax(120px,1fr) 110px 90px 90px auto;align-items:center;gap:10px;padding:12px 10px!important;border-bottom:1px solid var(--crm-line)}
body.crm-v10-enhanced .student.enriched .student-main small,body.crm-v10-enhanced .student.enriched .mini-label{display:block;color:var(--crm-muted);font-size:9px}
body.crm-v10-enhanced .student.enriched .mini-value{font-size:11px;font-weight:800}
body.crm-v10-enhanced .student.enriched .student-actions{display:flex;gap:5px;justify-content:flex-end;flex-wrap:wrap}
body.crm-v10-enhanced .student.enriched .tiny-btn{border:1px solid var(--crm-line);background:var(--crm-panel-2);color:var(--crm-text);border-radius:8px;padding:6px 8px;font-size:9px;font-weight:800;cursor:pointer}
body.crm-v10-enhanced .student.enriched .tiny-btn.coin{background:#fff7d9;border-color:#f4d985;color:#72520a}
html[data-theme="dark"] body.crm-v10-enhanced .student.enriched .tiny-btn.coin{background:#29210e;border-color:#5a491c;color:#f0ca62}
.crm-pro-float{position:fixed;left:18px;bottom:18px;z-index:9999;display:flex;gap:7px;align-items:center;background:#0c0f15;color:#fff;border:1px solid #2a303b;border-radius:999px;padding:8px 10px;box-shadow:0 16px 50px rgba(0,0,0,.28);font:800 10px Manrope,Arial,sans-serif;text-decoration:none}.crm-pro-float b{color:#ff5a54}

/* Phase 10 pages */
.crm10{min-height:100vh;background:var(--crm-bg);color:var(--crm-text);font-family:"DM Sans",Arial,sans-serif}.crm10 *{box-sizing:border-box}.crm10 .hidden{display:none!important}.crm10 a{color:inherit}.crm10-shell{display:grid;grid-template-columns:268px 1fr;min-height:100vh}.crm10-side{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#090b10,#0c1017 58%,#111622);padding:20px 15px;display:flex;flex-direction:column;z-index:40}.crm10-main{min-width:0}.crm10-top{height:70px;position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:rgba(255,255,255,.86);backdrop-filter:blur(18px);border-bottom:1px solid var(--crm-line)}html[data-theme="dark"] .crm10-top{background:rgba(17,21,28,.88)}
.crm10-content{width:min(1320px,calc(100% - 52px));margin:auto;padding:36px 0 72px}.crm10-brand{display:flex;align-items:center;gap:11px;padding:8px 9px;text-decoration:none;color:#fff}.crm10-brand img{width:44px;height:31px;object-fit:contain}.crm10-brand b{display:block;font:800 13px Manrope}.crm10-brand small{display:block;color:#727c8c;font-size:9px;letter-spacing:.08em;margin-top:2px}.crm10-nav{overflow:auto;margin-top:8px}.crm10-nav .group{margin:18px 6px 7px;color:#596273;font:800 8px Manrope;letter-spacing:.16em;text-transform:uppercase}.crm10-nav a{display:flex;align-items:center;gap:10px;padding:10px 11px;margin:3px 0;border-radius:11px;text-decoration:none;color:#aeb5c0;font-size:11px;font-weight:700;border:1px solid transparent}.crm10-nav a:hover{background:#151a23;color:#fff}.crm10-nav a.active{background:linear-gradient(135deg,rgba(70,103,255,.20),rgba(240,68,62,.16));color:#fff;border-color:#272e3c;box-shadow:inset 3px 0 0 var(--crm-accent)}.crm10-nav i{width:21px;text-align:center;font-style:normal}.crm10-side-bottom{margin-top:auto;border-top:1px solid #242a34;padding-top:14px}.crm10-user{display:flex;align-items:center;gap:9px}.crm10-avatar{width:36px;height:36px;border-radius:11px;background:linear-gradient(135deg,var(--crm-blue),var(--crm-accent));display:grid;place-items:center;color:#fff;font:800 11px Manrope}.crm10-user b{display:block;color:#fff;font-size:11px}.crm10-user small{display:block;color:#7f8997;font-size:9px}.crm10-logout{width:100%;margin-top:10px;border:1px solid #2b313c;background:transparent;color:#8f98a5;border-radius:9px;padding:9px;font-weight:800;font-size:9px;cursor:pointer}
.crm10-crumb{font-size:11px;color:var(--crm-muted)}.crm10-crumb b{color:var(--crm-text)}.crm10-actions{display:flex;gap:8px;align-items:center}.crm10-btn{border:1px solid var(--crm-line);background:var(--crm-panel);color:var(--crm-text);border-radius:10px;padding:9px 12px;font-weight:800;font-size:10px;text-decoration:none;cursor:pointer}.crm10-btn.dark{background:var(--crm-text);color:var(--crm-panel);border-color:var(--crm-text)}.crm10-btn.red{background:var(--crm-accent);border-color:var(--crm-accent);color:#fff}.crm10-btn.blue{background:var(--crm-blue);border-color:var(--crm-blue);color:#fff}.crm10-btn.ghost{background:transparent}.crm10-btn:disabled{opacity:.45;cursor:not-allowed}
.crm10-hero{position:relative;overflow:hidden;border-radius:26px;background:#0c0f15;color:#fff;padding:30px 32px;min-height:220px;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;box-shadow:0 30px 90px rgba(13,17,25,.18)}.crm10-hero:before{content:"";position:absolute;inset:-35%;background:radial-gradient(circle at 78% 35%,rgba(70,103,255,.35),transparent 25%),radial-gradient(circle at 90% 70%,rgba(240,68,62,.28),transparent 20%);pointer-events:none}.crm10-hero>*{position:relative}.crm10-ey{font:800 9px Manrope;letter-spacing:.18em;text-transform:uppercase;color:#ff655f}.crm10-hero h1{font:800 clamp(38px,5vw,64px)/.98 Manrope;margin:8px 0 10px;letter-spacing:-.055em}.crm10-hero p{margin:0;color:#a6afbd;max-width:660px;font-size:13px;line-height:1.55}.crm10-hero-side{min-width:250px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);border-radius:18px;padding:16px;backdrop-filter:blur(12px)}.crm10-hero-side span{display:block;color:#8f99a7;font:800 8px Manrope;text-transform:uppercase;letter-spacing:.12em}.crm10-hero-side strong{display:block;font:800 25px Manrope;margin:7px 0 2px}.crm10-hero-side small{color:#97a1af;font-size:10px}
.crm10-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.crm10-metric{background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:18px;padding:16px;min-height:108px}.crm10-metric span{display:block;color:var(--crm-muted);font:800 8px Manrope;text-transform:uppercase;letter-spacing:.11em}.crm10-metric strong{display:block;font:800 27px Manrope;letter-spacing:-.03em;margin-top:9px}.crm10-metric small{display:block;color:var(--crm-muted);font-size:10px;margin-top:3px}.crm10-metric.bad strong{color:var(--crm-bad)}.crm10-metric.good strong{color:var(--crm-green)}.crm10-metric.blue strong{color:var(--crm-blue)}
.crm10-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:12px}.crm10-grid.equal{grid-template-columns:1fr 1fr}.crm10-panel{background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:20px;padding:17px;min-width:0}.crm10-panel-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:12px}.crm10-panel h2{font:800 19px Manrope;margin:0;letter-spacing:-.02em}.crm10-panel h3{font:800 14px Manrope;margin:0}.crm10-panel p{color:var(--crm-muted);font-size:11px;margin:4px 0 0}.crm10-tablewrap{overflow:auto}.crm10-table{width:100%;border-collapse:collapse;font-size:11px;min-width:650px}.crm10-table th{text-align:left;padding:9px 8px;border-bottom:1px solid var(--crm-line);color:var(--crm-muted);font:800 8px Manrope;text-transform:uppercase;letter-spacing:.08em}.crm10-table td{padding:11px 8px;border-bottom:1px solid var(--crm-line);vertical-align:middle}.crm10-table tr:last-child td{border-bottom:0}.crm10-table b{font-weight:800}.crm10-empty{padding:24px;color:var(--crm-muted);text-align:center;font-size:11px}.crm10-status{display:inline-flex;align-items:center;gap:5px;padding:5px 8px;border-radius:999px;background:var(--crm-panel-2);font-size:8px;font-weight:800;text-transform:uppercase;white-space:nowrap}.crm10-status.good{background:#e8f7f0;color:#10734f}.crm10-status.warn{background:#fff3d8;color:#8d5c0c}.crm10-status.bad{background:#ffebe9;color:#a52e27}.crm10-status.blue{background:#eef1ff;color:#4054c6}html[data-theme="dark"] .crm10-status.good{background:#11261d;color:#76d9a7}html[data-theme="dark"] .crm10-status.warn{background:#2b2110;color:#efbd66}html[data-theme="dark"] .crm10-status.bad{background:#2a1515;color:#ff8b84}html[data-theme="dark"] .crm10-status.blue{background:#1b2140;color:#aeb9ff}
.crm10-quick{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.crm10-quick a{position:relative;overflow:hidden;background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:18px;padding:16px;text-decoration:none;color:var(--crm-text);min-height:110px}.crm10-quick a:after{content:"↗";position:absolute;right:13px;top:11px;color:var(--crm-muted)}.crm10-quick a:hover{transform:translateY(-2px);box-shadow:var(--crm-shadow)}.crm10-quick b{display:block;font:800 14px Manrope}.crm10-quick small{display:block;color:var(--crm-muted);font-size:10px;line-height:1.45;margin-top:6px}.crm10-quick .tone-red{background:linear-gradient(145deg,#fff,rgba(240,68,62,.06))}.crm10-quick .tone-blue{background:linear-gradient(145deg,#fff,rgba(70,103,255,.07))}html[data-theme="dark"] .crm10-quick .tone-red,html[data-theme="dark"] .crm10-quick .tone-blue{background:var(--crm-panel)}
.crm10-bar-chart{display:flex;align-items:flex-end;gap:10px;height:180px;padding:18px 4px 2px}.crm10-bar-item{flex:1;min-width:46px;display:grid;grid-template-rows:1fr auto;gap:8px;height:100%}.crm10-bars{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:100%}.crm10-bar{width:12px;border-radius:6px 6px 2px 2px;min-height:3px}.crm10-bar.expected{background:#d8dde7}.crm10-bar.collected{background:linear-gradient(180deg,var(--crm-blue),#6d84ff)}.crm10-bar-label{text-align:center;color:var(--crm-muted);font-size:8px;font-weight:800}
.crm10-kpi-line{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.crm10-kpi{background:var(--crm-panel-2);border-radius:14px;padding:13px}.crm10-kpi small{display:block;color:var(--crm-muted);font-size:8px;text-transform:uppercase;font-weight:800}.crm10-kpi b{display:block;font:800 17px Manrope;margin-top:5px}
.crm10-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.crm10-field{display:grid;gap:5px}.crm10-field.full{grid-column:1/-1}.crm10-field label{font-size:9px;color:var(--crm-muted);font-weight:800;text-transform:uppercase;letter-spacing:.06em}.crm10-field input,.crm10-field select,.crm10-field textarea,.crm10-search{width:100%;border:1px solid var(--crm-line);background:var(--crm-panel);color:var(--crm-text);border-radius:10px;padding:10px 11px;font:inherit;font-size:11px;outline:none}.crm10-field textarea{min-height:88px;resize:vertical}.crm10-field input:focus,.crm10-field select:focus,.crm10-field textarea:focus,.crm10-search:focus{border-color:var(--crm-blue);box-shadow:0 0 0 3px rgba(70,103,255,.10)}
.crm10-modal{position:fixed;inset:0;background:rgba(7,10,15,.58);backdrop-filter:blur(8px);display:grid;place-items:center;padding:18px;z-index:100}.crm10-modal-card{width:min(700px,100%);max-height:92vh;overflow:auto;background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:22px;padding:19px;box-shadow:0 28px 90px rgba(0,0,0,.25)}.crm10-modal-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}.crm10-modal-head h2{font:800 20px Manrope;margin:0}.crm10-x{border:1px solid var(--crm-line);background:var(--crm-panel-2);color:var(--crm-text);border-radius:9px;width:34px;height:34px;cursor:pointer;font-size:18px}
.crm10-kanban{display:grid;grid-template-columns:repeat(5,minmax(240px,1fr));gap:10px;overflow:auto;padding-bottom:8px}.crm10-lane{background:var(--crm-panel-2);border:1px solid var(--crm-line);border-radius:18px;padding:10px;min-height:430px}.crm10-lane-head{display:flex;justify-content:space-between;align-items:center;padding:4px 4px 10px}.crm10-lane-head b{font:800 11px Manrope}.crm10-count{font:800 9px Manrope;background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:999px;padding:4px 7px}.crm10-lead{background:var(--crm-panel);border:1px solid var(--crm-line);border-radius:14px;padding:12px;margin-bottom:8px;cursor:pointer;box-shadow:0 10px 25px rgba(20,28,45,.03)}.crm10-lead:hover{border-color:#cfd6e1;transform:translateY(-1px)}.crm10-lead b{display:block;font-size:12px}.crm10-lead small{display:block;color:var(--crm-muted);font-size:9px;margin-top:4px;line-height:1.45}.crm10-lead .lead-foot{display:flex;justify-content:space-between;gap:8px;margin-top:10px;color:var(--crm-muted);font-size:8px}.crm10-pill{display:inline-flex;padding:4px 7px;border-radius:999px;background:var(--crm-panel-2);border:1px solid var(--crm-line);font-size:8px;font-weight:800}
.crm10-finance-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:12px}.crm10-finance-card{position:relative;overflow:hidden;background:#0c0f15;color:#fff;border-radius:22px;padding:22px;min-height:190px}.crm10-finance-card:before{content:"";position:absolute;width:330px;height:330px;border-radius:50%;right:-120px;top:-130px;background:radial-gradient(circle,rgba(70,103,255,.48),transparent 65%)}.crm10-finance-card>*{position:relative}.crm10-finance-card span{color:#8e98a6;font:800 8px Manrope;text-transform:uppercase;letter-spacing:.13em}.crm10-finance-card strong{display:block;font:800 clamp(34px,5vw,52px) Manrope;margin:10px 0 3px;letter-spacing:-.04em}.crm10-finance-card small{color:#9aa4b2;font-size:10px}.crm10-progress{height:8px;border-radius:999px;background:#262c37;overflow:hidden;margin-top:20px}.crm10-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--crm-blue),#8b9cff);border-radius:inherit}
@media(max-width:1100px){.crm10-metrics{grid-template-columns:repeat(2,1fr)}.crm10-grid,.crm10-finance-hero{grid-template-columns:1fr}.crm10-quick{grid-template-columns:repeat(2,1fr)}body.crm-v10-enhanced .student.enriched{grid-template-columns:1.3fr 1fr 90px 80px auto}.student.enriched .student-att{display:none!important}}
@media(max-width:850px){.crm10-shell{grid-template-columns:78px 1fr}.crm10-side{padding:17px 9px}.crm10-brand div,.crm10-nav .group,.crm10-nav a span,.crm10-user div,.crm10-logout{display:none}.crm10-brand,.crm10-nav a{justify-content:center}.crm10-side-bottom{display:flex;justify-content:center}.crm10-nav a{padding:10px 5px}.crm10-content{width:min(100% - 28px,1320px)}body.crm-v10-enhanced .shell{grid-template-columns:78px 1fr!important}}
@media(max-width:650px){.crm10-shell{display:block}.crm10-side{position:fixed;left:0;right:0;bottom:0;top:auto;height:68px;display:block;padding:6px 7px;z-index:80;border-top:1px solid #252b35}.crm10-brand,.crm10-side-bottom,.crm10-nav .group{display:none}.crm10-nav{display:flex;overflow-x:auto;margin:0;gap:2px}.crm10-nav a{min-width:74px;display:grid;place-items:center;gap:2px;padding:6px 3px}.crm10-nav a span{display:block;font-size:7px}.crm10-top{height:60px;padding:0 11px}.crm10-crumb{display:none}.crm10-actions .crm10-btn:first-child{display:none}.crm10-content{width:calc(100% - 18px);padding:24px 0 88px}.crm10-hero{padding:24px 20px;min-height:250px;display:block}.crm10-hero-side{margin-top:20px;min-width:0}.crm10-metrics{grid-template-columns:1fr 1fr}.crm10-quick{grid-template-columns:1fr 1fr}.crm10-grid,.crm10-finance-hero{grid-template-columns:1fr}.crm10-kpi-line{grid-template-columns:1fr}.crm10-form-grid{grid-template-columns:1fr}.crm10-field.full{grid-column:auto}.crm10-kanban{grid-template-columns:repeat(5,82vw)}body.crm-v10-enhanced .shell{display:block!important}body.crm-v10-enhanced .side{position:fixed!important;left:0;right:0;bottom:0;top:auto!important;height:68px!important;padding:6px 7px!important;z-index:80!important;display:block!important}body.crm-v10-enhanced .side .brand,body.crm-v10-enhanced .side-bottom,body.crm-v10-enhanced .crm-nav-group{display:none!important}body.crm-v10-enhanced .nav{display:flex!important;overflow-x:auto!important;gap:2px}body.crm-v10-enhanced .nav a{min-width:74px!important;display:grid!important;place-items:center!important;gap:2px!important;padding:6px 3px!important}body.crm-v10-enhanced .nav a span{display:block!important;font-size:7px!important}body.crm-v10-enhanced .content{width:calc(100% - 18px)!important;padding-bottom:88px!important}body.crm-v10-enhanced .student.enriched{grid-template-columns:1fr auto!important}body.crm-v10-enhanced .student.enriched .student-phone,body.crm-v10-enhanced .student.enriched .student-pay,body.crm-v10-enhanced .student.enriched .student-att,body.crm-v10-enhanced .student.enriched .student-coins{display:none!important}}
/* Phase 11: daily operations refinements */
body.crm-v10-enhanced .nav a[href="/crm/website-users/"] i{color:#86a2ff}

/* ============================================================================
   RICHMOND CRM · PREMIUM COHESION · 2026-10-08
   Presentation-only layer. No student, finance or scanner business logic.
   The page's explicit data-theme determines colors; dark is the first-load default.
   ============================================================================ */
html[data-theme="dark"] {
  color-scheme:dark;
  --crm-bg:#090c11;--crm-panel:#111720;--crm-panel-2:#161e28;
  --crm-text:#eef3f7;--crm-muted:#929eac;--crm-line:#293440;
  --crm-side:#090c12;--crm-side-2:#111821;--crm-accent:#e34b4e;
  --crm-blue:#8096bb;--crm-cyan:#8db8cc;--crm-green:#76d7a9;
  --crm-amber:#e7b96d;--crm-bad:#ff7772;--crm-shadow:0 18px 50px rgba(0,0,0,.20);
}
html[data-theme="light"] {
  color-scheme:light;
  --crm-bg:#f3f5f8;--crm-panel:#fff;--crm-panel-2:#f7f9fc;
  --crm-text:#17202a;--crm-muted:#637080;--crm-line:#dfe5ec;
  --crm-accent:#bf343b;--crm-blue:#526a91;--crm-green:#157951;
  --crm-bad:#ba3c39;--crm-shadow:0 18px 50px rgba(23,36,54,.08);
}
:where(.crm10, body.crm-v10-enhanced){font-family:"DM Sans",system-ui,sans-serif;letter-spacing:-.005em}
.crm10-main,body.crm-v10-enhanced .main{min-width:0;background:var(--crm-bg)!important}
.crm10-content,body.crm-v10-enhanced .content{max-width:1500px}
.crm10-shell{grid-template-columns:260px minmax(0,1fr)}
.crm10-side,body.crm-v10-enhanced .side{
  background:linear-gradient(165deg,#0b1017 0%,#0a0e14 52%,#11141c 100%)!important;
  border-right:1px solid #25303b!important;
  box-shadow:none!important;
}
.crm10-side{padding:22px 14px 15px;overflow:hidden}
.crm10-brand,body.crm-v10-enhanced .brand{gap:11px;min-height:58px;align-items:center;border-bottom:1px solid rgba(255,255,255,.075);padding-bottom:18px!important;border-radius:0!important}
.crm10-brand b,body.crm-v10-enhanced .brand b{letter-spacing:.06em;font-size:12px}
.crm10-brand small,body.crm-v10-enhanced .brand small{color:#8b98a8!important;letter-spacing:.105em}
.crm10-brand img,body.crm-v10-enhanced .brand img{filter:none!important;object-fit:contain}
.crm10-nav,body.crm-v10-enhanced .nav{min-height:0;scrollbar-width:thin;scrollbar-color:#303b4b transparent;overscroll-behavior:contain}
.crm10-nav .group,body.crm-v10-enhanced .crm-nav-group{
  margin:21px 8px 8px;color:#788595!important;font:800 9px Manrope,Arial,sans-serif;
  letter-spacing:.16em;text-transform:uppercase;
}
.crm10-nav .group:not(:first-child),body.crm-v10-enhanced .crm-nav-group:not(:first-child){padding-top:12px;border-top:1px solid rgba(255,255,255,.055)}
.crm10-nav a,body.crm-v10-enhanced .nav a{
  min-height:42px;display:flex!important;align-items:center!important;gap:11px!important;
  border:1px solid transparent!important;margin:3px 0!important;
  padding:10px 12px!important;border-radius:11px!important;
  color:#a4b1c0!important;font:700 11px Manrope,Arial,sans-serif!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
  text-decoration:none;
}
.crm10-nav a:hover,body.crm-v10-enhanced .nav a:hover{background:#1b252f!important;color:#f7faff!important;border-color:#2a3846!important}
.crm10-nav a.active,body.crm-v10-enhanced .nav a.active{
  background:linear-gradient(100deg,rgba(188,52,59,.19),rgba(255,255,255,.045))!important;
  color:#fff!important;border:1px solid #573137!important;
  box-shadow:inset 3px 0 0 #e44b50!important;
}
.crm10-nav i,body.crm-v10-enhanced .nav a i{
  flex:none;width:22px!important;height:22px!important;display:grid;place-items:center;
  color:#b9c5d0!important;font-style:normal!important;font-size:14px;
}
.crm10-nav a.active i,body.crm-v10-enhanced .nav a.active i{color:#ff9a9c!important}
.crm10-side-bottom,body.crm-v10-enhanced .side-bottom{border-top:1px solid #26313c!important;background:transparent;padding-top:14px}
.crm10-avatar,body.crm-v10-enhanced .avatar{background:linear-gradient(145deg,#aa303a,#633042)!important;border:1px solid rgba(255,255,255,.13);color:#fff!important}
.crm10-logout,body.crm-v10-enhanced .logout{border-color:#34404c!important;border-radius:10px;color:#c5ced8!important}
.crm10-logout:hover,body.crm-v10-enhanced .logout:hover{background:#1b242e!important;color:#fff!important}
.crm10-top,body.crm-v10-enhanced .top{
  background:var(--crm-panel)!important;border-bottom:1px solid var(--crm-line)!important;
  backdrop-filter:none!important;box-shadow:none!important;
}
.crm10-top{height:auto;min-height:76px;gap:14px;padding:13px clamp(18px,2.5vw,34px);flex-wrap:wrap}
.crm10-crumb{font-weight:600;font-size:11px;white-space:nowrap}
.crm10-crumb b{font-weight:800}
.crm10-actions{gap:9px;flex-wrap:wrap;justify-content:flex-end;min-width:0}
.crm10-btn,body.crm-v10-enhanced .btn{
  border:1px solid var(--crm-line)!important;background:var(--crm-panel-2)!important;
  color:var(--crm-text)!important;box-shadow:none!important;
  border-radius:11px!important;padding:10px 13px;white-space:nowrap;
  transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.crm10-btn:hover,body.crm-v10-enhanced .btn:hover{border-color:var(--crm-accent)!important;background:var(--crm-panel)!important}
.crm10-btn.dark,body.crm-v10-enhanced .btn.primary{background:var(--crm-text)!important;color:var(--crm-panel)!important;border-color:var(--crm-text)!important}
.crm10-btn.red{background:#b93840!important;color:#fff!important;border-color:#b93840!important}
.crm10-btn.blue{background:#425a7b!important;color:#fff!important;border-color:#425a7b!important}
.crm10-search,body.crm-v10-enhanced input:not([type="checkbox"]):not([type="radio"]),body.crm-v10-enhanced select{
  background:var(--crm-panel-2);color:var(--crm-text);border-color:var(--crm-line);border-radius:10px;
}
.crm10-search:focus-visible,.crm10-btn:focus-visible,.crm10-nav a:focus-visible,body.crm-v10-enhanced .nav a:focus-visible{outline:2px solid var(--crm-accent)!important;outline-offset:2px}
.crm10-content{padding-top:28px}
.crm10-hero{
  min-height:218px;border:1px solid #293541;border-radius:24px;
  background:radial-gradient(circle at 93% 0%,rgba(172,47,58,.19),transparent 34%),linear-gradient(120deg,#111922,#0a0f15 85%);
  box-shadow:none;padding:32px 34px;
}
.crm10-hero:before{inset:0;background-image:linear-gradient(rgba(255,255,255,.022) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.022) 1px,transparent 1px);background-size:44px 44px;mask-image:linear-gradient(to right,black,transparent 76%)}
.crm10-hero h1{font-size:clamp(36px,4.8vw,60px);letter-spacing:-.052em}
.crm10-ey{color:#ff7378;letter-spacing:.19em}
.crm10-hero-side{background:rgba(5,10,16,.60);border-color:#35414e;border-radius:17px;min-width:230px}
.crm10-hero-side strong{font-size:30px}
.crm10-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0 16px}
.crm10-metric{
  position:relative;min-width:0;min-height:135px;overflow:hidden;
  border:1px solid var(--crm-line);border-radius:18px;
  background:var(--crm-panel);padding:18px 17px;
  transition:border-color .16s ease,transform .16s ease;
}
.crm10-metric:before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--crm-accent);opacity:.42}
.crm10-metric:hover{border-color:var(--crm-accent);transform:translateY(-1px)}
.crm10-metric span{font-size:9px;line-height:1.5;color:var(--crm-muted)}
.crm10-metric strong{font-size:clamp(21px,2vw,29px);line-height:1.18;overflow-wrap:anywhere;margin-top:12px;font-variant-numeric:tabular-nums}
.crm10-metric small{font-size:10px;line-height:1.55}
.crm10-metric.good strong{color:var(--crm-green)}
.crm10-metric.bad strong{color:var(--crm-bad)}
.crm10-metric.blue strong{color:var(--crm-text)}
.crm10-panel{border:1px solid var(--crm-line);background:var(--crm-panel);border-radius:20px;padding:20px}
.crm10-panel-head{align-items:center;gap:12px}
.crm10-panel h2,.crm10-panel-head h2{font-size:20px;letter-spacing:-.02em}
.crm10-panel p,.crm10-panel-head p{font-size:11px;line-height:1.55}
.crm10-grid{gap:14px}
.crm10-quick{gap:12px}
.crm10-quick a{
  min-height:132px;border:1px solid var(--crm-line);background:var(--crm-panel);
  border-radius:18px;padding:20px 18px;transition:transform .16s,border-color .16s;
}
.crm10-quick a:hover{border-color:var(--crm-accent);box-shadow:var(--crm-shadow);transform:translateY(-2px)}
.crm10-quick a:after{content:"↗";width:25px;height:25px;display:grid;place-items:center;border:1px solid var(--crm-line);border-radius:9px;top:15px;right:15px;color:var(--crm-accent)}
.crm10-quick b{font-size:15px;padding-right:26px}
.crm10-quick small{font-size:11px;line-height:1.6;max-width:37ch;margin-top:11px}
.crm10-tablewrap{border-radius:12px;max-width:100%;overflow:auto}
.crm10-table th{background:var(--crm-panel-2);font-size:9px}
.crm10-table tbody tr:hover td{background:var(--crm-panel-2)}
.crm10-status{border:1px solid var(--crm-line)}
.crm10-bar-chart{height:190px;min-width:0;overflow-x:auto;gap:9px}
.crm10-bar-item{min-width:35px}
.crm10-bar.expected{background:var(--crm-line)}
.crm10-bar.collected{background:linear-gradient(180deg,#dc575b,#a83643)}
/* Finance: the controls may wrap inside the header; they must never float above it. */
.crm10-actions.finance-filters{gap:9px;row-gap:10px;max-width:100%}
.finance-filters .teacher-select{min-width:175px;max-width:265px;flex:1 1 185px}
.finance-filters #monthPick{flex:0 0 162px;min-width:148px;height:40px}
.finance-filters .crm10-btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center}
.crm10-finance-hero{grid-template-columns:minmax(0,1.45fr) minmax(330px,1fr);align-items:stretch;gap:14px}
.crm10-finance-card{
  min-height:230px;padding:25px 28px;border:1px solid #283744;border-radius:21px;
  background:radial-gradient(circle at 94% 8%,rgba(198,52,61,.17),transparent 39%),linear-gradient(140deg,#121b24,#090e14);
}
.crm10-finance-card:before{width:320px;height:320px;right:-185px;top:-176px;background:radial-gradient(circle,rgba(205,64,72,.20),transparent 70%)}
.crm10-finance-card strong{font-size:clamp(32px,3.8vw,52px);line-height:1.12;overflow-wrap:anywhere}
.crm10-finance-card span{color:#adb7c2;line-height:1.5}
.crm10-finance-card small{color:#a5b1bd}
.finance-context{flex-wrap:wrap;align-items:center}
.finance-context>b{background:#202b36!important;border:1px solid #364450;color:#e9eff5;border-radius:999px}
.crm10-progress{background:#28333e;height:8px}
.crm10-progress i{background:linear-gradient(90deg,#cd444d,#ef8689)}
.crm10-finance-hero>.crm10-panel{padding:22px;display:flex;flex-direction:column;justify-content:space-between}
.crm10-finance-hero .crm10-kpi-line{gap:10px!important}
.crm10-kpi{min-width:0;min-height:73px;border:1px solid var(--crm-line);background:var(--crm-panel-2);border-radius:13px;padding:12px}
.crm10-kpi small{color:var(--crm-muted);font-size:9px;letter-spacing:.025em}
.crm10-kpi b{font:800 clamp(14px,1.4vw,18px)/1.25 Manrope,sans-serif;overflow-wrap:anywhere;margin-top:7px}
.finance-trend-panel{margin-top:12px;min-height:0}
.finance-trend{min-height:0;height:205px}
.finance-legend{gap:14px;flex-wrap:wrap;line-height:1.5}
.finance-clickable:hover{border-color:var(--crm-accent)!important}
.finance-clickable .mini-link{color:var(--crm-accent);font-weight:800}
/* A dark/light drawer should follow the selected theme throughout, including tables. */
.finance-drawer{background:var(--crm-panel)!important;color:var(--crm-text)!important;border-left:1px solid var(--crm-line)!important}
.finance-drawer-head{background:var(--crm-panel)!important;border-color:var(--crm-line)!important}
.finance-drawer .crm10-tablewrap{background:var(--crm-panel)!important;border-color:var(--crm-line)!important}
.finance-drawer .crm10-table{background:var(--crm-panel)!important;color:var(--crm-text)!important}
.finance-drawer .crm10-table th{background:var(--crm-panel-2)!important;color:var(--crm-muted)!important;border-color:var(--crm-line)!important}
.finance-drawer .crm10-table td{background:var(--crm-panel)!important;color:var(--crm-text)!important;border-color:var(--crm-line)!important}
.finance-drawer .crm10-table tbody tr:hover td{background:var(--crm-panel-2)!important}
.finance-drawer .breakdown-summary>div{background:var(--crm-panel-2)!important;border-color:var(--crm-line)!important}
.finance-drawer #breakdownClose{background:var(--crm-panel-2)!important;color:var(--crm-text)!important;border-color:var(--crm-line)!important}
/* Legacy CRM: consistent controls without touching its functional panels or data. */
body.crm-v10-enhanced .shell{grid-template-columns:260px minmax(0,1fr)!important}
body.crm-v10-enhanced .side{padding:20px 14px!important;min-width:0}
body.crm-v10-enhanced .top{min-height:72px;height:auto!important;gap:12px;flex-wrap:wrap;padding-block:11px!important}
body.crm-v10-enhanced .top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
body.crm-v10-enhanced .content{padding-top:28px}
body.crm-v10-enhanced .panel,body.crm-v10-enhanced .metric,body.crm-v10-enhanced .role-card,body.crm-v10-enhanced .card{border-color:var(--crm-line)!important;background:var(--crm-panel)!important}
body.crm-v10-enhanced .panel:hover,body.crm-v10-enhanced .metric:hover{border-color:var(--crm-line)!important}
body.crm-v10-enhanced .student.enriched .tiny-btn.coin{background:var(--crm-panel-2);color:var(--crm-amber);border-color:var(--crm-line)}
@media(max-width:1180px){
  .crm10-shell{grid-template-columns:235px minmax(0,1fr)}
  body.crm-v10-enhanced .shell{grid-template-columns:235px minmax(0,1fr)!important}
  .crm10-finance-hero{grid-template-columns:minmax(0,1fr)}
  .crm10-finance-hero>.crm10-panel{min-height:0}
  .crm10-finance-hero .crm10-kpi-line{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .crm10-content,body.crm-v10-enhanced .content{width:calc(100% - 36px)!important}
}
@media(max-width:900px){
  .crm10-top{padding:13px 18px}
  .crm10-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .crm10-grid,.crm10-finance-hero{grid-template-columns:1fr}
  .crm10-quick{grid-template-columns:repeat(2,minmax(0,1fr))}
  .crm10-hero{padding:26px}
  .crm10-hero-side{min-width:0}
  .crm10-finance-hero .crm10-kpi-line{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:850px){
  .crm10-shell{grid-template-columns:74px minmax(0,1fr)}
  body.crm-v10-enhanced .shell{grid-template-columns:74px minmax(0,1fr)!important}
  .crm10-side{padding:17px 8px}
  .crm10-nav a{padding:10px 5px!important;justify-content:center!important}
  .crm10-nav i{margin:0!important}
}
@media(max-width:650px){
  .crm10-shell{display:block}
  .crm10-side{height:72px;left:0;right:0;bottom:0;top:auto;position:fixed;padding:5px 8px;z-index:80;border-right:0!important;border-top:1px solid #293440!important}
  .crm10-nav{display:flex;gap:3px;margin:0;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:none}
  .crm10-nav .group{display:none!important}
  .crm10-nav a{min-width:79px!important;flex:0 0 79px;display:flex!important;flex-direction:column;gap:1px!important;padding:5px 4px!important;scroll-snap-align:start}
  .crm10-nav a span{font-size:8px!important;display:block;white-space:nowrap}
  .crm10-nav i{width:19px!important;height:18px!important}
  .crm10-content{width:calc(100% - 20px)!important;padding:20px 0 102px}
  .crm10-top{min-height:0;position:relative;padding:14px 12px;align-items:flex-start}
  .crm10-crumb{width:100%}
  .crm10-actions{width:100%;justify-content:flex-start}
  .crm10-actions.finance-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%}
  .finance-filters .teacher-select{min-width:0;max-width:none;width:100%;grid-column:1/-1;min-height:40px}
  .finance-filters #monthPick{min-width:0;width:100%!important;height:40px}
  .finance-filters .crm10-btn{min-width:0;white-space:normal}
  .crm10-hero{padding:22px;min-height:0;display:block}
  .crm10-hero h1{font-size:clamp(34px,10vw,46px)}
  .crm10-hero-side{margin-top:20px}
  .crm10-metrics,.crm10-quick{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .crm10-metric{min-height:116px;padding:14px}
  .crm10-metric strong{font-size:clamp(19px,5.5vw,25px)}
  .crm10-quick a{padding:15px;min-height:130px}
  .crm10-panel{padding:16px}
  .crm10-panel-head{align-items:flex-start;flex-wrap:wrap}
  .crm10-finance-card{padding:22px;min-height:0}
  .crm10-finance-card strong{font-size:clamp(29px,9vw,42px)}
  .crm10-finance-hero .crm10-kpi-line{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .crm10-kpi b{font-size:14px}
  .finance-legend{width:100%}
  .finance-trend{height:170px}
  body.crm-v10-enhanced .shell{display:block!important}
  body.crm-v10-enhanced .side{height:72px!important;left:0;right:0;bottom:0;top:auto!important;position:fixed!important;border-right:0!important;border-top:1px solid #293440!important;padding:5px 8px!important;display:block!important}
  body.crm-v10-enhanced .nav{display:flex!important;gap:3px;scroll-snap-type:x proximity;scrollbar-width:none}
  body.crm-v10-enhanced .nav a{min-width:79px!important;flex:0 0 79px;display:flex!important;flex-direction:column;gap:1px!important;padding:5px 4px!important;scroll-snap-align:start}
  body.crm-v10-enhanced .nav a i{height:18px!important}
  body.crm-v10-enhanced .nav a span{font-size:8px!important;white-space:nowrap}
  body.crm-v10-enhanced .content{width:calc(100% - 20px)!important;padding-bottom:102px!important}
}
@media(max-width:390px){
  .crm10-metrics{grid-template-columns:1fr 1fr}
  .crm10-metric span{font-size:8px}
  .crm10-quick{grid-template-columns:1fr}
  .crm10-finance-hero .crm10-kpi-line{grid-template-columns:1fr 1fr!important}
}
@media(prefers-reduced-motion:reduce){
  .crm10-metric,.crm10-quick a,.crm10-nav a,body.crm-v10-enhanced .nav a{transition:none!important}
}
/* Role-based navigation is generated as crm-nav-group; style both nav variants. */
.crm10-nav .crm-nav-group{margin:21px 8px 8px;padding-top:11px;color:#788595;font:800 9px Manrope,Arial,sans-serif;letter-spacing:.16em;text-transform:uppercase;border-top:1px solid rgba(255,255,255,.06)}
.crm10-nav .crm-nav-group:first-child{padding-top:0;border-top:0}
.crm10-nav .crm-nav-group+ a{margin-top:5px!important}
.crm10-nav a svg,body.crm-v10-enhanced .nav a svg{display:block;flex:none}
@media(max-width:850px){.crm10-nav .crm-nav-group{display:none}}
