/* ============================================================
   WASAMU — Studio admin dashboard
   Reuses the design tokens from styles.css (--paper, --ink,
   --navy, --accent, .btn, .chip, .field, .panel, .form-status).
   ============================================================ */

.admin { background: var(--paper-band); }

/* The [hidden] attribute must always win over layout rules below
   (e.g. .login-wrap sets display:flex, which would otherwise keep
   the login screen visible after sign-in). */
[hidden] { display: none !important; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; }

/* not-configured banner */
.cfg-warn {
  background: #fff5e6; border-bottom: 1px solid #eccf9a;
  color: #7a5a12; font-size: 13.5px; padding: 10px var(--gutter);
  text-align: center;
}
.cfg-warn code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; }

/* ---------- login ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px; padding: 36px 34px 34px;
  display: grid; gap: 16px;
}
.login-card .brand-logo { width: 132px; margin-bottom: 4px; }
.login-card .eyebrow { margin: 0; }
.login-card h1 { font-family: var(--display); font-size: 30px; margin: 0 0 6px; }
.login-card .form-status.is-error { margin: 0; }

/* ---------- shell ---------- */
.admin-shell { min-height: 100vh; }
.admin-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.admin-head-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter);
  height: 60px; display: flex; align-items: center; gap: 24px;
}
.admin-head .brand-logo { width: 116px; }
.admin-tabs { display: flex; gap: 4px; margin-left: 8px; }
.tab {
  font-family: var(--sans); font-size: 13.5px; color: var(--ink-soft);
  background: none; border: 0; border-radius: 100px; padding: 7px 15px;
  cursor: pointer; letter-spacing: 0.01em; transition: background .18s ease, color .18s ease;
}
.tab:hover { background: rgba(0,0,0,.05); }
.tab.is-active { background: var(--navy); color: #fff; }
.tab .count {
  display: none; background: var(--accent); color: #fff; font-size: 11px;
  border-radius: 100px; padding: 1px 7px; margin-left: 4px;
}
.tab .count.show { display: inline-block; }
.tab.is-active .count { background: rgba(255,255,255,.28); }
.admin-head-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.admin-head-right .who { font-size: 12.5px; color: var(--muted); }
.admin-head-right .btn { padding: 8px 14px; }

.admin-main { max-width: 1240px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) var(--gutter) 80px; }

.view-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.view-head h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 18px; max-width: 62ch; }

/* ---------- inbox ---------- */
.inbox-controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#status-filter { gap: 6px; }
#status-filter .chip { padding: 6px 13px; font-size: 12.5px; }
#search {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 16px; min-width: 210px;
}
#search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.60 0.105 262 / 0.14); }

.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.btable { width: 100%; border-collapse: collapse; font-size: 14px; }
.btable thead th {
  text-align: left; font-family: var(--sans); text-transform: uppercase;
  letter-spacing: 0.11em; font-size: 10.5px; font-weight: 600; color: var(--muted);
  padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.btable tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); vertical-align: middle; }
.btable tbody tr { cursor: pointer; transition: background .12s ease; }
.btable tbody tr:hover { background: var(--paper); }
.btable tbody tr:last-child td { border-bottom: 0; }
.btable .b-name { color: var(--ink); font-weight: 500; }
.btable tr.is-new .b-name::after {
  content: 'NEW'; font-size: 9px; font-weight: 700; letter-spacing: .08em;
  color: #fff; background: var(--accent); border-radius: 3px; padding: 1px 5px; margin-left: 8px;
  vertical-align: middle;
}
.empty { padding: 40px; text-align: center; color: var(--muted); font-size: 14px; }

