/* Amanda's Grooming — styles. Brand: Amanda's logo pink and teal, Fredoka headings, Plus Jakarta Sans text.
   Tokens first (light), then dark, then components, then app layout, then the invoice. */

:root {
  --color-bg: #FBF6F8;
  --color-surface: #F7EEF2;
  --color-card: #ffffff;
  --color-text: #1f1a1d;
  --color-muted: color-mix(in srgb, var(--color-text) 62%, transparent);
  --color-faint: color-mix(in srgb, var(--color-text) 44%, transparent);
  --color-divider: color-mix(in srgb, #4a2a38 15%, transparent);
  --color-hair: color-mix(in srgb, #4a2a38 8%, transparent);
  --color-on-accent: #ffffff;

  --pink: #E0457F;              /* logo pink */
  --color-accent: #C93A6E;      /* pink for text and buttons (4.6:1 on white) */
  --color-accent-50: #FFF5F9;
  --color-accent-100: #FDEEF4;
  --color-accent-200: #FBD9E6;
  --color-accent-300: #F5B5CD;
  --color-accent-400: #EC7FA6;
  --color-accent-800: #8E2149;
  --color-accent-900: #5B1530;
  --teal: #3E929E;              /* the "Pretoria" teal in the logo */
  --teal-deep: #276B75;
  --teal-soft: #DCF3F8;
  --wa: #1DA851;

  --color-neutral-100: #F4EFF1;
  --color-neutral-200: #E9E2E5;
  --color-neutral-300: #D8CFD3;
  --color-neutral-400: #B8ADB2;
  --color-neutral-700: #5F5559;
  --color-neutral-800: #443B3F;

  --ok-bg: #DFF5E6;   --ok-fg: #17663A;
  --warn-bg: #FFF1D6; --warn-fg: #8A4B06;
  --bad-bg: #FDE2E2;  --bad-fg: #A61B1B;
  --info-bg: #DCF3F8; --info-fg: #1F5F68;

  --font-heading: "Fredoka", "Nunito", "Varela Round", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-script: "Dancing Script", "Brush Script MT", cursive;

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(91, 21, 48, .06), 0 2px 8px rgba(91, 21, 48, .05);
  --shadow-md: 0 6px 18px rgba(91, 21, 48, .10);
  --shadow-lg: 0 18px 48px rgba(40, 12, 24, .22);

  --topbar-h: 60px;
  --nav-h: 64px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --color-bg: #141113; --color-surface: #221C20; --color-card: #1C171A; --color-text: #F4ECEF;
    --color-divider: color-mix(in srgb, #F4ECEF 15%, transparent); --color-hair: color-mix(in srgb, #F4ECEF 8%, transparent);
    --color-on-accent: #1a0f14; --color-accent: #F17AA6; --pink: #F06A9C;
    --color-accent-50: #23161C; --color-accent-100: #2C1922; --color-accent-200: #3E1F2D; --color-accent-300: #61304A; --color-accent-400: #A24A72; --color-accent-800: #F8C4D7; --color-accent-900: #120A0E;
    --teal: #6CC0CB; --teal-deep: #A5DCE3; --teal-soft: #15292C;
    --color-neutral-100: #262024; --color-neutral-200: #2F282C; --color-neutral-300: #43393E; --color-neutral-400: #62575C; --color-neutral-700: #C7BCC1; --color-neutral-800: #E2D9DD;
    --ok-bg: #11301E; --ok-fg: #86E2A6; --warn-bg: #362609; --warn-fg: #F5C863; --bad-bg: #3A1616; --bad-fg: #F6A3A3; --info-bg: #15292C; --info-fg: #9CD8E0;
    --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .04); --shadow-md: 0 6px 18px rgba(0, 0, 0, .45); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #141113; --color-surface: #221C20; --color-card: #1C171A; --color-text: #F4ECEF;
  --color-divider: color-mix(in srgb, #F4ECEF 15%, transparent); --color-hair: color-mix(in srgb, #F4ECEF 8%, transparent);
  --color-on-accent: #1a0f14; --color-accent: #F17AA6; --pink: #F06A9C;
  --color-accent-50: #23161C; --color-accent-100: #2C1922; --color-accent-200: #3E1F2D; --color-accent-300: #61304A; --color-accent-400: #A24A72; --color-accent-800: #F8C4D7; --color-accent-900: #120A0E;
  --teal: #6CC0CB; --teal-deep: #A5DCE3; --teal-soft: #15292C;
  --color-neutral-100: #262024; --color-neutral-200: #2F282C; --color-neutral-300: #43393E; --color-neutral-400: #62575C; --color-neutral-700: #C7BCC1; --color-neutral-800: #E2D9DD;
  --ok-bg: #11301E; --ok-fg: #86E2A6; --warn-bg: #362609; --warn-fg: #F5C863; --bad-bg: #3A1616; --bad-fg: #F6A3A3; --info-bg: #15292C; --info-fg: #9CD8E0;
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, .04); --shadow-md: 0 6px 18px rgba(0, 0, 0, .45); --shadow-lg: 0 18px 48px rgba(0, 0, 0, .6);
}

/* ── base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--color-text);
  background: radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--pink) 10%, transparent), transparent 60%),
              radial-gradient(900px 420px at 110% 0%, color-mix(in srgb, var(--teal) 9%, transparent), transparent 60%), var(--color-bg);
  background-attachment: fixed;
  font-family: var(--font-body); font-size: 15px; line-height: 1.5; font-weight: 400;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
h2 { font-size: 28px; }
h3 { font-size: 23px; }
h4 { font-size: 19px; }
h5 { font-size: 17px; }
p { margin: 0; }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--pink) 28%, transparent); }
.tabnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--color-muted); }
.faint { color: var(--color-faint); }
.small { font-size: 13px; }
.txt-warn { color: var(--warn-fg); font-weight: 600; }
.label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--color-muted); font-weight: 600; }
.label-accent { color: var(--color-accent); }
.grow { flex: 1 1 auto; }
.nowrap { flex-wrap: nowrap !important; }
.icon-inline { width: 15px; height: 15px; vertical-align: -3px; }

/* ── card ─────────────────────────────────────────────── */
.card { position: relative; background: var(--color-card); border: 1px solid var(--color-hair); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.pad { padding: 16px; }
.pad-lg { padding: 18px 20px; }
.card.list { overflow: hidden; }
.stack { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.card.stack { gap: 14px; }

/* ── buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 8px 16px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: var(--font-heading); font-weight: 500; font-size: 15.5px; line-height: 1.15;
  color: var(--color-text); background: var(--color-card);
  border: 1px solid var(--color-divider); border-radius: var(--r-pill);
  transition: background-color .12s, border-color .12s, color .12s, transform .06s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: color-mix(in srgb, var(--pink) 7%, var(--color-card)); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--color-accent) 86%, #000); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--color-accent); padding-inline: 10px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--pink) 10%, transparent); }
.btn-danger { color: var(--bad-fg); }
.btn-danger.btn-primary { background: var(--bad-fg); border-color: var(--bad-fg); color: #fff; }
.btn-wa { border-color: color-mix(in srgb, var(--wa) 45%, transparent); }
.btn-wa svg { color: var(--wa); }
.btn-primary.btn-wa svg { color: inherit; }
.btn-lg { min-height: 52px; font-size: 17px; padding: 10px 20px; }
.btn-sm { min-height: 34px; font-size: 14px; padding: 5px 12px; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn-icon-sm { width: 30px; min-height: 30px; padding: 0; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (pointer: coarse) { .btn { min-height: 46px; } .btn-sm { min-height: 38px; } .btn-icon { width: 46px; } .btn-sm.btn-icon { width: 38px; } }

/* ── tags, flags, chips ───────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; white-space: nowrap; line-height: 1.35; border-radius: var(--r-pill);
  background: var(--color-neutral-100); color: var(--color-neutral-800);
}
.tag svg { width: 12px; height: 12px; }
.tag-green { background: var(--ok-bg); color: var(--ok-fg); }
.tag-amber { background: var(--warn-bg); color: var(--warn-fg); }
.tag-red { background: var(--bad-bg); color: var(--bad-fg); }
.tag-aqua { background: var(--teal-soft); color: var(--teal-deep); }
.tag-pink { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; }
.flag svg { width: 13px; height: 13px; }
.flag-warn { background: var(--bad-bg); color: var(--bad-fg); }
.flag-care { background: var(--warn-bg); color: var(--warn-fg); }
.flag-good { background: var(--ok-bg); color: var(--ok-fg); }
.flag-more { background: var(--color-neutral-100); color: var(--color-muted); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 12px; cursor: pointer;
  border: 1px solid var(--color-divider); border-radius: var(--r-pill); background: var(--color-card); font-size: 14px; text-align: left;
}
.chip svg { width: 15px; height: 15px; }
.chip.on { background: var(--color-accent-100); border-color: var(--color-accent-300); color: var(--color-accent-800); }
.chip:disabled { cursor: default; }
.chip-warn.on { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad-fg) 35%, transparent); color: var(--bad-fg); }
.chip-care.on { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn-fg) 35%, transparent); color: var(--warn-fg); }
.chip-good.on { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok-fg) 35%, transparent); color: var(--ok-fg); }
.flag-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }

/* ── forms ────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .flabel { font-size: 13px; color: var(--color-muted); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--color-faint); }
.input {
  width: 100%; min-height: 44px; padding: 9px 13px; font: inherit; font-size: 16px;
  color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--r-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 35%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline: 2px solid color-mix(in srgb, var(--pink) 30%, transparent); outline-offset: 0; }
.input-lg { font-size: 24px; font-family: var(--font-heading); min-height: 56px; }
.input.search { max-width: 420px; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > .span2 { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } .form-grid-3 { grid-template-columns: 1fr 1fr; } }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--color-accent); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .search { flex: 1 1 200px; }

.seg { display: inline-flex; max-width: 100%; overflow-x: auto; border: 1px solid var(--color-divider); background: var(--color-card); border-radius: var(--r-pill); padding: 3px; gap: 2px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-wrap { flex-wrap: wrap; border-radius: var(--r-md); }
.seg-opt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-size: 14px; font-weight: 500; cursor: pointer; background: transparent; border: 0; border-radius: var(--r-pill); white-space: nowrap; min-height: 36px; }
.seg-opt[aria-pressed="true"] { background: var(--color-accent); color: var(--color-on-accent); }
.seg-opt:not([aria-pressed="true"]):hover { background: color-mix(in srgb, var(--pink) 9%, transparent); }
.seg-opt .count { font-size: 11.5px; opacity: .78; }

.price-in { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.price-in > span { font-size: 14px; color: var(--color-muted); font-weight: 600; }
.price-in .input { width: 130px; min-height: 40px; }
.form-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: var(--r-md); background: var(--color-accent-50); border: 1px solid var(--color-accent-200); }
.form-total strong { font-family: var(--font-heading); font-size: 20px; color: var(--color-accent); font-weight: 600; }

/* ── brand ────────────────────────────────────────────── */
.pawmark { display: inline-grid; place-items: center; flex: none; border-radius: 50%;
  background: linear-gradient(140deg, #EF79A7, #DC3F7C); box-shadow: 0 4px 12px rgba(224, 69, 127, .32); }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { display: flex; align-items: baseline; gap: 6px; }
.brand-script { font-family: var(--font-script); font-weight: 700; font-size: 25px; color: var(--pink); line-height: 1; }
.brand-script.big { font-size: 38px; }
.brand-name { font-family: var(--font-heading); font-weight: 600; font-size: 19px; line-height: 1; }
.brand-co { display: none; }
.brand { flex: 0 1 auto; overflow: hidden; }
.brand-text { white-space: nowrap; min-width: 0; }
@media (max-width: 430px) { .brand-script { font-size: 24px; } .brand-name { display: none; } .brand-lockup { gap: 8px; } }

/* ── app shell ────────────────────────────────────────── */
.preview-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 7px var(--gutter);
  background: #2A1520; color: #FBE6EF; font-size: 12.5px;
}
.preview-bar strong { font-family: var(--font-heading); letter-spacing: .1em; font-size: 12px; color: #F7A8C7; }
.preview-bar .pb-note { opacity: .85; }
.preview-bar select { font: inherit; font-size: 13px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); padding: 4px 8px; border-radius: 8px; }
.preview-bar select option { color: #111; }
.preview-bar .pb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--color-bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--color-hair);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 0; cursor: pointer; border-radius: 50%;
  background: var(--teal); color: #fff; font-family: var(--font-heading); font-weight: 600; font-size: 14px;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.search-btn { display: none; min-width: 230px; justify-content: flex-start; color: var(--color-muted); font-family: var(--font-body); font-weight: 400; }
@media (min-width: 900px) { .search-btn { display: inline-flex; } .brand-co { display: block; font-size: 12px; color: var(--color-muted); max-width: 26vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; border-left: 1px solid var(--color-divider); } }

.shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; padding: 20px var(--gutter) calc(var(--nav-h) + 30px + env(safe-area-inset-bottom, 0px)); }
.view { max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.view-narrow { max-width: 760px; }
.view > * { min-width: 0; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--color-card) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-hair); box-shadow: 0 -4px 20px rgba(91, 21, 48, .06);
}
.bn-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: var(--nav-h); border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-heading); font-weight: 500; font-size: 12.5px; color: var(--color-muted);
}
.bn-item svg { width: 23px; height: 23px; }
.bn-item[aria-current="page"] { color: var(--color-accent); }
.bn-item[aria-current="page"] svg { fill: color-mix(in srgb, var(--pink) 16%, transparent); }
.bn-badge {
  position: absolute; top: 7px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill);
  display: grid; place-items: center; font-family: var(--font-body); font-weight: 700; font-size: 10.5px; background: var(--pink); color: #fff;
}

