/* Shared styling for the HelloBob dashboard — plain CSS, no build step.
   Presentation only: every selector the dashboard markup already uses is kept,
   so nothing about how the pages work changes. Brand matches the marketing site
   (HelloBob red/black, Big Shoulders Display + Barlow + JetBrains Mono), light by
   default with a dark variant, and is laid out for phone and tablet first. */

@import url("https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=Barlow:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  --ink: #17181B;
  --ink-2: #4B4E54;
  --muted: #6B6F76;
  --bg: #ECECE7;
  --surface: #FFFFFF;
  --surface-2: #F6F6F3;
  --border: #DDDDD7;
  --accent: #E5231A;
  --accent-deep: #A5170F;
  --accent-ink: #FFFFFF;
  --danger: #A5170F;
  --danger-soft: rgba(229, 35, 26, 0.10);
  --art-bg: #0E0E10;
  --font-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F5F5F3;
    --ink-2: #C7C9CD;
    --muted: #9A9DA3;
    --bg: #0E0E10;
    --surface: #17181B;
    --surface-2: #1D1F23;
    --border: #2A2C30;
    --accent-deep: #FF6357;
    --danger: #FF8A80;
    --danger-soft: rgba(229, 35, 26, 0.16);
    --art-bg: #0A0A0B;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); }

.page-narrow {
  max-width: 440px;
  margin: 8vh auto;
  padding: 0 20px;
}
/* Chat artwork on the login / accept-invite cards (text + SMS only). */
.page-narrow .card::before {
  content: "";
  display: block;
  height: 118px;
  margin: -10px -10px 20px;
  border-radius: 10px;
  background: var(--art-bg) url("data:image/svg+xml,%3Csvg viewBox=%220 0 640 170%22 xmlns=%22http://www.w3.org/2000/svg%22 aria-hidden=%22true%22 focusable=%22false%22%3E%3Cg fill=%22none%22%3E%3Cpath d=%22M196 86h58M386 86h58%22 stroke=%22%23E5231A%22 stroke-width=%222.5%22 stroke-dasharray=%222 7%22 stroke-linecap=%22round%22/%3E%3Cpath d=%22M247 78l9 8-9 8M437 78l9 8-9 8%22 stroke=%22%23E5231A%22 stroke-width=%222.5%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%3Cg transform=%22translate%2828 30%29%22%3E%3Crect x=%2212%22 y=%220%22 width=%22144%22 height=%2296%22 rx=%228%22 fill=%22%2317181B%22 stroke=%22%23F5F5F3%22 stroke-width=%223%22/%3E%3Cpath d=%22M0 108h168a0 0 0 0 1 0 0v4a6 6 0 0 1-6 6H6a6 6 0 0 1-6-6z%22 fill=%22%23F5F5F3%22/%3E%3Cg fill=%22%23E5231A%22%3E%3Ccircle cx=%2238%22 cy=%2226%22 r=%229%22/%3E%3Ccircle cx=%2238%22 cy=%2250%22 r=%229%22/%3E%3Ccircle cx=%2238%22 cy=%2274%22 r=%229%22/%3E%3C/g%3E%3Cg stroke=%22%23fff%22 stroke-width=%223%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 fill=%22none%22%3E%3Cpath d=%22M33 26l4 4 7-8M33 50l4 4 7-8M33 74l4 4 7-8%22/%3E%3C/g%3E%3Cg fill=%22%236C6F75%22%3E%3Crect x=%2258%22 y=%2222%22 width=%2282%22 height=%227%22 rx=%223.5%22/%3E%3Crect x=%2258%22 y=%2246%22 width=%2264%22 height=%227%22 rx=%223.5%22/%3E%3Crect x=%2258%22 y=%2270%22 width=%2274%22 height=%227%22 rx=%223.5%22/%3E%3C/g%3E%3C/g%3E%3Cg transform=%22translate%28262 22%29%22%3E%3Crect x=%220%22 y=%220%22 width=%22116%22 height=%22118%22 rx=%2210%22 fill=%22%2317181B%22 stroke=%22%23F5F5F3%22 stroke-width=%223%22/%3E%3Cpath d=%22M0 12a10 10 0 0 1 10-10h96a10 10 0 0 1 10 10v16H0z%22 fill=%22%23E5231A%22/%3E%3Ccircle cx=%2214%22 cy=%2215%22 r=%223%22 fill=%22%23fff%22/%3E%3Ccircle cx=%2225%22 cy=%2215%22 r=%223%22 fill=%22%23fff%22 opacity=%22.7%22/%3E%3Crect x=%2214%22 y=%2242%22 width=%2288%22 height=%228%22 rx=%224%22 fill=%22%239A9DA3%22/%3E%3Crect x=%2214%22 y=%2258%22 width=%2262%22 height=%228%22 rx=%224%22 fill=%22%236C6F75%22/%3E%3Crect x=%2214%22 y=%2274%22 width=%2240%22 height=%2222%22 rx=%226%22 fill=%22%232A2C30%22/%3E%3Cg transform=%22translate%2886 96%29%22%3E%3Ccircle r=%2217%22 fill=%22%23E5231A%22/%3E%3Cpath d=%22M-7-6h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-6l-5 4v-4h-3a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z%22 fill=%22%23fff%22/%3E%3C/g%3E%3C/g%3E%3Cg transform=%22translate%28486 8%29%22%3E%3Crect x=%220%22 y=%220%22 width=%22100%22 height=%22154%22 rx=%2218%22 fill=%22%2317181B%22 stroke=%22%23F5F5F3%22 stroke-width=%223%22/%3E%3Crect x=%2238%22 y=%229%22 width=%2224%22 height=%225%22 rx=%222.5%22 fill=%22%232A2C30%22/%3E%3Crect x=%2212%22 y=%2230%22 width=%2258%22 height=%2226%22 rx=%2210%22 fill=%22%232A2C30%22/%3E%3Crect x=%2220%22 y=%2239%22 width=%2238%22 height=%225%22 rx=%222.5%22 fill=%22%239A9DA3%22/%3E%3Crect x=%2230%22 y=%2264%22 width=%2258%22 height=%2234%22 rx=%2210%22 fill=%22%23E5231A%22/%3E%3Crect x=%2238%22 y=%2273%22 width=%2242%22 height=%225%22 rx=%222.5%22 fill=%22%23fff%22 opacity=%22.9%22/%3E%3Crect x=%2238%22 y=%2283%22 width=%2228%22 height=%225%22 rx=%222.5%22 fill=%22%23fff%22 opacity=%22.65%22/%3E%3Crect x=%2212%22 y=%22106%22 width=%2246%22 height=%2224%22 rx=%2210%22 fill=%22%232A2C30%22/%3E%3Ccircle cx=%2224%22 cy=%22118%22 r=%223%22 fill=%22%239A9DA3%22/%3E%3Ccircle cx=%2233%22 cy=%22118%22 r=%223%22 fill=%22%239A9DA3%22/%3E%3Ccircle cx=%2242%22 cy=%22118%22 r=%223%22 fill=%22%23E5231A%22/%3E%3C/g%3E%3C/svg%3E%0A") center / contain no-repeat;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 1px 2px rgba(20, 30, 25, 0.05), 0 8px 24px -12px rgba(20, 30, 25, 0.18);
}

h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; margin: 0 0 4px; text-transform: uppercase; letter-spacing: 0.01em; }
h2 { font-family: var(--font-display); font-weight: 800; font-size: 19px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.01em; }
.subtitle { color: var(--ink-2); font-size: 14.5px; margin: 0 0 24px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--ink);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 9px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}
button.primary { background: var(--accent); color: var(--accent-ink); width: 100%; margin-top: 20px; }
button.primary:hover { background: var(--accent-deep); color: #fff; }
button.secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
button.secondary:hover { border-color: var(--accent); }
button.small { padding: 7px 12px; font-size: 13px; }

.error-msg {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 14px;
  display: none;
}
.error-msg.visible { display: block; }

/* ---- Demo-mode banner (public sample workspace) ---- */

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff4d6;
  color: #5c4300;
  border-bottom: 1px solid #efd58a;
  padding: 8px 24px;
  font-size: 13px;
  text-align: center;
}
.demo-banner[hidden] { display: none; }

