/* Chicago Skin Clinic — waitlist UI
   Mobile-first; WCAG AA contrast; large tap targets (>=48px, kiosk >=64px). */

/* Self-hosted webfonts (SIL Open Font License): DM Serif Display for
   headings/numerals, Hanken Grotesk (variable) for body/UI. Served from
   this app so the kiosk and status pages never depend on a font CDN.
   latin covers EN/ES; latin-ext covers PL. */
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dm-serif-display-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Serif Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/dm-serif-display-latin.woff2) format('woff2');
  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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/hanken-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/hanken-grotesk-latin.woff2) format('woff2');
  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;
}

/* CSC brand: navy #003380 + cyan #00C0F8 (from the clinic's logo).
   Variable names kept from v1 (--teal = brand primary, --gold = accent)
   to avoid churn; values are the real brand palette. Cyan fails AA as
   text on light backgrounds — decorative/accent use only. */
:root {
  --teal: #003380;
  --teal-dark: #00245c;
  --teal-tint: #e3f4fd;
  --gold: #00c0f8;
  --gold-ink: #00587a;
  --bg: #f6f8fa;
  --card: #ffffff;
  --ink: #1b2536;
  --muted: #5a6577;
  --line: #d5dde9;
  --hairline: #e2e8f0;
  --danger: #a52e2e;
  --ok: #1e6b40;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(9, 30, 66, 0.05);
  /* Editorial pairing: DM Serif Display carries headings and the big
     position number; Hanken Grotesk does body and UI. Both cover EN/ES/PL. */
  --font-display: "DM Serif Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 20px;
}
.logo { height: 54px; width: auto; display: block; }

/* DM Serif Display ships one weight — keep serif headings at 400 so the
   browser never fakes a bold. */
h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.9rem; line-height: 1.15; margin: 0 0 8px; letter-spacing: 0.005em;
}
h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.45rem; margin: 28px 0 10px; letter-spacing: 0.005em;
}
p.lede { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}

/* ---- Language toggle ---- */
.lang-toggle { display: flex; gap: 6px; }
.lang-toggle button {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  padding: 8px 12px;
  min-width: 48px;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ---- Form ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 0.9rem; margin-top: 6px; }
input[type="text"],
input[type="tel"],
input[type="date"],
input[type="email"] {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 14px;
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
}
/* The email field belongs to the opt-in card visually */
.optin-email { margin: -8px 0 18px; }
input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}
fieldset legend { font-weight: 600; padding: 0; margin-bottom: 10px; }

/* Tag selections as large tap targets */
.choices { display: grid; gap: 10px; }
.choices.cols-2 { grid-template-columns: 1fr 1fr; }
.choices.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 420px) {
  .choices.cols-3 { grid-template-columns: 1fr; }
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 56px;
  padding: 12px 10px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.choice input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.choice input:focus-visible + span {
  outline: 3px solid var(--teal-dark);
  outline-offset: 2px;
}

/* Provider cards: photo + name so nobody confuses the doctors.
   The roster is settings-driven, so the grid adapts to any provider count. */
.choices.providers {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.choice-photo span {
  flex-direction: column;
  gap: 10px;
  padding: 16px 10px 14px;
  min-height: 150px;
}
.choice-photo img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--teal-tint);
  border: 3px solid var(--line);
}
.choice-photo input:checked + span img {
  border-color: #fff;
}
.choice-photo b {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.05em; line-height: 1.2;
}
body.kiosk .choice-photo img { width: 104px; height: 104px; }
body.kiosk .choice-photo span { min-height: 190px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:active { background: var(--teal-dark); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-danger-outline { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-quiet { background: transparent; color: var(--muted); border: 0; min-height: 48px; }

.form-error {
  display: none;
  background: #fbeaea;
  color: var(--danger);
  border: 1px solid #e5b9b9;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  font-weight: 600;
}
.form-error.visible { display: block; }

/* ---- Status page ---- */
/* The hero is a deep-navy panel: the live number in the display serif,
   a cyan hairline on top, and a ghost cancel button. */
.status-hero {
  text-align: center;
  padding: 30px 20px 26px;
  background: linear-gradient(180deg, #002d67, var(--teal));
  border: 0;
  border-top: 3px solid var(--gold);
  color: #fff;
}
.status-hero .lede {
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.8rem;
  font-weight: 700;
}
.position-big {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 12px 0 6px;
}
.eta-range { font-size: 1.12rem; color: rgba(255, 255, 255, 0.95); font-weight: 600; }
.auto-note { color: var(--muted); font-size: 0.9rem; margin-top: 10px; }
.status-hero .auto-note { color: rgba(255, 255, 255, 0.6); }
.status-hero .live-dot { background: var(--gold); }
.status-hero .btn-danger-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.status-hero .btn-danger-outline:active { background: rgba(255, 255, 255, 0.12); }
.notified-banner {
  display: none;
  background: var(--teal-tint);
  color: var(--teal-dark);
  border: 1.5px solid var(--teal);
  border-radius: 12px;
  padding: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}
.notified-banner.visible { display: block; }
.status-actions { margin-top: 20px; }

/* ---- "While you wait" promo: who-we-are, press, explore, follow ---- */
.promo { margin-top: 34px; }
.promo h2 { color: var(--teal-dark); }
.promo-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}
.promo-card h3 {
  font-family: var(--font-display); font-weight: 400;
  margin: 0 0 8px; font-size: 1.3rem; color: var(--teal-dark);
}
.promo-card .promo-sub { margin: 0 0 4px; color: var(--muted); }
.who-blurb { color: var(--ink); }
.who-blurb p { margin: 0 0 10px; }
.who-blurb a { color: var(--teal); font-weight: 700; }
.text-link {
  display: inline-block; color: var(--teal); font-weight: 700;
  text-decoration: none; padding: 10px 0 2px;
}
.text-link:hover, .text-link:focus-visible { text-decoration: underline; }

.doc-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin: 14px 0 4px;
}
.doc-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; padding: 16px 10px 14px; border: 1px solid var(--hairline);
  border-radius: 12px; background: #fff; color: var(--ink);
  text-decoration: none; line-height: 1.2;
}
.doc-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.doc-card img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  background: var(--teal-tint); border: 3px solid var(--teal-tint);
}
.doc-card:hover, .doc-card:active { border-color: var(--teal); }