@media (min-width: 960px) {
  :root { --gutter: 32px; }
  .bottom-nav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; width: 236px; flex: none; padding: 18px 12px; gap: 2px;
    border-right: 1px solid var(--color-hair);
    position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto;
  }
  .main { padding: 28px var(--gutter) 48px; }
  h2 { font-size: 31px; }
}
.side-head { padding: 16px 12px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--color-faint); }
.side-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; cursor: pointer; text-align: left;
  font-family: var(--font-heading); font-weight: 500; font-size: 16px; border-radius: var(--r-md);
  color: color-mix(in srgb, var(--color-text) 70%, transparent); background: transparent; border: 0;
}
.side-item svg { width: 19px; height: 19px; flex: none; }
.side-item:hover { color: var(--color-text); background: color-mix(in srgb, var(--pink) 7%, transparent); }
.side-item[aria-current="page"] { color: var(--color-accent-800); background: var(--color-accent-100); }
.side-item[aria-current="page"] svg { color: var(--color-accent); }
.side-badge { margin-left: auto; font-family: var(--font-body); font-weight: 700; font-size: 11px; padding: 1px 8px; border-radius: var(--r-pill); background: var(--pink); color: #fff; }
.side-foot { margin: auto 4px 4px; padding: 16px; text-align: left; background: linear-gradient(160deg, var(--color-accent-50), var(--color-card)); }
.side-foot-title { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin: 8px 0 2px; }

/* ── page header and sections ─────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-head .sub { margin-top: 4px; color: var(--color-muted); font-size: 14.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { align-self: flex-start; margin-bottom: -10px; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cols { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cols > * { min-width: 0; }
@media (min-width: 960px) { .cols-main { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

/* ── KPI tiles ────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.kpi:hover { box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-top svg { width: 20px; height: 20px; color: var(--pink); }
.kpi .label { color: var(--color-accent); }
.kpi-val { font-family: var(--font-heading); font-weight: 600; font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; color: var(--color-muted); }
@media (min-width: 760px) { .kpi-val { font-size: 32px; } }

/* ── lists ────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
.row-static { cursor: default; }
.row + .row, .list > .row + .row { border-top: 1px solid var(--color-hair); }
button.row:hover { background: color-mix(in srgb, var(--pink) 4%, transparent); }
.row-when { flex: none; width: 56px; font-size: 12.5px; color: var(--color-muted); line-height: 1.3; font-variant-numeric: tabular-nums; }
.row-when strong { display: block; color: var(--color-text); font-size: 15px; font-weight: 600; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-names { color: var(--color-accent); font-weight: 600; }
.row-sub { font-size: 13px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-ref { font-family: var(--font-heading); font-weight: 500; font-size: 12.5px; color: var(--color-faint); }
.chev { width: 16px; height: 16px; flex: none; color: var(--color-faint); }
.list-foot { padding: 10px 12px 12px; border-top: 1px solid var(--color-hair); }

.team-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; }
.team-row + .team-row { border-top: 1px solid var(--color-hair); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-on { background: var(--pink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 20%, transparent); }
.dot-next { background: var(--teal); }
.dot-free { border: 2px solid var(--teal); }

.feed { display: flex; flex-direction: column; overflow: hidden; }
.feed-item { display: flex; gap: 12px; padding: 9px 14px; font-size: 14px; }
.feed-item + .feed-item { border-top: 1px solid var(--color-hair); }
.feed-t { flex: none; width: 46px; font-size: 12px; color: var(--color-accent); padding-top: 2px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ── getting started (empty app) ── */
.getting-started { display: flex; flex-direction: column; gap: 14px; background: linear-gradient(150deg, var(--color-accent-50), var(--color-card) 65%); }
.gs-head { display: flex; align-items: center; gap: 12px; }
.gs-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.gs-step { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--color-card); border: 1px solid var(--color-hair); border-radius: var(--r-md); }
.gs-step:hover { border-color: var(--color-accent-300); }
.gs-step > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gs-n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--color-accent-100); color: var(--color-accent); font-family: var(--font-heading); font-weight: 600; }

