/* Family portal mockup. Mobile-first, right-to-left. */

:root {
  --bg: #f5f1ea;
  --surface: #ffffff;
  --surface-2: #f8f5ef;
  --surface-3: #efe9df;
  --line: #e6dfd3;
  --line-strong: #cfc5b5;
  --ink: #1f1d1a;
  --ink-2: #5c554b;
  --ink-3: #857d70;

  --primary: #2b6b5e;
  --primary-hover: #22584d;
  --primary-soft: #e0eee9;
  --focus: #2b6b5e;

  --ok: #1f6b43;      --ok-bg: #e2f2e8;
  --soon: #8a5207;    --soon-bg: #fcefd5;
  --late: #b42318;    --late-bg: #fde6e3;
  --info: #2f569c;    --info-bg: #e5edfa;
  --extra: #7a3f9c;   --extra-bg: #f2e8f8;
  --muted-bg: #efebe4;

  /* Family colors (avatar and name dot): Oren green, Masha blue, Tia purple */
  --oren: #2e7d32;
  --masha: #1e66c4;
  --tia: #7b3fbf;

  --tone-money: #2f7d5b;  --tone-money-bg: #e3f1ea;
  --tone-pets: #b2622a;   --tone-pets-bg: #f8eadf;
  --tone-net: #3d5fa8;    --tone-net-bg: #e6ecf8;
  --tone-events: #8a4fb0; --tone-events-bg: #f1e8f7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 6px 18px rgba(40, 30, 10, .05);

  --toolbar-h: 0px; /* the mockup's review bar is gone */
  --appbar-h: 60px;
  --bottomnav-h: 68px;

  --font: 'Heebo', 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
body.modal-open { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* Paints the phone's status-bar band above the sticky header */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 65;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
}

/* ---------- App shell ---------- */
.shell { min-height: calc(100vh - var(--toolbar-h)); }
.sidenav { display: none; }
.appbar {
  position: sticky; top: calc(var(--toolbar-h) + env(safe-area-inset-top, 0px)); z-index: 40;
  height: var(--appbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(245, 241, 234, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
}
.brand-mark .ic { width: 22px; height: 22px; }
.user { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
}
.av-oren { background: var(--oren); }
.av-masha { background: var(--masha); }
.av-tia { background: var(--tia); }
.user-name { display: flex; flex-direction: column; line-height: 1.2; font-weight: 600; }
.user-name small { font-weight: 400; color: var(--ink-3); font-size: 12px; }

.content {
  max-width: 1180px; margin: 0 auto;
  padding-top: 20px;
  padding-bottom: calc(var(--bottomnav-h) + 32px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: flex;
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none;
  color: var(--ink-3); font-size: 12px; font-weight: 500;
}
.nav-item .ic { width: 24px; height: 24px; padding: 4px 14px; box-sizing: content-box; border-radius: 999px; }
.nav-item.is-active { color: var(--primary); font-weight: 700; }
.nav-item.is-active .ic { background: var(--primary-soft); }

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); }
  .sidenav {
    display: flex; flex-direction: column; gap: 22px;
    position: sticky; top: calc(var(--toolbar-h) + env(safe-area-inset-top, 0px));
    height: calc(100vh - var(--toolbar-h));
    padding: 20px 14px; overflow: auto;
    background: var(--surface);
    border-inline-end: 1px solid var(--line);
  }
  .sidenav .brand { padding: 0 8px; }
  .bottomnav { display: none; }
  .appbar-brand { visibility: hidden; }
  .content {
    padding-top: 28px; padding-bottom: 56px;
    padding-left: max(32px, env(safe-area-inset-left, 0px));
    padding-right: max(32px, env(safe-area-inset-right, 0px));
  }
}
.side-items { display: flex; flex-direction: column; gap: 2px; }
.side-item, .side-subitem {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 0; border-radius: 10px; background: none;
  text-align: start; color: var(--ink-2); font-weight: 500;
}
.side-item:hover, .side-subitem:hover { background: var(--surface-2); color: var(--ink); }
.side-item.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.side-sub { display: flex; flex-direction: column; margin: 2px 0 6px; padding-inline-start: 32px; }
.side-subitem { min-height: 38px; font-size: 15px; }
.side-subitem.is-active { color: var(--primary); font-weight: 700; }

/* ---------- Page header ---------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.page-head h1 { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.page-sub { color: var(--ink-2); margin-top: 4px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.subnav { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 500;
}
.chip .ic { width: 18px; height: 18px; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

/* ---------- Grid and cards ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grid.two, .grid.dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .grid.dash { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid.top { align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
}
@media (min-width: 720px) { .card { padding: 20px; } }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { font-size: 17px; font-weight: 700; line-height: 1.3; flex: 1; min-width: 0; }
.card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
}
.tone-money  { background: var(--tone-money-bg);  color: var(--tone-money); }
.tone-pets   { background: var(--tone-pets-bg);   color: var(--tone-pets); }
.tone-net    { background: var(--tone-net-bg);    color: var(--tone-net); }
.tone-events { background: var(--tone-events-bg); color: var(--tone-events); }
.card-body { display: flex; flex-direction: column; gap: 10px; }
.card-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
}
.card-foot .links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.card > .section-title { margin-bottom: 4px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-3); }

.link {
  display: inline-flex; align-items: center; gap: 2px;
  min-height: 40px; padding: 0;
  border: 0; background: none;
  color: var(--primary); font-weight: 600; font-size: 15px;
}
.link .ic { width: 18px; height: 18px; }
.link:hover { text-decoration: underline; }

/* ---------- Stats and hero cards ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1.15; }
.hero { display: flex; flex-direction: column; gap: 16px; }
.hero-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hero-num { font-size: 32px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.hero-sub { color: var(--ink-2); }
.facts { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fact { background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.fact b { font-size: 16px; }
.fact small { color: var(--ink-3); font-size: 13px; }
.details { display: flex; flex-direction: column; gap: 6px; }
.details li { display: flex; align-items: flex-start; gap: 8px; color: var(--ink-2); }
.details .ic { color: var(--ink-3); margin-top: 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--late); border-color: var(--late); color: #fff; }
.btn-danger:hover { background: #961c13; }
.btn-danger-ghost { border-color: transparent; background: transparent; color: var(--late); }
.btn-danger-ghost:hover { background: var(--late-bg); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--surface); }
.btn-icon {
  width: 44px; height: 44px; flex: none;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 10px; background: none; color: var(--ink-2);
}
.btn-icon:hover { background: var(--surface-3); color: var(--ink); }
.btn-icon.danger:hover { background: var(--late-bg); color: var(--late); }

/* ---------- Tags and people ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.6; white-space: nowrap;
}
.tag .ic { width: 15px; height: 15px; }
.tag-ok    { background: var(--ok-bg);    color: var(--ok); }
.tag-soon  { background: var(--soon-bg);  color: var(--soon); }
.tag-late  { background: var(--late-bg);  color: var(--late); }
.tag-info  { background: var(--info-bg);  color: var(--info); }
.tag-extra { background: var(--extra-bg); color: var(--extra); }
.tag-muted { background: var(--muted-bg); color: var(--ink-2); }
.tag-star  { background: #fff3cf; color: #7d5a00; }
.tag-dev   { background: var(--tone-net-bg); color: var(--tone-net); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.person { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.person .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.p-oren .dot { background: var(--oren); }
.p-masha .dot { background: var(--masha); }
.p-tia .dot { background: var(--tia); }
.people { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }

/* ---------- Lists ---------- */
.list > li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.row-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.row-top b { font-weight: 700; }
.amount { font-size: 18px; }
.note { font-size: 15px; color: var(--ink); background: var(--surface-2); border-radius: 8px; padding: 4px 10px; align-self: flex-start; }
.row-actions { display: flex; flex: none; margin-top: -6px; }
@media (max-width: 559px) { .row-actions { flex-direction: column; } }
.swap-note { display: inline-flex; align-items: center; gap: 4px; color: var(--info); font-size: 14px; font-weight: 600; }
.swap-note .ic { width: 16px; height: 16px; }
.more { display: flex; justify-content: center; padding-top: 8px; }
.empty { color: var(--ink-3); padding: 12px 0; }

/* Slots (today's walks) */
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 12px; min-height: 44px;
}
.slot-name { font-weight: 600; color: var(--ink-2); }