/* ---- Main dashboard layout ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px max(24px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.topbar .brand { font-family: var(--font-display); font-weight: 900; font-size: 21px; letter-spacing: 0.01em; text-transform: uppercase; }
.topbar .brand::before {
  content: "";
  display: inline-block;
  width: 26px; height: 26px;
  margin-right: 9px;
  vertical-align: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 32 32%22%3E%3Crect width=%2232%22 height=%2232%22 rx=%228%22 fill=%22%23E5231A%22/%3E%3Cpath d=%22M9 10.5h14a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2h-7l-5 4v-4H9a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2z%22 fill=%22%23fff%22/%3E%3C/svg%3E") center / contain no-repeat;
}
.topbar .business-name { color: var(--ink-2); font-size: 14px; margin-left: 4px; }

main { max-width: 1000px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 24px; }

.stat-row { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-tile {
  flex: 1 1 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stat-tile .n { font-family: var(--font-display); font-size: 34px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile .label { color: var(--ink-2); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.empty-row td { color: var(--muted); font-style: italic; }
.empty-row td::before {
  content: "";
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%239A9DA3%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22%3E%3Cpath d=%22M21 15a2 2 0 0 1-2 2H8l-5 4V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z%22/%3E%3C/svg%3E") center / contain no-repeat;
}

.tech-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--surface-2); }
.tech-card h3 { margin: 0 0 10px; font-family: var(--font-display); font-weight: 800; font-size: 17px; text-transform: uppercase; }
.days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 12px; }
.day-cell { border: 1px solid var(--border); border-radius: 9px; padding: 8px; text-align: center; background: var(--surface); }
.day-cell label { margin: 0 0 6px; font-size: 12px; }
.day-cell input[type="checkbox"] { width: auto; }
.day-cell input[type="time"] { padding: 4px; font-size: 12px; margin-top: 4px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.inline-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 140px; }
.inline-form label { margin: 0 0 6px; }

.muted { color: var(--muted); font-size: 13px; }

/* ================= Tablet ================= */
@media (max-width: 1000px) {
  .days-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ================= Phone + touch ================= */
@media (max-width: 820px), (pointer: coarse) {
  input, select { font-size: 16px; min-height: 46px; }   /* 16px stops iPhone zoom-on-focus */
  input[type="checkbox"] { min-height: 0; width: 22px; height: 22px; vertical-align: -5px; margin-right: 4px; }
  button { min-height: 46px; }
  button.small { min-height: 42px; padding: 8px 14px; }
  .day-cell input[type="time"] { font-size: 16px; padding: 8px 4px; }
}
@media (max-width: 720px) {
  .topbar { padding-top: 12px; padding-bottom: 12px; }
  .topbar .brand { font-size: 19px; }
  .topbar .business-name { display: block; margin: 2px 0 0; font-size: 13px; }
  .demo-banner { padding: 8px 16px; font-size: 12.5px; text-align: left; }
  main { padding: 18px 14px 40px; gap: 18px; }
  .card { padding: 18px 16px; }
  .stat-row { gap: 10px; }
  .stat-tile { flex: 1 1 calc(50% - 10px); padding: 14px; }
  .stat-tile .n { font-size: 30px; }
  /* Wide tables scroll sideways inside their card instead of squeezing every column. */
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { white-space: nowrap; }
  .messages-row td { white-space: normal; min-width: 260px; }
  .empty-row td { white-space: normal; }
  .inline-form > div { flex: 1 1 100%; }
  .inline-form > button { flex: 1 1 100%; }
  .page-narrow { margin: 4vh auto; padding: 0 14px; }
  .page-narrow .card { padding: 22px 18px; }
}
@media (max-width: 560px) {
  .days-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s, border-color .15s; }
}