/* ── pets ─────────────────────────────────────────────── */
.pet-av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; border: 2px solid var(--color-card);
  font-family: var(--font-heading); font-weight: 600; color: var(--color-accent-800); padding: 0; cursor: default; box-shadow: 0 1px 3px rgba(91,21,48,.15); }
button.pet-av { cursor: pointer; }
.pet-av img { width: 100%; height: 100%; object-fit: cover; }
.pet-av-cat { position: absolute; bottom: 0; left: 0; right: 0; font-style: normal; font-size: 8.5px; line-height: 1.4; text-align: center; text-transform: uppercase; letter-spacing: .08em; background: var(--teal); color: #fff; font-family: var(--font-body); font-weight: 700; }
.av-stack { display: inline-flex; flex: none; }
.av-stack > .pet-av + .pet-av { margin-left: -12px; }
.av-stack.av-lg > .pet-av + .pet-av { margin-left: -16px; }
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
.pet-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px 14px; text-align: center; cursor: pointer; font: inherit; color: inherit; }
.pet-card:hover { box-shadow: var(--shadow-md); }
.pet-card.inactive { opacity: .6; }
.pet-card-name { font-family: var(--font-heading); font-weight: 600; font-size: 18px; margin-top: 4px; }
.pet-card .flags { justify-content: center; margin-top: 4px; }
.pet-card-status { margin-top: 4px; color: var(--color-muted); }
.dog-head { display: flex; align-items: center; gap: 16px; }
.dog-photo { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.dog-photo-cam { position: absolute; right: -2px; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--color-accent); color: #fff; border: 2px solid var(--color-card); }
.dog-photo-cam svg { width: 15px; height: 15px; }
.note-line { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.note-line svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--teal); }
.note-line.warn { color: var(--bad-fg); background: var(--bad-bg); padding: 8px 10px; border-radius: var(--r-sm); }
.note-line.warn svg { color: var(--bad-fg); }

