/* Admin and parent area design. The sidebar uses the school's main colour from Settings. */
.admin-body { background: var(--primary); font-family: var(--font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif); }
.ad-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.ad-side { color: #fff; padding: 22px 0 18px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.ad-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.08rem; padding: 0 18px 22px 6px; line-height: 1.2; }
.ad-brand img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: 50%; padding: 4px; flex: none; }
.ad-mark { width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--primary); display: grid; place-items: center; font-weight: 800; flex: none; }
.ad-nav { flex: 1; }
.ad-nav a { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 18px; margin: 3px 0; color: rgba(255,255,255,.82); text-decoration: none; font-size: .93rem; font-weight: 500; border-radius: 30px 0 0 30px; transition: background .15s, color .15s; }
.ad-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.ad-nav a.active { background: #f4f5fb; color: var(--primary); font-weight: 600; }
.ad-nav a.active::before, .ad-nav a.active::after { content: ""; position: absolute; right: 0; width: 24px; height: 24px; background: transparent; pointer-events: none; }
.ad-nav a.active::before { top: -24px; border-bottom-right-radius: 24px; box-shadow: 8px 8px 0 8px #f4f5fb; }
.ad-nav a.active::after { bottom: -24px; border-top-right-radius: 24px; box-shadow: 8px -8px 0 8px #f4f5fb; }
.ad-nav a.soon { opacity: .45; pointer-events: none; }
.ad-pill { margin-left: auto; margin-right: 10px; background: var(--accent); color: #111; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.ad-sec { text-transform: uppercase; font-size: .68rem; letter-spacing: .1em; color: rgba(255,255,255,.5); margin: 18px 18px 4px; }
.ad-foot { font-size: .72rem; color: rgba(255,255,255,.55); padding: 16px 18px 0 6px; }
.ad-foot a { color: #fff; text-decoration: underline; }

/* Main area */
.ad-main { background: #f4f5fb; border-radius: 36px 0 0 36px; min-width: 0; display: flex; flex-direction: column; }
.ad-top { display: flex; align-items: center; gap: 18px; padding: 22px 32px 6px; flex-wrap: wrap; }
.ad-burger { display: none; background: none; border: 0; color: #1f2937; cursor: pointer; padding: 4px; }
.ad-title { font-size: 1.45rem; font-weight: 700; margin: 0; color: #111827; }
.ad-search { flex: 1 1 260px; max-width: 420px; margin-left: auto; position: relative; }
.ad-search input { width: 100%; border: 0; background: #e9ebf3; border-radius: 999px; padding: 11px 46px 11px 20px; font: inherit; font-size: .9rem; }
.ad-search input:focus { outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent); background: #fff; }
.ad-search button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #6b7280; cursor: pointer; padding: 6px; display: grid; }
.ad-user { display: flex; align-items: center; gap: 14px; }
.ad-bell { position: relative; width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: #374151; box-shadow: 0 2px 8px rgba(17,24,39,.06); }
.ad-bell b { position: absolute; top: -4px; right: -4px; background: var(--primary); color: #fff; font-size: .68rem; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; border: 2px solid #f4f5fb; }
.ad-me { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.ad-avatar { width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.ad-avatar.sm { width: 36px; height: 36px; font-size: .8rem; }
.ad-me-txt { display: flex; flex-direction: column; line-height: 1.2; }
.ad-me-txt strong { font-size: .88rem; color: #111827; } .ad-me-txt small { font-size: .74rem; color: #9ca3af; }
.ad-icon-btn { background: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #6b7280; cursor: pointer; box-shadow: 0 2px 8px rgba(17,24,39,.06); }
.ad-icon-btn:hover { color: #dc2626; }
.ad-content { padding: 18px 32px 40px; }
.ad-content > .page-header > h1 { display: none; }
.ad-content > .page-header:has(> h1:only-child) { display: none; }

/* Existing admin pages pick up the softer look */
.admin-body .card { border: 0; border-radius: 18px; box-shadow: 0 4px 18px rgba(17,24,39,.05); }
.admin-body th { background: #f8f9fc; }
.admin-body .btn { border-radius: 10px; }

/* Panels */
.panel { background: #fff; border-radius: 18px; box-shadow: 0 4px 18px rgba(17,24,39,.05); padding: 22px; }
.panel h2 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.panel-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin-right: auto; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h2 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.btn-ghost { display: inline-flex; align-items: center; gap: 6px; border: 1px solid color-mix(in srgb, var(--primary) 30%, #fff); color: var(--primary); border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 600; text-decoration: none; }
.btn-ghost:hover { background: color-mix(in srgb, var(--primary) 7%, #fff); }

/* Stat tiles */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-bottom: 24px; }
.stat-tile { background: var(--tile); color: #fff; border-radius: 18px; padding: 22px; display: flex; align-items: center; gap: 16px; text-decoration: none; min-height: 112px; box-shadow: 0 10px 22px color-mix(in srgb, var(--tile) 28%, transparent); transition: transform .15s; }
.stat-tile:hover { transform: translateY(-2px); }
.stat-ico { width: 56px; height: 56px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.55); display: grid; place-items: center; flex: none; }
.stat-txt { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.stat-txt span { font-size: .9rem; opacity: .92; }
.stat-txt strong { font-size: 2.1rem; font-weight: 700; line-height: 1.15; }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; margin-top: 26px; align-items: start; }
.dash-grid.dash-single, .dash-bottom.dash-single { grid-template-columns: minmax(0, 1fr); }

/* Overview */
.overview { padding: 26px 22px; }
.ov-head { text-align: center; padding-bottom: 6px; }
.ov-head h2 { margin-top: 14px; font-size: 1.1rem; }
.ov-ring { --pct: 0; width: 112px; height: 112px; margin: 0 auto; border-radius: 50%; padding: 7px; background: conic-gradient(var(--primary) calc(var(--pct) * 1%), #ece9fb 0); display: grid; place-items: center; }
.ov-ring img, .ov-ring span { width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 5px solid #fff; object-fit: contain; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; color: var(--primary); }
.ov-donuts { display: flex; justify-content: space-between; gap: 6px; padding: 18px 0; border-bottom: 1px solid #f0f1f5; }
.donut { text-align: center; flex: 1; }
.donut svg { display: block; margin: 0 auto; }
.donut-val { font-size: 17px; font-weight: 700; fill: #111827; }
.donut-lbl { font-size: .75rem; color: #6b7280; margin-top: 4px; }
.ov-activity h3 { font-size: .95rem; font-weight: 600; margin: 18px 0 10px; }
.act { display: flex; gap: 12px; align-items: flex-start; padding: 9px 4px; border-radius: 10px; text-decoration: none; color: inherit; }
.act:hover { background: #f8f9fc; }
.act-ico { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--c); display: grid; place-items: center; flex: none; }
.act-body { display: flex; flex-direction: column; font-size: .84rem; line-height: 1.35; }
.act-body small { color: #9ca3af; font-size: .74rem; margin-top: 2px; }

/* Chart */
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: #4b5563; }
.legend i, .split-lbl i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.legend b { color: #111827; margin-left: 2px; }
.period select { width: auto; border-radius: 999px; padding: 7px 34px 7px 14px; font-size: .84rem; border-color: #e5e7eb; }
.chart-wrap { height: 290px; }
.chart-line { width: 100%; height: 100%; display: block; overflow: visible; }
.chart-line .grid { stroke: #eef0f4; stroke-width: 1; }
.chart-line .grid-v { stroke-dasharray: 3 4; }
.chart-line .axis { fill: #9ca3af; font-size: 11px; }
.chart-line .pt { cursor: pointer; transition: r .15s; }
.chart-line .pt:hover { r: 7; }

/* Programme cards */
.prog-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.prog-card { background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 4px 18px rgba(17,24,39,.05); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: transform .15s, box-shadow .15s; }
.prog-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(17,24,39,.09); }
.prog-top { display: flex; justify-content: space-between; gap: 12px; }
.prog-top h3 { font-size: .98rem; font-weight: 600; margin: 4px 0 0; line-height: 1.3; }
.prog-tile { width: 46px; height: 46px; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-size: .9rem; }
.prog-total { font-size: .88rem; color: #4b5563; }
.prog-total strong { font-size: 1.3rem; color: var(--primary); margin-right: 4px; }
.prog-bottom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: auto; }
.prog-bottom .muted { margin-left: auto; }
.chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: .74rem; font-weight: 600; }
.chip-amber { background: #fef3c7; color: #92400e; }
.chip-green { background: #dcfce7; color: #166534; }

/* Bottom row */
.table-clean th { background: transparent; border-bottom: 1px solid #f0f1f5; }
.table-clean td { border-bottom: 1px solid #f5f6f9; vertical-align: middle; }
.who { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.who span:last-child { display: flex; flex-direction: column; line-height: 1.25; }
.who small { font-size: .75rem; }
.side-stats h2 { margin-bottom: 16px; }
.split-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #eef0f4; }
.split-bar span { display: block; height: 100%; }
.split-lbl { display: flex; justify-content: space-between; font-size: .8rem; color: #4b5563; margin-top: 8px; }
.glance { list-style: none; padding: 0; margin: 18px 0 0; }
.glance li { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid #f3f4f6; font-size: .88rem; }
.glance li span { display: flex; align-items: center; gap: 10px; color: #4b5563; }
.glance li span .ico { color: var(--primary); }
.setup { margin-top: 16px; background: color-mix(in srgb, var(--accent) 14%, #fff); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }

/* Font preview on Settings */
.font-preview { border: 1px dashed #d1d5db; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; background: #fafbff; min-height: 72px; }
.font-preview strong { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.font-preview span { font-size: .95rem; color: #4b5563; }

/* Student dashboard + payments */
.stat-word { font-size: 1.25rem !important; line-height: 1.3 !important; }
.notice { margin-top: 18px; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; align-items: flex-start; }
.notice-green { background: #f0fdf4; color: #14532d; } .notice-red { background: #fef2f2; color: #7f1d1d; }
.notice-amber { background: #fffbeb; color: #78350f; } .notice-blue { background: #eff6ff; color: #1e3a8a; }
.notice .btn { margin-top: 6px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.checklist a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #f8f9fc; color: #4b5563; text-decoration: none; font-size: .86rem; font-weight: 500; }
.checklist a.ok { background: #f0fdf4; color: #166534; }
.checklist .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-block; margin: 0 2px; }
.bar { height: 8px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.bar span { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.empty-soft { display: flex; align-items: center; gap: 14px; color: #4b5563; font-size: .9rem; }
.text-green { color: #16a34a; }
.invoice-doc h2 { font-size: 1.3rem; }
.inv-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.inv-totals { margin-left: auto; max-width: 320px; margin-top: 12px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 6px 0; font-size: .92rem; }
.inv-totals .inv-due { border-top: 2px solid #111827; margin-top: 4px; padding-top: 10px; font-size: 1.05rem; }
.inv-totals .inv-due strong { color: var(--primary); font-size: 1.25rem; }
.pay-box h3 { font-size: .95rem; margin: 16px 0 10px; }
.pay-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.pay-tabs > label { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 8px; border-radius: 12px; background: #f3f4f8; color: #4b5563; cursor: pointer; font-size: .85rem; font-weight: 600; margin: 0; }
.pay-tabs > input:checked + label { background: var(--primary); color: #fff; }
.pay-tabs > input:focus-visible + label { outline: 2px solid var(--accent); }
.pay-pane { display: none; width: 100%; padding-top: 14px; }
#tab-online:checked ~ #pane-online, #tab-bank:checked ~ #pane-bank, #tab-cash:checked ~ #pane-cash { display: block; }
.bank-kv { background: #f8f9fc; border-radius: 12px; padding: 12px 14px; font-size: .88rem; margin-bottom: 10px; }
.tabs-inline { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid #f0f1f5; padding-bottom: 12px; }
.tabs-inline a { padding: 7px 14px; border-radius: 999px; text-decoration: none; color: #4b5563; font-size: .86rem; font-weight: 500; background: #f5f6fa; }
.tabs-inline a.active { background: var(--primary); color: #fff; }
.pay-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 18px; padding: 16px 0; border-bottom: 1px solid #f3f4f6; align-items: center; }
.pay-amt { text-align: right; font-weight: 700; font-size: 1.1rem; }
.pay-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.verify-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.verify-form input { max-width: 280px; padding: 7px 10px; font-size: .85rem; }

/* Responsive */
@media (max-width: 1200px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .dash-bottom { grid-template-columns: minmax(0, 1fr); }
  .dash-grid > *, .dash-bottom > * { min-width: 0; }
}
@media (max-width: 900px) {
  .ad-shell { grid-template-columns: 1fr; }
  .ad-side { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 260px; background: var(--primary); transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
  .ad-shell.nav-open .ad-side { transform: none; }
  .ad-main { border-radius: 0; min-height: 100vh; }
  .ad-burger { display: grid; }
  .ad-top { padding: 14px 16px 4px; }
  .ad-search { order: 5; flex-basis: 100%; max-width: none; }
  .ad-me-txt { display: none; }
  .ad-content { padding: 14px 14px 32px; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; gap: 14px; }
  .stat-txt strong { font-size: 1.8rem; }
  .ov-donuts .donut svg { width: 72px; height: 72px; }
}

/* Small layout fixes */
.prog-top > .badge { align-self: flex-start; }
.ad-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-tabs > label { white-space: nowrap; font-size: .82rem; padding: 10px 6px; }

/* Timetable */
.tt-scroll { overflow-x: auto; }
.tt-grid { display: grid; grid-template-columns: 58px repeat(var(--days), minmax(130px, 1fr)); grid-template-rows: 40px repeat(var(--slots), 30px); position: relative; min-width: 620px; }
.tt-corner { grid-row: 1; grid-column: 1; }
.tt-day { grid-row: 1; display: grid; place-items: center; font-weight: 600; font-size: .85rem; color: #374151; background: #f8f9fc; border-radius: 10px 10px 0 0; margin: 0 2px; }
.tt-day .short { display: none; }
.tt-time { grid-column: 1; font-size: .72rem; color: #9ca3af; padding-right: 8px; text-align: right; transform: translateY(-7px); }
.tt-cell { border-top: 1px dashed #f0f1f5; border-left: 1px solid #f3f4f6; }
.tt-cell.hour { border-top: 1px solid #e9ebf1; }
.tt-entry { position: relative; z-index: 2; margin: 2px 3px; width: calc(100% / var(--lanes, 1) - 6px); margin-left: calc(100% * var(--lane, 0) / var(--lanes, 1) + 3px); justify-self: start; border-radius: 10px; padding: 6px 8px; background: color-mix(in srgb, var(--c) 13%, #fff); border-left: 4px solid var(--c); overflow: hidden; display: flex; flex-direction: column; gap: 1px; font-size: .74rem; line-height: 1.3; }
.tt-entry strong { color: color-mix(in srgb, var(--c) 75%, #000); font-size: .8rem; }
.tt-name { font-weight: 600; color: #1f2937; }
.tt-clash { outline: 2px dashed #ef4444; outline-offset: -2px; }
.tt-meta { color: #4b5563; }
.tt-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 3px; }
.tt-actions a, .tt-actions button { background: none; border: 0; padding: 0; font: inherit; font-size: .72rem; color: color-mix(in srgb, var(--c) 75%, #000); text-decoration: underline; cursor: pointer; }
.tt-list { display: none; }
.tt-list h4 { margin: 14px 0 6px; font-size: .9rem; }
.tt-li { display: flex; gap: 12px; padding: 9px 12px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); border-radius: 8px; margin-bottom: 6px; font-size: .86rem; }
.tt-li-time { font-weight: 700; white-space: nowrap; min-width: 92px; }
details.panel summary { cursor: pointer; }
@media (max-width: 700px) { .tt-scroll { display: none; } .tt-list { display: block; } }
@media print {
  .ad-side, .ad-top, .no-print, .ad-content > .alert { display: none !important; }
  .admin-body, .ad-main { background: #fff !important; }
  .ad-shell { display: block; } .ad-content { padding: 0; }
  .grid-detail { display: block; }
  .panel { box-shadow: none; padding: 0; }
  .tt-grid { min-width: 0; } .tt-entry { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tt-actions { display: none; }
}

/* ---------- Class45: parent area ---------- */
.child-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-bottom: 26px; }
.child-card { border-top: 4px solid var(--c); }
.child-who { display: flex; gap: 12px; align-items: center; }
.child-who h3 { margin: 0 0 2px; font-size: 1.05rem; }
.child-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .84rem; color: var(--muted); }
.welcome-panel { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 26px; }
.welcome-panel h3 { margin-top: 0; }

/* ---------- Class45: dashboard grade bars ---------- */
.grade-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.grade-bar { display: grid; grid-template-columns: 130px 1fr 70px; gap: 12px; align-items: center; text-decoration: none; color: inherit; font-size: .85rem; }
.grade-bar:hover .gb-label { color: var(--primary); }
.gb-track { height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.gb-fill { display: block; height: 100%; background: var(--c); border-radius: 999px; min-width: 2px; }
.gb-num { font-weight: 600; text-align: right; white-space: nowrap; }
.gb-num .chip { padding: 2px 7px; font-size: .68rem; }

/* ---------- Class45: grades & classes ---------- */
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.grade-card { padding: 16px 18px; }
.grade-card.is-off { opacity: .55; }
.grade-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.grade-head .actions { gap: 6px; }
.grade-head button.chip { border: 0; cursor: pointer; background: #f1f5f9; color: #475569; }
.grade-head button.chip-green { background: #dcfce7; color: #166534; }
.class-row { border-top: 1px solid var(--border); padding: 8px 0; }
.class-row summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; list-style: none; }
.class-row summary::-webkit-details-marker { display: none; }
.class-row summary a { margin-left: auto; }
.class-row.add summary { color: var(--primary); font-weight: 600; }
.class-form { margin-top: 10px; background: #f8fafc; border-radius: 10px; padding: 12px; }

@media (max-width: 560px) { .grade-bar { grid-template-columns: 90px 1fr 56px; } .welcome-panel { flex-direction: column; } }
@media print { .filters, .ad-side, .ad-top, .page-header .btn, .pagination { display: none !important; } .ad-main { margin: 0 !important; } }

/* ---------- Class45: places per grade ---------- */
.places-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.places-item { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.places-item.is-off { opacity: .6; }
.places-name { font-weight: 600; font-size: .88rem; }
.places-item input { padding: 6px 8px; }

/* ---------------- Fees ---------------- */
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money-big { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fee-progress { height: 8px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.fee-progress > span { display: block; height: 100%; background: #22c55e; border-radius: 999px; }
.fee-group-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(140px, 1.2fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f1f2f6; text-decoration: none; color: inherit; }
.fee-group-row:last-child { border-bottom: 0; }
.fee-group-row:hover h3 { color: var(--primary); }
.fee-group-row h3 { margin: 0 0 2px; font-size: 1rem; }
.fee-group-row.is-archived { opacity: .6; }
.fee-items { width: 100%; border-collapse: collapse; }
.fee-items th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 8px 8px 0; }
.fee-items td { padding: 4px 8px 4px 0; vertical-align: top; }
.fee-items td.amt { width: 160px; }
.fee-items td.pick { width: 190px; }
.fee-items td.del { width: 40px; }
.fee-items input, .fee-items select { margin: 0; }
.amt-wrap { position: relative; }
.amt-wrap span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.amt-wrap input { padding-left: 26px; text-align: right; }
.row-del { border: 0; background: #fef2f2; color: #dc2626; width: 36px; height: 38px; border-radius: 10px; cursor: pointer; font-size: 1.1rem; }
.row-del:hover { background: #fee2e2; }
.fee-total-bar { display: flex; justify-content: flex-end; gap: 24px; flex-wrap: wrap; padding: 14px 0 0; margin-top: 8px; border-top: 2px solid #f1f2f6; font-size: .95rem; }
.fee-total-bar strong { font-size: 1.15rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.quick-fees { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.quick-fees button { border: 1px dashed #cbd5e1; background: #fff; border-radius: 999px; padding: 5px 12px; font-size: .8rem; cursor: pointer; color: #475569; }
.quick-fees button:hover { border-color: var(--primary); color: var(--primary); }
.target-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.target-cards input { position: absolute; opacity: 0; pointer-events: none; }
.target-cards label { display: flex; flex-direction: column; gap: 2px; border: 2px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; cursor: pointer; margin: 0; background: #fff; }
.target-cards label strong { font-size: .95rem; }
.target-cards label small { color: var(--muted); font-weight: 400; }
.target-cards input:checked + label { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.target-cards input:focus-visible + label { outline: 2px solid var(--accent); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px 2px 10px; }
.pick-grid label { margin: 0; font-weight: 400; font-size: .9rem; display: flex; gap: 8px; align-items: center; }
.pick-tools { display: flex; gap: 10px; font-size: .82rem; margin-bottom: 6px; }
.preview-box { border-radius: 14px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 16px 18px; margin-top: 14px; }
.preview-box .big { font-size: 1.35rem; font-weight: 800; }
.preview-box ul { margin: 8px 0 12px; padding-left: 18px; font-size: .9rem; color: #475569; }
.bill-card { border: 1px solid #edf0f5; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; background: #fff; }
.bill-card.is-cancelled { opacity: .55; }
.bill-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.bill-head h3 { margin: 0; font-size: 1.02rem; }
.bill-lines { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: .92rem; }
.bill-lines td { padding: 5px 0; border-bottom: 1px dashed #eef0f4; }
.bill-lines tr.is-discount td { color: #16a34a; }
.bill-lines tr.is-charge td { color: #b45309; }
.bill-lines tr.is-total td { border-bottom: 0; border-top: 2px solid #111827; font-weight: 700; padding-top: 8px; }
.bill-lines tr.is-void td { text-decoration: line-through; color: #9ca3af; }
.bill-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bill-actions details { flex: 1 1 260px; }
.bill-actions summary { cursor: pointer; display: inline-flex; padding: 7px 14px; border-radius: 10px; background: #f3f4f8; font-weight: 600; font-size: .85rem; list-style: none; }
.bill-actions summary::-webkit-details-marker { display: none; }
.bill-actions details[open] summary { background: var(--primary); color: #fff; }
.bill-actions details form { margin-top: 10px; background: #f9fafb; border-radius: 12px; padding: 14px; }
.balance-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: #fef2f2; color: #b91c1c; }
.balance-pill.ok { background: #f0fdf4; color: #15803d; }
.fee-child { margin-bottom: 18px; }
.fee-child-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.howtopay { white-space: pre-line; background: #f8f9fc; border-radius: 12px; padding: 14px 16px; font-size: .92rem; }
.method-bars div { display: flex; justify-content: space-between; font-size: .9rem; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.bill-actions details[open] { flex-basis: 100%; order: 10; }
.fee-items td, .fee-items th { border: 0; background: none; }

/* ---------- Class45: report cards ---------- */
.report-card { background: var(--card, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 26px; max-width: 900px; }
.rc-head { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--primary); padding-bottom: 14px; margin-bottom: 16px; }
.rc-logo { width: 64px; height: 64px; object-fit: contain; }
.rc-school { margin: 0 0 2px; font-size: 1.25rem; }
.rc-title { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.rc-title strong { font-size: 1.1rem; color: var(--primary); text-transform: uppercase; letter-spacing: .04em; }
.rc-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 16px; }
.rc-details dt { font-size: .75rem; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.rc-details dd { margin: 2px 0 0; font-weight: 600; }
.rc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.rc-summary > div { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 10px 14px; display: flex; flex-direction: column; }
.rc-summary span { font-size: .78rem; color: #6b7280; }
.rc-summary strong { font-size: 1.35rem; }
.rc-summary small { color: #6b7280; }
.rc-comments { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rc-comments h3 { font-size: .9rem; margin: 0 0 4px; }
.rc-comments p { margin: 0; min-height: 2.6em; border-bottom: 1px dashed var(--border, #d1d5db); padding-bottom: 6px; }
.rc-key { margin-top: 16px; }
@media (max-width: 640px) { .rc-comments { grid-template-columns: 1fr; } .rc-head { flex-wrap: wrap; } .rc-title { margin-left: 0; text-align: left; } .report-card { padding: 16px; } }
@media print {
  .report-card { border: 0; padding: 0; max-width: none; }
  .report-card .badge { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rc-edit, .rc-tools, .filters { display: none !important; }
}

/* ---------- Class45: programme fees and entry requirements ---------- */
.programme-info { border: 1px solid var(--border, #e5e7eb); border-radius: 12px; padding: 14px 16px; margin: 6px 0 14px; background: color-mix(in srgb, var(--primary) 4%, transparent); }
.programme-info h4 { margin: 0 0 6px; font-size: .92rem; }
.programme-info .bill-lines { width: 100%; margin-bottom: 8px; }
.programme-info .bill-lines th { text-align: left; padding: 4px 0; }
.programme-info h4.mt-2 { margin-top: 14px; }
.fee-items select[name="item_grade[]"] { min-width: 230px; }
.ad-avatar.has-photo, .avatar-lg.has-photo { padding: 0; overflow: hidden; background: none; }
.ad-avatar.has-photo img, .avatar-lg img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar-lg { width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--primary) 14%, #fff); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 2.4rem; flex: none; }
[data-theme=dark] .avatar-lg:not(.has-photo) { background: color-mix(in srgb, var(--primary) 35%, #0b1820); color: #fff; }
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

/* Report builder */
.rp-sets { margin-bottom: 18px; }
.rp-set { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; border-top: 3px solid var(--rp); transition: transform .12s, box-shadow .12s; }
.rp-set:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.rp-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--rp); background: color-mix(in srgb, var(--rp) 12%, transparent); }
.rp-label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 8px; }
.rp-checks { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.rp-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 999px; font-size: .85rem; cursor: pointer; font-weight: 500; }
.rp-check:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.rp-build .rp-filters { margin-top: 14px; padding: 0; box-shadow: none; }
.rp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-table tfoot td { border-top: 2px solid #111827; }

/* Programme details: cards for how it helps, requirements, accreditation and careers; modules by semester */
.pinfo { margin: 6px 0 14px; }
.pinfo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pinfo-card { --c: var(--primary); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 9%, #fff) 0%, #fff 70%); border: 1px solid color-mix(in srgb, var(--c) 18%, #e5e7eb); border-top: 3px solid var(--c); border-radius: 14px; padding: 14px 16px; }
.pinfo-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pinfo-card h4 { margin: 0; font-size: .95rem; }
.pinfo-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c) 15%, #fff); color: var(--c); }
.pinfo-list { margin: 0; padding: 0; list-style: none; font-size: .88rem; }
.pinfo-list li { position: relative; padding: 3px 0 3px 20px; }
.pinfo-list li::before { content: ""; position: absolute; left: 3px; top: .75em; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pinfo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pinfo-chips span { font-size: .82rem; font-weight: 500; padding: 4px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 80%, #000); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); }
.pinfo-h { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: .98rem; }
.pinfo-sems { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pinfo-sem { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; overflow: hidden; background: var(--card, #fff); }
.pinfo-sem header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(135deg, #177d81, #1c5052); color: #fff; }
.pinfo-sem header .muted { color: rgba(255,255,255,.75); margin-left: auto; }
.pinfo-sem-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #bdd3d1; color: #08282a; font-weight: 700; font-size: .85rem; flex: none; }
.pinfo-sem ul { list-style: none; margin: 0; padding: 6px 0; }
.pinfo-sem li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 14px; font-size: .88rem; border-top: 1px solid #f1f2f6; }
.pinfo-sem li:first-child { border-top: 0; }
.pinfo-sem li.is-mine { background: color-mix(in srgb, #22c55e 8%, transparent); font-weight: 600; }
.pinfo-fees { border: 1px solid var(--border, #e5e7eb); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; background: var(--card, #fff); }
.pinfo-fees .bill-lines { width: 100%; }
.pinfo-fees .bill-lines th { text-align: left; padding: 4px 0; }
[data-theme=dark] .pinfo-card { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #0d1c26) 0%, rgba(19,33,44,.85) 70%); border-color: color-mix(in srgb, var(--c) 35%, transparent); }
[data-theme=dark] .pinfo-ico { background: color-mix(in srgb, var(--c) 30%, transparent); color: color-mix(in srgb, var(--c) 40%, #fff); }
[data-theme=dark] .pinfo-chips span { background: color-mix(in srgb, var(--c) 22%, transparent); color: color-mix(in srgb, var(--c) 35%, #fff); }
[data-theme=dark] .pinfo-sem, [data-theme=dark] .pinfo-fees { background: var(--card); border-color: var(--border); }
[data-theme=dark] .pinfo-sem li { border-color: var(--border); }
.prog-banner { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: 18px; margin-bottom: 16px; color: #fff; background: linear-gradient(135deg, #177d81 0%, #1c5052 55%, #08282a 100%); box-shadow: 0 10px 28px rgba(8,40,42,.18); }
.prog-banner h2 { margin: 2px 0; color: #fff; font-size: 1.35rem; }
.prog-banner .small { color: rgba(255,255,255,.8); }
.prog-banner-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #bdd3d1; color: #08282a; flex: none; }
.prog-banner .btn { margin-left: auto; background: #bdd3d1; color: #08282a; }

/* Boarding */
.hostel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin: 10px 0; }
.room-grid .room { border: 1px solid var(--border, #e5e7eb); border-radius: 10px; padding: 6px 8px; background: var(--card, #fff); }
.room-grid .room summary { display: flex; justify-content: space-between; gap: 6px; cursor: pointer; list-style: none; font-size: 13px; }
.room-grid .room.is-full { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .4); }
.room-grid .room[open] { grid-column: span 2; }
.room-grid .room input { margin-top: 4px; }
.damage-card { margin-bottom: 14px; }
.access-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.access-row:last-of-type { border-bottom: 0; }
.item-row { margin-bottom: 8px; flex-wrap: wrap; }
.item-row input[type=text] { max-width: 260px; }

/* Programme cards (Programmes & modules) */
.grade-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.pcard { padding: 18px; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, border-color .15s; }
.pcard:hover { box-shadow: 0 10px 28px rgba(15,23,42,.08); }
.pcard-top { display: flex; gap: 12px; align-items: flex-start; }
.pcard-tile { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.pcard-tile::after { content: ''; position: absolute; right: -10px; bottom: -14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); }
.tone-teal { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.tone-amber { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.tone-blue { background: linear-gradient(135deg, #7dd3fc, #2563eb); }
.tone-rose { background: linear-gradient(135deg, #f9a8d4, #db2777); }
.tone-violet { background: linear-gradient(135deg, #c4b5fd, #7c3aed); }
.tone-green { background: linear-gradient(135deg, #86efac, #16a34a); }
.pcard-title { min-width: 0; }
.pcard-meta { font-size: .74rem; color: var(--muted); margin: 0 0 2px; }
.pcard-meta .sep { margin: 0 6px; opacity: .5; }
.pcard-title h3 { font-size: 1.02rem; line-height: 1.3; }
.pcard-status { display: flex; align-items: center; gap: 6px; margin: 10px 0 12px; }
.pdot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 3px #f1f5f9; }
.pdot.is-open { background: #16a34a; box-shadow: 0 0 0 3px #dcfce7; }
.pdot.is-hidden { background: #dc2626; box-shadow: 0 0 0 3px #fee2e2; }
.kebab { position: relative; margin-left: auto; }
.kebab summary { list-style: none; cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.kebab summary::-webkit-details-marker { display: none; }
.kebab summary:hover, .kebab[open] summary { background: #f1f5f9; color: var(--text, #0f172a); }
.kebab-menu { position: absolute; right: 0; top: 34px; z-index: 30; min-width: 210px; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(15,23,42,.16); padding: 6px; }
.kebab-menu form { margin: 0; }
.kebab-menu button, .kebab-menu a { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: .86rem; color: inherit; text-decoration: none; cursor: pointer; }
.kebab-menu button:hover, .kebab-menu a:hover { background: #f1f5f9; }
.kebab-note { display: block; padding: 8px 10px; font-size: .78rem; color: var(--muted); }
.pcard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; background: #f8fafc; border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.pcard-label { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.psteps { display: flex; gap: 4px; padding-top: 4px; }
.psteps span { flex: 1; height: 6px; border-radius: 999px; background: #e2e8f0; }
.psteps span.on { background: var(--primary); }
.psteps span.on.s4 { background: #f59e0b; }
.psteps span.on.s5 { background: #14b8a6; }
.pbar { height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.pbar span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.pcard-fill { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.avatars { display: flex; align-items: center; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .66rem; font-weight: 700; background: #ccfbf1; color: #115e59; border: 2px solid var(--card, #fff); margin-left: -6px; }
.avatar:first-child { margin-left: 0; }
.avatar-more { background: #e0f2fe; color: #075985; }
.pcard .class-row summary strong { font-size: .92rem; }
.grade-grid > .card, .grade-grid > .card + .card { margin: 0; }
.pcard-more { border-top: 1px solid var(--border); margin-top: 4px; }
.pcard-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 0 4px; font-weight: 600; font-size: .92rem; }
.pcard-more > summary::-webkit-details-marker { display: none; }
.pcard-more > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.pcard-more[open] > summary::after { transform: rotate(-135deg); }
.pcard-count { font-size: .72rem; font-weight: 700; background: #ccfbf1; color: #115e59; border-radius: 999px; padding: 1px 8px; }
