:root{--blue:#084b94;--deep:#092e61;--sky:#e9f3ff;--text:#182943;--muted:#67788f;--border:#e0e8f2;--background:#f5f8fd;--shadow:0 4px 28px rgba(18,53,101,.045)}*{box-sizing:border-box}body{margin:0;background:var(--background);color:var(--text);font:14px/1.55 Inter,"Segoe UI",Arial,sans-serif}a{text-decoration:none;color:var(--blue)}button,input,select{font:inherit}button{cursor:pointer}.app{display:flex;min-height:100vh}.sidebar{width:255px;background:linear-gradient(166deg,#073c79,#062e60);color:#c8dbf4;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:5}.brand{background:#fff;display:flex;flex-direction:column;align-items:center;text-align:center;padding:16px 9px;color:#083e7e;font-weight:800;font-size:16px;letter-spacing:.1px}.brand img{width:100%;max-width:208px;height:78px;object-fit:contain}.brand span{padding-top:8px}.brand small{display:block;color:#7190ad;font-weight:500;font-size:11px;letter-spacing:1.1px;text-transform:uppercase}.sidebar nav{padding:22px 12px}.sidebar nav a{display:block;color:#d1e2f8;padding:12px 15px;margin:3px 0;border-radius:9px;font-weight:550;transition:background .15s}.sidebar nav a:hover,.sidebar nav a.active{background:#2165ab;color:#fff}.sidefoot{margin-top:auto;font-size:11px;text-align:center;padding:16px;opacity:.7}.main{margin-left:255px;min-width:0;flex:1}.topbar{height:74px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 30px;gap:16px}.breadcrumb{color:#697a8f;font-weight:600}.topuser{display:flex;align-items:center;gap:17px;text-align:right;font-weight:700}.topuser small{display:block;color:var(--muted);font-size:11px;font-weight:400}.content{padding:30px;max-width:1700px;margin:auto}.menu-button{display:none;background:transparent;border:0;font-size:25px;color:var(--deep)}h1,h2,h3,p{margin-top:0}h1{font-size:28px;line-height:1.3;letter-spacing:-.6px;margin-bottom:7px}h2{font-size:17px;letter-spacing:-.2px}h3{font-size:14px;margin:23px 0 10px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}.page-heading p{color:var(--muted);margin:0}.card{border:1px solid var(--border);border-radius:14px;background:#fff;padding:23px;box-shadow:var(--shadow);margin-bottom:22px;min-width:0}.card-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:17px}.card-head h2{margin:0}.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.stat{position:relative;min-height:129px;overflow:hidden}.stat span{display:block;color:var(--muted);font-weight:600}.stat strong{font-size:33px;display:block;margin-top:10px;line-height:1}.stat em{position:absolute;right:20px;bottom:20px;font-style:normal;color:#d6e5fa;font-size:43px}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:21px}.grid-2>.card{margin-bottom:22px}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.action-tile{display:flex;align-items:center;gap:12px;border:1px solid #d8e8ff;background:#f4f9ff;padding:14px;border-radius:11px;color:#064e99;font-size:20px;font-weight:700}.action-tile span{font-size:13px}.recent{display:flex;justify-content:space-between;border-bottom:1px solid #eef2f8;padding:12px 0}.recent small,.table-wrap td small{display:block;color:var(--muted)}.pill{border-radius:99px;background:#e9f2ff;color:#14559b;font-size:11px;font-weight:700;padding:5px 10px;white-space:nowrap}.barline{margin:18px 0}.barline>div:first-child{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}.bar-bg{height:9px;border-radius:99px;background:#e7eff9;overflow:hidden}.bar-bg div{height:100%;background:linear-gradient(90deg,#0960b8,#42a5e7);border-radius:99px}.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 15px;border-radius:8px;border:1px solid transparent;font-weight:650;font-size:13px;white-space:nowrap}.btn-primary{background:var(--blue);color:white}.btn-primary:hover{background:var(--deep)}.btn-light{background:#f2f6fc;color:#235487;border-color:#e3eaf4}.btn-outline{background:#fff;color:var(--blue);border-color:#c7d9ed}.btn-sm{font-size:12px;padding:6px 10px}.btn-danger{background:#b1283b;color:#fff}.btn-block{width:100%}.btn:disabled{opacity:.5;cursor:not-allowed}.form-card{max-width:1050px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.field{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#46556a;font-weight:700}.field input,.field select,.filterbar input,.filterbar select,.searchline input,.stage-form select{width:100%;border:1px solid #ccd9e9;border-radius:8px;padding:11px 12px;background:#fff;color:var(--text);min-height:43px}.field input:focus,.field select:focus,.filterbar input:focus,.filterbar select:focus{outline:2px solid #9bc5f0;border-color:#377cc7}.form-actions{display:flex;gap:10px;align-items:center;margin-top:23px;flex-wrap:wrap}.filterbar{display:flex;gap:11px;flex-wrap:wrap;align-items:end;border:1px solid var(--border);border-radius:12px;padding:18px;background:#fff;margin-bottom:22px}.filterbar label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#637185;min-width:120px;flex:1 1 125px}.filterbar label:last-of-type{flex:2 1 210px}.filterbar input,.filterbar select{height:40px;min-height:40px;padding:7px}.table-wrap{width:100%;overflow-x:auto;overscroll-behavior-x:contain}table{width:100%;border-collapse:collapse;text-align:left;min-width:620px}th{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#70829b;background:#f7faff}th,td{padding:12px 13px;border-bottom:1px solid #edf0f5;vertical-align:middle}tr:last-child td{border-bottom:none}td{font-size:13px}.inline{display:inline-block}.pagination{display:flex;align-items:center;justify-content:flex-end;gap:9px;margin-top:16px}.searchline{display:flex;gap:9px;margin-bottom:20px}.searchline input{width:340px;max-width:80%;padding:12px;border:1px solid var(--border);border-radius:8px}.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.report-grid>.card{margin-bottom:0}.report-grid table{min-width:250px}.stage-form select{min-height:34px;padding:5px 8px;font-size:12px;min-width:115px}.rules{padding-left:20px;color:#52657b}.rules li{margin:10px 0}.upload-form{margin-top:21px}.dropzone{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f7faff;border:2px dashed #afcbe9;border-radius:12px;padding:25px;gap:6px;text-align:center;margin-bottom:16px}.dropzone span{font-size:35px;color:var(--blue)}.dropzone small{color:var(--muted)}.dropzone input{max-width:100%;margin-top:10px}.import-summary{display:flex;gap:20px;font-size:17px}.good{color:#137d50}.bad{color:#bc3445}.alert{padding:13px 17px;border-radius:9px;margin-bottom:22px;border:1px solid}.alert.success{background:#e9f8ef;border-color:#c4ead0;color:#147447}.alert.error{background:#fff0f1;border-color:#f1c6ce;color:#9f2635}.alert.warning{background:#fff6df;border-color:#f5e2ad;color:#795c14}.muted{color:var(--muted)}.auth-page{display:flex;justify-content:center;align-items:center;min-height:100vh;padding:25px;background:radial-gradient(circle at 15% 10%,#dceeff,transparent 40%),#f1f6fc;flex-direction:column}.auth-card{background:#fff;max-width:450px;width:100%;border:1px solid var(--border);box-shadow:0 22px 70px rgba(16,48,100,.11);padding:30px;border-radius:18px}.auth-card img{width:100%;max-width:355px;height:105px;object-fit:contain;display:block;margin:auto auto 18px}.auth-card h1{text-align:center;font-size:22px}.auth-card p{text-align:center;color:var(--muted)}.auth-card .field{margin:18px 0}.auth-card>small{display:block;text-align:center;margin-top:22px;color:var(--muted)}.auth-card.setup{max-width:850px}.setup h3{padding-top:12px;border-top:1px solid var(--border)}@media(max-width:1200px){.stat-grid{grid-template-columns:repeat(2,1fr)}.content{padding:23px}.sidebar{width:230px}.main{margin-left:230px}}@media(max-width:1000px){.sidebar{transform:translateX(-100%);transition:transform .25s;width:255px;box-shadow:6px 0 20px rgba(0,0,0,.1)}.sidebar.open{transform:translateX(0)}.main{margin-left:0}.menu-button{display:block}.topbar{padding:0 19px}.grid-2,.report-grid{grid-template-columns:1fr}}@media(max-width:600px){h1{font-size:23px}.content{padding:15px}.topbar{height:65px}.breadcrumb{font-size:12px}.topuser{gap:9px}.topuser span{max-width:105px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}.topuser small{display:none}.card{padding:17px;border-radius:11px;margin-bottom:15px}.stat-grid{gap:10px}.stat{min-height:110px}.stat strong{font-size:27px}.stat span{font-size:12px}.stat em{font-size:30px;right:10px}.form-grid{grid-template-columns:1fr}.filterbar label{flex:1 1 135px}.filterbar label:last-of-type{flex:1 1 100%}.page-heading{margin-bottom:17px}.quick-actions{gap:9px}.action-tile{font-size:16px;padding:12px}.action-tile span{font-size:12px}.auth-card{padding:20px}.form-actions .btn{white-space:normal}}
/* v1.2 · Directory add forms and independent Excel imports */
.catalog-heading{margin:30px 0 15px;border-top:1px solid var(--border);padding-top:25px}
.catalog-heading h2{margin:0 0 6px;font-size:19px}
.catalog-heading p{margin:0}
.catalog-summary{flex-wrap:wrap;gap:10px;margin:16px 0}
.catalog-summary b{display:inline-block;background:#f2f7ff;border:1px solid #dfeaf7;border-radius:10px;padding:10px 15px;font-size:13px}
.catalog-summary b.good{background:#e7f7ee;border-color:#ccebd9}
.catalog-summary b.bad{background:#fff0f1;border-color:#f5d8dd}
#add-school,#add-event{scroll-margin-top:20px}
@media(max-width:600px){.catalog-heading{margin:24px 0 12px;padding-top:19px}.catalog-summary b{flex:1 1 100%;text-align:center}.searchline input{min-width:0;width:auto;flex:1;max-width:100%}.searchline .btn{padding:10px 12px}.dropzone{padding:18px 12px}}

/* v1.3: accessible school picker, read-only location and school editing */
.field-note{font-size:12px;font-weight:400;color:var(--muted);line-height:1.45}
.field input[readonly]{background:#edf3fa;color:#485f7b;cursor:not-allowed}
#schoolFilter{background:#f8fbff}
#edit-school{scroll-margin-top:18px;border-left:4px solid var(--blue)}
#schoolSelect{max-width:100%}
@media(max-width:600px){.card-head{flex-wrap:wrap}.form-actions{justify-content:flex-start}.field-note a{display:inline;text-decoration:underline}}
/* v1.4 four-field school search and responsive filtering */
.school-search { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.school-search input { flex: 2 1 260px; min-width:0; }
.school-search select { flex: 1 1 200px; min-width:0; padding:11px 12px; border:1px solid #cfdded; border-radius:9px; background:white; color:#21324e; }
@media(max-width:650px){ .school-search input,.school-search select,.school-search button,.school-search a{ width:100%; flex:1 1 100%; } }
/* v3.0 — fast entry, branded footer and responsive report charts */
.fast-entry-help{background:#e9f4ff;border:1px solid #d1e7ff;padding:13px 17px;border-radius:10px;margin-bottom:16px;color:#164f8a}
.fast-entry-feedback{min-height:1.2em;margin:13px 0 0;font-weight:650}
.fast-entry-feedback.success{color:#117449}.fast-entry-feedback.error{color:#b12c40}
.report-bars{padding:5px 0 12px;max-height:410px;overflow-y:auto}.report-bars .barline{margin:12px 0}.report-bars .barline>div:first-child span{max-width:83%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-actions{display:flex;gap:8px;flex-wrap:wrap}.report-grid .card{min-width:0}
.portal-footer{background:#fff;border-top:1px solid var(--border);color:#68798f;padding:18px 27px;display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:12px;flex-wrap:wrap}
.portal-footer b{color:var(--deep)}
@media(max-width:600px){.report-actions .btn{font-size:11px;padding:6px 9px}.portal-footer{padding:15px;justify-content:center;text-align:center}.report-bars{max-height:260px}}

/* v3.0.2 — account security: responsive password/change and admin reset forms. */
.security-card {max-width:820px;}
.security-note {padding:15px 0 0; border-top:1px solid var(--border); margin-top:20px;}
.login-help {margin:15px 0 0; text-align:center;}
.security-card .form-grid {max-width:710px;}
@media(max-width:600px){.security-toplink{font-size:11px;padding:7px 9px}.security-card .form-grid{grid-template-columns:1fr}}

/* v3.0.3 School activation dashboard */
.school-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:16px 0 18px;align-items:end}
.school-filter-grid .field:first-of-type{grid-column:span 2}
.school-filter-actions{display:flex;gap:8px;flex-wrap:wrap;align-self:end;padding-bottom:1px}
.school-results-note{color:#62758a;margin:0 0 16px;font-size:13px}
.school-bulk-toolbar{background:#f2f7ff;border:1px solid #d6e6fa;border-radius:11px;padding:13px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:15px}
.school-bulk-toolbar .school-scope{flex:1 1 240px;min-width:200px}
.school-bulk-toolbar select{width:100%;padding:10px;border:1px solid #cbdbea;border-radius:8px;background:white}
.school-checkall,.school-check-header,.school-global-confirm{display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:12px}
.school-bulk-toolbar input[type=checkbox],.school-row-check,.school-check-header input{width:17px;height:17px;accent-color:var(--blue);cursor:pointer}
.school-selection-count{background:#e5efff;padding:7px 9px;border-radius:7px;color:var(--deep);font-size:12px;white-space:nowrap}
.school-global-confirm{width:100%;color:#a22e3a;background:#fff2f3;padding:9px;border-radius:7px}
.school-global-confirm[hidden]{display:none}
.school-status{display:inline-block;padding:4px 9px;border-radius:999px;font-weight:700;font-size:11px}
.school-status.is-enabled{background:#e3f8e9;color:#187345}
.school-status.is-disabled{background:#f4eaec;color:#ad3043}
.school-row-actions{min-width:175px;white-space:nowrap}
@media(max-width:900px){.school-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.school-filter-grid{grid-template-columns:1fr}.school-filter-grid .field:first-of-type{grid-column:auto}.school-filter-actions .btn{flex:1}.school-bulk-toolbar .school-scope{flex:1 1 100%}.school-bulk-toolbar button{flex:1 1 auto}}

.school-management-shortcut{margin:-10px 0 22px}.school-management{scroll-margin-top:18px}

/* v3.0.4 — collector follow-ups and soft-deletion console */
.followup-cell{min-width:260px}.followup-form{min-width:220px;display:grid;gap:8px;align-items:start}
.followup-form .field{display:flex;flex-direction:column;gap:4px;margin:0;font-size:12px}
.followup-form textarea,.followup-form select,.followup-form input{width:100%;min-width:0;border:1px solid #cbdaeb;border-radius:7px;padding:8px;font:inherit;color:#17304c;background:white}
.followup-form textarea{resize:vertical;min-height:55px}.followup-form button{justify-self:start}
.followup-form .last-note{color:#47617b;white-space:normal;max-width:290px;display:block;line-height:1.5}
.admission-number-field[hidden]{display:none}.archive-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.archive-tabs .btn{padding:9px 14px}.table-wrap .followup-cell{max-width:340px}
@media(max-width:700px){.followup-cell{min-width:200px}.table-wrap .followup-cell{max-width:235px}}

/* PMIST WhatsApp v3.1 — responsive messaging and analytics */
.wa-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.wa-filters .field input,.wa-filters .field select,.wa-chat-layout .field input,.wa-chat-layout .field select,.wa-chat-layout .field textarea,.wa-entry-consent .field input{width:100%;border:1px solid #cfdeed;padding:10px 12px;border-radius:8px;min-height:42px;background:#fff;color:var(--text)}
.wa-chat-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:20px;align-items:start}
.wa-chat-layout .card{min-width:0}.wa-messages{max-height:680px;overflow-y:auto;background:#eef4f8;border-radius:11px;padding:16px;display:flex;gap:12px;flex-direction:column}
.wa-bubble{border-radius:13px;padding:12px 15px;background:#fff;max-width:87%;white-space:normal;overflow-wrap:anywhere;align-self:flex-start;box-shadow:0 1px 3px rgba(15,40,60,.08)}
.wa-bubble.out{background:#dcefe4;align-self:flex-end}.wa-bubble small{display:block;margin-top:7px;font-size:10px;color:#627686}
.wa-bubble-label{font-size:10px;text-transform:uppercase;letter-spacing:.3px;color:#5c7184;font-weight:700;margin-bottom:5px}
.wa-chat-layout .field{margin-bottom:13px}.wa-actions{display:flex;gap:9px;flex-wrap:wrap}.wa-recipients{max-height:410px;overflow:auto;border:1px solid #edf1f8;border-radius:9px;margin-top:15px}
.wa-selection-tools{display:flex;gap:20px;flex-wrap:wrap;align-items:center;margin-top:17px}.wa-selection-tools label,.wa-confirm{display:flex;align-items:center;gap:8px;font-weight:600}
.wa-selection-tools input,.wa-confirm input{width:17px;height:17px;accent-color:var(--blue)}
.wa-preview{padding:14px 17px;border-radius:11px;background:#eaf3ff;border:1px solid #d1e4fb;margin:18px 0;white-space:pre-wrap;line-height:1.7}
.wa-preview #waMessagePreview{white-space:pre-wrap;margin:12px 0;padding:12px;background:white;border-radius:8px;border:1px solid #dce9f6}
.wa-confirm{margin:15px 0}.wa-analytics-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;min-width:0}
.wa-analytics-grid>div{min-width:0;overflow-x:auto}.wa-entry-consent{grid-column:1/-1;display:grid;gap:10px;padding:14px 18px;background:#f0f7ff;border-radius:10px;border:1px solid #d7e7fa}
.wa-entry-consent>label:not(.field){display:flex;gap:10px;align-items:start;font-weight:600}.wa-entry-consent input[type=checkbox]{margin-top:4px}
@media(max-width:1100px){.wa-chat-layout{grid-template-columns:1fr}.wa-filters{grid-template-columns:repeat(2,1fr)}}
@media(max-width:750px){.wa-filters,.wa-analytics-grid{grid-template-columns:1fr}.wa-bubble{max-width:95%}.wa-chat-layout{gap:0}.wa-selection-tools{gap:13px}.wa-recipients{max-height:340px}}
