@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{--ink:#111827;--muted:#667085;--line:#e7e9ef;--bg:#f6f7fb;--primary:#5b5bd6}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,system-ui,sans-serif}.auth-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 15% 20%,#e9e9ff,transparent 35%),var(--bg)}.auth-shell{width:min(1050px,94vw);display:grid;grid-template-columns:1.05fr .95fr;background:#fff;border:1px solid var(--line);border-radius:28px;overflow:hidden;box-shadow:0 30px 80px #11182714}.auth-brand{padding:64px;background:linear-gradient(145deg,#17172a,#37375e);color:#fff;display:flex;flex-direction:column;justify-content:center}.brand-mark{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:#fff;color:#33336e;font-weight:800;font-size:20px}.auth-brand h1{font-size:38px;margin:20px 0 8px}.auth-brand p{color:#c9cae6}.auth-preview{margin-top:45px;background:#ffffff12;border:1px solid #ffffff20;border-radius:18px;padding:20px}.auth-preview span,.auth-preview small{display:block;color:#c9cae6}.auth-preview b{display:block;font-size:38px;margin:5px 0}.auth-card{padding:64px}.auth-card.standalone{width:min(500px,92vw);border-radius:24px;background:#fff;padding:48px;box-shadow:0 25px 70px #11182714}.eyebrow{font-size:11px;letter-spacing:.14em;font-weight:700;color:#6969d8}.auth-card h2{font-size:32px;margin:7px 0}.form-control{border-color:#dfe2ea;border-radius:12px}.btn-primary{background:var(--primary);border-color:var(--primary);border-radius:12px}.app-shell{display:flex;min-height:100vh}.sidebar{width:250px;background:#111827;color:#aeb5c6;padding:22px 14px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;z-index:20}.brand{display:flex;gap:11px;align-items:center;padding:5px 12px 28px;color:#fff}.brand .brand-mark{width:36px;height:36px;border-radius:10px;background:#fff;color:#20204e}.brand strong{display:block}.brand small{display:block;font-size:10px;color:#788197;margin-top:2px;max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sidebar nav{display:grid;gap:4px}.sidebar a{color:#9da6ba;text-decoration:none;padding:11px 12px;border-radius:10px;font-size:13px;display:flex;gap:11px;align-items:center}.sidebar a:hover,.sidebar a.active{background:#ffffff10;color:#fff}.sidebar-bottom{margin-top:auto}.main{margin-left:250px;width:calc(100% - 250px)}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 30px}.search{color:#98a0b3;font-size:13px;display:flex;gap:10px}.top-actions{display:flex;align-items:center;gap:22px}.avatar{width:34px;height:34px;border-radius:50%;background:#ececff;color:#5050bb;display:grid;place-items:center;font-weight:700}.content{padding:32px;max-width:1500px}.content h1{font-size:28px;font-weight:750}.stat-card,.panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:20px;box-shadow:0 5px 18px #11182705}.stat-card span,.stat-card small{display:block;color:var(--muted);font-size:12px}.stat-card strong{display:block;font-size:28px;margin:8px 0}.stat-card small{color:#31a36c}.panel{min-height:100%}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.panel h5{margin:0;font-size:15px}.panel small{color:var(--muted)}.chart-placeholder{height:230px;position:relative;border-bottom:1px solid var(--line);background:repeating-linear-gradient(to bottom,transparent 0,transparent 44px,#eef0f5 45px)}.chart-line{position:absolute;left:2%;right:2%;top:42%;height:80px;border-top:3px solid #6666dc;transform:skewY(-4deg);border-radius:50%}.chart-labels{position:absolute;bottom:-24px;left:0;right:0;display:flex;justify-content:space-around;color:#98a0b3;font-size:11px}.event{padding:13px 0;border-bottom:1px solid var(--line)}.event:last-child{border:0}.event b,.event small{display:block}.event b{font-size:13px}.big{height:12px}.progress-bar{background:var(--primary)}.mini-stat{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center;padding:25px 0}.mini-stat b{font-size:26px}.mini-stat span{font-size:11px;color:var(--muted)}.mobile-menu{display:none;border:0;background:none;font-size:22px}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.2s}.menu-open .sidebar{transform:translateX(0)}.main{margin-left:0;width:100%}.mobile-menu{display:block}.topbar{padding:0 18px}.content{padding:22px 16px}.auth-shell{grid-template-columns:1fr}.auth-brand{display:none}.auth-card{padding:42px 28px}.search{display:none}}

.student-cell{display:flex;align-items:center;gap:12px}.student-avatar,.profile-avatar{display:grid;place-items:center;border-radius:50%;background:#ececff;color:#5050bb;font-weight:800}.student-avatar{width:38px;height:38px}.student-name{display:block;text-decoration:none;color:#111827;font-weight:650;font-size:13px}.student-cell small{display:block;color:#98a0b3;font-size:11px;margin-top:2px}.status-dot{display:inline-flex;align-items:center;gap:6px;font-size:11px;padding:5px 9px;border-radius:99px;background:#f0f2f5;color:#667085}.status-dot:before{content:'';width:6px;height:6px;border-radius:50%;background:#98a0b3}.status-dot.active{background:#ecfdf3;color:#16824f}.status-dot.active:before{background:#20a464}.status-dot.inactive,.status-dot.transferred{background:#fff4ed;color:#a34d19}.status-dot.graduated{background:#eef2ff;color:#4f46a5}.profile-hero{background:#fff;border:1px solid var(--line);border-radius:18px;padding:25px;display:flex;align-items:center;gap:18px}.profile-avatar{width:78px;height:78px;font-size:30px}.profile-hero h1{font-size:26px;margin:4px 0}.detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:22px}.detail-grid>div{display:flex;flex-direction:column;gap:4px}.detail-grid .wide{grid-column:1/-1}.detail-grid small{color:#98a0b3;font-size:11px;text-transform:uppercase;letter-spacing:.06em}.detail-grid b{font-size:13px;font-weight:600}.detail-grid span{font-size:12px;color:#667085}.timeline{border-left:2px solid #eceef3;margin:20px 0 0 7px;padding-left:20px}.timeline>div{position:relative;padding-bottom:24px}.timeline>div:before{content:'';position:absolute;left:-27px;top:3px;width:11px;height:11px;border-radius:50%;background:#6b6be0;border:3px solid #fff;box-shadow:0 0 0 1px #dfe1ea}.timeline b,.timeline small{display:block}.timeline b{font-size:13px}.timeline small{color:#98a0b3;font-size:11px;margin-top:3px}@media(max-width:700px){.profile-hero{align-items:flex-start;flex-wrap:wrap}.profile-hero .ms-auto{width:100%}.profile-hero .ms-auto .btn{width:100%}.detail-grid{grid-template-columns:1fr}}
.profile-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.modal-content{border:0;border-radius:18px}.modal-header,.modal-footer{border:0}.modal-body{padding-top:0}.class-card h4{font-size:20px;margin:15px 0 8px}.class-icon{width:42px;height:42px;border-radius:13px;background:#ececff;color:#5050bb;display:grid;place-items:center;font-weight:800}.class-meta{display:flex;gap:16px;color:#667085;font-size:12px}.class-meta span+span{border-left:1px solid #e7e9ef;padding-left:16px}
.page-back{margin-bottom:4px}.page-back a{font-size:13px;color:#5963d8;text-decoration:none;font-weight:600}.profile-hero{min-height:118px}.profile-main h1{margin:5px 0 6px!important}.profile-main p{margin:0 0 9px;color:#667085;font-size:13px}.profile-main p span{padding:0 5px;color:#b2b7c4}.profile-actions{margin-left:auto}.profile-avatar{overflow:hidden;flex:0 0 78px}.profile-avatar img{display:block;width:100%;height:100%;object-fit:cover}.profile-avatar>span{display:grid;place-items:center;width:100%;height:100%}.profile-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}.profile-left,.profile-right{min-width:0}.profile-right .panel{min-height:auto}.profile-left .panel{min-height:0}.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-top:1px solid var(--line)}.detail-grid>div{padding:15px 10px 13px 0;display:flex;flex-direction:column;gap:5px;min-width:0}.detail-grid>div:nth-child(even){padding-left:18px}.detail-grid .wide{grid-column:1/-1;padding-left:0}.detail-grid small{font-size:10px;color:#98a0b3;text-transform:uppercase;letter-spacing:.08em;font-weight:700}.detail-grid b{font-size:13px;font-weight:600;color:#202633;line-height:1.45;word-break:break-word}.detail-grid span{font-size:11px;color:#667085}.status-pill{display:inline-flex;align-items:center;gap:6px;width:max-content;font-size:11px;font-weight:600;padding:5px 9px;border-radius:99px;background:#f0f2f5;color:#667085}.status-pill i{width:6px;height:6px;border-radius:50%;background:#98a0b3}.status-pill.active{background:#ecfdf3;color:#16824f}.status-pill.active i{background:#20a464}.status-pill.inactive,.status-pill.transferred{background:#fff4ed;color:#a34d19}.status-pill.graduated{background:#eef2ff;color:#4f46a5}.panel-head{min-height:28px}.document-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--line)}.document-icon{width:36px;height:36px;border-radius:10px;background:#f0f1ff;color:#5656c9;display:grid;place-items:center;font-size:9px;font-weight:800}.document-info{flex:1;min-width:0}.document-info b,.document-info small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.document-info b{font-size:12px}.document-info small{font-size:10px;margin-top:3px}.empty-state{padding:16px 0;color:#98a0b3;font-size:12px}.account-row{display:flex;align-items:center;gap:10px}.account-avatar{width:38px;height:38px;border-radius:50%;background:#ececff;color:#5050bb;display:grid;place-items:center;font-weight:700}.account-row>div:nth-child(2){flex:1;min-width:0}.account-row b,.account-row small{display:block}.account-row b{font-size:12px}.account-row small{font-size:10px;color:#667085;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeline{margin:5px 0 0 8px;border-left:2px solid #eceef3;padding-left:20px}.timeline>div{position:relative;padding:0 0 25px}.timeline>div:last-child{padding-bottom:0}.timeline>div:before{content:'';position:absolute;left:-27px;top:2px;width:11px;height:11px;border-radius:50%;background:#6969d8;border:3px solid #fff;box-shadow:0 0 0 1px #dfe1ea}.timeline b,.timeline small{display:block}.timeline b{font-size:12px}.timeline small{font-size:10px;color:#98a0b3;margin-top:4px}@media(max-width:1050px){.profile-grid{grid-template-columns:1fr}.profile-right{order:2}}@media(max-width:700px){.profile-hero{padding:18px;gap:12px}.profile-avatar{flex-basis:62px;width:62px;height:62px}.profile-main h1{font-size:21px!important}.profile-actions{width:100%;margin-left:0}.profile-actions .btn{width:100%}.detail-grid{grid-template-columns:1fr}.detail-grid>div,.detail-grid>div:nth-child(even),.detail-grid .wide{padding-left:0}.account-row{align-items:flex-start}.account-row .status-pill{margin-left:auto}.content{padding-top:20px}}

.upload-progress-wrap{margin-top:18px}.upload-progress-wrap .progress{height:7px;border-radius:10px;background:#eef0f5}.upload-progress-wrap .progress-bar{transition:width .15s ease}.upload-message{margin-top:12px;padding:9px 11px;border-radius:9px;font-size:12px}.upload-message.success{background:#ecfdf3;color:#16824f}.upload-message.error{background:#fff1f2;color:#b42318}.modal-content{box-shadow:0 20px 60px rgba(15,23,42,.18)}

.academic-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 18px;padding:5px;background:#f1f2f6;border-radius:13px;width:max-content;max-width:100%}.academic-tabs a{padding:9px 13px;border-radius:9px;text-decoration:none;color:#667085;font-size:12px;font-weight:700}.academic-tabs a.active{background:#fff;color:#30343f;box-shadow:0 2px 8px rgba(15,23,42,.07)}@media(max-width:700px){.academic-tabs{width:100%;overflow:auto;flex-wrap:nowrap}.academic-tabs a{white-space:nowrap}.academic-tabs a:last-child{margin-left:auto}}

/* v6: explicit sizing/alignment overrides */
html,body{width:100%;min-width:0}
.table{--bs-table-bg:transparent;margin-bottom:0!important}
.table thead th{height:48px;vertical-align:middle;white-space:nowrap;font-size:12px;font-weight:700;color:#475467;border-bottom:1px solid var(--line)!important}
.table tbody td{height:64px;vertical-align:middle;font-size:12px;color:#344054;border-bottom:1px solid #f0f1f4!important}
.table tbody tr:last-child td{border-bottom:0!important}
.table .student-cell{min-width:220px}
.student-avatar{flex:0 0 38px;width:38px;height:38px;overflow:hidden}
.student-avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.student-cell>div:last-child{min-width:0}
.student-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
.table .btn{white-space:nowrap}
.table-responsive{width:100%}
.profile-hero{position:relative;width:100%;display:grid;grid-template-columns:78px minmax(0,1fr) auto;align-items:center}
.profile-avatar{width:78px!important;height:78px!important;min-width:78px!important;max-width:78px!important;min-height:78px!important;max-height:78px!important;border-radius:18px!important;overflow:hidden!important}
.profile-avatar img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:18px!important}
.profile-main{min-width:0}
.profile-actions{margin-left:0}
.profile-actions .btn{white-space:nowrap}
@media(max-width:700px){
 .profile-hero{grid-template-columns:62px minmax(0,1fr);align-items:start}
 .profile-avatar{width:62px!important;height:62px!important;min-width:62px!important;max-width:62px!important;min-height:62px!important;max-height:62px!important}
 .profile-actions{grid-column:1/-1;width:100%;margin-top:4px}
 .student-name{max-width:180px}
 .table{min-width:700px}
}

/* v7 attendance */
.attendance-summary{display:grid;grid-template-columns:1.5fr 1fr .8fr .8fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:14px}.attendance-summary>div{background:#fff;padding:15px 18px}.attendance-summary small{display:block;font-size:9px;letter-spacing:.09em;font-weight:800;color:#98a0b3;margin-bottom:5px}.attendance-summary b{font-size:13px;color:#202633}.attendance-actions{display:flex;justify-content:space-between;align-items:center;gap:18px}.attendance-actions small{display:block;color:#98a0b3;font-size:11px;margin-top:3px}.attendance-table{min-width:800px}.attendance-table tbody td{height:70px}.attendance-table .student-cell{min-width:245px}.attendance-table .student-name{max-width:260px}.status-select{min-width:125px;font-size:12px}.attendance-table td:nth-child(2),.attendance-table td:nth-child(3){white-space:nowrap}.attendance-table td:last-child{min-width:190px}.attendance-footer{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-top:1px solid var(--line);font-size:12px;color:#667085}.attendance-empty{text-align:center;padding:70px 20px}.attendance-empty-icon{width:54px;height:54px;margin:0 auto 14px;border-radius:16px;background:#eef0ff;color:#5959ca;display:grid;place-items:center;font-size:24px;font-weight:700}.attendance-empty h4{font-size:17px;margin-bottom:6px}.attendance-empty p{font-size:12px;color:#98a0b3;margin:0}@media(max-width:700px){.attendance-summary{grid-template-columns:1fr 1fr}.attendance-actions{align-items:flex-start;flex-direction:column}.attendance-footer{align-items:flex-start;gap:12px;flex-direction:column}.attendance-footer .btn{width:100%}}

/* SchoolOS Theme 2 - Premium Color Edition v21 */
:root{
  --ink:#172033;
  --muted:#667085;
  --line:#dfe6f0;
  --bg:#f3f7fc;
  --primary:#356ae6;
  --primary-dark:#2455c7;
  --surface:#ffffff;
  --blue-soft:#edf4ff;
  --green:#20a464;
  --orange:#e58a2b;
  --purple:#7657d9;
  --red:#dc5b67;
}
body{background:var(--bg);color:var(--ink)}
.topbar{border-bottom:1px solid #dce5f0;box-shadow:0 2px 12px rgba(31,48,80,.04)}
.sidebar{background:linear-gradient(180deg,#16243f 0%,#101a30 100%);border-right:1px solid #263654;box-shadow:5px 0 24px rgba(24,39,67,.08)}
.sidebar a{border:1px solid transparent;transition:.18s ease}
.sidebar a:hover{background:#ffffff12;border-color:#ffffff16;transform:translateX(2px)}
.sidebar a.active{background:linear-gradient(90deg,#356ae6,#4d7ff0);border-color:#6b94f4;box-shadow:0 6px 16px rgba(53,106,230,.22);color:#fff}
.brand .brand-mark{box-shadow:0 6px 16px rgba(0,0,0,.12)}
.content h1{color:#13203a}
.stat-card,.panel{background:var(--surface);border:1px solid #dce5f0;box-shadow:0 7px 22px rgba(37,55,85,.06);position:relative}
.stat-card{border-top:3px solid var(--primary);overflow:hidden}
.stat-card:nth-child(2){border-top-color:var(--green)}
.stat-card:nth-child(3){border-top-color:var(--purple)}
.stat-card:nth-child(4){border-top-color:var(--orange)}
.stat-card strong{color:#12213b}
.stat-card small{color:#4f6b91}
.panel{border-radius:18px}
.panel:hover{box-shadow:0 10px 28px rgba(37,55,85,.075)}
.panel-head{padding-bottom:12px;border-bottom:1px solid #edf1f6}
.table thead th{color:#40516c;border-bottom:1px solid #dfe6f0!important;background:#f8fafd}
.table tbody td{border-bottom:1px solid #edf1f5!important}
.table tbody tr:hover td{background:#f8fbff}
.form-control,.form-select{border:1px solid #d5deea;border-radius:11px;background:#fff;box-shadow:inset 0 1px 2px rgba(20,40,70,.025)}
.form-control:focus,.form-select:focus{border-color:#7da1ef;box-shadow:0 0 0 3px rgba(53,106,230,.12)}
.btn-primary{background:linear-gradient(135deg,#356ae6,#4b79eb);border-color:#356ae6;box-shadow:0 5px 12px rgba(53,106,230,.18)}
.btn-primary:hover{background:linear-gradient(135deg,#2c5fd5,#3f6fe0);border-color:#2c5fd5}
.btn-outline-primary{color:#356ae6;border-color:#9db7ed}
.btn-outline-primary:hover{background:#edf4ff;color:#2455c7;border-color:#7da1ef}
.avatar,.student-avatar,.account-avatar,.class-icon{background:#eaf1ff;color:#356ae6}
.status-dot.active,.status-pill.active{background:#eaf9f1;color:#16824f}
.status-dot.graduated,.status-pill.graduated{background:#f0ecff;color:#684ac4}
.status-dot.inactive,.status-dot.transferred,.status-pill.inactive,.status-pill.transferred{background:#fff3e8;color:#a45a1a}
.academic-tabs{background:#e8eef8;border:1px solid #d7e1ef}
.academic-tabs a.active{color:#2455c7;box-shadow:0 3px 10px rgba(38,70,120,.1);border:1px solid #d6e2f5}
.profile-hero{border:1px solid #dce5f0;box-shadow:0 7px 22px rgba(37,55,85,.055)}
.detail-grid{border-top-color:#e3e9f1}
.document-icon{background:#edf4ff;color:#356ae6;border:1px solid #d8e5fb}
.attendance-summary{border-color:#dce5f0;background:#dce5f0}
.attendance-summary>div{background:#fff}
.attendance-empty-icon{background:#edf4ff;color:#356ae6;border:1px solid #d9e5fb}
.progress-bar{background:linear-gradient(90deg,#356ae6,#5c85ed)}
.page-back a{color:#356ae6}
.page-back a:hover{color:#2455c7}
.modal-content{border:1px solid #dce5f0;box-shadow:0 20px 60px rgba(20,40,70,.16)}
@media(max-width:700px){.panel,.stat-card{border-radius:15px}}

/* SchoolOS Theme 2 - Colorful Premium V22 */
:root{--ink:#172033;--muted:#667085;--line:#d9e1ef;--bg:#f2f6fc;--primary:#4f46e5;--primary2:#2563eb}
body{background:linear-gradient(135deg,#f5f7ff 0%,#eef6ff 48%,#f8f5ff 100%);}
.topbar{background:rgba(255,255,255,.94);border-bottom:1px solid #dbe3f0;box-shadow:0 2px 14px rgba(30,41,59,.06)}
.sidebar{background:linear-gradient(180deg,#172554 0%,#1e1b4b 55%,#312e81 100%);box-shadow:5px 0 24px rgba(30,41,59,.16)}
.sidebar a{border:1px solid transparent;color:#c7d2fe}
.sidebar a:hover{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.12);color:#fff}
.sidebar a.active,.sidebar a.active:hover{background:linear-gradient(90deg,#4f46e5,#2563eb);border-color:#818cf8;color:#fff;box-shadow:0 8px 18px rgba(37,99,235,.28)}
.brand .brand-mark{background:linear-gradient(135deg,#fff,#dbeafe);color:#3730a3;box-shadow:0 5px 15px rgba(0,0,0,.16)}
.content h1{color:#111827;letter-spacing:-.5px}
.stat-card,.panel{background:rgba(255,255,255,.98);border:1px solid #d7dfed;border-radius:18px;box-shadow:0 8px 25px rgba(31,41,55,.07);position:relative;overflow:hidden}
.stat-card{border-top:4px solid #4f46e5}
.stat-card:nth-child(2){border-top-color:#0ea5e9}
.stat-card:nth-child(3){border-top-color:#10b981}
.stat-card:nth-child(4){border-top-color:#f59e0b}
.stat-card strong{color:#111827}
.panel{border-left:4px solid #e0e7ff}
.panel-head{border-bottom:1px solid #edf1f7;padding-bottom:14px}
.form-control,.form-select{border:1px solid #cbd5e1!important;border-radius:11px!important;background:#fff;box-shadow:inset 0 1px 2px rgba(15,23,42,.03)}
.form-control:focus,.form-select:focus{border-color:#6366f1!important;box-shadow:0 0 0 3px rgba(99,102,241,.14)!important}
.btn-primary{background:linear-gradient(135deg,#4f46e5,#2563eb)!important;border-color:#4f46e5!important;box-shadow:0 6px 14px rgba(79,70,229,.22)}
.btn-outline-secondary,.btn-outline-primary{border-radius:10px!important;border-color:#b8c4d6!important}
.table thead th{background:#f3f6fb;border-bottom:2px solid #dbe3f0!important;color:#334155}
.table tbody tr:hover{background:#f7f9ff}
.badge{border:1px solid rgba(0,0,0,.06);padding:.42em .65em}
.card,.modal-content{border:1px solid #d7dfed!important;box-shadow:0 16px 40px rgba(31,41,55,.12)}
hr{border-color:#dbe3f0;opacity:1}
