
:root{
  --navy:#061b3b; --navy2:#102b55; --coral:#ff686b; --yellow:#ffd966;
  --blue:#8bd8f7; --green:#1dbb83; --bg:#fbf9fd; --card:#fff; --ink:#071b3b;
  --muted:#6f7280; --line:#ece9f0; --danger:#e84e56;
}
*{box-sizing:border-box} body{margin:0;font-family:'Segoe UI',Arial,sans-serif;background:var(--bg);color:var(--ink)}
button,input,select{font:inherit}.hidden{display:none!important}
.public{min-height:100vh;background:#fff}
.public-nav{height:86px;display:flex;align-items:center;gap:28px;padding:0 6vw;border-bottom:1px solid #f0edf3;position:sticky;top:0;background:#fff;z-index:3}
.brand{font-weight:800;font-size:24px}.rainbow{display:inline-flex;gap:2px;margin-left:8px}.rainbow i{width:7px;height:16px;border-radius:7px;display:block}
.public-nav a{color:#343846;text-decoration:none;cursor:pointer}.public-nav .spacer{flex:1}
.btn{border:0;border-radius:12px;padding:12px 20px;cursor:pointer;background:var(--navy);color:#fff;font-weight:700}
.btn.secondary{background:#fff;color:var(--navy);border:1px solid var(--navy)} .btn.coral{background:var(--coral)}
.hero{min-height:610px;padding:80px 8vw;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:50px;background:linear-gradient(120deg,#fff9df,#fff 55%,#f5f0ff)}
.hero h1{font-size:58px;line-height:1.3;margin:10px 0}.hero h1 .coral{color:var(--coral)}.hero h1 .yellow{color:#d6a800}
.hero p{font-size:20px;line-height:2;color:#555;max-width:650px}.tag{display:inline-block;background:#ffe37d;padding:10px 18px;border-radius:999px;font-weight:700}
.art{position:relative;height:430px}.blob{position:absolute;border-radius:42% 58% 62% 38%;filter:saturate(.9)}
.blob.one{width:330px;height:330px;background:#ffe5aa;right:40px;top:20px}.blob.two{width:230px;height:230px;background:#bfe9fa;left:40px;bottom:15px}
.blob.three{width:155px;height:155px;background:#ffc7c8;right:0;bottom:10px}
.art-card{position:absolute;background:#fff;border-radius:28px;padding:28px;box-shadow:0 18px 50px #17264a20;right:90px;top:80px;width:310px}
.art-card h3{font-size:28px;margin:0 0 15px}.chips{display:flex;flex-wrap:wrap;gap:10px}.chip{padding:8px 12px;border-radius:999px;background:#f5f2f8}
.section{padding:70px 8vw}.section h2{font-size:38px;text-align:center}.features{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-top:35px}
.feature{background:#fff;border:1px solid var(--line);border-radius:22px;padding:28px;box-shadow:0 10px 30px #0b1d3b0b}
.admin{display:grid;grid-template-columns:260px 1fr;min-height:100vh}
.sidebar{background:var(--navy);color:#fff;padding:24px 16px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}
.side-brand{padding:8px 12px 24px;font-size:20px;font-weight:800}.side-brand small{display:block;font-size:11px;font-weight:400;color:#b8c5da;margin-top:6px}
.nav-item{padding:12px 14px;border-radius:9px;color:#d9e1ee;cursor:pointer;margin:2px 0}.nav-item:hover,.nav-item.active{background:#203b65;color:#fff}
.logout{margin-top:auto;color:#ff7b7f}.main{min-width:0}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:12px}
.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#ffe7a8;font-weight:800}.topbar .spacer{flex:1}
.content{padding:28px;max-width:1280px;margin:auto}.page-title h1{margin:0;font-size:30px}.page-title p{margin:8px 0 24px;color:var(--muted)}
.stats{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.stat{background:#fff;border-radius:16px;padding:18px;border:1px solid var(--line);min-height:104px}
.stat b{display:block;font-size:27px;margin-top:9px}.stat small{color:var(--muted)}.accent-yellow{border-top:3px solid var(--yellow)}.accent-coral{border-top:3px solid var(--coral)}.accent-blue{border-top:3px solid var(--blue)}.accent-green{border-top:3px solid var(--green)}
.grid2{display:grid;grid-template-columns:2fr 1fr;gap:18px;margin-top:18px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px}
.card h3{margin:0 0 18px}.bars{height:190px;display:flex;align-items:end;justify-content:space-around;border-bottom:1px solid #ddd;padding:0 20px}
.bar{width:50px;background:#31496b;border-radius:7px 7px 0 0}.quick{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick button{background:#f7f5f9;border:1px solid #eee;border-radius:12px;padding:17px;cursor:pointer}
.toolbar{display:flex;gap:10px;margin:18px 0}.toolbar input{flex:1;padding:12px 14px;border:1px solid #ddd;border-radius:10px}.toolbar select{padding:10px;border:1px solid #ddd;border-radius:10px;background:#fff}
table{width:100%;border-collapse:collapse;background:#fff;border-radius:16px;overflow:hidden}th,td{padding:14px 12px;border-bottom:1px solid #eee;text-align:right;font-size:14px}th{background:#f8f6fa;color:#555}.status{padding:5px 9px;border-radius:999px;font-size:12px;background:#e4f7ee;color:#16845c}.status.warn{background:#fff0c9;color:#8a6700}.money-red{color:#c33;font-weight:700}.money-green{color:#21834a;font-weight:700}
.profile-head{display:flex;align-items:center;gap:16px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px}.big-avatar{width:72px;height:72px;border-radius:18px;background:#d9eff9;display:grid;place-items:center;font-size:30px}
.tabs{display:flex;gap:5px;margin:18px 0;overflow:auto}.tab{white-space:nowrap;padding:10px 13px;border-bottom:2px solid transparent;color:#666}.tab.active{color:var(--navy);border-color:var(--navy);font-weight:700}
.finance-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin:18px 0}
.att-row{display:grid;grid-template-columns:1.5fr repeat(4,.7fr) 1fr;align-items:center;padding:12px;border-bottom:1px solid #eee}.att-btn{border:1px solid #ddd;background:#fff;border-radius:8px;padding:7px;cursor:pointer}.att-btn.selected{background:#dff6ec;border-color:#7ed4b1}
.mobile-toggle{display:none}
@media(max-width:900px){
 .hero{grid-template-columns:1fr;padding:45px 6vw}.art{height:330px}.hero h1{font-size:42px}.features{grid-template-columns:1fr}
 .admin{grid-template-columns:1fr}.sidebar{position:fixed;right:-280px;width:260px;z-index:20;transition:.2s}.sidebar.open{right:0}.mobile-toggle{display:block}
 .stats{grid-template-columns:repeat(2,1fr)}.grid2{grid-template-columns:1fr}.finance-summary{grid-template-columns:repeat(2,1fr)}
 .public-nav a:not(.keep){display:none}.public-nav{gap:12px}.brand{font-size:19px}
}
.mini{padding:7px 10px;border-radius:8px;font-size:12px}.modal-back{position:fixed;inset:0;background:#071b3b66;z-index:99;display:grid;place-items:center;padding:20px}.modal{width:min(620px,96vw);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;padding:26px;position:relative;box-shadow:0 30px 80px #0003}.modal-x{position:absolute;left:18px;top:14px;border:0;background:none;font-size:28px;cursor:pointer}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid label{display:flex;flex-direction:column;gap:7px;font-weight:700}.form-grid input,.form-grid select{padding:12px;border:1px solid #d9d9df;border-radius:10px;background:#fff}.modal-actions{display:flex;gap:10px;justify-content:flex-start;margin-top:22px}.att-row small,td small{display:block;color:#777;margin-top:4px}@media(max-width:650px){.form-grid{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.toolbar input{min-width:100%}.att-row{grid-template-columns:1fr 1fr;gap:8px}.finance-summary{grid-template-columns:1fr 1fr}}
@media print{.sidebar,.topbar,.toolbar,.btn{display:none!important}.admin{display:block}.content{padding:0}.card,.stat{box-shadow:none}}

.mini{padding:7px 9px;font-size:12px}.profile-head{flex-wrap:wrap}

/* v0.5 visual refinement */
.modalbg{align-items:center;overflow-y:auto}
.modal{max-height:88vh;overflow-y:auto;padding-bottom:28px}
.modal .actions{position:sticky;bottom:-28px;background:#fff;padding:14px 0 2px;border-top:1px solid #eee;z-index:3}
.student-hero{background:linear-gradient(135deg,#fff,#f3f8ff);border:1px solid var(--line);border-radius:22px;padding:22px;display:flex;align-items:center;gap:18px;box-shadow:0 12px 35px #071d3d0b}
.student-photo{width:96px;height:96px;border-radius:24px;object-fit:cover;background:#e9f5fb;border:4px solid #fff;box-shadow:0 7px 20px #071d3d18}
.student-photo.placeholder{display:grid;place-items:center;font-size:38px}
.photo-picker{display:flex;align-items:center;gap:14px;grid-column:1/-1;background:#f8f9fc;border:1px dashed #cfd7e5;border-radius:14px;padding:14px}
.photo-preview{width:74px;height:74px;border-radius:16px;object-fit:cover;background:#e8f3fa}
.finance-hero{background:linear-gradient(135deg,#071d3d,#173d68);color:#fff;border-radius:22px;padding:24px;display:flex;align-items:center;gap:18px}
.finance-hero .student-photo{width:74px;height:74px;border-radius:18px}
.finance-hero .space{flex:1}.balance-pill{background:#ffffff18;border:1px solid #ffffff30;border-radius:16px;padding:13px 18px;text-align:center}.balance-pill b{display:block;font-size:25px;margin-top:4px}
.finance-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.finance-metric{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px}.finance-metric small{color:var(--muted)}.finance-metric b{display:block;font-size:24px;margin-top:8px}
.finance-metric.good{border-top:3px solid var(--green)}.finance-metric.due{border-top:3px solid var(--coral)}.finance-metric.total{border-top:3px solid var(--blue)}.finance-metric.discount{border-top:3px solid var(--yellow)}
.ledger-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.receipt{font-family:'Segoe UI',Arial,sans-serif;background:#f5f4f7;border-radius:6px;padding:4px 7px}
@media(max-width:900px){.finance-grid{grid-template-columns:repeat(2,1fr)}.student-hero,.finance-hero{align-items:flex-start;flex-wrap:wrap}.modal{max-height:86vh}}

/* v0.5.1 — modal layout correction */
.modal-back{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:24px!important;
  overflow:hidden!important;
}
.modal{
  width:min(760px,calc(100vw - 48px))!important;
  max-height:calc(100vh - 48px)!important;
  overflow:hidden!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  border-radius:22px!important;
}
.modal-x{top:20px!important;left:24px!important;z-index:10}
.modal h2{
  margin:0!important;
  padding:24px 32px 18px!important;
  border-bottom:1px solid #edf0f5;
  flex:0 0 auto;
}
.modal-scroll{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:22px 32px 12px!important;
  flex:1 1 auto;
  min-height:0;
  scrollbar-width:thin;
}
.modal .form-grid{
  width:100%!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:16px!important;
}
.modal .form-grid label{min-width:0}
.modal .form-grid input,.modal .form-grid select{
  width:100%!important;min-width:0!important;box-sizing:border-box!important;
}
.modal-actions{
  margin:0!important;
  padding:16px 32px 20px!important;
  border-top:1px solid #edf0f5!important;
  background:#fff!important;
  flex:0 0 auto!important;
  position:static!important;
}
.photo-picker{box-sizing:border-box;width:100%}
@media(max-width:700px){
 .modal-back{padding:10px!important;align-items:stretch!important}
 .modal{width:100%!important;max-height:calc(100vh - 20px)!important;border-radius:18px!important}
 .modal h2{padding:22px 20px 16px!important}
 .modal-scroll{padding:18px 20px 10px!important}
 .modal-actions{padding:14px 20px 18px!important}
 .modal .form-grid{grid-template-columns:1fr!important}
}

/* v0.6 family layer */
.family-note{background:#eef7ff;border:1px solid #cfe5f6;border-radius:13px;padding:13px 16px;margin:18px 0;color:#244b6b}
.child-link{display:block;cursor:pointer;color:#173f70;font-weight:700;margin:4px 0}.child-link:hover{text-decoration:underline}
.family-hero{display:flex;align-items:center;gap:18px;background:linear-gradient(135deg,#fff,#f5f9ff);border:1px solid var(--line);border-radius:22px;padding:22px;margin-top:18px}
.family-icon{width:78px;height:78px;border-radius:20px;background:#fff0c8;display:grid;place-items:center;font-size:34px}.family-hero h2{margin:5px 0}.family-hero .space{flex:1}
.family-balance{background:#071d3d;color:#fff;border-radius:16px;padding:14px 18px;text-align:center}.family-balance b{display:block;font-size:24px;margin-top:5px}
.family-children{display:grid;gap:14px;margin-top:18px}.family-child-card{display:flex;align-items:center;gap:16px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px}.family-child-card .student-photo{width:70px;height:70px;border-radius:18px}.grow{flex:1}.grow h3{margin:0 0 5px}.family-mini{display:flex;gap:22px;margin-top:10px}.family-child-card>div:last-child{display:flex;gap:7px;flex-wrap:wrap}
@media(max-width:700px){.family-hero,.family-child-card{align-items:flex-start;flex-wrap:wrap}.family-balance{width:100%}.family-mini{flex-direction:column;gap:5px}}

/* v0.7 dashboard redesign — intentionally lower density */
.dash-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:18px}
.dash-head h1{margin:0;font-size:30px;color:#071d3d}.dash-head p{margin:6px 0 0;color:#7a8494}

.children-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:28px}
.dash-child-card{background:#fff;border:1px solid #e5e9ef;border-radius:18px;padding:18px 19px;box-shadow:0 7px 22px rgba(7,29,61,.045);min-height:142px}
.dcc-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.dcc-top>div:first-child{display:grid;gap:2px}.dash-child-card span{color:#667287;font-weight:700;font-size:13px}
.dash-child-card strong{font-size:31px;color:#071d3d;line-height:1.05}.dash-child-card small{color:#929baa;font-size:11px}
.gender-ring{width:64px;height:64px;border-radius:50%;background:conic-gradient(#5b91ee 0 var(--male),#f36b9b var(--male) 100%);display:grid;place-items:center;flex:0 0 auto}
.gender-ring>div{width:38px;height:38px;border-radius:50%;background:#fff}
.gender-line{display:flex;justify-content:space-between;gap:8px;margin-top:15px;padding-top:12px;border-top:1px solid #eef1f5}
.gender-line span{font-size:11px}.gender-line b{font-size:13px}
.male-dot{color:#3977d8!important}.female-dot{color:#d84d82!important}
.all-kids{border-top:3px solid #7da8ef}.garden-kids{border-top:3px solid #66c49a}.prep-kids{border-top:3px solid #9d91e8}
.year-card{display:flex;flex-direction:column;justify-content:center;border-top:3px solid #efc25c}
.year-value{font-size:23px!important;margin:8px 0 10px}.year-status{display:inline-flex;align-items:center;gap:6px;width:max-content;background:#edf8f1;color:#27835b;border-radius:20px;padding:5px 10px;font-size:12px;margin-bottom:6px}
.year-status i{width:7px;height:7px;border-radius:50%;background:#31a46f}

.section-title{display:flex;justify-content:space-between;align-items:end;margin:6px 0 12px}.section-title h2{font-size:19px;margin:0;color:#0b2447}.section-title p{font-size:12px;color:#8a93a2;margin:4px 0 0}
.quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:34px}
.quick-card{border:1px solid transparent;border-radius:18px;padding:18px;text-align:right;display:flex;align-items:center;gap:13px;min-height:102px;cursor:pointer;font-family:inherit;transition:.16s;box-shadow:none}
.quick-card:hover{transform:translateY(-2px);box-shadow:0 9px 24px rgba(7,29,61,.07)}
.quick-card>div:nth-child(2){display:flex;flex-direction:column;gap:4px;flex:1}.quick-card b{font-size:16px;color:#102847}.quick-card span{font-size:11px;color:#69778a}.quick-card>i{font-style:normal;font-size:17px;color:#59697c}
.q-icon{width:43px;height:43px;border-radius:13px;background:rgba(255,255,255,.72);display:grid;place-items:center;font-size:22px;font-weight:800}
.q-blue{background:#edf5ff;border-color:#d7e7fb}.q-green{background:#eef9f3;border-color:#d8eee2}.q-yellow{background:#fff8e7;border-color:#f3e4b8}.q-coral{background:#fff0f1;border-color:#f4d9dc}

.finance-title{margin-top:4px}.finance-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:20px}
.finance-lite{background:#fff;border:1px solid #e5e9ef;border-radius:15px;padding:15px 17px;display:flex;align-items:center;justify-content:space-between}
.finance-lite span{color:#778294;font-size:12px;font-weight:700}.finance-lite b{font-size:19px;color:#183f70}.finance-lite.paid b{color:#25845d}.finance-lite.balance b{color:#c95a61}

@media(max-width:1050px){.children-overview,.quick-actions{grid-template-columns:repeat(2,1fr)}}
@media(max-width:650px){.children-overview,.quick-actions,.finance-summary{grid-template-columns:1fr}.gender-line{justify-content:flex-start;gap:24px}.finance-title{align-items:flex-start;gap:10px;flex-direction:column}}

.guardians-toolbar{justify-content:flex-start}
.guardians-toolbar input{width:100%;max-width:none}
.tiny{font-size:10px;margin-top:3px}

.guardians-table td.guardian-group, td.guardian-group{vertical-align:middle;background:#fff}
.guardian-child-row td{border-top:1px dashed #e6eaf0}

/* v0.7.4 children page: separate stage tables + very subtle zebra rows */
.stage-table-section{margin-top:20px}
.stage-table-title{display:flex;align-items:center;justify-content:space-between;margin:0 4px 9px}
.stage-table-title>div{display:flex;align-items:center;gap:10px}
.stage-table-title h2{margin:0;color:#09264c;font-size:19px}
.stage-table-title span{background:#f0f4f8;color:#718096;border-radius:20px;padding:4px 10px;font-size:11px;font-weight:700}
.child-table-card{padding:0!important;overflow:auto}
.child-table-card tbody tr:nth-child(odd){background:#ffffff}
.child-table-card tbody tr:nth-child(even){background:#f8faff}
.child-table-card tbody tr:hover{background:#f2f6fc}
.child-table-card tbody td{background:transparent!important}

.stage-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}
.stage-summary>div{background:#fff;border:1px solid #e5e9ef;border-radius:15px;padding:15px 17px;display:flex;justify-content:space-between;align-items:center}
.stage-summary small{color:#7c8797}.stage-summary b{font-size:23px;color:#09264c}
@media(max-width:750px){.stage-summary{grid-template-columns:repeat(2,1fr)}}
@media print{
 @page{size:A4;margin:10mm}
 body{font-size:10pt!important;background:#fff!important}
 .content{padding:0!important;max-width:none!important}
 .page-title{margin:0 0 8px!important}.page-title h1{font-size:18pt!important;margin:0!important}.page-title p{margin:2px 0!important}
 .finance-summary{gap:6px!important;margin:6px 0 10px!important;grid-template-columns:repeat(5,1fr)!important}
 .finance-summary .stat,.stat{padding:8px!important;min-height:auto!important}.stat b{font-size:14pt!important}
 .grid2{gap:8px!important;grid-template-columns:1.35fr .65fr!important}.card{padding:10px!important;margin:0!important;border:1px solid #ddd!important}
 h3{margin:0 0 6px!important;font-size:12pt!important}table{font-size:9pt!important}th,td{padding:5px 6px!important}
 .card p{margin:4px 0!important}.muted{font-size:8.5pt!important}
}
\n/* v0.9.6 verified dashboard finance navigation + compact statement print */
@media print{
  @page{size:A4 portrait;margin:8mm}
  html,body{background:#fff!important}
  .sidebar,.topbar,.toolbar,.btn,.mobile-toggle{display:none!important}
  .admin{display:block!important}
  .content{width:75%!important;max-width:75%!important;margin:0 auto!important;padding:0!important}
  .page-title{margin:0 0 5px!important}
  .page-title h1{font-size:15pt!important;line-height:1.2!important}
  .page-title p{font-size:8pt!important;margin:1px 0!important}
  .finance-summary{grid-template-columns:repeat(5,1fr)!important;gap:4px!important;margin:4px 0 7px!important}
  .finance-summary .stat,.stat{padding:5px 6px!important;border-radius:7px!important;min-height:0!important}
  .stat span{font-size:7pt!important}.stat b{font-size:11pt!important;line-height:1.15!important}
  .grid2{grid-template-columns:1.35fr .65fr!important;gap:6px!important}
  .card{padding:7px!important;border-radius:7px!important;box-shadow:none!important}
  .card h3,h3{font-size:9.5pt!important;margin:0 0 4px!important}
  .card p{font-size:8pt!important;margin:2px 0!important;line-height:1.25!important}
  table{font-size:7.5pt!important;width:100%!important}
  th,td{padding:3px 4px!important;line-height:1.2!important}
  td small{font-size:6.5pt!important;margin-top:1px!important}
}

/* v0.9.7 — true compact A4 child financial statement */
@media print {
  @page { size: A4 portrait; margin: 12mm 10mm; }
  html, body { width: 210mm !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body { font-size: 8pt !important; }
  .sidebar, .topbar, .toolbar, .btn, .mobile-toggle { display: none !important; }
  .admin { display: block !important; min-height: 0 !important; }
  .content {
    box-sizing: border-box !important;
    width: 140mm !important;
    max-width: 140mm !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  .page-title { margin: 0 0 3mm !important; padding: 0 !important; }
  .page-title h1 { margin: 0 !important; font-size: 12pt !important; line-height: 1.15 !important; }
  .page-title p { margin: 1mm 0 0 !important; font-size: 7pt !important; line-height: 1.2 !important; }
  .finance-summary {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 1.5mm !important;
    margin: 0 0 3mm !important;
  }
  .finance-summary .stat {
    padding: 2mm 1.5mm !important;
    min-height: 0 !important;
    border-radius: 2mm !important;
    box-shadow: none !important;
  }
  .finance-summary .stat span { font-size: 6pt !important; line-height: 1.1 !important; }
  .finance-summary .stat b { display:block !important; margin-top:.7mm !important; font-size: 9pt !important; line-height: 1.1 !important; }
  .grid2 {
    display: grid !important;
    grid-template-columns: 1.35fr .65fr !important;
    gap: 2mm !important;
    align-items: start !important;
  }
  .card {
    padding: 2.5mm !important;
    margin: 0 !important;
    border: .2mm solid #d9dee7 !important;
    border-radius: 2mm !important;
    box-shadow: none !important;
    break-inside: avoid !important;
  }
  .grid2 > div > .card + .card { margin-top: 2mm !important; }
  h3, .card h3 { margin: 0 0 1.5mm !important; font-size: 8pt !important; line-height: 1.15 !important; }
  .card p { margin: 1mm 0 !important; font-size: 7pt !important; line-height: 1.2 !important; }
  table { width: 100% !important; border-collapse: collapse !important; font-size: 6.8pt !important; }
  th, td { padding: 1.2mm 1.4mm !important; line-height: 1.15 !important; }
  th { font-size: 6.5pt !important; }
  td small { display:block !important; margin-top:.4mm !important; font-size: 5.8pt !important; line-height:1.1 !important; }
}


/* v0.9.8 — child-first financial hierarchy */
.finance-child-cell{min-width:260px!important}
.finance-child-name{display:block!important;font-size:18px!important;line-height:1.35!important;color:#071d3d!important;font-weight:800!important;margin-bottom:3px!important}
.finance-child-cell small{font-size:11px!important;color:#7b8798!important}
/* Financial figures are supporting information, not the visual subject. */
#feeRows td:not(.finance-child-cell){font-size:13px!important}
#feeRows .money-green,#feeRows .money-red{font-size:14px!important}
.child-finance-heading{margin:0 0 18px;text-align:right}
.child-finance-kicker{font-size:13px;color:#7b8798;font-weight:700;margin-bottom:3px}
.child-finance-heading h1{margin:0;color:#071d3d;font-size:34px;line-height:1.2;font-weight:800}
.child-finance-meta{display:flex;gap:10px;margin-top:7px;color:#778397;font-size:12px;font-weight:700}
.child-finance-meta span+span:before{content:'•';margin-left:10px;color:#b1bac7}
.finance-summary .stat small{font-size:12px}
.finance-summary .stat b{font-size:22px}

@media print{
  /* Child identity is deliberately dominant on the printed statement. */
  .child-finance-heading{margin:0 0 3mm!important;text-align:right!important}
  .child-finance-kicker{font-size:7pt!important;margin:0 0 .8mm!important;color:#777!important}
  .child-finance-heading h1{font-size:18pt!important;line-height:1.08!important;margin:0!important;font-weight:800!important;color:#071d3d!important}
  .child-finance-meta{font-size:6.5pt!important;margin-top:1mm!important;gap:2mm!important}
  .child-finance-meta span+span:before{margin-left:2mm!important}
  .finance-summary .stat span,.finance-summary .stat small{font-size:5.4pt!important}
  .finance-summary .stat b{font-size:7.5pt!important;margin-top:.5mm!important}
  h3,.card h3{font-size:7pt!important}
  .card p{font-size:6.2pt!important}
  table{font-size:6pt!important}
  th{font-size:5.7pt!important}
  th,td{padding:1mm 1.2mm!important}
}

/* v0.10.0 — compact structured student form */
.modal:has(#scName){width:min(920px,calc(100vw - 48px))!important}
.modal:has(#scName) .modal-scroll{padding:18px 28px 12px!important}
.modal:has(#scName) .form-grid{display:block!important}
.student-form-section{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px;padding:14px 16px 16px;margin-bottom:14px;border:1px solid #e5eaf2;border-radius:16px;background:#fff}
.student-form-title{grid-column:1/-1;font-size:17px;font-weight:900;color:#09234b;padding-bottom:9px;border-bottom:1px solid #edf0f5;margin-bottom:1px}
.student-form-section label{gap:5px!important;font-size:14px!important}
.student-form-section input,.student-form-section select{padding:10px 11px!important;min-height:42px!important}
.student-name-field{grid-column:span 2}
.student-name-field input{font-size:16px!important;font-weight:800!important}
.family-section{background:#fffdf9}
.emergency-section{background:#fbfcff}
.pickup-field{grid-column:span 2}
.modal:has(#scName) .modal-actions{padding:12px 28px 16px!important}
@media(max-width:780px){.student-form-section{grid-template-columns:1fr 1fr}.student-name-field,.pickup-field{grid-column:1/-1}}
@media(max-width:560px){.student-form-section{grid-template-columns:1fr}.student-name-field,.pickup-field{grid-column:auto}}

/* v0.10.1 — unified Arabic typography + refined student editor */
html,body,button,input,select,textarea{font-family:'Segoe UI',Arial,sans-serif!important}
body{font-weight:400;letter-spacing:0}
.btn{font-weight:600}
.nav-item,.public-nav a{font-weight:500}

/* Student editor: calmer hierarchy, less visual weight, better density */
.modal:has(#scName){width:min(980px,calc(100vw - 44px))!important;border-radius:18px!important;padding:0!important;overflow:hidden!important}
.modal:has(#scName)>h2{font-size:21px!important;font-weight:700!important;line-height:1.5!important;margin:0!important;padding:19px 28px 15px!important;border-bottom:1px solid #edf0f5!important;background:#fff!important}
.modal:has(#scName) .modal-x{top:14px!important;left:22px!important;font-size:25px!important;font-weight:400!important}
.modal:has(#scName) .modal-scroll{padding:16px 24px 8px!important;background:#fafbfe!important}
.modal:has(#scName) .form-grid{display:block!important}
.student-form-section{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px 16px!important;padding:12px 16px 15px!important;margin-bottom:11px!important;border:1px solid #e6eaf1!important;border-radius:13px!important;box-shadow:0 1px 2px #071b3b08!important}
.student-form-title{font-size:14px!important;font-weight:700!important;line-height:1.6!important;color:#17365f!important;padding:0 0 7px!important;margin:0 0 1px!important;border-bottom:1px solid #edf0f5!important}
.student-form-section label{font-size:12px!important;font-weight:600!important;line-height:1.5!important;gap:4px!important;color:#26364d!important}
.student-form-section input,.student-form-section select{font-size:13px!important;font-weight:400!important;line-height:1.4!important;padding:8px 10px!important;min-height:38px!important;border-radius:8px!important;border-color:#dfe4ec!important;color:#14243a!important;background:#fff!important}
.student-form-section input:focus,.student-form-section select:focus{outline:2px solid #b9d8f5!important;outline-offset:0!important;border-color:#8dbce8!important}
.student-name-field{grid-column:span 2!important}
.student-name-field input{font-size:16px!important;font-weight:700!important;color:#071b3b!important}
.family-section{background:#fff!important}
.emergency-section{background:#fff!important}
.pickup-field{grid-column:span 2!important}
.modal:has(#scName) .modal-actions{margin:0!important;padding:11px 24px 14px!important;border-top:1px solid #e8ebf1!important;background:#fff!important;position:sticky!important;bottom:0!important}
.modal:has(#scName) .modal-actions .btn{padding:9px 18px!important;border-radius:9px!important;font-size:13px!important;font-weight:600!important}

/* Financial screens: child identity first, figures intentionally quieter */
.child-finance-heading h1,.finance-student-name,.student-name{font-family:'Segoe UI',Arial,sans-serif!important;font-weight:700!important}
.finance-summary .stat b,.finance-grid .stat b{font-weight:600!important}
.finance-summary .stat span,.finance-summary .stat small,.finance-grid .stat span,.finance-grid .stat small{font-weight:400!important}

@media print{
  html,body,.print-sheet,.statement-sheet{font-family:'Segoe UI',Arial,sans-serif!important}
  body{font-size:8pt!important;font-weight:400!important}
  .child-finance-heading h1{font-size:17pt!important;font-weight:700!important;line-height:1.25!important}
  .child-finance-kicker{font-size:6.5pt!important;font-weight:400!important}
  .child-finance-meta{font-size:6.5pt!important;font-weight:400!important}
  .finance-summary .stat b{font-size:7pt!important;font-weight:600!important}
  .finance-summary .stat span,.finance-summary .stat small{font-size:5.2pt!important;font-weight:400!important}
  h3,.card h3{font-size:6.8pt!important;font-weight:600!important}
  table{font-size:5.8pt!important;font-weight:400!important}
  th{font-size:5.5pt!important;font-weight:600!important}
}


/* v0.10.2 — TRUE GLOBAL TYPOGRAPHY: every visible text node uses Noto Sans Arabic */
html, body, body *, body *::before, body *::after,
button, input, select, textarea, option, table, thead, tbody, tfoot, tr, th, td,
label, small, strong, b, span, p, a, h1, h2, h3, h4, h5, h6,
.receipt, code, pre {
  font-family:'Segoe UI',Arial,sans-serif!important;
}
.receipt, code, pre { font-variant-numeric: tabular-nums; }

@media print {
  html, body, body *, body *::before, body *::after,
  button, input, select, textarea, option, table, thead, tbody, tfoot, tr, th, td,
  label, small, strong, b, span, p, a, h1, h2, h3, h4, h5, h6,
  .receipt, code, pre {
    font-family:'Segoe UI',Arial,sans-serif!important;
  }
}

/* v0.10.3 — LOCAL GLOBAL TYPOGRAPHY (no web-font dependency) */
html, body, body *, body *::before, body *::after,
button, input, select, textarea, option, table, th, td,
.receipt, .print-sheet, .print-sheet *, .statement-sheet, .statement-sheet * {
  font-family: "Segoe UI", Arial, sans-serif !important;
}
@media print {
  html, body, body *, body *::before, body *::after,
  button, input, select, textarea, option, table, th, td,
  .receipt, .print-sheet, .print-sheet *, .statement-sheet, .statement-sheet * {
    font-family: "Segoe UI", Arial, sans-serif !important;
  }
}

/* v0.10.4 — comprehensive child statement */
.student-statement{max-width:980px;margin:0 auto;background:#fff;border:1px solid #e3e8ef;border-radius:18px;padding:28px 32px;color:#14243a;font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;box-shadow:0 8px 30px #0a214012}
.student-statement *{font-family:Tahoma,"Segoe UI",Arial,sans-serif!important}
.statement-header{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #163d6b;padding-bottom:16px;margin-bottom:18px}
.statement-brand{display:flex;align-items:center;gap:12px}.statement-brand h1{font-size:23px;margin:0;color:#102f55}.statement-brand p{margin:3px 0 0;color:#66758a;font-size:13px}.statement-date{text-align:left;font-size:11px;color:#718096;line-height:1.7}.statement-date b{font-size:13px;color:#263c59}
.statement-identity{display:flex;align-items:center;gap:15px;background:#f6f9fc;border:1px solid #e4eaf1;border-radius:14px;padding:14px 16px;margin-bottom:16px}.statement-identity .student-photo{width:64px!important;height:64px!important;min-width:64px!important;border-radius:12px!important}.statement-identity span{font-size:11px;color:#78869a}.statement-identity h2{font-size:24px;margin:2px 0 4px;color:#0b294e}.statement-identity p{margin:0;color:#64748b;font-size:12px}.statement-identity>strong{margin-right:auto;background:#e8f5ed;color:#237548;padding:5px 10px;border-radius:20px;font-size:11px}
.statement-section{margin-top:15px;break-inside:avoid}.statement-section h3{font-size:14px;color:#123b69;margin:0 0 9px;padding-bottom:6px;border-bottom:1px solid #dfe6ee}.statement-fields{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #e4e9ef;border-radius:10px;overflow:hidden}.statement-field{padding:9px 11px;border-left:1px solid #e8edf2;border-bottom:1px solid #e8edf2;min-height:48px}.statement-field span{display:block;font-size:10px;color:#7a8798;margin-bottom:3px}.statement-field b{font-size:12px;font-weight:600;color:#172b45}.statement-note{border:1px solid #e4e9ef;border-radius:10px;padding:10px 12px;font-size:12px;line-height:1.8}
.statement-table{width:100%;border-collapse:collapse;border:1px solid #e1e7ee;font-size:11px}.statement-table th{background:#f3f6f9;color:#41546c;font-weight:600}.statement-table th,.statement-table td{padding:8px 9px;border:1px solid #e1e7ee;text-align:right}.statement-finance-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:7px}.statement-finance-summary>div{background:#f6f8fb;border:1px solid #e2e7ed;border-radius:9px;padding:9px;text-align:center}.statement-finance-summary span{display:block;color:#728096;font-size:9px}.statement-finance-summary b{display:block;margin-top:3px;font-size:13px;color:#16395f}.statement-finance-summary .balance{background:#fff6f4}.statement-finance-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.statement-finance-grid h4{font-size:11px;margin:0 0 5px;color:#52637a}.statement-finance-grid.single{grid-template-columns:1fr}.statement-footer{display:flex;justify-content:space-between;border-top:1px solid #dfe6ee;margin-top:18px;padding-top:9px;color:#8a96a6;font-size:9px}
@media(max-width:760px){.statement-fields{grid-template-columns:1fr 1fr}.statement-finance-summary{grid-template-columns:1fr 1fr}.statement-finance-grid{grid-template-columns:1fr}}
@media print{
 @page{size:A4 portrait;margin:10mm}
 body{background:#fff!important}.statement-actions{display:none!important}.student-statement{width:auto!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;font-family:Tahoma,Arial,sans-serif!important;color:#111!important}.student-statement *{font-family:Tahoma,Arial,sans-serif!important}
 .statement-header{padding-bottom:3mm;margin-bottom:3mm}.statement-brand h1{font-size:16pt!important}.statement-brand p{font-size:8pt!important}.statement-date{font-size:7pt!important}.statement-date b{font-size:8pt!important}
 .statement-identity{padding:2.5mm 3mm!important;margin-bottom:3mm!important;border-radius:2mm!important}.statement-identity .student-photo{width:14mm!important;height:14mm!important;min-width:14mm!important}.statement-identity h2{font-size:15pt!important}.statement-identity span,.statement-identity p,.statement-identity>strong{font-size:7pt!important}
 .statement-section{margin-top:3mm!important}.statement-section h3{font-size:9pt!important;margin-bottom:1.5mm!important;padding-bottom:1mm!important}.statement-fields{grid-template-columns:repeat(3,1fr)!important;border-radius:1.5mm!important}.statement-field{padding:1.5mm 2mm!important;min-height:9mm!important}.statement-field span{font-size:6pt!important;margin-bottom:.5mm!important}.statement-field b{font-size:7.3pt!important}.statement-note{font-size:7pt!important;padding:1.5mm 2mm!important}
 .statement-table{font-size:6.6pt!important}.statement-table th,.statement-table td{padding:1.25mm 1.5mm!important}.statement-finance-summary{gap:1.5mm!important}.statement-finance-summary>div{padding:1.5mm!important;border-radius:1.5mm!important}.statement-finance-summary span{font-size:5.5pt!important}.statement-finance-summary b{font-size:7.2pt!important}.statement-finance-grid{gap:2mm!important;margin-top:2mm!important}.statement-finance-grid h4{font-size:6.5pt!important;margin-bottom:1mm!important}.statement-footer{font-size:5.8pt!important;margin-top:3mm!important;padding-top:1.5mm!important}
}

/* v0.10.9 — print statement mirrors on-screen statement */
@media print{
  @page{size:A4 portrait;margin:8mm}
  html,body{background:#fff!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .statement-actions{display:none!important}

  /* Keep the same visual language used on screen instead of shrinking the report. */
  .student-statement{
    width:auto!important;
    max-width:none!important;
    margin:0!important;
    padding:20px 22px!important;
    background:#fff!important;
    border:1px solid #e3e8ef!important;
    border-radius:18px!important;
    box-shadow:none!important;
    color:#14243a!important;
    font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;
  }
  .student-statement *{font-family:Tahoma,"Segoe UI",Arial,sans-serif!important}

  .statement-header{padding-bottom:16px!important;margin-bottom:18px!important;border-bottom:2px solid #163d6b!important}
  .statement-brand{gap:12px!important}
  .statement-brand h1{font-size:23px!important;margin:0!important;color:#102f55!important}
  .statement-brand p{margin:3px 0 0!important;color:#66758a!important;font-size:13px!important}
  .statement-date{font-size:11px!important;color:#718096!important;line-height:1.7!important}
  .statement-date b{font-size:13px!important;color:#263c59!important}

  .statement-identity{gap:15px!important;background:#f6f9fc!important;border:1px solid #e4eaf1!important;border-radius:14px!important;padding:14px 16px!important;margin-bottom:16px!important}
  .statement-identity .student-photo{width:64px!important;height:64px!important;min-width:64px!important;border-radius:12px!important}
  .statement-identity span{font-size:11px!important;color:#78869a!important}
  .statement-identity h2{font-size:24px!important;margin:2px 0 4px!important;color:#0b294e!important}
  .statement-identity p{margin:0!important;color:#64748b!important;font-size:12px!important}
  .statement-identity>strong{background:#e8f5ed!important;color:#237548!important;padding:5px 10px!important;border-radius:20px!important;font-size:11px!important}

  .statement-section{margin-top:15px!important;break-inside:avoid!important}
  .statement-section h3{font-size:14px!important;color:#123b69!important;margin:0 0 9px!important;padding-bottom:6px!important;border-bottom:1px solid #dfe6ee!important}
  .statement-fields{grid-template-columns:repeat(3,1fr)!important;border:1px solid #e4e9ef!important;border-radius:10px!important;overflow:hidden!important}
  .statement-field{padding:9px 11px!important;border-left:1px solid #e8edf2!important;border-bottom:1px solid #e8edf2!important;min-height:48px!important}
  .statement-field span{font-size:10px!important;color:#7a8798!important;margin-bottom:3px!important}
  .statement-field b{font-size:12px!important;font-weight:600!important;color:#172b45!important}
  .statement-note{border:1px solid #e4e9ef!important;border-radius:10px!important;padding:10px 12px!important;font-size:12px!important;line-height:1.8!important}

  .statement-finance-summary{grid-template-columns:repeat(auto-fit,minmax(120px,1fr))!important;gap:7px!important}
  .statement-finance-summary>div{background:#f6f8fb!important;border:1px solid #e2e7ed!important;border-radius:9px!important;padding:9px!important;text-align:center!important}
  .statement-finance-summary span{font-size:9px!important;color:#728096!important}
  .statement-finance-summary b{font-size:13px!important;color:#16395f!important;margin-top:3px!important}
  .statement-finance-summary .balance{background:#fff6f4!important}
  .statement-finance-grid{grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:10px!important}
  .statement-finance-grid.single{grid-template-columns:1fr!important}
  .statement-finance-grid h4{font-size:11px!important;margin:0 0 5px!important;color:#52637a!important}

  .statement-table{font-size:11px!important;border:1px solid #e1e7ee!important}
  .statement-table th{background:#f3f6f9!important;color:#41546c!important;font-weight:600!important;font-size:11px!important}
  .statement-table th,.statement-table td{padding:8px 9px!important;border:1px solid #e1e7ee!important;text-align:right!important;line-height:normal!important}

  .statement-footer{border-top:1px solid #dfe6ee!important;margin-top:18px!important;padding-top:9px!important;color:#8a96a6!important;font-size:9px!important}
}

/* v0.11.10: total outstanding card under the current-year balance */
.finance-summary .finance-all-dues{grid-column:3}
@media(max-width:650px){.finance-summary .finance-all-dues{grid-column:auto}}

.attendance-summary{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:14px 0}.attendance-summary>div{background:#fff;border:1px solid #e7e9ef;border-radius:14px;padding:12px;text-align:center}.attendance-summary b{display:block;font-size:22px}.attendance-summary span{font-size:12px;color:#6b7280}.attendance-loading{padding:24px;text-align:center;color:#6b7280}@media(max-width:700px){.attendance-summary{grid-template-columns:repeat(2,1fr)}}


/* v0.11.17: monthly attendance report */
.attendance-report-head{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin:14px 0}.attendance-report-head>div{background:#fff;border:1px solid #e7e9ef;border-radius:14px;padding:12px;text-align:center}.attendance-report-head b{display:block;font-size:19px}.attendance-report-head span{font-size:12px;color:#6b7280}.attendance-report-table{width:100%;border-collapse:collapse}.attendance-report-table th,.attendance-report-table td{padding:12px;border-bottom:1px solid #edf0f4;text-align:center}.attendance-report-table th:first-child,.attendance-report-table td:first-child{text-align:right}.attendance-report-table thead th,.attendance-report-table tfoot th{background:#f7f9fb}.link-button{border:0;background:none;font:inherit;cursor:pointer;padding:0;color:inherit}.link-button:hover{text-decoration:underline}@media(max-width:700px){.attendance-report-head{grid-template-columns:repeat(2,1fr)}}
@media print{.sidebar,.topbar,.no-print{display:none!important}.admin,.main,.content{display:block!important;width:100%!important;margin:0!important;padding:0!important}.attendance-report-card{box-shadow:none!important;border:1px solid #ddd!important}.attendance-report-table{font-size:12px}.page-title{margin-bottom:8px!important}}


/* v0.11.20: administrative reports */
.noto-report,.noto-report *{font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif}
.report-picker{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:14px;margin-bottom:18px}.report-choice{border:1px solid #e2e7ee;background:#fff;border-radius:16px;padding:16px 18px;text-align:right;cursor:pointer;color:var(--ink)}.report-choice b{display:block;font-size:16px;margin-bottom:4px}.report-choice span{font-size:12px;color:#6f7280}.report-choice.active{border-color:#163d6b;box-shadow:0 0 0 2px rgba(22,61,107,.08)}
.report-filters{align-items:end;gap:10px;flex-wrap:wrap}.report-filters label{font-size:11px;color:#6b7280;font-weight:700;display:grid;gap:5px;min-width:150px}.report-filters select,.report-filters input{min-height:42px}.report-print-title{text-align:center;margin:18px 0 8px}.report-print-title h2{margin:0;color:#123b69}.report-print-title p{margin:5px 0;color:#6b7280;font-size:12px}.report-count{margin:10px 0;font-size:13px}.report-count b{font-size:17px}.report-table-card{padding:0;overflow:auto}.admin-report-table{width:100%;border-collapse:collapse}.admin-report-table th,.admin-report-table td{padding:12px 14px;border-bottom:1px solid #edf0f4;text-align:right}.admin-report-table thead th{background:#f5f8fb;color:#41546c}.admin-report-table tbody tr:nth-child(even){background:#fbfcfe}
@media(max-width:700px){.report-picker{grid-template-columns:1fr}.report-filters label{min-width:100%}}
@media print{.report-picker{display:none!important}.noto-report{font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif!important}.noto-report *{font-family:inherit!important}.report-print-title{margin-top:0!important}.report-table-card{box-shadow:none!important;border:1px solid #dfe5ec!important}.admin-report-table{font-size:12px}.admin-report-table th,.admin-report-table td{padding:8px 10px!important}.report-count{margin:6px 0 10px!important}}

/* v0.11.21 — financial reports and refined print tables */
.report-picker{grid-template-columns:repeat(4,minmax(0,1fr))}
.financial-report-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0 16px}.financial-report-summary>div{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:12px 14px;display:grid;gap:4px}.financial-report-summary span{font-size:11px;color:#64748b;font-weight:700}.financial-report-summary b{font-size:18px;color:#173b67}.financial-report-summary .summary-due{background:#f6f9fc;border-color:#cbd8e6}.money-cell{white-space:nowrap}.due-cell{background:#fafcff}.financial-report-table tfoot th{background:#eef3f8;border-top:2px solid #cbd8e6;color:#173b67;padding:12px 14px}.receipt-total-banner{display:flex;justify-content:space-between;align-items:center;border:1px solid #d8e2ed;background:#f7fafc;border-radius:12px;padding:12px 16px;margin:10px 0 14px}.receipt-total-banner span{font-weight:700;color:#536579}.receipt-total-banner b{font-size:20px;color:#173b67}
@media(max-width:1000px){.report-picker{grid-template-columns:repeat(2,1fr)}.financial-report-summary{grid-template-columns:repeat(2,1fr)}}
@media print{
 @page{size:A4 landscape;margin:10mm}
 .noto-report{font-family:"Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif!important;color:#172033!important}
 .noto-report .report-print-title h2{font-size:18px!important;margin:0 0 4px!important}.noto-report .report-print-title p{font-size:10px!important;margin:0 0 8px!important}
 .noto-report .report-table-card{border:0!important;overflow:visible!important}.noto-report .admin-report-table{width:100%!important;border-collapse:collapse!important;table-layout:auto!important;font-size:10.5px!important}
 .noto-report .admin-report-table th,.noto-report .admin-report-table td{border:1px solid #cfd8e3!important;padding:6px 7px!important;vertical-align:middle!important;line-height:1.45!important}
 .noto-report .admin-report-table thead th{background:#eaf0f6!important;color:#173b67!important;font-weight:800!important;white-space:nowrap!important}.noto-report .admin-report-table tbody tr:nth-child(even){background:#f8fafc!important}.noto-report .admin-report-table tr{break-inside:avoid!important;page-break-inside:avoid!important}.noto-report .admin-report-table thead{display:table-header-group!important}.noto-report .admin-report-table tfoot{display:table-footer-group!important}.noto-report .admin-report-table tfoot th{background:#e3ebf3!important;border-top:2px solid #9fb1c5!important;font-weight:800!important}
 .financial-report-summary{grid-template-columns:repeat(4,1fr)!important;gap:5px!important;margin:5px 0 8px!important}.financial-report-summary>div{border-radius:5px!important;padding:6px 8px!important}.financial-report-summary span{font-size:9px!important}.financial-report-summary b{font-size:12px!important}.receipt-total-banner{padding:7px 10px!important;margin:5px 0 8px!important;border-radius:5px!important}.receipt-total-banner b{font-size:14px!important}
}


/* v0.11.22 — unified full-width A4 report printing */
.report-print-brand{display:none;font-weight:800;color:#173b67}
@media print{
  @page{size:A4 landscape;margin:9mm 10mm}
  html,body{width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important;background:#fff!important}
  body{direction:rtl!important}
  .admin,.main,.content{display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;padding:0!important}
  .sidebar,.topbar,.toolbar,.btn,.mobile-toggle,.report-picker,.no-print{display:none!important}
  .admin-report{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
  .report-print-title{width:100%!important;text-align:center!important;margin:0 0 4mm!important;padding:0 0 3mm!important;border-bottom:1.5px solid #aebdcd!important}
  .report-print-brand{display:block!important;font-size:14pt!important;line-height:1.2!important;margin:0 0 1.5mm!important}
  .report-print-title h2{font-size:16pt!important;line-height:1.25!important;margin:0!important;color:#173b67!important}
  .report-print-title p{font-size:9pt!important;line-height:1.35!important;margin:1.5mm 0 0!important;color:#536579!important}
  .report-count{font-size:9pt!important;margin:0 0 2.5mm!important}
  .report-table-card{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:visible!important;box-shadow:none!important}
  .admin-report-table{width:100%!important;max-width:none!important;border-collapse:collapse!important;border-spacing:0!important;table-layout:fixed!important;font-size:9pt!important;background:#fff!important}
  .admin-report-table thead{display:table-header-group!important}
  .admin-report-table tfoot{display:table-footer-group!important}
  .admin-report-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
  .admin-report-table th,.admin-report-table td{border:1px solid #b9c5d1!important;padding:3mm 2.2mm!important;line-height:1.35!important;vertical-align:middle!important;text-align:center!important;overflow-wrap:break-word!important}
  .admin-report-table th:first-child,.admin-report-table td:first-child{text-align:right!important}
  .admin-report-table thead th{background:#e9eff5!important;color:#173b67!important;font-weight:800!important}
  .admin-report-table tbody tr:nth-child(even){background:#f8fafc!important}
  .admin-report-table tfoot th{background:#e3ebf3!important;color:#173b67!important;font-weight:800!important;border-top:2px solid #8299b0!important}
  .financial-report-table th:nth-child(1),.financial-report-table td:nth-child(1){width:22%!important}
  .financial-report-table th:nth-child(2),.financial-report-table td:nth-child(2){width:9%!important}
  .financial-report-table th:nth-child(3),.financial-report-table td:nth-child(3){width:7%!important}
  .financial-report-table th:nth-child(n+4),.financial-report-table td:nth-child(n+4){width:15.5%!important;white-space:nowrap!important}
  .receipts-table th:nth-child(1),.receipts-table td:nth-child(1){width:14%!important;text-align:center!important}
  .receipts-table th:nth-child(2),.receipts-table td:nth-child(2){width:27%!important;text-align:right!important}
  .receipts-table th:nth-child(3),.receipts-table td:nth-child(3){width:12%!important}
  .receipts-table th:nth-child(4),.receipts-table td:nth-child(4){width:9%!important}
  .receipts-table th:nth-child(5),.receipts-table td:nth-child(5){width:19%!important}
  .receipts-table th:nth-child(6),.receipts-table td:nth-child(6){width:19%!important}
  .financial-report-summary{width:100%!important;grid-template-columns:repeat(4,1fr)!important;gap:2mm!important;margin:0 0 3mm!important}
  .financial-report-summary>div{padding:2.2mm 3mm!important;border-radius:2mm!important;min-height:0!important}
  .financial-report-summary span{font-size:8pt!important}.financial-report-summary b{font-size:11pt!important}
  .receipt-total-banner{width:100%!important;padding:2.5mm 3mm!important;margin:0 0 3mm!important;border-radius:2mm!important}.receipt-total-banner span{font-size:9pt!important}.receipt-total-banner b{font-size:12pt!important}
}

/* v0.11.23 — print-flow fix and unified rules for every printable view */
@media print {
  /* Long report cards must be allowed to continue on the same page after their heading. */
  .report-table-card,
  .attendance-report-card {
    break-inside: auto !important;
    page-break-inside: auto !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }
  .report-table-card > table,
  .attendance-report-card > div,
  .attendance-report-table {
    break-before: auto !important;
    page-break-before: auto !important;
  }

  /* Consistent table printing everywhere: repeat headings and keep individual rows intact. */
  .admin-report-table thead,
  .attendance-report-table thead,
  .statement-table thead { display: table-header-group !important; }
  .admin-report-table tfoot,
  .attendance-report-table tfoot,
  .statement-table tfoot { display: table-footer-group !important; }
  .admin-report-table tr,
  .attendance-report-table tr,
  .statement-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Monthly attendance follows the same clean, full-width print language as reports. */
  .attendance-report-card { width:100% !important; margin:0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; overflow:visible !important; box-shadow:none !important; }
  .attendance-report-table { width:100% !important; border-collapse:collapse !important; table-layout:auto !important; font-size:9pt !important; }
  .attendance-report-table th,.attendance-report-table td { border:1px solid #b9c5d1 !important; padding:2.5mm 2mm !important; line-height:1.3 !important; vertical-align:middle !important; }
  .attendance-report-table thead th,.attendance-report-table tfoot th { background:#e9eff5 !important; color:#173b67 !important; font-weight:800 !important; }
  .attendance-report-head { grid-template-columns:repeat(5,1fr) !important; gap:2mm !important; margin:0 0 3mm !important; }
  .attendance-report-head>div { padding:2mm !important; border-radius:2mm !important; box-shadow:none !important; }
  .attendance-report-head b { font-size:11pt !important; }
  .attendance-report-head span { font-size:8pt !important; }

  /* Preserve print colors consistently. */
  html,body { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
}

/* v0.11.24 — child statement uses its own portrait A4 page; wide reports remain landscape */
@media print {
  .student-statement { page: child-statement; }
}
@page child-statement {
  size: A4 portrait;
  margin: 8mm;
}


/* v0.11.25 — monthly attendance report prints on its own portrait A4 page */
@media print {
  body.attendance-print-portrait { page: attendance-report; }
}
@page attendance-report {
  size: A4 portrait;
  margin: 8mm;
}

/* v0.11.27 dashboard — today's attendance summary */
.attendance-today-title{margin-top:2px}
.dashboard-attendance-today{display:grid;grid-template-columns:1.15fr repeat(3,.72fr) 1.45fr;gap:12px;margin-bottom:28px}
.dash-att-main,.dash-att-stat,.dash-att-status,.dash-att-empty{background:#fff;border:1px solid #e5e9ef;border-radius:16px;min-height:100px;padding:16px 18px;display:flex;flex-direction:column;justify-content:center}
.dash-att-main span,.dash-att-stat span,.dash-att-status span,.dash-att-empty span{color:#7a8494;font-size:12px}
.dash-att-main strong{font-size:29px;color:#173f70;line-height:1.1;margin:4px 0}.dash-att-main small{color:#8a93a2}
.dash-att-stat{align-items:center;text-align:center}.dash-att-stat b{font-size:27px;margin-top:5px;color:#173f70}
.dash-att-stat.present{border-top:3px solid #65c49a}.dash-att-stat.present b{color:#27835b}
.dash-att-stat.absent{border-top:3px solid #ef858a}.dash-att-stat.absent b{color:#bd555b}
.dash-att-stat.late{border-top:3px solid #efc25c}.dash-att-stat.late b{color:#a97819}
.dash-att-status{align-items:flex-start;gap:4px}.dash-att-status.done{background:#f2faf6;border-color:#d8eee2}.dash-att-status.needs{background:#fff9ec;border-color:#f1e1b5}
.dash-att-status b{font-size:14px;color:#17304f}.dash-att-status button,.dash-att-empty button{margin-top:9px;border:0;background:transparent;color:#173f70;font:inherit;font-weight:700;padding:0;cursor:pointer}
.dash-att-loading,.dash-att-empty{grid-column:1/-1;color:#7a8494}.dash-att-empty{gap:4px}
@media(max-width:1100px){.dashboard-attendance-today{grid-template-columns:repeat(4,1fr)}.dash-att-main,.dash-att-status{grid-column:span 2}}
@media(max-width:650px){.dashboard-attendance-today{grid-template-columns:repeat(2,1fr)}.dash-att-main,.dash-att-status{grid-column:1/-1}}

/* v0.11.32 — streamlined general registration + live age */
.modal:has(#gcName){width:min(900px,calc(100vw - 44px))!important;border-radius:18px!important;padding:0!important;overflow:hidden!important}
.modal:has(#gcName)>h2{font-size:22px!important;margin:0!important;padding:19px 28px 15px!important;border-bottom:1px solid #edf0f5!important}
.modal:has(#gcName) .modal-scroll{padding:16px 24px 8px!important;background:#fafbfe!important}
.modal:has(#gcName) .form-grid{display:block!important}
.modal:has(#gcName) .student-form-section{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px 16px!important;margin-bottom:12px!important}
.modal:has(#gcName) .student-name-field{grid-column:span 2}
.modal:has(#gcName) .modal-actions{margin:0!important;padding:12px 24px 15px!important;border-top:1px solid #e8ebf1!important;background:#fff!important;position:sticky!important;bottom:0!important}
.registration-age{display:block;margin-top:4px;padding:6px 9px;border-radius:8px;background:#f0f7ff;color:#24547f;font-size:12px;font-weight:700;line-height:1.4}
@media(max-width:780px){.modal:has(#gcName) .student-form-section{grid-template-columns:1fr 1fr!important}.modal:has(#gcName) .student-name-field{grid-column:1/-1}}
@media(max-width:560px){.modal:has(#gcName) .student-form-section{grid-template-columns:1fr!important}.modal:has(#gcName) .student-name-field{grid-column:auto}}

/* v0.11.33 — dashboard current-year collection chart */
.dashboard-finance-overview{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(330px,.75fr);gap:14px;align-items:stretch;margin-bottom:20px}
.dashboard-finance-overview .finance-summary{margin:0;grid-template-columns:1fr;gap:10px}
.collection-card{background:#fff;border:1px solid #e5e9ef;border-radius:18px;padding:16px 18px;display:flex;align-items:center;gap:18px;min-height:150px}
.collection-ring{--collection:0%;width:112px;height:112px;border-radius:50%;flex:0 0 112px;background:conic-gradient(#25845d 0 var(--collection),#edf1f5 var(--collection) 100%);display:grid;place-items:center;position:relative}
.collection-ring:before{content:"";position:absolute;inset:12px;background:#fff;border-radius:50%}
.collection-ring>div{position:relative;z-index:1;text-align:center;line-height:1.15}.collection-ring strong{display:block;font-size:25px;color:#183f70}.collection-ring span{display:block;margin-top:5px;font-size:11px;color:#778294;font-weight:700}
.collection-copy{min-width:0;flex:1}.collection-copy>b{font-size:15px;color:#183f70}.collection-copy>p{font-size:11px;color:#778294;line-height:1.6;margin:5px 0 10px}.collection-copy>div{display:flex;gap:12px;flex-wrap:wrap}.collection-copy>div span{font-size:11px;color:#778294}.collection-copy>div strong{display:block;color:#334e68;font-size:13px;margin-top:2px}
@media(max-width:850px){.dashboard-finance-overview{grid-template-columns:1fr}.collection-card{min-height:auto}}
@media(max-width:520px){.collection-card{align-items:flex-start;flex-direction:column}.collection-ring{align-self:center}}

/* v0.11.34 — smart administrative alerts */
.smart-alerts-title{margin-top:4px}.dashboard-smart-alerts{display:grid;grid-template-columns:minmax(330px,.72fr) minmax(0,1.5fr);gap:14px;margin-bottom:28px}
.smart-threshold,.smart-alert-list,.smart-alert-loading{background:#fff;border:1px solid #e5e9ef;border-radius:17px;padding:16px 18px}.smart-threshold{display:grid;gap:10px;align-content:center}.smart-threshold>div:first-child b{display:block;color:#173f70;font-size:14px}.smart-threshold>div:first-child span,.smart-threshold.setup span,.smart-threshold.setup small{display:block;color:#7b8595;font-size:11px;margin-top:4px}.smart-threshold-control{display:flex;align-items:center;gap:7px}.smart-threshold-control input{min-width:0;flex:1;height:40px;border:1px solid #d7dde6;border-radius:10px;padding:0 10px;font:inherit;font-weight:700}.smart-threshold-control>span{color:#677386;font-weight:700}.smart-threshold-control button{height:40px;border:0;border-radius:10px;background:#173f70;color:#fff;padding:0 15px;font:inherit;font-weight:700;cursor:pointer}.smart-threshold>small{min-height:14px;color:#27835b;font-size:10px}.smart-threshold.setup{background:#fff9ec;border-color:#f1e1b5}
.smart-alert-list{display:grid;gap:8px;padding:10px}.smart-alert-item{width:100%;border:1px solid #e7eaf0;background:#fff;border-radius:12px;display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;text-align:right;padding:10px 12px;cursor:pointer;font:inherit}.smart-alert-item:hover{background:#fafcff}.smart-alert-item .smart-alert-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:900}.smart-alert-item b{display:block;color:#203c5d;font-size:13px}.smart-alert-item small{display:block;color:#7b8595;font-size:11px;margin-top:3px}.smart-alert-item i{font-style:normal;color:#8b96a5}.smart-alert-item.attendance .smart-alert-icon{background:#fff4d8;color:#9a6b0b}.smart-alert-item.data .smart-alert-icon{background:#eef4ff;color:#315f9c}.smart-alert-item.finance .smart-alert-icon{background:#fff0f0;color:#b84c53}.smart-all-clear{height:100%;min-height:94px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.smart-all-clear b{color:#27835b}.smart-all-clear span{color:#7b8595;font-size:11px;margin-top:4px}.smart-list-note{grid-column:1/-1;background:#f5f8fc;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;margin-bottom:10px;color:#526174}.smart-modal-table{grid-column:1/-1;max-height:55vh;overflow:auto}.smart-modal-table table{width:100%}
@media(max-width:850px){.dashboard-smart-alerts{grid-template-columns:1fr}}
.wa-btn,.wa-mini{border:0;border-radius:10px;background:#eef8f1;color:#176b3a;font-weight:700;cursor:pointer}.wa-btn{padding:9px 14px}.wa-mini{padding:5px 9px;margin-inline-start:8px;font-size:12px}.parent-comms-table{width:100%;border-collapse:collapse}.parent-comms-table th,.parent-comms-table td{padding:12px 14px;border-bottom:1px solid #eee;text-align:right}.parent-message-box{margin-bottom:16px}.parent-message-box label{display:block;font-weight:700}.parent-message-box textarea{width:100%;margin-top:8px;resize:vertical;min-height:76px}.parent-message-box small{display:block;margin-top:7px;color:#777}.parent-comms-toolbar{gap:10px;flex-wrap:wrap}.parent-comms-toolbar input{min-width:240px}
.form-wide{grid-column:1/-1}.payment-auto-allocation{padding:12px 14px;border:1px solid #b9e5cf;background:#f0fbf5;border-radius:10px}.allocation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}.allocation-grid label{border:1px solid #e2e7ee;border-radius:10px;padding:10px}.allocation-grid small{display:block;color:#777;margin:3px 0}.payment-success{text-align:center}.success-mark{width:58px;height:58px;border-radius:50%;margin:0 auto 12px;display:grid;place-items:center;background:#eaf9f0;color:#087443;font-size:32px;font-weight:800}.allocation-summary{max-width:420px;margin:16px auto}.allocation-summary>div{display:flex;justify-content:space-between;border-bottom:1px solid #eee;padding:8px}

.charges-total-row{display:flex;justify-content:space-between;align-items:center;border-top:2px solid #cbd5e1;margin-top:12px;padding-top:10px;font-weight:700;color:#0b2347}.charges-total-row b{font-size:17px}
/* v0.11.52 — approved child financial account layout */
.finance-ledger-grid{align-items:start;margin-top:18px}
.finance-payments-card{overflow:auto}
.finance-dues-column{display:flex;flex-direction:column;gap:14px}
.finance-inline-discounts{border-top:1px dashed #d8dee9;margin-top:14px;padding-top:12px}
.charges-total-card{margin-top:16px;border:1px solid #b9dff3;background:#f3fbff;border-radius:14px;padding:16px 18px;display:flex;justify-content:space-between;align-items:center;color:#0b2347}
.charges-total-card span{font-weight:700}.charges-total-card b{font-size:22px}
.finance-result-card{width:100%;box-sizing:border-box;border-radius:14px;padding:16px 18px;display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #e2e8f0}
.finance-result-card span{font-weight:700}.finance-result-card b{font-size:22px}
.finance-result-card.previous{border-color:#f6d47a;background:#fffaf0}.finance-result-card.net{border-color:#f5a3a3;background:#fff6f6}
.finance-bottom-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;width:100%;margin-top:20px}
.finance-bottom-actions .btn{width:100%;justify-content:center;min-height:48px}
@media(max-width:900px){.finance-bottom-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.finance-bottom-actions{grid-template-columns:1fr}}

/* v0.11.55 — payment total uses the exact rows shown for the selected Aug-Jul year */
.payments-total-card{margin-top:16px;padding:16px 18px;border:1px solid #b9e4cf;border-radius:14px;background:#f3fbf7;display:flex;align-items:center;justify-content:space-between;gap:16px}
.payments-total-card span{font-weight:700;color:#17365d}
.payments-total-card b{font-size:24px;color:#06244b;white-space:nowrap}
/* v0.11.56: current-year remaining card */
.finance-result-card.current-remaining{border-color:#ffb4b4;background:#fff8f8}

/* v0.11.62 — Comprehensive child statement rebuilt from the approved finance engine */
.statement-v2 .statement-image-header{border:0;margin:0 0 10px;padding:0;text-align:center}
.statement-v2 .statement-image-header img{display:block;width:100%;max-height:120px;object-fit:contain;margin:0 auto}
.statement-v2 .statement-title-row{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;border-bottom:2px solid #163d6b;padding:8px 2px 12px;margin-bottom:14px}
.statement-v2 .statement-title-row h1{margin:0;color:#123b69;font-size:20px;font-weight:800;text-align:right}
.statement-v2 .statement-title-row>div{margin-right:auto;text-align:left;color:#68778b;font-size:12px;white-space:nowrap}
.statement-v2 .statement-title-row b{display:block;color:#173c66;font-size:14px;margin-top:2px}
.statement-v2 .statement-child-strip{display:flex;align-items:center;justify-content:space-between;min-height:74px;background:#f7f9fc;border:1px solid #e2e8ef;border-radius:12px;padding:10px 14px;margin-bottom:14px}
.statement-v2 .statement-child-strip h2{margin:0;color:#102f55;font-size:24px}
.statement-v2 .statement-child-strip .student-photo{order:2;width:58px!important;height:58px!important;min-width:58px!important;border-radius:12px!important;margin:0!important}
.statement-v2 .statement-fields-3{grid-template-columns:repeat(3,1fr)!important}
.statement-v2 .statement-whatsapp{display:inline-block;color:#146c43;font-weight:700;text-decoration:none;border-bottom:1px dotted currentColor}
.statement-v2 .statement-finance-summary-v2{grid-template-columns:repeat(3,1fr)!important;gap:12px!important}
.statement-v2 .statement-finance-summary-v2>div{min-height:105px!important;padding:16px 12px!important;display:flex;flex-direction:column;justify-content:center;align-items:center}
.statement-v2 .statement-finance-summary-v2 span{font-size:12px!important;font-weight:700!important;color:#5f6f84!important;margin-bottom:12px!important}
.statement-v2 .statement-finance-summary-v2 b{font-size:24px!important;font-weight:800!important;margin:0!important;color:#173c66!important}
.statement-v2 .statement-finance-summary-v2 .previous{background:#fffaf0!important}
.statement-v2 .statement-finance-summary-v2 .balance{background:#fff3f1!important}
@media(max-width:760px){.statement-v2 .statement-title-row{align-items:flex-start}.statement-v2 .statement-title-row h1{font-size:17px}.statement-v2 .statement-fields-3{grid-template-columns:repeat(3,1fr)!important}.statement-v2 .statement-finance-summary-v2{grid-template-columns:repeat(3,1fr)!important}}
@media print{
 .statement-v2 .statement-image-header img{max-height:28mm!important;width:100%!important;object-fit:contain!important}
 .statement-v2 .statement-title-row{padding:1.5mm 0 2mm!important;margin-bottom:2.5mm!important}
 .statement-v2 .statement-title-row h1{font-size:11pt!important}
 .statement-v2 .statement-title-row>div{font-size:7pt!important}.statement-v2 .statement-title-row b{font-size:8pt!important}
 .statement-v2 .statement-child-strip{min-height:14mm!important;padding:2mm 3mm!important;margin-bottom:2.5mm!important;border-radius:2mm!important}
 .statement-v2 .statement-child-strip h2{font-size:14pt!important}.statement-v2 .statement-child-strip .student-photo{width:13mm!important;height:13mm!important;min-width:13mm!important}
 .statement-v2 .statement-fields-3{grid-template-columns:repeat(3,1fr)!important}
 .statement-v2 .statement-whatsapp{color:#172b45!important;border:0!important}
 .statement-v2 .statement-finance-summary-v2{grid-template-columns:repeat(3,1fr)!important;gap:2mm!important}
 .statement-v2 .statement-finance-summary-v2>div{min-height:20mm!important;padding:3mm 2mm!important}
 .statement-v2 .statement-finance-summary-v2 span{font-size:7pt!important;margin-bottom:2mm!important}.statement-v2 .statement-finance-summary-v2 b{font-size:13pt!important}
}

/* v0.11.63 — full-width statement header + larger child photo area */
.statement-v2 .statement-image-header{
  width:100%;
  margin:0 0 12px;
  padding:0;
  overflow:hidden;
}
.statement-v2 .statement-image-header img{
  display:block;
  width:100%!important;
  max-width:none!important;
  height:auto!important;
  max-height:none!important;
  object-fit:contain!important;
  margin:0!important;
}
.statement-v2 .statement-child-strip{
  min-height:112px;
  padding:12px 16px;
}
.statement-v2 .statement-child-strip .student-photo{
  width:92px!important;
  height:92px!important;
  min-width:92px!important;
  border-radius:16px!important;
  object-fit:cover!important;
}
@media print{
  .statement-v2 .statement-image-header{
    width:100%!important;
    margin:0 0 3mm!important;
    padding:0!important;
  }
  .statement-v2 .statement-image-header img{
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    object-fit:contain!important;
    margin:0!important;
  }
  .statement-v2 .statement-child-strip{
    min-height:24mm!important;
    padding:2.5mm 3mm!important;
  }
  .statement-v2 .statement-child-strip .student-photo{
    width:21mm!important;
    height:21mm!important;
    min-width:21mm!important;
    border-radius:3mm!important;
    object-fit:cover!important;
  }
}


/* v0.11.67 — unified official report header + A4 portrait for all reports */
.print-only{display:none}
.official-report-header{display:block;width:100%;height:auto;object-fit:contain}
@media print{
  @page{size:A4 portrait;margin:8mm!important}
  .admin-report, body.attendance-print-portrait{page:auto!important}
  .report-print-title{display:block!important;width:100%!important;text-align:center!important;margin:0 0 4mm!important;padding:0 0 3mm!important;border-bottom:1.5px solid #aebdcd!important}
  .report-print-title .official-report-header{display:block!important;width:100%!important;max-width:none!important;height:auto!important;max-height:34mm!important;object-fit:contain!important;margin:0 auto 3mm!important}
  .report-print-brand{display:none!important}
  .attendance-official-print-header{display:block!important;width:100%!important;text-align:center!important;margin:0 0 4mm!important;padding:0 0 3mm!important;border-bottom:1.5px solid #aebdcd!important}
  .attendance-official-print-header .official-report-header{display:block!important;width:100%!important;height:auto!important;max-height:34mm!important;object-fit:contain!important;margin:0 auto 3mm!important}
  .attendance-official-print-header h2{font-size:16pt!important;line-height:1.25!important;margin:0!important;color:#173b67!important}
  /* Portrait-safe report tables */
  .admin-report-table{font-size:8pt!important;table-layout:auto!important}
  .admin-report-table th,.admin-report-table td{padding:2.2mm 1.4mm!important}
  .financial-report-table th:nth-child(n),.financial-report-table td:nth-child(n),
  .receipts-table th:nth-child(n),.receipts-table td:nth-child(n){width:auto!important;white-space:normal!important}
}

/* v0.11.68 — official report header is print-only */
@media screen{
  .report-print-title .official-report-header{display:none!important}
}
@media print{
  .report-print-title .official-report-header{display:block!important}
}


/* v0.11.69 — one print rule for all reports and statements */
@media screen{
  .student-statement .statement-image-header.print-only,
  .attendance-official-print-header.print-only{display:none!important}
}
@media print{
  @page{size:A4 portrait;margin:8mm!important}
  .print-only{display:block!important}
  .student-statement .statement-image-header.print-only{display:block!important;width:100%!important}
  .student-statement .statement-image-header.print-only img{display:block!important;width:100%!important;height:auto!important;object-fit:contain!important}
  body.attendance-print-portrait .page-title{display:none!important}
  body.attendance-print-portrait .attendance-official-print-header{display:block!important}
}


/* v0.11.70 — repair print-only CSS parsing and enforce screen/print separation */
@media screen {
  .print-only,
  .report-print-title .official-report-header,
  .attendance-official-print-header,
  .student-statement .statement-image-header.print-only {
    display: none !important;
  }
}
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  .print-only { display: block !important; }
  .report-print-title .official-report-header,
  .attendance-official-print-header,
  .student-statement .statement-image-header.print-only {
    display: block !important;
  }
}

/* v0.11.71 — registration eligibility */
.eligibility-intro{grid-column:1/-1;background:#f5f9ff;border:1px solid #d9e7f7;border-radius:12px;padding:12px 14px;color:#49627d;line-height:1.8}
.eligibility-box{margin-top:10px}.eligibility-empty{padding:14px;color:#78889a;background:#f8fafc;border-radius:12px}
.eligibility-result{border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:8px}.eligibility-result.yes{background:#effaf4;border:1px solid #bfe7cf}.eligibility-result.no{background:#fff5f4;border:1px solid #f0cbc7}.eligibility-result b{font-size:17px}.eligibility-result span{color:#607184}.eligibility-note{margin-top:5px;padding:11px 12px;background:#fff;border-radius:10px;line-height:1.75;color:#526477}.eligibility-result .btn{align-self:flex-start;margin-top:4px}
.eligibility-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}.eligibility-stage-card{border:1px solid #dce5ef;border-radius:14px;padding:16px;background:#fbfdff;display:flex;flex-direction:column;gap:7px}.eligibility-stage-card small{color:#718196}.eligibility-stage-card b{font-size:16px}.eligibility-test{border-top:1px solid #e5ebf2;padding-top:16px}.eligibility-test h3{margin-top:0}
@media(max-width:700px){.eligibility-admin-grid{grid-template-columns:1fr}}

/* v0.11.72 — Public registration entry */
.public-registration-section{padding-top:24px;padding-bottom:52px}
.public-registration-card{display:flex;align-items:center;gap:28px;justify-content:space-between;padding:28px 32px}
.public-registration-card h2{margin:12px 0 8px}
.public-registration-card p{margin:6px 0}
.public-registration-btn{min-width:210px;min-height:48px;font-weight:800}
@media(max-width:760px){.public-registration-card{flex-direction:column;align-items:stretch}.public-registration-btn{width:100%}}

/* v0.11.73 — Public registration application */
.modal:has(#rrChildName){width:min(900px,calc(100vw - 36px))!important;padding:0!important;overflow:hidden!important}
.modal:has(#rrChildName)>h2{margin:0;padding:22px 28px 17px;border-bottom:1px solid #edf0f5;font-size:24px}
.modal:has(#rrChildName) .modal-scroll{padding:20px 26px 8px;background:#fbfcff}
.modal:has(#rrChildName) .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
.modal:has(#rrChildName) .modal-actions{margin:0;padding:15px 26px 18px;border-top:1px solid #e8ebf1;background:#fff;position:sticky;bottom:0}
.modal:has(#rrChildName) .modal-actions .btn{min-height:46px;padding-inline:24px}
.form-wide{grid-column:1/-1}
.registration-welcome{display:flex;align-items:center;gap:16px;padding:18px 20px;border:1px solid #dcecf8;border-radius:16px;background:#f4faff}
.registration-welcome h3{margin:0 0 5px;color:#082a56}.registration-welcome p{margin:0;color:#64748b;line-height:1.7}.registration-rainbow{font-size:36px}
.registration-qualified{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:12px;border-radius:14px;background:#eefaf5;border:1px solid #cceedd}
.registration-qualified>div{padding:9px 12px;background:#fff;border-radius:10px}.registration-qualified small{display:block;color:#718096;margin-bottom:4px}.registration-qualified b{color:#07315e}
.registration-section-title{font-size:17px;font-weight:900;color:#082a56;margin-top:5px;padding:9px 2px 7px;border-bottom:2px solid #e6edf5}
.registration-name,.registration-address{grid-column:1/-1}.modal textarea{padding:12px;border:1px solid #d9d9df;border-radius:10px;background:#fff;font:inherit;resize:vertical}
.registration-disclaimer{padding:13px 15px;border-radius:12px;background:#fff8e8;border:1px solid #f5d989;color:#684d00;line-height:1.7}
.eligibility-continue{margin-top:14px;min-height:46px;font-weight:800}
.registration-success{text-align:center;padding:10px 4px}.registration-success h3{font-size:23px;color:#07315e;margin:8px 0}.registration-success p{line-height:1.8}.registration-reference{margin:18px auto 12px;padding:14px 22px;border-radius:14px;background:#f2f7ff;border:1px solid #cfe0f5;max-width:420px}.registration-reference small{display:block;color:#718096;margin-bottom:5px}.registration-reference b{font-size:20px;direction:ltr;display:block}.registration-success-meta{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.registration-success-meta span{padding:8px 12px;border-radius:999px;background:#f7f7fa}
.registration-requests-card{margin-top:16px}.registration-requests-card h3{margin:0}.table-wrap{overflow:auto}
@media(max-width:680px){.modal:has(#rrChildName) .form-grid{grid-template-columns:1fr}.registration-name,.registration-address,.form-wide{grid-column:1}.registration-qualified{grid-template-columns:1fr}.registration-welcome{align-items:flex-start}.modal:has(#rrChildName) .modal-scroll{padding:16px}.modal:has(#rrChildName)>h2{padding:20px 18px 15px}}

/* v0.11.83 registration request review */
.request-review-head,.request-review-grid{display:grid;gap:12px}.request-review-head{grid-template-columns:1fr 1fr;background:#f5f8fc;border:1px solid #dfe7f1;border-radius:14px;padding:14px}.request-review-head div,.request-review-grid div{display:flex;flex-direction:column;gap:5px}.request-review-grid{grid-template-columns:repeat(2,minmax(0,1fr));border:1px solid #e5e9ef;border-radius:14px;padding:14px}.request-review-grid small,.request-review-head small,.request-notes small{color:#718096}.request-notes,.approval-summary,.reject-note{border:1px solid #e5e9ef;border-radius:14px;padding:14px}.request-review-actions,.request-converted{display:flex;gap:10px;align-items:center;justify-content:flex-end;padding-top:6px}.request-converted{justify-content:space-between;background:#edf9f2}.approval-summary{display:flex;flex-direction:column;gap:6px;background:#f5f8fc}.approval-summary b{font-size:20px}.approval-summary small{color:#667085}.reject-note{background:#fff8f2}.modal textarea{width:100%;resize:vertical}@media(max-width:700px){.request-review-grid{grid-template-columns:1fr}.request-review-actions,.request-converted{flex-direction:column;align-items:stretch}}
/* v0.11.87 — registration review refresh */
.request-review-shell{display:flex;flex-direction:column;gap:14px}.request-review-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border-radius:18px;background:linear-gradient(135deg,#f7fbff,#f7fafc);border:1px solid #dce7f3}.request-review-hero h3{font-size:26px;margin:4px 0;color:#062957}.request-review-hero p{margin:0;color:#667085}.request-kicker{font-size:12px;color:#718096}.request-status-badge{padding:9px 14px;border-radius:999px;background:#e9f8ef;color:#147a4b;font-weight:800;white-space:nowrap}.request-status-badge.preliminary{background:#fff4cc;color:#8a6200}.request-section{border:1px solid #e4eaf1;border-radius:16px;padding:16px;background:#fff}.request-section h4{margin:0 0 12px;color:#0a3566;font-size:16px}.request-section .request-review-grid{border:0;padding:0}.request-section .request-notes{border:0;padding:0}.preapprove-btn{background:#b78300;border-color:#b78300}.preapproval-panel{border:1px solid #f0d37a;background:#fffaf0;border-radius:18px;padding:18px;display:grid;gap:14px}.preapproval-panel p{margin:6px 0 0;color:#6b7280}.preapproval-whatsapp{display:flex;gap:10px;flex-wrap:wrap}.preapproval-dialog{text-align:center}.preapproval-dialog .preapproval-icon{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;margin:0 auto 10px;background:#e9f8ef;color:#14804a;font-size:34px;font-weight:900}.preapproval-dialog h3{font-size:24px;margin:4px}.preapproval-dialog p{color:#667085}.preapproval-dialog label{text-align:right}.wa-btn{border:1px solid #b9dfc9;background:#edf9f2;color:#116b42;border-radius:10px;padding:9px 14px;font-weight:700;cursor:pointer}@media(max-width:700px){.request-review-hero{align-items:flex-start;flex-direction:column}.preapproval-whatsapp{flex-direction:column}.preapproval-whatsapp .wa-btn{width:100%}}
/* v0.11.89 — Educational activities phase 1 */
.learning-today-section{background:linear-gradient(180deg,#fff,#f8fbff)}.learning-section-head{display:flex;gap:20px;align-items:end;justify-content:space-between;margin-bottom:22px}.learning-section-head h2{margin:10px 0 6px}.learning-section-head p{margin:0;color:#667085;max-width:720px}.public-activities-grid,.activities-admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.learning-card,.activity-admin-card{background:#fff;border:1px solid #e4eaf1;border-radius:18px;overflow:hidden;box-shadow:0 8px 24px rgba(10,42,86,.05)}.learning-card>img,.activity-admin-card>img{width:100%;height:220px;object-fit:cover;display:block}.learning-card-body,.activity-admin-card>div{padding:18px}.learning-meta{display:flex;gap:8px;flex-wrap:wrap;color:#718096;font-size:12px}.learning-meta span{background:#f3f6fa;border-radius:999px;padding:5px 9px}.learning-card h3,.activity-admin-card h3{color:#082a56;margin:10px 0}.learning-block p,.home-followup p,.activity-admin-card p{line-height:1.8;color:#475467}.home-followup{margin-top:14px;padding:14px;border-radius:14px;background:#fff8e8;border:1px solid #f3df9d}.home-followup b{color:#725500}.public-activity-filters{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:end}.activity-publish{display:flex!important;flex-direction:row!important;align-items:center;gap:9px}.activity-publish input{width:auto!important}.activities-admin-grid{margin-top:18px}@media(max-width:760px){.public-activities-grid,.activities-admin-grid{grid-template-columns:1fr}.learning-section-head{align-items:stretch;flex-direction:column}.public-activity-filters{grid-template-columns:1fr}.learning-card>img,.activity-admin-card>img{height:190px}}

/* v0.11.90 — activity image containment + unified portrait A4 activity print */
.learning-card>.activity-image-frame,.activity-admin-card>.activity-image-frame{width:100%;height:220px;background:#f7f9fc;display:flex;align-items:center;justify-content:center;overflow:hidden;border-bottom:1px solid #edf1f5}
.learning-card>.activity-image-frame img,.activity-admin-card>.activity-image-frame img{width:100%;height:100%;object-fit:contain;display:block}
.activity-card-actions{display:flex;justify-content:flex-end;margin-top:14px}
.activity-print-sheet{display:none}
@media(max-width:760px){.learning-card>.activity-image-frame,.activity-admin-card>.activity-image-frame{height:190px}}
@media print{
 @page{size:A4 portrait;margin:12mm}
 body.activity-print-mode>*:not(#educationalActivityPrintSheet){display:none!important}
 body.activity-print-mode #educationalActivityPrintSheet{display:block!important;direction:rtl;width:100%;font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:#1f2937;background:#fff}
 .activity-print-header{width:100%;margin:0 0 5mm;padding:0 0 3mm;border-bottom:1.5px solid #aebdcd}
 .activity-print-header img{display:block;width:100%;height:auto;max-height:34mm;object-fit:contain;margin:auto}
 .activity-print-title{text-align:center;margin:0 0 5mm}
 .activity-print-title h1{font-size:18pt;color:#173b67;margin:0 0 2mm}
 .activity-print-title .learning-meta{justify-content:center;font-size:10pt}
 .activity-print-image{width:100%;height:78mm;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fafafa;border:1px solid #e1e6ec;border-radius:3mm;margin:0 0 5mm;break-inside:avoid}
 .activity-print-image img{display:block;width:100%;height:100%;object-fit:contain}
 .activity-print-block{border:1px solid #dfe5ec;border-radius:3mm;padding:4mm 5mm;margin:0 0 4mm;break-inside:avoid}
 .activity-print-block h2{font-size:13pt;color:#173b67;margin:0 0 2mm}
 .activity-print-block p{font-size:11pt;line-height:1.8;margin:0;white-space:pre-wrap}
 .activity-print-block.home{background:#fffaf0!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
}

/* v0.11.91 — print activity as a teaching sheet: image-first A4 */
@media print{
  @page{size:A4 portrait;margin:8mm!important}
  body.activity-print-mode #educationalActivityPrintSheet{
    width:100%!important;
    min-height:0!important;
  }
  .activity-print-header{
    margin:0 0 2.5mm!important;
    padding:0 0 1.5mm!important;
    border-bottom:1px solid #c5ced8!important;
  }
  .activity-print-header img{
    width:100%!important;
    height:auto!important;
    max-height:30mm!important;
    object-fit:contain!important;
  }
  .activity-print-title{
    margin:0 0 2.5mm!important;
    text-align:center!important;
  }
  .activity-print-title h1{
    font-size:15pt!important;
    line-height:1.2!important;
    margin:0 0 1mm!important;
  }
  .activity-print-title .learning-meta{
    justify-content:center!important;
    font-size:9pt!important;
  }
  .activity-print-title .learning-meta span{
    padding:2px 7px!important;
  }
  .activity-print-image{
    width:100%!important;
    height:222mm!important;
    max-height:222mm!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:hidden!important;
    background:#fff!important;
    border:0!important;
    border-radius:0!important;
    break-inside:avoid!important;
  }
  .activity-print-image img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
  }
  .activity-print-block,
  .activity-print-block.home{
    display:none!important;
  }
  .activity-print-no-image{
    min-height:180mm;
    display:flex!important;
    align-items:center;
    justify-content:center;
    color:#667085;
    font-size:14pt;
    border:1px dashed #cbd5e1;
  }
}
\n\n/* v0.11.93 — compact public educational activity cards */\n.public-activities-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}\n.public-activities-grid .compact-learning-card{aspect-ratio:1/1;display:grid;grid-template-rows:minmax(0,58%) minmax(0,42%);min-height:0;border-radius:16px}\n.public-activities-grid .compact-learning-card>.activity-image-frame{height:100%;min-height:0;border-bottom:1px solid #edf1f5}\n.public-activities-grid .compact-learning-card>.activity-image-frame img{width:100%;height:100%;object-fit:contain}\n.public-activities-grid .compact-learning-card>.activity-no-image{font-weight:800;color:#8a98aa;background:#f7f9fc}\n.public-activities-grid .compact-learning-card .learning-card-body{padding:12px 14px;display:flex;flex-direction:column;min-height:0}\n.public-activities-grid .compact-learning-card .learning-meta{gap:5px;font-size:10px;flex-wrap:nowrap;overflow:hidden}\n.public-activities-grid .compact-learning-card .learning-meta span{padding:3px 7px;white-space:nowrap}\n.public-activities-grid .compact-learning-card h3{font-size:17px;line-height:1.35;margin:8px 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}\n.public-activities-grid .compact-learning-card .activity-card-actions{margin-top:auto;justify-content:stretch}\n.public-activities-grid .compact-learning-card .activity-primary-action{width:100%;padding:8px 10px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n@media(min-width:1600px){.public-activities-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}\n@media(max-width:1050px){.public-activities-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}\n@media(max-width:620px){.public-activities-grid{grid-template-columns:1fr}.public-activities-grid .compact-learning-card{aspect-ratio:auto;min-height:360px}}\n\n\n/* v0.11.94 — small fixed-width public cards with full educational content */
.public-activities-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  align-items:start;
}
.public-activities-grid .compact-learning-card{
  aspect-ratio:auto;
  min-height:0;
  height:auto;
  display:flex;
  flex-direction:column;
  border-radius:16px;
}
.public-activities-grid .compact-learning-card>.activity-image-frame{
  height:170px;
  min-height:170px;
  border-bottom:1px solid #edf1f5;
}
.public-activities-grid .compact-learning-card>.activity-image-frame img{width:100%;height:100%;object-fit:contain;display:block}
.public-activities-grid .compact-learning-card .learning-card-body{padding:11px 12px 12px;display:flex;flex-direction:column;min-height:0}
.public-activities-grid .compact-learning-card .learning-meta{gap:5px;font-size:10px}
.public-activities-grid .compact-learning-card .learning-meta span{padding:3px 7px}
.public-activities-grid .compact-learning-card h3{font-size:16px;line-height:1.35;margin:7px 0 7px}
.public-activities-grid .compact-learning-card .learning-block b,
.public-activities-grid .compact-learning-card .home-followup b{font-size:12px}
.public-activities-grid .compact-learning-card .learning-block p,
.public-activities-grid .compact-learning-card .home-followup p{
  font-size:12px;
  line-height:1.55;
  margin:5px 0 0;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.public-activities-grid .compact-learning-card .home-followup{margin-top:8px;padding:9px 10px;border-radius:11px}
.public-activities-grid .compact-learning-card .activity-card-actions{margin-top:9px;justify-content:flex-start}
.public-activities-grid .compact-learning-card .activity-primary-action{width:auto;padding:7px 9px;font-size:11px}
@media(min-width:1700px){.public-activities-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1050px){.public-activities-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.public-activities-grid{grid-template-columns:1fr}.public-activities-grid .compact-learning-card>.activity-image-frame{height:210px;min-height:210px}}
