:root{
  --orange:#f97316;
  --orange-2:#ea580c;
  --amber:#f59e0b;
  --cream:#fff7ed;
  --ink:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --bg:#f8fafc;
  --card:#ffffff;
  --green:#16a34a;
  --red:#dc2626;
  --shadow:0 18px 45px rgba(17,24,39,.08);
}
*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:radial-gradient(circle at top left,#fff7ed 0,#fff 34%,#f8fafc 100%);color:var(--ink)}button,input,select,textarea{font:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:280px;position:fixed;inset:0 auto 0 0;background:rgba(255,255,255,.9);backdrop-filter:blur(18px);border-right:1px solid #ffedd5;padding:26px 18px;z-index:30}.brand{display:flex;gap:13px;align-items:center;margin-bottom:32px}.brand-mark{height:58px;width:58px;border-radius:18px;background:linear-gradient(135deg,var(--orange),var(--amber));display:grid;place-items:center;color:#fff;font-weight:900;box-shadow:0 14px 25px rgba(249,115,22,.22)}.brand h1{font-size:34px;line-height:.9;margin:0;color:var(--orange);letter-spacing:.04em}.brand p{margin:3px 0 0;font-size:11px;font-weight:900;text-transform:uppercase}.brand small{font-size:11px;color:var(--orange)}.nav-list{display:grid;gap:10px}.nav-item{border:0;background:transparent;text-align:left;padding:14px 16px;border-radius:16px;color:#374151;font-weight:750;display:flex;gap:12px;align-items:center;cursor:pointer;transition:.2s}.nav-item:hover{background:#fff7ed;color:var(--orange-2)}.nav-item.active{background:linear-gradient(135deg,var(--orange),var(--amber));color:#fff;box-shadow:0 15px 28px rgba(249,115,22,.22)}.nav-item span{width:22px}.sidebar-footer{position:absolute;left:18px;right:18px;bottom:24px;background:#fff7ed;border:1px solid #ffedd5;border-radius:18px;padding:16px;font-size:12px}.sidebar-footer strong{display:block}.sidebar-footer span{display:block;color:var(--muted);margin-top:5px}.main{margin-left:280px;width:calc(100% - 280px)}.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:22px;padding:22px 30px;background:rgba(255,255,255,.78);backdrop-filter:blur(18px);border-bottom:1px solid #ffedd5}.menu-btn{display:none;border:1px solid #fed7aa;background:#fff;border-radius:14px;width:46px;height:46px;cursor:pointer}.page-title{min-width:250px}.page-title span{font-size:11px;font-weight:900;letter-spacing:.22em;text-transform:uppercase;color:var(--orange)}.page-title h2{margin:2px 0;font-size:28px}.page-title p{margin:0;color:var(--muted);font-size:14px}.top-search{height:48px;flex:1;max-width:520px;border:1px solid var(--line);background:#fff;border-radius:15px;display:flex;align-items:center;gap:10px;padding:0 14px;box-shadow:0 10px 20px rgba(17,24,39,.04)}.top-search input{border:0;outline:0;flex:1}.top-search kbd{font-size:11px;color:var(--muted);background:#f3f4f6;border-radius:7px;padding:4px 7px}.user-area{margin-left:auto;display:flex;align-items:center;gap:12px}.notification{position:relative;border:0;background:#fff;border-radius:14px;height:44px;width:44px;box-shadow:0 8px 18px rgba(17,24,39,.06);cursor:pointer}.notification span{position:absolute;right:4px;top:2px;background:var(--orange);color:#fff;border-radius:999px;font-size:10px;padding:2px 5px}.avatar{height:44px;width:44px;border-radius:50%;background:linear-gradient(135deg,#111827,#f97316);color:#fff;display:grid;place-items:center;font-weight:900}.user-copy{display:grid}.user-copy small{color:var(--muted)}.content{padding:26px 30px 40px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:22px}.stat-card{background:rgba(255,255,255,.92);border:1px solid #ffedd5;border-radius:22px;padding:22px;display:flex;gap:16px;box-shadow:0 13px 26px rgba(17,24,39,.055)}.stat-card.featured{border-left:4px solid var(--orange)}.stat-icon{height:58px;width:58px;border-radius:50%;display:grid;place-items:center;background:#ffedd5;color:var(--orange);font-size:24px}.stat-icon.yellow{background:#fef3c7;color:#d97706}.stat-icon.green{background:#dcfce7;color:#16a34a}.stat-icon.pale{background:#fff7ed}.stat-card span{display:block;font-size:13px;font-weight:800}.stat-card strong{display:block;font-size:28px;margin:8px 0 4px}.stat-card small{color:var(--muted)}.directory-card,.mini-card,.form-section{background:rgba(255,255,255,.96);border:1px solid #ffedd5;border-radius:24px;box-shadow:var(--shadow)}.directory-card{padding:22px}.section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:20px}.section-header h3,.mini-card h4{margin:0;font-size:21px}.section-header p{margin:5px 0 0;color:var(--muted)}.section-actions{display:flex;gap:10px;flex-wrap:wrap}.btn{border:0;border-radius:14px;padding:12px 18px;font-weight:850;cursor:pointer;transition:.2s}.btn.primary{background:linear-gradient(135deg,var(--orange),var(--amber));color:#fff;box-shadow:0 13px 22px rgba(249,115,22,.22)}.btn.primary:hover{transform:translateY(-1px)}.btn.secondary{background:#fff;border:1px solid #fed7aa;color:var(--orange-2)}.btn.ghost{background:#fff;border:1px solid var(--line);color:#374151}.filters-row{display:flex;gap:12px;align-items:center;margin-bottom:16px}.search-field{flex:1;display:flex;align-items:center;gap:8px;background:#f9fafb;border:1px solid var(--line);border-radius:15px;padding:0 14px}.search-field input{height:46px;flex:1;border:0;outline:0;background:transparent}.filters-row select{height:46px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:0 14px;min-width:150px}.table-wrap{overflow:auto;border:1px solid #edf0f3;border-radius:18px}table{width:100%;border-collapse:collapse;min-width:900px}th{background:#fff7ed;color:#9a3412;text-align:left;padding:14px;font-size:12px;text-transform:uppercase;letter-spacing:.05em}td{padding:13px 14px;border-top:1px solid #edf0f3;font-size:14px;vertical-align:middle}.student-photo{height:46px;width:46px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 6px 14px rgba(17,24,39,.14);background:#ffedd5}.fallback-photo{height:46px;width:46px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#ffedd5,#f97316);color:#fff;font-weight:900}.status-badge{display:inline-flex;gap:6px;align-items:center;border-radius:999px;padding:6px 10px;font-weight:800;font-size:12px}.status-badge.Active{background:#dcfce7;color:#166534}.status-badge.Pending{background:#fef3c7;color:#92400e}.status-badge.Inactive,.status-badge.Transferred{background:#fee2e2;color:#991b1b}.action-btn{border:1px solid var(--line);background:#fff;border-radius:10px;padding:8px 10px;cursor:pointer;margin-right:6px}.empty-state{display:none;text-align:center;color:var(--muted);padding:30px}.bottom-grid{margin-top:22px;display:grid;grid-template-columns:1fr 1fr;gap:18px}.mini-card{padding:20px}.mini-head{display:flex;justify-content:space-between;align-items:center}.mini-head button{border:0;background:transparent;color:var(--orange);font-weight:800}.mini-card ul{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:12px}.mini-card li{background:#f9fafb;border-radius:15px;padding:12px}.mini-card li strong{display:block}.mini-card li small{color:var(--muted)}.notice-card{margin-top:16px;display:flex;gap:14px;background:#f9fafb;border-radius:16px;padding:18px}.notice-icon{height:54px;width:54px;border-radius:50%;display:grid;place-items:center;background:#fef3c7}.notice-card p{margin:6px 0;color:var(--muted)}.wide-action{width:100%;margin-top:16px;border:0;background:#fff7ed;color:var(--orange-2);border-radius:14px;padding:14px;font-weight:850}.modal-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.48);backdrop-filter:blur(7px);display:none;align-items:flex-start;justify-content:center;z-index:100;padding:28px;overflow:auto}.modal-backdrop.open{display:flex}.modal-panel{width:min(1180px,100%);background:#fff;border-radius:26px;border:1px solid #ffedd5;box-shadow:0 35px 80px rgba(17,24,39,.25);padding:24px}.modal-header{display:flex;justify-content:space-between;gap:18px;border-bottom:1px solid #f3f4f6;padding-bottom:18px;margin-bottom:18px}.modal-header span{font-size:12px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:var(--orange)}.modal-header h3{margin:4px 0;font-size:28px}.modal-header p{margin:0;color:var(--muted)}.close-btn{height:44px;width:44px;border:0;border-radius:14px;background:#fff7ed;color:var(--orange-2);font-size:26px;cursor:pointer}.student-form{display:grid;gap:16px}.form-section{padding:18px}.form-section.warm{background:#fff7ed}.form-section h4{margin:0 0 14px;font-size:16px;display:flex;align-items:center;gap:9px}.form-section h4 span{height:24px;width:24px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--orange);border:2px solid var(--orange);font-size:13px}.form-grid{display:grid;gap:14px}.form-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.form-grid label{font-size:13px;font-weight:800}.form-grid input,.form-grid select,.form-grid textarea{margin-top:7px;width:100%;border:1px solid var(--line);border-radius:13px;padding:12px 13px;outline:0;background:#fff}.form-grid textarea{height:44px;resize:vertical}.form-grid .wide{grid-column:span 2}.photo-upload-row{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:stretch}.photo-uploader{position:relative;min-height:190px;border:2px dashed #fed7aa;border-radius:20px;background:#fff7ed;display:grid;place-items:center;text-align:center;cursor:pointer;overflow:hidden;padding:18px}.photo-uploader input{display:none}.photo-uploader img{display:none;width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.photo-uploader.has-photo img{display:block}.photo-uploader.has-photo #photoPlaceholder{display:none}.photo-uploader small{display:block;color:var(--muted);margin-top:8px}.photo-note{border:1px solid #ffedd5;background:#fff;border-radius:18px;padding:18px}.photo-note p{color:var(--muted);line-height:1.6}.upload-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.doc-upload{border:2px dashed #fed7aa;border-radius:18px;background:#fff;padding:18px;font-weight:850;display:grid;gap:8px;cursor:pointer}.doc-upload input{font-size:12px}.doc-upload small{font-weight:500;color:var(--muted)}.form-actions{display:flex;justify-content:flex-end;gap:12px;padding-top:8px}@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.form-grid.four{grid-template-columns:repeat(2,1fr)}.sidebar{transform:translateX(-100%);transition:.25s}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%}.menu-btn{display:block}.top-search{display:none}.user-copy{display:none}}@media(max-width:760px){.topbar{padding:16px}.content{padding:18px}.stats-grid,.bottom-grid{grid-template-columns:1fr}.section-header,.filters-row{flex-direction:column;align-items:stretch}.filters-row select{width:100%}.form-grid.four,.photo-upload-row,.upload-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.modal-backdrop{padding:12px}.modal-panel{padding:16px}.form-actions{flex-direction:column}.btn{width:100%}.page-title h2{font-size:22px}}
.field-note{display:block;margin-top:6px;color:var(--orange-2);font-size:11px;font-weight:700}.level-label{color:var(--orange-2);font-weight:800}.view-panel{max-width:1120px}.view-layout{display:grid;grid-template-columns:290px 1fr;gap:18px}.view-profile-card,.view-details-card{border:1px solid #ffedd5;background:#fff;border-radius:22px;padding:18px}.view-profile-card{background:linear-gradient(180deg,#fff7ed,#fff);text-align:center}.view-photo{width:210px;height:210px;border-radius:28px;object-fit:cover;border:6px solid #fff;box-shadow:0 20px 35px rgba(17,24,39,.14);margin:0 auto 16px}.fallback-large{display:grid;place-items:center;background:linear-gradient(135deg,#ffedd5,#f97316);color:#fff;font-size:56px;font-weight:900}.view-profile-card h4{margin:0 0 6px}.view-profile-card p{margin:0;color:var(--muted);line-height:1.55}.view-details-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:1px solid #f3f4f6;padding-bottom:14px;margin-bottom:14px}.view-details-head h4{margin:0;font-size:18px}.view-details-head p{margin:4px 0 0;color:var(--muted)}.view-details-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.view-field{background:#f9fafb;border:1px solid #edf0f3;border-radius:15px;padding:12px;min-height:76px}.view-field span{display:block;color:var(--muted);font-size:12px;font-weight:800;margin-bottom:7px}.view-field strong{display:block;color:var(--ink);font-size:14px;line-height:1.35;word-break:break-word}@media(max-width:900px){.view-layout{grid-template-columns:1fr}.view-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.view-photo{width:180px;height:180px}}@media(max-width:620px){.view-details-grid{grid-template-columns:1fr}}
.page-section{display:none}.page-section.active{display:block}.admissions-hero{display:flex;justify-content:space-between;gap:18px;align-items:center;background:linear-gradient(135deg,#fff7ed,#fff);border:1px solid #ffedd5;border-radius:26px;padding:24px;margin-bottom:22px;box-shadow:var(--shadow)}.admissions-hero .eyebrow{display:block;font-size:11px;font-weight:900;letter-spacing:.22em;text-transform:uppercase;color:var(--orange)}.admissions-hero h3{margin:6px 0 4px;font-size:28px}.admissions-hero p{margin:0;color:var(--muted);max-width:780px;line-height:1.55}.admissions-stats{margin-bottom:22px}.admissions-bottom{margin-top:22px}.check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.check-grid label{display:flex;gap:10px;align-items:center;background:#f9fafb;border:1px solid #edf0f3;border-radius:15px;padding:14px;font-weight:800}.check-grid input{accent-color:var(--orange);width:18px;height:18px}.nav-item[data-section="admissions"].active{background:linear-gradient(135deg,var(--orange),var(--amber));color:#fff;box-shadow:0 15px 28px rgba(249,115,22,.22)}
@media(max-width:900px){.admissions-hero{flex-direction:column;align-items:stretch}.check-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.check-grid{grid-template-columns:1fr}}

.reports-hero{background:linear-gradient(135deg,#fff7ed,#ffffff 55%,#fef3c7)}
.report-filters-card{background:rgba(255,255,255,.96);border:1px solid #ffedd5;border-radius:24px;box-shadow:var(--shadow);padding:20px;margin-bottom:22px}.section-header.compact{margin-bottom:14px}.report-filters-row{margin-bottom:0}.reports-stats{margin-bottom:22px}.reports-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:18px}.report-main-card{min-width:0}.report-side-card{align-self:start;position:sticky;top:104px}.report-date{display:inline-flex;border-radius:999px;background:#fff7ed;color:var(--orange-2);font-size:12px;font-weight:900;padding:9px 12px}.report-summary-box{margin-top:16px;background:#f9fafb;border:1px solid #edf0f3;border-radius:16px;padding:16px;color:#374151;line-height:1.55}.report-summary-box p{margin:0}.report-tip{margin-top:16px}.danger-text{color:var(--red)}
@media print{.sidebar,.topbar,.report-filters-card,.section-actions,.report-side-card,.bottom-grid,.modal-backdrop{display:none!important}.main{margin-left:0;width:100%}.content{padding:0}.page-section{display:none!important}.page-section.active{display:block!important}.directory-card,.admissions-hero{box-shadow:none;border:1px solid #ddd}.table-wrap{overflow:visible}table{min-width:0;font-size:11px}th,td{padding:7px}.student-photo,.fallback-photo{height:32px;width:32px}.reports-grid{display:block}}
@media(max-width:1050px){.reports-grid{grid-template-columns:1fr}.report-side-card{position:static}}


.fees-hero{background:linear-gradient(135deg,#fff7ed,#ffffff 50%,#fffbeb)}
.fees-grid{align-items:start}.fee-calculator-card{border:1px solid #ffedd5;background:linear-gradient(180deg,#fff,#fff7ed)}
.fee-calc-form{display:grid;gap:12px;margin-top:14px}.fee-calc-form label{font-size:13px;font-weight:850;color:var(--ink)}.fee-calc-form select{margin-top:7px;width:100%;border:1px solid var(--line);border-radius:13px;padding:12px 13px;background:#fff;outline:0}.check-line{display:flex!important;align-items:center;gap:10px;background:#fff;border:1px solid #ffedd5;border-radius:13px;padding:12px}.check-line input{accent-color:var(--orange);height:18px;width:18px}.fee-total-box{margin-top:16px;border-radius:18px;background:#111827;color:#fff;padding:16px}.fee-total-box span{display:block;color:#fed7aa;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.12em}.fee-total-box strong{display:block;margin-top:4px;font-size:28px}.fee-breakdown{list-style:none;margin:14px 0 0!important;padding:0!important;display:grid;gap:8px}.fee-breakdown li{background:#fff!important;border:1px solid #ffedd5;border-radius:12px;padding:10px!important;font-size:13px}.fee-structure-card{margin-top:22px}.fee-structure-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.fee-structure-grid h4{margin:0 0 10px}.compact-table table{min-width:0}.compact-table th,.compact-table td{font-size:12px;padding:10px}.fee-notes{margin-top:16px;background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:14px;color:#7c2d12;line-height:1.55}.nav-item[data-section="fees"].active{background:linear-gradient(135deg,var(--orange),var(--amber));color:#fff;box-shadow:0 15px 28px rgba(249,115,22,.22)}
@media(max-width:1050px){.fee-structure-grid{grid-template-columns:1fr}}
@media print{#feesSection .report-filters-card,#feesSection .fee-calculator-card,#feesSection .section-actions{display:none!important}.fee-structure-grid{grid-template-columns:1fr}}


.table-btn.pay{border:0;border-radius:12px;background:#f59e0b;color:white;font-weight:800;padding:8px 12px;cursor:pointer;box-shadow:0 8px 20px rgba(245,158,11,.18)}
.table-btn.pay:hover{background:#d97706}
.paid-cell strong{color:#047857}
.balance-cell strong{color:#b45309}
.balance-cell.cleared strong{color:#047857}
.payment-panel{max-width:900px}
.payment-summary-card{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:12px;align-items:center;background:#fff7ed;border:1px solid #fed7aa;border-radius:22px;padding:16px;margin-bottom:16px}
.payment-summary-card strong{display:block;color:#111827;font-size:18px}
.payment-summary-card small{display:block;color:#6b7280;margin-top:4px}
.payment-pill{background:white;border:1px solid #fed7aa;border-radius:18px;padding:12px}
.payment-pill span{display:block;font-size:12px;font-weight:800;color:#92400e;text-transform:uppercase;letter-spacing:.08em}
.payment-pill strong{font-size:20px;margin-top:3px}
.payment-pill.paid span{color:#047857}
.payment-pill.balance span{color:#b45309}
.payment-history{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.payment-history li{display:grid;grid-template-columns:1fr auto;gap:6px;background:#f9fafb;border:1px solid #eef2f7;border-radius:16px;padding:12px}
.payment-history li strong{color:#111827}
.payment-history li span{color:#6b7280;font-size:13px}
.payment-history li small{grid-column:1/-1;color:#6b7280}
@media(max-width:900px){.payment-summary-card{grid-template-columns:1fr}.payment-pill strong{font-size:18px}}


.classes-hero { background: linear-gradient(135deg, #fff7ed, #ffffff); }
.transport-hero { background: linear-gradient(135deg, #fffbeb, #ffffff); }
#attendanceDate, .attendance-status, .attendance-notes, #transportOptionFilter, #viewExamTerm, #examTerm {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  font: inherit;
}
.attendance-notes { width: 100%; min-width: 180px; }
.student-exam-report-box { margin-top: 14px; }
.empty-inline { padding: 16px; border: 1px dashed #fed7aa; background: #fff7ed; border-radius: 18px; color: #9a3412; font-weight: 700; }
.exam-mini-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:12px; }
.exam-mini-grid div { border:1px solid #f3f4f6; background:#fff; border-radius:16px; padding:12px; }
.exam-mini-grid span { display:block; font-size:12px; color:#6b7280; margin-bottom:4px; }
.exam-mini-grid strong { color:#111827; font-size:18px; }
.exam-remarks { margin-top:12px; padding:14px; background:#f9fafb; border-radius:16px; color:#374151; }
@media (max-width: 900px){ .exam-mini-grid{grid-template-columns: repeat(2, minmax(0,1fr));} }


.import-hero{background:linear-gradient(135deg,#fff7ed,#ffffff)}
.import-grid{display:grid;grid-template-columns:260px 1fr auto;gap:14px;align-items:end;margin-top:8px}
.import-grid label{font-size:13px;font-weight:850;color:var(--ink)}
.import-grid select,.import-grid input{margin-top:7px;width:100%;border:1px solid var(--line);border-radius:13px;padding:12px 13px;background:#fff;outline:0}
.import-help{margin-top:16px;background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:14px;color:#7c2d12;line-height:1.55}
.import-help strong{margin-right:6px}.import-preview-card{margin-top:22px}.import-json{margin:0;white-space:pre-wrap;font-size:12px;line-height:1.45;background:#f9fafb;border:1px solid #edf0f3;border-radius:12px;padding:12px;max-height:220px;overflow:auto}.nav-item[data-section="import"].active{background:linear-gradient(135deg,var(--orange),var(--amber));color:#fff;box-shadow:0 15px 28px rgba(249,115,22,.22)}
@media(max-width:900px){.import-grid{grid-template-columns:1fr}}


.staff-hero { background: linear-gradient(135deg, #fff7ed, #ffffff); }
.staff-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
@media (min-width: 1180px){ .staff-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); } }
.doc-chip { display: inline-block; margin: 2px 4px 2px 0; padding: 5px 8px; border-radius: 999px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 12px; font-weight: 700; }
.class-teacher-select { width: 100%; min-width: 180px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; background: #fff; }
.form-inline-action { display: flex; align-items: end; padding-top: 22px; }
.payment-history li { gap: 12px; }
.payment-history li .action-btn { margin-left: auto; }


/* V8 teacher-on-duty weekly scheduler */
.duty-scheduler{
  display:grid;
  grid-template-columns:repeat(4,minmax(160px,1fr));
  gap:12px;
  align-items:end;
}
.duty-scheduler label{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
  font-weight:800;
  color:#7c2d12;
}
.duty-scheduler label.wide{
  grid-column:span 2;
}
.duty-scheduler input,.duty-scheduler select{
  width:100%;
}
.duty-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
@media (max-width:900px){
  .duty-scheduler{grid-template-columns:1fr 1fr;}
  .duty-scheduler label.wide{grid-column:span 2;}
}
@media (max-width:620px){
  .duty-scheduler{grid-template-columns:1fr;}
  .duty-scheduler label.wide{grid-column:span 1;}
}

.quick-role-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.role-card{border:1px solid #fed7aa;background:#fff7ed;border-radius:18px;padding:18px;text-align:left;cursor:pointer}.role-card strong{display:block;color:#111827;margin-bottom:6px}.role-card small{color:#6b7280}.portal-preview-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.portal-preview-list article{border:1px solid #f3f4f6;border-radius:16px;padding:14px;background:#fff}.portal-preview-list strong{display:block;color:#111827}.portal-preview-list small{display:block;color:#6b7280;margin-top:4px}.teacher-hero{background:linear-gradient(135deg,#fff7ed,#fff)}.filters-row label span{display:block;font-size:12px;font-weight:800;color:#92400e;margin-bottom:5px}

/* V13 landing login and role user management */
.auth-hidden{display:none!important}
.login-landing{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:28px;background:radial-gradient(circle at top left,#ffedd5,#fff7ed 30%,#f9fafb 70%,#fff);position:relative;overflow:hidden}
.login-bg-orb{position:absolute;border-radius:999px;filter:blur(8px);opacity:.55}.orb-one{width:360px;height:360px;background:#fed7aa;top:-110px;left:-100px}.orb-two{width:420px;height:420px;background:#fde68a;right:-130px;bottom:-140px}.login-card{position:relative;width:min(980px,100%);background:rgba(255,255,255,.92);border:1px solid #fed7aa;border-radius:32px;box-shadow:0 30px 80px rgba(124,45,18,.16);padding:26px;backdrop-filter:blur(14px)}.login-brand{display:flex;gap:16px;align-items:center;margin-bottom:22px}.brand-mark.large{width:72px;height:72px;border-radius:24px;font-size:24px}.login-brand h1{font-size:34px;margin:4px 0;color:#111827}.login-brand p{margin:0;color:#6b7280}.role-login-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}.login-role{border:1px solid #fed7aa;background:#fff;border-radius:18px;padding:16px;text-align:left;cursor:pointer;transition:.2s}.login-role:hover,.login-role.active{background:#fff7ed;border-color:#fb923c;box-shadow:0 12px 30px rgba(249,115,22,.12)}.login-role strong{display:block;color:#111827;margin-bottom:5px}.login-role small{color:#6b7280}.login-form{display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:end;border-top:1px solid #f3f4f6;padding-top:18px}.login-form label span{display:block;font-size:12px;font-weight:850;color:#92400e;margin-bottom:6px}.login-form input{width:100%;border:1px solid #e5e7eb;border-radius:14px;padding:13px 14px;outline:0}.login-form input:focus{border-color:#fb923c;box-shadow:0 0 0 4px #ffedd5}.login-submit{height:46px}.login-error{grid-column:1/-1;display:none;border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:12px;padding:10px 12px;font-weight:750}.login-error.show{display:block}.login-hint{grid-column:1/-1;margin:0;color:#6b7280;font-size:13px}.logout-btn{padding:8px 12px!important}.user-management-card{margin-top:18px}.role-pill{display:inline-block;border-radius:999px;padding:6px 10px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;font-size:12px;font-weight:850}.access-note{margin-top:10px;padding:12px 14px;border-radius:14px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-weight:700}.nav-item.role-hidden{display:none}.modal .form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.modal .form-grid .wide{grid-column:1/-1}@media(max-width:850px){.role-login-grid{grid-template-columns:1fr}.login-form{grid-template-columns:1fr}.login-brand h1{font-size:28px}.modal .form-grid.two{grid-template-columns:1fr}}

/* V15 layout balance fixes: prevent card/table overflow and sidebar footer overlap */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
.app-shell, .main, .content, .page-section, .directory-card, .mini-card, .form-section, .report-main-card, .report-side-card { min-width: 0; }
.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}
.sidebar .brand { flex: 0 0 auto; margin-bottom: 18px; }
.nav-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 12px;
  scrollbar-width: thin;
}
.sidebar-footer {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin-top: 14px;
  flex: 0 0 auto;
}
.content { padding-bottom: 90px; max-width: 100%; }
.page-section { width: 100%; max-width: 100%; }
.directory-card, .mini-card, .form-section, .report-filters-card, .admissions-hero {
  max-width: 100%;
  overflow: hidden;
}
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table { width: 100%; }
td, th { word-break: normal; }
td { overflow-wrap: anywhere; }
.filters-row, .section-header, .topbar, .user-area, .section-actions, .duty-actions { min-width: 0; }
.filters-row > *, .section-actions > *, .user-area > * { min-width: 0; }
.topbar { max-width: 100%; }
.page-title { min-width: 0; }
.user-area { flex-shrink: 0; }
.stats-grid, .bottom-grid, .reports-grid, .fee-structure-grid, .quick-role-grid, .portal-preview-list { max-width: 100%; }
.bottom-grid { align-items: start; }
.page-section:not(#dashboardSection) > .bottom-grid { display: none !important; }
.modal-panel { max-width: calc(100vw - 32px); overflow: hidden; }
.modal-backdrop { overflow-y: auto; overflow-x: hidden; }
.form-grid, .photo-upload-row, .upload-grid, .payment-summary-card, .exam-mini-grid, .import-grid, .duty-scheduler { max-width: 100%; }
.form-grid > *, .photo-upload-row > *, .upload-grid > *, .payment-summary-card > *, .exam-mini-grid > *, .import-grid > *, .duty-scheduler > * { min-width: 0; }
input, select, textarea { max-width: 100%; }

@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-grid { grid-template-columns: 1fr; }
  .report-side-card { position: static; }
}

@media (max-width: 900px) {
  .topbar { gap: 12px; }
  .user-area { gap: 8px; }
  .logout-btn { padding: 8px 10px !important; }
  .payment-summary-card, .import-grid, .duty-scheduler { grid-template-columns: 1fr !important; }
  .duty-scheduler label.wide { grid-column: auto !important; }
}

@media (max-width: 760px) {
  .content { padding: 16px 14px 80px; }
  .directory-card, .mini-card, .form-section, .report-filters-card, .admissions-hero { border-radius: 18px; padding: 16px; }
  table { min-width: 760px; }
  .topbar { align-items: flex-start; }
  .page-title p { display: none; }
}


/* V16 visual cleanup: strict page visibility and tidy teacher workspace */
.page-section:not(.active){
  display:none !important;
  height:0 !important;
  max-height:0 !important;
  overflow:hidden !important;
  margin:0 !important;
  padding:0 !important;
  pointer-events:none !important;
}
.page-section.active{
  display:block !important;
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
  pointer-events:auto !important;
}

/* Ensure admin user-management never bleeds into other modules */
#adminSection:not(.active),
#adminSection:not(.active) *{
  display:none !important;
}

/* Better page spacing and card rhythm */
.page-section.active > section,
.page-section.active > div{
  margin-bottom:22px;
}
.page-section.active > section:last-child,
.page-section.active > div:last-child{
  margin-bottom:0;
}

/* Teacher workspace becomes a clean vertical workflow */
#teacherSection .admissions-hero{
  align-items:flex-start;
}
#teacherSection .teacher-stack{
  display:grid;
  grid-template-columns:1fr;
  gap:22px;
  margin-top:0;
}
#teacherSection .teacher-tool-card{
  overflow:hidden;
}
#teacherSection .section-header.compact{
  align-items:flex-start;
}
#teacherSection .section-header.compact .btn{
  flex:0 0 auto;
}

/* All teacher input rows wrap into neat grids instead of overflowing */
#teacherSection .report-filters-row,
#teacherSection .filters-row.report-filters-row{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:14px;
  align-items:end;
  width:100%;
}
#teacherSection .report-filters-row label,
#teacherSection .filters-row.report-filters-row label{
  min-width:0 !important;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
}
#teacherSection .report-filters-row label.wide,
#teacherSection .filters-row.report-filters-row label.wide{
  grid-column:span 2;
}
#teacherSection input,
#teacherSection select,
#teacherSection textarea{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  height:46px;
  border:1px solid var(--line);
  border-radius:13px;
  padding:0 12px;
  background:#fff;
}
#teacherSection .table-wrap{
  margin-top:12px;
}
#teacherSection .table-wrap table{
  min-width:820px;
}
#teacherSection .marks-card .table-wrap table{
  min-width:980px;
}
#teacherSection .assignment-note{
  margin-top:14px;
  padding:14px 16px;
  border:1px solid #fed7aa;
  background:#fff7ed;
  border-radius:16px;
  color:#7c2d12;
  line-height:1.55;
}
#teacherSection .access-note{
  display:inline-block;
  margin-left:6px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
}

/* Sidebar scroll polish so footer does not cut the menu */
.sidebar{
  padding-bottom:18px !important;
}
.nav-list{
  max-height:none;
}
.sidebar-footer{
  margin-bottom:0;
}

@media(max-width:900px){
  #teacherSection .admissions-hero,
  #teacherSection .section-header{
    flex-direction:column;
    align-items:stretch;
  }
  #teacherSection .report-filters-row label.wide,
  #teacherSection .filters-row.report-filters-row label.wide{
    grid-column:1 / -1;
  }
}

@media(max-width:620px){
  #teacherSection .report-filters-row,
  #teacherSection .filters-row.report-filters-row{
    grid-template-columns:1fr;
  }
  #teacherSection .report-filters-row label.wide,
  #teacherSection .filters-row.report-filters-row label.wide{
    grid-column:auto;
  }
}

/* V17 fix: User Management modal must never render inline on other pages */
#userModal.modal,
.modal[aria-hidden="true"]{
  display:none !important;
}
#userModal.modal.open{
  position:fixed !important;
  inset:0 !important;
  z-index:1200 !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  padding:28px !important;
  overflow:auto !important;
  background:rgba(17,24,39,.52) !important;
  backdrop-filter:blur(8px) !important;
}
#userModal .modal-panel{
  width:min(920px,calc(100vw - 32px)) !important;
  max-height:calc(100vh - 56px) !important;
  overflow:auto !important;
  background:#fff !important;
  border-radius:26px !important;
  border:1px solid #ffedd5 !important;
  box-shadow:0 35px 80px rgba(17,24,39,.25) !important;
  padding:24px !important;
}
#userModal .modal-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  border-bottom:1px solid #f3f4f6;
  padding-bottom:18px;
  margin-bottom:18px;
}
#userModal .modal-head h3{margin:4px 0;font-size:28px}
#userModal .modal-head p{margin:0;color:var(--muted)}
#userModal .modal-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:18px}
#userModal .payment-form{display:grid;gap:16px}

@media(max-width:760px){
  #userModal.modal.open{padding:12px !important;}
  #userModal .modal-panel{width:100% !important;max-height:calc(100vh - 24px) !important;padding:16px !important;}
  #userModal .modal-actions{flex-direction:column;}
}

.teacher-profile-reports{grid-template-columns:1fr 1fr;margin-bottom:1rem;}
.teacher-profile-grid{display:grid;grid-template-columns:150px 1fr;gap:1rem;align-items:start;}
.teacher-profile-photo{display:flex;flex-direction:column;gap:.75rem;align-items:center;}
.teacher-photo-preview{width:118px;height:118px;border-radius:28px;background:#fff7ed;border:1px solid #fed7aa;display:flex;align-items:center;justify-content:center;font-weight:900;color:#c2410c;font-size:1.5rem;overflow:hidden;}
.teacher-photo-preview img,#currentUserAvatar img{width:100%;height:100%;object-fit:cover;display:block;}
.teacher-profile-fields{align-items:end;}
.teacher-report-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;}
.file-btn{cursor:pointer;text-align:center;}
@media (max-width:900px){.teacher-profile-reports{grid-template-columns:1fr}.teacher-profile-grid{grid-template-columns:1fr}.teacher-report-actions{grid-template-columns:1fr}}

/* v20 teacher minimal dashboard + side navigation cleanup */
.teacher-only-nav{display:none;}
body.is-teacher-user .teacher-only-nav{display:flex;}
body.is-teacher-user .nav-item[data-section="teacher"]:not(.teacher-only-nav){display:none;}
body.is-teacher-user .sidebar-footer{display:none;}
.teacher-view-panel{display:none;}
.teacher-view-panel.active{display:block;}
.teacher-dashboard-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}
.teacher-dashboard-card{
  border:1px solid rgba(245,158,11,.22);
  background:#fff;
  border-radius:22px;
  padding:20px;
  text-align:left;
  box-shadow:0 12px 30px rgba(15,23,42,.06);
  cursor:pointer;
  transition:.2s ease;
  min-height:130px;
}
.teacher-dashboard-card:hover{
  transform:translateY(-2px);
  border-color:rgba(245,158,11,.55);
  box-shadow:0 18px 36px rgba(245,158,11,.12);
}
.teacher-dashboard-card strong{
  display:block;
  font-size:1.05rem;
  color:#111827;
  margin-bottom:8px;
}
.teacher-dashboard-card small{
  display:block;
  line-height:1.5;
  color:#6b7280;
}
body.is-teacher-user .teacher-select-admin-only{display:none;}
body.is-teacher-user .top-search,
body.is-teacher-user .notification{display:none;}
body.is-teacher-user .page-title span{letter-spacing:.18em;}
.teacher-filter-panel{margin-bottom:18px;}
@media (max-width: 820px){
  .teacher-dashboard-grid{grid-template-columns:1fr;}
}

/* V21 complete teacher workspace redo: clean, bounded, minimal */
body.is-teacher-user .content{padding-bottom:48px;}
.teacher-clean-shell{display:grid;gap:18px;max-width:1180px;margin:0 auto 40px;width:100%;}
.teacher-clean-header{display:flex;justify-content:space-between;gap:18px;align-items:center;background:linear-gradient(135deg,#fff7ed 0%,#ffffff 60%);border:1px solid #fed7aa;border-radius:26px;padding:22px 24px;box-shadow:0 14px 35px rgba(15,23,42,.06);overflow:hidden;}
.teacher-clean-header h3{font-size:28px;line-height:1.15;margin:6px 0;color:#111827;}
.teacher-clean-header p{margin:0;color:#6b7280;max-width:760px;line-height:1.55;}
.teacher-badge{white-space:nowrap;border:1px solid #fed7aa;background:#fff;color:#9a3412;border-radius:999px;padding:9px 13px;font-weight:900;font-size:12px;}
.teacher-context-card,.teacher-panel{background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:18px;box-shadow:0 10px 28px rgba(15,23,42,.045);max-width:100%;overflow:hidden;}
.teacher-context-card{display:grid;grid-template-columns:220px 1fr;gap:14px;align-items:start;}
.teacher-context-title strong{display:block;color:#111827;margin-bottom:4px;}
.teacher-context-title small{display:block;color:#6b7280;line-height:1.4;}
.teacher-context-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.teacher-context-fields label,.teacher-form-grid label{min-width:0;}
.teacher-context-fields label span,.teacher-form-grid label span{display:block;font-size:12px;font-weight:850;color:#374151;margin-bottom:6px;}
.teacher-context-fields input,.teacher-context-fields select,.teacher-form-grid input,.teacher-form-grid select{width:100%;max-width:100%;box-sizing:border-box;border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:11px 12px;outline:none;}
.teacher-context-fields input:focus,.teacher-context-fields select:focus,.teacher-form-grid input:focus,.teacher-form-grid select:focus{border-color:#fb923c;box-shadow:0 0 0 4px #ffedd5;}
#teacherAssignedNote{grid-column:2 / -1;margin:0;padding:10px 12px;border-radius:14px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-weight:700;}
.teacher-view-panel{display:none!important;}
.teacher-view-panel.active{display:block!important;}
.teacher-dashboard-welcome{border:1px solid #f3f4f6;background:#f9fafb;border-radius:20px;padding:18px;margin-bottom:16px;}
.teacher-dashboard-welcome h3{margin:4px 0;font-size:22px;}
.teacher-dashboard-welcome p{margin:0;color:#6b7280;line-height:1.55;}
.teacher-dashboard-grid.clean{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.teacher-dashboard-card{display:block;border:1px solid #e5e7eb;background:#fff;border-radius:20px;padding:18px;text-align:left;box-shadow:none;min-height:136px;max-width:100%;}
.teacher-dashboard-card span{display:flex;width:42px;height:42px;align-items:center;justify-content:center;border-radius:14px;background:#fff7ed;margin-bottom:12px;font-size:20px;}
.teacher-dashboard-card strong{display:block;margin:0 0 6px;color:#111827;font-size:16px;}
.teacher-dashboard-card small{display:block;color:#6b7280;line-height:1.45;}
.teacher-dashboard-card:hover{transform:none;border-color:#fb923c;background:#fff7ed;box-shadow:0 10px 24px rgba(249,115,22,.10);}
.teacher-profile-grid.clean-profile{display:grid;grid-template-columns:150px 1fr;gap:18px;align-items:start;}
.teacher-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end;}
.teacher-form-grid .wide{grid-column:1/-1;}
.teacher-form-grid.marks-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px;}
.teacher-form-grid.note-grid{grid-template-columns:1fr 1fr 2fr;margin-bottom:16px;}
.teacher-report-actions.clean-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#teacherSection .table-wrap{width:100%;max-width:100%;overflow:auto;border-radius:18px;border:1px solid #f3f4f6;}
#teacherSection table{min-width:760px;width:100%;}
#teacherSection .section-header{gap:16px;align-items:flex-start;}
#teacherSection .section-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;}
#teacherSection .btn{white-space:nowrap;}
body.is-teacher-user .nav-item:not(.teacher-only-nav){display:none!important;}
body.is-teacher-user .teacher-only-nav{display:flex!important;}
body.is-teacher-user .sidebar-footer{display:none!important;}
body.is-teacher-user #adminSection,body.is-teacher-user #dashboardSection,body.is-teacher-user #studentsSection,body.is-teacher-user #feesSection,body.is-teacher-user #reportsSection,body.is-teacher-user #staffSection,body.is-teacher-user #admissionsSection,body.is-teacher-user #transportSection,body.is-teacher-user #classesSection,body.is-teacher-user #importSection,body.is-teacher-user #guardianSection,body.is-teacher-user #kitchenSection,body.is-teacher-user #securitySection,body.is-teacher-user #generalWorkerSection{display:none!important;}
@media(max-width:1050px){.teacher-dashboard-grid.clean{grid-template-columns:repeat(2,minmax(0,1fr));}.teacher-form-grid.marks-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.teacher-context-card{grid-template-columns:1fr;}#teacherAssignedNote{grid-column:1/-1;}}
@media(max-width:720px){.teacher-clean-header{display:block;padding:18px}.teacher-badge{display:inline-block;margin-top:12px}.teacher-context-fields,.teacher-dashboard-grid.clean,.teacher-profile-grid.clean-profile,.teacher-form-grid,.teacher-form-grid.marks-grid,.teacher-form-grid.note-grid,.teacher-report-actions.clean-actions{grid-template-columns:1fr;}#teacherSection .section-header{display:block;}#teacherSection .section-actions{justify-content:flex-start;margin-top:12px}.teacher-clean-header h3{font-size:24px;}}

/* V22: move teacher assignment and TOD planning from Staff into Teacher Section admin area */
.admin-teacher-management{display:grid;gap:18px;max-width:1180px;margin:0 auto 40px;width:100%;}
.teacher-admin-hero{margin-bottom:0;}
.teacher-admin-grid{display:grid;grid-template-columns:1fr;gap:18px;}
.teacher-admin-grid .directory-card{max-width:100%;overflow:hidden;}
.duty-scheduler textarea{width:100%;min-height:92px;resize:vertical;border:1px solid #e5e7eb;border-radius:14px;background:#fff;padding:11px 12px;outline:none;font:inherit;box-sizing:border-box;}
.duty-scheduler textarea:focus{border-color:#fb923c;box-shadow:0 0 0 4px #ffedd5;}
body.is-teacher-user #adminTeacherManagement{display:none!important;}
body.is-admin-user .teacher-clean-shell{display:none!important;}
.staff-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media(max-width:820px){.staff-summary-grid{grid-template-columns:1fr;}}


/* V23: clean teacher landing page, side-menu only navigation */
body.is-teacher-user .main{background:#f9fafb;}
body.is-teacher-user .content{max-width:1180px;margin:0 auto;width:100%;}
body.is-teacher-user .nav-list{padding-bottom:22px;}
body.is-teacher-user .teacher-only-nav{
  display:flex!important;
  align-items:center;
  gap:10px;
  margin-bottom:6px;
}
body.is-teacher-user .teacher-only-nav span{width:24px;text-align:center;}
body.is-teacher-user .nav-item:not(.teacher-only-nav){display:none!important;}
body.is-teacher-user #teacherSection{display:block!important;}
.teacher-minimal-dashboard{display:grid;gap:16px;}
.teacher-dashboard-welcome.clean-minimal{
  border:1px solid #fed7aa;
  background:linear-gradient(135deg,#fff7ed,#ffffff 70%);
  border-radius:24px;
  padding:22px;
  margin:0;
}
.teacher-dashboard-welcome.clean-minimal h3{font-size:26px;margin:6px 0 8px;color:#111827;}
.teacher-dashboard-welcome.clean-minimal p{max-width:850px;color:#4b5563;line-height:1.55;}
.privacy-note{margin-top:12px!important;padding:12px 14px;border-radius:16px;background:#ffffff;border:1px solid #ffedd5;font-weight:700;color:#9a3412!important;}
.teacher-summary-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.teacher-summary-strip article{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:18px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  min-width:0;
}
.teacher-summary-strip span{display:block;color:#6b7280;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;}
.teacher-summary-strip strong{display:block;color:#111827;font-size:28px;line-height:1;margin-bottom:8px;}
.teacher-summary-strip small{display:block;color:#6b7280;line-height:1.4;white-space:normal;overflow-wrap:anywhere;}
body.is-teacher-user .teacher-dashboard-grid,
body.is-teacher-user .teacher-dashboard-card{display:none!important;}
body.is-teacher-user .teacher-clean-header{box-shadow:none;}
body.is-teacher-user .teacher-badge{background:#fff7ed;}
body.is-teacher-user .teacher-context-card{margin-top:0;}
@media(max-width:820px){.teacher-summary-strip{grid-template-columns:1fr;}.teacher-dashboard-welcome.clean-minimal{padding:18px;}}

/* V24: Teacher reports + TOD handover cleanup */
body.is-teacher-user .sidebar{display:flex;flex-direction:column;}
body.is-teacher-user .nav-list{display:flex;flex-direction:column;gap:10px;min-height:0;flex:1;overflow:auto;}
body.is-teacher-user .teacher-profile-nav{margin-top:auto!important;border-top:1px solid #ffedd5;padding-top:14px;}
.teacher-report-filter-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px;background:#fff7ed;border:1px solid #fed7aa;border-radius:18px;padding:14px;}
.teacher-report-filter-card label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:850;color:#7c2d12;}
.teacher-report-filter-card input,.teacher-report-filter-card select{width:100%;border:1px solid #e5e7eb;border-radius:13px;background:#fff;padding:11px 12px;outline:0;}
.teacher-tod-note{margin:0 0 14px 0;}
.teacher-handover-editor{display:grid;gap:8px;min-width:260px;}
.teacher-handover-editor textarea{width:100%;min-height:92px;border:1px solid #e5e7eb;border-radius:14px;padding:10px 12px;resize:vertical;background:#fff;}
.btn.small{padding:9px 12px;border-radius:12px;font-size:12px;}
@media(max-width:820px){.teacher-report-filter-card{grid-template-columns:1fr;}.teacher-profile-nav{margin-top:10px!important;}}


/* V25 teacher role lock and final navigation polish */
body.is-teacher-user .nav-list{height:100%;}
body.is-teacher-user .teacher-profile-nav{margin-top:auto!important;}
body.is-teacher-user .teacher-clean-shell{min-height:calc(100vh - 160px);}
body.is-teacher-user .teacher-context-card[style*="none"] + .teacher-panel{margin-top:0;}
#teacherSection button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none;}
.current-duty-row{background:#fff7ed;}
.current-duty-badge{display:inline-flex;margin-left:6px;padding:4px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:11px;font-weight:900;white-space:nowrap;}
.readonly-note{color:#6b7280;font-style:italic;}
body.is-teacher-user .teacher-report-actions.clean-actions{grid-template-columns:repeat(auto-fit,minmax(190px,1fr));}
@media(max-width:820px){body.is-teacher-user .teacher-profile-nav{margin-top:auto!important;}}

/* V26: Student section tabbed portal */
.student-portal-hero{background:linear-gradient(135deg,#fff7ed,#ffffff 68%);border-color:#fed7aa;}
.student-dashboard-lite{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px;}
.student-dashboard-lite article{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:16px;box-shadow:0 10px 24px rgba(15,23,42,.05);min-width:0;}
.student-dashboard-lite span,.student-info-card span{display:block;color:#6b7280;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px;}
.student-dashboard-lite strong,.student-info-card strong{display:block;color:#111827;font-size:20px;line-height:1.2;overflow-wrap:anywhere;}
.student-dashboard-lite small,.student-info-card small{display:block;color:#6b7280;margin-top:6px;line-height:1.35;overflow-wrap:anywhere;}
.student-profile-mini{display:flex;align-items:center;gap:12px;}
.student-tabs-card{padding:16px;}
.student-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px;}
.student-tabs button{border:1px solid #e5e7eb;background:#fff;color:#374151;border-radius:999px;padding:10px 13px;font-weight:850;cursor:pointer;}
.student-tabs button.active{background:#fb923c;border-color:#fb923c;color:#fff;box-shadow:0 8px 18px rgba(251,146,60,.25);}
.student-tab-tools{display:none;gap:12px;flex-wrap:wrap;background:#fff7ed;border:1px solid #fed7aa;border-radius:16px;padding:12px;margin-bottom:14px;}
.student-tab-tools label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:850;color:#7c2d12;}
.student-tab-tools select{border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:10px 12px;min-width:150px;}
.student-portal-content{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:16px;min-height:220px;}
.student-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.student-info-card{background:#f9fafb;border:1px solid #e5e7eb;border-radius:18px;padding:16px;}
.portal-list{display:grid;gap:10px;}
.portal-list article{border:1px solid #e5e7eb;background:#f9fafb;border-radius:16px;padding:14px;}
.portal-list.compact article{padding:11px 13px;}
.portal-list p{margin:8px 0;color:#374151;line-height:1.45;}
.portal-list small{color:#6b7280;}
.student-subtitle{margin:18px 0 10px;color:#111827;}
.pill-grid{display:flex;flex-wrap:wrap;gap:10px;}
.pill-grid span{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;border-radius:999px;padding:10px 13px;font-weight:850;}
.uniform-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;}
.uniform-grid article{border:1px solid #fecaca;background:#fff7f7;border-radius:16px;padding:14px;}
.uniform-grid article.bought{border-color:#bbf7d0;background:#f0fdf4;}
.uniform-grid small{display:block;margin-top:6px;color:#6b7280;}
@media(max-width:980px){.student-dashboard-lite{grid-template-columns:repeat(2,minmax(0,1fr));}.student-info-grid{grid-template-columns:1fr;}}
@media(max-width:620px){.student-dashboard-lite{grid-template-columns:1fr;}.student-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;}.student-tabs button{white-space:nowrap;}.student-tab-tools{flex-direction:column;}.student-tab-tools select{width:100%;}.student-portal-content{padding:12px;}}

/* v28 Admin Student Section: list first, then v27-style tabbed details */
.student-list-card{margin-bottom:16px;}
.student-list-tools{display:grid;grid-template-columns:2fr 1fr;gap:12px;margin:12px 0 16px;}
.student-list-tools label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:850;color:#374151;}
.student-list-tools input,.student-list-tools select{border:1px solid #e5e7eb;border-radius:14px;padding:11px 12px;background:#fff;color:#111827;}
.student-list-grid{display:grid;gap:10px;}
.student-list-row{display:grid;grid-template-columns:auto minmax(160px,1.4fr) minmax(120px,.8fr) minmax(110px,.8fr) minmax(180px,1.1fr) minmax(170px,1fr);gap:12px;align-items:center;width:100%;border:1px solid #e5e7eb;background:#fff;border-radius:18px;padding:12px;text-align:left;cursor:pointer;box-shadow:0 8px 20px rgba(15,23,42,.04);transition:.18s ease;}
.student-list-row:hover{border-color:#fb923c;transform:translateY(-1px);box-shadow:0 12px 26px rgba(251,146,60,.14);}
.student-list-row strong{color:#111827;font-size:15px;}
.student-list-row small{color:#6b7280;line-height:1.35;}
.student-detail-bar{display:flex;justify-content:flex-start;margin-bottom:12px;}
.count-badge{display:inline-flex;align-items:center;border-radius:999px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa;padding:8px 12px;font-weight:900;font-size:12px;}
@media(max-width:980px){.student-list-row{grid-template-columns:auto 1fr;}.student-list-row small{grid-column:2;}.student-list-tools{grid-template-columns:1fr;}}
@media(max-width:620px){.student-list-row{grid-template-columns:1fr;}.student-list-row span,.student-list-row small{grid-column:auto;}.student-list-row .avatar{margin-bottom:4px;}}


/* v30: Student performance graph and stronger subject selection */
.performance-graph{display:grid;gap:12px;background:#f9fafb;border:1px solid #e5e7eb;border-radius:18px;padding:14px;margin-bottom:14px;}
.performance-bar-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(160px,3fr) 56px;gap:12px;align-items:center;}
.performance-bar-row span{font-weight:850;color:#374151;overflow-wrap:anywhere;}
.performance-bar-row strong{text-align:right;color:#111827;}
.performance-bar-track{height:16px;background:#e5e7eb;border-radius:999px;overflow:hidden;}
.performance-bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,#fb923c,#f97316);min-width:4px;}
@media(max-width:620px){.performance-bar-row{grid-template-columns:1fr;gap:7px;}.performance-bar-row strong{text-align:left;}.performance-bar-track{width:100%;}}

/* v31 teacher student record access */
.teacher-student-access-workspace{margin-top:1.25rem}
.teacher-student-access-card{margin-top:1rem}
.student-access-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:start}
.student-list-grid.compact-list{grid-template-columns:1fr;gap:.65rem}
.teacher-student-detail{margin-top:1rem}
.inline-student-summary{margin:1rem 0}
.teacher-student-tools{margin:.75rem 0 1rem;display:flex!important;flex-wrap:wrap;gap:.75rem}
.teacher-student-tools label{min-width:160px}
@media (max-width: 900px){.student-access-columns{grid-template-columns:1fr}.teacher-student-tools label{min-width:100%}}

/* V33 — Simplified, task-first interface */
:root{
  --friendly-navy:#182334;
  --friendly-soft:#f5f7fa;
  --friendly-orange:#ef6c24;
  --friendly-green:#eaf6ee;
  --friendly-blue:#edf5fb;
  --friendly-yellow:#fff7df;
}

body{background:#f6f7f9;}
.role-hidden{display:none!important;}
.nav-group{display:grid;gap:6px;}
.nav-group-label{padding:2px 14px 8px;font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#9ca3af;}
.nav-item{min-height:48px;padding:11px 14px;border-radius:13px;font-weight:650;gap:11px;}
.nav-item b{font:inherit;}
.nav-item span{display:grid;place-items:center;width:24px;height:24px;font-size:17px;}
.nav-item.active{background:var(--friendly-navy);box-shadow:none;}
.nav-more{margin-top:8px;border-top:1px solid #edf0f3;padding-top:10px;}
.nav-more summary{list-style:none;display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;padding:12px 14px;border-radius:13px;cursor:pointer;color:#374151;}
.nav-more summary::-webkit-details-marker{display:none;}
.nav-more summary:hover{background:#f8fafc;}
.nav-more summary b{font-size:14px;}
.nav-more summary small{font-size:10px;color:#9ca3af;}
.nav-more[open] summary{background:#f8fafc;color:var(--friendly-orange);}
.nav-more-items{display:grid;gap:5px;padding:6px 0 0 12px;}
.sidebar{width:250px;padding:22px 14px;background:#fff;border-right:1px solid #eceff3;}
.sidebar .brand{padding:0 8px;margin-bottom:26px;}
.sidebar .brand-mark{width:48px;height:48px;border-radius:15px;box-shadow:none;}
.sidebar .brand h1{font-size:28px;}
.sidebar-footer{background:#f8fafc;border-color:#edf0f3;color:#6b7280;}
.main{margin-left:250px;width:calc(100% - 250px);}
.topbar{padding:16px 24px;background:rgba(255,255,255,.94);border-bottom:1px solid #eceff3;gap:18px;}
.page-title{min-width:220px;}
.page-title span{color:#9a5a2e;letter-spacing:.12em;}
.page-title h2{font-size:24px;}
.top-search{height:46px;max-width:560px;border-color:#e3e7ec;box-shadow:none;background:#f8fafc;}
.top-search:focus-within{background:#fff;border-color:#f0a06d;box-shadow:0 0 0 3px rgba(239,108,36,.12);}
.content{padding:24px 26px 96px;max-width:1500px;margin:0 auto;}

.friendly-home-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:8px 2px 20px;}
.friendly-home-hero h3{margin:5px 0 6px;font-size:31px;letter-spacing:-.035em;}
.friendly-home-hero p{margin:0;color:#6b7280;font-size:16px;}
.friendly-date{font-size:12px;font-weight:750;color:#9a5a2e;}
.help-button{border:1px solid #e5e7eb;background:#fff;border-radius:13px;padding:10px 14px;display:flex;align-items:center;gap:8px;font-weight:750;color:#374151;cursor:pointer;}
.help-button span{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#f3f4f6;}
.quick-work-card,.simple-page-intro{background:#fff;border:1px solid #e8ebef;border-radius:22px;box-shadow:0 8px 28px rgba(24,35,52,.055);}
.quick-work-card{padding:22px;margin-bottom:24px;}
.friendly-section-heading{display:flex;justify-content:space-between;align-items:end;gap:18px;margin-bottom:17px;}
.friendly-section-heading h3{margin:3px 0 0;font-size:20px;}
.friendly-section-heading p{margin:0;color:#7a828e;font-size:13px;max-width:470px;}
.overview-heading{padding:4px 2px 0;}
.task-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.task-action{border:1px solid #e8ebef;background:#fff;border-radius:17px;min-height:92px;padding:15px;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:12px;text-align:left;cursor:pointer;transition:border-color .18s,transform .18s,box-shadow .18s;}
.task-action:hover{transform:translateY(-1px);border-color:#d8dde4;box-shadow:0 10px 22px rgba(24,35,52,.07);}
.task-action .task-icon{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;background:#f4f6f8;font-size:21px;font-weight:800;color:#374151;}
.task-action strong,.task-action small{display:block;}
.task-action strong{font-size:14px;margin-bottom:4px;color:#182334;}
.task-action small{font-size:11px;line-height:1.35;color:#7a828e;}
.task-action i{font-style:normal;font-size:25px;color:#a4abb4;}
.task-add .task-icon,.task-admission .task-icon{background:#fff0e8;color:#b84b13;}
.task-fees .task-icon{background:var(--friendly-green);color:#247744;}
.task-attendance .task-icon{background:var(--friendly-blue);color:#28688e;}
.task-reports .task-icon{background:var(--friendly-yellow);color:#8a6612;}
.simple-page-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 22px;margin-bottom:18px;}
.simple-page-intro h3{font-size:25px;margin:3px 0 5px;}
.simple-page-intro p{margin:0;color:#6b7280;}

.stats-grid{gap:12px;margin-bottom:20px;}
.stat-card{padding:17px;border-radius:17px;border:1px solid #e8ebef;box-shadow:none;background:#fff;}
.stat-card.featured{border-left:1px solid #e8ebef;}
.stat-icon{width:46px;height:46px;font-size:19px;border-radius:13px;}
.stat-card strong{font-size:23px;margin:5px 0 2px;}
.stat-card span{font-size:12px;color:#4b5563;}
.stat-card small{font-size:10px;}
.directory-card,.mini-card,.form-section{border-color:#e8ebef;box-shadow:0 8px 28px rgba(24,35,52,.045);}
.directory-card{padding:20px;}
.section-header h3,.mini-card h4{font-size:19px;}
.section-header p{font-size:13px;}
.btn{border-radius:12px;padding:11px 15px;}
.btn.primary{background:var(--friendly-navy);box-shadow:none;}
.btn.primary:hover{background:#26364d;}
.btn.secondary{border-color:#dfe4e9;color:#374151;}
.filters-row{background:#f8fafc;border:1px solid #edf0f3;border-radius:16px;padding:10px;}
.search-field{background:#fff;}
.table-wrap{border-color:#e8ebef;}
th{background:#f6f7f9;color:#5f6875;}
.action-btn{min-height:38px;padding:8px 11px;}
.bottom-grid{gap:14px;}
.attention-list{display:grid;gap:9px;margin-top:15px;}
.attention-list button{width:100%;display:grid;grid-template-columns:36px 1fr auto;gap:11px;align-items:center;text-align:left;border:1px solid #edf0f3;background:#fafbfc;border-radius:14px;padding:11px;cursor:pointer;}
.attention-list button:hover{background:#fff;}
.attention-list .attention-icon{width:34px;height:34px;border-radius:11px;background:#fff1e8;color:#ae4b17;display:grid;place-items:center;font-weight:850;}
.attention-list strong,.attention-list small{display:block;}
.attention-list strong{font-size:13px;}
.attention-list small{font-size:10px;color:#7a828e;margin-top:3px;}
.attention-list i{font-style:normal;font-size:22px;color:#a4abb4;}

/* Cleaner modal experience */
.modal-backdrop,.friendly-help{background:rgba(24,35,52,.55);backdrop-filter:blur(5px);}
.modal-panel{border-radius:22px;border-color:#e5e7eb;box-shadow:0 28px 70px rgba(24,35,52,.25);}
.modal-header h3{font-size:25px;}
.form-section{border-radius:17px;}
.form-section h4{font-size:15px;}
.form-grid input,.form-grid select,.form-grid textarea{border-radius:11px;min-height:45px;}
.modal-actions{position:sticky;bottom:-24px;background:#fff;border-top:1px solid #edf0f3;padding:14px 0 2px;z-index:2;}

.friendly-help{position:fixed;inset:0;z-index:250;display:none;align-items:center;justify-content:center;padding:20px;}
.friendly-help.open{display:flex;}
.friendly-help-panel{position:relative;width:min(520px,100%);background:#fff;border-radius:22px;padding:25px;box-shadow:0 30px 80px rgba(24,35,52,.28);}
.friendly-help-panel>.close-btn{position:absolute;top:16px;right:16px;}
.friendly-help-panel h3{font-size:24px;margin:5px 0 18px;}
.help-steps{display:grid;gap:11px;margin-bottom:20px;}
.help-steps>div{display:grid;grid-template-columns:34px 1fr;gap:12px;align-items:start;padding:12px;background:#f8fafc;border-radius:14px;}
.help-steps b{width:32px;height:32px;border-radius:10px;background:#182334;color:#fff;display:grid;place-items:center;}
.help-steps strong,.help-steps small{display:block;}
.help-steps small{margin-top:4px;color:#707986;line-height:1.4;}

.mobile-bottom-nav{display:none;}

/* Mobile: large touch targets, no wide-table scrolling for everyday screens */
@media(max-width:1100px){
  .task-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:900px){
  .sidebar{width:min(88vw,310px);transform:translateX(-105%);transition:.22s;box-shadow:0 24px 70px rgba(24,35,52,.18);}
  .sidebar.open{transform:translateX(0);}
  .main{margin-left:0;width:100%;}
  .menu-btn{display:grid;place-items:center;flex:0 0 auto;}
  .topbar{padding:12px 14px;flex-wrap:nowrap;}
  .page-title{min-width:0;flex:1;}
  .page-title h2{font-size:19px;}
  .page-title span,.page-title p{display:none;}
  .top-search{order:5;flex-basis:100%;max-width:none;display:none;}
  .user-copy,.notification{display:none;}
  .logout-btn{font-size:12px;padding:8px 10px!important;}
  .content{padding:17px 13px 94px;}
  .friendly-home-hero{padding:3px 2px 16px;}
  .friendly-home-hero h3{font-size:26px;}
  .help-button{padding:9px 11px;}
  .quick-work-card{padding:15px;border-radius:18px;}
  .friendly-section-heading{display:block;}
  .friendly-section-heading p{margin-top:6px;}
  .task-action-grid{grid-template-columns:1fr;gap:9px;}
  .task-action{min-height:76px;padding:12px;grid-template-columns:40px 1fr auto;}
  .task-action .task-icon{width:40px;height:40px;}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
  .stat-card{padding:13px;display:block;}
  .stat-icon{width:36px;height:36px;margin-bottom:8px;}
  .stat-card strong{font-size:19px;}
  .stat-card small{display:none;}
  .bottom-grid{grid-template-columns:1fr;}
  .simple-page-intro{align-items:flex-start;padding:16px;}
  .simple-page-intro h3{font-size:21px;}
  .simple-page-intro p{font-size:12px;}
  .simple-page-intro .btn{white-space:nowrap;padding:10px 12px;font-size:12px;}
  .section-header{display:block;}
  .section-actions{margin-top:13px;}
  .filters-row{display:grid;grid-template-columns:1fr 1fr;}
  .filters-row .search-field{grid-column:1/-1;}
  .filters-row select{min-width:0;width:100%;}
  .mobile-bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:70;height:70px;background:rgba(255,255,255,.97);border-top:1px solid #e5e7eb;display:grid;grid-template-columns:repeat(5,1fr);padding:6px 8px max(6px,env(safe-area-inset-bottom));box-shadow:0 -8px 24px rgba(24,35,52,.08);}
  .mobile-nav-item{border:0;background:transparent;color:#7a828e;display:grid;place-items:center;align-content:center;gap:2px;border-radius:11px;cursor:pointer;}
  .mobile-nav-item span{font-size:20px;line-height:1;}
  .mobile-nav-item small{font-size:9px;font-weight:750;}
  .mobile-nav-item.active{color:#182334;background:#f3f5f7;}
  .mobile-nav-item.mobile-add span{width:39px;height:39px;margin-top:-21px;border-radius:14px;background:#182334;color:#fff;box-shadow:0 7px 16px rgba(24,35,52,.22);}
  .mobile-nav-item.mobile-add small{margin-top:-3px;}

  .form-grid.four,.form-grid.two,.photo-upload-row,.upload-grid{grid-template-columns:1fr!important;}
  .form-grid .wide{grid-column:auto!important;}
  .modal-backdrop{padding:10px;align-items:flex-end;}
  .modal-panel{max-width:100%;max-height:94vh;overflow:auto;border-radius:20px 20px 0 0;padding:17px;}
  .modal-header{margin-bottom:13px;padding-bottom:13px;}
  .modal-header h3{font-size:21px;}
  .modal-actions{bottom:-17px;display:grid!important;grid-template-columns:1fr 1fr;gap:8px;}
  .modal-actions .btn.primary{grid-column:1/-1;order:-1;}

  /* Student list becomes a stack of readable cards. */
  #studentsSection .table-wrap{overflow:visible;border:0;}
  #studentsSection table{min-width:0;display:block;}
  #studentsSection thead{display:none;}
  #studentsTable{display:grid;gap:11px;}
  #studentsTable tr{display:grid;grid-template-columns:56px 1fr;background:#fff;border:1px solid #e8ebef;border-radius:16px;padding:13px;box-shadow:0 5px 16px rgba(24,35,52,.035);}
  #studentsTable td{border:0;padding:3px 0;font-size:12px;display:flex;justify-content:space-between;gap:10px;align-items:center;}
  #studentsTable td:first-child{grid-row:1/5;grid-column:1;padding-right:10px;align-items:start;}
  #studentsTable td:nth-child(n+2){grid-column:2;}
  #studentsTable td:nth-child(2){font-weight:750;color:#6b7280;}
  #studentsTable td:nth-child(3){font-size:15px;font-weight:800;justify-content:flex-start;}
  #studentsTable td:nth-child(4)::before{content:'Class';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(5)::before{content:'Status';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(6)::before{content:'Guardian';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(7)::before{content:'Phone';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(8){justify-content:flex-start;margin-top:7px;padding-top:9px;border-top:1px solid #edf0f3;}
  #studentsTable td:nth-child(8)::before{content:'';}

  /* Other high-use tables become cards with inline labels. */
  #admissionsSection .table-wrap,#classesSection .table-wrap,#feesSection .table-wrap{overflow:visible;border:0;}
  #admissionsSection table,#classesSection table,#feesSection .fee-student-card table{min-width:0;display:block;}
  #admissionsSection thead,#classesSection thead,#feesSection .fee-student-card thead{display:none;}
  #admissionsTable,#attendanceTableBody,#feesTableBody{display:grid;gap:10px;}
  #admissionsTable tr,#attendanceTableBody tr,#feesTableBody tr{display:block;background:#fff;border:1px solid #e8ebef;border-radius:15px;padding:12px;}
  #admissionsTable td,#attendanceTableBody td,#feesTableBody td{display:flex;justify-content:space-between;gap:12px;border:0;padding:6px 2px;font-size:12px;text-align:right;}
  #admissionsTable td::before,#attendanceTableBody td::before,#feesTableBody td::before{font-weight:700;color:#7a828e;text-align:left;}
  #admissionsTable td:nth-child(1)::before{content:'Application';} #admissionsTable td:nth-child(2)::before{content:'Student';} #admissionsTable td:nth-child(3)::before{content:'Class';} #admissionsTable td:nth-child(4)::before{content:'Guardian';} #admissionsTable td:nth-child(5)::before{content:'Documents';} #admissionsTable td:nth-child(6)::before{content:'Status';} #admissionsTable td:nth-child(7)::before{content:'Actions';}
  #attendanceTableBody td:nth-child(1)::before{content:'Photo';} #attendanceTableBody td:nth-child(2)::before{content:'Admission';} #attendanceTableBody td:nth-child(3)::before{content:'Student';} #attendanceTableBody td:nth-child(4)::before{content:'Class';} #attendanceTableBody td:nth-child(5)::before{content:'Attendance';} #attendanceTableBody td:nth-child(6)::before{content:'Notes';}
  #feesTableBody td:nth-child(1)::before{content:'Student';} #feesTableBody td:nth-child(2)::before{content:'Class';} #feesTableBody td:nth-child(3)::before{content:'Term';} #feesTableBody td:nth-child(4)::before{content:'Fee';} #feesTableBody td:nth-child(5)::before{content:'Paid';} #feesTableBody td:nth-child(6)::before{content:'Balance';} #feesTableBody td:nth-child(7)::before{content:'Action';}
}

@media(max-width:520px){
  .stats-grid{grid-template-columns:1fr 1fr;}
  .friendly-home-hero .help-button{font-size:0;}
  .friendly-home-hero .help-button span{font-size:13px;}
  .simple-page-intro{display:block;}
  .simple-page-intro .btn{margin-top:13px;width:100%;}
  .filters-row{grid-template-columns:1fr;}
  .filters-row .search-field{grid-column:auto;}
}

/* Guided forms */
.wizard-progress{margin:-2px 0 17px;padding:13px 15px;background:#f8fafc;border:1px solid #e8ebef;border-radius:14px;}
.wizard-progress-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;}
.wizard-progress-copy span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#8a5b3b;}
.wizard-progress-copy strong{font-size:12px;color:#374151;}
.wizard-track{height:6px;border-radius:999px;background:#e6e9ed;overflow:hidden;}
.wizard-track i{display:block;height:100%;width:20%;border-radius:999px;background:#182334;transition:width .2s ease;}
.wizard-form>.form-section[hidden]{display:none!important;}
.wizard-form>.form-section.wizard-active{display:block!important;animation:wizardIn .18s ease;}
@keyframes wizardIn{from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:none}}
.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;position:sticky;bottom:-24px;z-index:5;background:#fff;border-top:1px solid #edf0f3;margin-top:5px;padding:15px 0 1px;}
.form-actions [hidden]{display:none!important;}

@media(max-width:900px){
  .wizard-progress{margin-bottom:12px;}
  .wizard-progress-copy{display:block;}
  .wizard-progress-copy strong{display:block;margin-top:4px;}
  .form-actions{bottom:-17px;display:grid;grid-template-columns:1fr 1fr;padding-bottom:2px;}
  .form-actions .wizard-next,.form-actions button[type="submit"]{grid-column:1/-1;order:-2;}
  .form-actions .wizard-back{order:-1;}
  .form-actions .btn{min-height:44px;padding:10px 8px;}

  #admissionsTable td:nth-child(1)::before{content:'Application';}
  #admissionsTable td:nth-child(2)::before{content:'Student';}
  #admissionsTable td:nth-child(3)::before{content:'Class';}
  #admissionsTable td:nth-child(4)::before{content:'Status';}
  #admissionsTable td:nth-child(5)::before{content:'Guardian';}
  #admissionsTable td:nth-child(6)::before{content:'Phone';}
  #admissionsTable td:nth-child(7)::before{content:'Actions';}

  #feesSection table.mobile-card-table{min-width:0;display:block;}
  #feesSection table.mobile-card-table thead{display:none;}
  #feesTableBody td:nth-child(1)::before{content:'Photo';}
  #feesTableBody td:nth-child(2)::before{content:'Admission';}
  #feesTableBody td:nth-child(3)::before{content:'Student';}
  #feesTableBody td:nth-child(4)::before{content:'Class';}
  #feesTableBody td:nth-child(5)::before{content:'Level';}
  #feesTableBody td:nth-child(6)::before{content:'Term Fee';}
  #feesTableBody td:nth-child(7)::before{content:'Paid';}
  #feesTableBody td:nth-child(8)::before{content:'Balance';}
  #feesTableBody td:nth-child(9)::before{content:'Notes';}
  #feesTableBody td:nth-child(10)::before{content:'Payment';}

  #studentsTable td:nth-child(8) .action-btn,
  #admissionsTable td:nth-child(7) .action-btn{font-size:11px;font-weight:750;padding:8px 10px;}
}

/* Compact student directory: fewer, clearer columns */
.student-cell{display:flex;align-items:center;gap:11px;min-width:190px;}
.student-cell>div:last-child{min-width:0;}
.student-cell strong,.student-cell small{display:block;}
.student-cell small{margin-top:3px;color:#6b7280;}
.student-actions{white-space:nowrap;min-width:176px;}
.student-actions .action-btn{margin:0 4px 4px 0;}
.danger-action{color:#9b1c1c;border-color:#f0d5d5;}
#studentsTable td:nth-child(2),#studentsTable td:nth-child(5){white-space:nowrap;}

@media(max-width:900px){
  #studentsTable tr{display:block;padding:13px;}
  #studentsTable td,
  #studentsTable td:first-child,
  #studentsTable td:nth-child(n+2){display:flex;grid-column:auto;grid-row:auto;padding:6px 1px;border:0;align-items:center;justify-content:space-between;gap:12px;}
  #studentsTable td:first-child{padding:2px 1px 11px;border-bottom:1px solid #edf0f3;margin-bottom:3px;justify-content:flex-start;}
  #studentsTable td:nth-child(2)::before{content:'Admission';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(3)::before{content:'Class';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(4)::before{content:'Status';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(5)::before{content:'Guardian';font-weight:650;color:#7a828e;}
  #studentsTable td:nth-child(6){justify-content:flex-start;margin-top:7px;padding-top:10px;border-top:1px solid #edf0f3;white-space:normal;}
  #studentsTable td:nth-child(6)::before{content:'';}
  #studentsTable td:nth-child(7),#studentsTable td:nth-child(8){display:none!important;}
  .student-cell{min-width:0;}
  .student-actions{min-width:0;}
}

/* V34 mobile/tablet sidebar fix
   Keep the content full-width below 1100px and open navigation as an overlay drawer.
   This also fixes Android browsers using a wider desktop-style viewport. */
.sidebar-backdrop{display:none;}
.sidebar-close-btn{display:none;}

@media (max-width:1100px){
  .sidebar{
    width:min(86vw,320px) !important;
    transform:translateX(-105%) !important;
    transition:transform .22s ease !important;
    box-shadow:0 24px 70px rgba(24,35,52,.22) !important;
    z-index:110 !important;
  }
  .sidebar.open{transform:translateX(0) !important;}
  .main{
    margin-left:0 !important;
    width:100% !important;
    max-width:100% !important;
  }
  .menu-btn{
    display:grid !important;
    place-items:center;
    flex:0 0 auto;
  }
  .sidebar-backdrop{
    display:block;
    position:fixed;
    inset:0;
    z-index:105;
    background:rgba(24,35,52,.46);
    backdrop-filter:blur(2px);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .2s ease,visibility .2s ease;
  }
  .sidebar.open + .sidebar-backdrop{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .sidebar-close-btn{
    display:grid;
    place-items:center;
    position:absolute;
    top:13px;
    right:11px;
    width:38px;
    height:38px;
    z-index:2;
    border:1px solid #e5e7eb;
    border-radius:12px;
    background:#fff;
    color:#374151;
    font-size:23px;
    line-height:1;
    cursor:pointer;
  }
  body.sidebar-open{overflow:hidden;}
}

@media (min-width:1101px){
  .sidebar{transform:none !important;}
  .sidebar-backdrop{display:none !important;}
  .sidebar-close-btn{display:none !important;}
}



/* V35: Student import entry inside Add Student */
.student-entry-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.student-import-option{margin:0 0 18px;padding:16px 18px;border:1px solid #fed7aa;border-radius:18px;background:linear-gradient(135deg,#fff7ed,#fffbeb);display:flex;align-items:center;justify-content:space-between;gap:18px;}
.student-import-option[hidden]{display:none!important;}
.student-import-copy{display:flex;align-items:center;gap:13px;min-width:0;}
.student-import-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:14px;background:#fff;border:1px solid #fed7aa;color:#c2410c;font-size:22px;font-weight:900;box-shadow:0 8px 18px rgba(194,65,12,.08);}
.student-import-copy strong{display:block;color:#7c2d12;font-size:15px;margin-bottom:3px;}
.student-import-copy p{margin:0;color:#7c5b4b;font-size:13px;line-height:1.45;}
.student-import-actions{display:flex;gap:9px;flex:0 0 auto;flex-wrap:wrap;justify-content:flex-end;}
.btn.danger{background:#b91c1c;color:#fff;border-color:#b91c1c;}
.btn.danger:hover{background:#991b1b;border-color:#991b1b;}
.task-clear-demo{border-color:#fecaca;background:#fffafa;}
.task-clear-demo .task-icon{background:#fee2e2;color:#991b1b;}
.task-clear-demo strong{color:#7f1d1d;}
.demo-maintenance-card{border-color:#fecaca;background:#fffafa;}
.maintenance-note{border:1px solid #fee2e2;background:#fff5f5;color:#7f1d1d;border-radius:14px;padding:13px 15px;font-size:13px;line-height:1.55;}
.import-history-card{margin-top:18px;}
.import-history-card .status-badge{white-space:nowrap;}
.import-history-card .action-btn[disabled]{opacity:.45;cursor:not-allowed;}
@media(max-width:720px){
  .student-entry-actions,.student-import-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;}
  .student-entry-actions .btn,.student-import-actions .btn{width:100%;justify-content:center;}
  .student-import-option{align-items:stretch;flex-direction:column;padding:14px;}
}
@media(max-width:430px){
  .student-entry-actions,.student-import-actions{grid-template-columns:1fr;}
}


/* V48 student fee account ledger */
.student-fee-link{border:0;background:transparent;padding:0;color:#c2410c;font-weight:850;text-align:left;cursor:pointer;text-decoration:underline;text-decoration-color:#fed7aa;text-underline-offset:3px}
.student-fee-link:hover{color:#9a3412}.fee-action-group{display:flex;gap:8px;flex-wrap:wrap}.table-btn.charge{border:1px solid #fdba74;border-radius:12px;background:#fff7ed;color:#c2410c;font-weight:800;padding:8px 12px;cursor:pointer}.table-btn.charge:hover{background:#ffedd5}.fee-account-panel{max-width:1120px}.fee-account-identity{display:grid;grid-template-columns:1.5fr repeat(3,1fr);gap:12px;background:#fff7ed;border:1px solid #fed7aa;border-radius:22px;padding:16px;margin-bottom:14px}.fee-account-identity>div{background:#fff;border:1px solid #ffedd5;border-radius:16px;padding:12px}.fee-account-identity span,.fee-account-identity small{display:block;color:#6b7280;font-size:12px;margin-bottom:4px}.fee-account-identity strong{display:block;color:#111827}.fee-account-actions{justify-content:flex-end;margin-bottom:14px}.account-total-row td{background:#111827;color:#fff;border-top-color:#111827}.account-total-row .paid-cell strong,.account-total-row .balance-cell strong{color:#fff}.fee-charge-summary{grid-template-columns:1fr}.fee-account-panel .form-section{margin-top:14px}.fee-account-panel table{min-width:680px}
@media(max-width:900px){.fee-account-identity{grid-template-columns:1fr 1fr}.fee-account-actions{justify-content:stretch}.fee-account-actions .btn{flex:1}}
@media(max-width:620px){.fee-account-identity{grid-template-columns:1fr}.fee-action-group{display:grid}.table-btn.charge,.table-btn.pay{width:100%}}

.modal-backdrop.show{display:flex}

/* V49: previous-year fee balances */
.fee-payment-period-grid{margin:0 0 16px;padding:14px 16px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc}
.fee-payment-period-grid label{margin:0}


/* V50 fee import reconciliation */
.fee-import-integrity-notice{
  margin:18px 0 0;
  padding:14px 16px;
  border:1px solid #b7e4c7;
  border-radius:14px;
  background:#f0fff4;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.fee-import-integrity-notice.has-issues{
  border-color:#f6c66d;
  background:#fff8e8;
}
.fee-import-integrity-notice div{display:flex;flex-direction:column;gap:4px;}
.fee-import-integrity-notice strong{font-size:14px;color:#243047;}
.fee-import-integrity-notice span{font-size:12px;color:#667085;line-height:1.45;}
.fee-import-integrity-notice .integrity-count{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#dff6e8;
  color:#176b3a;
  font-weight:800;
}
.fee-import-integrity-notice.has-issues .integrity-count{background:#ffedbc;color:#8a5400;}
.fee-import-reconcile{min-width:280px;display:flex;flex-direction:column;gap:9px;}
.fee-import-match-summary{display:flex;flex-direction:column;gap:3px;}
.fee-import-match-summary strong{font-size:13px;color:#25324a;}
.fee-import-match-summary small{font-size:11px;line-height:1.4;color:#667085;}
.fee-import-reconcile.unresolved .fee-import-match-summary strong{color:#9a5b00;}
.fee-import-match-select{width:100%;max-width:420px;padding:9px 10px;border:1px solid #d7dce4;border-radius:10px;background:#fff;font-size:12px;}
.btn.compact{padding:8px 10px;font-size:12px;width:max-content;}
.import-preview-card table th:nth-child(1){width:105px;}
.import-preview-card table th:nth-child(3){min-width:300px;}
@media (max-width:900px){
  .fee-import-integrity-notice{align-items:flex-start;flex-direction:column;}
  .fee-import-reconcile{min-width:235px;}
}
.fee-import-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}


/* V51: conflict centre, spelling correction and elegant visual refresh */
:root{
  --orange:#f47a1f;
  --orange-2:#d95d0b;
  --amber:#f59e0b;
  --ink:#172033;
  --muted:#697386;
  --line:#e7eaf0;
  --bg:#f4f6f9;
  --card:#ffffff;
  --shadow:0 16px 40px rgba(18,32,55,.07);
}
body{background:linear-gradient(135deg,#f7f8fa 0%,#f3f5f8 46%,#f8f5f1 100%);letter-spacing:-.005em;}
.sidebar{background:linear-gradient(180deg,#111827 0%,#172033 58%,#202b3d 100%);border-right:0;box-shadow:18px 0 45px rgba(15,23,42,.08);}
.brand h1{color:#ff8a2a}.brand p{color:#f8fafc}.brand small{color:#fbbf8a}.brand-mark{border-radius:15px;box-shadow:0 12px 28px rgba(244,122,31,.28)}
.nav-item{color:#cbd5e1;border:1px solid transparent;border-radius:12px;font-weight:720;}
.nav-item:hover{background:rgba(255,255,255,.07);color:#fff;border-color:rgba(255,255,255,.06)}
.nav-item.active{background:linear-gradient(135deg,#f47a1f,#ef8d22);box-shadow:0 12px 28px rgba(244,122,31,.27)}
.sidebar-footer{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.1);color:#f8fafc}.sidebar-footer span{color:#aeb8c8}
.topbar{background:rgba(255,255,255,.88);border-bottom:1px solid #e8ebf0;box-shadow:0 8px 30px rgba(17,24,39,.035)}
.content{padding-top:30px}.page-title h2{letter-spacing:-.03em}.page-title span{color:#d95d0b}
.directory-card,.mini-card,.form-section,.stat-card{border-color:#e8ebf0;border-radius:18px;box-shadow:var(--shadow)}
.stat-card{padding:20px}.stat-card.featured{border-left:0;box-shadow:inset 0 3px 0 #f47a1f,var(--shadow)}.stat-icon{border-radius:15px}
.btn{border-radius:11px;padding:11px 16px;box-shadow:none}.btn.primary{background:linear-gradient(135deg,#f47a1f,#ef8d22);box-shadow:0 9px 20px rgba(244,122,31,.20)}
.btn.secondary{border-color:#e7b88f;background:#fff;color:#c95308}.btn.secondary:hover{background:#fff8f1}.btn.ghost{background:#f8fafc;border:1px solid #e5e9ef;color:#344054}
.table-wrap{border-color:#e8ebf0;border-radius:14px;background:#fff}th{background:#f7f8fa;color:#556071;border-bottom:1px solid #e8ebf0;position:sticky;top:0;z-index:1}td{border-top-color:#eef0f3}tbody tr{transition:background .15s ease}tbody tr:hover{background:#fbfcfd}
.import-hero{background:linear-gradient(125deg,#172033 0%,#24324a 66%,#394860 100%);border:0;box-shadow:0 20px 48px rgba(23,32,51,.16)}
.import-hero h3,.import-hero p{color:#fff}.import-hero .eyebrow{color:#ffb477}.import-hero .btn.secondary{background:rgba(255,255,255,.1);color:#fff;border-color:rgba(255,255,255,.22)}
.import-card,.import-preview-card{overflow:hidden}.import-grid{background:#f8fafc;border:1px solid #e8ebf0;border-radius:14px;padding:16px}
.import-help{border-radius:12px;background:#fff8f1;border:1px solid #f6dfcc}
.import-preview-actions{align-items:center}.btn-count{display:inline-grid;place-items:center;min-width:23px;height:23px;padding:0 7px;margin-left:7px;border-radius:999px;background:#eef1f5;color:#344054;font-size:11px;font-weight:900}
.conflict-filter-btn:not(:disabled) .btn-count{background:#fff0d1;color:#925d00}.correction-filter-btn:not(:disabled) .btn-count{background:#dcfce7;color:#166534}.btn:disabled{opacity:.48;cursor:not-allowed}.btn.active-filter{background:#172033!important;border-color:#172033!important;color:#fff!important}.btn.active-filter .btn-count{background:rgba(255,255,255,.16);color:#fff}
.fee-import-integrity-notice{border-radius:14px;border-color:#bde5cb;background:linear-gradient(135deg,#f3fff7,#f9fffb);padding:16px 18px;box-shadow:0 8px 24px rgba(22,101,52,.05)}
.fee-import-integrity-notice.has-issues{border-color:#f1c36e;background:linear-gradient(135deg,#fff9ea,#fffdf7)}.fee-import-integrity-notice .integrity-copy{flex:1}.fee-import-integrity-notice .integrity-actions{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.fee-import-integrity-notice .integrity-count{padding:8px 11px}
.import-row-conflict{background:#fffaf0}.import-row-conflict:hover{background:#fff6df}.import-row-corrected{background:#f7fff9}.import-row-corrected:hover{background:#effcf3}
.status-badge.Corrected{background:#dcfce7;color:#166534}.correction-badge{display:inline-flex;align-items:center;width:max-content;margin-top:5px;padding:5px 8px;border-radius:999px;background:#dcfce7;color:#166534;font-size:10px;font-weight:850}.correction-copy{color:#217244!important}.fee-import-reconcile{padding:11px;border:1px solid #e8ebf0;border-radius:12px;background:#fff}.fee-import-reconcile.unresolved{border-color:#f1c36e;background:#fffdf7}.fee-import-match-select{border-radius:9px;border-color:#dfe3e9}.import-json{max-height:230px;background:#f8fafc;border:1px solid #edf0f3;border-radius:10px;padding:12px;color:#344054}
@media(max-width:900px){.fee-import-integrity-notice .integrity-actions{justify-content:flex-start;width:100%}.import-preview-actions{width:100%}.import-preview-actions .btn{flex:1;min-width:145px}.sidebar{box-shadow:18px 0 55px rgba(15,23,42,.28)!important}}
@media(max-width:560px){.import-preview-actions{display:grid;grid-template-columns:1fr}.import-preview-actions .btn{width:100%}.fee-import-integrity-notice .integrity-actions{display:grid;grid-template-columns:1fr;width:100%}.fee-import-integrity-notice .integrity-actions .btn{width:100%}.fee-import-integrity-notice .integrity-count{width:max-content}}


/* V53: controlled conflict override, editable correction register, VEC visual identity */
:root{
  --vec-orange:#f57c00;
  --vec-orange-deep:#c65300;
  --vec-orange-soft:#fff1df;
  --vec-gold:#ffae35;
  --vec-charcoal:#252a32;
  --vec-cream:#fffaf4;
  --vec-line:#f0ded0;
}
body{background:linear-gradient(145deg,#fffaf4 0%,#fff 42%,#f8f6f2 100%);color:var(--vec-charcoal)}
.sidebar{background:rgba(255,255,255,.97)!important;border-right:1px solid #f2dfcf!important;box-shadow:12px 0 34px rgba(80,45,20,.055)!important}
.brand h1{color:var(--vec-orange)!important}.brand p{color:#242932!important}.brand small{color:var(--vec-orange-deep)!important}.brand-mark{background:linear-gradient(145deg,var(--vec-orange),var(--vec-gold))!important}
.nav-group-label{color:#9a6b48!important}.nav-item{color:#374151!important;border-color:transparent!important}.nav-item:hover{background:#fff5e9!important;color:var(--vec-orange-deep)!important;border-color:#f7dfca!important}.nav-item.active{background:linear-gradient(135deg,var(--vec-orange),#ff951f)!important;color:#fff!important;box-shadow:0 11px 24px rgba(245,124,0,.24)!important}.nav-more summary{color:#374151!important}.nav-more[open] summary,.nav-more summary:hover{background:#fff5e9!important;color:var(--vec-orange-deep)!important}.sidebar-footer{background:#fff7ed!important;border-color:#f5dfca!important;color:#5f4634!important}.sidebar-footer span{color:#8b6e58!important}
.topbar{border-bottom-color:#f2e3d7!important}.page-title span,.eyebrow{color:var(--vec-orange-deep)!important}.avatar{background:linear-gradient(135deg,var(--vec-orange-deep),var(--vec-orange))!important}.notification{color:var(--vec-orange-deep)}
.directory-card,.mini-card,.form-section,.stat-card{border-color:#efe3da!important;box-shadow:0 16px 38px rgba(83,50,24,.06)!important}.stat-card.featured{box-shadow:inset 0 3px 0 var(--vec-orange),0 16px 38px rgba(83,50,24,.06)!important}.stat-icon{background:#fff0df!important;color:var(--vec-orange-deep)!important}
.btn.primary{background:linear-gradient(135deg,var(--vec-orange),#ff961f)!important;box-shadow:0 9px 20px rgba(245,124,0,.19)!important}.btn.secondary{border-color:#edc7a8!important;color:var(--vec-orange-deep)!important}.btn.secondary:hover{background:#fff5e9!important}.btn.active-filter{background:var(--vec-orange-deep)!important;border-color:var(--vec-orange-deep)!important}.override-import-btn:not(:disabled){background:#fff8ef!important;border-color:#e7a96e!important;color:#9a4400!important}
.import-hero{background:linear-gradient(125deg,#b94b00 0%,#ed7100 58%,#ff9b24 100%)!important;box-shadow:0 20px 48px rgba(171,72,0,.2)!important}.import-hero .eyebrow{color:#fff1d8!important}.import-hero .btn.secondary{background:rgba(255,255,255,.13)!important;color:#fff!important;border-color:rgba(255,255,255,.34)!important}.import-hero .override-import-btn:not(:disabled){background:#fff!important;color:#a74700!important;border-color:#fff!important}
th{background:#fff7ee!important;color:#8f4a18!important}
.icon-svg,.nav-icon svg,[data-icon] svg{width:20px;height:20px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-icon{display:grid!important;place-items:center;width:22px!important;height:22px;flex:0 0 22px}.task-icon[data-icon]{display:grid;place-items:center}.task-icon[data-icon] svg{width:24px;height:24px}.field-icon,.notification-icon{display:grid;place-items:center;color:#9a6b48}.field-icon svg,.notification-icon svg{width:19px;height:19px}.icon-label{display:inline-flex;align-items:center;justify-content:center;gap:8px}.icon-label>[data-icon]{display:grid;place-items:center}.icon-label svg{width:17px;height:17px}
.import-governance-card{margin-top:18px;scroll-margin-top:100px}.import-governance-card .section-actions input,.import-governance-card .section-actions select{height:43px;border:1px solid #e8d8cb;border-radius:11px;background:#fff;padding:0 12px;min-width:210px;outline:0}.governance-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px}.governance-summary>div{padding:14px 16px;border:1px solid #f0dfd1;border-radius:14px;background:linear-gradient(145deg,#fffaf4,#fff)}.governance-summary strong{display:block;font-size:23px;color:#a74800}.governance-summary span{display:block;margin-top:3px;color:#766354;font-size:12px}.governance-table td{vertical-align:top}.table-subline{display:block;margin-top:5px;color:#7c8794;line-height:1.45}.conflict-reason{display:block;max-width:460px;color:#7d4c16;line-height:1.45}.correction-kind{display:inline-flex;border-radius:999px;background:#edf9f0;color:#24713a;padding:5px 8px;font-size:11px;font-weight:800}.primary-action{border-color:#efb37d!important;background:#fff5e9!important;color:#a64700!important;font-weight:800}
.governance-modal .compact-governance-panel{width:min(700px,100%)}.compact-governance-panel>label{display:block;margin:14px 0;font-size:13px;font-weight:800;color:#453d37}.compact-governance-panel input,.compact-governance-panel select,.compact-governance-panel textarea{display:block;width:100%;margin-top:7px;border:1px solid #e5d7cb;border-radius:12px;background:#fff;padding:12px 13px;outline:0}.compact-governance-panel textarea{min-height:90px;resize:vertical}.compact-governance-panel input:focus,.compact-governance-panel select:focus,.compact-governance-panel textarea:focus{border-color:#ef9b55;box-shadow:0 0 0 4px #fff0df}.override-warning{display:flex;gap:13px;padding:15px;border:1px solid #f1c38e;border-radius:15px;background:#fff8ec}.override-warning .warning-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:13px;background:#ffead2;color:#a94700}.override-warning strong{display:block}.override-warning p{margin:5px 0 0;color:#765d49;line-height:1.5}.typed-confirmation{padding:14px;border-radius:14px;background:#fafafa;border:1px solid #eee}.typed-confirmation strong{color:#a94700}.review-source-card{padding:15px;border:1px solid #efdfd3;border-radius:14px;background:#fffaf4}.review-source-card strong,.review-source-card span{display:block}.review-source-card span{margin-top:4px;color:#735f50;font-size:12px}.review-source-card p{margin:9px 0 0;color:#7d4c16;line-height:1.5}.status-badge.Pending{background:#fff0d8!important;color:#8e5100!important}
@media(max-width:900px){.governance-summary{grid-template-columns:1fr}.import-governance-card .section-actions{width:100%}.import-governance-card .section-actions input,.import-governance-card .section-actions select{width:100%}.governance-table{min-width:820px}}

.stat-icon[data-icon] svg{width:25px;height:25px}

/* V53 icon refinements */
.menu-btn,[data-icon],.notice-icon[data-icon],.mobile-nav-item [data-icon]{display:grid;place-items:center}
.menu-btn svg{width:23px;height:23px}.notice-icon[data-icon] svg{width:22px;height:22px}
.mobile-nav-item [data-icon] svg{width:21px;height:21px}.icon-btn [data-icon] svg,.close-btn [data-icon] svg{width:18px;height:18px}
.action-btn [data-icon]{display:grid;place-items:center}.action-btn [data-icon] svg{width:16px;height:16px}
.search-field>[data-icon]{color:#9a6b48;flex:0 0 20px}.search-field>[data-icon] svg{width:18px;height:18px}
.student-import-icon[data-icon]{display:grid!important;place-items:center}.student-import-icon[data-icon] svg{width:24px;height:24px}


/* V56: elegant, quieter interface and structured export menus */
:root{--vec-ink:#27303d;--vec-muted:#6f7885;--vec-surface:#ffffff;--vec-soft:#fff8f0;--vec-border:#eee2d8;--vec-shadow:0 10px 30px rgba(71,49,30,.055)}
.content{padding:24px 28px 42px!important}.page-section{max-width:1540px;margin:0 auto}.simple-page-intro,.admissions-hero{background:var(--vec-surface)!important;color:var(--vec-ink)!important;border:1px solid var(--vec-border)!important;border-left:4px solid var(--vec-orange)!important;border-radius:18px!important;box-shadow:var(--vec-shadow)!important;padding:22px 24px!important;min-height:0!important}.simple-page-intro h3,.admissions-hero h3{color:var(--vec-ink)!important;font-size:25px!important;letter-spacing:-.025em}.simple-page-intro p,.admissions-hero p{color:var(--vec-muted)!important;max-width:800px!important;line-height:1.55!important}.simple-page-intro .eyebrow,.admissions-hero .eyebrow{color:var(--vec-orange-deep)!important}.import-hero{background:linear-gradient(120deg,#fff 0%,#fffaf4 100%)!important}.import-hero .btn.secondary{background:#fff!important;color:var(--vec-orange-deep)!important;border-color:#edc7a8!important}.import-hero .override-import-btn:not(:disabled){background:#fff8ef!important;color:#9a4400!important;border-color:#e7a96e!important}
.stats-grid{gap:12px!important;margin:14px 0!important}.stat-card{min-height:98px!important;padding:15px 16px!important;border-radius:16px!important;box-shadow:0 7px 22px rgba(71,49,30,.045)!important}.stat-card .stat-icon{width:40px!important;height:40px!important;border-radius:12px!important}.stat-card strong{font-size:23px!important}.stat-card small{font-size:11px!important}.directory-card,.report-filters-card,.mini-card,.form-section{border-radius:18px!important;box-shadow:var(--vec-shadow)!important}.directory-card{padding:20px!important}.section-header{margin-bottom:15px!important}.section-header h3{font-size:18px!important}.section-header p{font-size:12px!important;color:var(--vec-muted)!important}.section-actions{gap:8px!important}.btn{min-height:40px!important;border-radius:11px!important;padding:9px 14px!important}.filters-row{gap:9px!important}.filters-row input,.filters-row select,.report-filters-row input,.report-filters-row select{min-height:42px!important;border-radius:11px!important;border-color:#e7ddd4!important;background:#fff!important}table th{font-size:10px!important;letter-spacing:.04em!important}table td{padding-top:12px!important;padding-bottom:12px!important}.table-wrap{border-radius:13px!important;border:1px solid #eee6df!important}.bottom-grid.admissions-bottom{display:none!important}.fee-structure-card{margin-top:15px!important}.fee-calculator-card{box-shadow:none!important;border:1px solid var(--vec-border)!important}.topbar{background:rgba(255,255,255,.94)!important;backdrop-filter:blur(16px)}
.export-menu{position:relative;display:inline-flex}.export-trigger{white-space:nowrap}.export-trigger .export-chevron{transition:transform .18s ease}.export-menu.open .export-chevron{transform:rotate(180deg)}.export-chevron svg{width:15px!important;height:15px!important}.export-popover{position:absolute;z-index:180;right:0;top:calc(100% + 8px);width:245px;padding:7px;background:#fff;border:1px solid var(--vec-border);border-radius:15px;box-shadow:0 20px 55px rgba(45,35,27,.16);opacity:0;visibility:hidden;transform:translateY(-5px);transition:.16s ease}.export-menu.open .export-popover{opacity:1;visibility:visible;transform:translateY(0)}.export-popover button{width:100%;border:0;background:transparent;display:grid;grid-template-columns:34px 1fr;align-items:center;gap:9px;text-align:left;padding:9px;border-radius:10px;color:var(--vec-ink);cursor:pointer}.export-popover button:hover{background:var(--vec-soft)}.export-popover button>span:first-child{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;background:#fff0df;color:var(--vec-orange-deep)}.export-popover svg{width:18px!important;height:18px!important}.export-popover strong,.export-popover small{display:block}.export-popover strong{font-size:12px}.export-popover small{font-size:10px;color:var(--vec-muted);margin-top:2px}.student-entry-actions{display:none!important}
@media(max-width:900px){.content{padding:16px 13px 90px!important}.simple-page-intro,.admissions-hero{padding:18px!important}.section-actions{width:100%;flex-wrap:wrap}.export-menu{flex:1}.export-trigger{width:100%}.export-popover{left:0;right:auto;width:min(280px,calc(100vw - 42px))}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.directory-card{padding:15px!important}}
@media(max-width:540px){.stats-grid{grid-template-columns:1fr!important}.stat-card{min-height:82px!important}.simple-page-intro h3,.admissions-hero h3{font-size:22px!important}.section-actions>.btn,.section-actions>.export-menu{flex:1 1 100%}}

/* V58: explicit import diagnostics and original UID continuity */
.import-error-summary{margin-top:14px;padding:18px;border:1px solid #efc9aa;border-radius:16px;background:linear-gradient(135deg,#fffaf5,#fff);box-shadow:0 10px 28px rgba(123,66,22,.06)}
.import-error-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.import-error-summary-head h4{margin:3px 0 5px;font-size:18px;color:#6f3307}.import-error-summary-head p{margin:0;color:var(--vec-muted);font-size:12px;line-height:1.5}
.import-error-types{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.import-error-types article{position:relative;padding:13px 14px;border:1px solid #f0ded0;border-left:4px solid #d7620d;border-radius:12px;background:#fff}.import-error-types article.warning-summary{border-left-color:#d69821;background:#fffdf6}.import-error-types article strong{display:block;padding-right:48px;font-size:12px;color:#3e352f}.import-error-types article>span{position:absolute;right:12px;top:11px;min-width:29px;height:24px;display:grid;place-items:center;padding:0 8px;border-radius:999px;background:#fff0df;color:#9d4606;font-size:11px;font-weight:850}.import-error-types article p{margin:7px 0 0;color:#725e50;font-size:11px;line-height:1.45}.import-error-types article code{display:inline-block;margin-top:8px;padding:3px 6px;border-radius:6px;background:#f7f3ef;color:#80512f;font-size:9px}
.import-record-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:310px}.import-record-summary>div{padding:9px 10px;border:1px solid #eee5de;border-radius:10px;background:#fff}.import-record-summary span{display:block;margin-bottom:3px;color:#8a7564;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.045em}.import-record-summary strong{display:block;color:#30343b;font-size:12px;line-height:1.35;overflow-wrap:anywhere}.fee-source-summary{margin-bottom:9px}.fee-period-preview{width:100%;min-width:0;border:1px solid #eee5de;border-radius:10px;overflow:hidden}.fee-period-preview th,.fee-period-preview td{position:static!important;padding:7px 9px!important;font-size:10px!important}.fee-period-preview th{background:#fff8f0!important}
.import-problem-list{display:grid;gap:8px;margin-bottom:10px}.import-problem{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:11px;border-radius:12px;border:1px solid #efded1;background:#fff}.import-problem.error{border-color:#f0c5ac;background:#fffaf7}.import-problem.warning{border-color:#efdcae;background:#fffdf7}.problem-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#ffe9dc;color:#b64e06}.import-problem.warning .problem-icon{background:#fff1c7;color:#956700}.problem-icon svg{width:18px!important;height:18px!important}.import-problem strong{display:block;color:#4b3020;font-size:12px}.import-problem p{margin:4px 0 0;color:#6d594b;font-size:11px;line-height:1.5}.import-problem ul{margin:7px 0 0;padding-left:17px}.import-problem li{margin:3px 0;color:#775e4e;font-size:10px;line-height:1.4}.import-problem code{display:inline-block;margin-top:7px;padding:3px 6px;border-radius:6px;background:#fff;color:#a24a0a;border:1px solid #f2d8c7;font-size:9px}
.import-validation-ok{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:center;padding:10px 11px;margin-bottom:10px;border:1px solid #cfe9d6;border-radius:12px;background:#f8fff9}.import-validation-ok>[data-icon]{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#e5f7e9;color:#24733b}.import-validation-ok svg{width:18px!important;height:18px!important}.import-validation-ok strong,.import-validation-ok small{display:block}.import-validation-ok strong{font-size:12px;color:#285c35}.import-validation-ok small{margin-top:2px;color:#637469;font-size:10px}
.status-badge.Review{background:#fff3d2!important;color:#8a5a00!important}.origin-note{display:inline-flex;margin-top:6px;padding:4px 7px;border-radius:999px;background:#fff0df;color:#9a4400;font-size:9px;font-weight:800;line-height:1}.import-row-conflict>td:first-child{box-shadow:inset 4px 0 0 #d7620d}.import-preview-card td{vertical-align:top}
@media(max-width:900px){.import-error-summary-head{display:grid}.import-record-summary{grid-template-columns:1fr;min-width:230px}.import-error-types{grid-template-columns:1fr}}


/* V59: viewport-safe export menu */
.export-popover.export-popover-portal{
  position:fixed!important;
  right:auto!important;
  bottom:auto!important;
  z-index:10050!important;
  display:block!important;
  opacity:0!important;
  visibility:hidden!important;
  transform:translateY(-4px) scale(.985)!important;
  pointer-events:none!important;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.export-popover.export-popover-portal.is-open{
  opacity:1!important;
  visibility:visible!important;
  transform:translateY(0) scale(1)!important;
  pointer-events:auto!important;
}
.export-popover.export-popover-portal[data-placement="top"]{
  transform-origin:bottom right;
}
.export-popover.export-popover-portal[data-placement="bottom"]{
  transform-origin:top right;
}
.export-popover.export-popover-portal button{
  min-height:50px;
}
.export-popover.export-popover-portal button:focus-visible{
  outline:3px solid rgba(232,106,18,.22);
  outline-offset:1px;
  background:var(--vec-soft);
}
@media(max-width:520px){
  .export-popover.export-popover-portal{border-radius:14px!important;}
  .export-popover.export-popover-portal button{min-height:52px;}
}

.field-help{display:block;margin-top:.4rem;color:var(--muted,#6b7280);font-size:.78rem;line-height:1.35}
input[readonly]#admissionNo{background:#f8f5ef;border-style:dashed;font-weight:700;letter-spacing:.02em;color:#2c2a27;cursor:not-allowed}

/* V60 PWA install experience */
.pwa-install-btn{
  position:fixed;
  right:max(18px,env(safe-area-inset-right));
  bottom:max(18px,env(safe-area-inset-bottom));
  z-index:5000;
  display:inline-flex;
  align-items:center;
  gap:9px;
  border:1px solid rgba(255,255,255,.38);
  border-radius:16px;
  padding:12px 16px;
  background:#f47a20;
  color:#fff;
  box-shadow:0 16px 38px rgba(111,53,12,.26);
  font:inherit;
  font-weight:850;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
}
.pwa-install-btn[hidden]{display:none!important}
.pwa-install-btn:hover{transform:translateY(-2px);background:#df6612;box-shadow:0 20px 42px rgba(111,53,12,.31)}
.pwa-install-btn:focus-visible{outline:3px solid #fff;outline-offset:3px}
.pwa-install-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pwa-status{
  position:fixed;
  left:50%;
  bottom:max(20px,env(safe-area-inset-bottom));
  z-index:5100;
  width:min(620px,calc(100vw - 32px));
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid #f3d5ba;
  border-radius:18px;
  background:rgba(255,255,255,.97);
  color:#242424;
  box-shadow:0 22px 55px rgba(64,40,22,.2);
  opacity:0;
  visibility:hidden;
  transform:translate(-50%,18px);
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease;
  backdrop-filter:blur(16px);
}
.pwa-status.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.pwa-status-icon{width:38px;height:38px;border-radius:12px;background:#f47a20;color:#fff;display:grid;place-items:center;font-size:11px;font-weight:950;letter-spacing:.04em}
.pwa-status-copy{min-width:0;font-size:13px;font-weight:750;line-height:1.45}
.pwa-status-action{border:0;border-radius:11px;padding:9px 12px;background:#f47a20;color:#fff;font:inherit;font-size:12px;font-weight:850;cursor:pointer;white-space:nowrap}
.pwa-status-close{width:32px;height:32px;border:0;border-radius:10px;background:#fff6e8;color:#6f4a2f;font-size:21px;line-height:1;cursor:pointer}
@media (display-mode:standalone){
  .pwa-install-btn{display:none!important}
  body{padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
}
@media(max-width:640px){
  .pwa-install-btn{right:14px;bottom:max(14px,env(safe-area-inset-bottom));padding:11px 13px;border-radius:14px}
  .pwa-install-btn span{font-size:13px}
  .pwa-status{grid-template-columns:auto minmax(0,1fr) auto;gap:9px;padding:10px}
  .pwa-status-action{grid-column:2/3;justify-self:start}
  .pwa-status-close{grid-column:3/4;grid-row:1/2}
}
@media print{.pwa-install-btn,.pwa-status{display:none!important}}


/* V61 role hierarchy, quieter controls, and bulk fee assignment */
.permission-hidden{display:none!important}
.compact-select-label{display:grid;gap:6px;font-size:12px;font-weight:800;color:var(--muted)}
.compact-select-label select{height:42px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:0 12px;color:var(--ink)}
.bulk-fee-card{margin:0 0 18px;background:linear-gradient(145deg,#fff,#fffaf5);border-color:#fed7aa}
.bulk-fee-controls{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(150px,1fr));gap:12px;margin-bottom:14px}
.bulk-fee-controls label{display:grid;gap:7px;font-size:12px;font-weight:850;color:#475569}
.bulk-fee-controls select,.bulk-fee-controls input{height:46px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:0 13px;color:var(--ink)}
.bulk-fee-preview{border:1px solid #ffedd5;background:#fff;border-radius:16px;padding:15px;min-height:72px}
.bulk-fee-preview p{margin:0;color:var(--muted)}
.bulk-fee-summary{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid #f3f4f6}
.bulk-fee-summary strong{font-size:16px}.bulk-fee-summary span{color:var(--muted);font-size:13px}.bulk-fee-summary span:last-child{margin-left:auto;color:#9a3412;font-weight:800}
.bulk-fee-class-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:9px;margin-top:12px}
.bulk-fee-class-grid>div{border:1px solid #f1f5f9;background:#f8fafc;border-radius:12px;padding:11px;display:grid;gap:3px}
.bulk-fee-class-grid span,.bulk-fee-class-grid small{font-size:12px;color:var(--muted)}
.audit-log-card{margin-top:18px}.audit-log-card table{min-width:760px}
.action-btn [data-icon],.action-btn>span[data-icon]{display:grid;place-items:center;min-width:17px;min-height:17px}.action-btn svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:980px){.bulk-fee-controls{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.bulk-fee-controls{grid-template-columns:1fr}.bulk-fee-summary span:last-child{margin-left:0;width:100%}}

/* Revised V60 role safety and fee-structure clarity */
body:not(.is-super-user) #userModal{display:none!important}
.structure-row-meta{display:block;margin-top:3px;color:var(--muted,#6b7280);font-size:.75rem;font-weight:600;line-height:1.25}


/* Revised V60: genuine role separation, system-user console and persistent audit log */
.role-difference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.role-difference-grid article{border:1px solid #eadfce;background:#fffdf9;border-radius:16px;padding:16px;display:grid;grid-template-columns:auto 1fr;column-gap:10px;align-items:center;transition:.18s ease}
.role-difference-grid article>span{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#fff3df;color:#bd5a13}
.role-difference-grid article strong{font-size:15px;color:#24211e}.role-difference-grid article p{grid-column:1/-1;margin:10px 0 0;color:var(--muted);font-size:13px;line-height:1.5}
.role-difference-grid article.current-role{border-color:#e77922;background:#fff8ed;box-shadow:0 0 0 3px rgba(231,121,34,.1)}
#systemUsersSection .user-management-card,#auditLogsSection .audit-log-card{margin-top:0}
#systemUsersSection .simple-page-intro,#auditLogsSection .simple-page-intro{margin-bottom:16px}
body:not(.is-super-user) #systemUsersSection,body:not(.is-super-user) #userModal{display:none!important}
body:not(.is-system-admin-user) #auditLogsSection{display:none!important}
[data-super-user-only].permission-hidden,[data-system-admin-only].permission-hidden{display:none!important}
.audit-log-card tbody td{vertical-align:top}.audit-log-card tbody td:nth-child(4){text-transform:capitalize}
@media(max-width:900px){.role-difference-grid{grid-template-columns:1fr}}


/* Revised V60: self-service user profiles */
.account-nav{margin-top:auto;padding-top:12px;border-top:1px solid rgba(255,255,255,.12)}
.profile-shortcut{width:38px;height:38px;display:grid;place-items:center;border:1px solid var(--line);border-radius:12px;background:#fff;color:#9a4b13;cursor:pointer;transition:.18s ease}
.profile-shortcut:hover{border-color:#f47a20;background:#fff8ef;transform:translateY(-1px)}
.profile-shortcut svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.profile-page-intro{margin-bottom:16px}
.profile-self-service-shell{display:grid;grid-template-columns:minmax(250px,320px) minmax(0,1fr);gap:18px;align-items:start}
.profile-summary-card{position:sticky;top:18px;border:1px solid #eadfce;background:linear-gradient(160deg,#fff,#fff8ed);border-radius:22px;padding:22px;box-shadow:0 16px 38px rgba(75,48,25,.08)}
.profile-photo-wrap{display:grid;justify-items:center;gap:11px;padding-bottom:20px;border-bottom:1px solid #f0e5d8}
.profile-photo-preview{width:124px;height:124px;border-radius:34px;background:linear-gradient(145deg,#f47a20,#bd5a13);color:#fff;display:grid;place-items:center;font-size:34px;font-weight:950;letter-spacing:.02em;box-shadow:0 14px 30px rgba(190,90,18,.23);overflow:hidden}
.profile-photo-preview img{width:100%;height:100%;object-fit:cover}
.profile-photo-button{position:relative;overflow:hidden}
.profile-remove-photo{border:0;background:transparent;color:#8a4a1d;font:inherit;font-size:12px;font-weight:800;cursor:pointer;padding:3px 7px}
.profile-remove-photo:hover{text-decoration:underline}
.profile-summary-copy{text-align:center;padding-top:18px}.profile-summary-copy h3{margin:0 0 9px;font-size:21px}.profile-summary-copy .role-pill{display:inline-flex;margin-bottom:17px}
.profile-summary-copy dl{margin:0;display:grid;gap:0;text-align:left;border-top:1px solid #f0e5d8}
.profile-summary-copy dl div{display:grid;grid-template-columns:110px minmax(0,1fr);gap:10px;padding:11px 0;border-bottom:1px solid #f0e5d8}
.profile-summary-copy dt{font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);font-weight:850}.profile-summary-copy dd{margin:0;text-align:right;font-size:13px;font-weight:750;overflow-wrap:anywhere}
.profile-editor-stack{display:grid;gap:16px}.profile-editor-card,.password-card{margin:0}
.profile-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.profile-form-grid label,.profile-password-grid label{display:grid;gap:7px;font-size:12px;font-weight:850;color:#475569}.profile-form-grid .wide{grid-column:1/-1}
.profile-form-grid input,.profile-password-grid input{height:46px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:0 13px;color:var(--ink);font:inherit}.profile-form-grid input:focus,.profile-password-grid input:focus{outline:3px solid rgba(244,122,32,.12);border-color:#f47a20}.profile-form-grid input[readonly]{background:#f8f5f1;color:#706a64;cursor:not-allowed}
.profile-password-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:end}.password-guidance{margin:12px 0 0;color:var(--muted);font-size:12px}.password-security-icon{width:42px;height:42px;border-radius:13px;background:#fff2df;color:#b85a16;display:grid;place-items:center}.password-security-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.profile-feedback{display:none;margin-top:14px;border-radius:12px;padding:11px 13px;font-size:13px;font-weight:750}.profile-feedback:not(:empty){display:block}.profile-feedback.success{background:#ecfdf3;color:#166534;border:1px solid #bbf7d0}.profile-feedback.error{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}.profile-feedback.info{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.teacher-profile-extra[hidden]{display:none!important}
@media(max-width:980px){.profile-self-service-shell{grid-template-columns:1fr}.profile-summary-card{position:static}.profile-summary-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:20px}.profile-photo-wrap{padding:0 20px 0 0;border-bottom:0;border-right:1px solid #f0e5d8}.profile-summary-copy{padding:0;text-align:left}.profile-summary-copy .role-pill{margin-bottom:10px}.profile-password-grid{grid-template-columns:1fr 1fr}.profile-password-grid button{grid-column:1/-1;justify-self:start}}
@media(max-width:650px){.profile-shortcut{display:none}.profile-summary-card{display:block}.profile-photo-wrap{padding:0 0 18px;border-right:0;border-bottom:1px solid #f0e5d8}.profile-summary-copy{padding-top:17px;text-align:center}.profile-form-grid,.profile-password-grid{grid-template-columns:1fr}.profile-form-grid .wide{grid-column:auto}.profile-summary-copy dl div{grid-template-columns:1fr}.profile-summary-copy dd{text-align:left}.profile-password-grid button{grid-column:auto;width:100%}}


/* V60 password recovery and support */
.login-recovery-actions{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:-2px}.login-text-action{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:#9a3412;font-size:13px;font-weight:800;text-decoration:none;padding:7px 9px;border-radius:10px;cursor:pointer}.login-text-action:hover{background:#fff7ed}.login-text-action.whatsapp{color:#166534}.login-text-action [data-icon],.login-text-action svg{width:17px;height:17px}.sidebar-help-link{width:100%;display:flex;align-items:center;gap:11px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;border-radius:15px;padding:11px 13px;text-align:left;cursor:pointer;margin:12px 0 88px}.sidebar-help-link>span:first-child{width:22px;height:22px}.sidebar-help-link strong,.sidebar-help-link small{display:block}.sidebar-help-link small{font-size:10px;color:#7c5a46;margin-top:2px}.recovery-panel{width:min(610px,100%)}.support-panel{width:min(760px,100%)}.recovery-form{display:grid;gap:15px}.recovery-form label>span{display:block;font-size:12px;font-weight:850;color:#7c2d12;margin-bottom:7px}.recovery-form input,.recovery-form select,.recovery-form textarea{width:100%;border:1px solid #e5e7eb;border-radius:13px;padding:12px 13px;outline:0;background:#fff}.recovery-form input:focus,.recovery-form select:focus,.recovery-form textarea:focus{border-color:#fb923c;box-shadow:0 0 0 4px #ffedd5}.recovery-form textarea{resize:vertical}.recovery-grid.two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.recovery-grid .wide{grid-column:1/-1}.recovery-security-note,.support-delivery-note{display:flex;align-items:flex-start;gap:9px;margin:0;padding:11px 13px;background:#fff7ed;border:1px solid #fed7aa;border-radius:13px;color:#7c2d12;font-size:12px;line-height:1.5}.recovery-security-note svg,.support-delivery-note svg{width:19px;height:19px;flex:0 0 auto}.support-direct-card{display:flex;align-items:center;gap:12px;padding:13px 14px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:15px;margin-bottom:17px}.support-direct-card>span{width:26px;height:26px;color:#166534}.support-direct-card div{flex:1}.support-direct-card small,.support-direct-card strong{display:block}.support-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}.help-contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 15px}.help-contact-grid article{display:flex;gap:10px;align-items:center;border:1px solid #fed7aa;background:#fff7ed;border-radius:13px;padding:11px}.help-contact-grid article>span{width:24px;height:24px;color:#c2410c}.help-contact-grid small,.help-contact-grid strong{display:block}.help-contact-grid small{font-size:10px;color:#78716c;margin-bottom:3px}.help-contact-grid strong{font-size:12px;overflow-wrap:anywhere}.help-action-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.help-action-row .btn.primary{grid-column:1/-1;text-decoration:none;text-align:center}.help-close-wide{width:100%;margin-top:10px}.friendly-help-panel{width:min(620px,100%)}
@media(max-width:760px){.login-recovery-actions{align-items:stretch;flex-direction:column}.login-text-action{justify-content:center}.recovery-grid.two,.help-contact-grid,.help-action-row{grid-template-columns:1fr}.help-action-row .btn.primary{grid-column:auto}.support-direct-card{align-items:stretch;flex-direction:column}.sidebar-help-link{margin-bottom:100px}}

/* V60 automatic PWA update prompt */
.pwa-update-dialog{
  position:fixed;
  inset:0;
  z-index:6200;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(35,27,21,.48);
  backdrop-filter:blur(8px);
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease;
}
.pwa-update-dialog[hidden]{display:none!important}
.pwa-update-dialog.show{opacity:1;visibility:visible}
.pwa-update-card{
  width:min(500px,100%);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:16px;
  padding:24px;
  border:1px solid #f2d5b8;
  border-radius:24px;
  background:#fffdf9;
  box-shadow:0 30px 80px rgba(52,35,22,.28);
  transform:translateY(14px) scale(.985);
  transition:transform .18s ease;
}
.pwa-update-dialog.show .pwa-update-card{transform:translateY(0) scale(1)}
.pwa-update-mark{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#fff0df;
  color:#c75f15;
}
.pwa-update-mark svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pwa-update-copy{min-width:0}
.pwa-update-eyebrow{display:block;margin-bottom:5px;color:#b45309;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.pwa-update-copy h3{margin:0 0 7px;color:#29211b;font-size:20px;line-height:1.2}
.pwa-update-copy p{margin:0;color:#6f6259;font-size:13px;line-height:1.55}
.pwa-update-copy small{display:block;margin-top:10px;color:#8a6b55;font-size:11px;font-weight:700}
.pwa-update-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;padding-top:3px}
.pwa-update-actions .btn{min-width:108px;justify-content:center}
body.pwa-update-open{overflow:hidden}
@media(max-width:560px){
  .pwa-update-dialog{padding:14px;align-items:end}
  .pwa-update-card{grid-template-columns:1fr;padding:20px;border-radius:22px}
  .pwa-update-mark{width:44px;height:44px}
  .pwa-update-actions{display:grid;grid-template-columns:1fr 1fr}
  .pwa-update-actions .btn{width:100%;min-width:0}
}
@media print{.pwa-update-dialog{display:none!important}}

/* V60 closed-app Web Push permission workflow */
.pwa-notification-dialog{
  position:fixed;
  inset:0;
  z-index:6250;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(35,27,21,.5);
  backdrop-filter:blur(8px);
  opacity:0;
  visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease;
}
.pwa-notification-dialog[hidden]{display:none!important}
.pwa-notification-dialog.show{opacity:1;visibility:visible}
.pwa-notification-card{
  width:min(520px,100%);
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:16px;
  padding:24px;
  border:1px solid #f2d5b8;
  border-radius:24px;
  background:#fffdf9;
  box-shadow:0 30px 80px rgba(52,35,22,.28);
  transform:translateY(14px) scale(.985);
  transition:transform .18s ease;
}
.pwa-notification-dialog.show .pwa-notification-card{transform:translateY(0) scale(1)}
.pwa-notification-mark{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#fff0df;
  color:#c75f15;
}
.pwa-notification-mark svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pwa-notification-copy{min-width:0}
.pwa-notification-eyebrow{display:block;margin-bottom:5px;color:#b45309;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.pwa-notification-copy h3{margin:0 0 7px;color:#29211b;font-size:20px;line-height:1.2}
.pwa-notification-copy p{margin:0;color:#6f6259;font-size:13px;line-height:1.55}
.pwa-notification-copy small{display:block;margin-top:10px;color:#8a6b55;font-size:11px;font-weight:700}
.pwa-notification-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;padding-top:3px}
.pwa-notification-actions .btn{min-width:132px;justify-content:center}
body.pwa-notification-open{overflow:hidden}
.help-notification-status{margin:10px 0 0;padding:10px 12px;border:1px solid #f2d5b8;border-radius:12px;background:#fffaf4;color:#795b45;font-size:11px;font-weight:750;text-align:center}
#helpEnableNotificationsBtn:disabled{opacity:.72;cursor:default}
@media(max-width:560px){
  .pwa-notification-dialog{padding:14px;align-items:end}
  .pwa-notification-card{grid-template-columns:1fr;padding:20px;border-radius:22px}
  .pwa-notification-mark{width:44px;height:44px}
  .pwa-notification-actions{display:grid;grid-template-columns:1fr 1fr}
  .pwa-notification-actions .btn{width:100%;min-width:0}
}
@media print{.pwa-notification-dialog{display:none!important}}

/* V61 fee-ledger redesign */
.fee-ledger-stats{grid-template-columns:repeat(5,minmax(0,1fr))}
.v61-controls{grid-template-columns:repeat(4,minmax(180px,1fr))}
.legacy-fee-review{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:16px;padding:16px 18px;border:1px solid rgba(238,117,20,.22);border-radius:16px;background:linear-gradient(135deg,#fffaf4,#fff)}
.legacy-fee-review>div{display:grid;gap:4px;color:#4d4038}
.legacy-fee-review span{font-size:.88rem;color:#786a61;line-height:1.5}
.btn.danger,.table-btn.danger{background:#fff4f1;color:#a33120;border:1px solid #f0c1b7}
.btn.danger:hover,.table-btn.danger:hover{background:#a33120;color:#fff}
.fee-batch-card{margin-top:18px}
.ledger-entry-badge{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:.72rem;font-weight:800;white-space:nowrap;background:#f4eee8;color:#5c4c42}
.ledger-entry-badge.charge{background:#fff0df;color:#a44c00}
.ledger-entry-badge.credit,.ledger-entry-badge.adjustment_credit{background:#e8f7ef;color:#1c6b43}
.ledger-entry-badge.adjustment_debit{background:#fff3d7;color:#8a5c00}
.status-pill{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:.74rem;font-weight:800}
.status-pill.active{background:#e8f7ef;color:#1c6b43}.status-pill.inactive{background:#f2ece8;color:#77675d}
.table-subline{display:block;margin-top:3px;color:#8a7c72;font-size:.74rem;font-weight:500}
@media(max-width:1250px){.fee-ledger-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.v61-controls{grid-template-columns:repeat(2,minmax(180px,1fr))}}
@media(max-width:720px){.fee-ledger-stats,.v61-controls{grid-template-columns:1fr}.legacy-fee-review{align-items:flex-start;flex-direction:column}.legacy-fee-review .btn{width:100%}}
.payment-allocation-note{margin:0 0 14px;padding:10px 12px;border-radius:12px;background:#fff7ed;color:#73523d;font-size:.84rem;line-height:1.45;border:1px solid rgba(238,117,20,.18)}

/* V61 fee insights and legacy review */
.fee-insights-card{padding:0;overflow:hidden}.fee-insights-card summary{list-style:none;cursor:pointer;padding:18px 20px;display:flex;align-items:center;justify-content:space-between;gap:16px}.fee-insights-card summary::-webkit-details-marker{display:none}.fee-insights-card summary>span:first-child{display:grid;gap:3px}.fee-insights-card[open] .details-chevron{transform:rotate(180deg)}.details-chevron{transition:transform .2s ease}.fee-insight-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 20px 16px}.fee-insight-metrics>div{border:1px solid var(--border);border-radius:14px;padding:14px;background:var(--soft-bg,#fffaf3);display:grid;gap:5px}.fee-insight-metrics span{font-size:.76rem;color:var(--muted);font-weight:700}.fee-insight-metrics strong{font-size:1.05rem}.fee-insight-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:0 20px 18px}.fee-insight-grid section,.class-collection-section{border-top:1px solid var(--border);padding-top:14px}.fee-insight-grid h4,.class-collection-section h4{margin:0 0 10px}.fee-insight-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}.fee-insight-list li,.fee-insight-list button{width:100%;border:0;background:transparent;padding:0;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;color:inherit}.fee-insight-list li{padding:9px 0;border-bottom:1px dashed var(--border)}.fee-insight-list li:last-child{border-bottom:0}.fee-insight-list span{display:grid;gap:2px}.fee-insight-list small{color:var(--muted)}.fee-insight-list b{white-space:nowrap}.class-collection-section{margin:0 20px 20px}.class-collection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:9px}.class-collection-grid>div{border:1px solid var(--border);border-radius:12px;padding:10px;display:grid;grid-template-columns:1fr auto;gap:3px 8px}.class-collection-grid small{grid-column:1/-1;color:var(--muted)}.legacy-fee-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}@media(max-width:900px){.fee-insight-metrics{grid-template-columns:1fr 1fr}.fee-insight-grid{grid-template-columns:1fr}}@media(max-width:560px){.fee-insight-metrics{grid-template-columns:1fr}.legacy-fee-actions{width:100%;justify-content:stretch}.legacy-fee-actions .btn{flex:1}}

/* V62 System Maintenance Centre */
.maintenance-hero{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:28px;border:1px solid #ffedd5;border-radius:28px;background:linear-gradient(135deg,#111827 0,#292524 48%,#9a3412 100%);color:#fff;box-shadow:0 24px 55px rgba(17,24,39,.18);margin-bottom:22px;overflow:hidden;position:relative}.maintenance-hero:after{content:"";position:absolute;width:300px;height:300px;border-radius:50%;right:-110px;top:-160px;background:rgba(249,115,22,.22)}.maintenance-hero>div{position:relative;z-index:1}.maintenance-hero .eyebrow,.maintenance-card .eyebrow,.maintenance-lock-card .eyebrow{display:block;font-size:11px;font-weight:900;letter-spacing:.16em;text-transform:uppercase;color:#fb923c}.maintenance-hero h3{font-size:30px;margin:7px 0}.maintenance-hero p{margin:0;color:#fed7aa;max-width:820px;line-height:1.6}.maintenance-version-badge{min-width:190px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2);border-radius:22px;padding:18px;backdrop-filter:blur(10px)}.maintenance-version-badge span,.maintenance-version-badge small{display:block;color:#fed7aa}.maintenance-version-badge strong{display:block;font-size:34px;margin:5px 0}.maintenance-lock-card{display:grid;grid-template-columns:auto 1fr minmax(380px,520px);gap:20px;align-items:center;background:#fff;border:1px solid #ffedd5;border-radius:24px;padding:22px;box-shadow:var(--shadow)}.maintenance-lock-icon,.maintenance-card-icon{width:54px;height:54px;border-radius:18px;display:grid;place-items:center;background:#fff7ed;color:#ea580c}.maintenance-lock-icon svg,.maintenance-card-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.9}.maintenance-lock-card h3,.maintenance-card h3{margin:4px 0 5px}.maintenance-lock-card p,.maintenance-card p{margin:0;color:var(--muted);line-height:1.55}.maintenance-unlock-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.maintenance-unlock-form label,.maintenance-confirm-row label{font-size:12px;font-weight:850;color:#374151}.maintenance-unlock-form input,.maintenance-confirm-row input,.maintenance-actions select{display:block;width:100%;margin-top:6px;border:1px solid var(--line);border-radius:13px;background:#fff;padding:11px 12px;outline:0}.maintenance-unlock-form input:focus,.maintenance-confirm-row input:focus{border-color:#fb923c;box-shadow:0 0 0 3px rgba(249,115,22,.12)}.maintenance-lock-card .form-feedback{grid-column:1/-1;margin:0}.maintenance-workspace{display:grid;gap:18px}.maintenance-toolbar{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #ffedd5;border-radius:18px;padding:14px 16px}.maintenance-toolbar strong,.maintenance-toolbar small{display:block}.maintenance-toolbar small{color:var(--muted);margin-top:3px}.maintenance-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.maintenance-kpi-grid article{background:#fff;border:1px solid #ffedd5;border-radius:20px;padding:18px;box-shadow:0 10px 26px rgba(17,24,39,.05)}.maintenance-kpi-grid span,.version-summary-grid span{display:block;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.06em}.maintenance-kpi-grid strong{display:block;font-size:24px;margin:7px 0}.maintenance-kpi-grid small{color:var(--muted)}.maintenance-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}.maintenance-card{background:#fff;border:1px solid #ffedd5;border-radius:24px;padding:21px;box-shadow:var(--shadow);min-width:0}.maintenance-cleanup-card,.maintenance-health-detail{grid-column:1/-1}.maintenance-card-heading{display:flex;gap:14px;align-items:flex-start;margin-bottom:18px}.maintenance-card-heading>div:last-child{min-width:0}.maintenance-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.maintenance-inline-status{font-size:13px;color:var(--muted);font-weight:750}.maintenance-scan-results{margin-top:16px;border-top:1px solid #f3f4f6;padding-top:16px}.maintenance-result-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}.maintenance-result-summary article{background:#f9fafb;border:1px solid #eef2f7;border-radius:14px;padding:12px}.maintenance-result-summary span{display:block;font-size:11px;color:var(--muted);text-transform:uppercase;font-weight:850}.maintenance-result-summary strong{display:block;margin-top:4px}.maintenance-selection-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:10px 0}.maintenance-selection-bar label{font-weight:800;font-size:13px}.maintenance-selection-bar input{accent-color:var(--orange)}.text-button{border:0;background:transparent;color:#c2410c;font-weight:850;cursor:pointer}.maintenance-file-list{border:1px solid #e5e7eb;border-radius:16px;max-height:390px;overflow:auto}.maintenance-file-row{display:grid;grid-template-columns:auto minmax(0,1fr) 110px 160px;gap:12px;align-items:center;padding:12px 14px;border-top:1px solid #eef2f7}.maintenance-file-row:first-child{border-top:0}.maintenance-file-row:hover{background:#fffaf5}.maintenance-file-row input{accent-color:var(--orange)}.maintenance-file-row strong{display:block;word-break:break-word;font-size:13px}.maintenance-file-row small{display:block;color:var(--muted);margin-top:3px}.maintenance-file-row .recommended{display:inline-flex;width:max-content;margin-top:5px;background:#ffedd5;color:#9a3412;border-radius:999px;padding:3px 7px;font-size:10px;font-weight:900;text-transform:uppercase}.maintenance-file-size,.maintenance-file-date{font-size:12px;color:#6b7280;text-align:right}.maintenance-confirm-row{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:12px;align-items:end;margin-top:14px}.maintenance-confirm-row label{max-width:360px}.btn:disabled{opacity:.5;cursor:not-allowed;transform:none!important}.version-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.version-summary-grid article{border:1px solid #eef2f7;border-radius:14px;background:#f9fafb;padding:12px}.version-summary-grid strong{display:block;margin-top:5px}.maintenance-tabs{display:flex;gap:8px;margin:16px 0 10px;border-bottom:1px solid #e5e7eb}.maintenance-tabs button{border:0;background:transparent;padding:10px 12px;font-weight:850;color:#6b7280;cursor:pointer;border-bottom:2px solid transparent}.maintenance-tabs button.active{color:#c2410c;border-bottom-color:#f97316}.maintenance-release-notes{max-height:330px;overflow:auto;background:#f9fafb;border:1px solid #eef2f7;border-radius:14px;padding:15px;line-height:1.6;color:#374151}.maintenance-release-notes h1,.maintenance-release-notes h2,.maintenance-release-notes h3{margin:10px 0 6px;color:#111827}.maintenance-release-notes ul{margin:7px 0;padding-left:20px}.maintenance-backup-list{display:grid;gap:9px;margin-top:14px}.maintenance-backup-list .empty-state{display:block}.maintenance-backup-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;background:#f9fafb;border:1px solid #eef2f7;border-radius:14px;padding:12px}.maintenance-backup-row strong,.maintenance-backup-row small{display:block}.maintenance-backup-row small{color:var(--muted);margin-top:4px}.maintenance-backup-actions{display:flex;gap:6px;flex-wrap:wrap}.maintenance-backup-actions button,.maintenance-backup-actions a{border:1px solid #fed7aa;background:#fff;color:#c2410c;border-radius:10px;padding:7px 9px;text-decoration:none;font-size:12px;font-weight:800;cursor:pointer}.maintenance-backup-actions .danger-link{border-color:#fecaca;color:#b91c1c}.maintenance-operation-output{margin-top:14px;background:#f9fafb;border:1px solid #eef2f7;border-radius:14px;padding:13px;color:#4b5563;max-height:260px;overflow:auto;font-size:13px;line-height:1.5}.maintenance-health-table{display:grid;gap:10px}.maintenance-health-row{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr) auto;gap:12px;align-items:center;border:1px solid #eef2f7;border-radius:14px;padding:12px}.maintenance-health-row span{font-weight:800}.maintenance-health-row small{color:var(--muted)}.maintenance-health-status{border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900}.maintenance-health-status.ok{background:#dcfce7;color:#166534}.maintenance-health-status.warn{background:#fef3c7;color:#92400e}.maintenance-health-status.fail{background:#fee2e2;color:#991b1b}.form-feedback.success{color:#166534}.form-feedback.error{color:#b91c1c}.nav-item[data-section="maintenance"].active{background:linear-gradient(135deg,#111827,#9a3412);color:#fff}
@media(max-width:1180px){.maintenance-lock-card{grid-template-columns:auto 1fr}.maintenance-unlock-form{grid-column:1/-1}.maintenance-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-grid{grid-template-columns:1fr}.maintenance-cleanup-card,.maintenance-health-detail{grid-column:auto}}
@media(max-width:760px){.maintenance-hero{align-items:stretch;flex-direction:column}.maintenance-version-badge{min-width:0}.maintenance-lock-card{grid-template-columns:1fr}.maintenance-lock-icon{display:none}.maintenance-unlock-form{grid-template-columns:1fr}.maintenance-kpi-grid{grid-template-columns:1fr}.maintenance-result-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-file-row{grid-template-columns:auto minmax(0,1fr)}.maintenance-file-size,.maintenance-file-date{grid-column:2;text-align:left}.maintenance-confirm-row{grid-template-columns:1fr}.version-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maintenance-health-row{grid-template-columns:1fr}.maintenance-backup-row{grid-template-columns:1fr}.maintenance-toolbar{align-items:flex-start;gap:12px}.maintenance-toolbar .section-actions{justify-content:flex-end}}

.maintenance-workspace[hidden],.maintenance-scan-results[hidden],.maintenance-release-notes[hidden]{display:none!important}
