:root{--bg:#f5f7fb;--card:#fff;--text:#0f172a;--muted:#64748b;--primary:#136f63;--primary2:#0f766e;--border:#e2e8f0;--danger:#dc2626;--warning:#d97706;--success:#15803d;--shadow:0 8px 24px rgba(15,23,42,.08)}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Noto Sans Devanagari","Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text)}a{color:inherit}.app-shell{display:flex;min-height:100vh}.sidebar{width:270px;background:#0f172a;color:#fff;position:fixed;inset:0 auto 0 0;overflow:auto;z-index:20;transition:.25s}.brand{display:flex;gap:12px;align-items:center;padding:20px;border-bottom:1px solid rgba(255,255,255,.1)}.brand-logo{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#2dd4bf,#86efac);display:grid;place-items:center;color:#0f172a;font-weight:800}.brand span{display:block;color:#cbd5e1;font-size:12px;margin-top:2px}.sidebar nav{padding:12px}.sidebar a{display:flex;gap:10px;align-items:center;text-decoration:none;padding:12px 14px;border-radius:12px;color:#e2e8f0;margin:4px 0;font-size:15px}.sidebar a:hover,.sidebar a.active{background:rgba(45,212,191,.16);color:#fff}.main{margin-left:270px;width:calc(100% - 270px);padding:18px}.topbar{display:flex;align-items:center;justify-content:space-between;background:var(--card);padding:16px 18px;border-radius:18px;box-shadow:var(--shadow);margin-bottom:18px}.topbar h1{font-size:22px;margin:0}.topbar p{margin:2px 0 0;color:var(--muted);font-size:13px}.menu-btn{display:none;border:0;background:var(--primary);color:#fff;border-radius:10px;padding:9px 12px;font-size:18px}.userbox{display:flex;gap:12px;align-items:center}.userbox a{background:#fee2e2;color:#991b1b;text-decoration:none;padding:8px 10px;border-radius:10px;font-size:13px}.card{background:var(--card);border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);padding:18px;margin-bottom:18px}.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:16px}.col-3{grid-column:span 3}.col-4{grid-column:span 4}.col-6{grid-column:span 6}.col-8{grid-column:span 8}.col-12{grid-column:span 12}.stat{padding:18px;border-radius:18px;background:linear-gradient(135deg,#fff,#ecfeff);border:1px solid var(--border)}.stat span{color:var(--muted);font-size:13px}.stat strong{display:block;font-size:26px;margin-top:8px}.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:space-between;margin-bottom:14px}.btn{border:0;background:var(--primary);color:#fff;text-decoration:none;border-radius:12px;padding:10px 14px;display:inline-flex;gap:7px;align-items:center;cursor:pointer;font-weight:600;font-size:14px}.btn.secondary{background:#e2e8f0;color:#0f172a}.btn.danger{background:var(--danger)}.btn.warning{background:var(--warning)}.btn.small{padding:7px 9px;font-size:12px;border-radius:9px}.alert{padding:12px 14px;border-radius:14px;margin-bottom:16px;background:#dcfce7;color:#166534;border:1px solid #bbf7d0}.alert.error{background:#fee2e2;color:#991b1b;border-color:#fecaca}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}.field{grid-column:span 4}.field.full{grid-column:span 12}.field.half{grid-column:span 6}label{display:block;font-size:13px;color:#334155;margin-bottom:6px;font-weight:700}input,select,textarea{width:100%;border:1px solid var(--border);border-radius:12px;padding:11px 12px;background:#fff;color:#0f172a;font-size:15px}textarea{min-height:86px}.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:16px}table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:12px 13px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top;white-space:nowrap}th{background:#f8fafc;color:#334155;font-size:13px}td{font-size:14px}.badge{padding:4px 9px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:12px;font-weight:700}.badge.success{background:#dcfce7;color:#166534}.badge.danger{background:#fee2e2;color:#991b1b}.badge.warning{background:#fef3c7;color:#92400e}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.tabs a{text-decoration:none;padding:9px 12px;border-radius:999px;background:#e2e8f0;color:#334155;font-weight:700;font-size:13px}.tabs a.active{background:var(--primary);color:#fff}.print-area{background:#fff;color:#000}.print-doc{max-width:794px;margin:0 auto;background:#fff;padding:26px;border:1px solid #ddd;min-height:1050px}.school-head{text-align:center;border-bottom:2px solid #111;padding-bottom:12px;margin-bottom:18px}.school-head h2{font-size:28px;margin:0}.school-head p{margin:3px 0}.sign-row{display:flex;justify-content:space-between;margin-top:60px}.id-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.id-card{border:1px solid #222;border-radius:12px;padding:12px;background:#fff;min-height:220px}.id-card h3{text-align:center;margin:0 0 8px;font-size:18px}.id-content{display:flex;gap:10px}.avatar{width:72px;height:72px;border-radius:8px;object-fit:cover;border:1px solid #ddd}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0f172a,#0f766e)}.login-card{width:min(420px,92vw);background:#fff;border-radius:22px;padding:26px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.login-card h1{margin:0 0 6px}.login-card p{margin-top:0;color:var(--muted)}.search-row{display:flex;gap:10px;flex-wrap:wrap}.search-row input,.search-row select{max-width:220px}.empty{padding:24px;text-align:center;color:var(--muted)}
@media(max-width:900px){.sidebar{transform:translateX(-105%)}.sidebar.open{transform:translateX(0)}.main{margin-left:0;width:100%;padding:12px}.menu-btn{display:block}.topbar{gap:12px}.topbar h1{font-size:18px}.userbox span{display:none}.grid{grid-template-columns:repeat(6,1fr)}.col-3,.col-4{grid-column:span 3}.col-6,.col-8,.col-12{grid-column:span 6}.field,.field.half{grid-column:span 12}.form-grid{grid-template-columns:repeat(6,1fr)}.id-grid{grid-template-columns:1fr}th,td{font-size:13px;padding:10px}.toolbar{display:block}.toolbar .btn{margin-top:8px}.search-row input,.search-row select{max-width:none}}
@media(max-width:560px){.grid{grid-template-columns:1fr}.col-3,.col-4,.col-6,.col-8,.col-12{grid-column:span 1}.topbar{border-radius:14px}.card{padding:14px;border-radius:14px}.stat strong{font-size:22px}.btn{width:100%;justify-content:center;margin-bottom:6px}.tabs a{flex:1;text-align:center}.print-doc{min-height:auto;padding:14px;border:0}.school-head h2{font-size:22px}}
@media print{body{background:#fff}.sidebar,.topbar,.toolbar,.tabs,.no-print,.alert{display:none!important}.main{margin:0;width:100%;padding:0}.card{box-shadow:none;border:0;margin:0;padding:0}.print-doc{border:0;max-width:100%;padding:0;min-height:auto}.table-wrap{border:0;overflow:visible}table{font-size:12px}th,td{white-space:normal}.id-grid{grid-template-columns:repeat(2,1fr)}@page{size:A4;margin:12mm}}

/* Advanced print header, logo, QR and watermark */
.logo-preview{border:1px dashed var(--border);border-radius:14px;padding:10px;display:inline-block;background:#fff}
.logo-preview img{max-width:140px;max-height:120px;object-fit:contain;display:block}.inline-check{display:flex;align-items:center;gap:8px;margin-top:8px;font-weight:600}.inline-check input{width:auto}.smart-head{display:grid;grid-template-columns:110px 1fr 120px;gap:12px;align-items:center;text-align:center;position:relative}.head-logo{display:flex;align-items:center;justify-content:center}.head-logo img{width:96px;height:96px;object-fit:contain}.head-logo span{width:86px;height:86px;display:grid;place-items:center;border:2px solid #111;border-radius:50%;font-weight:800}.head-center h2{font-size:27px;margin:0}.head-center p{margin:3px 0}.head-qr{text-align:center}.head-qr img{width:105px;height:105px;object-fit:contain}.head-qr small{display:block;font-size:10px;margin-top:2px;color:#333}.doc-watermark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:0}.doc-watermark img{max-width:55%;max-height:55%;opacity:.055;filter:grayscale(1)}.print-doc{position:relative;overflow:hidden}.print-doc>*:not(.doc-watermark){position:relative;z-index:1}.receipt-doc{max-width:794px;min-height:520px;padding:18px 22px}.receipt-doc .smart-head{grid-template-columns:82px 1fr 92px;margin-bottom:12px}.receipt-doc .head-logo img{width:72px;height:72px}.receipt-doc .head-logo span{width:68px;height:68px;font-size:13px}.receipt-doc .head-center h2{font-size:22px}.receipt-doc .head-center h3{margin:4px 0 0}.receipt-doc .head-qr img{width:78px;height:78px}.receipt-doc table th,.receipt-doc table td{padding:8px 10px}.receipt-sign{margin-top:38px}.excel-actions{display:flex;gap:10px;flex-wrap:wrap}.report-downloads .btn{justify-content:center}.report-downloads h3{margin-bottom:6px}
@media(max-width:560px){.smart-head{grid-template-columns:70px 1fr 78px;gap:6px}.head-logo img{width:62px;height:62px}.head-logo span{width:58px;height:58px;font-size:12px}.head-center h2{font-size:18px}.head-center p{font-size:11px}.head-qr img{width:66px;height:66px}.head-qr small{display:none}}
@media print{.smart-head{grid-template-columns:30mm 1fr 30mm}.head-logo img{width:25mm;height:25mm}.head-qr img{width:26mm;height:26mm}.doc-watermark img{opacity:.06}.receipt-doc{width:190mm;min-height:130mm;padding:0}.receipt-doc .smart-head{grid-template-columns:25mm 1fr 27mm}.receipt-doc .head-logo img{width:22mm;height:22mm}.receipt-doc .head-qr img{width:23mm;height:23mm}.receipt-doc table th,.receipt-doc table td{padding:5px 7px;font-size:11px}}
.id-card{position:relative;overflow:hidden}.id-watermark{position:absolute;inset:35px auto auto 50%;transform:translateX(-50%);width:120px;height:120px;object-fit:contain;opacity:.055;filter:grayscale(1);pointer-events:none}.id-head{display:grid;grid-template-columns:42px 1fr 46px;align-items:center;gap:6px;border-bottom:1px solid #222;padding-bottom:6px;margin-bottom:8px}.id-head h3{margin:0;font-size:15px;text-align:left}.id-head p{margin:1px 0 0;font-size:10px}.id-logo img{width:38px;height:38px;object-fit:contain}.id-logo span{width:36px;height:36px;display:grid;place-items:center;border:1px solid #222;border-radius:50%;font-weight:800}.id-qr{width:42px;height:42px;object-fit:contain}

.brand-logo-img{width:42px;height:42px;border-radius:14px;background:#fff;object-fit:contain;padding:3px}

/* v4 Print Header Fix: logo-left, school-center, QR-right, title below header line */
.print-doc{position:relative!important;overflow:hidden!important;background:#fff!important}
.fixed-print-head{display:grid!important;grid-template-columns:minmax(82px,105px) 1fr minmax(88px,112px)!important;gap:12px!important;align-items:center!important;text-align:center!important;border-bottom:2px solid #111!important;padding-bottom:10px!important;margin-bottom:16px!important}
.fixed-print-head .head-logo{justify-content:flex-start!important;text-align:left!important}
.fixed-print-head .head-logo img{width:82px!important;height:82px!important;max-width:82px!important;max-height:82px!important;object-fit:contain!important;display:block!important}
.fixed-print-head .head-qr{align-items:flex-end!important;text-align:right!important}
.fixed-print-head .head-qr img{width:86px!important;height:86px!important;max-width:86px!important;max-height:86px!important;object-fit:contain!important;display:block!important}
.fixed-print-head .head-qr small{width:86px!important;text-align:center!important;font-size:10px!important}
.fixed-print-head .head-center h2{font-size:26px!important;line-height:1.15!important;margin:0 0 4px!important}
.fixed-print-head .head-center h3{font-size:18px!important;line-height:1.2!important;margin:8px 0 0!important}
.fixed-print-head .head-center p{font-size:14px!important;line-height:1.25!important;margin:2px 0!important}
.doc-watermark{position:absolute!important;left:50%!important;top:54%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;width:360px!important;height:360px!important;max-width:70%!important;max-height:70%!important;display:flex!important;align-items:center!important;justify-content:center!important;pointer-events:none!important;z-index:0!important}
.doc-watermark img{max-width:100%!important;max-height:100%!important;object-fit:contain!important;opacity:.045!important;filter:grayscale(1)!important}
.receipt-doc .fixed-print-head{grid-template-columns:minmax(64px,82px) 1fr minmax(70px,92px)!important}
.receipt-doc .fixed-print-head .head-logo img{width:66px!important;height:66px!important;max-width:66px!important;max-height:66px!important}
.receipt-doc .fixed-print-head .head-qr img{width:70px!important;height:70px!important;max-width:70px!important;max-height:70px!important}
.receipt-doc .fixed-print-head .head-qr small{width:70px!important}
.receipt-doc .fixed-print-head .head-center h2{font-size:21px!important}
.receipt-doc .fixed-print-head .head-center h3{font-size:16px!important;margin-top:4px!important}
.receipt-doc .fixed-print-head .head-center p{font-size:12px!important}

.doc-title-under-line{display:block!important;text-align:center!important;font-size:18px!important;font-weight:800!important;margin:-6px 0 18px!important;line-height:1.25!important;position:relative!important;z-index:1!important}
.receipt-doc .doc-title-under-line{font-size:16px!important;margin:-4px 0 12px!important}
@media(max-width:560px){
  .fixed-print-head{grid-template-columns:62px 1fr 66px!important;gap:6px!important}
  .fixed-print-head .head-logo img{width:56px!important;height:56px!important;max-width:56px!important;max-height:56px!important}
  .fixed-print-head .head-qr img{width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important}
  .fixed-print-head .head-qr small{display:none!important}
  .fixed-print-head .head-center h2{font-size:17px!important}
  .fixed-print-head .head-center h3{font-size:14px!important}
  .fixed-print-head .head-center p{font-size:10px!important}

  .doc-title-under-line{font-size:14px!important;margin:-3px 0 12px!important}
}
@media print{
  .fixed-print-head{grid-template-columns:25mm 1fr 27mm!important;gap:4mm!important;padding-bottom:3mm!important;margin-bottom:5mm!important}
  .fixed-print-head .head-logo img{width:22mm!important;height:22mm!important;max-width:22mm!important;max-height:22mm!important}
  .fixed-print-head .head-qr img{width:23mm!important;height:23mm!important;max-width:23mm!important;max-height:23mm!important}
  .fixed-print-head .head-qr small{width:23mm!important;font-size:8pt!important}
  .fixed-print-head .head-center h2{font-size:19pt!important}
  .fixed-print-head .head-center h3{font-size:13pt!important}
  .fixed-print-head .head-center p{font-size:10pt!important}
  .doc-watermark{width:95mm!important;height:95mm!important;top:54%!important}
  .doc-watermark img{opacity:.04!important}
  .receipt-doc .fixed-print-head{grid-template-columns:20mm 1fr 22mm!important;gap:3mm!important;margin-bottom:3mm!important}
  .receipt-doc .fixed-print-head .head-logo img{width:18mm!important;height:18mm!important;max-width:18mm!important;max-height:18mm!important}
  .receipt-doc .fixed-print-head .head-qr img{width:19mm!important;height:19mm!important;max-width:19mm!important;max-height:19mm!important}
  .receipt-doc .fixed-print-head .head-qr small{width:19mm!important;font-size:7pt!important}
  .receipt-doc .fixed-print-head .head-center h2{font-size:16pt!important}
  .receipt-doc .fixed-print-head .head-center h3{font-size:11pt!important}
  .receipt-doc .fixed-print-head .head-center p{font-size:8pt!important}

  .doc-title-under-line{font-size:13pt!important;margin:-2mm 0 5mm!important}
  .receipt-doc .doc-title-under-line{font-size:11pt!important;margin:-1mm 0 3mm!important}
}


/* v6 Super Professional Office */
.kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.mini-note{font-size:12px;color:var(--muted)}
.sign-box{position:relative;text-align:center;min-width:160px;display:inline-block}.sign-img{display:block;max-width:140px;max-height:46px;object-fit:contain;margin:0 auto 2px}.stamp-img{position:absolute;right:8px;bottom:18px;max-width:70px;max-height:70px;object-fit:contain;opacity:.85}.v6-sign-row{align-items:flex-end;min-height:80px}.danger-zone{border:1px dashed var(--danger);background:#fff7f7}.smart-list{display:grid;gap:10px}.smart-item{border:1px solid var(--border);border-radius:14px;padding:12px;background:#fff}.whatsapp-preview{white-space:pre-wrap;background:#f8fafc;border:1px solid var(--border);border-radius:12px;padding:12px}.office-badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#ecfeff;color:#0f766e;font-size:12px;font-weight:800}.logo-preview img{background:white}
@media(max-width:900px){.kpi-row{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.kpi-row{grid-template-columns:1fr}.sign-row{gap:16px;flex-wrap:wrap}.sign-box{min-width:120px}.stamp-img{max-width:50px;max-height:50px}}
@media print{.sign-img{max-width:35mm;max-height:12mm}.stamp-img{max-width:18mm;max-height:18mm}.v6-sign-row{min-height:25mm}}


/* v10 UI FIX: wider forms for Super Admin and desktop data entry */
.grid.two{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}
.grid.two>.card{min-width:0}
.grid.two>.card:first-child{grid-column:auto}
.grid.two>.card:nth-child(2){grid-column:auto}
.form-grid>label{grid-column:span 3;min-width:0}
.form-grid>label textarea{min-height:96px}
.form-grid>button,.form-grid>.btn{align-self:end;justify-self:start}
.superadmin-add-form{grid-template-columns:repeat(4,minmax(180px,1fr));gap:16px;align-items:end}
.superadmin-add-form label{grid-column:auto}
.superadmin-add-form label.wide{grid-column:span 2}
.superadmin-add-form label.address-field{grid-column:span 2;align-self:stretch}
.superadmin-add-form label.address-field textarea{height:96px}
.superadmin-side-card{min-width:280px}
.table-wrap table input,.table-wrap table select{min-width:120px}
.superadmin-table th,.superadmin-table td{white-space:normal;vertical-align:top}
.superadmin-table .plan-form{display:grid!important;grid-template-columns:140px 170px auto;gap:8px;align-items:end;min-width:350px}
.superadmin-table .brand-form{display:grid;grid-template-columns:repeat(3,minmax(150px,1fr));gap:10px;min-width:520px;margin-top:8px;align-items:end}
.superadmin-table details{margin-top:8px;min-width:560px}
.superadmin-table summary{cursor:pointer;font-weight:700;color:#0f766e}
.superadmin-table .action-stack{min-width:590px}
@media(max-width:1200px){.grid.two{grid-template-columns:1fr}.superadmin-add-form{grid-template-columns:repeat(2,minmax(180px,1fr))}.superadmin-add-form label.address-field,.superadmin-add-form label.wide{grid-column:span 2}}
@media(max-width:900px){.grid.two{display:block}.form-grid>label{grid-column:span 6}.superadmin-table .plan-form,.superadmin-table .brand-form{min-width:0;grid-template-columns:1fr}.superadmin-table details,.superadmin-table .action-stack{min-width:0}.superadmin-add-form{grid-template-columns:1fr}.superadmin-add-form label.address-field,.superadmin-add-form label.wide{grid-column:span 1}}

/* v10.2 Professional SaaS UI + universal responsive input-width fix */
html{overflow-x:hidden}body{overflow-x:hidden;background:radial-gradient(circle at top left,#eef2ff 0,#f8fafc 36%,#f1f5f9 100%)}
body.super-admin-ui{--bg:#f4f7ff;--primary:#2563eb;--primary2:#7c3aed;--accent:#06b6d4;--shadow:0 14px 40px rgba(30,41,59,.10)}
body.super-admin-ui .sidebar{background:linear-gradient(180deg,#111827 0%,#172554 42%,#0f766e 100%);box-shadow:18px 0 45px rgba(15,23,42,.20)}
body.super-admin-ui .brand-logo{background:linear-gradient(135deg,#38bdf8,#a78bfa,#34d399);color:#fff;box-shadow:0 10px 22px rgba(37,99,235,.32)}
body.super-admin-ui .sidebar a:hover,body.super-admin-ui .sidebar a.active{background:rgba(255,255,255,.16);box-shadow:inset 4px 0 0 #67e8f9;color:#fff}
body.super-admin-ui .topbar{background:linear-gradient(135deg,#ffffff,#eef6ff);border:1px solid #dbeafe}
body.super-admin-ui .topbar h1{background:linear-gradient(90deg,#1d4ed8,#7c3aed,#0f766e);-webkit-background-clip:text;background-clip:text;color:transparent}
body.super-admin-ui .stat{background:linear-gradient(135deg,#ffffff 0%,#eef6ff 55%,#ecfeff 100%);border-color:#bfdbfe;box-shadow:0 14px 34px rgba(37,99,235,.10)}
body.super-admin-ui .stat strong{color:#1d4ed8}.nav-divider{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#bae6fd;margin:16px 10px 8px;border-top:1px solid rgba(255,255,255,.16);padding-top:12px}
.card{max-width:100%;overflow:visible}.table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-wrap table{min-width:860px}.table-wrap input,.table-wrap select,.table-wrap textarea{min-width:150px}.table-wrap .btn{white-space:nowrap}
input,select,textarea{min-height:44px;max-width:100%}textarea{resize:vertical}.form-grid{align-items:end}.field,label{min-width:0}.field input,.field select,.field textarea,label input,label select,label textarea{width:100%;min-width:0}.search-row>*{min-width:180px}.search-row .btn{min-width:auto}
/* Super Admin page: spacious desktop + clean mobile cards */
.superadmin-layout{grid-template-columns:minmax(0,1fr) 300px!important;gap:20px}.superadmin-layout .card:first-child{min-height:auto}.superadmin-add-form{display:grid!important;grid-template-columns:repeat(3,minmax(240px,1fr))!important;gap:18px!important;align-items:end}.superadmin-add-form label{display:block!important;grid-column:auto!important}.superadmin-add-form label.wide,.superadmin-add-form label.address-field{grid-column:span 2!important}.superadmin-add-form label.address-field textarea{height:104px!important;min-height:104px!important}.superadmin-add-form button{min-height:52px;padding-inline:18px}.superadmin-side-card{background:linear-gradient(135deg,#fff7ed,#ecfeff);border-color:#fed7aa}
.superadmin-table{min-width:1120px}.superadmin-table th{background:#eff6ff;color:#1e3a8a}.superadmin-table .plan-form{display:grid!important;grid-template-columns:minmax(160px,1fr) minmax(190px,1fr) auto!important;gap:10px!important;align-items:end!important;min-width:430px!important}.superadmin-table .brand-form{display:grid!important;grid-template-columns:repeat(2,minmax(220px,1fr)) auto!important;gap:12px!important;align-items:end!important;min-width:620px!important}.superadmin-table details{min-width:650px!important}.superadmin-table .action-stack{min-width:700px!important}.superadmin-table input,.superadmin-table select{min-width:0!important}.superadmin-table summary{padding:8px 0;color:#1d4ed8}
@media(max-width:1280px){.superadmin-layout{grid-template-columns:1fr!important}.superadmin-add-form{grid-template-columns:repeat(2,minmax(230px,1fr))!important}.superadmin-side-card{max-width:none}.superadmin-add-form label.wide,.superadmin-add-form label.address-field{grid-column:span 2!important}}
@media(max-width:900px){body{background:#f8fafc}.app-shell{display:block}.main{padding:12px;width:100%;margin-left:0}.topbar{align-items:flex-start;gap:10px;flex-wrap:wrap}.topbar>div:nth-child(2){min-width:0;flex:1}.topbar h1{font-size:19px;line-height:1.25}.userbox{width:100%;justify-content:flex-start;flex-wrap:wrap}.userbox a{padding:8px 12px}.superadmin-add-form{grid-template-columns:1fr!important}.superadmin-add-form label.wide,.superadmin-add-form label.address-field{grid-column:span 1!important}.superadmin-add-form button{width:100%;justify-content:center}.superadmin-layout{display:block!important}.table-wrap table{min-width:980px}.search-row{display:grid;grid-template-columns:1fr;gap:10px}.search-row>*{min-width:0;max-width:none!important;width:100%}}
@media(max-width:560px){.main{padding:10px}.brand{padding:16px}.card{padding:14px;border-radius:16px;margin-bottom:14px}.grid{gap:12px}.stat{padding:15px}.superadmin-add-form{gap:14px!important}.superadmin-add-form label{font-size:12px}.superadmin-add-form input,.superadmin-add-form select,.superadmin-add-form textarea{font-size:15px;padding:10px 11px;border-radius:12px}.table-wrap{border-radius:12px}.table-wrap table{min-width:920px}h2{font-size:20px;line-height:1.25}.btn{width:auto}.superadmin-add-form .btn{width:100%}}


/* v10.5 repair: print table width, inputs and toast-friendly UI */
.check-cell{text-align:center}.check-cell input[type=radio]{width:28px!important;height:28px!important;min-width:28px!important;accent-color:#0f766e}.marks-table input{min-width:110px}.subject-list-box{white-space:pre-wrap;background:#f8fafc;border:1px solid var(--border);border-radius:12px;padding:10px;min-width:180px}.filter-card .form-grid{align-items:end}.doc-link{font-weight:800;color:#0f766e;text-decoration:none}.doc-link:hover{text-decoration:underline}.portal-help{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;border-radius:14px;padding:12px;margin-bottom:12px}
@media print{html,body{overflow:visible!important}.table-wrap{overflow:visible!important;border:0!important}.table-wrap table{min-width:0!important;width:100%!important}.table-wrap input,.table-wrap select,.table-wrap textarea{min-width:0!important}th,td{white-space:normal!important;word-break:break-word!important;padding:5px 6px!important;font-size:10.5pt!important}.check-cell input[type=radio]{width:14px!important;height:14px!important;min-width:14px!important}.main{overflow:visible!important}.card{overflow:visible!important}.print-area{page-break-inside:auto}.print-hide-overflow{overflow:visible!important}.search-row,.form-grid{display:block!important}.no-print{display:none!important}}
@media(max-width:760px){.form-grid{grid-template-columns:1fr!important}.field,.field.half,.field.full{grid-column:span 1!important}.card input,.card select,.card textarea{font-size:16px}.table-wrap table{min-width:760px}.check-cell input[type=radio]{width:30px!important;height:30px!important;min-width:30px!important}}


/* V11 Enterprise mobile polish */
.quick-panel,.role-panel{background:linear-gradient(135deg,#eff6ff,#f8fafc);border:1px solid #dbeafe;border-radius:18px;padding:16px}
.btn.danger,.danger{background:#dc2626!important;color:#fff!important}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
input,select,textarea{max-width:100%}
.form-grid{align-items:end}
@media(max-width:820px){
  .main{padding:10px!important}.topbar{position:sticky;top:0;z-index:20;box-shadow:0 4px 18px rgba(0,0,0,.08)}
  .form-grid,.grid,.grid.two,.portal-grid{grid-template-columns:1fr!important}
  .col-3,.col-4,.col-6,.col-8,.col-9{grid-column:span 1!important;width:100%!important}
  .card{border-radius:16px;padding:14px!important}.stat strong{font-size:24px!important}
  table{min-width:680px}.login-card{width:min(94vw,420px)}
  .btn{width:auto;min-height:42px}.action-stack form,.brand-form,.plan-form{display:block!important}
}
@media print{.sidebar,.topbar,.no-print,.btn{display:none!important}.main{margin:0!important;padding:0!important}.card{box-shadow:none!important;border:0!important}.table-wrap{overflow:visible!important}table{min-width:0!important}}


/* V12.1 Security + Interactive Login Theme */
.auth-page{min-height:100vh;background:radial-gradient(circle at 12% 18%,rgba(34,211,238,.34),transparent 28%),radial-gradient(circle at 88% 20%,rgba(168,85,247,.28),transparent 30%),linear-gradient(135deg,#0f172a 0%,#1e3a8a 48%,#0f766e 100%);display:flex;align-items:center;justify-content:center;padding:22px;color:#0f172a;overflow:auto}.portal-auth-page{background:radial-gradient(circle at 8% 14%,rgba(252,211,77,.32),transparent 26%),radial-gradient(circle at 85% 15%,rgba(96,165,250,.30),transparent 28%),linear-gradient(135deg,#082f49,#1d4ed8,#7c3aed)}.auth-shell{width:min(1120px,100%);display:grid;grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr);gap:22px;align-items:center}.auth-info{color:#fff;padding:26px}.auth-info h1{font-size:clamp(34px,6vw,64px);line-height:1.02;margin:14px 0}.auth-info p{font-size:18px;line-height:1.65;color:#dbeafe;max-width:680px}.auth-badge{display:inline-flex;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.30);backdrop-filter:blur(10px);border-radius:999px;padding:10px 14px;font-weight:800}.auth-feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px;max-width:520px}.auth-feature-grid div{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.22);border-radius:16px;padding:13px 15px;color:#fff;font-weight:700}.auth-card{background:rgba(255,255,255,.94);backdrop-filter:blur(18px);box-shadow:0 28px 80px rgba(2,6,23,.35);border:1px solid rgba(255,255,255,.65);border-radius:28px;padding:28px}.auth-card h2{margin:0 0 4px;font-size:30px;color:#0f172a}.auth-card p{color:#64748b}.auth-card label{display:block;margin:13px 0 6px;font-weight:800;color:#334155}.auth-card input,.auth-card select,.auth-card textarea{width:100%;border:1px solid #cbd5e1;border-radius:14px;padding:12px 13px;background:#fff;outline:none}.auth-card input:focus,.auth-card textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(37,99,235,.12)}.password-wrap{display:flex;gap:8px}.password-wrap input{flex:1}.password-wrap button{border:0;border-radius:12px;background:#e0f2fe;color:#075985;padding:0 13px;font-weight:800}.login-security-box{margin-top:16px;border:1px solid #dbeafe;background:linear-gradient(135deg,#eff6ff,#f0fdf4);border-radius:18px;padding:14px}.captcha-row{display:grid;grid-template-columns:auto minmax(120px,1fr);gap:10px;align-items:center}.captcha-question{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:12px;background:#0f172a;color:#fff;font-weight:900;letter-spacing:.04em}.terms-check{display:flex!important;gap:10px;align-items:flex-start;font-weight:700!important}.terms-check input{width:20px!important;min-width:20px;height:20px;margin-top:2px}.terms-viewbox{max-height:130px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:14px;padding:12px;font-size:13px;line-height:1.55;color:#334155}.auth-submit{width:100%;min-height:50px;margin-top:16px;font-size:16px;border-radius:15px}.auth-link{text-align:center}.auth-small{text-align:center;font-size:12px}.auth-logo{display:block;margin:0 auto 12px;max-width:92px;max-height:92px;border-radius:20px}.school-branded-auth{background:radial-gradient(circle at 14% 16%,color-mix(in srgb,var(--primary) 40%,white),transparent 28%),linear-gradient(135deg,#0f172a,var(--primary),#111827)}.portal-learning-hero{background:linear-gradient(135deg,#dbeafe,#dcfce7,#fef3c7)!important}.portal-help-card{background:linear-gradient(135deg,#fff7ed,#eff6ff)!important}.support-status-open{color:#15803d}.support-status-closed{color:#64748b}
@media(max-width:900px){.auth-shell{grid-template-columns:1fr}.auth-info{padding:8px}.auth-info h1{font-size:36px}.auth-info p{font-size:15px}.auth-feature-grid{grid-template-columns:1fr 1fr}.auth-card{padding:20px;border-radius:22px}.captcha-row{grid-template-columns:1fr}.auth-page{align-items:flex-start}}
@media(max-width:520px){.auth-feature-grid{grid-template-columns:1fr}.auth-card h2{font-size:24px}.terms-viewbox{max-height:110px}.auth-page{padding:12px}.auth-card{padding:16px}}


/* ===== v12.2 UI Polish: professional login, small checkboxes, multicolor school dashboard ===== */
html,body{max-width:100%;overflow-x:hidden}
input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;padding:0!important;margin:0 8px 0 0!important;border-radius:5px!important;display:inline-block!important;vertical-align:middle;accent-color:#0f766e}
.card input[type="checkbox"],.auth-card input[type="checkbox"],.inline-check input[type="checkbox"],.terms-check input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;padding:0!important;margin:2px 8px 0 0!important;flex:0 0 18px!important}
.inline-check,.terms-check{display:flex!important;align-items:flex-start!important;gap:8px!important;line-height:1.35!important}
.card .inline-check{min-height:auto!important;margin:6px 0!important}

.auth-page{min-height:100vh;width:100%;padding:clamp(16px,3vw,34px);display:grid!important;place-items:center!important;overflow-x:hidden!important;background-size:cover;color:#0f172a}
.auth-shell{width:min(1040px,calc(100vw - 32px))!important;max-width:1040px!important;margin:0 auto!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(360px,430px)!important;gap:24px!important;align-items:center!important}
.auth-info{padding:24px!important;border-radius:28px;background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.06));border:1px solid rgba(255,255,255,.20);box-shadow:0 24px 70px rgba(2,6,23,.20)}
.auth-info h1{font-size:clamp(32px,4.8vw,56px)!important;margin:14px 0 10px!important;letter-spacing:-.03em}.auth-info p{font-size:16px!important;line-height:1.55!important;margin:0!important}.auth-card{width:100%!important;max-width:430px!important;margin:0 auto!important;border-radius:30px!important;padding:28px!important;position:relative;overflow:hidden}.auth-card:before{content:"";position:absolute;inset:0 0 auto 0;height:7px;background:linear-gradient(90deg,#0f766e,#2563eb,#7c3aed,#f97316)}.auth-card h2{font-size:28px!important;letter-spacing:-.02em}.auth-card input,.auth-card select,.auth-card textarea{min-height:48px;font-size:16px!important;border-radius:15px!important;background:#fff!important}.password-wrap{display:grid!important;grid-template-columns:1fr auto!important;align-items:stretch!important}.password-wrap button{min-width:66px;border-radius:14px!important}.login-security-box{margin-top:18px!important;padding:14px!important;border-radius:20px!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}.captcha-row{grid-template-columns:105px 1fr!important}.captcha-question{min-height:46px!important}.terms-viewbox{font-size:12.5px!important;max-height:118px!important}.auth-submit{background:linear-gradient(135deg,#0f766e,#2563eb)!important;box-shadow:0 12px 28px rgba(37,99,235,.24)}.auth-submit:hover{filter:brightness(1.05);transform:translateY(-1px)}.auth-link a{color:#2563eb;font-weight:800}.portal-auth-page .auth-submit{background:linear-gradient(135deg,#7c3aed,#2563eb,#0f766e)!important}.portal-auth-page .auth-card:before{background:linear-gradient(90deg,#7c3aed,#2563eb,#06b6d4,#22c55e)}

.school-user-ui{background:linear-gradient(135deg,#f8fafc,#eff6ff 45%,#ecfeff)}.school-user-ui .sidebar{background:linear-gradient(180deg,#06162f 0%,#0f172a 38%,#083344 100%)}.school-user-ui .brand{background:linear-gradient(135deg,rgba(45,212,191,.16),rgba(96,165,250,.12));border-bottom-color:rgba(255,255,255,.14)}.school-user-ui .sidebar a:hover,.school-user-ui .sidebar a.active{background:linear-gradient(135deg,rgba(20,184,166,.28),rgba(37,99,235,.22));box-shadow:inset 4px 0 0 #22d3ee}.school-user-ui .topbar{background:linear-gradient(135deg,#ffffff,#eff6ff 48%,#ecfeff);border:1px solid rgba(125,211,252,.35)}.school-user-ui .topbar h1{background:linear-gradient(135deg,#0f172a,#0f766e,#2563eb);-webkit-background-clip:text;background-clip:text;color:transparent}.school-user-ui .card{border-color:#dbeafe}.school-user-ui .btn{background:linear-gradient(135deg,#0f766e,#14b8a6)}.school-user-ui .btn.secondary{background:linear-gradient(135deg,#e2e8f0,#dbeafe);color:#0f172a}.school-user-ui .btn.warning{background:linear-gradient(135deg,#f59e0b,#ea580c)}.school-user-ui .btn.danger{background:linear-gradient(135deg,#ef4444,#b91c1c)}
.dashboard-hero{margin-bottom:18px;padding:24px;border-radius:24px;background:linear-gradient(135deg,#0f766e,#2563eb 54%,#7c3aed);color:#fff;box-shadow:0 24px 70px rgba(37,99,235,.22);position:relative;overflow:hidden}.dashboard-hero:after{content:"";position:absolute;right:-80px;top:-80px;width:230px;height:230px;background:rgba(255,255,255,.13);border-radius:999px}.dashboard-hero h2{margin:0 0 8px;font-size:28px}.dashboard-hero p{margin:0;color:#dbeafe}.dashboard-hero .hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.dashboard-hero .hero-actions a{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28);color:#fff;text-decoration:none;padding:10px 13px;border-radius:14px;font-weight:800}.stat{position:relative;overflow:hidden;min-height:118px}.stat:after{content:"";position:absolute;right:-24px;top:-24px;width:92px;height:92px;border-radius:999px;background:rgba(255,255,255,.30)}.stat strong,.stat span{position:relative;z-index:1}.stat.stat-blue{background:linear-gradient(135deg,#eff6ff,#bfdbfe);border-color:#bfdbfe}.stat.stat-green{background:linear-gradient(135deg,#ecfdf5,#bbf7d0);border-color:#bbf7d0}.stat.stat-purple{background:linear-gradient(135deg,#f5f3ff,#ddd6fe);border-color:#ddd6fe}.stat.stat-orange{background:linear-gradient(135deg,#fff7ed,#fed7aa);border-color:#fed7aa}.stat.stat-pink{background:linear-gradient(135deg,#fdf2f8,#fbcfe8);border-color:#fbcfe8}.stat.stat-cyan{background:linear-gradient(135deg,#ecfeff,#a5f3fc);border-color:#a5f3fc}.stat.stat-red{background:linear-gradient(135deg,#fef2f2,#fecaca);border-color:#fecaca}.stat.stat-slate{background:linear-gradient(135deg,#f8fafc,#e2e8f0);border-color:#cbd5e1}.quick-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.quick-action-grid .btn{width:100%;justify-content:center;min-height:48px}
@media(max-width:980px){.auth-shell{grid-template-columns:1fr!important;width:min(560px,calc(100vw - 24px))!important}.auth-info{text-align:left}.auth-feature-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.auth-card{max-width:560px!important}.captcha-row{grid-template-columns:1fr!important}}
@media(max-width:560px){.auth-page{padding:12px!important;place-items:start center!important}.auth-shell{width:100%!important;gap:14px!important}.auth-info{padding:18px!important;border-radius:22px!important}.auth-info h1{font-size:30px!important}.auth-feature-grid{grid-template-columns:1fr!important;gap:8px!important}.auth-card{padding:20px!important;border-radius:24px!important}.auth-card h2{font-size:24px!important}.dashboard-hero{padding:18px;border-radius:18px}.dashboard-hero h2{font-size:22px}.quick-action-grid{grid-template-columns:1fr}.terms-viewbox{max-height:105px!important}}
/* v12.2 final checkbox override after auth input rules */
input[type="checkbox"],.auth-card input[type="checkbox"],.card input[type="checkbox"],.terms-check input[type="checkbox"],.inline-check input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;min-height:18px!important;max-height:18px!important;padding:0!important;line-height:18px!important;border-radius:5px!important;appearance:auto!important;-webkit-appearance:checkbox!important;background-color:initial!important}

/* ===== v12.3 APPAR + Certificate + Fee/Exam layout polish ===== */
.certificate-layout .create-certificate-card{grid-column:span 12!important}.certificate-form{grid-template-columns:repeat(12,minmax(0,1fr));align-items:end}.certificate-form .field{grid-column:span 3}.certificate-form .field.full{grid-column:span 12}.certificate-form textarea{min-height:92px}.fee-setup-grid{grid-template-columns:repeat(12,1fr)}.fee-setup-grid .fee-structure-card{grid-column:span 8}.fee-setup-grid .fee-heads-card{grid-column:span 4}.fee-heads-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fee-heads-card .field{grid-column:span 1}.fee-heads-card .field.full{grid-column:span 2}.marks-table input{min-width:120px}.print-doc table th{width:auto}.doc-action-row{display:flex;gap:8px;flex-wrap:wrap}.appar-highlight{font-weight:800;color:#0f766e}
@media(max-width:1200px){.fee-setup-grid .fee-structure-card,.fee-setup-grid .fee-heads-card{grid-column:span 12}.fee-heads-card .form-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.fee-heads-card .field{grid-column:span 2}.fee-heads-card .field.full{grid-column:span 4}.certificate-form .field{grid-column:span 4}}
@media(max-width:900px){.certificate-form .field,.certificate-form .field.full{grid-column:span 12}.fee-heads-card .form-grid{grid-template-columns:1fr}.fee-heads-card .field,.fee-heads-card .field.full{grid-column:span 1}}
@media print{.appar-highlight{color:#000!important}.certificate-form,.fee-setup-grid{display:block}}

/* v12.5 Step-by-step Terms + Consent UI */
.terms-step-card{margin-top:14px;padding:14px;border:1px solid rgba(15,118,110,.18);border-radius:18px;background:linear-gradient(180deg,#ffffff,#f8fffd)}
.terms-stepper{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:4px 0 12px}
.terms-step{display:flex;align-items:center;gap:8px;padding:8px;border-radius:14px;background:#eefdf8;border:1px solid #ccefe7;font-size:12px;color:#0f172a}
.terms-step span{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;min-width:22px;border-radius:50%;background:#0f766e;color:#fff;font-weight:800}
.terms-step b{display:block}.terms-step small{display:block;color:#64748b;font-size:10px;line-height:1.1}
.terms-mini-consent{font-size:13px;line-height:1.45;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:12px;padding:9px 11px;margin:10px 0}
.terms-action-row{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}.mini-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px 11px;border-radius:10px;background:#e2e8f0;color:#0f172a;text-decoration:none;border:0;font-size:12px;font-weight:700;cursor:pointer}.mini-btn:hover,.mini-btn.active{background:#0f766e;color:#fff}.terms-scrollbox{max-height:230px;overflow:auto;border:1px solid #dbe5ef;background:#fff;border-radius:14px;padding:12px;font-size:13px;line-height:1.55}.compact-check{display:flex!important;align-items:flex-start;gap:8px;font-size:13px;line-height:1.35;margin-top:10px}.compact-check input[type="checkbox"],.terms-check input[type="checkbox"]{width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;accent-color:#0f766e;margin-top:1px}.v12-terms-intro{background:linear-gradient(135deg,#ecfeff,#fef3c7)}.terms-category-tabs{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.terms-manager-grid textarea{font-family:inherit;line-height:1.55}.nice-steps{padding-left:20px;line-height:1.8}.terms-manager-grid .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.terms-manager-grid .col-12{grid-column:1/-1}@media(max-width:760px){.terms-stepper{grid-template-columns:1fr}.terms-manager-grid .form-grid{grid-template-columns:1fr}.terms-scrollbox{max-height:190px}.terms-action-row .mini-btn{width:100%}}

/* v12.6 Login Popup + Process Feedback Modal */
.ems-center-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:18px;animation:emsFadeIn .18s ease-out both}.ems-center-modal.always-show{display:grid}.ems-center-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.56);backdrop-filter:blur(5px)}.ems-center-modal-card{position:relative;width:min(620px,94vw);max-height:88vh;overflow:auto;background:linear-gradient(135deg,#ffffff,#f8fafc,#ecfeff);border:1px solid rgba(148,163,184,.5);box-shadow:0 30px 90px rgba(15,23,42,.32);border-radius:26px;padding:22px}.ems-login-popup-card{width:min(720px,95vw)}.ems-center-modal-head{display:flex;gap:12px;align-items:center;margin-bottom:14px}.ems-center-modal-head h2{margin:0;font-size:24px}.ems-center-modal-head p{margin:2px 0 0;color:#64748b}.ems-modal-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:16px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;font-size:24px;box-shadow:0 10px 24px rgba(37,99,235,.25)}.ems-popup-message-list{display:grid;gap:14px}.ems-popup-message-item{padding:14px;border-radius:18px;background:#fff;border:1px solid #e5e7eb}.ems-popup-message-item h3{margin:0 0 10px}.ems-popup-text{white-space:normal;line-height:1.65;color:#0f172a;background:#fff;border:1px solid #e5e7eb;border-radius:18px;padding:14px;margin:10px 0}.ems-popup-media{display:block;max-width:100%;max-height:310px;object-fit:contain;margin:10px auto;border-radius:18px;border:1px solid #e5e7eb;background:#fff}.ems-continue-btn{width:100%;justify-content:center;margin-top:16px;font-size:16px;padding:13px 18px;background:linear-gradient(135deg,#0f766e,#2563eb)}.ems-hidden{opacity:0;pointer-events:none;transform:scale(.985);transition:.22s}.inline-check{display:flex;align-items:center;gap:10px}.inline-check input[type=checkbox]{width:18px!important;height:18px!important;min-width:18px!important;accent-color:#0f766e}.popup-message-form textarea{min-height:150px}.step-list li{margin:8px 0;line-height:1.5}.process-failed-page{min-height:100vh;background:linear-gradient(135deg,#eff6ff,#ecfeff,#f8fafc)}@keyframes emsFadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@media(max-width:520px){.ems-center-modal-card{border-radius:20px;padding:16px}.ems-center-modal-head h2{font-size:20px}.ems-modal-icon{width:42px;height:42px}.ems-popup-text{font-size:14px}.ems-popup-media{max-height:240px}}


/* v12.6.1 desktop login polish + modal close fix */
body.ems-modal-open{overflow:hidden}
.auth-page{align-items:center!important}
.auth-shell{grid-template-columns:minmax(320px,1fr) minmax(460px,560px)!important;align-items:start!important;gap:32px!important}
.auth-info{position:sticky;top:24px;align-self:start}
.auth-feature-grid{max-width:620px!important}
.auth-card{max-width:560px!important;width:min(560px,100%)!important}
.auth-card p{line-height:1.45}
.login-security-box{display:grid;gap:12px}
.terms-stepper{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px!important}
.terms-step{display:grid;grid-template-columns:26px 1fr;align-items:start;column-gap:8px;padding:10px 12px!important;min-height:68px}
.terms-step span{grid-row:1 / span 2}
.terms-step b,.terms-step small{display:block;line-height:1.2}
.terms-step b{margin-top:2px}
.terms-step small{margin-top:2px;font-size:11px!important}
.captcha-row{grid-template-columns:130px 1fr!important;gap:12px!important}
.terms-action-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.terms-action-row .mini-btn{min-height:40px;text-align:center}
.terms-viewbox,.terms-scrollbox{height:220px;max-height:220px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:14px!important;background:#fff;border:1px solid #d7e0ea!important;box-shadow:inset 0 1px 2px rgba(15,23,42,.03)}
.terms-viewbox b{display:block;margin-bottom:8px}
.compact-check{padding:10px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:14px}
.ems-center-modal{z-index:999999!important}
.ems-center-modal-card{overflow:visible}
.ems-login-popup-card{width:min(760px,95vw)!important}
.ems-center-modal-head{justify-content:space-between}
.ems-center-modal-head > div{flex:1;min-width:0}
.ems-modal-close{border:0;background:#e2e8f0;color:#0f172a;width:40px;height:40px;min-width:40px;border-radius:12px;font-size:28px;line-height:1;cursor:pointer;display:inline-grid;place-items:center}
.ems-modal-close:hover{background:#cbd5e1}
@media (max-width:1180px){.auth-shell{grid-template-columns:minmax(280px,1fr) minmax(420px,520px)!important}}
@media (max-width:980px){.auth-info{position:relative;top:auto}.auth-shell{grid-template-columns:1fr!important;gap:18px!important}.auth-card{max-width:100%!important}.terms-action-row{grid-template-columns:1fr}.captcha-row{grid-template-columns:1fr!important}.terms-viewbox,.terms-scrollbox{height:180px;max-height:180px!important}}

/* ===== v12.7 Premium UI, Dashboard Polish, Responsive Modules, All Print Center ===== */
:root{--ems-blue:#2563eb;--ems-cyan:#06b6d4;--ems-violet:#7c3aed;--ems-orange:#f97316;--ems-green:#0f766e;--ems-soft:#f8fafc}
.auth-illustration-card{margin-top:22px;display:flex;gap:16px;align-items:center;padding:18px;border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.20),rgba(255,255,255,.08));border:1px solid rgba(255,255,255,.25);box-shadow:0 18px 45px rgba(2,6,23,.18);color:#fff}.auth-illustration-logo{width:72px;height:72px;min-width:72px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(135deg,#fff,#dbeafe);color:#0f172a;font-weight:950;font-size:20px;box-shadow:0 12px 30px rgba(15,23,42,.22)}.auth-illustration-card b{display:block;font-size:20px;margin-bottom:6px}.auth-illustration-card span{display:block;color:#e0f2fe;line-height:1.45}.portal-auth-page .auth-illustration-logo{background:linear-gradient(135deg,#fef3c7,#dbeafe);font-size:30px}
.ems-center-modal-backdrop{background:radial-gradient(circle at top left,rgba(20,184,166,.35),transparent 28%),radial-gradient(circle at bottom right,rgba(124,58,237,.28),transparent 34%),rgba(2,6,23,.64)!important}.ems-center-modal-card{background:linear-gradient(135deg,#ffffff 0%,#f8fafc 48%,#ecfeff 100%)!important;border:1px solid rgba(255,255,255,.72)!important;box-shadow:0 35px 110px rgba(2,6,23,.42)!important}.ems-login-popup-card:before{content:"";position:absolute;inset:0 0 auto 0;height:8px;background:linear-gradient(90deg,#0f766e,#06b6d4,#2563eb,#7c3aed,#f97316);border-radius:26px 26px 0 0}.ems-popup-message-item{background:linear-gradient(135deg,#fff,#f8fafc)!important;box-shadow:0 14px 38px rgba(15,23,42,.08)}.ems-popup-media{max-height:340px!important;box-shadow:0 16px 45px rgba(15,23,42,.13)}.ems-continue-btn{background:linear-gradient(135deg,#0f766e,#14b8a6,#2563eb)!important;box-shadow:0 14px 34px rgba(20,184,166,.24)}
.school-user-ui .main{background:radial-gradient(circle at 16% 0,rgba(20,184,166,.08),transparent 25%),radial-gradient(circle at 88% 8%,rgba(37,99,235,.09),transparent 28%)}.dashboard-hero{display:grid;gap:10px;border:1px solid rgba(255,255,255,.36)}.dashboard-insight-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:18px}.dashboard-insight-strip>div{padding:16px;border-radius:20px;background:linear-gradient(135deg,#ffffff,#eff6ff);border:1px solid #dbeafe;box-shadow:0 12px 30px rgba(15,23,42,.06)}.dashboard-insight-strip b{display:block;font-size:15px;margin-bottom:4px}.dashboard-insight-strip span{display:block;color:#64748b;font-size:13px;line-height:1.45}.dashboard-stat-grid{align-items:stretch}.dashboard-stat-grid .stat{box-shadow:0 15px 38px rgba(15,23,42,.08);transition:transform .18s ease,box-shadow .18s ease}.dashboard-stat-grid .stat:hover{transform:translateY(-3px);box-shadow:0 22px 55px rgba(15,23,42,.12)}.quick-action-grid .btn{box-shadow:0 10px 24px rgba(15,23,42,.08)}
.table-wrap{max-width:100%;scrollbar-width:thin}.card{overflow:hidden}.form-grid.compact-grid{align-items:end}select,input,textarea,button{max-width:100%}.tabs{overflow:auto;padding-bottom:4px}.tabs a{white-space:nowrap}.action-stack{display:flex;gap:6px;flex-wrap:wrap}.action-stack form{display:inline-flex!important}.toolbar h2{margin:0}.print-center-filter{background:linear-gradient(135deg,#fff,#eff6ff,#ecfeff)}.print-center-actions{align-items:end}.print-center-actions .field{min-width:180px}.bulk-id-card table th,.bulk-id-card table td{padding:6px 8px;white-space:normal}.compact-print-table{margin-bottom:14px}.compact-print-table th{width:15%}.compact-print-table td{width:35%}
@media(max-width:1100px){.dashboard-insight-strip{grid-template-columns:1fr}.print-center-actions .field{min-width:220px}.col-3{grid-column:span 6}.col-6{grid-column:span 12}}
@media(max-width:760px){.dashboard-insight-strip{grid-template-columns:1fr}.auth-illustration-card{padding:14px;border-radius:18px}.auth-illustration-logo{width:54px;height:54px;min-width:54px;border-radius:18px;font-size:16px}.auth-illustration-card b{font-size:16px}.auth-illustration-card span{font-size:13px}.card .toolbar{display:grid;gap:10px}.search-row{display:grid;grid-template-columns:1fr;gap:10px}.search-row input,.search-row select{width:100%!important}.print-center-actions{display:grid!important;grid-template-columns:1fr!important}.print-center-actions .field{min-width:0!important}.bulk-id-grid{grid-template-columns:1fr!important}}
@media print{.print-center-filter,.no-print,.auth-illustration-card{display:none!important}.print-bulk-doc{page-break-after:always}.print-bulk-doc:last-child{page-break-after:auto}.compact-print-table th,.compact-print-table td{white-space:normal!important}.bulk-id-grid{grid-template-columns:repeat(2,1fr)!important}.bulk-id-card{break-inside:avoid;page-break-inside:avoid}.dashboard-insight-strip{display:none!important}}


/* v12.9 Class-wise Live Chat + Advanced Security UI */
.chat-hero{background:linear-gradient(135deg,#0f172a,#2563eb 45%,#7c3aed 78%,#ec4899)!important}
.chat-layout{align-items:start}.chat-room-card{position:sticky;top:18px}.chat-room-info{padding:14px;border-radius:16px;background:linear-gradient(135deg,#eff6ff,#ecfeff);border:1px solid #bfdbfe;margin:12px 0;line-height:1.7}.chat-main-card{min-height:680px}.chat-box{height:520px;overflow:auto;padding:16px;border:1px solid #dbeafe;background:linear-gradient(180deg,#f8fafc,#eff6ff);border-radius:20px;display:flex;flex-direction:column;gap:12px}.chat-msg{max-width:78%;padding:12px 14px;border-radius:18px;background:#fff;border:1px solid #e2e8f0;box-shadow:0 10px 28px rgba(15,23,42,.06)}.chat-msg.school{align-self:flex-start;border-top-left-radius:6px;background:linear-gradient(135deg,#ffffff,#ecfeff)}.chat-msg.portal{align-self:flex-end;border-top-right-radius:6px;background:linear-gradient(135deg,#eff6ff,#ffffff)}.chat-msg.pinned{border-color:#f59e0b;background:linear-gradient(135deg,#fff7ed,#ffffff)}.chat-meta{font-size:12px;color:#64748b;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.chat-meta b{font-size:13px;color:#0f172a}.chat-text{margin:8px 0;line-height:1.55;white-space:pre-wrap}.chat-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.chat-actions form{display:inline}.chat-send-form{margin-top:14px;border-top:1px solid #dbeafe;padding-top:14px}.chat-send-form textarea{min-height:90px;border-radius:18px}.chat-check-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.security-grid .stat{min-height:110px}.security-note{background:linear-gradient(135deg,#ecfeff,#eff6ff,#fefce8);border:1px solid #bae6fd;border-radius:18px;padding:14px;line-height:1.7}.portal-page .chat-box{height:560px}.portal-page .chat-msg{max-width:88%}
@media(max-width:1000px){.chat-room-card{position:relative;top:auto}.chat-msg{max-width:92%}.chat-check-grid{grid-template-columns:1fr 1fr}.chat-box{height:460px}.chat-main-card{min-height:auto}}
@media(max-width:560px){.chat-box{height:430px;padding:10px;border-radius:16px}.chat-msg{max-width:96%;padding:10px 12px}.chat-check-grid{grid-template-columns:1fr}.chat-send-form .field,.chat-send-form .field.half{grid-column:span 12}.portal-page .chat-box{height:460px}}


/* v12.10 Desktop layout, grouped menu, modern ID card, plan UI */
.col-1{grid-column:span 1}.col-2{grid-column:span 2}.col-5{grid-column:span 5}.col-7{grid-column:span 7}.col-9{grid-column:span 9}.col-10{grid-column:span 10}.col-11{grid-column:span 11}
@media(max-width:900px){.col-1,.col-2,.col-5,.col-7,.col-9,.col-10,.col-11{grid-column:span 6}}
@media(max-width:560px){.col-1,.col-2,.col-5,.col-7,.col-9,.col-10,.col-11{grid-column:span 1}}
.sidebar nav{padding:12px 10px 22px}.nav-group{margin:8px 0;border-radius:16px;background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.08);overflow:hidden}.nav-group summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;color:#f8fafc;font-weight:900;font-size:14px;letter-spacing:.01em}.nav-group summary::-webkit-details-marker{display:none}.nav-group summary:after{content:'▾';transition:.2s;color:#93c5fd}.nav-group:not([open]) summary:after{transform:rotate(-90deg)}.nav-group .nav-sub{padding:0 8px 8px}.nav-group .nav-sub a{font-size:14px;margin:3px 0;padding:10px 11px;border-radius:12px}.nav-divider{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#93c5fd;margin:12px 12px 6px}.sidebar-mini-note{margin:8px 12px;padding:9px 10px;border-radius:12px;background:rgba(45,212,191,.10);font-size:12px;color:#cbd5e1;line-height:1.35}
.card{min-width:0}.grid>.card{min-width:0}.form-grid label.field,.form-grid .field{min-width:0}.search-row>*{min-width:0}.table-wrap{max-width:100%}
.settings-page .grid,.classes-page .grid{align-items:start}.settings-page .card,.classes-page .card{width:100%}
.modern-id .id-card{border:0;border-radius:18px;min-height:250px;background:linear-gradient(145deg,#ffffff 0%,#eff6ff 48%,#ecfeff 100%);box-shadow:0 16px 38px rgba(15,23,42,.18);padding:0;overflow:hidden;position:relative}.modern-id .id-card:before{content:'';position:absolute;inset:0 0 auto 0;height:74px;background:linear-gradient(135deg,#0f766e,#2563eb,#7c3aed)}.modern-id .id-card:after{content:'';position:absolute;right:-34px;bottom:-34px;width:110px;height:110px;border-radius:999px;background:rgba(20,184,166,.18)}.modern-id .id-head{position:relative;z-index:2;color:#fff;border-bottom:0;margin:0;padding:12px 12px 10px;grid-template-columns:48px 1fr 54px}.modern-id .id-head h3{font-size:14px;color:#fff}.modern-id .id-head p{color:#e0f2fe}.modern-id .id-logo img,.modern-id .id-qr{background:#fff;border-radius:12px;padding:3px}.modern-id .id-content{position:relative;z-index:2;margin:14px 12px 0;background:rgba(255,255,255,.92);border:1px solid #dbeafe;border-radius:16px;padding:10px;align-items:center}.modern-id .avatar{width:82px;height:92px;border-radius:14px;border:3px solid #fff;box-shadow:0 8px 20px rgba(15,23,42,.18)}.modern-id .id-footer{position:relative;z-index:2;display:flex;align-items:end;justify-content:space-between;gap:8px;margin:8px 12px 12px;font-size:11px}.modern-id .id-footer .sign{min-width:90px;text-align:center}.modern-id .id-footer img{max-width:76px;max-height:28px;object-fit:contain}.plan-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.plan-card{border-radius:22px;padding:20px;border:1px solid #dbeafe;background:linear-gradient(135deg,#fff,#eff6ff);box-shadow:0 18px 46px rgba(15,23,42,.10);position:relative;overflow:hidden}.plan-card:nth-child(2){background:linear-gradient(135deg,#fff,#ecfdf5)}.plan-card:nth-child(3){background:linear-gradient(135deg,#fff,#f5f3ff)}.plan-card h3{margin:0 0 8px;font-size:24px}.plan-price{font-size:26px;font-weight:900;color:#0f766e;margin:8px 0}.module-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.module-pill{border:1px solid #dbeafe;background:#fff;border-radius:14px;padding:10px;font-weight:700}.module-pill input{margin-right:8px}.inactive-plan-warning{background:#fff7ed!important;border-color:#fed7aa!important;color:#7c2d12!important}.live-class-students{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.student-chip{padding:10px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;font-weight:700}.portal-cred-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:14px}.cred-card{padding:14px;border-radius:18px;background:linear-gradient(135deg,#fff,#eff6ff);border:1px solid #dbeafe}.cred-card code{display:inline-block;background:#0f172a;color:#fff;padding:3px 7px;border-radius:8px;margin:2px 0}
@media(max-width:1100px){.plan-card-grid{grid-template-columns:1fr}.module-check-grid{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}}
@media print{.modern-id .id-card{-webkit-print-color-adjust:exact;print-color-adjust:exact;box-shadow:none}.modern-id .id-card:before,.modern-id .id-card:after{-webkit-print-color-adjust:exact;print-color-adjust:exact}}


/* Presentation-ready login polish */
.auth-shell{grid-template-columns:minmax(0,1.05fr) minmax(390px,.95fr)!important;gap:28px!important}
.auth-info{padding:34px!important}
.auth-feature-grid-strong div{min-height:62px;display:flex;align-items:center}
.auth-welcome-panel{background:linear-gradient(135deg,rgba(255,255,255,.20),rgba(191,219,254,.14))!important}
.auth-card-intro{margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #e2e8f0}
.auth-card-kicker{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:linear-gradient(135deg,#dcfce7,#dbeafe);color:#0f172a;font-weight:800;font-size:12px;letter-spacing:.02em}
.login-card{max-width:470px!important}
.login-card label{font-size:13px;letter-spacing:.01em}
.login-card .alert{margin:12px 0}
.terms-highlight-box{margin-top:12px;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#ecfeff,#f8fafc);border:1px solid #cfe8ff;color:#0f172a;font-size:13px;line-height:1.5}
.terms-accordion{margin-top:10px;border:1px solid #dbeafe;border-radius:16px;background:#fff;overflow:hidden}
.terms-accordion summary{list-style:none;cursor:pointer;padding:12px 14px;font-weight:800;color:#0f172a;background:linear-gradient(135deg,#f8fafc,#eff6ff);position:relative}
.terms-accordion summary::-webkit-details-marker{display:none}
.terms-accordion summary:after{content:"+";position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:20px;color:#0f766e}
.terms-accordion[open] summary:after{content:"−"}
.terms-accordion .terms-action-row{padding:10px 12px 0}
.terms-accordion .terms-scrollbox{margin:10px 12px 12px;max-height:170px!important}
.auth-card .terms-check{margin-top:12px!important}
.auth-card .mini-btn{font-size:12px}
@media (min-width:901px){
  .auth-page{padding:28px!important}
  .auth-shell{min-height:calc(100vh - 56px);align-items:center!important}
}
@media (max-width:900px){
  .auth-shell{grid-template-columns:1fr!important;gap:18px!important}
  .auth-info{order:1!important;padding:20px!important}
  .login-card{order:2!important;max-width:100%!important}
}
@media (max-width:560px){
  .auth-badge{font-size:12px!important;padding:8px 12px!important}
  .auth-card-intro{margin-bottom:6px}
  .captcha-row{grid-template-columns:1fr!important}
  .terms-stepper{grid-template-columns:1fr!important}
  .terms-step{min-height:auto!important}
  .terms-accordion .terms-scrollbox{max-height:140px!important}
  .auth-submit{min-height:48px!important}
}


/* v12.10.2 Super Admin Welcome Theme */
.super-auth-page{background:radial-gradient(circle at 15% 18%,rgba(251,191,36,.32),transparent 28%),radial-gradient(circle at 86% 16%,rgba(59,130,246,.34),transparent 30%),linear-gradient(135deg,#020617 0%,#172554 48%,#581c87 100%)!important}
.super-auth-info h1{background:linear-gradient(135deg,#ffffff,#fef3c7,#bfdbfe);-webkit-background-clip:text;background-clip:text;color:transparent}
.super-auth-page .auth-card:before{background:linear-gradient(90deg,#f59e0b,#2563eb,#7c3aed,#14b8a6)!important}
.super-auth-page .auth-submit{background:linear-gradient(135deg,#f59e0b,#2563eb,#7c3aed)!important;box-shadow:0 14px 34px rgba(37,99,235,.30)}
.super-auth-page .auth-card-kicker{background:linear-gradient(135deg,#fef3c7,#dbeafe)!important;color:#172554!important}
.super-welcome-panel{background:linear-gradient(135deg,rgba(255,255,255,.22),rgba(250,204,21,.14),rgba(59,130,246,.16))!important}
.super-auth-page .auth-illustration-logo{background:linear-gradient(135deg,#fef3c7,#dbeafe,#ddd6fe)!important;color:#172554!important}
.super-login-card{border-color:rgba(250,204,21,.38)!important}
.super-dashboard-hero{margin-bottom:18px;padding:26px;border-radius:26px;background:linear-gradient(135deg,#0f172a,#1d4ed8 48%,#7c3aed);color:#fff;box-shadow:0 28px 80px rgba(37,99,235,.25);display:flex;align-items:center;justify-content:space-between;gap:18px;position:relative;overflow:hidden}
.super-dashboard-hero:after{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;border-radius:999px;background:rgba(255,255,255,.12)}
.super-dashboard-hero>*{position:relative;z-index:1}.super-dashboard-hero h2{margin:10px 0 6px;font-size:30px}.super-dashboard-hero p{margin:0;color:#dbeafe;max-width:760px}.super-hero-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.26);font-weight:800}.super-hero-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.super-hero-actions a{color:#fff;text-decoration:none;padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);font-weight:800;white-space:nowrap}.super-hero-actions a:hover{background:rgba(255,255,255,.25)}
.super-admin-ui .stat{background:linear-gradient(135deg,#fff,#eff6ff,#f5f3ff);border-color:#c7d2fe}.super-admin-ui .card{border-color:#dbeafe}.super-admin-ui .topbar{background:linear-gradient(135deg,#ffffff,#eff6ff,#f5f3ff)}.super-admin-ui .topbar h1{background:linear-gradient(135deg,#0f172a,#2563eb,#7c3aed);-webkit-background-clip:text;background-clip:text;color:transparent}
@media(max-width:900px){.super-dashboard-hero{display:block;padding:20px;border-radius:20px}.super-dashboard-hero h2{font-size:24px}.super-hero-actions{justify-content:flex-start;margin-top:14px}.super-hero-actions a{flex:1;text-align:center}}


/* v12.10.4 admin controlled colorful print theme */
.print-theme-preview{border:3px solid #2563eb;border-image:linear-gradient(135deg,#2563eb,#0f766e,#f97316,#2563eb) 1;border-radius:18px;padding:16px;background:linear-gradient(135deg,#fff,#eff6ff);max-width:760px}.print-theme-preview h3{display:inline-block;margin:0 0 10px;background:linear-gradient(90deg,#2563eb,#0f766e);color:#fff;padding:7px 14px;border-radius:999px}.print-theme-preview table{max-width:520px}.print-theme-preview th{background:#eff6ff!important;color:#0f172a!important}.print-doc,.receipt,.pm-doc{position:relative}.print-doc table th,.receipt table th,.pm-doc table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}.doc-title-under-line,.pm-title,.receipt .head h2{-webkit-print-color-adjust:exact;print-color-adjust:exact}.id-card,.bulk-id-card{-webkit-print-color-adjust:exact;print-color-adjust:exact}@media print{.print-doc,.receipt,.pm-doc{border-radius:0!important}.print-doc:after,.receipt:after,.pm-doc:after{display:block}.print-theme-preview{display:none!important}}

/* v12.10.5 Security + Template Manager UI */
.template-preview-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}.template-preview-card{border:3px solid var(--p,#2563eb);border-image:linear-gradient(135deg,var(--p,#2563eb),var(--a,#0f766e),#f97316,var(--p,#2563eb)) 1;background:linear-gradient(180deg,#fff,var(--bg,#dbeafe));border-radius:18px;padding:14px;min-height:135px;box-shadow:0 12px 30px rgba(15,23,42,.08)}.template-preview-card .tpl-head{background:linear-gradient(135deg,var(--p,#2563eb),var(--a,#0f766e));color:#fff;border-radius:999px;padding:7px 10px;font-weight:900;text-align:center;margin-bottom:10px}.template-preview-card b{display:block;font-size:16px}.template-preview-card span{display:block;color:#475569;font-size:12px;margin:4px 0 12px}.tpl-lines{height:38px;background:repeating-linear-gradient(to bottom,rgba(15,23,42,.12),rgba(15,23,42,.12) 1px,transparent 1px,transparent 10px);border-radius:10px}.v12-safe-update-card{background:linear-gradient(135deg,#ecfeff,#fef3c7,#f8fafc);border-color:#bae6fd}.v12-safe-update-card ol{line-height:1.8}.security-hardening-check{background:linear-gradient(135deg,#f0fdf4,#eff6ff)}


/* v12.10.6 Center Process Feedback Popup: success green / error red */
.ems-process-modal .ems-center-modal-backdrop{background:rgba(15,23,42,.55)!important;backdrop-filter:blur(6px)}
.ems-feedback-card{width:min(560px,94vw)!important;border-radius:28px!important;overflow:hidden!important;padding:0!important;background:#fff!important;border:0!important;box-shadow:0 30px 90px rgba(15,23,42,.35)!important}
.ems-feedback-card .ems-center-modal-head{padding:22px 22px 18px!important;margin:0!important;color:#fff!important;align-items:flex-start!important}
.ems-feedback-card .ems-center-modal-head h2{color:#fff!important;font-size:24px!important;margin:0!important}
.ems-feedback-card .ems-center-modal-head p{color:rgba(255,255,255,.92)!important;margin-top:5px!important;line-height:1.4!important}
.ems-feedback-card .ems-modal-icon{background:rgba(255,255,255,.18)!important;color:#fff!important;box-shadow:none!important;width:52px!important;height:52px!important;border-radius:18px!important;font-size:26px!important}
.ems-feedback-card .ems-modal-close{background:rgba(255,255,255,.18)!important;color:#fff!important;border:1px solid rgba(255,255,255,.22)!important}
.ems-feedback-text{margin:18px!important;font-size:16px!important;line-height:1.65!important;border-radius:18px!important;padding:16px 18px!important;font-weight:700!important}
.ems-feedback-ok{margin:0 18px 18px!important;width:calc(100% - 36px)!important;justify-content:center!important;min-height:48px!important;border-radius:16px!important;font-size:16px!important}
.ems-feedback-success .ems-center-modal-head{background:linear-gradient(135deg,#16a34a,#059669,#0f766e)!important}
.ems-feedback-success .ems-feedback-text{background:#ecfdf5!important;color:#14532d!important;border:1px solid #bbf7d0!important}
.ems-feedback-success .ems-feedback-ok{background:linear-gradient(135deg,#16a34a,#059669)!important;color:#fff!important}
.ems-feedback-error .ems-center-modal-head{background:linear-gradient(135deg,#dc2626,#b91c1c,#7f1d1d)!important}
.ems-feedback-error .ems-feedback-text{background:#fef2f2!important;color:#7f1d1d!important;border:1px solid #fecaca!important}
.ems-feedback-error .ems-feedback-ok{background:linear-gradient(135deg,#dc2626,#991b1b)!important;color:#fff!important}
.ems-feedback-warning .ems-center-modal-head{background:linear-gradient(135deg,#f59e0b,#d97706,#92400e)!important}
.ems-feedback-warning .ems-feedback-text{background:#fffbeb!important;color:#78350f!important;border:1px solid #fde68a!important}
.ems-feedback-warning .ems-feedback-ok{background:linear-gradient(135deg,#f59e0b,#d97706)!important;color:#fff!important}
@media(max-width:560px){.ems-feedback-card .ems-center-modal-head{padding:18px!important}.ems-feedback-card .ems-center-modal-head h2{font-size:20px!important}.ems-feedback-text{font-size:14px!important;margin:14px!important}.ems-feedback-ok{margin:0 14px 14px!important;width:calc(100% - 28px)!important}}


/* v12.10.7 UI cleanup + colorful menu highlight */
.topbar-title{display:grid;gap:2px}
.page-dashboard .topbar-title{display:none}
.page-dashboard .topbar.topbar-dashboard{justify-content:flex-end;padding:12px 18px;margin-bottom:12px}
.merged-dashboard-hero{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.merged-dashboard-hero .hero-kicker{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.28);font-weight:900;width:max-content}
.merged-dashboard-hero h2{margin:0;font-size:34px;line-height:1.08}.merged-dashboard-hero p{font-size:15px}
.compact-page-hero{margin-bottom:16px}
.nav-group.main-group summary{background:linear-gradient(135deg,rgba(34,197,94,.18),rgba(59,130,246,.12));color:#f8fafc}
.nav-group.academic-group summary{background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(6,182,212,.12))}
.nav-group.learning-group summary{background:linear-gradient(135deg,rgba(168,85,247,.18),rgba(244,114,182,.12))}
.nav-group.finance-group summary{background:linear-gradient(135deg,rgba(245,158,11,.18),rgba(249,115,22,.12))}
.nav-group.admin-group summary{background:linear-gradient(135deg,rgba(16,185,129,.18),rgba(6,182,212,.12))}
.nav-group.system-group summary{background:linear-gradient(135deg,rgba(99,102,241,.18),rgba(236,72,153,.12))}
.nav-group.saas-control-group summary{background:linear-gradient(135deg,rgba(250,204,21,.18),rgba(59,130,246,.12))}
.nav-group .nav-sub a{position:relative;padding-left:14px;border:1px solid rgba(255,255,255,.04);transition:.18s ease}
.nav-group .nav-sub a:before{content:'';position:absolute;left:0;top:10px;bottom:10px;width:4px;border-radius:999px;background:rgba(255,255,255,.26)}
.nav-group.main-group .nav-sub a:before{background:linear-gradient(180deg,#22c55e,#38bdf8)}
.nav-group.academic-group .nav-sub a:before{background:linear-gradient(180deg,#2563eb,#06b6d4)}
.nav-group.learning-group .nav-sub a:before{background:linear-gradient(180deg,#7c3aed,#ec4899)}
.nav-group.finance-group .nav-sub a:before{background:linear-gradient(180deg,#f59e0b,#f97316)}
.nav-group.admin-group .nav-sub a:before{background:linear-gradient(180deg,#10b981,#06b6d4)}
.nav-group.system-group .nav-sub a:before{background:linear-gradient(180deg,#6366f1,#ec4899)}
.nav-group.saas-control-group .nav-sub a:before{background:linear-gradient(180deg,#f59e0b,#2563eb)}
.nav-group .nav-sub a:hover,.nav-group .nav-sub a.active{transform:translateX(2px);box-shadow:0 10px 20px rgba(15,23,42,.12)}
.sidebar-mini-note,.dashboard-insight-strip,.v12-safe-update-card,.v12-terms-intro,.recommended-qa-panel,.security-note{display:none!important}
.security-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.security-check-item{padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#f8fafc,#eff6ff);border:1px solid #dbeafe;font-weight:700;color:#0f172a}
.card h2{margin-top:0}
@media(max-width:900px){.page-dashboard .topbar.topbar-dashboard{justify-content:space-between}.merged-dashboard-hero h2{font-size:26px}.security-check-grid{grid-template-columns:1fr}}


/* v12.10.8 UI Polish Pro - desktop + mobile */
:root{
  --ems-radius-xl:26px;
  --ems-radius-lg:20px;
  --ems-soft-border:#dbeafe;
  --ems-focus-ring:0 0 0 4px rgba(37,99,235,.14);
}
body.school-user-ui, body.super-admin-ui{
  background:linear-gradient(135deg,#f8fafc 0%,#eef6ff 42%,#ecfeff 100%);
}
.main{
  min-height:100vh;
  padding:22px;
}
.card{
  border-radius:var(--ems-radius-lg);
  border-color:#e6edf7;
  box-shadow:0 18px 46px rgba(15,23,42,.075);
}
.topbar{
  position:sticky;
  top:14px;
  z-index:10;
  border:1px solid #dbeafe;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(236,254,255,.92));
  backdrop-filter:blur(10px);
}
.userbox a{
  transition:.18s ease;
}
.userbox a:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(153,27,27,.10);
}
.sidebar{
  background:
    radial-gradient(circle at 12% 5%,rgba(45,212,191,.18),transparent 26%),
    linear-gradient(180deg,#071427 0%,#0b2137 52%,#073344 100%);
  box-shadow:10px 0 38px rgba(15,23,42,.16);
}
.brand{
  background:linear-gradient(135deg,rgba(45,212,191,.14),rgba(59,130,246,.08));
}
.brand-logo,.brand-logo-img{
  box-shadow:0 12px 28px rgba(45,212,191,.18);
}
.nav-group{
  background:rgba(255,255,255,.055);
  border-color:rgba(255,255,255,.105);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055);
}
.nav-group summary{
  border-radius:16px;
}
.nav-group .nav-sub a{
  color:#e5f2ff;
  font-weight:650;
}
.nav-group .nav-sub a:hover{
  background:rgba(255,255,255,.095);
}
.nav-group .nav-sub a.active{
  background:linear-gradient(135deg,rgba(45,212,191,.28),rgba(37,99,235,.26));
  color:#fff;
  border-color:rgba(147,197,253,.36);
}
.merged-dashboard-hero{
  padding:30px;
  border-radius:30px;
  background:
    radial-gradient(circle at 96% 0%,rgba(255,255,255,.20),transparent 22%),
    linear-gradient(135deg,#0f766e 0%,#2563eb 52%,#7c3aed 100%);
  box-shadow:0 26px 80px rgba(37,99,235,.24);
}
.merged-dashboard-hero .hero-actions a{
  transition:.18s ease;
  backdrop-filter:blur(6px);
}
.merged-dashboard-hero .hero-actions a:hover{
  transform:translateY(-2px);
  background:rgba(255,255,255,.24);
}
.dashboard-stat-grid{
  margin-top:2px;
}
.dashboard-stat-grid .stat{
  border-radius:22px;
  min-height:126px;
}
.stat strong{
  letter-spacing:-.02em;
}
.toolbar h2{
  margin:0;
}
.table-wrap{
  border-color:#dbeafe;
  border-radius:18px;
}
th{
  background:linear-gradient(135deg,#f8fafc,#eff6ff);
  color:#0f172a;
}
tr:hover td{
  background:#f8fbff;
}
input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:#60a5fa;
  box-shadow:var(--ems-focus-ring);
}
.btn{
  transition:.18s ease;
  box-shadow:0 10px 24px rgba(15,118,110,.10);
}
.btn:hover{
  transform:translateY(-1px);
  filter:saturate(1.05);
}
.form-grid{
  align-items:end;
}
.field label,label{
  color:#1f3151;
}
.quick-action-grid .btn{
  border-radius:16px;
}
.security-check-item{
  box-shadow:0 10px 24px rgba(15,23,42,.055);
}
.auth-stage{
  box-shadow:0 34px 100px rgba(2,6,23,.30)!important;
}
.study-book{
  will-change:transform;
}
.auth-card{
  border:1px solid rgba(255,255,255,.82)!important;
}
.clean-login-security{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.70);
}
.auth-submit:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 34px rgba(37,99,235,.24);
}
.ems-feedback-card{
  animation:emsPopIn .2s ease-out;
}
@keyframes emsPopIn{
  from{transform:translateY(10px) scale(.98);opacity:.5}
  to{transform:translateY(0) scale(1);opacity:1}
}

/* Print should stay clean */
@media print{
  .topbar{position:static!important;box-shadow:none!important}
  .btn{box-shadow:none!important}
}

/* Tablet */
@media(max-width:1100px){
  .main{padding:18px}
  .merged-dashboard-hero{padding:24px;border-radius:26px}
  .dashboard-stat-grid .stat{min-height:116px}
}

/* Mobile */
@media(max-width:900px){
  .main{padding:12px}
  .topbar{
    top:8px;
    border-radius:18px;
    display:grid;
    grid-template-columns:auto 1fr auto;
    gap:10px;
  }
  .topbar .userbox{
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:6px;
  }
  .userbox a{
    padding:7px 9px;
    font-size:12px;
  }
  .sidebar{
    width:min(310px,88vw);
  }
  .sidebar.open:after{
    content:"";
    position:fixed;
    inset:0;
    left:min(310px,88vw);
    background:rgba(15,23,42,.35);
  }
  .merged-dashboard-hero{
    padding:20px;
    border-radius:22px;
  }
  .merged-dashboard-hero h2{
    font-size:24px;
  }
  .merged-dashboard-hero .hero-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  .merged-dashboard-hero .hero-actions a{
    text-align:center;
  }
  .dashboard-stat-grid .stat{
    min-height:104px;
  }
  .grid{
    gap:12px;
  }
  .card{
    border-radius:18px;
    padding:16px;
  }
  .table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  table{
    min-width:680px;
  }
  .quick-action-grid{
    grid-template-columns:1fr;
  }
}

/* Small mobile */
@media(max-width:560px){
  .main{padding:10px}
  .topbar{
    padding:12px;
  }
  .topbar h1{font-size:18px}
  .topbar p{font-size:12px}
  .menu-btn{
    border-radius:12px;
    padding:8px 10px;
  }
  .merged-dashboard-hero{
    margin-bottom:14px;
  }
  .hero-kicker{
    font-size:12px;
  }
  .dashboard-stat-grid{
    gap:10px;
  }
  .stat{
    padding:15px;
  }
  .stat strong{
    font-size:24px;
  }
  .card h2{
    font-size:21px;
  }
  .auth-stage{
    padding:18px!important;
    border-radius:24px!important;
  }
  .auth-stage h1{
    font-size:30px!important;
  }
  .study-scene{
    min-height:205px!important;
  }
  .scene-panel{
    font-size:13px;
  }
  .auth-card{
    padding:20px!important;
    border-radius:24px!important;
  }
  .auth-card input,.auth-card select,.auth-card textarea{
    min-height:46px!important;
  }
}

/* v12.10.10 EMS logo, smart filters, import/export, ID card customize */
.brand-logo-img{width:46px!important;height:46px!important;object-fit:contain!important;border-radius:14px;background:#fff;padding:3px}
.student-filter-panel{padding:14px 16px;border:1px solid #dbeafe;border-radius:18px;background:linear-gradient(135deg,#f0fdf4,#eff6ff);margin:0 0 10px}
.student-filter-grid{display:grid;grid-template-columns:220px minmax(260px,1fr) auto;gap:10px;align-items:center}
.compact-student-filter .student-filter-grid{grid-template-columns:minmax(260px,1fr) auto}
.student-filter-count,.muted{display:block;margin-top:7px;color:#64748b}
.smart-select-form{display:grid!important;grid-template-columns:minmax(230px,1fr) minmax(260px,1.1fr) minmax(260px,1.1fr) auto auto auto;gap:10px;align-items:center}
.template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}
.template-card{padding:14px;border:1px solid #dbeafe;border-radius:16px;background:linear-gradient(135deg,#fff,#eff6ff)}
.template-card b{display:block}.template-card small{display:block;color:#64748b;margin:5px 0 10px}
.id-settings-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.id-card{border-color:var(--id-primary,#2563eb)!important;background:var(--id-bg,#ffffff)!important}
.id-head{background:linear-gradient(135deg,var(--id-primary,#2563eb),var(--id-accent,#16a34a))!important;color:#fff!important}
.id-head h3,.id-head p{color:#fff!important}
.id-card.compact-id .id-footer{display:none}
.id-card.no-qr .id-qr{display:none}
.id-card.no-photo .avatar{display:none}
@media(max-width:900px){.student-filter-grid,.compact-student-filter .student-filter-grid,.smart-select-form,.id-settings-grid{grid-template-columns:1fr!important}.brand-logo-img{width:42px!important;height:42px!important}}


/* v12.11 Production Ready UI */
.nav-group.production-group summary{background:linear-gradient(135deg,rgba(34,197,94,.20),rgba(168,85,247,.14));color:#f8fafc}
.nav-group.production-group .nav-sub a:before{background:linear-gradient(180deg,#22c55e,#a855f7)}
.production-hero{padding:28px;border-radius:28px;background:radial-gradient(circle at 95% 5%,rgba(255,255,255,.20),transparent 24%),linear-gradient(135deg,#0f766e,#2563eb 52%,#7c3aed);color:#fff;box-shadow:0 24px 70px rgba(37,99,235,.20);margin-bottom:18px}
.production-hero h2{margin:0 0 8px;font-size:32px}.production-hero p{margin:0;color:#e0f2fe;line-height:1.6}
.step-card,.feature-tile,.health-item,.mapping-card{border:1px solid #dbeafe;border-radius:18px;padding:16px;background:linear-gradient(135deg,#fff,#f0f9ff);box-shadow:0 12px 28px rgba(15,23,42,.055)}
.step-card.done,.health-item.ok{background:linear-gradient(135deg,#ecfdf5,#f0fdf4);border-color:#bbf7d0}
.step-card.warn,.health-item.warn{background:linear-gradient(135deg,#fff7ed,#fffbeb);border-color:#fed7aa}
.step-num{width:34px;height:34px;border-radius:999px;display:inline-grid;place-items:center;background:#0f766e;color:#fff;font-weight:900;margin-right:8px}
.feature-grid-pro{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.check-grid-pro{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:900}
.status-pill.ok{background:#dcfce7;color:#166534}.status-pill.warn{background:#fef3c7;color:#92400e}.status-pill.bad{background:#fee2e2;color:#991b1b}
.parent-mobile-shell{max-width:390px;margin:auto;border:10px solid #0f172a;border-radius:34px;background:#f8fafc;overflow:hidden;box-shadow:0 26px 70px rgba(15,23,42,.22)}
.parent-mobile-top{background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;padding:18px}.parent-mobile-body{padding:14px;display:grid;gap:12px}
.bottom-mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border-top:1px solid #e2e8f0}.bottom-mobile-nav a{text-align:center;padding:10px 4px;font-size:12px;text-decoration:none;color:#0f172a}
.mapping-table select{min-width:190px}
.demo-badge{display:inline-flex;padding:8px 12px;border-radius:999px;background:#fef3c7;color:#92400e;font-weight:900}
.template-preview-box{min-height:230px;border:6px double var(--preview-primary,#2563eb);border-radius:18px;padding:18px;background:linear-gradient(135deg,#fff,var(--preview-bg,#eff6ff))}
.help-card{display:block;text-decoration:none;color:#0f172a}.help-card:hover{transform:translateY(-2px)}
@media(max-width:900px){.production-hero h2{font-size:25px}.production-hero{padding:20px}.mapping-table{min-width:800px}}


/* v12.11.1 Menu + speed polish */
.sidebar nav a,
.nav-group summary{
  font-size:15.5px!important;
  line-height:1.35!important;
}
.nav-group summary{
  padding:14px 16px!important;
  font-weight:900!important;
}
.nav-group .nav-sub a{
  padding:11px 13px 11px 16px!important;
  margin:4px 0!important;
}
.nav-divider{display:none!important}
.sticky-action-bar{
  position:sticky;
  bottom:10px;
  z-index:8;
  border:1px solid #bbf7d0;
  background:linear-gradient(135deg,rgba(240,253,244,.97),rgba(239,246,255,.97));
  backdrop-filter:blur(10px);
}
.module-check{
  min-height:48px;
  display:flex!important;
  align-items:center;
  gap:10px;
  background:linear-gradient(135deg,#fff,#f8fafc);
  border-radius:14px;
  border:1px solid #e2e8f0;
}
.module-check input{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
}
@media(max-width:900px){
  .sidebar nav a,.nav-group summary{font-size:16px!important}
  .nav-group .nav-sub a{padding:12px 14px 12px 18px!important}
}
/* speed: avoid heavy paint when scrolling long menus */
.sidebar,.main,.card,.stat{will-change:auto}
*{scroll-behavior:auto}


/* v12.11.2 Google reCAPTCHA Ready */
.google-recaptcha-ready-box .recaptcha-wrap{
  padding:12px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:#fff;
  overflow:auto;
}
.recaptcha-disabled-note{
  padding:12px 14px;
  border-radius:14px;
  background:linear-gradient(135deg,#eff6ff,#f0fdf4);
  border:1px solid #bfdbfe;
  color:#1e3a8a;
  font-weight:800;
}
@media(max-width:420px){
  .g-recaptcha{transform:scale(.86);transform-origin:0 0}
  .google-recaptcha-ready-box .recaptcha-wrap{min-height:84px}
}


/* v12.11.3 Logo Upload + Print Fix */
.brand-logo-img,
.logo-preview img,
.id-logo img{
  object-fit:contain!important;
  background:#ffffff!important;
}
.brand-logo-img{
  border:1px solid rgba(255,255,255,.38);
}
.logo-preview{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:70px;
  height:70px;
  padding:6px;
  border:1px solid #dbeafe;
  border-radius:16px;
  background:#fff;
  margin-top:8px;
}
.logo-preview img{
  max-width:100%;
  max-height:100%;
  border-radius:12px;
}
.print-logo,
.id-logo img{
  max-width:90px;
  max-height:90px;
}
@media print{
  .print-logo,.id-logo img,.sign-img,.stamp-img{
    print-color-adjust:exact;
    -webkit-print-color-adjust:exact;
  }
}


/* v12.11.5 Import / Export Wizard */
.selected-module-box{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  border:1px solid #bfdbfe;
  background:linear-gradient(135deg,#eff6ff,#f0fdf4);
}
.selected-module-box h3{margin:10px 0 8px}
.wizard-actions{display:grid;gap:12px}
.csv-group-heading{
  margin:24px 0 10px;
  padding-left:8px;
  border-left:5px solid #0f766e;
}
.csv-module-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}
.csv-module-card{
  padding:15px;
  border-radius:18px;
  border:1px solid #dbeafe;
  background:linear-gradient(135deg,#fff,#f8fbff);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.csv-module-card b{display:block;font-size:15px}
.csv-module-card small{display:block;color:#64748b;margin:7px 0 12px;word-break:break-all}
.csv-card-actions{display:flex;gap:8px;flex-wrap:wrap}
.import-order-flow{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.import-order-flow span{
  padding:10px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#dcfce7,#dbeafe);
  border:1px solid #bfdbfe;
  font-weight:900;
}
@media(max-width:900px){
  .csv-module-grid{grid-template-columns:1fr}
  .wizard-actions .btn{width:100%;text-align:center}
}

/* v12.11 Finance + Fee ERP Rebuild */
.finance-erp-hero{position:relative;overflow:hidden}
.finance-erp-hero:after{content:'₹';position:absolute;right:30px;top:-35px;font-size:180px;font-weight:900;color:rgba(255,255,255,.08);line-height:1}
.finance-tabs{position:sticky;top:8px;z-index:8;padding:10px;border:1px solid #dbeafe;border-radius:18px;background:rgba(248,250,252,.94);backdrop-filter:blur(12px);box-shadow:0 10px 30px rgba(15,23,42,.08)}
.finance-tabs a{border:1px solid transparent}
.finance-tabs a.active{box-shadow:0 8px 20px rgba(15,118,110,.22)}
.mini-form{display:grid;grid-template-columns:repeat(2,minmax(150px,1fr));gap:10px;min-width:360px;padding:12px;margin-top:8px;border:1px solid #dbeafe;border-radius:14px;background:#f8fafc}
.mini-form label{margin:0}.mini-form .btn{align-self:end;justify-content:center}
.inline-reverse{display:inline-block;margin-left:6px;vertical-align:top}
.inline-reverse summary{cursor:pointer;color:#991b1b;font-weight:800;font-size:12px;padding:7px 9px;border-radius:9px;background:#fee2e2;list-style:none}
.inline-reverse form{display:flex;gap:6px;margin-top:7px;min-width:260px}
.inline-reverse input{padding:7px 9px;font-size:12px}
.receipt-reversed{position:relative;opacity:.82}
.receipt-reversed:after{content:'REVERSED';position:absolute;inset:44% auto auto 50%;transform:translate(-50%,-50%) rotate(-18deg);font-size:68px;font-weight:900;color:rgba(185,28,28,.20);border:8px solid rgba(185,28,28,.18);padding:10px 22px;letter-spacing:6px;pointer-events:none}
@media(max-width:700px){.finance-tabs{position:static}.mini-form{grid-template-columns:1fr;min-width:260px}.inline-reverse form{display:grid;min-width:220px}.receipt-reversed:after{font-size:38px}}


/* v12.11.8 UI refinement - colorful menu, dashboard, student onboarding */
.sidebar{background:linear-gradient(180deg,#07172e 0%,#10294f 36%,#0e4b56 100%)}
.brand{padding:18px 18px 16px;border-bottom:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.03)}
.brand strong{font-size:14px;letter-spacing:.01em}.brand-logo-img{width:52px;height:52px;border-radius:16px;object-fit:cover;background:#fff;padding:4px;box-shadow:0 10px 24px rgba(2,6,23,.22)}
.sidebar-search-wrap{display:flex;align-items:center;gap:10px;margin:12px 12px 6px;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08)}
.sidebar-search-wrap span{font-size:14px}.sidebar-search-wrap input{background:transparent;border:0;outline:0;color:#fff;padding:0;min-height:auto}.sidebar-search-wrap input::placeholder{color:#cbd5e1}
.nav-group{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.06);box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.nav-group.main-group summary{background:linear-gradient(135deg,rgba(20,184,166,.18),rgba(37,99,235,.12))}
.nav-group.student-group summary{background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(14,165,233,.10))}
.nav-group.academic-group summary{background:linear-gradient(135deg,rgba(16,185,129,.18),rgba(20,184,166,.10))}
.nav-group.finance-group summary{background:linear-gradient(135deg,rgba(245,158,11,.22),rgba(249,115,22,.12))}
.nav-group.learning-group summary{background:linear-gradient(135deg,rgba(124,58,237,.22),rgba(59,130,246,.12))}
.nav-group.resource-group summary{background:linear-gradient(135deg,rgba(236,72,153,.18),rgba(251,146,60,.10))}
.nav-group.report-group summary{background:linear-gradient(135deg,rgba(34,197,94,.18),rgba(20,184,166,.10))}
.nav-group.system-group summary{background:linear-gradient(135deg,rgba(100,116,139,.18),rgba(37,99,235,.10))}
.nav-group summary{border-radius:14px}.nav-group .nav-sub a{position:relative;border:1px solid transparent;background:rgba(255,255,255,.02)}
.nav-group .nav-sub a:hover,.nav-group .nav-sub a.active{background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(45,212,191,.16));border-color:rgba(255,255,255,.08)}
.nav-group .nav-sub a.active:before{content:'';position:absolute;left:0;top:8px;bottom:8px;width:4px;border-radius:999px;background:linear-gradient(180deg,#22d3ee,#2dd4bf)}
.topbar{background:linear-gradient(135deg,#ffffff,#f8fbff)}
.userbox a{background:#fff1f2;color:#9f1239;border:1px solid #fecdd3}
.topbar-title h1{font-size:24px}

.revamped-dashboard-hero{background:linear-gradient(135deg,#ffffff,#eff6ff,#ecfeff);border:1px solid #dbeafe;box-shadow:0 18px 46px rgba(15,23,42,.08)}
.hero-pill-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.hero-pill-row span{padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #dbeafe;font-size:13px;font-weight:800;color:#0f172a}
.hero-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hero-actions-grid a{justify-content:center;text-align:center;border-radius:16px;background:linear-gradient(135deg,#0f766e,#2563eb);color:#fff;text-decoration:none;padding:12px 14px;font-weight:800;box-shadow:0 12px 28px rgba(37,99,235,.18)}
.dashboard-ops-grid .card,.dashboard-side-card{min-height:100%}
.ops-mini-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.ops-item{padding:16px;border-radius:18px;background:linear-gradient(135deg,#ffffff,#f8fbff);border:1px solid #dbeafe}.ops-item b{display:block;font-size:13px;color:#334155}.ops-item strong{display:block;font-size:24px;margin-top:8px;color:#0f172a}.ops-item span{display:block;font-size:12px;color:#64748b;line-height:1.5;margin-top:6px}
.mini-list{display:grid;gap:10px}.mini-list-item{padding:12px 14px;border-radius:16px;background:linear-gradient(135deg,#fff,#f8fafc);border:1px solid #e2e8f0}.mini-list-item b{display:block;margin-bottom:4px}.mini-list-item span{display:block;font-size:13px;color:#64748b;line-height:1.45}.dashboard-empty-box{padding:18px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc}
.quick-task-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.task-chip{display:flex;align-items:center;justify-content:center;text-align:center;padding:12px;border-radius:16px;background:linear-gradient(135deg,#ffffff,#eff6ff);border:1px solid #dbeafe;text-decoration:none;font-weight:800;color:#0f172a}
.dashboard-action-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}

.student-form-shell{display:grid;gap:18px}.student-form-header{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;align-items:center;background:linear-gradient(135deg,#ffffff,#eff6ff,#ecfeff)}
.student-form-header h2{margin:8px 0 6px}.student-form-header p{margin:0;color:#64748b;line-height:1.65}
.student-form-helper-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.helper-box{padding:14px;border-radius:18px;background:#fff;border:1px solid #dbeafe;box-shadow:0 10px 24px rgba(15,23,42,.05)}.helper-box b{display:block;font-size:13px;color:#334155}.helper-box span{display:block;margin-top:5px;font-size:13px;color:#0f172a;font-weight:800;line-height:1.45}
.student-onboard-form{display:grid;gap:18px}.student-section-card{background:linear-gradient(135deg,#ffffff,#fbfdff)}
.section-title-bar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:14px;padding-bottom:10px;border-bottom:1px solid #e2e8f0}.section-title-bar h3{margin:0;font-size:18px}
.student-form-grid .field input,.student-form-grid .field select,.student-form-grid .field textarea{border-radius:14px}.student-detail-grid{align-items:start}
.student-photo-panel{display:grid;gap:12px}.student-photo-preview{width:100%;max-width:180px;height:200px;object-fit:cover;border-radius:20px;border:1px solid #dbeafe;background:linear-gradient(135deg,#f8fafc,#eff6ff);box-shadow:0 12px 28px rgba(15,23,42,.08)}
.student-note-box{padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#ecfeff,#eff6ff);border:1px solid #bae6fd;color:#0f172a;font-size:13px;line-height:1.55}.student-note-box.secondary-note{background:linear-gradient(135deg,#f0fdf4,#ecfeff);border-color:#bbf7d0}
.student-submit-card{background:linear-gradient(135deg,#ffffff,#f8fafc)}.student-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:16px}.student-submit-bar h3{margin:0 0 6px}.student-submit-bar p{margin:0;color:#64748b;line-height:1.6}.student-submit-actions{display:flex;gap:10px;flex-wrap:wrap}

@media(max-width:1180px){.student-form-header{grid-template-columns:1fr}.student-form-helper-grid{grid-template-columns:1fr 1fr 1fr}.ops-mini-grid{grid-template-columns:1fr 1fr}.hero-actions-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.sidebar-search-wrap{margin:12px}.topbar-title h1{font-size:20px}.hero-actions-grid{grid-template-columns:1fr 1fr}.ops-mini-grid,.quick-task-grid{grid-template-columns:1fr 1fr}.student-submit-bar{flex-direction:column;align-items:flex-start}.student-detail-grid .col-8,.student-detail-grid .col-4{grid-column:span 12}}
@media(max-width:620px){.hero-pill-row span{width:100%}.hero-actions-grid,.ops-mini-grid,.quick-task-grid,.student-form-helper-grid{grid-template-columns:1fr}.student-photo-preview{max-width:100%}}

/* v12.11.9 Exam & Marksheet ERP */
.exam-erp-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:20px;align-items:center;background:linear-gradient(135deg,#ffffff,#eef2ff,#ecfeff)}
.exam-erp-hero h2{margin:8px 0}.exam-erp-hero p{margin:0;color:#64748b;line-height:1.65}.exam-hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.exam-hero-stats div{padding:16px;border-radius:18px;background:#fff;border:1px solid #dbeafe;text-align:center}.exam-hero-stats b{display:block;font-size:26px}.exam-hero-stats span{font-size:12px;color:#64748b}.exam-workflow{display:grid;gap:10px}.exam-workflow div{padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,#fff,#eff6ff);border:1px solid #dbeafe;font-weight:800}.result-inline-form{display:grid;grid-template-columns:repeat(2,minmax(100px,1fr));gap:6px;min-width:340px}.result-inline-form input{padding:7px 8px;font-size:12px}.marksheet-status-strip{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:12px 0}.marksheet-status-strip span{padding:7px 12px;border-radius:999px;background:#eff6ff;border:1px solid #bfdbfe;font-weight:800;font-size:12px}.marksheet-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.marksheet-summary-grid div{padding:14px;border-radius:16px;background:linear-gradient(135deg,#f8fafc,#eff6ff);border:1px solid #dbeafe;text-align:center}.marksheet-summary-grid b{display:block;font-size:12px;color:#64748b}.marksheet-summary-grid strong{display:block;font-size:22px;margin-top:6px}@media(max-width:900px){.exam-erp-hero{grid-template-columns:1fr}.exam-hero-stats{grid-template-columns:1fr 1fr 1fr}.marksheet-summary-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.exam-hero-stats{grid-template-columns:1fr}.result-inline-form{grid-template-columns:1fr;min-width:220px}.marksheet-summary-grid{grid-template-columns:1fr 1fr}}


/* v12.12 SaaS super admin and dashboard color rebuild */
body.school-user-ui{--brand-1:#0f766e;--brand-2:#2563eb;--brand-3:#7c3aed;background:linear-gradient(135deg,#f4fbff,#eef6ff 42%,#f8fbff)}
body.school-user-ui .sidebar{background:linear-gradient(180deg,#04152e 0%,#0f2348 32%,#0b4d57 100%)}
body.school-user-ui .stat{background:linear-gradient(135deg,#ffffff,#f8fbff);border-color:#cfe5ff}
body.school-user-ui .stat.stat-blue{background:linear-gradient(135deg,#dbeafe,#eff6ff)}
body.school-user-ui .stat.stat-green{background:linear-gradient(135deg,#dcfce7,#f0fdf4)}
body.school-user-ui .stat.stat-purple{background:linear-gradient(135deg,#ede9fe,#f5f3ff)}
body.school-user-ui .stat.stat-orange{background:linear-gradient(135deg,#ffedd5,#fff7ed)}
body.school-user-ui .stat.stat-cyan{background:linear-gradient(135deg,#cffafe,#ecfeff)}
body.school-user-ui .stat.stat-red{background:linear-gradient(135deg,#fee2e2,#fef2f2)}
body.school-user-ui .stat.stat-pink{background:linear-gradient(135deg,#fce7f3,#fdf2f8)}
body.school-user-ui .stat.stat-slate{background:linear-gradient(135deg,#e2e8f0,#f8fafc)}
body.school-user-ui .revamped-dashboard-hero{background:linear-gradient(135deg,#ffffff 0%,#f0fdf4 20%,#eff6ff 62%,#ecfeff 100%)!important;color:#0f172a!important}
body.school-user-ui .revamped-dashboard-hero h2,body.school-user-ui .revamped-dashboard-hero p,body.school-user-ui .revamped-dashboard-hero .hero-kicker{color:#0f172a!important}
body.school-user-ui .hero-kicker{display:inline-flex;padding:7px 12px;border-radius:999px;background:linear-gradient(135deg,#dcfce7,#dbeafe);font-weight:900}
body.school-user-ui .hero-actions-grid a{background:linear-gradient(135deg,#0f766e,#2563eb)!important;color:#fff!important}
body.school-user-ui .hero-actions-grid a:nth-child(2n){background:linear-gradient(135deg,#2563eb,#7c3aed)!important}
body.school-user-ui .ops-item{background:linear-gradient(135deg,#fff,#f8fbff)!important}
body.school-user-ui .mini-list-item{background:linear-gradient(135deg,#fff,#fcfdff)!important}

body.super-admin-ui{background:linear-gradient(135deg,#f5f7ff,#f1f5ff 48%,#fdf4ff)}
body.super-admin-ui .sidebar{background:linear-gradient(180deg,#0b1328 0%,#1e1b4b 35%,#0f766e 100%)}
body.super-admin-ui .brand{background:linear-gradient(135deg,rgba(59,130,246,.16),rgba(167,139,250,.16));border-bottom-color:rgba(255,255,255,.12)}
body.super-admin-ui .topbar{background:linear-gradient(135deg,#ffffff,#eef5ff,#f5f3ff)!important;border:1px solid #dbeafe!important}
body.super-admin-ui .card{background:linear-gradient(135deg,#ffffff,#fbfcff);border-color:#dbeafe;box-shadow:0 14px 34px rgba(15,23,42,.06)}
body.super-admin-ui .stat{background:linear-gradient(135deg,#ffffff,#eff6ff,#f5f3ff)!important;border-color:#c7d2fe!important}
body.super-admin-ui .stat strong{color:#1d4ed8}
body.super-admin-ui .super-dashboard-hero-v2{background:radial-gradient(circle at 88% 18%,rgba(255,255,255,.18),transparent 16%),linear-gradient(135deg,#0f172a 0%,#1d4ed8 42%,#7c3aed 100%)}
.super-hero-metrics{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.super-hero-metrics span{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);font-weight:800}
.super-school-wizard-card{background:linear-gradient(135deg,#ffffff,#f8fbff,#f5f3ff)!important}
.super-control-column{display:grid;gap:18px}
.school-wizard-section{padding:18px 0;border-top:1px dashed #dbeafe}.school-wizard-section:first-of-type{border-top:0;padding-top:6px}.school-wizard-section h3{margin:0 0 14px;font-size:18px;color:#0f172a}
.rebuilt-super-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}.rebuilt-super-form label.wide,.rebuilt-super-form label.address-field{grid-column:span 2!important}.rebuilt-super-form textarea{min-height:98px}
.module-inline-check{display:flex!important;align-items:flex-start;gap:8px;padding:14px;border-radius:14px;background:linear-gradient(135deg,#eff6ff,#f0fdf4);border:1px solid #dbeafe}
.wizard-submit-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:12px}.wizard-submit-row .mini-note{margin:0}
.enhanced-side-card{background:linear-gradient(135deg,#fff,#f8fbff)!important}
.compact-policy-form textarea{min-height:116px}
.single-col-grid{grid-template-columns:1fr!important}
.improved-plan-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.improved-plan-form label:last-of-type{grid-column:span 2}
.superadmin-table .badge{margin-bottom:6px}
.superadmin-table details{margin-top:8px;padding:10px 12px;border:1px solid #dbeafe;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#ffffff)}
.superadmin-table details summary{cursor:pointer;font-weight:800;color:#1e293b}
.superadmin-table .brand-form,.superadmin-table .plan-form{margin-top:10px}
@media(max-width:1180px){.super-control-column{grid-template-columns:1fr}.wizard-submit-row{flex-direction:column;align-items:flex-start}.rebuilt-super-form{grid-template-columns:1fr!important}.rebuilt-super-form label.wide,.rebuilt-super-form label.address-field{grid-column:span 1!important}.super-hero-metrics{gap:8px}}
@media(max-width:900px){body.super-admin-ui .topbar h1{font-size:21px}.super-hero-metrics span{width:100%}.super-dashboard-hero-v2{padding:22px!important}.superadmin-table table,.superadmin-table{min-width:1100px}}


/* v12.12.1 TC / LC / Certificates ERP */
.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:16px}.section-heading h2{margin:2px 0 0;font-size:23px}.eyebrow{display:block;color:#078579;font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}.form-actions{display:flex;gap:10px;flex-wrap:wrap}.inline-form{display:inline-flex;margin:2px}.row-cancelled{opacity:.64;text-decoration-color:#b91c1c}.status-pill{display:inline-flex;padding:5px 10px;border-radius:999px;font-size:12px;font-weight:800}.status-pill.issued,.status-pill.published,.status-pill.pass{background:#dcfce7;color:#166534}.status-pill.cancelled,.status-pill.failed{background:#fee2e2;color:#991b1b}.status-pill.draft,.status-pill.incomplete,.status-pill.pending{background:#fef3c7;color:#92400e}.status-pill.locked{background:#e0e7ff;color:#3730a3}
.document-workspace{background:linear-gradient(145deg,#fff,#f8fcff)}.certificate-form{padding-top:4px}.template-list{display:grid;gap:11px}.template-item{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:15px;border:1px solid #dce7f1;border-radius:16px;background:linear-gradient(135deg,#fff,#f5faff)}.template-item p{white-space:normal;color:#5f7187;margin:8px 0 0;line-height:1.55}.template-item.is-muted{opacity:.55}.document-actionbar{display:flex;justify-content:flex-end;gap:10px}.official-document{position:relative;margin:0 auto;background:#fff;color:#101828;border:1px solid #cbd5e1;box-shadow:0 16px 45px rgba(15,23,42,.10);padding:18mm;min-height:260mm;overflow:hidden}.official-document.landscape-document{max-width:1120px;min-height:185mm;padding:11mm 14mm}.official-document.portrait-document{max-width:800px}.document-meta-strip{display:flex;justify-content:space-between;gap:12px;padding:8px 11px;border:1px solid #94a3b8;background:#f8fafc;margin-bottom:12px;font-size:12px}.official-detail-table{width:100%;font-size:12px}.official-detail-table th,.official-detail-table td{border:1px solid #64748b;padding:7px;white-space:normal}.official-detail-table th{width:18%;background:#f1f5f9}.official-declaration{margin:15px 0;line-height:1.6}.certificate-recipient{text-align:center;margin:30px 0 20px}.certificate-recipient span{font-family:serif;font-size:17px}.certificate-recipient h2{font-family:serif;font-size:34px;margin:10px 0 6px;color:#0b6670;border-bottom:1px solid #b6c7d5;display:inline-block;padding:0 30px 5px}.certificate-recipient p{line-height:1.7}.certificate-body{font-family:Georgia,serif;font-size:19px;line-height:1.9;text-align:justify;margin:30px 15px}.certificate-purpose,.document-note{padding:12px 14px;border:1px solid #cbd5e1;background:#f8fafc;line-height:1.6}.cancelled-watermark{position:absolute;z-index:8;left:50%;top:48%;transform:translate(-50%,-50%) rotate(-22deg);font-size:86px;font-weight:950;letter-spacing:.12em;color:rgba(185,28,28,.16);border:10px solid rgba(185,28,28,.15);padding:10px 28px;pointer-events:none}.document-cancel-note{position:relative;z-index:9}
@media(max-width:900px){.official-document{padding:20px;min-height:auto}.document-meta-strip{flex-wrap:wrap}}
@media(max-width:560px){.section-heading{align-items:center}.document-actionbar{display:none}.certificate-body{font-size:16px;margin:20px 0}.cancelled-watermark{font-size:45px}}
@media print{body{print-color-adjust:exact;-webkit-print-color-adjust:exact}.official-document{box-shadow:none;border:0;margin:0;max-width:none;min-height:auto;padding:0}.document-actionbar{display:none!important}.certificate-body{font-size:17px}.cancelled-watermark{color:rgba(185,28,28,.18)!important}}