/* Press features: swipeable snap carousel; the page never scrolls sideways */
.press-block { margin: 24px 0 18px; }
.press-kicker {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.74rem;
  font-weight: 800; color: var(--gold-ink); margin: 0 0 8px;
}
/* Quiet uppercase press bar, the way beauty sites run their logo strips */
.press-outlets {
  margin: 0 0 14px; color: #667183; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  font-size: 0.76rem; line-height: 1.9;
}
.press-outlets span { white-space: nowrap; }
.press-scroll {
  list-style: none; display: flex; gap: 12px; margin: 0 -16px;
  padding: 4px 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.press-scroll li { flex: 0 0 76%; max-width: 300px; scroll-snap-align: start; display: flex; }
.press-card {
  /* positioned so the absolutely-positioned .sr-only note inside stays in the
     card instead of escaping the scroller and widening the page */
  position: relative;
  display: flex; flex-direction: column; gap: 8px; width: 100%;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--hairline); border-top: 2px solid var(--gold);
  padding: 16px 16px 14px;
  color: var(--ink); text-decoration: none;
}
.press-outlet {
  text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem;
  font-weight: 800; color: var(--teal);
}
/* Headlines set in the display serif, like the papers they ran in */
.press-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.12rem; line-height: 1.3;
}
.press-card:hover .press-title { color: var(--teal); }
.press-read { margin-top: auto; padding-top: 6px; color: var(--teal); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; }
.press-hint { color: var(--muted); font-size: 0.85rem; margin: 0; }

.explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.explore-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; min-height: 96px; padding: 14px 8px; text-align: center;
  border: 1px solid var(--hairline); border-radius: 12px; background: #fff;
  color: var(--ink); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; line-height: 1.25;
}
.explore-tile:hover, .explore-tile:active { border-color: var(--teal); background: var(--teal-tint); }
.explore-icon { display: inline-flex; }
.explore-icon svg {
  width: 26px; height: 26px; stroke: var(--teal); fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.social-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.social-btn {
  display: inline-flex; flex: 1; min-width: 130px; align-items: center;
  justify-content: center; gap: 10px; min-height: 54px; padding: 12px 18px;
  border-radius: 10px; color: #fff; font-weight: 700; letter-spacing: 0.01em;
  text-decoration: none;
}
.social-btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
/* Brand hues, darkened where needed so white text keeps AA contrast. */
.social-facebook { background: #145dbf; }
.social-tiktok { background: #010101; }
.social-instagram { background: #a92d76; }
.visit-site { margin-top: 18px; background: #fff; }

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok); margin-right: 6px;
  animation: live-pulse 2s ease-in-out infinite;
}
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Terminal-state pages */
.state-card { text-align: center; padding: 36px 20px; }
.state-card .emoji { font-size: 2.6rem; display: block; margin-bottom: 10px; }

/* ---- Cancel dialog ---- */
dialog {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 360px;
  width: calc(100vw - 48px);
}
dialog::backdrop { background: rgba(18, 37, 40, 0.5); }
dialog h2 { margin: 0 0 8px; }
dialog p { margin: 0 0 20px; color: var(--muted); }
dialog .btn + .btn { margin-top: 10px; }

/* ---- Kiosk mode ---- */
body.kiosk {
  font-size: 130%;
  user-select: none;
  -webkit-user-select: none;
}
body.kiosk .page { max-width: 760px; padding-top: 32px; }
body.kiosk .choice span { min-height: 80px; font-size: 1.15em; }
body.kiosk .btn { min-height: 76px; font-size: 1.2em; }
body.kiosk input[type="text"],
body.kiosk input[type="tel"],
body.kiosk input[type="date"],
body.kiosk input[type="email"] { min-height: 68px; font-size: 1.2em; }
body.kiosk .lang-toggle button { min-height: 60px; min-width: 76px; font-size: 1em; }

.kiosk-step { display: none; }
.kiosk-step.active { display: block; }
.kiosk-welcome { text-align: center; padding: 8vh 16px 0; }
.kiosk-welcome .logo { height: 88px; margin: 0 auto 24px; }
.kiosk-welcome h1 { font-size: 2.4rem; }
.kiosk-big-q { font-size: 1.6rem; font-weight: 700; text-align: center; margin: 24px 0; }
.kiosk-done { text-align: center; padding: 6vh 16px 0; }
.kiosk-done .position-big { font-size: 6rem; }
.kiosk-reset-note { color: var(--muted); margin-top: 28px; }
.kiosk-nav { display: flex; gap: 12px; margin-top: 24px; }
.kiosk-nav .btn { flex: 1; }

/* ================= Front desk ================= */

body.desk { font-size: 15px; }
.desk-shell { max-width: 1200px; margin: 0 auto; padding: 16px 20px 60px; }
.desk-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 6px 0 16px; flex-wrap: wrap;
}
.desk-brand { display: flex; align-items: center; gap: 12px; }
.desk-brand .logo { height: 42px; }
.desk-title { font-weight: 800; font-size: 1.15rem; color: var(--teal-dark); }
.desk-header-actions { display: flex; gap: 8px; }
.btn-compact { width: auto; min-height: 42px; padding: 8px 16px; font-size: 0.95rem; border-radius: 10px; }

.desk-login .card { max-width: 380px; margin: 8vh auto 0; }
.pin-input {
  width: 100%; font-size: 1.8rem; text-align: center; letter-spacing: 0.4em;
  padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 14px;
}

/* Next-up lanes */
.lanes {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.lane {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  padding: 12px 14px; border-top: 4px solid var(--teal);
}
.lane-empty { opacity: 0.65; border-top-color: var(--line); }
.lane header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lane h3 { margin: 0; font-size: 0.95rem; }
.lane-count { color: var(--muted); font-size: 0.8rem; }
.lane-photo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--teal-tint); }
.lane-photo-generic { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.lane-next { margin-bottom: 8px; }
.lane-name { display: block; font-weight: 700; }
.lane-meta { color: var(--muted); font-size: 0.82rem; }
.lane-empty-note { color: var(--muted); font-style: italic; }
.lane-take { width: 100%; }

/* Toolbar */
.desk-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-size: 0.88rem; font-weight: 600; padding: 7px 14px;
  border-radius: 999px; cursor: pointer; min-height: 38px;
}
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.desk-search {
  flex: 1; min-width: 180px; font: inherit; padding: 9px 14px; min-height: 40px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--card);
}