/* Small rows inside dashboard cards */
.mini-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mini-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mini-list { display: flex; flex-direction: column; gap: 10px; }
.mini-list li { display: flex; align-items: flex-start; gap: 10px; }
.mini-list li > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pet-emoji { font-size: 22px; line-height: 1.2; width: 28px; text-align: center; flex: none; }

/* Progress bar */
.progress { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 4px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--ok); }
.progress.soon > span { background: #d98a12; }
.progress.late > span { background: var(--late); }
.progress-lg { height: 14px; }
.progress-text { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--ink-2); margin-top: 6px; }

/* Date block (events) */
.dateblock {
  width: 52px; flex: none; text-align: center;
  border-radius: 12px; padding: 6px 0;
  background: var(--tone-events-bg); color: var(--tone-events);
  display: flex; flex-direction: column; line-height: 1.1;
}
.dateblock b { font-size: 22px; font-weight: 800; }
.dateblock small { font-size: 13px; font-weight: 600; }
.past .dateblock { background: var(--surface-3); color: var(--ink-2); }

/* ---------- Walks ---------- */
.rota { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; margin: 0 -4px; width: calc(100% + 8px); }
.rota th { font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 0 2px 2px; text-align: center; }
.rota th.rota-corner { width: 58px; }
.rota th[scope="row"] { text-align: start; color: var(--ink); padding: 0 4px; }
.rota th[scope="row"] small { display: block; font-weight: 400; color: var(--ink-3); }
.rota tr.is-today th[scope="row"] { color: var(--primary); }
.rcell {
  background: var(--surface-2); border-radius: 10px; padding: 6px 4px;
  text-align: center; vertical-align: middle; font-size: 14px; height: 52px;
  border: 1px solid transparent;
}
.rcell-name { display: block; font-weight: 700; }
.rcell-note { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; }
.rcell-note .ic { width: 14px; height: 14px; }
.rcell.st-done .rcell-note { color: var(--ok); }
.rcell.st-swap { background: var(--info-bg); }
.rcell.st-swap .rcell-note { color: var(--info); }
.rcell.st-missed { background: var(--late-bg); }
.rcell.st-missed .rcell-note { color: var(--late); }
.rcell.st-pending { background: var(--surface); border: 1px dashed var(--line-strong); }
.rcell.st-pending .rcell-note { color: var(--ink-3); }
.rota tr.is-today .rcell { box-shadow: inset 0 0 0 2px var(--primary-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend .ic { width: 14px; height: 14px; }
.lg-done { color: var(--ok); } .lg-swap { color: var(--info); } .lg-missed { color: var(--late); } .lg-pending { color: var(--ink-3); }
.week-sum { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 15px; color: var(--ink-2); }
.week-sum b { color: var(--ink); }

.mini-map { width: 56px; height: 56px; flex: none; border-radius: 10px; overflow: hidden; }
.mini-map svg { display: block; width: 56px; height: 56px; }
.mm-bg { fill: #e6eee2; }
.mm-streets { stroke: #fff; stroke-width: 3; fill: none; }
.mm-route { stroke: var(--tone-pets); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mm-start { fill: var(--tone-pets); stroke: #fff; stroke-width: 1.5; }
.mini-map.missed { display: grid; place-items: center; background: var(--late-bg); color: var(--late); }

/* ---------- Router scaffold ---------- */
.dev-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--tone-net-bg); color: var(--tone-net);
  border: 1px solid #cdd8f0; font-weight: 600;
}
.scaffold {
  border: 2px dashed var(--line-strong);
  box-shadow: none;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(61, 95, 168, .035) 14px 28px),
    var(--surface);
}
.placeholder-status { display: flex; align-items: center; gap: 12px; }
.placeholder-status .ph-icon {
  width: 48px; height: 48px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--ink-3);
}
.placeholder-status .ph-icon .ic { width: 26px; height: 26px; }
.planned { display: flex; flex-direction: column; gap: 8px; }
.planned .btn { justify-content: space-between; white-space: normal; text-align: start; padding: 8px 14px; width: 100%; }
.planned .btn > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Login and access denied ---------- */
.bare {
  min-height: calc(100vh - var(--toolbar-h));
  display: grid; place-items: center;
  padding-block: 24px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background:
    radial-gradient(circle at 85% 10%, rgba(43, 107, 94, .10), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(178, 98, 42, .10), transparent 45%),
    var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow);
  padding: 32px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.auth-logo {
  width: 72px; height: 72px; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
  position: relative;
}
.auth-logo .ic { width: 40px; height: 40px; }
.auth-logo .paw {
  position: absolute; bottom: -8px; left: -8px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--tone-pets); color: #fff; border: 3px solid var(--surface);
}
.auth-logo .paw .ic { width: 16px; height: 16px; }
.auth-logo.locked { background: var(--late-bg); color: var(--late); }
.auth-card h1 { font-size: 26px; font-weight: 800; }
.auth-card p { color: var(--ink-2); }
.google-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 48px; margin-top: 8px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); font-weight: 600; font-size: 16px;
}
.google-btn:hover { background: var(--surface-2); }
.google-btn svg { width: 20px; height: 20px; }
.auth-note { font-size: 14px; color: var(--ink-3) !important; }
.mock-hint {
  font-size: 13px; color: #7d5a00 !important;
  background: #fff3cf; border-radius: 8px; padding: 6px 10px;
}

