:root{
  --navy-900:#101A33; --navy-800:#182645; --navy-700:#233560; --navy-600:#2F4670;
  --steel-300:#93A2C4; --steel-200:#C3CCE2;
  --paper:#F3F5F9; --paper-card:#FFFFFF; --line:#E1E5F0;
  --amber-600:#C7860B; --amber-500:#E3A008; --amber-100:#FBEAC4;
  --ink:#182031; --ink-soft:#5B6580;
  --green-600:#227A5B; --green-100:#DCF1E7;
  --red-600:#B4372B; --red-100:#FBE2DE;
  --blue-600:#2E5FA3; --blue-100:#DCE8F7;
  --purple-600:#6D4FA6; --purple-100:#E7E0F5;
  --radius:14px;
  --shadow-card:0 1px 2px rgba(16,26,51,.04), 0 6px 16px -10px rgba(16,26,51,.10);
  --shadow-card-hover:0 10px 24px -12px rgba(16,26,51,.20);
  --font-display: 'Aptos Display', 'Aptos', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Aptos', 'Segoe UI', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
*{box-sizing:border-box;}
html,body{height:100%;}
body{margin:0; font-family:var(--font-body); background:var(--paper); color:var(--ink); -webkit-font-smoothing:antialiased;}
.hidden{display:none !important;}
button{font-family:inherit; cursor:pointer;}
input,select,textarea{font-family:inherit;}
.eyebrow{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--steel-300);font-weight:600;}
.muted{color:var(--ink-soft);}

