/* 518 Tax Group brand (brand kit v1): Navy #1F3A5F (who we are: logo, headings, header and
   footer), Royal #2456D6 (what to do next: buttons and links only), Gold #E3A72F (one highlight,
   a fill, never text), Ink #18212B, Paper #F7F5F0. The "navy"/"gold" token names are kept: "gold"
   is the button (action) colour, now Royal. + SPEC §8: every text pair meets WCAG AA. */

/* hidden always wins: an element marked hidden never shows, whatever display its class sets
   (a branding screen once covered the kiosk this way). */
[hidden] { display: none !important; }

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("../fonts/noto-sans-bengali.267d58fcaf95.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0964-0965, U+0980-09FE, U+200C-200D, U+25CC;
}

/* The brand's faces (OFL, self-hosted from Google Fonts): Inter for text, Plus Jakarta Sans for
   headings, Hind Siliguri for all Bangla (it matches Inter in weight and size). */
@font-face { font-family: "Inter"; src: url("../fonts/inter.811198adf090.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans.7660bd9909fb.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-400.7bcc67f8ae55.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-500.a18a941b8c4c.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-600.c68005dea382.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }
@font-face { font-family: "Hind Siliguri"; src: url("../fonts/hind-siliguri-700.aaff84f1d216.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1, U+11DF0-11DF1; }

/* Poppins (OFL), the free geometric face in Calendly's type system; Bangla glyphs fall back to
   Noto Sans Bengali. Self-hosted, Latin only. */
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-400.9212f6f9860f.woff2") format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-500.a09f2fccfee3.woff2") format("woff2"); font-weight: 500; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-600.72993dddf88a.woff2") format("woff2"); font-weight: 600; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-700.25b0e113ca7c.woff2") format("woff2"); font-weight: 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Core palette */
  --navy: #1f3a5f;          /* brand: header, headings, the footer */
  --deep-navy: #172c47;     /* navy hover */
  --navy-pressed: #122237;
  --bright-blue: #2456d6;   /* Royal: accents on white */
  --sky: #8fb0ff;           /* highlights on navy (the logo's back page on dark) */
  --ice: #c7ced7;           /* text on navy */
  --mist: #e4ebf3;          /* navy-soft: highlight panels, chips */
  --gold: #2456d6;          /* the button colour (Royal): ONE main action per screen ("Book a time") */
  --gold-hover: #1b44b0;    /* royal-dark */
  --on-gold: #ffffff;       /* 6.2:1 on Royal, 8.4:1 on royal-dark */
  --highlight: #e3a72f;     /* Gold: a fill only, once per screen; text on it is ink or navy */
  --highlight-soft: #fbf0d9;
  --paper: #f7f5f0;         /* the website's page background */
  --ink: #18212b;           /* text */
  --slate: #4a5363;         /* secondary text */
  --muted: #596372;         /* placeholders, captions */
  --white: #ffffff;
  --surface: #f7f8f9;       /* cards, form sections */
  --border: #d2d8df;        /* inputs, dividers */
  --border-strong: #a5b0bf; /* outlines of tappable options */
  --link: #2456d6;
  --focus: #2456d6;
  /* Status messages */
  --success: #16703e; --success-bg: #e5f4eb;
  --error: #c0362c;   --error-bg: #fbe8e6;
  --warning: #8a5a00; --warning-bg: #fef3d7;
  --info: #1f3a5f;    --info-bg: #e4ebf3;

  --info-border: #bcc4cf; --success-border: #a9d9bb;
  --warning-border: #ead08f; --error-border: #efb8b2;

  /* Depth: brand gradients and soft shadows (all text stays solid colour, AA contrast) */
  --grad-navy: linear-gradient(135deg, #3a5272 0%, #1f3a5f 48%, #172c47 100%);
  --grad-navy-hover: linear-gradient(135deg, #1c3456 0%, #172c47 60%, #122237 100%);
  --grad-gold: linear-gradient(#2456d6, #2456d6);
  --grad-gold-hover: linear-gradient(#1b44b0, #1b44b0);
  --grad-sky: linear-gradient(135deg, #f4f5f7 0%, #e4e7ec 100%);
  --grad-selected: linear-gradient(135deg, #eff1f4 0%, #dde1e7 100%);
  --grad-success: linear-gradient(135deg, #1f8a4f 0%, #16703e 100%);
  --page-wash: linear-gradient(180deg, #edeff2 0px, rgba(31, 58, 95, 0) 320px);
  --shadow-1: 0 1px 2px rgba(23, 44, 71, .06), 0 3px 10px rgba(23, 44, 71, .07);
  --shadow-2: 0 2px 4px rgba(23, 44, 71, .06), 0 10px 28px rgba(23, 44, 71, .12);
  --shadow-btn: 0 2px 6px rgba(23, 44, 71, .22);
  --shadow-gold: 0 3px 10px rgba(27, 68, 176, .28);

  --radius: 10px;      /* controls */
  --radius-card: 14px; /* cards and panels */
  --tap: 48px;
  --font-head: "Plus Jakarta Sans", "Inter", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-family: "Inter", "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; caret-color: var(--navy); }
::selection { background: var(--ice); color: var(--ink); }
.icon { flex: none; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
/* digits that line up: times, codes, phone numbers */
.ltr, .appt-time, .booked-code strong, .admin-when, .hours-chip, .slot > span, .week-list a span {
  font-variant-numeric: tabular-nums; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-size: 1.125rem; /* 18px */
  line-height: 1.6;
}
:lang(bn) body, body:lang(bn) { line-height: 1.7; }

h1, h2, h3 { color: var(--navy); font-family: var(--font-head); line-height: 1.3; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.3rem; font-weight: 700; margin-top: 1.75rem; }
p { margin: 0 0 .75rem; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; padding: 12px 16px;
  background: var(--navy); color: var(--white); border-radius: 8px; z-index: 10;
}
.skip-link:focus { top: 8px; }

/* Top bar: language toggle left, call right (SPEC §4.1). The colour spans the window; the
   controls line up with the page column below. */
.topbar { padding: 8px 0; background: var(--navy); color: var(--white); }
.bar-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 36rem; margin: 0 auto; padding: 0 16px;
}
.admin .bar-inner { max-width: 64rem; }
.topbar a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); min-width: var(--tap); padding: 0 16px;
  border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--white);
}
/* Language: English first; the Bangla button is the one gold thing in the bar (most of our
   clients read Bangla). In Bangla, the way back to English is a quiet outline. */
.lang-btn.lang-to-bn { background: var(--grad-gold); color: var(--on-gold); font-size: 1.15rem; font-weight: 700;
  box-shadow: var(--shadow-gold); padding: 0 18px 0 14px; }
.lang-btn.lang-to-bn:hover { background: var(--grad-gold-hover); color: var(--on-gold); }
.lang-btn.lang-to-bn .icon { width: 1.1em; height: 1.1em; }
.lang-btn.lang-to-en { border: 2px solid var(--ice); }
.lang-btn.lang-to-en:hover { border-color: var(--white); }
.call-btn { background: var(--white); color: var(--navy) !important; }
.call-btn:hover { background: var(--mist); }

main { max-width: 36rem; margin: 0 auto; padding: 24px 16px 48px; }
html { scroll-behavior: smooth; }

.muted { color: var(--slate); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; }

.brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.brand img { width: 88px; height: 88px; border-radius: 22px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: var(--tap); min-width: 4.5rem; padding: 6px 12px;
  border: 2px solid var(--border-strong); border-radius: var(--radius); background: var(--white);
}
.chip strong { color: var(--navy); }

.ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Booking page (SPEC §4.1-4.4) */
.hero { margin-bottom: 4px; }
.hero h1 { margin: 0 0 12px; }
.identity { display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px; border-radius: var(--radius-card); background: var(--surface); }
.identity-text { min-width: 0; }
.hero-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); box-shadow: 0 2px 8px rgba(23, 44, 71, .16); }
.hero-photo-placeholder { display: flex; align-items: center; justify-content: center; background: var(--mist); }
.hero-name { margin: 0; font-weight: 700; font-size: 1.15rem; line-height: 1.35; }
.hero-logo { display: block; width: 130px; height: auto; margin: 4px 0 6px; }
.hero-sub { margin: 0; color: var(--slate); font-size: 1rem; line-height: 1.45; }
.hero-sub > span { display: block; }

/* One full-width row per day, so the whole month name fits (SPEC §4.2) */
.days { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.day {
  display: flex; align-items: center; flex-wrap: wrap; column-gap: 10px;
  min-height: 60px; padding: 8px 16px; border: 2px solid var(--border-strong); border-radius: var(--radius);
  background: var(--white); color: var(--ink); text-decoration: none;
}
.day strong { color: var(--navy); font-size: 1.2rem; }
.day-date { color: var(--ink); }
.day:hover { border-color: var(--bright-blue); }
/* Selected: thicker border + check mark + bold, not color alone (SPEC §4.2) */
.day[aria-current] { border: 3px solid var(--navy); background: var(--mist); font-weight: 700; }
.day[aria-current]::after, .slot input:checked + span::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.day[aria-current]::after { margin-left: auto; width: 24px; height: 24px; background-size: 16px; }

.more-days { margin-top: 12px; }
.more-days summary {
  display: flex; align-items: center; justify-content: center; min-height: var(--tap);
  color: var(--navy); font-weight: 600; cursor: pointer; list-style: none; text-decoration: underline; text-underline-offset: 3px;
}
.more-days summary::-webkit-details-marker { display: none; }
.more-days[open] summary { margin-bottom: 8px; }
.more-days .days { max-height: 24rem; overflow-y: auto; padding: 2px; }

.times { scroll-margin-top: 12px; }
.times h2:focus { outline: none; }
.slot-group { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.slot-group legend { padding: 0; margin-bottom: 6px; font-weight: 700; color: var(--slate); }
.slots { display: flex; flex-wrap: wrap; gap: 10px; }
.slot { position: relative; }
.slot input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.slot > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; min-width: 6rem; padding: 0 14px; border: 2px solid var(--border-strong); border-radius: var(--radius);
  background: var(--white); color: var(--navy); font-weight: 600; font-size: 1.15rem; font-variant-numeric: tabular-nums;
}
.slot input:hover + span { border-color: var(--bright-blue); }
.slot input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
.slot input:checked + span::before { background-color: var(--white); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230e5a5c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.slot input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.loading { color: var(--slate); }

.book-bar { margin-top: 24px; padding: 12px 0; background: var(--white); }
.help-line { margin: 0 0 8px; text-align: center; color: var(--slate); font-size: 1rem; }
.help-line a { font-weight: 600; }
.book-hint { margin: 6px 0 0; text-align: center; color: var(--slate); font-size: 1rem; }
.book-hint[hidden] { display: none; }
@media (max-width: 47.99rem) {
  /* Sticks to the bottom of the screen on phones (SPEC §4.4) */
  .book-bar {
    position: sticky; bottom: 0; z-index: 5; margin: 24px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border); box-shadow: 0 -4px 12px rgba(23, 44, 71, .08);
  }
}

.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px;
  padding: 0 20px; border: 0; border-radius: var(--radius); background: var(--navy); color: var(--on-navy, var(--white));
  font: inherit; font-size: 1.25rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary:hover { background: var(--deep-navy); color: var(--on-navy, var(--white)); }
.btn-primary:active { background: var(--navy-pressed); }
.btn-gold { background: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); color: var(--on-gold); }
.btn-primary:disabled { background: var(--border); color: var(--slate); cursor: not-allowed; }

.notice { padding: 12px 14px; border: 1px solid var(--info-border); border-radius: var(--radius); background: var(--info-bg); color: var(--ink); }
.notice-warning { border-color: var(--warning-border); background: var(--warning-bg); }
.notice-error { border-color: var(--error-border); background: var(--error-bg); }
.empty-state { margin-top: 24px; text-align: center; }
.empty-state p { font-size: 1.2rem; }
.summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary a { min-height: var(--tap); display: inline-flex; align-items: center; font-weight: 600; }

/* Details sheet (SPEC §4.5): a bottom sheet on phones, a centered panel on desktop */
.sheet {
  width: 100%; max-width: 36rem; max-height: 92vh; margin: auto auto 0; padding: 0;
  border: 0; border-radius: 18px 18px 0 0; background: var(--white); color: var(--ink);
  box-shadow: 0 -8px 30px rgba(23, 44, 71, .25); overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(23, 44, 71, .5); }
.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } }
@media (min-width: 48rem) { .sheet { margin: auto; border-radius: 16px; max-height: 88vh; } }
#sheet-body { padding: 8px 16px 0; }
#sheet-body::before { /* grab handle look */
  content: ""; display: block; width: 44px; height: 5px; margin: 4px auto 10px;
  border-radius: 3px; background: var(--border);
}
.sheet-page { max-width: 32rem; margin: 0 auto; }

.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; }
.sheet-head h2:focus { outline: none; }
.sheet-summary { margin: 2px 0 0; font-weight: 600; }
.sheet-change { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 6px; font-weight: 600; white-space: nowrap; }

.details .field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.details label, .details legend { display: block; margin-bottom: 6px; font-weight: 600; padding: 0; }
.details input[type="text"], .details input[type="tel"], .details input[type="email"], .details select, .details textarea {
  display: block; width: 100%; min-height: 52px; padding: 10px 14px;
  border: 2px solid var(--border-strong); border-radius: var(--radius);
  background: var(--white); color: var(--ink); font: inherit;
}
.details textarea { min-height: 96px; resize: vertical; }
.details input:focus, .details select:focus, .details textarea:focus { border-color: var(--focus); outline: 3px solid rgba(31, 58, 95, .3); outline-offset: 0; }
.details input[aria-invalid="true"], .details select[aria-invalid="true"], .details textarea[aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.details ::placeholder { color: var(--muted); opacity: 1; }
.field-error { margin: 6px 0 0; color: var(--error); font-weight: 600; font-size: 1rem; }
.hint { margin: 6px 0 0; color: var(--slate); font-size: 1rem; }
.counter { text-align: right; }

.check { display: flex !important; align-items: flex-start; gap: 12px; margin: 0 0 18px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-weight: 400 !important; cursor: pointer; }
.check input { flex: none; width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--navy); }

.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; margin: 0 !important; font-weight: 400 !important; }
.pick[hidden] { display: none !important; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick > span {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: var(--tap); padding: 8px 14px;
  border: 2px solid var(--border-strong); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.pick small { flex-basis: 100%; color: var(--slate); font-size: .9rem; }
/* Services and ways to meet: one full-width row per choice, like the day rows (same vocabulary) */
.picks-rows { flex-direction: column; }
.picks-rows .pick > span { display: flex; width: 100%; min-height: 52px; padding: 10px 14px; }
.picks-rows .pick input:checked + span { padding: 9px 13px; }
/* Each question in the details form starts a new group: more space above than below */
.details fieldset.field { margin-top: 24px; }
.details .check + fieldset.field { margin-top: 22px; }
.details .field > legend { margin-bottom: 8px; }
.pick input:hover + span { border-color: var(--bright-blue); }
.pick input:checked + span { border: 3px solid var(--navy); padding: 7px 13px; background: var(--mist); font-weight: 700; }
.pick input:checked + span::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.pick input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.more-info { margin: 0 0 16px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.more-info summary { display: flex; align-items: center; min-height: 52px; font-weight: 600; color: var(--link); cursor: pointer; }
.more-info summary::after { content: ""; width: 18px; height: 18px; margin-left: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d63b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s ease-out; }
.more-info[open] summary::after { transform: rotate(180deg); }
.more-info[open] { padding-bottom: 4px; }

.privacy { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--warning-bg); color: var(--warning); font-weight: 600; font-size: 1rem; }
.sheet-submit { position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--border); }
.sheet-page .sheet-submit { margin: 0; padding-left: 0; padding-right: 0; }

/* Confirmation / booking page (SPEC §4.6): compact enough for one phone screenshot */
.booked h1 { font-size: 1.3rem; margin: 0; }
.booked-hero { display: flex; align-items: center; gap: 12px; margin: -8px 0 10px; }
.booked-hero h1 { color: var(--success); }
.booked-check {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--success)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.booked-cancelled { color: var(--error); margin-bottom: 14px !important; }
.booked > h1:not(.booked-cancelled) { margin-bottom: 14px; }
.booked-card { padding: 10px 14px; border: 2px solid var(--navy); border-radius: 14px; background: var(--white); }
.booked-card.is-cancelled { border-color: var(--border-strong); opacity: .75; }
.booked-card.is-cancelled .booked-when { text-decoration: line-through; }
.booked-card p { margin: 0; }
.booked-owner { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.booked-owner img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.booked-owner div { display: flex; flex-direction: column; line-height: 1.3; }
.booked-owner span { color: var(--slate); font-size: .95rem; }
.booked-code { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.booked-code span { color: var(--slate); }
.booked-code strong { font-size: 1.6rem; letter-spacing: .05em; color: var(--navy); }
.booked-when { margin-top: 2px !important; font-size: 1.1rem; line-height: 1.4; }
.booked-meta { margin-top: 4px !important; color: var(--slate); font-size: 1rem; line-height: 1.4; }

.booked-bring { margin-top: 10px; padding: 8px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.booked-bring h2 { margin: 0 0 2px; font-size: 1.05rem; }
.booked-bring ul { margin: 0; padding-left: 1.2rem; font-size: 1rem; line-height: 1.45; }

.booked-wa { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 8px 14px; font-size: 1rem; border-radius: var(--radius); background: var(--success-bg); color: var(--success); font-weight: 600; }
.booked-actions { display: grid; gap: 8px; margin-top: 10px; }
.btn-outline {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 16px;
  border: 2px solid var(--navy); border-radius: var(--radius); color: var(--navy); font-weight: 700; text-decoration: none;
}
.btn-outline:hover { background: var(--mist); color: var(--navy); }
button.btn-outline { background: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.admin-nav a[aria-current] { background: rgba(255, 255, 255, .18); }
.booked-tip { text-align: center; }
.manage-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-danger { border-color: var(--error); color: var(--error); }
.btn-danger:hover { background: var(--error-bg); color: var(--error); }
.btn-danger-solid { background: var(--error); }
.btn-danger-solid:hover { background: #9c2b23; }
.cutoff p { margin: 0 0 10px; }
.reschedule-head h1 { margin-bottom: 8px; }
.reschedule-head .panel { margin: 0 0 6px; line-height: 1.5; }
.back-link { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.dead-link { text-align: center; padding-top: 12px; }
.dead-link h1 { margin-bottom: 8px; }
.booked-call { margin-top: 12px; text-align: center; color: var(--slate); }
.booked-call a { font-weight: 600; }

/* Admin (English only, SPEC §7) */
.admin-bar .admin-brand { padding: 0 8px 0 0; gap: 8px; font-size: 1.1rem; }
.admin-brand img { border-radius: 6px; }
.admin-nav { display: flex; align-items: center; gap: 4px; margin: 0; }
.admin-nav form { margin: 0; }
.admin-nav a, .admin-nav button {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--white); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.admin-nav a:hover, .admin-nav button:hover { background: rgba(255, 255, 255, .12); }
.admin-card { max-width: 26rem; margin: 8px auto 0; }
.admin-card .btn-primary { margin-top: 4px; }
.details input[type="password"] {
  display: block; width: 100%; min-height: 52px; padding: 10px 14px; border: 2px solid var(--border-strong);
  border-radius: var(--radius); background: var(--white); color: var(--ink); font: inherit;
}
.admin-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.admin-stats .panel { display: flex; flex-direction: column; align-items: center; margin: 0; }
.admin-stats strong { font-size: 2rem; color: var(--navy); line-height: 1.2; }

/* Admin appointments (SPEC §7.1) */
.admin-main { max-width: 64rem; }
.admin-detail { max-width: 44rem; }
.admin-tabs { position: sticky; top: 0; z-index: 4; padding: 6px 0; background: var(--white); border-bottom: 1px solid var(--border); }
.admin-tabs .bar-inner { justify-content: flex-start; gap: 2px; padding: 0 8px; overflow-x: auto; }
.admin-tabs a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 11px;
  border-radius: 999px; color: var(--slate); font-size: 1rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.admin-tabs a:hover { background: var(--mist); color: var(--navy); }
.admin-tabs a[aria-current] { background: var(--navy); color: var(--white); }
.admin-tabs a[aria-label="Search"] { margin-left: auto; }
.admin-head { margin-bottom: 12px; }
.admin-head h1 { margin: 0; }
.admin-head p { margin: 2px 0 0; }
.admin-footer { max-width: 64rem; margin: 0 auto; padding: 16px; color: var(--slate); font-size: 1rem; text-align: center; }
.notice-success { border-color: var(--success-border); background: var(--success-bg); }

.appts { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.appt { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-card); background: var(--white); }
.appt:hover { border-color: var(--border-strong); }
.appt.is-cancelled { opacity: .6; }
.admin-status { display: flex; align-items: center; gap: 8px; }
.appt-main { flex: 1 1 14rem; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; min-width: 0; }
.appt-time { font-weight: 700; color: var(--navy); }
.appt-name { font-size: 1.15rem; font-weight: 700; }
.appt-meta, .appt-note { color: var(--slate); font-size: 1rem; }
.appt-note { font-style: italic; overflow-wrap: anywhere; }
.appt-side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.appt-call { display: inline-flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 0 12px;
  border: 2px solid var(--navy); border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .85rem;
  font-weight: 700; background: var(--info-bg); color: var(--info); }
.badge-done { background: var(--success-bg); color: var(--success); }
.badge-no_show { background: var(--error-bg); color: var(--error); }
.badge-follow_up { background: var(--warning-bg); color: var(--warning); }
.badge-cancelled { background: var(--surface); color: var(--slate); text-decoration: line-through; }
.badge-wa { background: var(--success-bg); color: var(--success); }

.admin-day h2 { font-size: 1.1rem; margin: 18px 0 8px; }
.admin-more summary { min-height: var(--tap); display: flex; align-items: center; color: var(--link); font-weight: 600; cursor: pointer; }

.week-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: center; }
.week-arrow { min-width: var(--tap); padding: 0 12px; }
.week-head h1 { font-size: 1.35rem; }
.week { display: grid; gap: 10px; }
@media (min-width: 64rem) { .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.week-day { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.week-day.is-today { border: 2px solid var(--navy); }
.week-day h2 { font-size: 1rem; margin: 0 0 6px; }
.week-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.week-list a { display: block; padding: 6px 8px; border-radius: 8px; background: var(--mist); color: var(--ink); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.week-list a span { display: block; font-weight: 700; color: var(--navy); font-size: .9rem; }
.week-list a.is-done { background: var(--success-bg); }
.week-list a.is-no_show { background: var(--error-bg); }
.week-list a.is-follow_up { background: var(--warning-bg); }
.week-empty { margin: 0; }
.week-day:has(.week-empty) { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; }
.week-day:has(.week-empty) h2 { margin: 0; }
@media (min-width: 64rem) { .week-day:has(.week-empty) { display: block; padding: 10px; } }

.admin-search label { display: block; margin-bottom: 6px; font-weight: 600; }
.search-row { display: flex; gap: 8px; }
.details input[type="search"] { flex: 1; min-width: 0; min-height: 52px; padding: 10px 14px; border: 2px solid var(--border-strong);
  border-radius: var(--radius); font: inherit; }
.search-row .btn-primary { width: auto; }

.admin-when { font-size: 1.1rem; }
.admin-call { white-space: nowrap; font-size: 1.1rem; padding: 0 10px; }
.admin-contact { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin-bottom: 14px; }
.admin-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 16px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.admin-facts dt { color: var(--slate); }
.admin-facts dd { margin: 0; overflow-wrap: anywhere; }
.admin-quote { font-style: italic; }
.admin-section { margin: 0 0 18px; }
.admin-section h2 { font-size: 1.1rem; margin: 0 0 8px; }
.status-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status-btn { min-height: 52px; border: 2px solid var(--border-strong); border-radius: var(--radius); background: var(--white);
  color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.status-btn[aria-pressed="true"] { border: 3px solid var(--navy); background: var(--mist); font-weight: 700; }
.status-btn[aria-pressed="true"]::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 6px;
  vertical-align: -2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e5a5c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.admin-section textarea { margin-bottom: 8px; }
.admin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.admin-actions .btn-primary, .admin-actions .btn-outline { font-size: 1rem; white-space: nowrap; padding: 0 8px; }
.admin-days { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.admin-days a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 14px; border: 2px solid var(--border-strong);
  border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.admin-days a[aria-current] { border: 3px solid var(--navy); background: var(--mist); font-weight: 700; }

.clients-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.btn-small { width: auto; min-height: 44px; padding: 0 14px; font-size: 1rem; }
.notice ul { margin: 6px 0 0; padding-left: 1.2rem; }
.notice .check { margin: 10px 0 0; background: var(--white); }
.client-row .appt-call { padding: 0 14px; }
.details select, .details textarea { font: inherit; }

.wa-message { display: block; width: 100%; margin-bottom: 8px; padding: 10px 12px; border: 2px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.5; resize: vertical; }
.add-booking { margin-bottom: 10px; }
.admin-card-plain { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.sheet-page-submit { margin: 8px 0 0; padding-left: 0; padding-right: 0; }

.settings-card { padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--white); }
.settings-card.is-paused { border: 2px solid var(--error); background: var(--error-bg); }
.settings-card h3 { font-size: 1rem; margin: 14px 0 8px; }
.details input[type="time"], .details input[type="date"], .details input[type="number"] {
  display: block; width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--border-strong);
  border-radius: var(--radius); background: var(--white); color: var(--ink); font: inherit; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hours-day { flex: none; width: 2.6rem; font-weight: 700; color: var(--navy); padding-top: 6px; }
.hours-ranges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; }
.hours-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border-radius: 999px;
  background: var(--mist); font-size: 1rem; white-space: nowrap; }
.hours-chip form { margin: 0; }
.hours-chip button { min-width: 40px; min-height: 40px; border: 0; border-radius: 50%; background: transparent;
  color: var(--slate); font: inherit; cursor: pointer; }
.hours-chip button:hover { background: var(--error-bg); color: var(--error); }
.add-hours .picks { gap: 6px; }
.add-hours .pick > span { min-width: 3.4rem; justify-content: center; }
.block-list { list-style: none; margin: 0 0 8px; padding: 0; }
.block-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border); }
.block-list form { margin: 0; }

.settings-nav { display: flex; gap: 6px; margin: -6px 0 14px; }
.settings-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 2px solid var(--border-strong); color: var(--slate); font-weight: 600; text-decoration: none; font-size: 1rem; }
.settings-nav a[aria-current] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.icon-btn { min-width: 44px; width: 44px; min-height: 44px; padding: 0; font-size: 1.1rem; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.service-row .appt-side form { margin: 0; }
.checklist-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist-row { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.checklist-row.is-new { border-style: dashed; background: var(--white); }
.checklist-row.has-error { border-color: var(--error); }
.checklist-row .field { margin-bottom: 8px; }
.row-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; }
.row-tools .code-field { flex: 1 1 8rem; margin: 0; }
.remove-check { display: inline-flex !important; align-items: center; gap: 6px; min-height: 44px; margin: 0 !important;
  padding: 0 8px; font-weight: 600 !important; color: var(--error); }
.remove-check input { width: 22px; height: 22px; accent-color: var(--error); }
.details input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--navy); }
.price-modes { flex-direction: column; margin-bottom: 10px; }
.danger-zone { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0; }

/* ---- Depth: gradients and soft shadows (override the flat defaults above) ---- */
body { background: var(--page-wash) no-repeat, var(--white); }
.topbar { background: var(--grad-navy); box-shadow: 0 2px 10px rgba(6, 34, 35, .18); }
.call-btn { box-shadow: 0 2px 6px rgba(6, 34, 35, .25); }

.btn-primary { background: var(--grad-navy); box-shadow: var(--shadow-btn); transition: background .15s ease-out, box-shadow .15s ease-out, transform .1s ease-out; }
.btn-primary:hover { background: var(--grad-navy-hover); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 3px rgba(23, 44, 71, .2); }
.btn-gold { background: var(--grad-gold); box-shadow: var(--shadow-gold); }
.btn-gold:hover { background: var(--grad-gold-hover); }
.btn-primary:disabled { background: var(--border); box-shadow: none; transform: none; }
.btn-danger-solid { background: linear-gradient(135deg, #d24538 0%, #b02f26 100%); }
.btn-outline { background: var(--white); box-shadow: var(--shadow-1); }

/* Identity block and cards: lifted by shadow, not by an outline */
.identity { background: var(--grad-sky); box-shadow: var(--shadow-1); }
.hero-photo { box-shadow: 0 4px 14px rgba(23, 44, 71, .22); }
.booked-card { border: 0; box-shadow: var(--shadow-2); background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); }
.booked-bring { border: 0; background: var(--grad-sky); }
.booked-check { background-color: transparent; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), var(--grad-success);
  background-position: center, center; background-size: 30px, cover; background-repeat: no-repeat; box-shadow: 0 4px 12px rgba(22, 112, 62, .3); }
.settings-card, .panel { border-color: transparent; box-shadow: var(--shadow-1); }
.panel { background: var(--white); }

/* Choices: white tiles with a soft lift; the chosen one gets a blue wash */
.day, .slot > span, .pick > span { border-color: #c9d5e6; box-shadow: var(--shadow-1); transition: border-color .15s ease-out, box-shadow .15s ease-out; }
.day:hover, .slot input:hover + span, .pick input:hover + span { box-shadow: var(--shadow-2); }
.day[aria-current], .pick input:checked + span { background: var(--grad-selected); box-shadow: 0 4px 14px var(--glow-soft, rgba(31, 58, 95, .18)); }
.slot input:checked + span { background: var(--grad-navy); box-shadow: var(--shadow-btn); }

/* Details sheet: the form sits on a soft panel */
.sheet { background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%); }
.check { background: var(--grad-sky); border-color: transparent; }
.privacy { background: linear-gradient(135deg, #fff8e6 0%, #fdefc9 100%); }

/* Admin */
.admin-tabs a[aria-current] { background: var(--grad-navy); box-shadow: var(--shadow-btn); }
.appt { border-color: transparent; box-shadow: var(--shadow-1); transition: box-shadow .15s ease-out; }
.appt:hover { border-color: transparent; box-shadow: var(--shadow-2); }
.admin-facts { border-color: transparent; background: var(--grad-sky); }
.week-day { border-color: transparent; box-shadow: var(--shadow-1); }
.week-day.is-today { border: 2px solid var(--navy); box-shadow: var(--shadow-2); }
.week-list a { background: var(--grad-sky); }
.status-btn[aria-pressed="true"] { background: var(--grad-selected); }
.settings-nav a[aria-current] { background: var(--grad-navy); }

.svc-icon { display: inline-flex; color: var(--navy); }
.svc-icon .icon { width: 1.25em; height: 1.25em; }
.icon-picks .pick > span { min-width: 52px; justify-content: center; }
.icon-picks .pick input:checked + span::before { display: none; }

.check-steps { list-style: none; padding: 0; margin: 10px 0 0; }
.check-steps li { padding: 4px 0; font-size: 1rem; }
.check-steps .ok { color: var(--success); }
.check-steps .bad { color: var(--error); }
.progress-bar { height: 12px; border-radius: 999px; background: var(--mist); overflow: hidden; margin: 12px 0 6px; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--grad-navy); transition: width .2s ease-out; }

.image-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.image-row .field { flex: 1; margin: 0; }
.image-preview { flex: none; width: 88px; height: 88px; object-fit: contain; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-1); }
.image-preview.round { border-radius: 50%; object-fit: cover; }
.image-preview.empty { display: flex; align-items: center; justify-content: center; text-align: center; font-size: .85rem; color: var(--slate); line-height: 1.3; }
.image-preview.icon-preview { padding: 14px; } /* the icon at about its real size in the admin corner */
.details input[type="file"] { font: inherit; font-size: 1rem; max-width: 100%; }
.image-actions { margin: -6px 0 16px; display: flex; gap: 8px; }
.image-actions form { margin: 0; }
.settings-nav { flex-wrap: wrap; }

.link-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 14px; }
.link-create .field { margin: 0; }
.link-create select { min-width: 8rem; }
.link-row { padding: 12px 0; border-top: 1px solid var(--border); }
.link-row.is-expired, .link-row.is-revoked { opacity: .7; }
.link-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.link-tools { display: flex; gap: 8px; margin-top: 8px; }
.link-tools form { margin: 0; }
.client-code { font-size: .9rem; font-weight: 600; }
.upload-page h1 { margin-bottom: 12px; }
.upload-page .identity { margin-bottom: 14px; }

/* Client upload page (SPEC §6B): one card per document, camera first */
.upload-help { color: var(--slate); font-size: 1rem; }
.doc-slots { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.doc-slot { padding: 14px; border-radius: var(--radius-card); background: var(--white); box-shadow: var(--shadow-1); }
.doc-slot.is-sent { background: linear-gradient(135deg, #f2fbf5 0%, #e3f4ea 100%); }
.doc-head { margin-bottom: 10px; }
.doc-label { margin: 0; font-size: 1.1rem; color: var(--ink); line-height: 1.4; }
.doc-sent { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--success); font-weight: 700; }
.doc-sent[hidden], .doc-progress[hidden] { display: none; }  /* hidden must win over display:flex */
.doc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doc-actions label span { white-space: nowrap; }
.doc-actions label { cursor: pointer; gap: 8px; min-height: 52px; font-size: 1.05rem; }
.doc-actions .btn-outline { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.doc-actions label:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.doc-progress { margin-top: 10px; }
.doc-progress .progress-bar { margin: 0 0 6px; }
.doc-status { margin: 0; font-size: 1rem; color: var(--slate); }
.doc-status.is-error { color: var(--error); font-weight: 600; }
.doc-retry { margin-top: 8px; }
.doc-dup { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.doc-dup[hidden], .doc-retry[hidden] { display: none; }  /* hidden must win over the button's display */
.doc-dup button { min-height: 48px; }

/* Page tray (pages wait here, then go as one PDF) and the scanner's check sheet */
.doc-tray { margin-top: 12px; }
.doc-tray[hidden], .scan-stage[hidden], .scan-loading[hidden], .scan-warning[hidden], .tray-move[hidden] { display: none; }
.tray-pages { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.tray-page { position: relative; padding: 6px 6px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); text-align: center; }
.tray-page img { display: block; width: 100%; aspect-ratio: 8.5 / 11; object-fit: contain; background: var(--surface); border-radius: 4px; }
.tray-num { display: block; margin-top: 2px; font-size: .9rem; font-weight: 600; color: var(--slate); }
.tray-move, .tray-remove {
  position: absolute; top: 2px; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: var(--navy); box-shadow: 0 1px 4px rgba(23, 44, 71, .25); cursor: pointer;
}
.tray-move { left: 2px; }
.tray-remove { right: 2px; color: var(--error); }
.tray-move:focus-visible, .tray-remove:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tray-actions { display: grid; gap: 8px; }
.tray-actions button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; font-size: 1.05rem; }
.scan-editor { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); }
.scan-editor h2 { margin-bottom: 10px; font-size: 1.2rem; }
.scan-loading { display: flex; align-items: center; justify-content: center; min-height: 40vh; margin: 0; color: var(--slate); font-weight: 600; }
.scan-loading::before {
  content: ""; width: 22px; height: 22px; margin-right: 10px; border: 3px solid var(--border);
  border-top-color: var(--navy); border-radius: 50%; animation: scan-spin .8s linear infinite;
}
@keyframes scan-spin { to { transform: rotate(360deg); } }
.scan-stage { display: flex; justify-content: center; padding: 8px; border-radius: 10px; background: var(--surface); }
.scan-preview { display: block; max-width: 100%; max-height: 52vh; box-shadow: 0 2px 10px rgba(23, 44, 71, .18); background: var(--white); }
.scan-warning { margin: 10px 0 0; font-weight: 600; }
.scan-modes { margin: 12px 0; }
.scan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scan-actions button { min-height: 52px; font-size: 1.05rem; }
.scan-ok:disabled { opacity: .5; cursor: default; }
.scan-cancel {
  display: block; width: 100%; min-height: var(--tap); margin-top: 6px; border: 0; background: none;
  color: var(--slate); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* Admin: Documents section on the client page */
.admin-upload .field[hidden] { display: none; }
.upload-progress { margin: 10px 0 0; }
.upload-progress li { padding: 4px 0; overflow-wrap: anywhere; }
.upload-progress .is-done .muted { color: var(--success); font-weight: 600; }
.upload-progress .is-error .muted { color: var(--error); font-weight: 600; }
.docs-year { margin: 18px 0 6px; font-size: 1.05rem; }
.docs-list { padding: 0; list-style: none; margin: 0; }
.docs-list li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--border); }
.docs-name { font-weight: 600; overflow-wrap: anywhere; }

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

/* Honeypot (T-20): off-screen, never seen or tabbed to by people */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---- Invoices (§6C): shared by the client page and the admin ---- */
.invoice-lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.invoice-lines th, .invoice-lines td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.invoice-lines thead th { font-size: .9rem; font-weight: 600; color: var(--slate); }
.invoice-lines .num { text-align: right; white-space: nowrap; }
.invoice-lines tfoot th { font-weight: 500; text-align: right; }
.invoice-lines tfoot td, .invoice-lines tfoot th { border-bottom: 0; padding-top: 6px; padding-bottom: 6px; }
.invoice-lines tfoot .total th, .invoice-lines tfoot .total td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--ink); }
.badge-inv-draft, .badge-inv-void { background: var(--surface); color: var(--slate); }
.badge-inv-open { background: var(--warning-bg); color: var(--warning); }
.badge-inv-processing, .badge-pay-pending { background: var(--info-bg); color: var(--info); }
.badge-inv-paid, .badge-pay-succeeded { background: var(--success-bg); color: var(--success); }
.badge-inv-refunded, .badge-pay-failed { background: var(--error-bg); color: var(--error); }