/* ── next up / action card ───────────────────────────── */
.nextup, .action-card { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-color: color-mix(in srgb, var(--pink) 28%, transparent);
  background: linear-gradient(150deg, var(--color-accent-50), var(--color-card) 60%); }
.nextup-top { display: flex; justify-content: space-between; align-items: center; }
.nextup-main { display: flex; align-items: center; gap: 14px; }
.nextup-dogs { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.2; }
.timer { font-family: var(--font-heading); font-weight: 600; font-size: 46px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-accent); }
.action-card .hint, .hint { font-size: 13.5px; color: var(--color-muted); }
.due-amt { display: flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-size: 34px; font-weight: 600; }
.pay-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pay-grid .btn { flex-direction: column; gap: 3px; min-height: 62px; border-radius: var(--r-md); font-size: 14px; }
.pay-grid .btn svg { width: 21px; height: 21px; color: var(--color-accent); }
@media (max-width: 380px) { .pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── callout: dogs ────────────────────────────────────── */
.petline { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.petline.is-done { border-color: color-mix(in srgb, var(--ok-fg) 30%, transparent); }
.petline-head { display: flex; align-items: center; gap: 12px; }
.petline-id { flex: 1; min-width: 0; }
.petline-name { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.15; }
.done-toggle.on { background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok-fg) 40%, transparent); color: var(--ok-fg); }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding: 8px 10px; border-radius: var(--r-md); background: var(--color-surface); }
.steps { display: flex; flex-direction: column; gap: 8px; }
.steps-head { display: flex; justify-content: space-between; align-items: baseline; }
.progress { height: 6px; border-radius: var(--r-pill); background: var(--color-neutral-200); overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--pink), var(--teal)); border-radius: var(--r-pill); transition: width .2s; }