/* ---------- Login ---------- */
#gate{min-height:100vh; display:flex; background:var(--navy-900);}
.gate-left{flex:1.1; background: radial-gradient(circle at 15% 20%, rgba(227,160,8,.14), transparent 45%), radial-gradient(circle at 85% 80%, rgba(47,95,163,.25), transparent 50%), linear-gradient(160deg, var(--navy-900), var(--navy-800) 60%, var(--navy-700)); color:#fff; padding:36px 56px; display:flex; flex-direction:column; justify-content:center; gap:18px;}
.gate-mark{display:flex;align-items:center;gap:12px;}
.brand-logo{display:block;width:auto;object-fit:contain;}
.brand-logo-card{display:inline-flex;align-items:center;justify-content:center;background:#fff;border-radius:16px;box-shadow:0 2px 10px -2px rgba(0,0,0,.35);}
.brand-logo-card-gate{padding:12px 18px;}
.brand-logo-card-sidebar{padding:9px 14px;}
.brand-logo-gate{height:48px;}
.brand-logo-sidebar{height:34px;}
.brand-logo-report{height:34px;}

.lang-switch{display:inline-flex; gap:4px; margin-left:14px; vertical-align:middle;}
.lang-btn{background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.2); color:var(--steel-200); font-size:11px; font-weight:700; padding:5px 9px; border-radius:6px; cursor:pointer;}
.lang-btn:hover{border-color:var(--amber-500); color:#fff;}
.lang-btn.active{background:var(--amber-500); border-color:var(--amber-500); color:var(--navy-900);}
.lang-switch-topbar{margin-left:0;}
.lang-switch-topbar .lang-btn{background:var(--paper); border-color:var(--line); color:var(--ink-soft);}
.lang-switch-topbar .lang-btn.active{background:var(--amber-500); border-color:var(--amber-500); color:var(--navy-900);}
.lang-switch-topbar .lang-btn:hover{border-color:var(--amber-500); color:var(--ink);}
.gate-hero{max-width:520px; margin-top:0;}
.gate-hero .eyebrow{color:var(--amber-500);}
.gate-hero h1{font-size:29px; line-height:1.28; margin:14px 0 18px; font-weight:700; max-width:480px;}
.gate-illustration{margin-top:20px; max-width:560px;}
.gate-illustration svg{width:100%; height:auto; display:block;}
.gate-hero p{font-size:15px; line-height:1.6; color:var(--steel-200); margin:0;}
.gate-foot{font-size:12px; color:var(--steel-300);}
.gate-right{flex:.85; background:var(--paper); display:flex; align-items:center; justify-content:center; padding:40px;}
.login-card{width:100%; max-width:440px; background:var(--paper-card); border:1px solid var(--line); border-radius:16px; padding:34px; box-shadow:0 30px 60px -25px rgba(16,26,51,.35);}
.login-card h2{font-family:var(--font-display); font-size:23px; margin:0 0 6px;}
.login-card p.sub{margin:0 0 18px; color:var(--ink-soft); font-size:13.5px;}
.demo-accounts{display:flex; flex-direction:column; gap:8px; margin-bottom:18px;}
.demo-acc{border:1.5px solid var(--line); border-radius:9px; padding:9px 12px; cursor:pointer; transition:.15s border-color,.15s background;}
.demo-acc:hover, .demo-acc.active{border-color:var(--amber-500); background:var(--amber-100);}
.demo-acc .da-role{font-weight:700; font-size:12.5px;}
.demo-acc .da-email{font-size:11px; color:var(--ink-soft); margin-top:1px;}
.field{margin-bottom:14px;}
.field label{display:block; font-size:11.5px; font-weight:600; color:var(--ink-soft); margin-bottom:6px; text-transform:uppercase; letter-spacing:.04em;}
.field input, .field select, .field textarea{width:100%; padding:10px 12px; border:1.5px solid var(--line); border-radius:8px; font-size:14px; background:#fbfbfd; color:var(--ink);}
.field input:focus, .field select:focus, .field textarea:focus{outline:none; border-color:var(--amber-500); background:#fff;}
.btn-primary{width:100%; padding:12px; border:none; border-radius:8px; background:var(--navy-800); color:#fff; font-weight:600; font-size:14px; cursor:pointer; margin-top:6px;}
.btn-primary:hover{background:var(--navy-700);}
.btn-primary:disabled{opacity:.6; cursor:default;}
.login-error{color:var(--red-600); font-size:12.5px; margin-top:10px; min-height:16px;}
.login-note{margin-top:14px; font-size:11.5px; color:var(--steel-300); text-align:center;}
.gate-switch-link{margin-top:16px; font-size:12.5px; text-align:center; color:var(--ink-soft);}
.gate-switch-link a{color:var(--amber-600); font-weight:700; text-decoration:none; cursor:pointer;}
.gate-switch-link a:hover{text-decoration:underline;}
.signup-divider{display:flex; align-items:center; text-align:center; margin:18px 0 14px; color:var(--steel-300); font-size:10.5px; text-transform:uppercase; letter-spacing:.05em;}
.signup-divider::before, .signup-divider::after{content:""; flex:1; height:1px; background:var(--line);}
.signup-divider span{padding:0 10px;}
#signupCard{max-width:460px;}
.trial-badge{background:var(--green-100); color:var(--green-600); border-radius:8px; padding:10px 14px; font-size:12px; margin-bottom:16px; text-align:center; font-weight:600;}
.form-section-title{grid-column:1/-1; font-weight:700; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--amber-600); margin:14px 0 2px; padding-top:12px; border-top:1px solid var(--line);}
.form-section-title:first-child{margin-top:0; padding-top:0; border-top:none;}

/* ---------- ID Card builder ---------- */
.idc-builder{display:grid; grid-template-columns:1fr 1.3fr; gap:20px; margin:14px 0;}
.idc-fieldlist{max-height:360px; overflow-y:auto; padding-right:6px;}
.idc-check{display:flex; align-items:center; gap:8px; font-size:12px; padding:6px 0; cursor:pointer; border-bottom:1px solid #F0F1F5;}
.idc-check input{width:15px; height:15px; cursor:pointer; flex-shrink:0;}
.idc-previewwrap{display:flex; flex-direction:column; align-items:center;}
.idc-card{
  width:340px; height:214px; border-radius:10px; overflow:hidden; position:relative;
  background:#fff; box-shadow:0 8px 24px -8px rgba(16,26,51,.35); border:1px solid var(--line);
  font-family:-apple-system,Segoe UI,sans-serif; display:flex; flex-direction:column;
}
.idc-header{background:var(--navy-900); padding:8px 10px 7px; text-align:center;}
.idc-school{color:#fff; font-weight:700; font-size:12.5px; font-family:var(--font-display);}
.idc-subtitle{color:var(--amber-500); font-size:8px; letter-spacing:.08em; margin-top:2px;}
.idc-body{display:flex; gap:12px; padding:12px 12px 4px; flex:1;}
.idc-photo{width:52px; height:52px; border-radius:50%; background:var(--amber-500); color:var(--navy-900); font-weight:700; font-size:18px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.idc-fields{flex:1; min-width:0;}
.idc-name{font-weight:700; font-size:13px; color:var(--navy-900); margin-bottom:4px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.idc-row{display:flex; gap:6px; font-size:9.5px; margin-bottom:2px;}
.idc-label{color:var(--ink-soft); min-width:56px;}
.idc-value{color:var(--ink); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.idc-address{font-size:8px; color:var(--ink-soft); padding:0 12px; line-height:1.3; max-height:18px; overflow:hidden;}
.idc-validity{font-size:7.5px; color:var(--ink-soft); text-align:right; padding:2px 10px 6px;}

/* ---------- App Shell ---------- */
.shell{display:grid; grid-template-columns:252px 1fr; height:100vh; overflow:hidden;}
.sidebar{background:var(--navy-900); color:#fff; padding:20px 0 16px; display:flex; flex-direction:column; height:100%; overflow:hidden;}
#sbNav{flex:1; overflow-y:auto; min-height:0;}
.sb-brand{display:flex; align-items:center; gap:10px; padding:0 20px 18px; border-bottom:1px solid rgba(255,255,255,.08); margin-bottom:14px; flex-shrink:0;}

.sb-persona{padding:0 20px 16px; flex-shrink:0;}
.sb-persona-pill{font-size:10.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--amber-500); font-weight:700; background:rgba(227,160,8,.12); border:1px solid rgba(227,160,8,.3); padding:5px 9px; border-radius:20px; display:inline-block;}
.sb-group-title{font-size:10.5px; text-transform:uppercase; letter-spacing:.1em; color:var(--steel-300); padding:14px 20px 6px; font-weight:700;}
.sb-item{display:flex; align-items:center; gap:11px; padding:9px 20px; font-size:13.5px; color:var(--steel-200); cursor:pointer; border-left:3px solid transparent; transition:.12s background,.12s color;}
.sb-item:hover{background:rgba(255,255,255,.05); color:#fff;}
.sb-item.active{background:rgba(227,160,8,.1); border-left-color:var(--amber-500); color:#fff; font-weight:600;}
.sb-item .ic{width:18px; text-align:center; opacity:.85; font-size:13px;}
.sb-switch{margin:16px 20px 0; padding-top:14px; border-top:1px solid rgba(255,255,255,.08); flex-shrink:0;}
.sb-switch button{width:100%; background:transparent; border:1px solid rgba(255,255,255,.18); color:var(--steel-200); padding:9px; border-radius:8px; font-size:12px;}
.sb-switch button:hover{border-color:var(--amber-500); color:#fff;}

.main-col{display:flex; flex-direction:column; min-width:0; height:100%; overflow:hidden;}
.topbar{background:#fff; border-bottom:1px solid var(--line); padding:14px 30px; display:flex; align-items:center; justify-content:space-between; z-index:5; flex-wrap:wrap; gap:10px; row-gap:8px; flex-shrink:0; position:sticky; top:0;}
.tb-crumb{font-size:12px; color:var(--ink-soft);}
.tb-crumb b{color:var(--ink);}
.tb-title{font-family:var(--font-display); font-size:21px; margin-top:2px;}
.tb-right{display:flex; align-items:center; gap:12px;}
.tb-search-wrap{position:relative; flex:0 1 260px; min-width:110px;}
.tb-search{border:1px solid var(--line); border-radius:20px; padding:8px 14px; font-size:12.5px; color:var(--ink); background:var(--paper); width:100%;}
.tb-search:focus{outline:none; border-color:var(--amber-500); background:#fff;}
.search-results{position:absolute; top:calc(100% + 6px); left:0; width:340px; max-height:420px; overflow-y:auto; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 20px 40px -15px rgba(16,26,51,.3); z-index:50;}
.search-results .sr-item{padding:10px 14px; cursor:pointer; border-bottom:1px solid #EEF0F6;}
.search-results .sr-item:last-child{border-bottom:none;}
.search-results .sr-item:hover{background:var(--paper);}
.search-results .sr-type{font-size:9.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--amber-600); font-weight:700;}
.search-results .sr-label{font-size:13px; font-weight:600; color:var(--ink); margin-top:2px;}
.search-results .sr-sub{font-size:11px; color:var(--ink-soft); margin-top:1px;}
.search-results .sr-empty{padding:14px; text-align:center; font-size:12px; color:var(--ink-soft);}
.table-filter{margin-bottom:12px;}
.table-filter input{width:280px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-size:12.5px;}
.tb-user{font-size:12.5px; color:var(--ink-soft); text-align:right;}
.tb-avatar{width:34px;height:34px;border-radius:50%; background:var(--navy-700); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:700; font-family:var(--font-display);}
.content{padding:26px 30px 60px; flex:1; min-width:0; overflow-y:auto;}
.loading{padding:60px; text-align:center; color:var(--ink-soft);}

/* ---------- Reusable ---------- */
.kpi-row{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:14px; margin-bottom:22px;}
.kpi{background:var(--paper-card); border:1px solid var(--line); border-radius:var(--radius); padding:20px 22px 18px; position:relative; overflow:hidden; transition:.18s transform,.18s box-shadow; box-shadow:var(--shadow-card); animation:kpiRise .4s cubic-bezier(.2,.8,.3,1) backwards;}
.kpi:hover{transform:translateY(-3px); box-shadow:var(--shadow-card-hover);}
.kpi.clickable{cursor:pointer;}
.kpi::before{content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background:var(--kpi-accent, var(--amber-500));}
.kpi .lab{font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--ink-soft); font-weight:700;}
.kpi .val{font-family:var(--font-display); font-size:clamp(20px, 2.1vw, 30px); font-weight:700; margin-top:7px; color:var(--ink); letter-spacing:-.01em; white-space:nowrap;}
.kpi .delta{font-size:11.5px; margin-top:5px; font-weight:600; color:var(--ink-soft);}
.kpi-row .kpi:nth-child(1){animation-delay:.02s;} .kpi-row .kpi:nth-child(2){animation-delay:.07s;} .kpi-row .kpi:nth-child(3){animation-delay:.12s;} .kpi-row .kpi:nth-child(4){animation-delay:.17s;} .kpi-row .kpi:nth-child(5){animation-delay:.22s;} .kpi-row .kpi:nth-child(6){animation-delay:.27s;}
@keyframes kpiRise{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:translateY(0);}}

.panel{background:var(--paper-card); border:1px solid var(--line); border-radius:var(--radius); margin-bottom:20px; box-shadow:var(--shadow-card);}
.panel-head{display:flex; align-items:center; justify-content:space-between; padding:18px 22px; border-bottom:1px solid var(--line); gap:12px; flex-wrap:wrap;}
.panel-head h3{margin:0; font-family:var(--font-display); font-size:16.5px; font-weight:700; color:var(--ink);}
.panel-head .actions{display:flex; gap:8px; align-items:center;}
.panel-body{padding:20px 22px; overflow-x:auto;}
.btn-mini{border:1.5px solid var(--line); background:#fff; padding:8px 14px; border-radius:9px; font-size:12.5px; font-weight:600; color:var(--ink); transition:.15s border-color,.15s background,.15s box-shadow;}
.btn-mini:hover{border-color:var(--steel-300); box-shadow:0 2px 6px -2px rgba(16,26,51,.12);}
.btn-mini.amber{background:var(--amber-500); border-color:var(--amber-500); color:#fff; font-weight:700; box-shadow:0 2px 8px -2px rgba(227,160,8,.45);}
.btn-mini.amber:hover{background:var(--amber-600); border-color:var(--amber-600);}
.btn-mini.red{background:#fff; border-color:var(--red-600); color:var(--red-600);}
.btn-mini:disabled{opacity:.5; cursor:default;}

.grid-2{display:grid; grid-template-columns:1.4fr 1fr; gap:20px;}
.grid-2 > *{min-width:0;}
@media(max-width:1100px){.grid-2{grid-template-columns:1fr;}}

table{width:100%; border-collapse:collapse; font-size:13px;}
th{text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--ink-soft); padding:9px 10px; border-bottom:1px solid var(--line); font-weight:700;}
td{padding:10px 10px; border-bottom:1px solid #EEF0F6; vertical-align:middle;}
tr:last-child td{border-bottom:none;}
tr:hover td{background:#FAFBFD;}

.badge{display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; padding:4px 9px; border-radius:20px; white-space:nowrap;}
.badge.green{background:var(--green-100); color:var(--green-600);}
.badge.amber{background:var(--amber-100); color:var(--amber-600);}
.badge.red{background:var(--red-100); color:var(--red-600);}
.badge.blue{background:var(--blue-100); color:var(--blue-600);}
.badge.gray{background:#EEF0F6; color:var(--ink-soft);}

.ribbon{display:flex; align-items:flex-start; overflow-x:auto; padding:6px 2px 4px; gap:0;}
.ribbon-stage{display:flex; flex-direction:column; align-items:center; min-width:110px; position:relative; flex:1;}
.ribbon-stage .line{position:absolute; top:15px; left:-50%; width:100%; height:2px; background:var(--line); z-index:0;}
.ribbon-stage:first-child .line{display:none;}
.ribbon-stage.done .line{background:var(--amber-500);}
.ribbon-node{width:30px;height:30px;border-radius:50%; background:#fff; border:2px solid var(--line); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; color:var(--ink-soft); z-index:1; position:relative; cursor:pointer;}
.ribbon-stage.done .ribbon-node{background:var(--amber-500); border-color:var(--amber-500); color:var(--navy-900);}
.ribbon-stage.current .ribbon-node{border-color:var(--navy-800); color:var(--navy-800); box-shadow:0 0 0 4px var(--blue-100);}
.ribbon-label{font-size:10.5px; font-weight:700; margin-top:8px; text-align:center; color:var(--ink);}

.kanban{display:grid; grid-template-columns:repeat(5,1fr); gap:12px; overflow-x:auto;}
.kcol{background:var(--paper); border-radius:10px; padding:10px; min-width:150px;}
.kcol h4{font-size:11px; text-transform:uppercase; letter-spacing:.05em; margin:2px 4px 10px; color:var(--ink-soft); display:flex; justify-content:space-between;}
.kcard{background:#fff; border:1px solid var(--line); border-radius:8px; padding:10px; margin-bottom:8px; font-size:12px; box-shadow:0 1px 2px rgba(16,26,51,.04); cursor:grab;}
.kcard .kt{font-weight:700; margin-bottom:4px;}
.kcard .ks{color:var(--ink-soft); font-size:11px;}
.kcard-actions{display:flex; gap:5px; margin-top:7px;}
.kcard-actions button{font-size:10px; padding:3px 6px; border:1px solid var(--line); background:#fff; border-radius:5px;}

.progress{height:8px; background:#EEF0F6; border-radius:6px; overflow:hidden;}
.progress > div{height:100%; background:linear-gradient(90deg,var(--amber-600),var(--amber-500));}

.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.form-grid.narrow{grid-template-columns:1fr;}
.chips{display:flex; flex-wrap:wrap; gap:7px;}
.chip{background:var(--paper); border:1px solid var(--line); border-radius:20px; padding:5px 11px; font-size:11.5px; color:var(--ink-soft);}
.chip.on{background:var(--navy-800); color:#fff; border-color:var(--navy-800);}

.empty{text-align:center; padding:36px 20px; color:var(--ink-soft); font-size:13px;}
.err-box{background:var(--red-100); color:var(--red-600); border-radius:8px; padding:10px 14px; font-size:12.5px; margin-bottom:14px;}

/* Modal */
.modal-backdrop{position:fixed; inset:0; background:rgba(16,26,51,.5); display:flex; align-items:center; justify-content:center; z-index:100;}
.modal{background:#fff; border-radius:14px; width:100%; max-width:460px; padding:26px; max-height:86vh; overflow-y:auto; position:relative;}
.modal.modal-wide{max-width:760px;}
.photo-preview-circle{width:64px; height:64px; border-radius:50%; background:var(--paper); border:2px dashed var(--line); display:flex; align-items:center; justify-content:center; font-size:22px; overflow:hidden; flex-shrink:0;}
.photo-preview-circle img{width:100%; height:100%; object-fit:cover;}
.modal h3{margin:0 0 16px; font-family:var(--font-display); font-size:19px;}
.modal-actions{display:flex; gap:10px; justify-content:flex-end; margin-top:18px;}
.modal-actions .btn-mini{padding:9px 16px;}

/* Toast */
.toast{position:fixed; bottom:104px; right:24px; max-width:420px; background:var(--navy-900); color:#fff; padding:12px 18px; border-radius:9px; font-size:13px; line-height:1.5; white-space:pre-line; box-shadow:0 12px 30px -10px rgba(16,26,51,.5); z-index:200;}
.toast.err{background:var(--red-600);}

.attend-row{display:flex; align-items:center; gap:12px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; margin-bottom:8px;}
.attend-check{display:flex; align-items:center;}
.attend-check input, .row-check{width:16px; height:16px; cursor:pointer;}
.attend-info{flex:1;}
.bulk-toolbar{display:flex; align-items:center; gap:16px; flex-wrap:wrap; padding:10px 12px; background:var(--paper); border-radius:8px; margin-bottom:12px;}
.bulk-select-all{display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; cursor:pointer;}
.bulk-select-all input{width:16px; height:16px; cursor:pointer;}
.bulk-count{font-size:11.5px; color:var(--ink-soft);}
.bulk-actions{display:flex; gap:8px; margin-left:auto;}

/* ---------- Summary Report ---------- */
.report-header{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; padding-bottom:16px; border-bottom:2px solid var(--navy-800);}
.report-header .rh-brand{display:flex; align-items:center; gap:10px;}

.report-header .rh-title{font-family:var(--font-display); font-size:20px; font-weight:700;}
.report-header .rh-meta{text-align:right; font-size:11.5px; color:var(--ink-soft);}
.report-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:20px;}
.report-stat{background:var(--paper); border-radius:8px; padding:14px; text-align:center;}
.report-stat .rv{font-family:var(--font-display); font-size:24px; font-weight:700; color:var(--navy-800);}
.report-stat .rl{font-size:10.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-soft); margin-top:4px;}
.report-section-title{font-family:var(--font-display); font-size:15px; font-weight:700; margin:22px 0 10px; padding-top:14px; border-top:1px solid var(--line);}
.report-section-title:first-of-type{border-top:none; margin-top:0; padding-top:0;}
@media print{
  .sidebar, .topbar, .btn-mini, .panel-head .actions, .lang-switch, .notif-wrap, .theme-toggle, .hamburger{display:none !important;}
  .content{padding:0 !important;}
  .shell{grid-template-columns:1fr !important;}
  .panel{box-shadow:none !important; border:none !important;}
  body{background:#fff !important;}
}
.attend-row .an{font-weight:600; font-size:13px;}
.attend-row .as{font-size:11px; color:var(--ink-soft);}
.attend-btns{display:flex; gap:6px;}
.attend-btns button{font-size:11px; padding:5px 10px; border-radius:6px; border:1px solid var(--line); background:#fff;}
.attend-btns button.sel-present{background:var(--green-100); border-color:var(--green-600); color:var(--green-600);}
.attend-btns button.sel-absent{background:var(--red-100); border-color:var(--red-600); color:var(--red-600);}
.attend-btns button.sel-leave{background:var(--amber-100); border-color:var(--amber-600); color:var(--amber-600);}

/* Payment Gateway */
.pg-brand{display:flex; align-items:center; gap:12px; margin-bottom:18px;}
.pg-lock{width:38px;height:38px;border-radius:10px;background:var(--navy-800); color:var(--amber-500); display:flex; align-items:center; justify-content:center; font-size:16px;}
.pg-title{font-family:var(--font-display); font-weight:700; font-size:16px;}
.pg-sub{font-size:11px; color:var(--ink-soft);}
.pg-summary{background:var(--paper); border-radius:10px; padding:12px 14px; margin-bottom:16px;}
.pg-row{display:flex; justify-content:space-between; font-size:12.5px; padding:4px 0; color:var(--ink-soft);}
.pg-row b{color:var(--ink);}
.pg-row.pg-total{border-top:1px dashed var(--line); margin-top:6px; padding-top:8px; font-size:14px;}
.pg-row.pg-total b{color:var(--amber-600); font-size:16px;}
.pg-methods{display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:14px;}
.pg-method{border:1.5px solid var(--line); border-radius:9px; padding:10px 4px; text-align:center; cursor:pointer;}
.pg-method.active{border-color:var(--amber-500); background:var(--amber-100);}
.pg-mi{font-size:16px;}
.pg-ml{font-size:9.5px; margin-top:4px; font-weight:600; color:var(--ink-soft);}
.pg-note{font-size:10.5px; color:var(--steel-300); margin-top:12px; text-align:center; line-height:1.4;}
.pg-processing{position:absolute; inset:0; background:rgba(255,255,255,.96); border-radius:14px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; font-size:12.5px; color:var(--ink-soft);}
.pg-spinner{width:32px;height:32px;border:3px solid var(--line); border-top-color:var(--amber-500); border-radius:50%; animation:pgspin .8s linear infinite;}
@keyframes pgspin{to{transform:rotate(360deg);}}
.pg-success{text-align:center; padding:10px 0;}
.pg-check{width:56px;height:56px;border-radius:50%; background:var(--green-100); color:var(--green-600); font-size:26px; display:flex; align-items:center; justify-content:center; margin:0 auto 14px;}

/* ---------- Mobile navigation ---------- */
.hamburger{display:none; background:none; border:none; font-size:20px; color:var(--ink); padding:4px 10px 4px 0; cursor:pointer; line-height:1;}
.tb-left{display:flex; align-items:center;}
.sb-backdrop{display:none;}

/* =====================================================================
   RESPONSIVE BREAKPOINTS
===================================================================== */

/* ---- Tablet & below (~900px): stack two-column layouts ---- */
@media (max-width: 900px){
  #gate{flex-direction:column; min-height:auto;}
  .grid-2{grid-template-columns:1fr;}
  .grid-3{grid-template-columns:1fr 1fr;}
  .form-grid{grid-template-columns:1fr;}
  .kpi-row{grid-template-columns:repeat(2,1fr);}
  .gate-left{padding:40px 32px;}
  .gate-right{padding:32px;}
  .gate-hero h1{font-size:25px;}
  .gate-illustration{display:none;}
}

/* ---- Phone & narrow tablet (~760px): collapsible sidebar ---- */
@media (max-width: 760px){
  .shell{grid-template-columns:1fr;}
  .hamburger{display:inline-block;}
  .sidebar{
    position:fixed; top:0; left:0; height:100vh; width:270px; z-index:60;
    transform:translateX(-100%); transition:transform .22s ease; box-shadow:20px 0 40px -20px rgba(0,0,0,.4);
  }
  .sidebar.open{transform:translateX(0);}
  .sb-backdrop{
    display:none; position:fixed; inset:0; background:rgba(16,26,51,.5); z-index:55;
  }
  .sb-backdrop.show{display:block;}
  .topbar{padding:12px 16px; flex-wrap:wrap; gap:10px;}
  .tb-title{font-size:18px;}
  .tb-search-wrap{flex-basis:150px;}
  .tb-user{display:none;}
  .content{padding:16px;}
  .kpi-row{grid-template-columns:1fr 1fr;}
  .kpi .val{font-size:21px;}
  .panel-head{flex-direction:column; align-items:flex-start; gap:10px;}
  .panel-head .actions{width:100%; flex-wrap:wrap;}
  .panel-body table{min-width:560px;}
  .kanban{grid-template-columns:1fr; }
  .kcol{min-width:0;}
  .modal{max-width:calc(100vw - 32px) !important; padding:20px;}
  .modal-backdrop{padding:16px;}
  .search-results{width:calc(100vw - 32px); left:auto; right:0;}
}

/* ---- Small phones (~480px) ---- */
@media (max-width: 480px){
  .gate-left{padding:28px 20px;}
  .gate-right{padding:20px;}
  .login-card{padding:24px 20px;}
  .gate-hero h1{font-size:21px;}
  .brand-logo-gate{height:38px;}
  .kpi-row{grid-template-columns:1fr;}
  .pg-methods{grid-template-columns:repeat(2,1fr);}
  .tb-search{width:120px; font-size:11.5px;}
  .tb-title{font-size:16px;}
  .role-grid{grid-template-columns:1fr;}
  .chips{gap:5px;}
}

/* ---------- Notification bell ---------- */
.notif-wrap{position:relative;}
.notif-bell{background:none; border:1px solid var(--line); border-radius:8px; font-size:15px; padding:6px 10px; cursor:pointer; position:relative;}
.notif-bell:hover{border-color:var(--amber-500);}
.notif-badge{position:absolute; top:-6px; right:-6px; background:var(--red-600); color:#fff; font-size:9.5px; font-weight:700; border-radius:10px; padding:1px 5px; min-width:16px; text-align:center;}
.notif-dropdown{position:absolute; top:calc(100% + 8px); right:0; width:360px; max-height:440px; overflow-y:auto; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 20px 40px -15px rgba(16,26,51,.3); z-index:60;}
.notif-head{display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border-bottom:1px solid var(--line); font-weight:700; font-size:13px;}
.notif-head button{font-size:11px; color:var(--amber-600); background:none; border:none; cursor:pointer; font-weight:600;}
.notif-item{padding:11px 14px; border-bottom:1px solid #EEF0F6; cursor:pointer; display:flex; gap:10px; align-items:flex-start;}
.notif-item:hover{background:var(--paper);}
.notif-item.read{opacity:.5;}
.notif-dot{width:8px; height:8px; border-radius:50%; margin-top:5px; flex-shrink:0;}
.notif-dot.red{background:var(--red-600);} .notif-dot.amber{background:var(--amber-600);} .notif-dot.blue{background:var(--blue-600);}
.notif-title{font-size:12.5px; font-weight:700;}
.notif-msg{font-size:11.5px; color:var(--ink-soft); margin-top:2px;}
.notif-empty{padding:30px 14px; text-align:center; color:var(--ink-soft); font-size:12.5px;}

/* ---------- Dark mode toggle ---------- */
.theme-toggle{background:none; border:1px solid var(--line); border-radius:8px; font-size:14px; padding:6px 10px; cursor:pointer;}
.theme-toggle:hover{border-color:var(--amber-500);}

/* ---------- Dark theme ---------- */
body[data-theme="dark"]{
  --paper:#0F1626; --paper-card:#182338; --line:#2A3752; --ink:#E8ECF5; --ink-soft:#9AA7C2;
  --steel-300:#5B79AE; --steel-200:#3D4F72;
}
body[data-theme="dark"] .topbar{background:var(--paper-card); border-bottom-color:var(--line);}
body[data-theme="dark"] .tb-search{background:var(--paper); color:var(--ink); border-color:var(--line);}
body[data-theme="dark"] .search-results,
body[data-theme="dark"] .notif-dropdown,
body[data-theme="dark"] .modal{background:var(--paper-card); color:var(--ink);}
body[data-theme="dark"] tr:hover td{background:rgba(255,255,255,.03);}
body[data-theme="dark"] .btn-mini{background:var(--paper-card); color:var(--ink); border-color:var(--line);}
body[data-theme="dark"] .sidebar{background:#0A0F1D;}
body[data-theme="dark"] .field input, body[data-theme="dark"] .field select, body[data-theme="dark"] .field textarea{background:var(--paper); color:var(--ink); border-color:var(--line);}
body[data-theme="dark"] .table-filter input{background:var(--paper); color:var(--ink); border-color:var(--line);}

.smtp-hint{background:var(--blue-100); color:var(--navy-800); border-radius:8px; padding:10px 14px; font-size:12px; margin-bottom:16px; line-height:1.5;}
.field-hint{font-size:10.5px; color:var(--ink-soft); margin-top:5px; line-height:1.4;}
.field-hint b{color:var(--amber-600);}
.insecure-tls-toggle{display:flex; align-items:flex-start; gap:8px; font-size:12px; font-weight:600; margin-top:14px; cursor:pointer; line-height:1.4;}
.insecure-tls-toggle input{width:16px; height:16px; margin-top:1px; cursor:pointer; flex-shrink:0;}
.insecure-tls-toggle .muted{font-weight:400; font-size:11px;}

/* ---------- Interactive charts ---------- */
@keyframes barGrow{to{height:var(--bar-h); y:var(--bar-y);}}
@keyframes dotPop{from{r:0; opacity:0;} to{r:3.5; opacity:1;}}
@keyframes lineDraw{to{stroke-dashoffset:0;}}
@keyframes donutSweep{from{opacity:0;} to{opacity:1;}}
.chart-val-label{opacity:0; animation:fadeIn .3s ease forwards;}
@keyframes fadeIn{to{opacity:1;}}
.chart-bar{cursor:pointer; transition:filter .15s, opacity .15s;}
.chart-bar:hover, .chart-bar.chart-hover{filter:brightness(1.12) saturate(1.1); opacity:1;}
.chart-dot{cursor:pointer; transition:r .15s;}
.chart-dot:hover, .chart-dot.chart-hover{r:5.5;}
.chart-donut-seg{cursor:pointer; transition:stroke-width .15s, opacity .15s; transform-box:view-box; transform-origin:0 0;} /* explicit: the segment's own rotate(-90 cx cy) must not be re-centred by a browser default */
.chart-donut-seg:hover, .chart-donut-seg.chart-hover{filter:brightness(1.1); opacity:1;}
.chart-legend-item{transition:.12s opacity; border-radius:6px; padding:2px 4px; margin-left:-4px;}
.chart-legend-item:hover{background:var(--paper);}

.chart-tooltip{
  position:fixed; z-index:200; background:var(--navy-900); color:#fff; padding:8px 12px; border-radius:8px;
  font-size:12px; pointer-events:none; opacity:0; transform:translateY(4px); transition:opacity .12s, transform .12s;
  box-shadow:0 12px 28px -10px rgba(16,26,51,.5); max-width:220px;
}
.chart-tooltip.show{opacity:1; transform:translateY(0);}
.chart-tooltip .ct-label{font-size:10.5px; color:var(--steel-200); text-transform:uppercase; letter-spacing:.04em; margin-bottom:2px;}
.chart-tooltip .ct-value{font-weight:700; font-family:var(--font-display); font-size:13.5px;}


/* ---------- Chat Assistant widget ---------- */
.chat-widget{position:fixed; bottom:24px; right:24px; z-index:200;}
.chat-fab{
  position:relative; width:64px; height:64px; border-radius:50%; border:3px solid #fff; cursor:pointer; color:#fff; padding:0;
  background:linear-gradient(150deg, var(--amber-500), var(--amber-600));
  box-shadow:0 10px 28px -6px rgba(227,160,8,.7), 0 3px 8px rgba(16,26,51,.25);
  display:flex; align-items:center; justify-content:center; transition:.18s transform, .18s box-shadow;
}
.chat-fab::after{content:""; position:absolute; inset:-3px; border-radius:50%; border:3px solid var(--amber-500); opacity:0; animation:chatPulse 2.6s ease-out 3; pointer-events:none;}
@keyframes chatPulse{0%{transform:scale(1); opacity:.6;} 100%{transform:scale(1.55); opacity:0;}}
.chat-fab:hover{transform:scale(1.07); box-shadow:0 14px 32px -6px rgba(227,160,8,.8), 0 3px 8px rgba(16,26,51,.25);}
.chat-fab:focus-visible{outline:3px solid var(--navy-900); outline-offset:3px;}
.chat-fab svg{width:32px; height:32px; pointer-events:none; filter:drop-shadow(0 1px 1px rgba(0,0,0,.18));}
.chat-fab-x{display:none;} .chat-widget.open .chat-fab-ic{display:none;} .chat-widget.open .chat-fab-x{display:block; width:26px; height:26px;}
.chat-fab-label{position:absolute; bottom:-7px; left:50%; transform:translateX(-50%); background:var(--navy-900); color:#fff; font-size:10.5px; font-weight:800; letter-spacing:.04em; padding:2px 8px; border-radius:99px; pointer-events:none; box-shadow:0 2px 6px rgba(16,26,51,.3);}
.chat-widget.open .chat-fab-label{display:none;}
.chat-panel{
  position:absolute; bottom:80px; right:0; width:360px; max-height:520px;
  background:var(--paper-card); border:1px solid var(--line); border-radius:16px;
  box-shadow:0 20px 50px -12px rgba(16,26,51,.35);
  display:flex; flex-direction:column; overflow:hidden;
}
.chat-panel-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid var(--line); background:var(--navy-900); color:#fff;
}
.chat-panel-head .muted{color:#AEB9D9;}
.chat-close-btn{background:none; border:none; color:#AEB9D9; font-size:15px; cursor:pointer; padding:4px;}
.chat-close-btn:hover{color:#fff;}
.chat-messages{flex:1; overflow-y:auto; padding:14px 16px; display:flex; flex-direction:column; gap:10px; min-height:200px; max-height:320px;}
.chat-msg{max-width:85%; padding:9px 12px; border-radius:12px; font-size:13px; line-height:1.5;}
.chat-msg.user{align-self:flex-end; background:var(--amber-500); color:#fff; border-bottom-right-radius:3px;}
.chat-msg.bot{align-self:flex-start; background:var(--paper); color:var(--ink); border:1px solid var(--line); border-bottom-left-radius:3px; white-space:pre-wrap;}
.chat-msg.bot b{color:var(--navy-900);}
body[data-theme="dark"] .chat-msg.bot b{color:var(--amber-500);}
.chat-suggestions{display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 10px;}
.chat-suggestion-chip{
  font-size:11px; padding:5px 10px; border-radius:20px; border:1px solid var(--line);
  background:var(--paper); color:var(--ink-soft); cursor:pointer; white-space:nowrap;
}
.chat-suggestion-chip:hover{border-color:var(--amber-500); color:var(--amber-600);}
.chat-input-row{display:flex; gap:8px; padding:12px 14px; border-top:1px solid var(--line);}
.chat-input-row input{
  flex:1; border:1px solid var(--line); border-radius:9px; padding:8px 12px; font-size:12.5px;
  background:var(--paper-card); color:var(--ink);
}
.chat-input-row input:focus{outline:none; border-color:var(--amber-500);}
.chat-typing{align-self:flex-start; font-size:12px; color:var(--ink-soft); padding:4px 12px;}
@media (max-width:520px){
  .chat-panel{width:calc(100vw - 32px); right:-8px;}
  .chat-widget{bottom:16px; right:16px;}
}

/* ---------- Login screen redesign: light left panel ---------- */
.gate-left-light{
  background:
    radial-gradient(circle at 12% 15%, rgba(227,160,8,.10), transparent 40%),
    radial-gradient(circle at 90% 85%, rgba(16,26,51,.06), transparent 45%),
    linear-gradient(160deg, #F7F9FC, #EEF1F7 55%, #E8ECF4);
  color:var(--ink);
  position:relative;
}
.gate-left-light .gate-foot-light{color:var(--ink-soft);}
.lang-switch-float{position:absolute; top:22px; right:32px;}
.hl-navy{color:var(--navy-900);}
.hl-amber{color:var(--amber-600);}
.gate-left-light .gate-hero h1{color:var(--navy-900); font-size:28px; line-height:1.15; margin:8px 0 10px;}
.gate-left-light .gate-hero-sub{font-size:13.5px; line-height:1.5; color:var(--ink-soft); margin:0; max-width:480px;}
.gate-feature-row{display:flex; gap:10px; margin-top:16px; flex-wrap:nowrap; max-width:560px;}
.gate-feature-card{
  background:#fff; border-radius:12px; padding:10px 9px; flex:1 1 0; min-width:0;
  box-shadow:0 6px 18px -10px rgba(16,26,51,.18); border:1px solid rgba(16,26,51,.05);
}
.gfc-icon{font-size:18px; margin-bottom:3px;}
.gfc-label{font-weight:700; font-size:12.5px; color:var(--navy-900);}
.gfc-sub{font-size:10.5px; color:var(--ink-soft); margin-top:2px; line-height:1.3;}
.gate-illustration-light{margin-top:8px; max-width:340px; opacity:.92;}

/* ---------- Sign-in card: role icon grid ---------- */
.demo-accounts-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:18px;}
.demo-acc-tile{
  display:flex; align-items:center; gap:10px; padding:13px 14px; text-align:left;
  border:1.5px solid var(--line); border-radius:10px; cursor:pointer; transition:.15s border-color,.15s background;
}
.demo-acc-tile:hover, .demo-acc-tile.active{border-color:var(--amber-500); background:var(--amber-100);}
.dat-icon{font-size:19px; flex-shrink:0;}
.demo-acc-tile .da-role{font-weight:700; font-size:12.5px; color:var(--navy-900);}
.gate-divider{display:flex; align-items:center; gap:10px; margin:4px 0 18px; font-size:10.5px; letter-spacing:.06em; color:var(--ink-soft); text-transform:uppercase;}
.gate-divider::before, .gate-divider::after{content:""; flex:1; height:1px; background:var(--line);}
.gate-row-between{display:flex; align-items:center; justify-content:space-between; margin:-4px 0 16px; font-size:12.5px;}
.remember-me-label{display:flex; align-items:center; gap:6px; color:var(--ink-soft); cursor:pointer;}
.remember-me-label input{cursor:pointer;}
.gate-row-between a{color:var(--navy-700); text-decoration:none; font-weight:600;}
.gate-row-between a:hover{text-decoration:underline;}

@media (max-width:860px){
  .gate-feature-row{display:none;}
  .lang-switch-float{position:static; margin-bottom:16px;}
}

/* ---------- Login card: icon-prefixed inputs, arrow button ---------- */
.input-icon-wrap{position:relative;}
.input-icon-wrap .input-icon{position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; opacity:.55; pointer-events:none;}
.input-icon-wrap input{padding-left:36px !important;}
.input-icon-toggle{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  background:none; border:none; cursor:pointer; font-size:14px; opacity:.55; padding:4px;
}
.input-icon-toggle:hover{opacity:.85;}
.btn-primary-arrow{display:flex; align-items:center; justify-content:center; gap:8px;}
.btn-arrow{transition:.15s transform;}
.btn-primary-arrow:hover .btn-arrow{transform:translateX(3px);}

/* ---------- Keep the login screen to a single view on short screens ---------- */
@media (max-height:0px) and (min-width:861px){
  .gate-illustration-light{display:none;}
  .gate-left{padding:28px 56px;}
}
@media (max-height:0px) and (min-width:861px){
  .gate-feature-row{display:none;}
  .login-card{padding:24px;}
}

/* ---------- Height-aware scaling: roomy on tall screens, tight on short ones ---------- */
@media (min-width:861px){
  .gate-left{justify-content:space-between; padding:clamp(22px,4.5vh,52px) clamp(32px,4vw,64px); gap:0;}
  .gate-stack{display:flex; flex-direction:column; gap:clamp(10px,2.4vh,28px); flex:1; justify-content:center; min-height:0;}
  .gate-stack .gate-mark{margin:0;}
  .gate-stack .brand-logo-gate{height:clamp(42px,6.5vh,66px);}
  .gate-stack .gate-hero{margin:0;}
  .gate-stack .gate-hero .eyebrow{margin-bottom:clamp(6px,1.2vh,12px);}
  .gate-left-light .gate-hero h1{font-size:clamp(26px,4.4vh,42px); margin:0 0 clamp(6px,1.4vh,14px);}
  .gate-left-light .gate-hero-sub{font-size:clamp(13px,1.9vh,16px);}
  .gate-stack .gate-feature-row{margin-top:0;}
  .gate-stack .gate-illustration-light{margin-top:0; width:min(100%, 480px, 38vh*1.76); max-width:none;}
  .gate-stack .gate-illustration-light svg{width:100%; height:auto; display:block;}
}
@media (min-width:861px) and (max-height:800px){
  .gate-illustration-light{display:block !important; width:min(100%, 480px, 30vh*1.76) !important;}
}
@media (min-width:861px) and (max-height:700px){
  .gate-stack .gate-illustration-light{display:none !important;}
}
@media (min-width:861px) and (max-height:600px){
  .gate-stack .gate-feature-row{display:none;}
}

/* =====================================================================
   v3 REDESIGN — login screen + app shell + Head Office dashboard
   (matches the supplied design mockups; appended last so it wins)
===================================================================== */
:root{
  --paper:#F5F9FE; --line:#E3EBF7;
  --shell-navy:#001A47; --shell-blue:#0053E5; --ink-navy:#0B1D44; --muted-blue:#4B5A78;
  --brand-orange:#FE530C; --brand-navy:#1B447C;
}
.ico{width:18px; height:18px; fill:currentColor; flex-shrink:0; display:inline-block; vertical-align:middle;}
.hidden{display:none !important;}

/* ---------- Language dropdown (login + topbar) ---------- */
.lang-dd{position:relative; display:inline-block;}
.lang-dd-btn{display:flex; align-items:center; gap:8px; background:#fff; border:1px solid #dfe8f6; border-radius:999px; padding:9px 14px; font-weight:700; font-size:14px; color:var(--ink-navy); cursor:pointer; box-shadow:0 6px 16px -10px rgba(16,40,90,.35);}
.lang-dd-btn:hover{border-color:#b9cdf0;}
.lang-dd-btn .chev{width:16px; height:16px; opacity:.7;}
.lang-dd-menu{position:absolute; right:0; top:calc(100% + 6px); min-width:150px; background:#fff; border:1px solid #dfe8f6; border-radius:12px; box-shadow:0 18px 36px -14px rgba(16,40,90,.35); padding:6px; z-index:80;}
.lang-dd-menu .lang-btn{display:block; width:100%; text-align:left; background:none; border:none; padding:9px 12px; border-radius:8px; font-size:14px; color:var(--ink-navy); cursor:pointer;}
.lang-dd-menu .lang-btn:hover{background:#eef4fd;}
.lang-dd-menu .lang-btn.active{background:#e3eeff; font-weight:700; color:#0b3d91;}

/* ---------- App shell: sidebar ---------- */
.shell{grid-template-columns:276px 1fr;}
.shell.collapsed{grid-template-columns:0 1fr;} .shell.collapsed .sidebar{display:none;}
.sidebar{background:linear-gradient(180deg,#001a47 0%,#03225b 60%,#0a3270 100%); padding:0; color:#fff;}
.sb-brand{background:#fff; padding:14px 22px 11px; border-bottom:none; margin:0; display:block; flex-shrink:0;}
.sb-logo{height:46px; width:auto; display:block;}
.sb-logo-tag{margin-top:3px; font-size:9.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--brand-navy); font-weight:800;}
.sb-persona{padding:18px 18px 6px; flex-shrink:0;}
.sb-persona-box{display:flex; align-items:center; gap:12px; border:1px solid rgba(255,255,255,.2); border-radius:13px; padding:11px 14px; background:rgba(255,255,255,.04);}
.sbp-ic .ico{width:30px; height:30px; fill:#f5b942;}
.sbp-role{font-weight:800; font-size:16px; line-height:1.15;} .sbp-sub{font-size:11.5px; color:#9fb4dd; margin-top:2px;}
#sbNav{flex:1; min-height:0; overflow-y:auto; padding-bottom:10px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.2) transparent;}
.sb-group-title{font-size:11px; letter-spacing:.13em; color:#8fb0ec; padding:18px 24px 7px; font-weight:800;}
.sb-item{margin:2px 14px; padding:11px 14px; border-radius:11px; border-left:none; gap:14px; font-size:14.5px; color:#dfe8fb;}
.sb-item:hover{background:rgba(255,255,255,.08); color:#fff;}
.sb-item.active{background:var(--shell-blue); color:#fff; font-weight:700; box-shadow:0 10px 20px -10px rgba(0,83,229,.9);}
.sb-item .ic{width:20px; height:20px; display:flex; align-items:center; justify-content:center; opacity:1; font-size:14px;}
.sb-item .ic .ico{width:20px; height:20px;}
.sb-switch{margin:8px 18px 18px; padding:0; border-top:none;}
.sb-switch button{display:flex; align-items:center; justify-content:center; gap:10px; width:100%; padding:13px; border-radius:12px; border:1px solid rgba(255,255,255,.3); background:transparent; color:#fff; font-size:14.5px; font-weight:600; cursor:pointer;}
.sb-switch button:hover{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.5);}

/* ---------- App shell: top bar + page header ---------- */
.topbar{background:#fff; height:72px; padding:0 26px; border-bottom:1px solid #e6edf8; display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:18px; position:relative;}
.tb-left{display:flex; align-items:center; gap:16px; flex:1; min-width:0;}
.hamburger{display:inline-flex; background:none; border:none; color:#36456a; padding:6px; cursor:pointer; border-radius:8px;}
.hamburger:hover{background:#eef4fd;} .hamburger .ico{width:24px; height:24px;}
.tb-search-wrap{position:relative; flex:0 1 640px; min-width:140px;}
.tb-search-ic{position:absolute; left:17px; top:50%; transform:translateY(-50%); width:20px; height:20px; fill:#5b6a86; pointer-events:none;}
.tb-search{height:46px; border-radius:999px; border:1px solid #e1e9f6; background:#f3f7fd; padding:0 18px 0 46px; font-size:14px; width:100%; color:var(--ink-navy);}
.tb-search:focus{outline:none; border-color:#2b6fd6; background:#fff; box-shadow:0 0 0 3px rgba(43,111,214,.12);}
.tb-right{display:flex; align-items:center; gap:14px;}
.topbar .lang-dd-btn{box-shadow:none; padding:8px 13px;}
.theme-toggle{width:40px; height:40px; border-radius:50%; border:none; background:none; color:#36456a; display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;}
.theme-toggle:hover,.notif-bell:hover{background:#eef4fd;}
.theme-toggle .ico,.notif-bell .ico{width:24px; height:24px;}
.notif-bell{width:42px; height:42px; border:none; border-radius:50%; background:none; color:#36456a; display:flex; align-items:center; justify-content:center; padding:0; position:relative;}
.notif-badge{top:2px; right:1px; background:#e5392b; border:2px solid #fff; padding:0 4px; min-width:19px; line-height:15px; font-size:10.5px;}
.tb-profile{display:flex; align-items:center; gap:11px; padding-left:6px;}
.tb-avatar{width:44px; height:44px; font-size:15px; background:#0b2a6f; order:0;}
.tb-user{font-size:12.5px; color:#5b6a86; text-align:left; line-height:1.3; white-space:nowrap;}
.tb-user b{display:block; font-size:14.5px; color:var(--ink-navy);}
.scroll-area{flex:1; min-height:0; overflow-y:auto;}
.scroll-area .content{overflow:visible; flex:none; padding:4px 30px 60px;}
.page-head{position:relative; padding:22px 30px 14px; display:flex; align-items:flex-end; justify-content:space-between; min-height:86px; overflow:hidden;}
.page-head.with-banner{min-height:138px; background:linear-gradient(90deg,#f5f9fe 0%,#ecf3fd 100%);}
.ph-text{position:relative; z-index:1;}
.page-head .tb-crumb{font-size:14px; color:var(--muted-blue);} .page-head .tb-crumb b{color:var(--ink-navy);}
.page-head .tb-title{font-family:var(--font-display); font-size:clamp(26px,2.6vw,36px); font-weight:800; color:var(--ink-navy); letter-spacing:-.02em; margin-top:4px; line-height:1.1;}
.ph-sub{font-size:16px; color:var(--muted-blue); margin-top:8px;} .ph-sub:empty{display:none;}
.ph-art{display:none; position:absolute; right:40px; bottom:0; height:100%; width:auto; max-width:60%; opacity:.9;}
.page-head.with-banner .ph-art{display:block;}

/* ---------- Cards / panels ---------- */
.panel{border-radius:16px; border:1px solid #e3ebf7; box-shadow:0 1px 2px rgba(16,40,90,.04), 0 10px 24px -16px rgba(16,40,90,.16);}
.panel-head{border-bottom:1px solid #edf2fa;}
.panel-head h3{display:flex; align-items:center; gap:10px; color:var(--ink-navy); font-weight:800;}
.ph-ic{width:34px; height:34px; border-radius:9px; background:#e6f0ff; color:#1d5fd8; display:inline-flex; align-items:center; justify-content:center;}
.ph-ic .ico{width:20px; height:20px;}
.ph-ic.red{background:#ffe9e0; color:#f25c1d;} .ph-ic.amber{background:#fff1d6; color:#e08a00;}
.kpi{border-radius:16px; background:color-mix(in srgb, var(--kpi-accent, #1d5fd8) 6%, #fff); border-color:color-mix(in srgb, var(--kpi-accent, #1d5fd8) 14%, #fff);}
.kpi::before{width:0;}
.grid-main{display:grid; grid-template-columns:minmax(0,1.9fr) minmax(0,1fr); gap:20px; margin-bottom:0;}
.grid-main > .panel{margin-bottom:20px;}
@media (max-width:1100px){ .grid-main{grid-template-columns:1fr;} }

/* HO KPI cards */
.kpi-grid{display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px; margin:6px 0 22px;}
.kpi-card{display:flex; align-items:center; gap:14px; padding:18px 16px; border-radius:16px; background:var(--kc-bg); border:1px solid var(--kc-bd); position:relative; transition:transform .15s, box-shadow .15s; min-width:0;}
.kpi-card.clickable{cursor:pointer;} .kpi-card.clickable:hover{transform:translateY(-3px); box-shadow:0 16px 28px -18px rgba(16,40,90,.35);}
.kc-ic{width:52px; height:52px; border-radius:14px; background:var(--kc-tile); color:var(--kc-fg); display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.kc-ic .ico{width:28px; height:28px;}
.kc-body{min-width:0; flex:1;}
.kc-lab{font-size:11px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--muted-blue); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.kc-val{font-size:clamp(22px,1.9vw,30px); font-weight:800; color:var(--ink-navy); line-height:1.15; margin-top:2px; white-space:nowrap;}
.kc-sub{font-size:11.5px; color:#5b6a86; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.kc-chev{width:18px; height:18px; fill:#8a98b5; flex-shrink:0;}
@media (max-width:1400px){ .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (max-width:760px){ .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));} .kc-ic{width:42px;height:42px;} .kc-ic .ico{width:22px;height:22px;} .kpi-card{padding:14px 12px; gap:10px;} }

/* Network Summary */
.ns-note{font-size:11.5px; color:#6b7a99; margin:-4px 0 12px;}
.ns-row{display:grid; grid-template-columns:minmax(0,1.5fr) 34px minmax(0,1.2fr) 44px 16px; align-items:center; gap:10px; padding:9px 12px; border-radius:13px; background:#f4f8fe; margin-bottom:10px;}
.ns-label{display:flex; align-items:center; gap:11px; font-size:14px; font-weight:600; color:var(--ink-navy); min-width:0;}
.ns-ic{width:34px; height:34px; border-radius:9px; display:flex; align-items:center; justify-content:center; background:#fff; color:var(--c); flex-shrink:0;} .ns-ic .ico{width:21px; height:21px;}
.ns-count{font-weight:800; font-size:17px; color:var(--ink-navy); text-align:right;}
.ns-bar{height:6px; border-radius:99px; background:#dfe8f6; overflow:hidden;} .ns-bar > span{display:block; height:100%; border-radius:99px; background:var(--c);}
.ns-pct{font-size:11.5px; color:#6b7a99; text-align:right;}
.ns-go{width:16px; height:16px; fill:#8a98b5;}
.ns-row.clickable{cursor:pointer;} .ns-row.clickable:hover{background:#eaf2fe;}

/* Compliance alerts */
.ca-row{display:flex; align-items:center; gap:12px; padding:12px 2px; border-bottom:1px solid #edf2fa;} .ca-row:last-child{border-bottom:none;}
.ca-ic{width:24px; height:24px; fill:#5b6a86; flex-shrink:0;}
.ca-main{flex:1; min-width:0;} .ca-t{font-weight:700; font-size:13.5px; color:var(--ink-navy); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} .ca-s{font-size:12px; color:#6b7a99; margin-top:2px;}
.sev{font-size:11.5px; font-weight:700; padding:4px 12px; border-radius:99px; flex-shrink:0;}
.sev.high{background:#ffe3e0; color:#d4321f;} .sev.medium{background:#fff0cf; color:#b86e00;} .sev.low{background:#e0ecff; color:#1d5fd8;}

/* ---------- Mobile shell ---------- */
@media (max-width:760px){
  .shell{grid-template-columns:1fr;}
  .topbar{padding:0 12px; gap:8px; height:64px;}
  .tb-user{display:none;} .tb-search-wrap{flex-basis:120px;}
  .topbar .lang-dd-btn .lang-dd-cur{display:none;}
  .scroll-area .content{padding:4px 14px 40px;} .page-head{padding:16px 14px 10px;}
  .ph-art{display:none !important;}
}

/* ---------- Dark mode touches for the new components ---------- */
body[data-theme="dark"]{--paper:#0b1220; --line:#1f2b45;}
body[data-theme="dark"] .topbar{background:#0f1729; border-bottom-color:#1f2b45;}
body[data-theme="dark"] .tb-search{background:#0b1220; border-color:#1f2b45; color:#e5ecfb;}
body[data-theme="dark"] .page-head.with-banner{background:linear-gradient(90deg,#0b1220,#0f1a33);}
body[data-theme="dark"] .page-head .tb-title,body[data-theme="dark"] .page-head .tb-crumb b,body[data-theme="dark"] .kc-val,body[data-theme="dark"] .ns-label,body[data-theme="dark"] .ns-count,body[data-theme="dark"] .ca-t,body[data-theme="dark"] .tb-user b{color:#e8eefb;}
body[data-theme="dark"] .kpi-card{background:#101a30 !important; border-color:#1f2b45 !important;}
body[data-theme="dark"] .ns-row{background:#101a30;} body[data-theme="dark"] .ns-ic{background:#0b1220;}
body[data-theme="dark"] .lang-dd-btn,body[data-theme="dark"] .lang-dd-menu{background:#101a30; border-color:#1f2b45; color:#e8eefb;}
body[data-theme="dark"] .lang-dd-menu .lang-btn{color:#e8eefb;} body[data-theme="dark"] .lang-dd-menu .lang-btn:hover{background:#17223d;}
body[data-theme="dark"] .panel{border-color:#1f2b45;} body[data-theme="dark"] .panel-head{border-bottom-color:#1f2b45;}
body[data-theme="dark"] .theme-toggle,body[data-theme="dark"] .notif-bell,body[data-theme="dark"] .hamburger{color:#c9d6f2;}

/* ---- v3 dashboard fine-tuning ---- */
.kpi-card{padding:16px 14px; gap:12px;}
.kc-ic{width:46px; height:46px; border-radius:13px;} .kc-ic .ico{width:25px; height:25px;}
.kc-lab{font-size:10.5px; letter-spacing:.05em; white-space:normal; line-height:1.2; overflow:visible;}
.kc-val{font-size:clamp(20px,1.5vw,26px);}
.kc-chev{position:absolute; right:9px; top:50%; transform:translateY(-50%); width:16px; height:16px;}
.kc-body{padding-right:6px;}
.ns-row{grid-template-columns:minmax(0,1.8fr) 26px minmax(0,1fr) 38px 14px; gap:8px;}
.ns-label{font-size:13.5px;}
@media (max-width:1759px){ .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media (max-width:760px){ .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));} }
.shell.collapsed{grid-template-columns:1fr;}


/* ---- v3.1: centred copyright footer + sidebar header aligned with the top bar ---- */
.topbar{box-sizing:border-box; height:72px;}
.sb-brand{box-sizing:border-box; height:72px; padding:0 22px; display:flex; flex-direction:column; justify-content:center; border-bottom:1px solid #e6edf8;}
.sb-logo{height:32px;}
.sb-logo-tag{margin-top:3px; font-size:8.5px; letter-spacing:.13em; line-height:1;}

/* =====================================================================
   v3.2 — QR codes + full-record page
===================================================================== */
.idc-card{position:relative;}
.idc-qr{position:absolute; right:10px; bottom:22px; width:54px; height:54px; background:#fff; line-height:0;}
.idc-qr svg{width:100%; height:100%;}

.qr-dialog{text-align:center; padding:6px 0 2px;}
.qr-dialog svg{border:1px solid #e3ebf7; border-radius:10px; padding:6px; background:#fff;}
.qr-url{font-size:11.5px; color:#5b6a86; word-break:break-all; margin-top:8px; user-select:all;}
.qr-actions{display:flex; gap:8px; justify-content:center; flex-wrap:wrap;}

.prof-head{display:flex; align-items:center; gap:22px; padding:22px 24px; margin-bottom:18px; flex-wrap:wrap;}
.prof-avatar{width:92px; height:92px; border-radius:50%; background:#0b2a6f; color:#fff; display:flex; align-items:center; justify-content:center; font-size:30px; font-weight:800; overflow:hidden; flex-shrink:0; border:3px solid #fff; box-shadow:0 8px 20px -10px rgba(16,40,90,.5);}
.prof-avatar img{width:100%; height:100%; object-fit:cover;}
.prof-id{flex:1; min-width:220px;}
.prof-name{font-size:26px; font-weight:800; color:var(--ink-navy); display:flex; align-items:center; gap:10px; flex-wrap:wrap;}
.prof-meta{font-size:14.5px; color:var(--muted-blue); margin-top:4px;}
.prof-school{font-size:13px; color:#6b7a99; margin-top:2px;}
.prof-actions{display:flex; gap:8px; margin-top:12px; flex-wrap:wrap;}
.prof-qr{text-align:center; font-size:11px; color:#6b7a99; flex-shrink:0;}
.prof-qr svg{display:block; border:1px solid #e3ebf7; border-radius:10px; padding:4px; background:#fff; margin-bottom:4px;}
.prof-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; margin-bottom:18px;}
.prof-stat{background:#f4f8fe; border:1px solid #e1ecfc; border-radius:14px; padding:14px 16px;}
.prof-stat .l{font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted-blue);}
.prof-stat .v{font-size:26px; font-weight:800; color:var(--ink-navy); line-height:1.2; margin-top:2px;}
.prof-stat .s{font-size:12px; color:#5b6a86; margin-top:2px;}
.prof-kv{display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:14px 22px;}
.prof-kv div{display:flex; flex-direction:column; gap:2px; min-width:0;}
.prof-kv span{font-size:11.5px; color:#6b7a99; text-transform:uppercase; letter-spacing:.05em;}
.prof-kv b{font-size:14px; color:var(--ink-navy); font-weight:600; word-break:break-word;}
.prof-panel .panel-head h3{font-size:16px;}
.prof-count{font-size:12px; font-weight:700; background:#e6f0ff; color:#1d5fd8; padding:2px 9px; border-radius:99px; margin-left:4px;}
.prof-empty{color:#7a89a8; font-size:13px; padding:4px 0;}
.prof-chips{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px;}
.prof-table-wrap{max-height:340px; overflow:auto;}
.prof-foot{font-size:12px; color:#7a89a8; text-align:center; padding:6px 0 24px;}
body[data-theme="dark"] .prof-stat{background:#101a30; border-color:#1f2b45;}
body[data-theme="dark"] .prof-stat .v,body[data-theme="dark"] .prof-name,body[data-theme="dark"] .prof-kv b{color:#e8eefb;}

@media print{
  .shell{display:block !important; height:auto !important; overflow:visible !important;}
  .main-col,.scroll-area{height:auto !important; overflow:visible !important;}
  .page-head,.prof-actions,.chat-widget,#toast,.sb-backdrop{display:none !important;}
  .scroll-area .content{padding:0 !important;}
  .prof-panel,.prof-head,.prof-stats{break-inside:avoid;}
  .prof-table-wrap{max-height:none !important; overflow:visible !important;}
  body{background:#fff !important;}
}

/* =====================================================================
   v3.3 — School / Finance / Parent dashboards share the Head Office look
===================================================================== */
.kpi-grid.fit{grid-template-columns:repeat(auto-fit,minmax(205px,1fr)) !important;}
@media (max-width:760px){ .kpi-grid.fit{grid-template-columns:repeat(2,minmax(0,1fr)) !important;} }
.grid-eq{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px;}
.grid-eq > .panel,.grid-main > .panel{margin-bottom:20px;}
@media (max-width:1100px){ .grid-eq{grid-template-columns:1fr;} }

/* list rows used for notices, homework, quizzes on the dashboards (same rhythm as Compliance Alerts).
   Scoped to the dashboard grids so the Attendance page keeps its own row style. */
.grid-main .attend-row,.grid-eq .attend-row{padding:12px 2px; border:none; border-bottom:1px solid #edf2fa; border-radius:0; margin-bottom:0;}
.grid-main .attend-row:last-child,.grid-eq .attend-row:last-child{border-bottom:none;}
.grid-main .attend-row .an,.grid-eq .attend-row .an{font-weight:700; font-size:13.5px; color:var(--ink-navy);}
.grid-main .attend-row .as,.grid-eq .attend-row .as{font-size:12px; color:#6b7a99; margin-top:2px;}
body[data-theme="dark"] .grid-main .attend-row,body[data-theme="dark"] .grid-eq .attend-row{border-bottom-color:#1f2b45;}
body[data-theme="dark"] .grid-main .attend-row .an,body[data-theme="dark"] .grid-eq .attend-row .an{color:#e8eefb;}

/* =====================================================================
   v3.4 — QR scan log
===================================================================== */
.scan-filters{display:flex; flex-wrap:wrap; gap:12px 14px; align-items:flex-end;}
.scan-filters label{display:flex; flex-direction:column; gap:4px; font-size:11.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted-blue);}
.scan-filters input,.scan-filters select{height:38px; border:1.5px solid #e1e9f6; border-radius:10px; background:#f6f9fd; padding:0 10px; font-size:13.5px; color:var(--ink-navy); text-transform:none; letter-spacing:0; font-weight:500; min-width:140px;}
.scan-filters input[type=text]{min-width:170px;}
.scan-filter-actions{display:flex; gap:8px; align-items:center; padding-bottom:1px;}
.prof-scan-note{display:flex; align-items:center; gap:10px; background:#eef4ff; border:1px solid #d6e4ff; color:#274690; border-radius:12px; padding:10px 14px; font-size:13px; margin-bottom:14px;}
.prof-scan-note .ico{width:20px; height:20px; flex-shrink:0;}
.loc-link{color:#0b6bd6; font-weight:600; text-decoration:none;} .loc-link:hover{text-decoration:underline;}
body[data-theme="dark"] .scan-filters input,body[data-theme="dark"] .scan-filters select{background:#0b1220; border-color:#1f2b45; color:#e8eefb;}
body[data-theme="dark"] .prof-scan-note{background:#101a30; border-color:#1f2b45; color:#c9d6f2;}
@media print{ .prof-scan-note{display:none;} }

/* =====================================================================
   v3.4 — ID card builder: layout, sides, live preview
===================================================================== */
.modal.idc2-modal{max-width:980px; width:96vw;}
.idc2-builder{display:grid; grid-template-columns:268px minmax(0,1fr); gap:22px; align-items:start;}
.idc2-gtitle{font-size:11px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--muted-blue); margin:0 0 7px;}
.idc2-group{margin-top:16px;} .idc2-group .idc-check{display:flex; align-items:center; gap:8px; font-size:13px; padding:3px 0; cursor:pointer;}
.idc2-seg{display:flex; border:1px solid #d0ddf3; border-radius:10px; overflow:hidden; background:#fff;}
.idc2-seg label{flex:1; cursor:pointer; margin:0;} .idc2-seg input{position:absolute; opacity:0; pointer-events:none;}
.idc2-seg span{display:block; padding:9px 6px; text-align:center; font-size:12.5px; font-weight:700; color:#4b5a78; white-space:nowrap;}
.idc2-seg label + label span{border-left:1px solid #d0ddf3;}
.idc2-seg input:checked + span{background:#0b2a6f; color:#fff;}
.idc2-seg input:focus-visible + span{outline:2px solid #1d5fd8; outline-offset:-2px;}
.idc2-seg3 span{padding:9px 2px; font-size:12px;}
.idc2-preview{min-width:0;}
.idc2-sheet{display:flex; gap:26px; flex-wrap:wrap; justify-content:center; align-items:flex-start; background:linear-gradient(160deg,#eef3fb,#e3ecf9); border-radius:14px; padding:26px 18px; min-height:240px;}
.idc2-fig{margin:0; text-align:center;}
.idc2-fig figcaption{font-size:11px; font-weight:700; color:#6b7a99; margin-top:9px; letter-spacing:.08em; text-transform:uppercase;}
.idc2-card{border-radius:13px; overflow:hidden; line-height:0; background:#fff; box-shadow:0 18px 30px -16px rgba(11,42,111,.6), 0 0 0 1px rgba(11,42,111,.08);}
.idc2-card.portrait{border-radius:11px;}
.idc2-svg{display:block;}
.idc2-warn{background:#fff6e0; border:1px solid #f6d58a; color:#8a5a00; font-size:12.5px; padding:9px 12px; border-radius:10px; margin-bottom:12px;}
@media (max-width:820px){ .idc2-builder{grid-template-columns:1fr;} }
body[data-theme="dark"] .idc2-seg{background:#101a30; border-color:#1f2b45;} body[data-theme="dark"] .idc2-seg span{color:#c9d6f2;}
body[data-theme="dark"] .idc2-seg input:checked + span{background:#1d5fd8; color:#fff;}
.idc2-svg{max-width:100%; height:auto;}
.idc2-card,.idc2-fig{max-width:100%;}
@media (max-width:520px){ .modal.idc2-modal{padding:16px 12px;} .idc2-sheet{padding:16px 8px; gap:18px;} }

/* release check */
.version-banner{position:fixed; top:0; left:0; right:0; z-index:99999; background:#0b2a6f; color:#fff; text-align:center; padding:10px 16px; font-size:13.5px; box-shadow:0 6px 18px rgba(0,0,0,.25);}
.version-banner b{color:#ffd9a8;} .version-banner button{margin-left:10px; background:#f59e0b; color:#1b1b1b; border:none; border-radius:8px; padding:5px 14px; font-weight:700; cursor:pointer;}
.sb-version{margin-top:8px; text-align:center; font-size:10.5px; letter-spacing:.04em; color:rgba(255,255,255,.45);}

/* =====================================================================
   v4 LOGIN — built from the supplied 1855 x 848 design.
   The artwork is laid out in "design pixels" and scaled to the window with --g3s
   (left content, photo, navy panel) and --g3c (the sign-in card, never smaller than
   a readable size). app.js (fitLogin) sets --g3s, --g3c and --g3t (top offset).
===================================================================== */
@font-face{font-family:'GkPoppins'; src:url('fonts/Poppins-Bold.woff') format('woff'); font-weight:700; font-style:normal; font-display:swap;}
@font-face{font-family:'GkPoppins'; src:url('fonts/Poppins-Medium.woff') format('woff'); font-weight:500; font-style:normal; font-display:swap;}
:root{ --g3s:.75; --g3c:.85; --g3t:0px; }

#gate.g3{position:relative; display:block; height:100vh; min-height:0; padding:0; overflow:hidden; background:#fff; color:#0e2c5d;}
.g3-bg{position:absolute; inset:0; z-index:0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 52%, rgba(255,255,255,.92) 100%),
    radial-gradient(60vw 55vh at 40% -5%, rgba(179,222,252,.55), rgba(179,222,252,0) 70%),
    linear-gradient(90deg, #ffffff 0%, #f3f8fd 20%, #e9f4fd 33%, #e3f1fd 52%, #eef6fe 76%, #ffffff 100%);}
.g3-wrap{position:absolute; left:calc((100vw - 1855px * var(--g3s)) / 2); top:var(--g3t); width:1855px; height:848px; transform:scale(var(--g3s)); transform-origin:0 0; z-index:1; pointer-events:none;}
.g3-stage{position:absolute; left:0; top:0; width:1855px; height:848px; pointer-events:none;}
.g3-backR{z-index:1;} .g3-left{z-index:2;}
.g3-navy,.g3-leftdots{position:absolute; left:0; top:0; width:1855px; height:848px; overflow:visible;}
.g3-photo{position:absolute; left:612px; top:0; width:828px; height:700px; max-width:none;}
.g3-doodles{position:absolute; left:1676px; top:96px; width:179px; height:430px; max-width:none;}
.g3-gap .g3-photo{-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 46px); mask-image:linear-gradient(180deg,transparent 0,#000 46px);}  /* window taller than the design: let the photo melt into the sky */
.g3-waves{position:absolute; left:0; bottom:0; width:calc(480px * var(--g3s)); height:calc(208px * var(--g3s)); overflow:visible; z-index:1; pointer-events:none;}

/* ---- left content ---- */
.g3-logo{position:absolute; left:106px; top:22px; width:353px; height:auto;}
.g3-tag{position:absolute; left:108px; top:108px; font:700 13px/16px var(--font-body); letter-spacing:.245em; text-transform:uppercase; color:#1b447c; white-space:nowrap;}
.g3-h1{position:absolute; left:104px; top:0; width:560px; height:0; margin:0; font-family:'GkPoppins',var(--font-display); font-weight:700;}
.g3-h1 span{position:absolute; left:0; display:block; white-space:nowrap; line-height:1; -webkit-text-stroke:.016em currentColor;}
.g3-l1{top:165.4px; font-size:66.6px; color:#0c2a5e;}
.g3-l2{top:229.5px; font-size:63px; color:#ff6a13;}
.g3-l3{top:302px; font-size:41.3px; color:#0c2a5e;}
.g3-rule{position:absolute; left:104px; top:359px; display:flex; align-items:center;}
.g3-rule i:first-child{display:block; width:42px; height:4px; border-radius:2px; background:#ff7a1a;}
.g3-rule i:last-child{display:block; width:99px; height:2px; background:#d9e0ec;}
.g3-sub{position:absolute; left:102px; top:380px; width:500px; margin:0; font-size:20.5px; line-height:29.5px; color:#4d5b79;}
.g3-feat{position:absolute; top:475px; width:171px; height:175px; box-sizing:border-box; text-align:center; border-radius:20px; border:1px solid rgba(255,255,255,.9);
  box-shadow:0 14px 30px -16px rgba(16,40,90,.30), 0 1px 0 rgba(255,255,255,.8) inset;}
.g3-feat.c1{left:103px; width:170px; background:#f2f7fd;} .g3-feat.c2{left:289px; background:#fef6ed;} .g3-feat.c3{left:477px; background:#effcf3;}
.g3-feat.c4{left:665px; width:170px; background:#fef2f2;} .g3-feat.c5{left:857px; width:173px; background:#f5f1fe;}
.g3-feat-ic{display:block; width:66px; height:66px; margin:15px auto 0;}
.g3-feat-l{margin-top:11px; font:700 15.8px/22px 'GkPoppins',var(--font-display); color:#0c2a5e;}
.g3-feat-s{margin:2px 10px 0; font-size:14.5px; line-height:19px; color:#5b6a86; white-space:pre-line;}
.g3-trust-i{position:absolute; top:695px; height:54px; display:flex; align-items:center; font-size:15px; line-height:20px; color:#35466a;}
.g3-trust-i span{width:104px; white-space:pre-line; color:#2d3d63;} .g3-trust-ic{width:54px; height:54px; flex-shrink:0;}
.g3-trust-i.t1{left:277px;} .g3-trust-i.t1 span{margin-left:15px;} .g3-trust-i.t2{left:463px;} .g3-trust-i.t2 span{margin-left:10px;}
.g3-trust-i.t3{left:647px;} .g3-trust-i.t3 span{margin-left:9px;} .g3-trust-i.t4{left:854px;} .g3-trust-i.t4 span{margin-left:20px;}
.g3-sep{position:absolute; top:704px; width:1px; height:38px; background:#cdd7e6;} .g3-sep.s1{left:434px;} .g3-sep.s2{left:619px;} .g3-sep.s3{left:824px;}
.g3-foot{position:absolute; left:0; right:0; bottom:calc(19px * var(--g3s)); z-index:3; text-align:center; font-size:max(11px, calc(14.5px * var(--g3s))); color:#5b6a86; pointer-events:none;}

/* ---- language menu ---- */
.g3-lang{position:absolute; left:1688px; top:26px; z-index:6; pointer-events:auto;}
.g3-lang .lang-dd-btn{height:47px; padding:0 20px; font-size:17px; gap:10px; border:none; box-shadow:0 10px 24px -10px rgba(0,0,0,.4); color:#0c2a5e;}
.g3-lang .lang-dd-btn .ico{width:21px; height:21px;}
.g3-lang .lang-dd-menu{top:calc(100% + 8px); font-size:15px;}

/* ---- sign-in card ---- */
.g3-cardstage{position:absolute; left:1200px; top:120px; width:461px; z-index:5; pointer-events:auto; transform:scale(calc(var(--g3c) / var(--g3s))); transform-origin:50% 50%;}   /* the card may grow a little on small windows, around its own centre */
.login-card.g3-card{position:relative; width:461px; max-width:none; min-height:655px; box-sizing:border-box; margin:0; padding:27px 49px 32px 55px; background:#fff; border:none; border-radius:28px;
  box-shadow:0 36px 80px -30px rgba(11,42,111,.5), 0 0 0 1px rgba(11,42,111,.04);}
.g3-welcome{margin-top:0; font-size:23px; line-height:30px; font-weight:600; color:#4a5878;}
.g3-card-logo{display:block; width:297px; height:auto; margin:3px 0 0 4px;}
.g3-card-tag{margin:7px 0 0 7px; font:700 11.5px/16px var(--font-body); letter-spacing:.2em; text-transform:uppercase; color:#1b447c; white-space:nowrap;}
.login-card.g3-card p.sub{margin:11px 0 0 1px; font-size:18.5px; line-height:25px; color:#5b6a86;}
.g3-card .field{margin:0;} .g3-card p.sub + .field{margin-top:31px;} .g3-card .field + .field{margin-top:20px;}
.g3-card .field label{display:block; height:22px; margin:0 0 3px; font-size:15px; line-height:22px; font-weight:700; letter-spacing:0; text-transform:none; color:#22305a;}
.g3-card .input-icon-wrap{position:relative;}
.g3-card .field input[type=text],.g3-card .field input[type=password]{height:55px; box-sizing:border-box; padding:0 54px 0 60px !important; border:1.5px solid #e0e8f5; border-radius:12px; background:#f3f7fd; font-size:16px; color:#26355a; margin:0; width:100%;}
.g3-card .field input:focus{outline:none; border-color:#2b6fd6; background:#fff; box-shadow:0 0 0 3px rgba(43,111,214,.15);}
.g3-card .input-icon{position:absolute; left:19px; top:50%; transform:translateY(-50%); width:21px; height:21px; fill:#3c4b6c; opacity:1;}
.g3-card .input-icon-toggle{position:absolute; right:15px; top:50%; transform:translateY(-50%); background:none; border:none; padding:4px; color:#3c4b6c; opacity:1; display:flex; cursor:pointer;}
.g3-card .input-icon-toggle .ico{width:23px; height:23px;}
.g3-card .gate-row-between{display:flex; align-items:center; justify-content:space-between; height:28px; margin:18px 0 0; font-size:15.5px;}
.g3-card .remember-me-label{display:flex; align-items:center; gap:12px; margin:0; color:#56637f; font-size:15.5px; cursor:pointer;}
.g3-card .remember-me-label input{appearance:none; -webkit-appearance:none; width:25px; height:25px; margin:0; border-radius:6px; border:2px solid #c6d2e6; background:#fff center/16px no-repeat; cursor:pointer; flex-shrink:0;}
.g3-card .remember-me-label input:checked{border-color:#0d376f; background-color:#0d376f; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");}
.g3-card .gate-row-between a{color:#0b6bd6; font-weight:700; font-size:15px; text-decoration:none;}
.g3-card #loginBtn{display:flex; align-items:center; justify-content:center; gap:12px; width:100%; height:58px; margin-top:20px; border:none; border-radius:14px; background:linear-gradient(90deg,#0d376f,#0d4e97);
  color:#fff; font-size:21px; font-weight:700; cursor:pointer; box-shadow:0 16px 28px -14px rgba(13,55,111,.85);}
.g3-card #loginBtn:hover{filter:brightness(1.1);} .g3-card #loginBtn .btn-arrow{transition:transform .15s;} .g3-card #loginBtn:hover .btn-arrow{transform:translateX(3px);}
.g3-card .login-error{position:absolute; left:55px; right:49px; top:521px; margin:0; min-height:0; text-align:center; font-size:13px; line-height:17px;}
.g3-card .login-error.info{color:#5b6a86;}
#ssoBlock{margin-top:22px;}
.g3-or{display:flex; align-items:center; gap:15px; height:18px; font-size:14.5px; color:#7c8aa5; white-space:nowrap;}
.g3-or i{flex:1; height:1px; background:#dfe6f1;}
.g3-sso{display:flex; gap:17px; margin-top:11px;}
.g3-sso-btn{flex:1; display:flex; align-items:center; justify-content:center; gap:10px; height:54px; border:1px solid #e1e8f3; border-radius:12px; background:#fff; color:#26355a; font-size:16px; font-weight:600; cursor:pointer; box-shadow:0 3px 8px -4px rgba(16,40,90,.12);}
.g3-sso-btn:hover{background:#f7faff; border-color:#cdd9ee;} .g3-sso-btn svg{width:22px; height:22px;}
#gate.g3 #signupCard{width:461px; margin-top:16px;}

/* ---- phones and small tablets: simple stacked layout (no artwork) ---- */
@media (max-width:999px){
  #gate.g3{height:auto; min-height:100vh; overflow:visible; display:flex; flex-direction:column; align-items:center; padding:20px 14px 18px; background:linear-gradient(180deg,#e6f3fd 0%,#ffffff 40%);}
  .g3-bg,.g3-waves,.g3-backR,.g3-leftdots,.g3-feats,.g3-feat,.g3-trust,.g3-rule{display:none !important;}
  .g3-wrap{display:contents;}
  .g3-stage.g3-left{position:static; transform:none; width:100%; max-width:461px; height:auto;}
  .g3-logo,.g3-tag,.g3-h1,.g3-h1 span,.g3-sub{position:static;}
  .g3-logo{width:210px; display:block;} .g3-tag{margin-top:4px; font-size:10.5px;}
  .g3-h1{width:auto; height:auto; margin:14px 0 6px;} .g3-h1 span{display:inline; white-space:normal;}
  .g3-l1,.g3-l2{font-size:34px;} .g3-l3{display:block !important; font-size:21px; margin-top:4px;}
  .g3-sub{width:auto; font-size:14.5px; line-height:21px; margin:0 0 4px;}
  .g3-lang{position:absolute; left:auto; top:14px; right:14px; transform:none;}
  .g3-lang .lang-dd-btn{height:38px; padding:0 14px; font-size:14px;}
  .g3-cardstage{position:static; left:auto; top:auto; transform:none; width:100%; max-width:461px; margin-top:16px;}
  .login-card.g3-card{width:100%; min-height:0; padding:22px 22px 26px;}
  .g3-welcome{margin-top:0; font-size:20px; line-height:26px;}
  .g3-card-logo,.g3-card-tag{display:none;}   /* the logo is already at the top of the phone layout */
  .login-card.g3-card p.sub{margin-top:4px; font-size:16px;}
  .g3-card .field p.sub + .field,.g3-card p.sub + .field{margin-top:18px;} .g3-card .login-error{position:static; margin-top:10px; min-height:17px;}
  #ssoBlock{margin-top:14px;} #gate.g3 #signupCard{width:100%;}
  .g3-foot{position:static; margin-top:16px; padding:0 10px; font-size:12px; pointer-events:auto;}
}

/* Hindi and Gujarati: longer headline, and no letter-spacing / capitals (they break joined Indic letters) */
html[lang="hi"] .g3-tag,html[lang="gu"] .g3-tag,html[lang="hi"] .g3-card-tag,html[lang="gu"] .g3-card-tag{letter-spacing:0; text-transform:none; font-size:14px;}
html[lang="hi"] .g3-l1,html[lang="gu"] .g3-l1{top:168px; font-size:50px;}
html[lang="hi"] .g3-l2,html[lang="gu"] .g3-l2{top:230px; font-size:50px;}
html[lang="hi"] .g3-l3,html[lang="gu"] .g3-l3{top:296px; font-size:36px;}
html[lang="hi"] .g3-h1 span,html[lang="gu"] .g3-h1 span{-webkit-text-stroke:0; line-height:1.25; font-weight:700;}
html[lang="hi"] .g3-sub,html[lang="gu"] .g3-sub{width:470px; font-size:19px; line-height:28px;}
html[lang="hi"] .g3-card p.sub,html[lang="gu"] .g3-card p.sub{font-size:17px; line-height:23px;}
html[lang="hi"] .g3-foot,html[lang="gu"] .g3-foot{letter-spacing:0;}
html[lang="gu"] .g3-l1{font-size:45px; top:172px;}

/* without the Google / Microsoft buttons the card is shorter; its top edge stays where the design has it (the photo has no pixels above a lower card) */
.g3-nosso .login-card.g3-card{min-height:0; padding-bottom:38px;}

/* =====================================================================
   QR attendance: tabs, camera scanner, result card, today panel
===================================================================== */
.qa-tabs{display:flex; gap:8px; margin:6px 0 18px;}
.qa-tab{display:inline-flex; align-items:center; gap:8px; padding:10px 20px; border:1px solid #d6e0f2; border-radius:12px; background:#fff; color:#4b5a78; font-weight:700; font-size:14px; cursor:pointer;}
.qa-tab .ico{width:18px; height:18px;} .qa-tab.on{background:#0b2a6f; border-color:#0b2a6f; color:#fff;}
.qs-chips{display:flex; gap:8px; margin-bottom:10px;}
.qs-chip{font-size:12px; font-weight:700; padding:5px 12px; border-radius:99px; background:#eef3fb; color:#4b5a78;}
.qs-chip.ok{background:#dcf5e6; color:#157a45;} .qs-chip.warn{background:#fff0d6; color:#a05d00;}
.qs-video{position:relative; width:100%; max-width:440px; aspect-ratio:1/1; margin:0 auto; border-radius:20px; overflow:hidden; background:linear-gradient(160deg,#0b1a3d,#0b2a6f); box-shadow:0 18px 36px -20px rgba(11,42,111,.7);}
.qs-video video{position:absolute; inset:0; width:100%; height:100%; object-fit:cover;}
.qs-frame{position:absolute; inset:14%; pointer-events:none;}
.qs-frame i{position:absolute; width:34px; height:34px; border:4px solid #ffb02e; border-radius:6px;}
.qs-frame i:nth-child(1){left:0; top:0; border-right:0; border-bottom:0;} .qs-frame i:nth-child(2){right:0; top:0; border-left:0; border-bottom:0;}
.qs-frame i:nth-child(3){left:0; bottom:0; border-right:0; border-top:0;} .qs-frame i:nth-child(4){right:0; bottom:0; border-left:0; border-top:0;}
.qs-status{text-align:center; font-size:13px; color:#5b6a86; margin:12px 0 10px; min-height:18px;}
.qs-buttons{display:flex; justify-content:center; gap:10px; margin-bottom:14px;} .qs-buttons .btn-mini{padding:11px 22px; font-size:15px;}
.qs-result{display:flex; gap:14px; align-items:center; padding:16px; border-radius:16px; border:2px solid #e3ebf7; background:#f7faff; min-height:96px;}
.qs-result.in{background:#e8f8ee; border-color:#6fcf97;} .qs-result.out{background:#e7f0ff; border-color:#6f9cf0;} .qs-result.dup{background:#fff6e0; border-color:#f2c261;} .qs-result.err{background:#ffeceb; border-color:#f09a94;}
.qs-photo{width:72px; height:72px; border-radius:50%; background:#0b2a6f; color:#fff; font-weight:800; font-size:24px; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0;} .qs-photo img{width:100%; height:100%; object-fit:cover;}
.qs-badge{display:inline-block; font-size:11px; font-weight:800; letter-spacing:.08em; padding:3px 10px; border-radius:99px; background:#fff; color:#0b2a6f; margin-bottom:4px;}
.qs-result.in .qs-badge{background:#157a45; color:#fff;} .qs-result.out .qs-badge{background:#1d5fd8; color:#fff;} .qs-result.dup .qs-badge{background:#b86e00; color:#fff;} .qs-result.err .qs-badge{background:#d4321f; color:#fff;}
.qs-name{font-size:18px; font-weight:800; color:var(--ink-navy); line-height:1.25;} .qs-meta{font-size:13px; color:#5b6a86;} .qs-line{font-size:14px; margin-top:4px; color:#26355a;}
.qs-loc{font-size:12px; margin-top:6px;} .qs-loc.ok{color:#157a45;} .qs-loc.warn{color:#a05d00;}
.qa-progs{display:grid; gap:12px; margin-bottom:14px;} .qa-prog-top{display:flex; justify-content:space-between; font-size:13px; margin-bottom:5px; color:#26355a;} .qa-prog-top span{color:#6b7a99;}
.qa-sub{font-weight:800; font-size:13px; color:var(--muted-blue); text-transform:uppercase; letter-spacing:.05em; margin:6px 0 8px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.qa-select{margin-left:auto; padding:5px 10px; border:1px solid #d6e0f2; border-radius:8px; font-size:12.5px; background:#fff;}
.qa-chips{display:flex; flex-wrap:wrap; gap:6px; max-height:220px; overflow:auto;}
.qa-chip{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; padding:5px 11px; border-radius:99px; background:#f1f5fc; border:1px solid #e1e9f6; color:#26355a;} .qa-chip i{font-style:normal; font-size:11px; color:#6b7a99;}
body[data-theme="dark"] .qa-tab{background:#101a30; border-color:#1f2b45; color:#c9d6f2;} body[data-theme="dark"] .qa-tab.on{background:#1d5fd8; color:#fff;}
body[data-theme="dark"] .qs-result{background:#101a30; border-color:#1f2b45;} body[data-theme="dark"] .qs-name,body[data-theme="dark"] .qs-line{color:#e8eefb;}
@media (max-width:1100px){ #content .grid-main[style*="1.25fr"]{grid-template-columns:1fr !important;} }

/* the result card floats over the bottom of the camera view, so a phone never has to scroll between scans */
.qs-video{max-width:400px;}
.qs-off{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,.65); font-weight:700; letter-spacing:.04em;}
.qs-video .qs-result{position:absolute; left:10px; right:10px; bottom:10px; z-index:3; min-height:0; padding:10px 12px; gap:10px; box-shadow:0 14px 30px -12px rgba(0,0,0,.55);}
.qs-video .qs-photo{width:54px; height:54px; font-size:18px;} .qs-video .qs-name{font-size:16px;} .qs-video .qs-line{font-size:12.5px;} .qs-video .qs-line .muted{display:none;} .qs-video .qs-loc{font-size:11.5px; margin-top:3px;}
.qs-video .qs-result.err .qs-name{font-size:14px;}
.qs-buttons{margin:4px 0 8px;} .qs-status{margin:6px 0 12px;}

/* grid panels may shrink below the width of a wide table inside them (the table scrolls instead of stretching the page) */
.grid-main > .panel,.grid-main > div,.grid-eq > .panel{min-width:0;}
@media (max-width:1100px){ #content .grid-main[style*="1.25fr"]{grid-template-columns:minmax(0,1fr) !important;} }

/* =====================================================================
   Phones: size things to the screen that is actually visible.
   "100vh" on an iPhone is the height with the browser toolbar hidden, so with the toolbar showing the
   bottom of the menu (Sign Out) and the bottom of every page sat behind it.
===================================================================== */
@supports (height: 100dvh){ .shell{height:100dvh;} }
@media (max-width: 760px){
  .sidebar{top:0; bottom:0; height:auto; max-height:100%;}                  /* pinned to the visible top and bottom, not to a fixed height */
  .sb-switch{margin-bottom:max(18px, env(safe-area-inset-bottom));}
  #sbNav{overscroll-behavior:contain; -webkit-overflow-scrolling:touch;}      /* the menu list scrolls on its own without dragging the page behind it */
}

/* =====================================================================
   School logo: identity in the top bar, upload widget, schools list, printed documents
===================================================================== */
.tb-school{display:flex; align-items:center; gap:10px; flex-shrink:0; max-width:310px; padding:4px 12px 4px 6px; margin-right:4px; border-radius:14px; border:1px solid transparent;}
.tb-school.editable{cursor:pointer;} .tb-school.editable:hover{background:#eef3fb; border-color:#dbe5f6;}
.tbs-logo{height:40px; width:auto; max-width:104px; object-fit:contain; border-radius:6px;}
.tbs-init{width:40px; height:40px; border-radius:12px; background:linear-gradient(135deg,#0b2a6f,#1d5fd8); color:#fff; font-weight:800; font-size:15px; display:flex; align-items:center; justify-content:center; flex-shrink:0;}
.tbs-name{font-weight:800; font-size:14px; line-height:1.2; color:var(--ink-navy); max-width:170px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;}
.tbs-add{font-size:11px; font-weight:700; color:#a05d00; background:#fff3d6; padding:3px 9px; border-radius:99px; white-space:nowrap;}
@media (max-width:1180px) and (min-width:761px){ .tbs-name{display:none;} .tb-school{padding:4px;} }      /* narrower desktop windows: logo only */
@media (max-width:760px){ .tbs-name,.tbs-add{display:none;} .tb-school{padding:2px; margin-right:2px; max-width:none;} .tbs-logo{height:34px; max-width:70px;} .tbs-init{width:34px; height:34px; font-size:13px;} }
body[data-theme="dark"] .tb-school.editable:hover{background:#101a30; border-color:#1f2b45;} body[data-theme="dark"] .tbs-name{color:#e8eefb;}

.logo-up{display:flex; gap:18px; align-items:center; flex-wrap:wrap;}
.logo-up-prev{width:160px; height:112px; border:1px dashed #b9c7e2; border-radius:14px; display:flex; align-items:center; justify-content:center; overflow:hidden; flex-shrink:0;
  background:repeating-conic-gradient(#eef2f9 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;}
.logo-up-prev img{max-width:100%; max-height:100%; object-fit:contain;} .logo-up-prev span{font-size:12px; color:#7a8aa5; background:#fff; padding:2px 8px; border-radius:99px;}
.logo-up-side{display:grid; gap:8px; justify-items:start;}
.logo-yes{color:#157a45; font-weight:800;}

.prof-school-logo{height:22px; width:auto; vertical-align:middle; margin-right:8px; border-radius:3px;}
.rh-powered{margin-top:8px; font-size:10px; color:#7a8aa5;} .rh-powered img{height:14px; vertical-align:middle; margin-left:4px;}
.school-logo-report{height:auto !important; max-height:56px; width:auto !important; max-width:170px; object-fit:contain;}
.print-letterhead{display:none;}
@media print{
  .print-letterhead{display:flex; align-items:center; gap:14px; margin:0 0 14px; padding-bottom:10px; border-bottom:2px solid #0b2a6f;}
  .print-letterhead img{height:58px; width:auto; max-width:150px; object-fit:contain;} .print-letterhead b{font-size:18px; color:#0b2a6f;} .print-letterhead small{color:#555;}
  .tb-school{display:none !important;}
}

/* Phones: the search is a round icon that opens into a full-width bar when tapped, so the school logo, language, theme, bell and profile all fit on one line without overlapping */
@media (max-width: 760px){
  .topbar{padding:0 10px; gap:6px;} .tb-left{gap:6px;} .tb-right{gap:6px;}
  .tb-search-wrap{flex:0 0 42px; min-width:42px; width:42px; height:42px;}
  .tb-search{width:42px; height:42px; padding:0; border-radius:50%; color:transparent; cursor:pointer; background:#eef3fb; border-color:#e1e9f6;}
  .tb-search::placeholder{color:transparent;}
  .tb-search-ic{left:11px;}
  .tb-search-wrap:focus-within{position:fixed; top:15px; left:10px; right:10px; width:auto; height:42px; flex:none; z-index:95;}
  .tb-search-wrap:focus-within .tb-search{width:100%; padding:0 16px 0 44px; color:var(--ink-navy); cursor:text; border-radius:999px; background:#fff; border-color:var(--amber-500); box-shadow:0 12px 28px -12px rgba(11,42,111,.45);}
  .tb-search-wrap:focus-within .tb-search::placeholder{color:#7a8aa5;}
  .tb-search-wrap:focus-within .tb-search-ic{left:15px;}
  .tb-right .lang-dd-btn{padding:8px 10px; gap:5px;} .tb-right .lang-dd-btn .chev{display:none;}
}
@media (max-width: 340px){ .tb-right #themeToggle{display:none;} .tbs-logo{height:30px; max-width:52px;} .tbs-init{width:30px; height:30px;} }

/* "Install app" button and its how-to dialog */
#installBtn{margin-bottom:8px;} #installBtn.hidden{display:none !important;}
.install-steps ol{margin:6px 0 10px 18px; padding:0; line-height:1.6; font-size:14px;} .install-steps details{margin-top:6px; font-size:13px; color:#5b6a86;} .install-steps summary{cursor:pointer; font-weight:700;}

/* =====================================================================
   PART B: STUDENT DETAILS form (UDISE+): looks like the printed form
===================================================================== */
.pb-form{font-family:var(--font-body); color:#111;}                       /* the same typeface as the rest of the application */
.pb-intro{font-family:var(--font-body); background:#eef3fb; border:1px solid #d6e0f2; border-radius:10px; padding:10px 14px; font-size:13px; line-height:1.55; margin-bottom:16px; color:#26355a;}
.pb-sec{margin:0 0 20px;}
.pb-h1{font-size:20px; font-weight:700; margin:4px 0 10px; letter-spacing:.01em;}
.pb-h2{font-size:14.5px; font-weight:700; margin:0 0 7px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;}
.pb-sub{font-size:13.5px; margin:0 0 3px;} .pb-red{color:#e11d1d;}
.pb-note{font-family:var(--font-body); font-weight:400; font-size:11px; color:#6b7a99;}
.pb-sl{font-size:13px;}
.pb-box{border:1.5px solid #111; background:#fff; margin-bottom:12px;}
.pb-head2{display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid #111;}
.pb-cell{padding:7px 12px; border-right:1px solid #111; border-bottom:1px solid #111; font-size:14.5px; line-height:2; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px;}
.pb-cell:nth-child(2n){border-right:none;} .pb-cell:nth-last-child(-n+2){border-bottom:none;}
.pb-row{border-bottom:1px solid #111; padding:7px 12px; font-size:14.5px; line-height:1.55;}
.pb-row:last-child{border-bottom:none;}
.pb-line{display:flex; flex-wrap:wrap; align-items:center; gap:5px 9px; padding:2px 0;}
.pb-b{font-weight:700;} .pb-i{font-style:italic;} .pb-blue{color:#0b6bd6; font-weight:700;}
.pb-in{font-family:var(--font-body); font-size:13px; padding:5px 9px; border:1px solid #9fb0d0; border-radius:6px; background:#f7faff; color:#16224a; min-width:0; max-width:100%;}
.pb-in:focus{outline:none; border-color:#2b6fd6; background:#fff; box-shadow:0 0 0 3px rgba(43,111,214,.15);}
.pb-in.pb-text{flex:1 1 220px; min-width:140px;} select.pb-in{min-width:150px;} .pb-in.pb-num,.pb-in.pb-pct{width:110px;} .pb-in.pb-date{width:160px;}
.pb-in.pb-off{opacity:.4; background:#eef0f5; cursor:not-allowed;}
.pb-ro,.pb-mirror{font-family:var(--font-body); font-size:13px; background:#f1f5fc; border:1px dashed #b9c7e2; border-radius:6px; padding:3px 10px; color:#16224a;}
.pb-age{font-family:var(--font-body); font-size:12px; color:#6b7a99;}
.pb-foot{font-size:12.5px; font-style:italic; line-height:1.5; margin:4px 0 12px; color:#222;}
.pb-mini{width:calc(100% - 24px); margin:8px 12px; border-collapse:collapse; font-size:13.5px;}
.pb-mini td{border:1px solid #111; padding:3px 7px;} .pb-mini-l{white-space:nowrap;} .pb-mini-v{width:84px;} .pb-mini-v select{min-width:0; width:100%; padding:3px;}
.pb-mini-note{font-weight:700; font-style:italic;}
.pb-extra{margin-top:26px;} .pb-extra .pb-h2{font-family:var(--font-body); font-size:14px;}
@media (max-width:760px){ .pb-head2{grid-template-columns:1fr;} .pb-cell{border-right:none !important; border-bottom:1px solid #111 !important;} .pb-cell:last-child{border-bottom:none !important;} .pb-mini{display:block; overflow-x:auto;} }
body[data-theme="dark"] .pb-form{color:#e8eefb;} body[data-theme="dark"] .pb-box,body[data-theme="dark"] .pb-head2,body[data-theme="dark"] .pb-row,body[data-theme="dark"] .pb-cell,body[data-theme="dark"] .pb-mini td{border-color:#8795b8;} body[data-theme="dark"] .pb-box{background:#0f1830;}

/* the Part B export dialog */
.pbx-grid{display:grid; gap:12px; margin:10px 0;} .pbx-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap;} .pbx-row label{font-size:13px; font-weight:700; min-width:120px;}
.pbx-row select,.pbx-row input[type=text]{padding:7px 10px; border:1px solid #d6e0f2; border-radius:8px; font-size:13.5px;}
.pbx-scope label{font-weight:400; min-width:0; display:flex; align-items:center; gap:7px;} .pbx-udise{background:#fff7e6; border:1px solid #f3d9a4; border-radius:10px; padding:9px 12px; font-size:12.5px; color:#7a5200;}
.pbx-status{min-height:18px; font-size:12.5px; color:#5b6a86;}

.pb-gr{font-family:var(--font-body); display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; background:#fff7e6; border:1px solid #f3d9a4; border-radius:10px; padding:10px 14px; margin-bottom:12px;}
.pb-gr label{font-weight:800; font-size:14px; color:#7a4a00;} .pb-gr .pb-in{width:200px; border-color:#e0b862; font-weight:700;} .pb-gr .pb-note{flex:1 1 260px;}

/* Students list: search and filter bar */
.sf{background:#f6f9fe; border:1px solid #dfe8f6; border-radius:14px; padding:12px 14px; margin-bottom:14px;}
.sf-main{display:flex; gap:8px; align-items:center; flex-wrap:wrap;} .sf-q{flex:1 1 320px; padding:10px 14px; border:1.5px solid #c9d7ee; border-radius:10px; font-size:14px; background:#fff;}
.sf-q:focus,.sf-f input:focus,.sf-f select:focus{outline:none; border-color:#2b6fd6; box-shadow:0 0 0 3px rgba(43,111,214,.14);}
#sfClear{opacity:.55;} #sfClear.on{opacity:1; background:#fff1ed; border-color:#f3b4a4; color:#b03a1a;}
.sf-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:10px 12px; margin-top:10px;} .sf-grid.hidden{display:none;}
.sf-f{display:flex; flex-direction:column; gap:3px; font-size:11.5px; font-weight:700; color:#5b6a86; text-transform:uppercase; letter-spacing:.03em;}
.sf-f input,.sf-f select{padding:7px 9px; border:1px solid #cfdbef; border-radius:8px; font-size:13px; font-weight:400; text-transform:none; letter-spacing:0; background:#fff; color:#16224a;}
.sf-check{flex-direction:row; align-items:center; gap:8px; text-transform:none; letter-spacing:0; font-weight:400; font-size:13px; color:#26355a; grid-column:span 2;} .sf-check input{width:auto;}
.sf-count{margin-top:10px; font-size:13px; color:#44546f;} .sf-none{color:#b03a1a; font-weight:700;} .sf-gr{font-weight:700; white-space:nowrap; color:#7a4a00;}
/* Bulk upload dialog */
.bu-modal{max-width:880px; width:96vw; max-height:92vh; overflow:auto;} .bu-step{border:1px solid #e1e9f6; border-radius:12px; padding:12px 14px; margin:12px 0; background:#fff;} .bu-row{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.bu-summary{margin:10px 0 6px; font-size:13.5px; line-height:2;} .bu-pill{display:inline-block; font-size:12px; font-weight:800; padding:2px 11px; border-radius:99px; margin-left:6px; background:#e8f0fe; color:#1d4fb0;}
.bu-pill.ok{background:#dcf5e6; color:#157a45;} .bu-pill.bad{background:#ffe3df; color:#b03a1a;} .bu-pill.upd{background:#e6e9ff; color:#3b3fb0;} .bu-pill.skip{background:#fff1d6; color:#a05d00;}
.bu-mode{display:grid; gap:4px; font-size:13px; background:#f6f9fe; border-radius:10px; padding:9px 12px; margin:8px 0;} .bu-mode label{font-weight:400;} .bu-disabled{opacity:.5;}
.bu-warn{background:#fff7e6; border:1px solid #f3d9a4; color:#7a5200; border-radius:10px; padding:9px 12px; font-size:13px; margin:8px 0;} .bu-warn.bad{background:#ffeceb; border-color:#f09a94; color:#8a1f12;}
.bu-h{font-weight:800; font-size:12.5px; text-transform:uppercase; letter-spacing:.04em; color:#44546f; margin:12px 0 5px;}
.bu-scroll{max-height:230px; overflow:auto; border:1px solid #e1e9f6; border-radius:10px; margin-bottom:6px;} .bu-table{width:100%; border-collapse:collapse; font-size:12.5px;} .bu-table th{position:sticky; top:0; background:#eaf0fb; text-align:left; padding:6px 9px; font-size:11.5px;} .bu-table td{padding:5px 9px; border-top:1px solid #edf1f8; vertical-align:top;}
.bu-progress{padding:12px; font-weight:700; color:#1d4fb0;} .bu-done{margin:12px 0 6px; font-size:14px; line-height:2;}

/* UDISE+ Section 3 staff forms (3.2 teaching, 3.3 non-teaching) reuse the .pb-* form look */
.pb-grp{background:#fdecec; color:#d11a1a; font-weight:800; letter-spacing:.01em; padding-top:8px; padding-bottom:8px;}
.pb-staffhead .pb-full{grid-column:1/-1; border-right:none !important;} .pb-staffhead .pb-cell:nth-child(2){border-right:1px solid #111 !important;} .pb-staffhead .pb-cell:nth-child(3){border-right:none !important;}
.pb-multi{display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center;} .pb-chk{display:inline-flex; align-items:center; gap:5px; font-size:13px; font-weight:400; cursor:pointer;} .pb-multi.pb-off{opacity:.4;}
.pb-staff select.pb-in{min-width:240px; max-width:100%;} .pb-grid .pb-mini-v{width:30%;} .pb-grid .pb-mini-v select{width:100%; min-width:0;}
.sd-tabs{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 12px;} .sd-tab{border:1px solid #cfdbef; background:#fff; color:#33466b; border-radius:99px; padding:6px 15px; font-size:13px; font-weight:700; cursor:pointer;}
.sd-tab span{margin-left:6px; background:#e8f0fe; color:#1d4fb0; border-radius:99px; padding:1px 8px; font-size:11.5px;} .sd-tab.on{background:#0b2a6f; border-color:#0b2a6f; color:#fff;} .sd-tab.on span{background:rgba(255,255,255,.2); color:#fff;}
tr.tab-hidden{display:none !important;}

/* Admissions: pipeline cards, summary tiles, and the enquiry page (follow-ups, communication log) */
.adm-banner{background:#fff6dd; border:1px solid #f0d89b; border-radius:10px; padding:10px 14px; font-size:13px; color:#6b4a00; margin-bottom:14px;}
.adm-tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(104px,1fr)); gap:10px; margin-bottom:14px;}
.adm-tile{border:1px solid var(--line); border-radius:12px; background:#fff; padding:10px 12px; cursor:pointer; text-align:left; font-family:inherit;}
.adm-tile b{display:block; font-size:22px; line-height:1.1; color:var(--navy-900,#0b1b3f);} .adm-tile span{font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:#64748b;}
.adm-tile.on{border-color:var(--navy-800,#12306b); box-shadow:0 0 0 3px #e3ecfb;} .adm-tile.red b{color:#c0281c;} .adm-tile.amber b{color:#b26a00;} .adm-tile.blue b{color:#1d4fb0;}
.adm-filters{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px;} .adm-filters input[type=search]{flex:1; min-width:220px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; font-family:inherit;} .adm-filters select{padding:8px 10px; border:1px solid var(--line); border-radius:8px; font-family:inherit; background:#fff;}
.adm-card{padding:16px 0 12px; border-bottom:1px solid var(--line);} .adm-card.dim{opacity:.62;}
.adm-top{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; align-items:flex-start; margin-bottom:6px;}
.adm-name{font-size:15px;} .adm-name a{color:inherit; text-decoration:none;} .adm-name a:hover{text-decoration:underline;}
.adm-meta{display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:#516079; margin-top:4px;} .adm-meta a{color:inherit; text-decoration:none;} .adm-meta a:hover{text-decoration:underline;}
.adm-actions{display:flex; gap:8px; align-items:center; flex-wrap:wrap;} .adm-last{font-size:12.5px; color:#516079; margin-top:6px;}
.adm-ribbon .ribbon-stage{min-width:84px;} .adm-ribbon .ribbon-label{font-size:11px;}
.adm-chip{display:inline-block; padding:2px 9px; border-radius:99px; font-size:11.5px; font-weight:700; white-space:nowrap;}
.adm-chip.red{background:#fde8e8; color:#b42318;} .adm-chip.amber{background:#fff1cf; color:#955600;} .adm-chip.blue{background:#e6efff; color:#1d4fb0;} .adm-chip.gray{background:#eef1f6; color:#516079;} .adm-chip.green{background:#e0f5ea; color:#146c43;}
.adm-msgbox{border:1px solid var(--line); border-radius:10px; padding:12px 14px; margin-top:14px; background:#f8fafd;} .adm-msg{display:flex; gap:8px; align-items:center; margin-top:8px; font-size:13.5px;}
.enq-head{margin-bottom:12px;} .enq-grid{display:grid; grid-template-columns:minmax(260px,330px) 1fr; gap:18px; align-items:start;} @media (max-width:900px){.enq-grid{grid-template-columns:1fr;}}
.enq-box{border:1px solid var(--line); border-radius:12px; padding:14px 16px; background:#fff; margin-bottom:14px;} .enq-box h4{margin:0 0 8px; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:#516079;}
.enq-box-h{display:flex; justify-content:space-between; align-items:center; margin-bottom:6px;} .enq-box-h h4{margin:0;}
.enq-kv{display:flex; justify-content:space-between; gap:10px; padding:5px 0; border-bottom:1px dashed #e8edf5; font-size:13.5px;} .enq-kv span{color:#64748b;} .enq-kv b{font-weight:600; text-align:right; word-break:break-word;}
.enq-notes{margin-top:10px; padding:9px 11px; background:#f6f8fc; border-radius:8px; font-size:13px; white-space:pre-wrap;}
.enq-row{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:6px 0;} .enq-row input[type=date],.enq-row select,.enq-row input:not([type]),.enq-row input[type=text]{padding:7px 10px; border:1px solid var(--line); border-radius:8px; font-family:inherit; background:#fff;}
.enq-quick{display:flex; gap:6px; flex-wrap:wrap; margin-top:6px;} .enq-chk{display:inline-flex; gap:6px; align-items:center; font-size:13px;}
.enq-tabs{display:flex; gap:6px; border-bottom:1px solid var(--line); margin:-4px 0 14px; flex-wrap:wrap;} .enq-tab{border:none; background:none; padding:9px 14px; font-weight:700; font-size:13px; color:#64748b; cursor:pointer; border-bottom:3px solid transparent; font-family:inherit;} .enq-tab.on{color:var(--navy-800,#12306b); border-bottom-color:var(--amber-500,#e8a20c);}
.enq-form .field{margin-bottom:10px;} .enq-cols{display:grid; grid-template-columns:repeat(auto-fit,minmax(215px,1fr)); gap:10px;} .enq-sec{padding:10px 0; border-bottom:1px solid #eef1f6;} .enq-sec:last-child{border-bottom:none;}
.enq-tl{display:flex; gap:12px; padding:11px 0; border-bottom:1px solid #eef1f6;} .enq-tl:last-child{border-bottom:none;} .enq-tl.status{opacity:.82;}
.enq-ico{width:32px; height:32px; border-radius:50%; background:#eef3fb; display:flex; align-items:center; justify-content:center; flex:none; font-size:15px;} .enq-tl-main{flex:1; min-width:0;}
.enq-tl-head{display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-size:13px;} .enq-tl-text{margin:4px 0; font-size:13.5px; white-space:pre-wrap; word-break:break-word;}
.enq-del{border:none; background:none; cursor:pointer; opacity:.45; font-size:15px;} .enq-del:hover{opacity:1;}

.enq-chk, .field label.enq-chk{display:inline-flex !important; flex-direction:row; align-items:center; gap:6px; text-transform:none !important; letter-spacing:0 !important; font-size:13px !important; font-weight:500 !important; color:inherit !important;}
.enq-chk input{width:auto; margin:0;}

/* Dashboard analysis from the CRM modules (admissions enquiries, franchise leads) */
.crm-sec{margin-top:34px;} .crm-head{display:flex; justify-content:space-between; align-items:flex-end; gap:12px; flex-wrap:wrap; margin-bottom:14px; padding-bottom:10px; border-bottom:2px solid #e3ecfb;}
.crm-head h2{margin:0; font-size:19px; color:var(--navy-900,#0b1b3f);} .crm-ctl{display:flex; gap:10px; align-items:center; flex-wrap:wrap;}
.crm-per{display:inline-flex; gap:8px; align-items:center; font-size:12px; font-weight:700; color:#516079; text-transform:uppercase; letter-spacing:.03em;} .crm-per select{padding:7px 10px; border:1px solid var(--line); border-radius:8px; font-family:inherit; background:#fff; font-weight:600; text-transform:none; letter-spacing:0;}
.crm-loading{padding:34px; text-align:center; color:#64748b;} .crm-sec .grid-main{grid-template-columns:minmax(0,1fr) minmax(0,1fr);} .grid-3{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px;} .grid-3 > .panel{margin-bottom:20px;}
@media (max-width:1100px){.crm-sec .grid-main,.grid-3{grid-template-columns:minmax(0,1fr);}}
.crm-funnel{display:grid; gap:7px;} .crm-fn-row{display:grid; grid-template-columns:104px 1fr 78px 34px; gap:10px; align-items:center; font-size:12.5px;} .crm-fn-lab{text-transform:capitalize; color:#33466b; font-weight:600;}
.crm-fn-bar{height:20px; background:#eef2f9; border-radius:6px; overflow:hidden;} .crm-fn-bar span{display:block; height:100%; background:linear-gradient(90deg,var(--amber-500,#e8a20c),#f3c14b); border-radius:6px;}
.crm-fn-val{text-align:right;} .crm-fn-val small{display:block; font-size:11px; color:#64748b;} .crm-fn-drop{font-size:11.5px; color:#b42318; text-align:right;}
.crm-table{width:100%; border-collapse:collapse; font-size:13px;} .crm-table th{text-align:left; font-size:11px; letter-spacing:.04em; text-transform:uppercase; color:#64748b; padding:7px 8px; border-bottom:1px solid var(--line);} .crm-table td{padding:8px; border-bottom:1px solid #eef1f6; vertical-align:middle;} .crm-table .r{text-align:right;}
.crm-table tr.crm-open{cursor:pointer;} .crm-table tr.crm-open:hover td{background:#f5f8fe;}
.crm-mini{display:inline-block; width:80px; height:8px; background:#eef2f9; border-radius:99px; overflow:hidden; vertical-align:middle; margin-right:6px;} .crm-mini span{display:block; height:100%; background:var(--green-600,#1e8e5a);}
.crm-split{display:grid; grid-template-columns:minmax(0,1fr); gap:14px; justify-items:stretch;} .crm-split > div:last-child{display:flex; justify-content:center;} .crm-split .crm-table{table-layout:auto;}
.crm-stack{display:flex; height:18px; border-radius:99px; overflow:hidden; background:#eef2f9; margin:2px 0 10px;} .crm-stack span{display:block; height:100%;} .crm-seg{cursor:pointer;}
.crm-legend{display:flex; gap:14px; flex-wrap:wrap; font-size:12.5px; color:#33466b;} .crm-legend i{display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:5px;}
.crm-sub{margin:16px 0 6px; font-size:12px; letter-spacing:.04em; text-transform:uppercase; color:#64748b;} .crm-note{font-size:13px; color:#33466b; margin-bottom:8px;} .crm-note b{font-size:20px; color:var(--navy-900,#0b1b3f);}
.crm-ok{padding:12px 14px; background:#e8f6ee; color:#14633c; border-radius:10px; font-size:13px;}
.crm-defs{margin-top:6px; padding:12px 16px; border:1px solid var(--line); border-radius:12px; background:#fafcff; font-size:13px; color:#33466b;} .crm-defs summary{cursor:pointer; font-weight:700;} .crm-defs p{margin:8px 0 0;}

/* the six KPI cards of an analysis section: three across (two on a narrow screen, six on a very wide one), with the whole subtitle visible */
.crm-sec .kpi-grid.fit{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
@media (max-width:900px){.crm-sec .kpi-grid.fit{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}}
@media (min-width:1750px){.crm-sec .kpi-grid.fit{grid-template-columns:repeat(6,minmax(0,1fr)) !important;}}
.crm-sec .kc-sub{white-space:normal !important; overflow:visible !important; text-overflow:clip !important; line-height:1.35;}
.crm-sec .crm-table{min-width:0;} .crm-sec .panel-body{overflow-x:auto;}

/* WhatsApp tracking and Meta configuration */
.crm-sec-kpis{grid-template-columns:repeat(3,minmax(0,1fr)) !important;} @media (max-width:900px){.crm-sec-kpis{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}} @media (min-width:1750px){.crm-sec-kpis{grid-template-columns:repeat(6,minmax(0,1fr)) !important;}}
.crm-sec-kpis .kc-sub{white-space:normal !important; overflow:visible !important; text-overflow:clip !important; line-height:1.35;}
.wa-days{display:flex; gap:6px; align-items:flex-end; height:170px; padding:6px 2px 0;} .wa-day{flex:1; min-width:10px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:4px; font-size:9.5px; color:#64748b;}
.wa-col{width:100%; max-width:34px; display:flex; flex-direction:column; border-radius:5px 5px 0 0; overflow:hidden; background:#eef2f9;} .wa-seg{display:block; width:100%;} .wa-seg.r{background:#2f6fe0;} .wa-seg.d{background:#1e8e5a;} .wa-seg.p{background:#c3cddd;} .wa-seg.f{background:var(--red-600,#c0281c);}
.wa-day span{white-space:nowrap; transform:rotate(-45deg); transform-origin:center; margin-top:6px; height:18px;}
.wa-log tr.wa-row{cursor:pointer;} .wa-log tr.wa-row:hover td{background:#f5f8fe;} .wa-pager{display:flex; justify-content:space-between; align-items:center; margin-top:10px; font-size:12.5px;}
.wa-ev{padding:6px 0; border-bottom:1px dashed #e8edf5; font-size:13px;}
.wa-steps{padding-left:20px; line-height:1.8; font-size:13.5px;} .wa-copy{display:inline-flex; gap:6px; align-items:center; flex-wrap:wrap;} .wa-copy code{background:#eef2f9; padding:4px 8px; border-radius:6px; font-size:12.5px; word-break:break-all;}
.wa-tpl{border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:14px; background:#fff;} .wa-tpl-h{display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;} .wa-tpl-h label{font-size:12px; font-weight:600; display:flex; gap:6px; align-items:center;}
.wa-body{width:100%; padding:10px; border:1px solid var(--line); border-radius:8px; font-size:12.5px; font-family:inherit; resize:vertical;} .wa-meta{border-top:1px dashed var(--line); margin-top:8px; padding-top:8px;} .wa-actions{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap;}
.wa-pgrid{display:flex; gap:10px; flex-wrap:wrap;} .wa-pgrid label{font-size:12px; color:#516079; display:flex; flex-direction:column; gap:3px;} .wa-pgrid select{padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-family:inherit;} .wa-submit{margin-top:10px; padding:10px; background:#f8fafd; border-radius:10px;}

.enq-tl.reply{background:#f1faf5; border-left:3px solid #1e8e5a; padding-left:9px; border-radius:6px;}

/* the tracking page on a narrow screen: tables scroll inside their own panel instead of widening the page */
#waTrack .panel-body, #waCfg .panel-body{overflow-x:auto;} #waTrack .crm-table, #waCfg .crm-table{min-width:520px;} #waTrack .wa-log{min-width:620px;}
#waTrack .crm-head{flex-wrap:wrap;} #waTrack .crm-ctl{flex-wrap:wrap;} #waTrack .adm-filters input[type=search]{min-width:0; width:100%;} #waTrack .wa-days{min-width:0; overflow:hidden;}
@media (max-width:700px){ #waTrack .crm-per select{max-width:150px;} .wa-copy{display:flex;} #waCfg .form-grid{grid-template-columns:1fr;} }
