/* ==========================================================================
   Kinder Kalp Preschool - Management System
   Palette and typography taken from kinderkalp.com
   ========================================================================== */

:root {
  --brand:        #5a50e1;
  --brand-dark:   #433ab8;
  --brand-light:  #efedfd;
  --brand-tint:   #f6f5ff;
  --accent:       #f15a24;
  --accent-dark:  #d74817;
  --accent-light: #fdeee7;
  --yellow:       #ffd200;

  --nav-bg:       #291e63;
  --nav-bg-2:     #1d1548;
  --nav-text:     #cdc8ee;
  --nav-muted:    #928cc4;

  --ink:      #1e1e38;
  --ink-2:    #58586f;
  --ink-3:    #8e8ea6;
  --line:     #e7e4f2;
  --line-2:   #f1eff8;
  --surface:  #ffffff;
  --canvas:   #fbf9f4;

  --ok:      #12805a;
  --ok-bg:   #e4f5ee;
  --warn:    #9a6a05;
  --warn-bg: #fff6dd;
  --err:     #cc3521;
  --err-bg:  #fdeceb;
  --info:    #3f4bc4;
  --info-bg: #ecedfc;

  --radius:   12px;
  --radius-s: 8px;
  --shadow:   0 1px 2px rgba(41, 30, 99, .06), 0 4px 14px rgba(41, 30, 99, .06);
  --shadow-lg: 0 14px 44px rgba(41, 30, 99, .22);

  --sidebar-w: 236px;
  --font: "Quicksand", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Baloo 2", "Quicksand", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0;
}
h1 { font-size: 21px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p  { margin: 0 0 10px; }
a  { color: var(--brand); }

.hidden { display: none !important; }
.muted  { color: var(--ink-3); }
.small  { font-size: 12.5px; }
.right  { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono   { font-variant-numeric: tabular-nums; }
.grow   { flex: 1; }
.strong { font-weight: 650; }

/* ==========================================================================
   Login
   ========================================================================== */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 520px at 12% -12%, #ebe8fd 0%, transparent 62%),
    radial-gradient(900px 520px at 96% 112%, #ffe6d8 0%, transparent 58%),
    var(--canvas);
}

.login-card {
  width: 100%;
  max-width: 396px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 32px 30px;
}

.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .mark {
  display: block;
  width: auto; height: 62px;
  margin: 0 auto 14px;
}
.login-brand h1 { font-size: 19px; }
.login-brand p  { color: var(--ink-3); font-size: 13px; margin: 3px 0 0; }

.login-hint {
  margin-top: 18px;
  padding: 11px 13px;
  background: var(--brand-tint);
  border: 1px solid #ddd8fa;
  border-radius: var(--radius-s);
  font-size: 12.5px;
  color: #443a9e;
}

/* ==========================================================================
   App shell
   ========================================================================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--nav-bg);
  color: var(--nav-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-brand .mark {
  height: 34px; width: auto; flex: 0 0 auto;
  /* the logo is drawn for light backgrounds; lift it off the deep navy */
  background: #fff;
  padding: 4px 6px;
  border-radius: 8px;
}
.sidebar-brand .name { font-weight: 650; color: #fff; font-size: 14px; line-height: 1.25; }
.sidebar-brand .sub  { font-size: 11px; color: var(--nav-muted); }

.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--nav-muted); padding: 12px 10px 5px; font-weight: 700;
}
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin-bottom: 1px;
  border-radius: var(--radius-s);
  color: var(--nav-text); text-decoration: none;
  font-size: 13.5px; font-weight: 500;
}
.nav a:hover  { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--brand); color: #fff; font-weight: 600; }
.nav a .ico { width: 17px; text-align: center; opacity: .95; font-size: 14px; }
.nav a .pill {
  margin-left: auto;
  background: var(--accent); color: #fff;
  border-radius: 20px; padding: 0 7px;
  font-size: 11px; font-weight: 700; line-height: 17px;
}