.contact-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.contact-bar .btn { flex-direction: column; gap: 3px; min-height: 60px; font-size: 13.5px; border-radius: var(--r-md); }
.contact-bar .btn svg { width: 21px; height: 21px; color: var(--color-accent); }

.kv { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; }
.kv > .wide { grid-column: 1 / -1; }
.kv > div { min-width: 0; }
.kv .v { font-size: 15.5px; margin-top: 3px; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--color-hair); margin: 14px 0; border: 0; }

/* ── booking form ─────────────────────────────────────── */
.dogpick { display: flex; flex-direction: column; gap: 8px; }
.dogpick-row { display: flex; flex-direction: column; gap: 10px; padding: 8px 10px; border: 1px solid var(--color-divider); border-radius: var(--r-md); background: var(--color-card); }
.dogpick-row.on { border-color: var(--color-accent-300); background: var(--color-accent-50); }
.dogpick-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px; border: 0; background: none; cursor: pointer; text-align: left; }
.dogpick-name { display: flex; flex-direction: column; min-width: 0; }
.dogpick-new { padding: 12px; }
.line-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.line-ctl select { flex: 1 1 160px; width: auto; }
.cbox { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--color-divider); border-radius: 8px; background: var(--color-card); color: #fff; }
.cbox.on { background: var(--color-accent); border-color: var(--color-accent); }
.cbox svg { width: 15px; height: 15px; }
.extras { display: flex; flex-direction: column; gap: 8px; }
.extra-row { display: flex; gap: 8px; align-items: center; }
.extra-row > .input { flex: 1; }

/* ── photos ───────────────────────────────────────────── */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.photos-sm { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.photo { position: relative; padding: 0; border: 1px solid var(--color-hair); background: var(--color-card); cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: var(--r-md); overflow: hidden; }
.photo .ph { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--color-accent-100); }
.ph-empty { display: grid; place-items: center; }
.photo .cap { display: block; padding: 5px 8px; font-size: 11.5px; font-weight: 600; color: var(--color-accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-add { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1.5px dashed var(--color-accent-300); border-radius: var(--r-md); background: var(--color-accent-50); color: var(--color-accent); cursor: pointer; font-family: var(--font-heading); font-weight: 500; font-size: 14px; }
.photo-add > span { display: grid; justify-items: center; gap: 4px; padding: 4px; text-align: center; }
.photo-add svg { width: 26px; height: 26px; }
.photo-add.small { font-size: 12.5px; }
.photo-add.small svg { width: 22px; height: 22px; }
.photo-preview { max-height: 36vh; width: auto; margin: 0 auto; border-radius: var(--r-md); }

/* ── diary ────────────────────────────────────────────── */
.day-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wday { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; border: 1px solid var(--color-hair); border-radius: var(--r-md); background: var(--color-card); cursor: pointer; font: inherit; color: inherit; }
.wday .d { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: 600; }
.wday .n { font-family: var(--font-heading); font-weight: 600; font-size: 21px; line-height: 1.1; }
.wday .c { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--color-accent); min-height: 15px; }
.icon-paw { width: 12px; height: 12px; }
.wday.today .n { color: var(--color-accent); }
.wday.sunday { opacity: .6; }
.wday[aria-pressed="true"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); opacity: 1; }
.wday[aria-pressed="true"] .d, .wday[aria-pressed="true"] .c, .wday[aria-pressed="true"] .n { color: inherit; }
.route-btn { border-color: color-mix(in srgb, var(--teal) 45%, transparent); }
.route-btn svg { color: var(--teal); }