/* ---------- Modal / bottom sheet ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 16, 10, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  width: 100%; max-height: 92vh; overflow: auto;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding-top: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { max-width: 540px; border-radius: 20px; padding: 20px 24px 24px; }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.modal-head h2 { font-size: 20px; font-weight: 800; }
.modal-intro { color: var(--ink-2); margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field.half { grid-column: auto; }
.field > label, .field > legend { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); font-size: 16px;
}
.field textarea { resize: vertical; min-height: 80px; }
.field select:disabled { background: var(--surface-2); color: var(--ink-2); }
.field [aria-invalid="true"] { border-color: var(--late); }
.hint { font-size: 13px; color: var(--ink-3); }
.err { font-size: 13px; color: var(--late); font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.modal-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.modal-actions .btn-primary, .modal-actions .btn-danger { flex: 1; }
@media (min-width: 720px) { .modal-actions .btn-primary, .modal-actions .btn-danger { flex: 0 0 auto; min-width: 140px; } }

.rota-edit { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.rota-edit th { font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: center; }
.rota-edit th[scope="row"] { text-align: start; color: var(--ink); width: 54px; }
.rota-edit select { width: 100%; min-height: 44px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 15px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 120;
  left: 50%; bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  background: #1f1d1a; color: #fff;
  padding: 12px 18px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 24px; } }

/* ---------- Real-app additions ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--ink-3); font-size: 18px; }
.gsi-wrap { min-height: 48px; width: 100%; display: flex; justify-content: center; margin-top: 8px; }
.dev-login { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.dev-login .actions { justify-content: center; }
.auth-error { font-size: 14px; color: var(--late) !important; font-weight: 600; }
.person-none { color: var(--ink-3); font-weight: 600; }
.mini-map { display: grid; place-items: center; background: var(--tone-pets-bg); color: var(--tone-pets); }
.mini-map .ic { width: 26px; height: 26px; }
.rcell.st-none { background: var(--surface); border: 1px dashed var(--line); color: var(--ink-3); }
.empty-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
