/* ─────────────────────────────────────────────────────────────────────────
   "Home" layer: the signed-in app (admin, family, nanny) as a family kitchen.
   The page is the fridge door. Records are paper notes, the urgent ones held
   up by a coloured magnet. People are polaroids. Counts, times and section
   headings are written by hand (the brand's --hand font). Everything else
   stays plain and straight so the hand-made touches read as deliberate, not
   as clutter.
   Scoped to body.is-home so the marketing site is untouched.
   ───────────────────────────────────────────────────────────────────────── */
body.is-home {
  --fridge:#EEF1ED;      /* enamel door */
  --paper:#FFFEFA;       /* note paper */
  --paper-edge:#E4DFD3;
  --pen:#25408F;         /* ballpoint blue */
  --pen-soft:#5A6A9A;
  --mag-coral:#E2604F; --mag-blue:#2E8FD6; --mag-sun:#F0B232; --mag-mint:#4FA88A; --mag-plum:#9A5BB0;
  --sticky:#FFF3B0; --sticky-mint:#DDF3E6; --sticky-pink:#FCE1DC;
  --tape:rgba(236,222,178,.78);
  --note-shadow:0 1px 0 rgba(60,50,30,.05), 0 8px 16px -12px rgba(60,50,30,.45);
  background:var(--fridge);
  background-image:linear-gradient(90deg, rgba(255,255,255,.55) 0, rgba(255,255,255,0) 18%, rgba(255,255,255,0) 82%, rgba(255,255,255,.35) 100%);
}