/* status pill */
.pill {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 100px; border: 1px solid transparent;
}
.pill-pending   { background: #fdf1dc; color: #8a5a11; border-color: #efd39a; }
.pill-confirmed { background: #e2eafb; color: #2f4ba0; border-color: #c3d2f4; }
.pill-completed { background: #e3f1e6; color: #2f6b3d; border-color: #bfe0c7; }
.pill-cancelled { background: #f1eeea; color: #8d877a; border-color: var(--line); }

/* ---------- booking detail drawer ---------- */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklab, var(--navy) 55%, transparent);
  backdrop-filter: blur(3px);
  display: flex; justify-content: flex-end;
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease;
}
.drawer-scrim.open { opacity: 1; visibility: visible; }
.drawer-panel {
  width: 100%; max-width: 460px; height: 100%; overflow-y: auto; border-radius: 0;
  padding: 30px 32px 40px; position: relative;
  transform: translateX(20px); transition: transform .22s ease;
}
.drawer-scrim.open .drawer-panel { transform: none; }
.drawer-panel h3 { font-family: var(--display); font-size: 26px; margin: 4px 0 2px; }
.drawer-panel .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; }
.dl { display: grid; grid-template-columns: 96px 1fr; gap: 6px 14px; font-size: 14px; margin-bottom: 22px; }
.dl dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; padding-top: 2px; }
.dl dd { margin: 0; color: var(--ink-soft); }
.dl dd a { color: var(--accent); text-decoration: none; }
.drawer-panel .field { margin-bottom: 14px; }
.drawer-panel .field label { font-size: 11px; }
.drawer-panel .sec-label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin: 4px 0 8px; }
.status-set { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.status-set .chip { padding: 7px 13px; font-size: 12.5px; }
.drawer-save-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.drawer-save-row .saved { font-size: 12.5px; color: #2f6b3d; opacity: 0; transition: opacity .2s ease; }
.drawer-save-row .saved.show { opacity: 1; }

/* ---------- calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 14px; }
.cal-nav #cal-label { font-family: var(--display); font-size: 18px; min-width: 168px; text-align: center; }
.cal-nav .btn { padding: 6px 14px; }
.calendar {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px;
}
.cal-dow { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; padding: 4px 0; }
.cal-cell {
  aspect-ratio: 1 / 0.92; border: 1px solid var(--line-soft); border-radius: 5px;
  padding: 7px 8px; background: var(--paper); cursor: pointer; position: relative;
  display: flex; flex-direction: column; transition: border-color .15s ease, background .15s ease;
}
.cal-cell:hover { border-color: var(--accent); }
.cal-cell.empty { background: transparent; border: 0; cursor: default; }
.cal-cell.past { opacity: .4; cursor: not-allowed; }
.cal-cell .dnum { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.cal-cell.today .dnum { color: var(--accent); font-weight: 700; }
.cal-cell.blocked { background: repeating-linear-gradient(45deg, #f2ede6, #f2ede6 6px, #eae3d8 6px, #eae3d8 12px); border-color: #d9cfbe; }
.cal-cell .dots { margin-top: auto; display: flex; gap: 3px; flex-wrap: wrap; }
.cal-cell .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cal-cell .blk-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .08em; color: #a08a5f; margin-top: auto; font-weight: 700; }
.cal-legend { display: flex; gap: 22px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.cal-legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; }
.cal-legend .sw-confirmed { background: var(--accent); border-radius: 50%; }
.cal-legend .sw-blocked { background: repeating-linear-gradient(45deg, #f2ede6, #f2ede6 3px, #eae3d8 3px, #eae3d8 6px); border: 1px solid #d9cfbe; }
.cal-cell.selected { border-color: var(--navy); box-shadow: 0 0 0 2px color-mix(in oklab, var(--navy) 40%, transparent); }
.cal-cell .blk-mini { font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: #a08a5f; margin-top: auto; font-weight: 600; }

/* calendar + day panel side by side */
.cal-grid-wrap { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 900px) { .cal-grid-wrap.has-panel, .cal-grid-wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- calendar day panel ---------- */
.cal-daypanel {
  margin-top: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 18px 20px 20px;
}
.dp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dp-head .dp-dow { display: block; font-family: var(--display); font-size: 19px; color: var(--ink); }
.dp-head .dp-date { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.dp-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 2px; }
.dp-x:hover { color: var(--ink); }
.dp-block-day {
  margin: 14px 0 4px; font-family: var(--sans); font-size: 12.5px; letter-spacing: .01em;
  padding: 8px 15px; border-radius: 100px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-soft); cursor: pointer; transition: all .18s ease;
}
.dp-block-day:hover { border-color: var(--accent); color: var(--ink); }
.dp-block-day.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }
.dp-note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.dp-hint { font-size: 11.5px; color: var(--muted); margin: 12px 0 0; }
.dp-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-top: 14px; }
.dp-slot {
  text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  padding: 9px 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease;
  display: flex; flex-direction: column; gap: 2px;
}
.dp-slot .t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dp-slot .s { font-size: 10.5px; color: var(--muted); letter-spacing: .01em; }
.dp-slot:hover:not(:disabled) { border-color: var(--accent); }
.dp-slot.blocked { background: repeating-linear-gradient(45deg, #f2ede6, #f2ede6 5px, #eae3d8 5px, #eae3d8 10px); border-color: #d9cfbe; }
.dp-slot.blocked .t { color: #8d7a55; }
.dp-slot.booked { background: color-mix(in oklab, var(--accent) 10%, #fff); border-color: color-mix(in oklab, var(--accent) 35%, var(--line)); cursor: default; }
.dp-slot.booked .t { color: var(--accent-ink, var(--ink)); }
.dp-slot:disabled { opacity: .95; }

/* ---------- availability editor ---------- */
.avail-editor { max-width: 640px; }
.avail-week {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.avail-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 18px; border-bottom: 1px solid var(--line-soft);
}
.avail-row:last-child { border-bottom: 0; }
.avail-day { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--ink); min-width: 90px; cursor: pointer; }
.avail-day input { width: 16px; height: 16px; accent-color: var(--navy); }
.avail-times { display: flex; align-items: center; gap: 8px; transition: opacity .18s ease; }
.avail-times.off { opacity: .32; pointer-events: none; }
.avail-times input[type="time"] {
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
.avail-times input[type="time"]:focus { outline: none; border-color: var(--accent); }
.avail-to { font-size: 12px; color: var(--muted); }
.avail-opts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; }
.avail-opts label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.avail-opts select {
  font-family: var(--sans); font-size: 14px; color: var(--ink); letter-spacing: 0; text-transform: none; font-weight: 400;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; min-width: 150px;
}
.avail-opts select:focus { outline: none; border-color: var(--accent); }
.avail-status { margin-top: 18px; font-size: 13px; min-height: 1.2em; }
.avail-status.ok { color: #2f7d4f; }
.avail-status.err { color: #b4453a; }

/* ---------- packages ---------- */
.pkg-list { display: grid; gap: 12px; }
.pkg-card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 18px 20px; display: flex; align-items: center; gap: 18px;
}
.pkg-card .pk-main { flex: 1; }
.pkg-card .pk-name { font-family: var(--display); font-size: 19px; }
.pkg-card .pk-name.off { color: var(--muted); }
.pkg-card .pk-desc { font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 60ch; }
.pkg-card .pk-price { font-size: 15px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.pkg-card .pk-dur { font-size: 12px; color: var(--muted); }
.pkg-card .pk-off { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border: 1px solid var(--line); border-radius: 100px; padding: 2px 9px; }

.switch { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; }
.switch input { width: auto; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .admin-head-inner { gap: 12px; height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .admin-tabs { order: 3; width: 100%; margin-left: 0; }
  .admin-head-right { margin-left: auto; }
  .btable thead { display: none; }
  .btable, .btable tbody, .btable tr, .btable td { display: block; width: 100%; }
  .btable tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .btable td { border: 0; padding: 4px 18px; }
  .drawer-panel { max-width: 100%; }
  .dl { grid-template-columns: 88px 1fr; }
}

/* ============================================================
   STUDIO PLATFORM — overview, reports, clients, users, finance
   ============================================================ */
.muted-note { color: var(--muted); font-size: 13px; }
.btn-sm { padding: 6px 12px !important; font-size: 12px !important; }
.acct { display: flex; align-items: center; gap: 8px; }
.role-badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px; background: var(--paper-band); color: var(--ink-soft); border: 1px solid var(--line);
}
/* status pills (base + colours already defined above) */
.pill-pending, .pill-confirmed, .pill-completed, .pill-cancelled {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 100px; border: 1px solid transparent; text-transform: capitalize;
}

/* ---- KPI cards ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.kpi-val { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -.01em; color: var(--ink); }
.kpi-label { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.kpi-sub { color: var(--ink-soft); }

/* ---- overview columns ---- */
.ov-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .ov-cols { grid-template-columns: 1fr; } }
.ov-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.ov-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ov-card-head h3 { font-family: var(--display); font-size: 1.05rem; margin: 0; }
.ov-list { display: grid; gap: 2px; }
.ov-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); text-decoration: none; cursor: pointer; }
.ov-item:last-child { border-bottom: 0; }
.ov-item span { display: flex; flex-direction: column; font-size: 13.5px; color: var(--ink); }
.ov-item span em { font-style: normal; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.ov-item b { font-size: 12px; color: var(--ink-soft); font-weight: 600; white-space: nowrap; }
.ov-spark, .spark { width: 100%; height: 120px; display: block; }

/* ---- charts (bar list / donut) ---- */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.rep-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.rep-controls { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.rep-controls label { display: flex; flex-direction: column; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); gap: 4px; }
.rep-controls input { font-family: var(--sans); font-size: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; }
.rep-export { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 18px; flex-wrap: wrap; }
.rep-export .btn { padding: 6px 13px; font-size: 12.5px; cursor: pointer; }

.barlist { display: grid; gap: 9px; }
.barrow { display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.barlabel { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bartrack { height: 10px; background: var(--paper-band); border-radius: 100px; overflow: hidden; }
.barfill { display: block; height: 100%; border-radius: 100px; }
.barval { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-legend { display: grid; gap: 6px; font-size: 12.5px; color: var(--ink-soft); }
.donut-legend .lg { display: flex; align-items: center; gap: 8px; }
.donut-legend .lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ---- client drawer extras ---- */
.kpi-row { display: flex; gap: 12px; margin: 12px 0 18px; }
.mini-kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; flex: 1; }
.mini-kpi b { font-family: var(--display); font-size: 1.3rem; display: block; }
.mini-kpi span { font-size: 11.5px; color: var(--muted); }
.dlink { color: var(--accent); text-decoration: none; }

/* client booking history — compact stacked cards (fit the narrow drawer) */
.cbk-list { display: grid; gap: 10px; }
.cbk { border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.cbk:hover { border-color: var(--accent); background: var(--paper); }
.cbk-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cbk-for { font-weight: 600; color: var(--ink); font-size: 14px; }
.cbk-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cbk-ex { font-size: 12px; color: var(--accent); margin-top: 6px; }
.cbk-fin { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 9px; font-size: 12.5px; color: var(--ink-soft); }
.cbk-fin b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* referral — client profile card + settings + availability times */
.ref-card { border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; margin: 4px 0 18px; background: var(--paper); }
.ref-code { display: flex; align-items: baseline; gap: 10px; }
.ref-code .ref-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ref-code b { font-family: 'Courier New', monospace; font-size: 16px; letter-spacing: .06em; color: var(--accent); }
.ref-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 12.5px; color: var(--ink-soft); }
.ref-stats b { color: var(--ink); }
.ref-settings { max-width: 520px; }
.ref-fields { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.ref-fields label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ref-fields input { font-family: var(--sans); font-size: 14px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 160px; }
.avail-times-field { display: block; margin-top: 20px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.avail-times-field input { display: block; margin-top: 7px; font-family: var(--sans); font-size: 14px; letter-spacing: 0; text-transform: none; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; width: 100%; max-width: 440px; }

/* ---- booking finance (order + extras + payments) ---- */
.d-finance { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.finance { display: grid; gap: 7px; margin-bottom: 14px; }
.finance .li, .pay-list .li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-soft); }
.finance .li.tot { border-top: 1px solid var(--line-soft); padding-top: 8px; margin-top: 3px; font-weight: 600; color: var(--ink); }
.finance .li.bal { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.add-extra { display: flex; gap: 8px; margin: 6px 0; }
.add-extra select { flex: 1; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; }
.pay-list { display: grid; gap: 6px; margin: 6px 0 12px; }
.pay-add { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay-add #pay-amt, .pay-add #pay-ref { grid-column: auto; }
.pay-add #pay-add-btn { grid-column: 1 / -1; }
.pay-add input, .pay-add select { font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
.li .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.li .x:hover { color: #b4453a; }
.credit-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; padding: 10px 12px; border: 1px dashed color-mix(in oklab, var(--accent) 45%, var(--line)); border-radius: 8px; background: color-mix(in oklab, var(--accent) 8%, #fff); font-size: 13px; color: var(--ink-soft); }
.credit-note b { color: var(--ink); }

/* fit the header on narrow screens */
@media (max-width: 760px) {
  .admin-head-inner { flex-wrap: wrap; }
  .admin-tabs { order: 3; width: 100%; overflow-x: auto; }
  .ov-cols { grid-template-columns: 1fr; }
  .barrow { grid-template-columns: 90px 1fr auto; }
}