/* Queue list */
.queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.queue-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--hairline);
  padding: 10px 14px;
}
.queue-row.status-pending { opacity: 0.62; }
.queue-row.status-notified { border-left: 4px solid var(--gold); }
.queue-row.dragging { opacity: 0.4; }
.queue-row.drop-above { box-shadow: 0 -3px 0 0 var(--teal), var(--shadow); }
.row-grip { cursor: grab; color: var(--muted); font-size: 1.05rem; letter-spacing: -2px; user-select: none; }
.row-pos { font-weight: 800; color: var(--teal); min-width: 34px; font-size: 1.05rem; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-name { font-weight: 700; }
.row-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--teal-tint); color: var(--teal-dark); white-space: nowrap;
}
.badge-provider.pc-teal { background: #dbe6f7; color: #00245c; }
.badge-provider.pc-gold { background: #d9f4fe; color: #00587a; }
.badge-provider.pc-plum { background: #ecdcec; color: #5c2a5c; }
.badge-provider.pc-slate { background: #dfe5ea; color: #33434d; }
.badge-provider.pc-rust { background: #f4ded3; color: #7a3b16; }
.badge-provider.pc-neutral { background: #e6e9ef; color: #4a5468; }
.badge-callname { background: #fdeacc; color: #7a4b09; }
.badge-warn { background: #fbdcdc; color: var(--danger); }
.badge-notified { background: #e0f0e6; color: var(--ok); }
.badge-pending { background: #eee9df; color: #6b6350; }
.row-meta { color: var(--muted); font-size: 0.82rem; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-remove { color: var(--danger); }
.row-arrows { display: flex; flex-direction: column; gap: 2px; }
.arrow {
  border: 1px solid var(--line); background: var(--card); border-radius: 6px;
  cursor: pointer; font-size: 0.7rem; padding: 2px 7px; color: var(--muted);
}
.queue-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Modals */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18, 37, 40, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px;
}
/* display:flex above would defeat the hidden attribute — keep it authoritative */
.modal-backdrop[hidden] { display: none; }
.modal { max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select {
  width: 100%; font: inherit; padding: 12px; min-height: 48px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
.switch-row { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0 14px; cursor: pointer; }
.switch-row input { width: 22px; height: 22px; }

/* Marketing opt-in on join/kiosk: quiet, clearly optional, big tap target */
.optin-row {
  align-items: flex-start; font-weight: 500; color: var(--muted);
  background: var(--bg); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 12px 14px; margin: 2px 0 18px; line-height: 1.4;
}
.optin-row input { flex: none; margin-top: 1px; accent-color: var(--teal); }
body.kiosk .optin-row { font-size: 0.85em; }
body.kiosk .optin-row input { width: 28px; height: 28px; }

/* Settings */
.settings-shell { max-width: 860px; }
.settings-card { margin-bottom: 18px; }
.settings-card h2 { margin-top: 0; }
.settings-card .btn-compact { margin-top: 10px; margin-right: 8px; }
.save-note {
  position: sticky; top: 8px; z-index: 30; background: #e0f0e6; color: var(--ok);
  border-radius: 10px; padding: 10px 14px; font-weight: 700; box-shadow: var(--shadow);
}
.save-note-error { background: #fbdcdc; color: var(--danger); }
.provider-editor { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.provider-thumb { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--teal-tint); }
.provider-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.provider-name { width: 100%; font: inherit; font-weight: 600; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; }
.provider-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.provider-tools .btn-compact { margin: 0; }
.photo-btn { cursor: pointer; }
.provider-remove { color: var(--danger); }
.settings-subhead { margin: 18px 0 8px; font-size: 0.95rem; color: var(--teal-dark); }
.press-editor {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.press-editor input { font: inherit; font-size: 0.92rem; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; min-width: 0; }
.press-editor .press-url-in { grid-column: 1 / 3; }
.press-editor .press-remove { margin: 0; color: var(--danger); }
@media (max-width: 600px) {
  .press-editor { grid-template-columns: 1fr; }
  .press-editor .press-url-in { grid-column: auto; }
  .press-editor .press-remove { justify-self: start; }
}
.template-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.template-group summary { font-weight: 700; cursor: pointer; }
.template-group .field { margin-top: 12px; }
textarea {
  width: 100%; font: inherit; font-size: 0.92rem; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; background: #fff;
}

/* Analytics (aggregates only — single-series bars + sequential heatmap) */
.analytics-shell { max-width: 1000px; }
.analytics-empty { padding: 14px 18px; color: var(--muted); margin-bottom: 14px; }
.tile-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.tile {
  background: var(--card); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: var(--shadow); padding: 14px 12px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
}
.tile-value {
  font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1;
  color: var(--teal-dark); font-variant-numeric: tabular-nums;
}
.tile-label {
  color: var(--muted); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.chart-card h2 { margin: 0; font-size: 1.25rem; }
.chart-sub { color: var(--muted); font-size: 0.82rem; margin: 2px 0 14px; }
.chart-wide { grid-column: 1 / -1; }
.chart-row {
  display: grid; grid-template-columns: 118px 1fr 60px; gap: 10px;
  align-items: center; min-height: 30px;
}
.chart-label { font-weight: 600; font-size: 0.88rem; line-height: 1.2; }
.bar-track { background: var(--bg); border-radius: 0 4px 4px 0; height: 14px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--teal); border-radius: 0 4px 4px 0; }
.chart-value {
  font-size: 0.85rem; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; text-align: right;
}
.chart-none { color: var(--muted); font-style: italic; margin: 8px 0 0; }
.heat-grid { display: grid; gap: 2px; }
.heat-hour { font-size: 0.68rem; color: var(--muted); text-align: center; font-weight: 700; }
.heat-dow { font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; }
.heat-cell { min-height: 24px; border-radius: 4px; }
.heat-zero { border: 1px solid var(--hairline); }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--muted); font-size: 0.75rem; }
.heat-swatch { width: 20px; height: 10px; border-radius: 3px; }
.table-fallback { margin-bottom: 14px; padding: 14px 18px; }
.table-fallback summary { font-weight: 700; cursor: pointer; }
.table-fallback h3 { margin: 14px 0 6px; font-size: 0.95rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--hairline); }
.data-table th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }

@media (max-width: 760px) {
  .queue-row { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-start; }
  .field-row { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
}

.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;
}