.board { padding: 14px 18px 12px; }
.board-scroll { overflow-x: auto; }
.board-inner { min-width: 760px; }
.board-hours { display: flex; margin-left: 150px; padding-bottom: 8px; }
.board-hours span { flex: 1; font-size: 11px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.board-row { display: flex; align-items: stretch; border-top: 1px solid var(--color-hair); min-height: 70px; }
.board-who { width: 150px; flex: none; padding: 11px 10px 11px 0; border-right: 1px solid var(--color-hair); }
.board-who .n { font-family: var(--font-heading); font-weight: 600; font-size: 15px; }
.board-who .r { font-size: 11.5px; color: var(--color-muted); }
.board-track { position: relative; flex: 1; }
.sblock { position: absolute; top: 8px; bottom: 8px; border: 1px solid var(--color-divider); border-radius: 12px; padding: 4px 9px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 1px; cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 36px; }
.sblock strong { font-family: var(--font-heading); font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sblock em { font-size: 11px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.sb-live { background: var(--color-accent-100); border-color: var(--color-accent-400); color: var(--color-accent-800); }
.sb-plan { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 40%, transparent); color: var(--teal-deep); }
.sb-done { background: var(--color-neutral-100); border-color: var(--color-neutral-300); color: var(--color-neutral-700); }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pink); opacity: .6; pointer-events: none; }
.board-legend { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--color-hair); font-size: 11.5px; color: var(--color-muted); }
.board-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border: 1px solid var(--color-divider); border-radius: 4px; display: inline-block; }
.lg-now { width: 2px; height: 12px; background: var(--pink); display: inline-block; }
.agenda { display: flex; flex-direction: column; overflow: hidden; }
.agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--color-hair); }
.agenda-head .n { font-family: var(--font-heading); font-weight: 600; font-size: 16.5px; }

/* ── only on wide / narrow ───────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); padding: 12px; border-bottom: 1px solid var(--color-divider); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--color-hair); vertical-align: middle; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover { background: color-mix(in srgb, var(--pink) 4%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.only-wide { display: none; }
@media (min-width: 900px) { .only-wide { display: block; } .only-narrow { display: none; } }

/* ── money ────────────────────────────────────────────── */
.bar-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 10px; align-items: center; font-size: 14px; padding: 4px 0; }
.bar-row .bar { height: 10px; border-radius: var(--r-pill); background: var(--color-neutral-100); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--pink), var(--teal)); }
.bar-row.total { font-weight: 700; font-family: var(--font-heading); font-size: 17px; }
.channel-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.channel { font-size: 14px; color: var(--color-muted); }
.channel strong { font-family: var(--font-heading); font-size: 19px; color: var(--color-text); margin-right: 2px; }