/* The shelf the page hangs from */
body.is-home .nav-app { background:var(--paper); border-bottom:2px solid var(--paper-edge); backdrop-filter:none; }
body.is-home .admin-chip { font-family:var(--hand); font-weight:700; font-size:13px; letter-spacing:0; text-transform:none; color:var(--pen); background:var(--sticky); border:0; border-radius:2px; transform:rotate(-3deg); display:inline-block; padding:0 7px; }
body.is-home .nav-links a.nav-on { color:var(--navy); text-decoration:underline; text-decoration-color:var(--mag-sun); text-decoration-thickness:3px; text-underline-offset:7px; }
body.is-home .nav-badge { background:var(--mag-coral); color:#fff; border-radius:999px; }

/* Handwritten section headings: notes on the counter */
body.is-home .sec-h, body.is-home .card h2, body.is-home .card h3 { font-family:var(--hand); font-weight:700; color:var(--pen); letter-spacing:0; }
body.is-home .sec-h { font-size:23px; margin:30px 0 10px; }
body.is-home .lede.sm { color:var(--text2); }

/* Paper: every card and row is a sheet, not a rounded SaaS tile */
body.is-home .card { background:var(--paper); border:1px solid var(--paper-edge); border-radius:6px; box-shadow:var(--note-shadow); }
body.is-home .rost { background:var(--paper); border:1px solid var(--paper-edge); border-radius:4px; box-shadow:0 1px 0 rgba(60,50,30,.05); }
body.is-home .rost:hover { transform:none; box-shadow:var(--note-shadow); }
body.is-home .pipe-stage { background:var(--paper); border-radius:4px; border:1px solid var(--paper-edge); box-shadow:0 1px 0 rgba(60,50,30,.05); }
body.is-home .pipe-count { font-family:var(--hand); font-weight:700; color:var(--pen); }
body.is-home .pipe-label { text-transform:none; letter-spacing:0; font-size:13px; }

/* Buttons: one solid, one outline. No gradients, no lift. */
body.is-home .btn { background:var(--navy); color:#fff; border:1px solid var(--navy); border-radius:10px; box-shadow:none; }
body.is-home .btn:hover { background:#0c2b42; transform:none; box-shadow:none; }
body.is-home .btn-ghost { background:var(--paper); border:1px solid #CFC8B8; color:var(--navy); border-radius:10px; }
body.is-home .btn-ghost:hover { border-color:var(--navy); color:var(--navy); }
body.is-home .btn-danger { background:#B8382E; border-color:#B8382E; color:#fff; }

/* Tags look like little paper labels */
body.is-home .pill { border-radius:4px; text-transform:none; letter-spacing:0; }

/* Alerts are sticky notes */
body.is-home .alert { background:var(--sticky-pink); border:0; border-radius:2px; color:#8E2E24; box-shadow:var(--note-shadow); }
body.is-home .alert.ok { background:var(--sticky-mint); color:#1F5C46; }

/* People are polaroids */
body.is-home .avatar, body.is-home .fam-avatar {
  border-radius:2px; border:0; background:#fff; padding:6px 6px 16px;
  box-shadow:0 2px 6px rgba(40,30,20,.18); transform:rotate(-2.5deg);
  object-fit:cover; box-sizing:content-box;
}

/* ── Dashboard: notes held to the fridge by magnets ───────────────────── */
body.is-home .kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px 22px; margin:22px 0 30px; }
@media (max-width:720px){ body.is-home .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
body.is-home .kpi { position:relative; background:var(--paper); border:1px solid var(--paper-edge); border-left:1px solid var(--paper-edge); border-radius:3px; padding:22px 16px 14px; box-shadow:var(--note-shadow); transform:rotate(var(--tilt,0deg)); }
body.is-home .kpi:nth-child(3n+1) { --tilt:-1.2deg; }
body.is-home .kpi:nth-child(3n+2) { --tilt:.8deg; }
body.is-home .kpi:nth-child(3n) { --tilt:-.4deg; }
body.is-home .kpi:hover { transform:rotate(0deg); box-shadow:0 1px 0 rgba(60,50,30,.05), 0 14px 22px -14px rgba(60,50,30,.5); border-color:var(--paper-edge); text-decoration:none; }
body.is-home .kpi::before { content:''; position:absolute; top:-9px; left:50%; width:20px; height:20px; margin-left:-10px; border-radius:50%; background:var(--mag,var(--mag-blue)); box-shadow:inset -3px -4px 0 rgba(0,0,0,.18), 0 3px 4px rgba(0,0,0,.2); }
body.is-home .kpi-requests  { --mag:var(--mag-blue); }
body.is-home .kpi-claims    { --mag:var(--mag-plum); }
body.is-home .kpi-unassigned{ --mag:var(--mag-sun); }
body.is-home .kpi-fees      { --mag:var(--mag-mint); }
body.is-home .kpi-payouts   { --mag:var(--mag-mint); }
body.is-home .kpi-inquiries { --mag:var(--mag-blue); }
body.is-home .kpi-count { font-family:var(--hand); font-weight:700; font-size:34px; color:var(--pen); }
body.is-home .kpi-label { text-transform:none; letter-spacing:0; font-size:14px; color:var(--navy); }
body.is-home .kpi-note { font-size:13px; }
body.is-home .kpi-alert { background:var(--sticky-pink); --mag:var(--mag-coral); }
body.is-home .kpi-alert .kpi-count, body.is-home .kpi-alert .kpi-note { color:#A8342A; }

/* The to-do list: a day-plan layout, time in hand on the left */
.todo-list { list-style:none; margin:0; padding:6px 22px; background:var(--paper,#fff); border:1px solid var(--paper-edge,#e6e1d5); border-radius:6px; box-shadow:var(--note-shadow); }
.todo-list li { display:grid; grid-template-columns:22px 118px minmax(0,1fr) auto; gap:12px; align-items:start; padding:14px 0; border-top:1px solid rgba(60,50,30,.07); }
.todo-list li:first-child { border-top:0; }
.todo-box { width:18px; height:18px; margin-top:4px; border:2px solid var(--pen-soft,#5a6a9a); border-radius:3px; }
.todo-when { font-family:var(--hand,cursive); font-weight:700; font-size:18px; color:var(--pen,#25408f); line-height:1.25; }
.todo-what { display:flex; flex-direction:column; }
.todo-title { font-weight:700; color:var(--navy); }
.todo-sub { font-size:14px; color:var(--text2); }
.todo-urgent .todo-box { border-color:var(--mag-coral,#e2604f); background:var(--sticky-pink,#fce1dc); }
.todo-urgent .todo-sub { color:#A8342A; }
.todo-list li.todo-empty { display:block; } .todo-empty { font-family:var(--hand,cursive); font-size:18px; color:var(--pen-soft,#5a6a9a); padding:14px 0; }
@media (max-width:560px){ .todo-list li { grid-template-columns:18px 64px minmax(0,1fr); } .todo-list li > a { grid-column:3; } }

/* ── Calendar: sticky notes on the week ───────────────────────────────── */
body.is-home .wk-ev { background:var(--sticky); color:#3b3320; border-radius:2px; box-shadow:0 1px 0 rgba(60,50,30,.08), 0 6px 10px -8px rgba(60,50,30,.6); border-top:5px solid var(--tape); }
body.is-home .wk-ev-t { font-family:var(--hand); font-size:12px; color:var(--pen); opacity:1; }
body.is-home .wk-ev.wk-ev-filled { background:var(--sticky-mint); }
body.is-home .wk-ev.wk-ev-open { background:#fff; border:2px dashed var(--mag-coral); border-top-width:2px; }
body.is-home .wk-ev.wk-ev-open .wk-ev-s { color:#A8342A; font-weight:700; }

@media (prefers-reduced-motion:reduce){ body.is-home .kpi, body.is-home .avatar, body.is-home .fam-avatar { transform:none; } }

/* Family + nanny pages: same paper, same pen */
body.is-home .fam-hero { background:var(--paper); border:1px solid var(--paper-edge); border-radius:6px; box-shadow:var(--note-shadow); }
body.is-home .fam-avatar { width:64px; height:64px; background:var(--sticky); color:var(--pen); font-family:var(--hand); font-size:34px; font-weight:700; display:grid; place-items:center; }
body.is-home .assign-bar { background:var(--sticky-pink); border:0; border-radius:2px; box-shadow:var(--note-shadow); }
body.is-home .nanny-chip { background:var(--paper); border:1px solid var(--paper-edge); border-radius:4px; }
body.is-home .stage-opt { border-radius:6px; background:var(--paper); border-color:var(--paper-edge); }
body.is-home .stage-opt.on { background:var(--sticky); border-color:#E3CF6E; color:var(--navy); }
body.is-home .readiness { background:var(--paper); border:1px solid var(--paper-edge); border-radius:4px; box-shadow:var(--note-shadow); }
body.is-home .readiness.is-incomplete { background:var(--sticky-pink); border:0; }
body.is-home .readiness.is-ready { background:var(--sticky-mint); border:0; }
body.is-home .readiness-h strong { font-family:var(--hand); font-size:19px; color:var(--pen); }
/* Calendar frame: a paper planner, not a blue grid */
body.is-home .wk { border:1px solid var(--paper-edge); border-radius:6px; background:var(--paper); box-shadow:var(--note-shadow); }
body.is-home .wk-head { background:var(--paper); border-bottom:2px solid var(--paper-edge); }
body.is-home .cal-tabs { border-color:var(--paper-edge); background:var(--paper); }
body.is-home .cal-tabs a.on { background:var(--navy); color:#fff; box-shadow:none; }