.sidebar-foot {
  padding: 12px; border-top: 1px solid rgba(255,255,255,.09);
  display: flex; align-items: center; gap: 9px;
}
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: grid; place-items: center;
  font-weight: 650; font-size: 13px; color: #fff;
}
.sidebar-foot .who   { min-width: 0; }
.sidebar-foot .who b  { display: block; color: #fff; font-size: 13px; font-weight: 600;
                        overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .who span { font-size: 11px; color: var(--nav-muted); text-transform: capitalize; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 13px 24px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .title h1 { font-size: 18px; }
.topbar .title p  { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-3); }
.topbar .actions  { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.content { padding: 20px 24px 48px; flex: 1; }

.menu-btn {
  background: none; border: 1px solid var(--line);
  border-radius: var(--radius-s); padding: 6px 10px;
  font-size: 17px; cursor: pointer; color: var(--ink);
}
.menu-btn:hover { background: var(--brand-tint); }

/* Hiding the menu gives the content the whole width. */
.app.nav-hidden .sidebar { display: none; }

/* ==========================================================================
   Cards, tiles, layout helpers
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head h2 { font-size: 15px; }
.card-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 13px 15px;
  box-shadow: var(--shadow);
}
.tile .label { font-size: 12px; color: var(--ink-3); font-weight: 550; }
.tile .value { font-size: 25px; font-weight: 700; line-height: 1.15; margin-top: 3px;
               font-variant-numeric: tabular-nums; }
.tile .foot  { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
/* A short list inside a tile: name on the left, figure on the right. */
.tile-list > div { display: flex; justify-content: space-between; gap: 10px; line-height: 1.55; }
.tile-list > div b { color: var(--ink-2, var(--ink)); font-variant-numeric: tabular-nums; }
.tile.is-accent { border-left-color: var(--accent); }
.tile.is-ok     { border-left-color: var(--ok); }
.tile.is-err    { border-left-color: var(--err); }
.tile.is-info   { border-left-color: var(--info); }
.tile.clickable { cursor: pointer; }
.tile.clickable:hover { border-color: var(--brand); }

.cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
.cols-3 { display: grid; gap: 16px; grid-template-columns: 2fr 1fr; align-items: start; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 13px 14px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.span-2 { grid-column: span 2; }
.field.span-all { grid-column: 1 / -1; }

label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
label .req { color: var(--err); margin-left: 2px; }
.field .help { font-size: 11.5px; color: var(--ink-3); }

input[type=text], input[type=password], input[type=date], input[type=number],
input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-family: inherit; font-size: 13.5px;
  color: var(--ink); background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(90, 80, 225, .16);
}
input:disabled, select:disabled, textarea:disabled {
  background: var(--line-2); color: var(--ink-3); cursor: not-allowed;
}
textarea { resize: vertical; min-height: 68px; }
select { appearance: none; background-image:
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'><path d='M1 1l4.5 4.5L10 1' stroke='%238e8ea6' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

.checkline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.checkline input { width: 15px; height: 15px; accent-color: var(--brand); }

fieldset {
  border: none; border-top: 1px solid var(--line-2);
  margin: 20px 0 0; padding: 16px 0 0;
}
fieldset legend {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; color: var(--ink-3); padding: 0 8px 0 0;
}

.form-actions {
  display: flex; gap: 8px; align-items: center;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--line-2);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  background: var(--surface); color: var(--ink);
  border-color: var(--line);
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover:not(:disabled) { background: var(--line-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #a82817; border-color: #a82817; }

.btn-ghost { background: transparent; border-color: transparent; color: var(--brand); }
.btn-ghost:hover:not(:disabled) { background: var(--brand-light); }

.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  padding: 9px 12px;
  background: var(--brand-tint);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); white-space: nowrap;
}
table.data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover { background: var(--brand-tint); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot td {
  padding: 10px 12px; font-weight: 700;
  border-top: 2px solid var(--line); background: var(--brand-tint);
}
.cell-main { font-weight: 600; }
.cell-sub  { font-size: 12px; color: var(--ink-3); }

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-new     { background: #eeecf6; color: #55556e; border-color: #e0dcee; }
.badge-called  { background: var(--info-bg); color: var(--info); border-color: #d3d6f7; }
.badge-visit   { background: var(--warn-bg); color: var(--warn); border-color: #f5e3ae; }
.badge-ok      { background: var(--ok-bg);  color: var(--ok);   border-color: #bfe6d7; }
.badge-err     { background: var(--err-bg); color: var(--err);  border-color: #f7cfca; }
.badge-brand   { background: var(--brand-light); color: var(--brand-dark); border-color: #d6d1fa; }
.badge-plain   { background: var(--line-2); color: var(--ink-2); border-color: var(--line); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 20px;
  background: var(--brand-light); color: var(--brand-dark);
  font-size: 12px; font-weight: 600;
}
.chip button {
  border: none; background: none; cursor: pointer;
  color: inherit; font-size: 14px; line-height: 1; padding: 0;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  /* Every box starts on the same line; a note under one of them hangs
     below it instead of lifting it above the others. */
  gap: 10px 12px; align-items: start;
}
.filters .field { gap: 4px; min-width: 0; }
.filters label { font-size: 11.5px; }
.filters .field .help { font-size: 11px; line-height: 1.3; }
/* The buttons get a wider slot of their own and wrap inside it rather
   than running out of the card. */
.filters .field:has(.filter-actions) { grid-column: span 2; }
.filters .filter-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.filters .filter-actions .btn { white-space: nowrap; }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -21px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand);
}
.tl-item.is-ok::before  { border-color: var(--ok); background: var(--ok); }
.tl-item.is-err::before { border-color: var(--err); background: var(--err); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-time { font-size: 11.5px; color: var(--ink-3); }
.tl-body { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.tl-who  { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ==========================================================================
   Detail lists
   ========================================================================== */

.dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 18px;
}
.dl div { min-width: 0; }
.dl dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-3); font-weight: 650; margin-bottom: 2px;
}
.dl dd { margin: 0; font-size: 13.5px; word-break: break-word; }

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(29, 21, 72, .55);
  display: grid; place-items: start center;
  padding: 34px 16px; overflow-y: auto;
}
.modal {
  width: 100%; max-width: 680px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.modal.narrow { max-width: 440px; }
.modal.wide   { max-width: 900px; }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: 12px;
}
.modal-head h2 { font-size: 16px; }
.modal-head .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.modal-head .x {
  margin-left: auto; border: none; background: none; cursor: pointer;
  font-size: 21px; line-height: 1; color: var(--ink-3); padding: 0 3px;
}
.modal-head .x:hover { color: var(--ink); }
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line-2);
  display: flex; gap: 8px; justify-content: flex-end; align-items: center;
}

/* ==========================================================================
   Toast / alerts
   ========================================================================== */

.toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 200;
  display: flex; flex-direction: column; gap: 9px;
  max-width: min(400px, calc(100vw - 36px));
}
.toast {
  background: var(--nav-bg); color: #fff;
  padding: 11px 15px; border-radius: var(--radius-s);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start;
  animation: toast-in .18s ease-out;
}
.toast.is-ok  { background: #0f6a4b; }
.toast.is-err { background: #a82817; }
.toast .x { margin-left: auto; cursor: pointer; opacity: .7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.alert {
  padding: 11px 14px; border-radius: var(--radius-s);
  font-size: 13px; border: 1px solid transparent;
  margin-bottom: 14px;
}
.alert-err  { background: var(--err-bg);  color: #99271a; border-color: #f7cfca; }
.alert-warn { background: var(--warn-bg); color: #7d5604; border-color: #f5e3ae; }
.alert-ok   { background: var(--ok-bg);   color: #0f6a4b; border-color: #bfe6d7; }
.alert-info { background: var(--info-bg); color: #333fae; border-color: #d3d6f7; }
.alert b { font-weight: 700; }

/* ==========================================================================
   States
   ========================================================================== */

.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); }
.empty .ico  { font-size: 34px; opacity: .5; margin-bottom: 8px; }
.empty h3    { color: var(--ink-2); margin-bottom: 4px; }
.empty p     { font-size: 13px; max-width: 380px; margin: 0 auto 14px; }

.loading { padding: 44px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.spinner {
  width: 22px; height: 22px; margin: 0 auto 10px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-3);
}
.pager .btn-group { margin-left: auto; }

/* ==========================================================================
   Fee sheet
   ========================================================================== */

.fee-total {
  display: flex; align-items: baseline; gap: 8px;
  padding: 12px 15px; border-radius: var(--radius-s);
  background: var(--brand-tint); border: 1px solid #ddd8fa;
  margin-bottom: 14px;
}
.fee-total .label { font-size: 12.5px; color: var(--brand-dark); font-weight: 600; }
.fee-total .value { font-size: 23px; font-weight: 700; color: var(--brand-dark);
                    margin-left: auto; font-variant-numeric: tabular-nums; }

.comp-row {
  display: grid;
  grid-template-columns: 1fr 130px 150px 34px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.sched-row {
  display: grid;
  grid-template-columns: 34px 1fr 170px 100px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}

.comp-row .del {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-s); cursor: pointer;
  height: 34px; color: var(--err); font-size: 15px;
}
.comp-row .del:hover { background: var(--err-bg); }




/* ==========================================================================
   Attendance  (sized for a tablet held in the hand)
   ========================================================================== */

.att-bar { position: sticky; top: 57px; z-index: 15; background: var(--surface); }
.att-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }

.att-chip {
  padding: 4px 11px; border-radius: 20px;
  background: var(--line-2); color: var(--ink-2);
  font-size: 12.5px; font-weight: 600;
}
.att-chip b { font-size: 14px; }
.att-chip.is-p    { background: var(--ok-bg);   color: var(--ok); }
.att-chip.is-a    { background: var(--err-bg);  color: var(--err); }
.att-chip.is-h    { background: var(--warn-bg); color: var(--warn); }
.att-chip.is-todo { background: var(--brand-light); color: var(--brand-dark); }

.att-status { font-size: 12px; color: var(--ink-3); min-width: 120px; }
.att-status.is-saving { color: var(--warn); }
.att-status.is-saved  { color: var(--ok); }
.att-status.is-error  { color: var(--err); font-weight: 700; }

.att-list { padding: 0; }

.att-group {
  padding: 10px 16px;
  background: var(--brand-tint);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-head);
  font-size: 14px; font-weight: 600; color: var(--brand-dark);
  position: sticky; top: 110px; z-index: 10;
}

.att-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-2);
}
.att-row:last-child { border-bottom: none; }

.att-who { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.att-avatar {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 50%;
  background: var(--brand-light); color: var(--brand-dark);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.att-name { font-weight: 650; font-size: 15px; }
.att-meta { font-size: 12.5px; color: var(--ink-3); }

.att-marks { display: flex; gap: 8px; flex: 0 0 auto; }

/* Big, forgiving targets - these are tapped with a thumb all morning. */
.att-btn {
  min-width: 64px; min-height: 48px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  font-family: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  transition: background .1s, border-color .1s, color .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.att-btn-letter { font-size: 17px; font-weight: 800; line-height: 1; color: var(--ink-3); }
.att-btn-word   { font-size: 9.5px; font-weight: 700; text-transform: uppercase;
                  letter-spacing: .04em; color: var(--ink-3); }
.att-btn:active { transform: scale(.96); }

.att-btn.is-p.is-on {
  background: var(--ok); border-color: var(--ok);
}
.att-btn.is-a.is-on {
  background: var(--err); border-color: var(--err);
}
.att-btn.is-h.is-on {
  background: var(--accent); border-color: var(--accent);
}
.att-btn.is-on .att-btn-letter,
.att-btn.is-on .att-btn-word { color: #fff; }

@media (max-width: 640px) {
  .att-row { flex-wrap: wrap; }
  .att-marks { width: 100%; }
  .att-btn { flex: 1; }
  .att-btn-word { display: none; }
}

/* ==========================================================================
   Help
   ========================================================================== */

.help-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.help-quick-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.help-quick-btn:hover { border-color: var(--brand); background: var(--brand-tint); }
.help-quick-ico { font-size: 20px; line-height: 1; }

.help-sec .card-head { cursor: pointer; user-select: none; }
.help-sec:not(.is-open) .card-body { display: none; }
.help-sec .card-head:hover { background: var(--brand-tint); }
.help-ico { font-size: 20px; line-height: 1; }
.help-toggle {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--line-2); color: var(--ink-2);
  font-size: 15px; font-weight: 700; line-height: 1;
}

ol.help-steps {
  margin: 0; padding: 0;
  list-style: none;
  counter-reset: help;
}
ol.help-steps > li {
  counter-increment: help;
  position: relative;
  padding: 0 0 16px 40px;
}
ol.help-steps > li::before {
  content: counter(help);
  position: absolute; left: 0; top: 0;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand); color: #fff;
  font-size: 12.5px; font-weight: 700;
  font-family: var(--font);
}
ol.help-steps > li:not(:last-child)::after {
  content: ''; position: absolute;
  left: 13px; top: 30px; bottom: 4px;
  width: 2px; background: var(--line);
}
ol.help-steps > li:last-child { padding-bottom: 4px; }
.help-step-t { font-weight: 700; margin-bottom: 3px; padding-top: 3px; }
.help-step-d { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.help-step-d b { color: var(--ink); }

.help-search { max-width: 420px; }

@media print {
  /* A printed copy for the front desk: every section, no controls. */
  .help-sec .card-body { display: block !important; }
  .help-sec { page-break-inside: avoid; }
  .help-quick, .help-search, .help-toggle { display: none !important; }
}

/* ==========================================================================
   Receipt
   ========================================================================== */

.receipt-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 14px; margin-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.receipt-logo { height: 54px; width: auto; }
.receipt-title h2 { font-size: 18px; }

/* When a modal (a receipt) is open, print just the modal. When no modal
   is open, these rules must not apply - otherwise every page prints
   blank, which is exactly the bug they once caused. */
@media print {
  body.modal-open * { visibility: hidden; }
  body.modal-open .modal-backdrop, body.modal-open .modal-backdrop * { visibility: visible; }
  body.modal-open .modal-backdrop {
    position: absolute; inset: 0; padding: 0;
    background: #fff; overflow: visible; display: block;
  }
  body.modal-open .modal { max-width: 100%; box-shadow: none; border-radius: 0; }
  body.modal-open .modal-head, body.modal-open .modal-foot { display: none !important; }
  body.modal-open .modal-body { padding: 0; }
  body.modal-open .print-header { display: none !important; }
}

/* ==========================================================================
   Print
   ========================================================================== */

.print-header { display: none; }

/* Kinder Kalp letterhead at the top of every printed page and saved PDF,
   with the page number at the foot. The words are set from the page being
   printed (app.js, setHeader); the logo is a print-sized copy, drawn at
   a third of its pixel size so it stays sharp. */
:root {
  /* Embedded, not linked: the browser does not wait for a linked image
     before drawing the page margins, so it would print blank. */
  --kk-ph-logo: image-set(url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOAAAACWCAMAAADwiHQPAAABgFBMVEXimC3hjipQVWfmkinjbx1xp5/slCLTl0xHTHAjYXBJVIm2eicyKR9MVo6snFdql3MgI2Osa1h/f/96vrV3wLN3rKLve29OOmEA/wBoEgrffiRKWp9NXp89U5U0VZiBrKl//39fXxt1wbK3ljGAxrrSl0YqcSqBuK7/AP///3/Sj0SC0shIS2+rY6uDq5+5Lx+7hkk5ObXgmkQ9PVbofiD/qqqh5eXXfjNmzMw9R3iq/6qZzGaAvrT/zACBwLLGcY3//6q/fzMAf///1NRVqv9APVM/v78AAAD7oxr1hht2xbxKXatOYa/4piN5ysLziCP+fgD//wB+fn7/AAD+qQBLWJZMWppVqan5mBsAAP/////uoicA//9KVpNVVapJVY1////roil5u7DnhSZ3tKh5vLN5ua1/fwB4t6nnhCbooSzqoit70MX9qVTXhDCqVQD6miLnnC1HSnLnnS/lhCfTmTfShTKBzMRIVIs6O3Pooix1qJmqqgCqqqpxpJPmozHmKrxHAAAAgHRSTlMgYBWbFCDUF1QQWAsGJgcJCwYC6tBPBRQBA1On4F4PZAIErQ34XAShAQKG/5EDJANWBtdinwMEzAVbAwXXBWoJA0ACBgNrBAD+/vz8/vr++wIBAgEDzu8D/gEBzwGuA48Cr7HNUc6PAm6vboz+BE4D+k8tbJASMP5xCVAsAwMXLXpvoNQAACMoSURBVHja3V33X9vItpfljukhJNmw6dvb7ffd1/tQLFvFNq6AbcCY3iEhgX/9nTNNM5JsWNj7foh2w8fIKv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zqd7/AgENrzdrdexPKNpXb39//Pp6KjTufwR8ajvATua/iXXiJxn6akM8SIHX3CfJ5bP8HttacxtAX3OgAAAAASUVORK5CYII=") 3x);
  --kk-ph-title: "Kinder Kalp Preschool";
  --kk-ph-date: "";
}

@media print {
  @page {
    margin: 24mm 10mm 14mm;
    @top-left {
      content: var(--kk-ph-logo); vertical-align: bottom;
      padding-bottom: 2mm; border-bottom: 2px solid #291e63;
    }
    @top-center {
      content: var(--kk-ph-title); white-space: pre; text-align: left;
      font-family: "Baloo 2", "Quicksand", sans-serif; font-size: 11pt; font-weight: 700; color: #291e63;
      vertical-align: bottom; padding-bottom: 3mm; border-bottom: 2px solid #291e63;
    }
    @top-right {
      content: var(--kk-ph-date); white-space: pre; text-align: right;
      font-size: 8.5pt; color: #555;
      vertical-align: bottom; padding-bottom: 3mm; border-bottom: 2px solid #291e63;
    }
    @bottom-right { content: "Page " counter(page) " of " counter(pages); font-size: 8pt; color: #777; }
  }
  .sidebar, .topbar, .filters, .btn, .pager, .toasts, .no-print,
  .att-marks, .help-quick, .help-search { display: none !important; }
  .content { padding: 0; }
  body  { background: #fff; }

  /* Let long sections run on to the next page instead of jumping whole
     to it - a card taller than what is left of a page used to leave the
     page before it almost empty. Only small pieces are kept together. */
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: auto; page-break-inside: auto; }
  .card-head { break-after: avoid; page-break-after: avoid; }
  tr, .tile, .alert, .fee-total, .dl > div, .receipt-head { break-inside: avoid; page-break-inside: avoid; }
  thead { display: table-header-group; }
  /* Side-by-side columns cannot be split across pages: stack them. */
  .cols, .cols-3 { display: block; }
  .cols > * + *, .cols-3 > * + * { margin-top: 14px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .table-wrap, .card-body.flush { overflow: visible !important; }
  table { width: 100%; }

  /* The letterhead is drawn in the page margin (see @page below), so it
     is on every page; the in-page copy would only repeat it on the first. */
  .print-header { display: none !important; }
  .print-header .ph-inner { display: flex; align-items: center; gap: 14px; }
  .print-header img { height: 44px; width: auto; }
  .print-header .ph-name { font-family: var(--font-head); font-weight: 700; font-size: 17px; }
  .print-header .ph-entity:not(:empty) { font-size: 11px; color: #555; margin-top: 1px; }
  .print-header .ph-title { font-size: 12px; color: #444; }
  .print-header .ph-date { margin-left: auto; font-size: 11px; color: #555; text-align: right; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .cols, .cols-3 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* Slid with `left` rather than `transform`: if a browser or an embedded
     webview ignores transforms, the drawer stays hidden instead of
     covering the page. */
  .sidebar {
    position: fixed; z-index: 60; top: 0;
    left: calc(-1 * var(--sidebar-w));
    visibility: hidden;
    transition: left .2s ease, visibility .2s;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { left: 0; visibility: visible; }
  .scrim {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(29, 21, 72, .5);
  }
  .content { padding: 16px 14px 40px; }
  .topbar  { padding: 11px 14px; }
  .field.span-2 { grid-column: span 1; }
  .comp-row { grid-template-columns: 1fr 1fr; }
  .sched-row { grid-template-columns: 24px 1fr; }
  .sched-row input[type=date], .sched-row input[type=number] { grid-column: 2; }
  .comp-row .del { grid-column: 2; justify-self: end; width: 40px; }
}

/* ==========================================================================
   Organisation - legal entities, stakeholders and campuses
   ========================================================================== */

.form-grid > .span-all { grid-column: 1 / -1; }

/* Long campus names must not push the sidebar out of shape. */
.sidebar-brand .brand-text { min-width: 0; }
.sidebar-brand .name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-brand .sub {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Read-only detail pairs */
.kv-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 18px; margin-bottom: 18px;
}
.kv .k { font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.kv .v { font-size: 13.5px; color: var(--ink); white-space: pre-wrap; }

/* "Stakeholders as at <date>" */
.org-asat {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 10px;
  background: var(--brand-light); border-radius: 9px;
}
.org-asat input[type=date] {
  padding: 5px 8px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
}

.org-history-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 22px 0 8px;
}
.org-history { display: flex; flex-direction: column; gap: 8px; }
.org-set {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--line-2);
}
.org-campus-list { margin: 6px 0 0 18px; font-size: 13px; }
.org-campus-list li { margin: 3px 0; }

/* The stakeholder editor */
.stake-box {
  margin-top: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--line-2);
}
.stake-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 9px;
}
.stake-rows { display: flex; flex-direction: column; gap: 7px; margin-bottom: 9px; }
.stake-row {
  display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: center;
}
.stake-row:has(input:nth-of-type(2)) { grid-template-columns: 1.6fr 1fr auto; }
.stake-row:has(input:nth-of-type(3)) { grid-template-columns: 1.6fr 1fr .7fr auto; }
.stake-row input { padding: 7px 9px; font-size: 13px; }

/* Campus logos */
.campus-logo {
  height: 30px; width: auto; max-width: 46px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 2px;
}
.logo-preview { margin-top: 8px; }
.logo-preview img {
  height: 54px; width: auto; max-width: 180px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 5px; display: block; margin-bottom: 6px;
}

/* The campus and entity a receipt was issued by */
.receipt-issuer { margin-left: auto; text-align: right; max-width: 45%; }
.receipt-issuer .b { font-weight: 650; font-size: 13.5px; }

@media (max-width: 860px) {
  .stake-row,
  .stake-row:has(input:nth-of-type(2)),
  .stake-row:has(input:nth-of-type(3)) { grid-template-columns: 1fr auto; }
  .receipt-issuer { max-width: none; text-align: left; margin-left: 0; }
}

/* ==========================================================================
   Choosing and switching campus
   ========================================================================== */

.campus-card {
  width: min(460px, 100%);
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 28px 26px 24px;
  box-shadow: var(--shadow-lg);
}
.campus-h { font-size: 19px; margin: 14px 0 4px; }

.campus-list { display: flex; flex-direction: column; gap: 9px; margin: 16px 0 10px; }

.campus-pick {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); border-radius: 11px;
  font: inherit; color: inherit;
  transition: border-color .12s, background .12s, transform .06s;
}
.campus-pick:hover { border-color: var(--brand); background: var(--brand-light); }
.campus-pick:active { transform: translateY(1px); }
.campus-pick.is-current { border-color: var(--brand); background: var(--brand-light); }
.campus-pick img {
  height: 38px; width: 38px; object-fit: contain; flex: 0 0 auto;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px;
}
.campus-initial {
  height: 38px; width: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--brand-light); color: var(--brand-dark);
  border-radius: 9px; font-weight: 700; font-size: 17px;
}
.campus-name { font-weight: 650; font-size: 14px; }
.campus-go { color: var(--brand); font-size: 17px; flex: 0 0 auto; }

/* The button in the top bar */
.campus-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: auto; padding: 6px 11px;
  background: var(--brand-light); color: var(--brand-dark);
  border: 1px solid #d6d1fa; border-radius: 20px;
  font: inherit; font-size: 12.5px; font-weight: 650;
  cursor: pointer; max-width: 260px;
}
.campus-btn:hover { border-color: var(--brand); }
.campus-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campus-dot {
  height: 7px; width: 7px; border-radius: 50%;
  background: var(--brand); flex: 0 0 auto;
}
.campus-caret { opacity: .6; flex: 0 0 auto; }

/* The financial year, sitting beside the campus. */
.fy-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 8px; padding: 6px 11px;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 20px;
  font: inherit; font-size: 12.5px; font-weight: 650;
  cursor: pointer; flex: 0 0 auto;
}
.fy-btn:hover { border-color: var(--brand); }
.fy-btn.is-only { cursor: default; }
.fy-btn.is-only:hover { border-color: var(--line); }
.fy-tag {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--brand-dark); background: var(--brand-light);
  border-radius: 5px; padding: 1px 5px;
}
.fy-label { white-space: nowrap; }
/* Without a campus chip the year still needs pushing right. */
.topbar .fy-btn:first-of-type { margin-left: auto; }
.topbar .campus-btn ~ .fy-btn { margin-left: 8px; }

/* The topbar already pushes actions right; keep them apart. */
.topbar .campus-btn + .actions { margin-left: 10px; }
.topbar .fy-btn + .actions { margin-left: 10px; }

@media (max-width: 860px) {
  .campus-btn { max-width: 150px; }
  .fy-btn { padding: 6px 8px; }
  .fy-btn .fy-label { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .campus-card { padding: 22px 18px 18px; }
}

@media print {
  .print-header .ph-campus { font-size: 11px; color: #333; font-weight: 600; }
}

/* ==========================================================================
   Temporary passwords handed out by the admin
   ========================================================================== */

.temp-pw {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  background: var(--brand-light); color: var(--brand-dark);
  border: 1px solid #d6d1fa; border-radius: 7px;
  padding: 3px 9px; white-space: nowrap;
}
.issued table { font-size: 13.5px; }

/* ==========================================================================
   Accounting
   ========================================================================== */

/* One line of a hand-made entry */
.jv-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 8px;
}
.jv-rows { display: flex; flex-direction: column; gap: 7px; }
.jv-row {
  display: grid; gap: 7px; align-items: center;
  grid-template-columns: 2.2fr .9fr .9fr 1.4fr auto;
}
.jv-row input, .jv-row select { padding: 7px 9px; font-size: 13px; }
.jv-totals {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px;
  background: var(--line-2); border-radius: 9px;
  font-variant-numeric: tabular-nums; font-size: 13px;
}

/* Statement rows: groups stand out, totals rule off */
.stmt-group td { background: var(--brand-tint); }
.stmt-total td {
  border-top: 2px solid var(--line);
  background: var(--line-2); font-variant-numeric: tabular-nums;
}
tr.is-cancelled td { opacity: .55; text-decoration: line-through; }
tr.is-cancelled td .badge { opacity: 1; text-decoration: none; }

@media (max-width: 860px) {
  .jv-row { grid-template-columns: 1fr 1fr; }
  .jv-row select { grid-column: 1 / -1; }
}

/* ==========================================================================
   Inventory: purchase lines, reference chips, asset photos
   ========================================================================== */

.pur-rows { display: flex; flex-direction: column; gap: 10px; }
.pur-row {
  display: grid; gap: 7px; align-items: center;
  grid-template-columns: 2.4fr .8fr .8fr 1fr auto;
  padding: 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--line-2);
}
.pur-row input, .pur-row select { padding: 7px 9px; font-size: 13px; }
.pur-amt { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
/* The note under a line spans the whole row. */
.pur-note {
  grid-column: 1 / -1; display: flex; align-items: center;
  gap: 6px; flex-wrap: wrap; font-size: 12.5px;
}

/* What a purchase or issue was for */
.ref-picker { display: flex; flex-direction: column; gap: 10px; }
.ref-group-t {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px;
}
.ref-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-chip {
  padding: 5px 11px; border-radius: 20px;
  border: 1px solid var(--line); background: #fff;
  font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink-2);
}
.ref-chip:hover { border-color: var(--brand); }
.ref-chip.is-on {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 650;
}

.asset-thumb {
  height: 34px; width: 46px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line);
  cursor: pointer; background: #fff;
}
.asset-thumb:hover { border-color: var(--brand); }

@media (max-width: 860px) {
  .pur-row { grid-template-columns: 1fr 1fr auto; }
  .pur-row select { grid-column: 1 / -1; }
}

/* ==========================================================================
   Collapsible menu sections and the report index
   ========================================================================== */

.nav-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; cursor: pointer;
  font: inherit; text-align: left;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--nav-muted); padding: 12px 10px 5px; font-weight: 700;
}
.nav-toggle:hover { color: #fff; }
.nav-caret { font-size: 13px; opacity: .7; line-height: 1; }
.nav-toggle .pill {
  background: var(--accent); color: #fff;
  border-radius: 20px; padding: 0 7px;
  font-size: 11px; font-weight: 700; line-height: 17px;
}
.nav-items.is-closed { display: none; }

/* The index of accounting reports */
.report-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.report-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); text-decoration: none; color: inherit;
  transition: border-color .12s, box-shadow .12s;
}
.report-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.report-ico { font-size: 22px; line-height: 1.1; flex: 0 0 auto; }
.report-title { font-weight: 650; font-size: 14px; color: var(--ink); }
.report-blurb { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.report-note {
  font-size: 11.5px; color: var(--ink-3); margin-top: 5px;
  border-top: 1px dashed var(--line); padding-top: 5px;
}
.report-go { color: var(--brand); font-size: 16px; flex: 0 0 auto; }

/* A statement line already written into the books */
tr.is-posted td { background: var(--ok-bg); }
tr.is-posted td:first-child { box-shadow: inset 3px 0 0 var(--ok); }

/* ==========================================================================
   Payroll
   ========================================================================== */

.staff-photo {
  height: 38px; width: 38px; object-fit: cover;
  border-radius: 50%; border: 1px solid var(--line); background: #fff;
}
.staff-photo-lg {
  height: 72px; width: 72px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line); background: #fff;
}
.staff-head { display: flex; gap: 16px; align-items: flex-start; }

/* How a salary splits, shown as it is typed */
.breakup-box {
  display: grid; gap: 8px; margin-top: 12px; padding: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: var(--brand-tint); border: 1px solid #ddd8fa; border-radius: 10px;
}
.breakup-part { font-variant-numeric: tabular-nums; }

.doc-grid {
  display: grid; gap: 10px; margin-top: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.doc-card {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 9px; background: var(--line-2);
}
.doc-label { font-size: 12.5px; font-weight: 650; flex: 1 0 100%; }

/* ==========================================================================
   Payslips
   ========================================================================== */

.payslip-sheet { display: flex; flex-direction: column; gap: 20px; }

.payslip {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 18px; background: #fff;
}
.payslip-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 2px solid var(--brand);
}
.payslip-logo { height: 46px; width: auto; }
.payslip-school { font-family: var(--font-head); font-weight: 700; font-size: 16px; }
.payslip-entity { font-size: 11.5px; color: var(--ink-3); }
.payslip-title { text-align: right; font-weight: 700; letter-spacing: .08em; font-size: 13px; }
.payslip-month { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; }

.payslip-who {
  display: grid; gap: 5px 18px; margin-bottom: 12px; font-size: 12.5px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.payslip-who .k {
  display: inline-block; min-width: 84px; color: var(--ink-3); font-size: 11.5px;
}

.payslip-days {
  display: flex; gap: 18px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 12px; font-size: 12.5px;
  background: var(--brand-tint); border-radius: 8px;
}

.payslip-cols {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
}
.payslip-col-t {
  font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px;
}
.payslip table { font-size: 12.5px; }

.payslip-net {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 14px; padding: 12px 14px;
  background: var(--brand); color: #fff; border-radius: 9px;
}
.payslip-net-l { font-size: 12px; opacity: .85; }
.payslip-net-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.payslip-words { font-size: 12px; font-style: italic; }
.payslip-foot {
  margin-top: 10px; font-size: 11px; color: var(--ink-3); text-align: center;
}

@media (max-width: 860px) {
  .payslip-cols { grid-template-columns: 1fr; }
  .payslip-head { flex-wrap: wrap; }
  .payslip-title { text-align: left; }
}

@media print {
  /* One payslip per page, and no app furniture around it. */
  .payslip { border: 0; padding: 0; page-break-after: always; break-after: page; }
  .payslip:last-child { page-break-after: auto; break-after: auto; }
  .payslip-sheet { gap: 0; }
  .payslip-net { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .payslip-days { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* A fee head priced on one child */
.fee-head-row {
  display: grid; gap: 7px; align-items: center;
  grid-template-columns: 2fr 1fr 1.4fr auto;
  padding: 9px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--line-2);
}
.fee-head-row input, .fee-head-row select { padding: 7px 9px; font-size: 13px; }

@media (max-width: 860px) {
  .fee-head-row { grid-template-columns: 1fr auto; }
  .fee-head-row select { grid-column: 1 / -1; }
}

/* "+ New category" under a picker — small enough not to compete with the
   field, close enough that nobody has to leave the form to add a master. */
.link-add {
  background: none; border: 0; padding: 2px 0; margin-top: -6px;
  font: inherit; font-size: 12px; color: var(--brand);
  cursor: pointer; text-align: left;
}
.link-add:hover { text-decoration: underline; }

/* The Profit & Loss account is a real T-account: expenses on the debit
   side at the left, income on the credit side at the right, a rule down
   the middle, and both sides padded to the same length so it closes
   level. */
.pnl-t table.data th:nth-child(3),
.pnl-t table.data td:nth-child(3) { border-left: 2px solid var(--line); }
.pnl-t table.data td:nth-child(1),
.pnl-t table.data td:nth-child(3) { width: 34%; }
.pnl-t .stmt-group-cell { background: transparent; }

/* Lines of a statement that open the group or ledger behind them. */
a.drill { color: inherit; text-decoration: none; cursor: pointer; }
a.drill:hover { color: var(--brand); text-decoration: underline; }
.crumbs { margin-bottom: 4px; }
@media print { a.drill { color: inherit !important; text-decoration: none !important; } .crumbs { display: none; } }

/* The rate card of an hourly fee structure: one row per age group. */
.rate-row {
  display: grid;
  grid-template-columns: 1.6fr .8fr .8fr .9fr .9fr .9fr 32px;
  gap: 8px; align-items: start; margin-bottom: 8px;
}
.rate-row.rate-head {
  font-size: 11.5px; font-weight: 700; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
}
.rate-row input { width: 100%; }
@media (max-width: 700px) {
  .rate-row { grid-template-columns: 1fr 1fr 1fr; }
  .rate-row.rate-head { display: none; }
}
fieldset.bare { border: 0; padding: 0; margin: 0; min-width: 0; }

.err-text { color: var(--err); }
/* The one of two alternative fields not in use. */
.field.is-off, input.is-off { opacity: .45; }
.agreed-line { display: grid; grid-template-columns: 170px 1fr 40px; gap: 8px; margin-bottom: 6px; }

/* ==========================================================================
   Sorting tables
   ========================================================================== */

table.data th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .sort-ind { margin-left: 5px; font-size: 10px; opacity: .35; }
table.data th.is-sorted { color: var(--brand); }
table.data th.is-sorted .sort-ind { opacity: 1; }
@media print {
  table.data th .sort-ind { display: none; }
}

/* ==========================================================================
   Reports menu: families of reports, each opening its own short list
   ========================================================================== */

.report-menu { display: flex; flex-wrap: wrap; gap: 8px; }
.report-group-wrap { position: relative; }
.report-group .caret { font-size: 11px; opacity: .8; }
.report-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg, 0 10px 30px rgba(20, 16, 60, .15)); padding: 6px;
  display: flex; flex-direction: column;
}
.report-item {
  text-align: left; border: 0; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 7px; font: inherit; font-size: 14px; color: var(--ink);
}
.report-item span { color: var(--ink-3); }
.report-item:hover { background: var(--brand-light, #efedff); }
.report-item.is-current { background: var(--brand-light, #efedff); color: var(--brand); }

/* The day-by-day attendance register: many narrow columns. */
.report-dense table.data th, .report-dense table.data td { padding: 5px 4px; font-size: 11.5px; }
.report-dense table.data td.mark { text-align: center; font-weight: 700; }
.report-dense td.mark-A { color: var(--err); background: var(--err-bg); }
.report-dense td.mark-H { color: #9a6b00; background: #fff6dc; }
.report-dense td.mark-P { color: var(--ok); }
.report-list { max-height: 70vh; overflow-y: auto; }
@media print { .report-dense table.data th, .report-dense table.data td { padding: 2px 2px; font-size: 8.5px; } }

/* A bank line's own note, typed by the school and posted with it. */
textarea.bank-note {
  display: block; width: 100%; min-width: 180px; margin-top: 6px;
  min-height: 34px; height: 34px;
  font: inherit; font-size: 12.5px; padding: 5px 8px; resize: vertical;
  border: 1px dashed var(--line); border-radius: 8px; background: var(--brand-tint);
}
textarea.bank-note:focus { border-style: solid; border-color: var(--brand); background: var(--surface); outline: none; }
.bank-note-text { margin-top: 4px; font-style: italic; color: var(--ink-2); }
