/* Kumba styles: navy sidebar, white cards, one teal brand colour; colour elsewhere only when it means something.
   Change the colours below to restyle the whole app. */
:root {
  /* Neutrals */
  --page: #f4f6f9;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f6;

  /* Brand: deep teal-green. One colour for actions; colour elsewhere only when it means something. */
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #e6f4f2;
  --brand-ink: #ffffff;

  /* Portal accent (changed per portal below) */
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);

  /* Sidebar */
  --nav-bg: #0f1b2d;
  --nav-ink: #c3cedd;
  --nav-faint: #6b7d96;
  --nav-hover: rgba(255, 255, 255, .06);
  --nav-on: rgba(255, 255, 255, .1);

  /* Meaning */
  --red: #b42318;   --red-soft: #fef3f2;   --red-line: #fecdca;
  --amber: #b54708; --amber-soft: #fffaeb; --amber-line: #fedf89;
  --blue: #175cd3;  --blue-soft: #eff8ff;
  --green: #067647; --green-soft: #ecfdf3; --green-line: #abefc6;
  --violet: #4338ca;

  /* Charts */
  --chart-1: #0f766e;
  --chart-2: #3e5c87;
  --chart-3: #94a3b8;
  --chart-track: #e2e8f0;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
body.portal-caretaker { --accent: #b54708; --accent-soft: #fff4e5; }
body.portal-platform { --accent: #4338ca; --accent-soft: #eef0ff; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.3rem; font-weight: 650; margin: 0 0 2px; letter-spacing: -.01em; }
h2 { font-size: 1rem; font-weight: 600; margin: 22px 0 10px; }
h3 { font-size: .95rem; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.ic { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- App shell: sidebar + top bar ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  display: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  width: 236px; flex-shrink: 0; background: var(--nav-bg); color: var(--nav-ink);
  padding: 18px 12px;
}
.side .logo { margin: 0 8px 8px; color: #fff; }
.side .portal { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 18px; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.08); }
.side .portal i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
body.portal-owner .side .portal i { background: #2dd4bf; }
body.portal-caretaker .side .portal i { background: #fbbf24; }
body.portal-platform .side .portal i { background: #a5b4fc; }
.side .label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--nav-faint); margin: 18px 10px 6px; }
.side nav a, .side nav button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 8px; border-radius: 8px; font: inherit; font-size: .9rem;
  color: var(--nav-ink); background: none; border: 0; cursor: pointer; text-align: left; position: relative;
}
.side nav a .ic, .side nav button .ic { width: 18px; height: 18px; opacity: .85; }
.side nav a:hover, .side nav button:hover { background: var(--nav-hover); color: #fff; text-decoration: none; }
.side nav a.on { background: var(--nav-on); color: #fff; font-weight: 600; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
body.portal-owner .side nav a.on::before { background: #2dd4bf; }
body.portal-caretaker .side nav a.on::before { background: #fbbf24; }
body.portal-platform .side nav a.on::before { background: #a5b4fc; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.topbar .logo { display: flex; }
.topsearch {
  display: none; align-items: center; gap: 8px; background: var(--page); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; font-size: .88rem; color: var(--faint);
}
.topsearch input { border: 0; outline: 0; background: transparent; min-height: 0; padding: 0; width: 200px; font-size: .88rem; }
.topright { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.round-btn { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.round-btn .ic { width: 17px; height: 17px; }
.round-btn .count { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.me:hover { text-decoration: none; }
.me .who { text-align: right; line-height: 1.2; display: none; }
.me .who b { display: block; font-size: .8rem; }
.me .who span { font-size: .7rem; color: var(--muted); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.content { flex: 1; min-width: 0; padding: 0 16px 96px; max-width: 1180px; width: 100%; }
.banner { margin: -6px 16px 16px; padding: 10px 14px; border-radius: 12px; font-size: .88rem; }
.banner.info { background: var(--blue-soft); color: var(--blue); border: 1px solid #b2ddff; }
.banner.warn { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); }

.logo { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 750; font-size: 1.1rem; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo img { width: 32px; height: 32px; border-radius: 8px; }

/* Public pages (landing, login, tenant link) */
.pubtop { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 760px; margin: 0 auto; }
.pub { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* Bottom bar on phones */
nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--card); border-top: 1px solid var(--line-soft);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
nav.bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; color: var(--faint); padding: 4px 0; }
nav.bottom a .ic { width: 22px; height: 22px; }
nav.bottom a.on { color: var(--ink); font-weight: 600; }
nav.bottom a.on .ic { color: var(--accent); }
nav.bottom a:hover { text-decoration: none; }
nav.bottom a.pay .dot { background: var(--brand); color: #fff; border-radius: 12px; width: 42px; height: 42px; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 14px rgba(15, 118, 110, .3); }
nav.bottom a.pay .dot .ic { color: #fff; }

@media (min-width: 640px) {
  .me .who { display: block; }
  .topsearch { display: flex; }
}
@media (min-width: 960px) {
  .side { display: block; }
  .topbar .logo { display: none; }
  nav.bottom { display: none; }
  .content { padding-bottom: 40px; }
}

/* ---------- Page header ---------- */
.page { padding-top: 4px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.head p { margin: 0; }
.crumb { font-size: .85rem; margin-bottom: 4px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card > h2:first-child, .card-title { margin: 0 0 12px; font-size: 1rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-title a { font-size: .8rem; color: var(--faint); font-weight: 500; }

/* Stat tiles: white, with a tinted icon chip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 14px; }
.stats > a { display: flex; color: inherit; }
.stats > a:hover { text-decoration: none; }
.stats > a:hover .stat { border-color: #cbd5e1; }
.stats > a .stat { flex: 1; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink); }
.stat .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat .chip { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.stat .chip .ic { width: 18px; height: 18px; }
.stat .chip.red { background: var(--red-soft); color: var(--red); }
.stat .chip.green { background: var(--green-soft); color: var(--green); }
.stat .chip.blue { background: #eef2f8; color: #3e5c87; }
.stat .tag { background: var(--page); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .7rem; font-weight: 500; white-space: nowrap; }
.stat .top > .ic { display: none; }
.stat .value { font-size: 1.5rem; font-weight: 700; margin: 12px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .value.red { color: var(--red); }
.stat .label { font-size: .82rem; font-weight: 500; color: var(--muted); }
.stat .sub { font-size: .75rem; color: var(--muted); }

/* Two-column dashboard on large screens */
.grid { display: flex; flex-direction: column; gap: 14px; }
.grid > * { min-width: 0; }
.grid .card { margin-bottom: 0; }
@media (min-width: 1100px) {
  .grid.split { flex-direction: row; align-items: flex-start; }
  .grid.split > .mainc { flex: 1; }
  .grid.split > .sidec { width: 340px; flex-shrink: 0; }
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.pair { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 760px) { .pair { flex-direction: row; } .pair > .card:first-child { width: 36%; } .pair > .card:last-child { flex: 1; } }

/* Lists inside cards */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.card .list, .list.flat { box-shadow: none; border: 0; border-radius: 0; margin: 0 -18px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); color: var(--ink); }
.row:first-child { border-top: 0; }
a.row:hover { background: #f8fafc; text-decoration: none; }
.row .main { min-width: 0; }
.row .main.av { display: flex; align-items: center; gap: 12px; }
.row .main.av > div { min-width: 0; }
.row .name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { font-size: .8rem; color: var(--muted); }
.row .end { text-align: right; flex-shrink: 0; }
.row .avatar { width: 34px; height: 34px; font-size: .7rem; }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.amt.red { color: var(--red); }
.amt.green { color: var(--green); }
.empty { margin: 4px 0; border: 1px dashed var(--line); border-radius: 12px; padding: 20px 14px; text-align: center; color: var(--muted); font-size: .9rem; }
.list > .empty { margin: 12px 16px; }

.pill { display: inline-block; font-size: .72rem; font-weight: 500; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.pill.overdue, .pill.void, .pill.suspended { background: var(--red-soft); color: var(--red); }
.pill.due, .pill.pending, .pill.past_due { background: var(--amber-soft); color: var(--amber); }
.pill.soon, .pill.trial { background: var(--blue-soft); color: var(--blue); }
.pill.paid, .pill.confirmed, .pill.active { background: var(--green-soft); color: var(--green); }
.pill.ended { background: #f1f5f9; color: #334155; }
.pill { border: 1px solid transparent; }
.pill.overdue, .pill.void, .pill.suspended { border-color: var(--red-line); }
.pill.paid, .pill.confirmed, .pill.active { border-color: var(--green-line); }
.pill.due, .pill.pending, .pill.past_due { border-color: var(--amber-line); }

/* Tables (same look as the school platform) */
.tblwrap { overflow-x: auto; margin: 0 -18px; }
table, .tbl { width: 100%; border-collapse: collapse; font-size: .875rem; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: .6rem .75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: .6rem .75rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
th { background: #f8fafc; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tblwrap th:first-child, .tblwrap td:first-child { padding-left: 16px; }
.tblwrap th:last-child, .tblwrap td:last-child { padding-right: 16px; }

/* Charts */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: inherit; }
.legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ring-keys { display: flex; justify-content: center; gap: 36px; text-align: center; }
.ring-keys i { display: block; width: 14px; height: 14px; border-radius: 50%; margin: 0 auto 4px; }
.ring-keys b { display: block; }
.ring-keys span { font-size: .75rem; color: var(--faint); }

/* ---------- Forms ---------- */
label { display: block; font-weight: 500; font-size: .8rem; color: #4b5563; margin: 14px 0 5px; }
label .hint { font-weight: 400; color: var(--faint); }
input, select, textarea {
  width: 100%; font: inherit; font-size: .92rem; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; min-height: 42px;
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 118, 110, .15); }
textarea { min-height: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: .88rem; color: var(--ink); }
.check input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--brand); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; margin: 14px 0 0; }
legend { font-weight: 500; font-size: .8rem; color: #4b5563; padding: 0 6px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: .9rem; color: var(--ink); cursor: pointer; background: var(--card); }
.choice input { width: 16px; min-height: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .88rem; font-weight: 500; border: 1px solid transparent; border-radius: 8px;
  padding: 8px 16px; min-height: 40px; cursor: pointer; background: var(--brand); color: var(--brand-ink);
  white-space: nowrap;
}
.btn .ic { width: 16px; height: 16px; }
.btn:hover { text-decoration: none; background: var(--brand-dark); }
.btn.block { width: 100%; margin-top: 18px; }
.btn.ghost { background: var(--card); color: #334155; border-color: var(--line); }
.btn.ghost:hover { background: #f8fafc; }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.btn.danger:hover { background: #fee2e2; }
.btn.wa { background: #128c4a; color: #fff; }
.btn.wa:hover { background: #0e743d; }
.btn.sm { min-height: 32px; padding: 4px 12px; font-size: .78rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
form.inline { display: inline; }

.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: .9rem; border: 1px solid; }
.flash.ok { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.flash.err { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.flash.warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }

.balance { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; }
.copy { display: flex; gap: 8px; }
.copy input { font-size: .8rem; }
details summary { cursor: pointer; font-weight: 500; font-size: .9rem; color: var(--brand); padding: 4px 0; }
details[open] summary { margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; background: var(--card); border: 1px solid var(--line); padding: 4px; border-radius: 10px; width: fit-content; max-width: 100%; }
.tabs a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.tabs a.on { background: var(--ink); color: #fff; font-weight: 500; }
.tabs a:hover { text-decoration: none; background: #f9fafb; }
.tabs a.on:hover { background: var(--ink); }
.search { display: flex; gap: 8px; margin-bottom: 14px; }

/* Auth and landing */
.auth { max-width: 420px; margin: 24px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,23,42,.06); padding: 28px; }
.hero { padding: 28px 0 10px; }
.hero h1 { font-size: 1.9rem; line-height: 1.15; }
.features { display: grid; gap: 14px; margin: 20px 0; }
.features .card { margin: 0; }
.features .card h3::before { content: ""; display: block; width: 28px; height: 3px; border-radius: 3px; background: var(--brand); margin-bottom: 12px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }

/* Receipt */
.receipt { max-width: 460px; margin: 0 auto; }
.receipt .big { font-size: 2.1rem; font-weight: 700; margin: 6px 0; }
.receipt hr { border: 0; border-top: 1px dashed var(--line); margin: 14px 0; }
@media print {
  @page { size: A4; margin: 10mm; }
  .side, .topbar, nav.bottom, .noprint, .flash, .banner { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
@media (min-width: 960px) {
  /* keep the navy sidebar colour running the full height of long pages */
  .shell { background: linear-gradient(to right, var(--nav-bg) 236px, var(--page) 236px); }
}

/* =====================================================================
   App design layer: the look from the mobile app designs.
   Gradient header ("hero"), quick actions, profile card, big amount,
   floating bottom bar. Works on phones and large screens.
   ===================================================================== */
.hero {
  position: relative; color: #fff; border-radius: 20px; padding: 22px 24px 26px; margin-bottom: 16px; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, #14b8a6 0%, rgba(20,184,166,0) 55%), linear-gradient(160deg, #0f1b2d 0%, #0f3f45 60%, #0f766e 100%);
}
.hero.caretaker { background: radial-gradient(120% 120% at 100% 0%, #f59e0b 0%, rgba(245,158,11,0) 55%), linear-gradient(160deg, #0f1b2d 0%, #4a2a12 60%, #b54708 100%); }
.hero.platform { background: radial-gradient(120% 120% at 100% 0%, #818cf8 0%, rgba(129,140,248,0) 55%), linear-gradient(160deg, #0f1b2d 0%, #262a6e 60%, #4338ca 100%); }
.hero.tenant { background: radial-gradient(120% 120% at 100% 0%, #5eead4 0%, rgba(94,234,212,0) 55%), linear-gradient(160deg, #0f3f45 0%, #0f766e 100%); }
.hero a { color: #fff; }
.hero .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero .hello { font-size: .82rem; opacity: .75; }
.hero .who-name { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.hero .badge { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 600; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; margin-top: 6px; }
.hero .badge i { width: 6px; height: 6px; border-radius: 50%; background: #5eead4; }
.hero.caretaker .badge i { background: #fbbf24; } .hero.platform .badge i { background: #a5b4fc; }
.hero .h-actions { display: flex; gap: 10px; align-items: center; }
.hero .h-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; position: relative; border: 0; }
.hero .h-btn:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.hero .h-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #f97066; }
.hero .h-av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); color: #fff; }
.hero .big { margin-top: 20px; }
.hero .big .lbl { font-size: .82rem; opacity: .75; }
.hero .big .num { font-size: 2.3rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.hero .chipline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hero .hchip { display: inline-flex; gap: 5px; align-items: center; font-size: .75rem; font-weight: 600; background: rgba(255,255,255,.14); padding: 3px 10px; border-radius: 999px; }
.hero .hchip .ic { width: 14px; height: 14px; }
.hero .h-cta { position: absolute; right: 24px; bottom: 24px; }
.hero .h-cta .btn { background: #fff; color: #0f172a; }
.hero .h-cta .btn:hover { background: #f1f5f9; }
.hero .h-only-phone { display: none; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.quick a { font-size: .75rem; font-weight: 600; color: #334155; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; border-radius: 12px; }
.quick a:hover { text-decoration: none; background: #f8fafc; }
.quick b { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; }
.quick b .ic { width: 22px; height: 22px; }
.q1 { background: #e6f4f2; color: #0f766e; } .q2 { background: #ecfdf3; color: #067647; } .q3 { background: #eef2f8; color: #3e5c87; }
.q4 { background: #fef3f2; color: #b42318; } .q5 { background: #fff4e5; color: #b54708; } .q6 { background: #eef0ff; color: #4338ca; }
.card.quick-card { padding: 14px 10px; }

/* Profile card (tenant page) */
.profile { text-align: center; padding-top: 24px; }
.profile .big-av { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 1.5rem; font-weight: 750; background: linear-gradient(135deg, #e6f4f2, #c7ebe6); color: #0f766e; }
.profile .pname { font-size: 1.3rem; font-weight: 750; margin-top: 10px; }
.profile .pills { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pstats { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: repeat(3, 1fr); }
.pstats > div + div { border-left: 1px solid var(--line-soft); }
.pstats .l { font-size: .72rem; color: var(--muted); }
.pstats .v { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.actbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.actbar .btn { min-height: 48px; border-radius: 14px; }

/* Statement timeline */
.tl-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.tl-ic .ic { width: 16px; height: 16px; }
.tl-ic.charge { background: var(--red-soft); color: var(--red); }
.tl-ic.paid { background: var(--green-soft); color: var(--green); }
.tl-ic.wait { background: var(--amber-soft); color: var(--amber); }
.tl-ic.void { background: #f1f5f9; color: var(--faint); }

/* Big amount entry (record payment) */
.amount-box { text-align: center; padding: 8px 0 4px; }
.amount-box .lbl { font-size: .82rem; color: var(--muted); }
.amount-input { display: flex; align-items: center; justify-content: center; gap: 2px; }
.amount-input span { font-size: 2.6rem; font-weight: 750; color: var(--ink); }
.amount-input input {
  border: 0; box-shadow: none !important; background: transparent; text-align: center; font-size: 3.2rem; font-weight: 750;
  letter-spacing: -.03em; width: 6.5ch; padding: 0; min-height: 0; font-variant-numeric: tabular-nums;
}
.amount-input input:focus { outline: 0; }
.amount-presets { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.amount-presets button { font: inherit; font-size: .78rem; font-weight: 600; border: 1px solid var(--line); background: #fff; color: #334155; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.amount-presets button.on, .amount-presets button:hover { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.methods label { margin: 0; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 6px; background: #fff; cursor: pointer; }
.methods input { position: absolute; opacity: 0; pointer-events: none; }
.methods label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.methods label:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(15,118,110,.2); }
.field-card { display: flex; align-items: center; gap: 12px; }
.field-card select { border: 0; box-shadow: none !important; padding: 0; min-height: 0; font-weight: 600; background: transparent; }

/* WhatsApp round button inside rows */
.wa-btn { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: #128c4a; flex-shrink: 0; }
.wa-btn:hover { background: #d1fadf; text-decoration: none; }
.wa-btn .ic { width: 18px; height: 18px; }

/* Progress bar */
.prog { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #0f766e, #5eead4); }
.prog.indigo i { background: linear-gradient(90deg, #4338ca, #818cf8); }

/* Notice card */
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.notice .ic { color: var(--amber); margin-top: 2px; }
.notice b { display: block; font-size: .92rem; }
.notice p { margin: 4px 0 0; font-size: .85rem; color: #475467; white-space: pre-line; }
.notice .when { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* Switch-style button (platform) */
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--green); position: relative; border: 0; cursor: pointer; flex-shrink: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.off { background: #cbd5e1; }
.switch.off::after { right: auto; left: 4px; }

/* Welcome / login on the brand gradient */
/* public pages keep the light page colour; .welcome paints the gradient */
.welcome {
  min-height: 100vh; color: #fff;
  background: radial-gradient(90% 60% at 100% 0%, #14b8a6 0%, rgba(20,184,166,0) 60%), linear-gradient(170deg, #0f1b2d 0%, #0f3f45 55%, #0f766e 100%);
}
.welcome .pubtop .logo { color: #fff; }
.welcome .pubtop .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.welcome .pub { padding-bottom: 40px; }
.welcome h1 { font-size: 2.2rem; line-height: 1.12; letter-spacing: -.03em; margin-top: 24px; }
.welcome .lead { opacity: .78; margin-top: 10px; font-size: 1.02rem; max-width: 520px; }
.portal-tiles { display: grid; gap: 10px; margin-top: 28px; }
@media (min-width: 720px) { .portal-tiles { grid-template-columns: repeat(3, 1fr); } }
.portal-tile { display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; padding: 14px; color: #fff; }
.portal-tile:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.portal-tile .pi { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); flex-shrink: 0; }
.portal-tile b { display: block; font-size: .95rem; }
.portal-tile span.s { font-size: .8rem; opacity: .72; }
.portal-tile .ic:last-child { margin-left: auto; opacity: .7; }
.welcome .cta { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; max-width: 420px; }
.welcome .cta .btn { min-height: 52px; border-radius: 16px; font-size: 1rem; }
.welcome .cta .btn.white { background: #fff; color: #0f172a; }
.welcome .cta .btn.white:hover { background: #f1f5f9; }
.welcome .cta .btn.clear { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.welcome .features { margin-top: 40px; }
.welcome .features .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.welcome .features .card .muted { color: rgba(255,255,255,.7); }
.welcome .features .card h3::before { background: #5eead4; }
.welcome .auth { color: var(--ink); margin-top: 20px; }
.welcome .flash { max-width: 420px; margin-left: auto; margin-right: auto; }
.foot-links { text-align: center; font-size: .8rem; margin-top: 30px; opacity: .7; }
.foot-links a { color: inherit; margin: 0 8px; }

/* ---------- Phones: the app look ---------- */
@media (max-width: 959px) {
  body.has-hero .topbar { display: none; }
  body.has-hero .content { padding-top: 0; }
  .hero { margin: 0 -16px 0; border-radius: 0 0 28px 28px; padding: calc(18px + env(safe-area-inset-top)) 20px 64px; }
  .hero .h-only-phone { display: flex; }
  .hero .h-cta { display: none; }
  .overlap { position: relative; z-index: 1; margin-top: -44px; }
  .content { padding-bottom: 120px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; border-radius: 18px; }
  .stat .value { font-size: 1.25rem; }
  .card, .list { border-radius: 20px; }
  .card { box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.05); border-color: transparent; }
  .head { margin-top: 4px; }
  .head .btn.desk-only { display: none; }

  /* Floating bottom bar with the raised + button */
  nav.bottom {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); padding: 8px 4px;
    border: 0; border-radius: 24px; background: rgba(255,255,255,.97);
    box-shadow: 0 10px 30px rgba(15,23,42,.16);
  }
  nav.bottom a { font-size: .68rem; font-weight: 600; }
  nav.bottom a .ic { width: 22px; height: 22px; }
  nav.bottom a.pay .dot { width: 54px; height: 54px; border-radius: 18px; margin-top: -30px; background: var(--accent); box-shadow: 0 10px 20px rgba(15,23,42,.25); }
  nav.bottom a.pay .dot .ic { width: 24px; height: 24px; }
  nav.bottom a.on { color: var(--accent); }
}
@media (min-width: 960px) {
  .phone-only { display: none !important; }
}
@media (max-width: 959px) {
  .desk-only { display: none !important; }
}
@media (max-width: 959px) {
  body.has-hero .pubtop { display: none; }
  body.has-hero .pub { padding-bottom: 120px; }
}

/* ---------- Tenant section (/me and private link) ---------- */
.tapp { max-width: 640px; margin: 0 auto; }
.tnav { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 14px; background: var(--card); border: 1px solid var(--line); padding: 4px; border-radius: 12px; }
.tnav a { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.tnav a .ic { width: 16px; height: 16px; }
.tnav a.on { background: var(--ink); color: #fff; }
.tnav a:hover { text-decoration: none; background: #f8fafc; }
.tnav a.on:hover { background: var(--ink); }
.btn.paybtn { min-height: 52px; border-radius: 16px; background: linear-gradient(90deg, #0f766e, #14b8a6); }
.tenant-bar a.pay .dot { background: #0f766e; }
.dep-mini { display: flex; align-items: center; gap: 12px; color: inherit; }
.dep-mini:hover { text-decoration: none; }
.dep-mini .name { font-weight: 600; font-size: .92rem; }
.dep-mini .meta { font-size: .8rem; color: var(--muted); }
.dep-mini > .ic { color: var(--faint); width: 18px; height: 18px; }
.quick.five { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.quick.five b { width: 48px; height: 48px; }

/* ---------- Deposits (staff) ---------- */
.dep-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dep-head .num { font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.dep-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.dep-actions details { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; background: #fff; }
.dep-actions details[open] { grid-column: 1 / -1; }
.dep-actions summary { display: flex; align-items: center; gap: 8px; }
.dep-actions summary .ic { width: 16px; height: 16px; }
.login-code { font-size: 2rem; font-weight: 750; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; background: var(--brand-soft); color: var(--brand); border-radius: 14px; padding: 10px; margin: 10px 0; }
.match { border: 1px solid var(--amber-line); background: var(--amber-soft); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
@media (max-width: 420px) { .quick.five a { font-size: .68rem; } .quick.five b { width: 44px; height: 44px; border-radius: 14px; } }
.dep-head .chip { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--green-soft); color: var(--green); flex-shrink: 0; }
.dep-head .chip .ic { width: 18px; height: 18px; }
.row .name.wrap { white-space: normal; }
.assure { text-align: center; margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.assure .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
@media (max-width: 959px) { .stats > a:nth-child(3):last-child { grid-column: 1 / -1; } }