/* ── settings ─────────────────────────────────────────── */
.svc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--color-hair); border-radius: var(--r-md); background: var(--color-accent-50); }
.svc-head { display: flex; gap: 8px; align-items: center; }
.svc-name { font-family: var(--font-heading); font-size: 18px; font-weight: 600; }
.svc-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.svc-prices .price-in { display: grid; grid-template-columns: auto 1fr; gap: 2px 6px; align-items: center; }
.svc-prices .pz { grid-column: 1 / -1; font-size: 12px; color: var(--color-muted); }
.svc-prices .price-in .input { width: 100%; }
.tpl { display: grid; gap: 8px; }
.tpl-preview { padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #DCF8C6; color: #1b2a1b; font-size: 14px; white-space: pre-wrap; max-width: 520px; }
.tpl-preview .label { display: block; color: #4a6a4a; margin-bottom: 2px; }
:root[data-theme="dark"] .tpl-preview { background: #1f3a2a; color: #e6f5e6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tpl-preview { background: #1f3a2a; color: #e6f5e6; } }
.steps-ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

/* ── dialogs / sheets ─────────────────────────────────── */
.backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: color-mix(in srgb, #1d0d14 55%, transparent); animation: fade .16s ease-out; }
.sheet {
  position: relative; width: 100%; max-height: min(92vh, 92dvh); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--color-bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: up .2s ease-out;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-title { font-family: var(--font-heading); font-weight: 600; font-size: 22px; }
.sheet-actions { position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 0 4px; margin-bottom: -4px; background: linear-gradient(transparent, var(--color-bg) 30%); }
.sheet-actions .btn { flex: 1 1 auto; }
@media (min-width: 700px) {
  .backdrop { align-items: center; padding: 24px; }
  .sheet { width: min(560px, 100%); border-radius: 22px; padding: 22px 24px; }
  .sheet-wide { width: min(760px, 100%); }
  .sheet-actions { position: static; background: none; }
  .sheet-actions .btn { flex: 0 0 auto; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }

.dlg-host { display: contents; }
.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; font-size: 16px; color: inherit; width: 100%; }
.menu-item + .menu-item { border-top: 1px solid var(--color-hair); }
.menu-item > svg { width: 21px; height: 21px; color: var(--color-accent); flex: none; }
.menu-item .grow { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  z-index: 80; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 32px);
  padding: 11px 18px; background: #2A1520; color: #fff; box-shadow: var(--shadow-lg); border-radius: var(--r-pill);
  font-family: var(--font-heading); font-weight: 500; font-size: 15px; animation: up .18s ease-out;
}
.toast svg { width: 18px; height: 18px; flex: none; color: #F7A8C7; }
.toast.err { background: var(--bad-fg); }
.toast.err svg { color: #fff; }
@media (min-width: 960px) { .toast { bottom: 28px; } }

.banner { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font: inherit; font-size: 14px; text-align: left; background: var(--warn-bg); color: var(--warn-fg); border: 1px solid color-mix(in srgb, var(--warn-fg) 22%, transparent); border-radius: var(--r-md); }
button.banner { cursor: pointer; width: 100%; }
.banner svg { width: 19px; height: 19px; flex: none; }
.banner.info { background: var(--info-bg); color: var(--info-fg); border-color: color-mix(in srgb, var(--info-fg) 22%, transparent); }
.banner-flat { border-radius: 0; border-width: 0 0 1px; }

.empty { padding: 26px 16px; text-align: center; color: var(--color-muted); font-size: 14.5px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty svg { width: 34px; height: 34px; color: var(--color-accent-300); }

.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(20, 8, 14, .93); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-height: 76vh; width: auto; max-width: 100%; object-fit: contain; border-radius: var(--r-md); }
.lightbox .cap { color: #FBE6EF; font-size: 14px; text-align: center; }
.lightbox .btn-row { justify-content: center; }

.fab-new { gap: 6px; }
.hide-narrow { display: none; }
@media (min-width: 600px) { .hide-narrow { display: inline; } }

/* ── login / loading ──────────────────────────────────── */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login { width: min(410px, 100%); padding: 28px 24px; display: flex; flex-direction: column; gap: 18px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loading .pawmark { animation: bob 1.1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ── the invoice: the approved document layout (27 Oct 2026) in Amanda's colours ── */
.fit-a4 { position: relative; overflow: hidden; }
.fit-a4-inner { width: 210mm; transform-origin: top left; box-shadow: var(--shadow-md); }
.invdoc { --brand: #C93A6E; --brand2: #3E929E; background: #fff; color: #1f2937; font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 9pt; line-height: 1.4;
  -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.invdoc .page { width: 210mm; min-height: 297mm; padding: 13mm 15mm 22mm; position: relative; }
.invdoc header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8mm; }
.invdoc .doc-logo { display: flex; align-items: center; gap: 3mm; height: 16.5mm; margin-left: -1mm; }
.invdoc .doc-paw { width: 14mm; height: 14mm; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #EF79A7, #DC3F7C); flex: none; }
.invdoc .doc-paw svg { width: 8.4mm; height: 8.4mm; }
.invdoc .doc-logo-text { display: flex; flex-direction: column; line-height: 1; }
.invdoc .doc-script { font-family: 'Dancing Script', cursive; font-weight: 700; font-size: 19pt; color: #E0457F; }
.invdoc .doc-mdg { font-family: 'Fredoka', 'Inter', sans-serif; font-weight: 600; font-size: 10.5pt; color: #161616; margin-top: .6mm; }
.invdoc .doc-pta { font-family: 'Fredoka', 'Inter', sans-serif; font-weight: 500; font-size: 8pt; color: #3E929E; margin-top: .4mm; }
.invdoc .brand-contact { font-size: 8.1pt; color: #4b5563; line-height: 1.5; margin-top: 2.2mm; }
.invdoc .brand-contact b { color: #1f2937; font-weight: 600; }
.invdoc .title { text-align: right; }
.invdoc .title h1 { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 21pt; letter-spacing: .07em; color: var(--brand); margin: 1mm 0 2.5mm; font-weight: 800; }
.invdoc table.meta { margin-left: auto; border-collapse: collapse; font-size: 8.8pt; }
.invdoc table.meta td { padding: .6mm 0; }
.invdoc table.meta td.k { color: #6b7280; padding-right: 5mm; text-align: left; }
.invdoc table.meta td.v { font-weight: 600; text-align: right; }
.invdoc .bar { height: 1.3mm; border-radius: 1mm; margin: 4mm 0 4.5mm; background: linear-gradient(90deg, var(--brand) 0 74%, var(--brand2) 74% 100%); }
.invdoc .top { display: grid; grid-template-columns: 64mm 1fr; gap: 6mm; align-items: stretch; }
.invdoc .box { border: 1px solid #dde4f0; border-radius: 2mm; padding: 3.2mm 4mm; background: #f7f9fd; }
.invdoc .lbl { font-size: 7.2pt; text-transform: uppercase; letter-spacing: .09em; color: var(--brand); font-weight: 700; margin-bottom: 1.4mm; }
.invdoc .who { font-weight: 700; font-size: 10.6pt; color: #111827; }
.invdoc .whosub { color: #4b5563; font-size: 8.3pt; line-height: 1.5; margin-top: .8mm; }
.invdoc h3 { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; font-size: 8.3pt; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin: 4.6mm 0 1.8mm; font-weight: 700; }
.invdoc table.items { width: 100%; border-collapse: collapse; }
.invdoc table.items th { background: var(--brand); color: #fff; font-weight: 600; font-size: 8pt; text-align: left; padding: 2mm 2.4mm; }
.invdoc table.items th.num { text-align: right; }
.invdoc table.items td { padding: 2mm 2.4mm; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.invdoc table.items td.c { color: #6b7280; font-size: 8pt; white-space: nowrap; }
.invdoc .desc b { display: block; font-weight: 600; color: #111827; }
.invdoc .desc span.sub { display: block; color: #6b7280; font-size: 8pt; margin-top: .6mm; }
.invdoc .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.invdoc .after-items { display: grid; grid-template-columns: 1fr 68mm; gap: 7mm; margin-top: 3mm; align-items: start; }
.invdoc .note { font-size: 8pt; color: #4b5563; line-height: 1.5; }
.invdoc table.totals { width: 100%; border-collapse: collapse; font-size: 9pt; }
.invdoc table.totals td { padding: 1.5mm 2.4mm; }
.invdoc table.totals tr.grand td { background: var(--brand); color: #fff; font-weight: 700; font-size: 10.2pt; padding: 2.2mm 2.4mm; }
.invdoc table.totals tr.sub td { color: #6b7280; }
.invdoc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-top: 4.2mm; }
.invdoc .two.wide { grid-template-columns: 1.25fr 1fr; }
.invdoc .box h4 { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; margin: 0 0 1.8mm; font-size: 7.2pt; text-transform: uppercase; letter-spacing: .09em; color: var(--brand); }
.invdoc .box p { margin: 0 0 1.2mm; }
.invdoc table.kv { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.invdoc table.kv td { padding: 1.2mm 0; border-bottom: 1px solid #e8edf5; vertical-align: top; }
.invdoc table.kv tr:last-child td { border-bottom: 0; }
.invdoc table.kv td:first-child { color: #6b7280; width: 29%; padding-right: 3mm; white-space: nowrap; }
.invdoc .paid { display: inline-block; font-size: 8pt; font-weight: 800; letter-spacing: .12em; color: #166534; border: 1.5px solid #166534; border-radius: 1.2mm; padding: .8mm 2.4mm; margin-top: 2mm; }
.invdoc footer { position: absolute; bottom: 9mm; left: 15mm; right: 15mm; display: flex; justify-content: space-between; font-size: 7.6pt; color: #6b7280; border-top: 1px solid #e5e7eb; padding-top: 2.4mm; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .topbar, .sidebar, .bottom-nav, .preview-bar, .no-print, .toast, .back { display: none !important; }
  .main { padding: 0 !important; }
  .view { max-width: none !important; gap: 0 !important; margin: 0 !important; }
  .fit-a4 { height: auto !important; overflow: visible; }
  .fit-a4-inner { transform: none !important; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── dog profile: stats and groom history ── */
.pet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.pstat { background: var(--color-card); border: 1px solid var(--color-divider); border-radius: var(--r-md); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pstat-v { font-family: var(--font-heading); font-weight: 600; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstat-l { font-size: 12.5px; color: var(--color-muted); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 12px; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px; background: var(--color-divider); border-radius: 2px; }
.visit { position: relative; }
.visit-dot { position: absolute; left: -21px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 3px var(--color-bg); }
.visit-miss .visit-dot { background: var(--color-faint); top: 14px; }
.visit-next .visit-dot { background: var(--teal); }
.visit-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.visit-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.visit-date { font-weight: 600; }
.visit-steps summary { cursor: pointer; font-size: 13.5px; color: var(--color-muted); }
.visit-steps ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; }
.visit-steps li { display: flex; gap: 6px; align-items: center; }
.visit-steps li svg { width: 14px; height: 14px; flex: none; }
.visit-steps li.ok svg { color: var(--ok-fg); }
.visit-steps li.skip { color: var(--color-muted); }
.visit-foot { display: flex; justify-content: space-between; gap: 8px; margin: -2px -8px -6px; }
.visit-miss-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 6px 0; text-align: left; }
.visit-next-card { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-style: dashed; text-align: left; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.visit-next-card > svg { width: 20px; height: 20px; color: var(--teal); flex: none; }
.visit-next-card > span { display: flex; flex-direction: column; gap: 2px; }
.vsum { display: flex; flex-direction: column; gap: 8px; }
.vsum .chip { cursor: default; min-height: 30px; padding: 4px 11px; font-size: 13.5px; }
.vsum-note { white-space: pre-wrap; }
.visit-box { border-top: 1px dashed var(--color-divider); padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.visit-box-head { display: flex; justify-content: space-between; align-items: center; }
.lasttime { background: var(--teal-soft); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.lasttime .label { color: var(--teal-deep); }
.visit-sheet-head { display: flex; gap: 12px; align-items: center; }

/* booking form: how many dogs, instructions per dog */
.dogcount { display: flex; flex-direction: column; gap: 6px; }
.dogpick-new-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ask-in { min-height: 56px; }
.note-line.ask { background: color-mix(in srgb, var(--pink) 9%, transparent); padding: 8px 10px; border-radius: var(--r-sm); }
.note-line.ask svg { color: var(--pink); }
.btn-gcal { align-self: flex-start; }
