:root {
  /* active business theme (overridden per-business via inline JS style on #app) */
  --theme-dark: #14162C;
  --theme-primary: #FF4757;
  --theme-accent: #FDCB6E;

  /* fixed brand + status colors */
  --purple: #6C5CE7;
  --purple-dark: #5849c2;
  --purple-light: #efecff;
  --gold: #FDCB6E;
  --green: #00B894;
  --green-light: #e5faf5;
  --red: #FF6B6B;
  --red-light: #ffeaea;
  --amber: #F0932B;
  --amber-light: #fdf1e2;
  --blue: #4C9AFF;
  --ink: #2D2A3E;
  --muted: #837f99;
  --bg: #F7F6FB;
  --card: #ffffff;
  --border: #ECE9F7;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(76, 66, 140, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
body { padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3, h4 { margin: 0 0 4px; }
p { margin: 0 0 8px; color: var(--muted); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }

/* background patterns applied to .content */
.content { padding: 16px 16px 110px; background-color: var(--bg); }
.content.bg-dots { background-image: radial-gradient(var(--border) 1.4px, transparent 1.4px); background-size: 16px 16px; }
.content.bg-grid { background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 22px 22px; }
.content.bg-diagonal { background-image: repeating-linear-gradient(45deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 14px); }
.content.bg-waves { background-image: radial-gradient(circle at 0% 0%, var(--border) 0, transparent 45%), radial-gradient(circle at 100% 30%, var(--border) 0, transparent 45%); background-size: 140px 140px; }
.content.bg-metal { background-image: repeating-linear-gradient(115deg, #eef0f4 0px, #eef0f4 3px, #dcdee4 3px, #dcdee4 6px); }
.content.bg-wood { background-image: repeating-linear-gradient(90deg, #f1e4d0 0px, #f1e4d0 5px, #e3cda3 5px, #e3cda3 10px, #ecdcbc 10px, #ecdcbc 15px); }
.content.bg-glitter { background-image: radial-gradient(circle, rgba(108,92,231,0.28) 1px, transparent 1.6px), radial-gradient(circle, rgba(253,203,110,0.4) 1px, transparent 1.6px), radial-gradient(circle, rgba(232,67,147,0.28) 1px, transparent 1.6px); background-size: 16px 16px, 22px 22px, 30px 30px; background-position: 0 0, 8px 11px, 5px 20px; }
.content.bg-stripes { background-image: repeating-linear-gradient(45deg, var(--border) 0px, var(--border) 8px, transparent 8px, transparent 16px); }

/* ---------- Auth screens ---------- */
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 32px 24px; }
.brand { text-align: center; margin-bottom: 28px; }
.brand .logo { font-size: 52px; line-height: 1; }
.brand h1 { font-size: 26px; color: var(--purple-dark); }
.brand p { font-size: 14px; }

.choice-grid { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.choice-card {
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: left; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
}
.choice-card .emoji { font-size: 32px; }
.choice-card strong { display: block; font-size: 16px; }
.choice-card span { font-size: 13px; color: var(--muted); }
.choice-card:active { transform: scale(0.98); }

.form-card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px;
  font-size: 15px; background: #fff; color: var(--ink); outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); }
.field .hint { font-size: 12px; color: var(--muted); }

.btn { border: none; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-primary { background: var(--theme-primary); color: #fff; }
.btn-primary:active { filter: brightness(0.92); }
.btn-secondary { background: var(--purple-light); color: var(--purple-dark); }
.btn-outline { background: transparent; border: 2px solid var(--border); color: var(--ink); }
.btn-danger { background: var(--red-light); color: #c0392b; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.5; }

.link-btn { background: none; border: none; color: var(--purple); font-weight: 600; font-size: 14px; padding: 8px; }
.error-banner { background: var(--red-light); color: #c0392b; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.success-banner { background: var(--green-light); color: #00875a; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; }
.back-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.back-row button { background: none; border: none; font-size: 20px; color: var(--purple); padding: 4px; }

/* day chips */
.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { border: 2px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.day-chip.selected { background: var(--theme-primary); border-color: var(--theme-primary); color: #fff; }
.custom-service-chip.selected { background: var(--purple, #8E44AD); border-color: var(--purple, #8E44AD); }
.custom-service-chip.selected:hover { filter: brightness(0.92); }
.service-check { display: inline-flex; align-items: center; gap: 6px; }
.service-check .check-box { width: 14px; height: 14px; border-radius: 4px; border: 2px solid currentColor; opacity: 0.4; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; line-height: 1; flex-shrink: 0; }
.service-check.selected .check-box { opacity: 1; background: rgba(255,255,255,0.25); }
.service-check.selected .check-box::before { content: '✓'; }

/* ---------- App header (dark, per-business theme) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: var(--theme-dark); color: #fff; padding: 16px 16px 12px;
  border-radius: 0 0 26px 26px;
}
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.round-logo {
  width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; overflow: hidden;
}
.round-logo img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { font-size: 10.5px; letter-spacing: 0.08em; font-weight: 800; color: var(--theme-accent); text-transform: uppercase; }
.round-name { font-size: 17px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parents-btn {
  background: rgba(255,255,255,0.14); border: none; color: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}

/* top pill tab bar */
.top-tabs { display: flex; gap: 6px; background: rgba(255,255,255,0.08); border-radius: 14px; padding: 5px; margin-top: 14px; }
.top-tab {
  flex: 1; background: none; border: none; color: rgba(255,255,255,0.65); border-radius: 10px;
  padding: 9px 4px; font-size: 11.5px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.top-tab .ic { font-size: 16px; }
.top-tab.active { background: #fff; color: var(--ink); }

/* stat pill row (used in schedule hero) */
.stat-pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pill { background: rgba(255,255,255,0.14); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.progress-track { background: rgba(255,255,255,0.22); border-radius: 999px; height: 10px; overflow: hidden; margin-top: 10px; }
.progress-fill { background: var(--theme-accent); height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.progress-track.light { background: var(--border); }
.progress-track.light .progress-fill { background: var(--green); }

.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card h3 { font-size: 15px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); font-weight: 800; margin: 18px 4px 8px; }
.section-title:first-child { margin-top: 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .emoji { font-size: 40px; display: block; margin-bottom: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mt18 { margin-top: 18px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 12.5px; }
.spinner { text-align: center; padding: 60px 0; color: var(--muted); }

/* ---------- Schedule tab ---------- */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.week-nav-btn { background: rgba(255,255,255,0.14); border: none; color: #fff; width: 30px; height: 30px; border-radius: 999px; font-size: 15px; }
.week-nav-label { text-align: center; }
.week-nav-label .wk { color: var(--theme-accent); font-weight: 800; font-size: 13px; }
.week-nav-label .rng { font-size: 11.5px; color: rgba(255,255,255,0.75); }

.earnings-hero { text-align: center; padding: 8px 0 2px; }
.earnings-hero .lbl { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.65); font-weight: 700; }
.earnings-hero .amt { font-size: 34px; font-weight: 900; color: var(--theme-accent); }
.earnings-hero .sub { font-size: 12px; color: rgba(255,255,255,0.75); }

.stat-pill-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 12px; }
.stat-pill-box { border-radius: 12px; padding: 8px 4px; text-align: center; }
.stat-pill-box .v { font-size: 14px; font-weight: 900; }
.stat-pill-box .l { font-size: 8.5px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 800; opacity: 0.85; }
.stat-pill-box.paid { background: rgba(0,184,148,0.22); color: #05e0ac; }
.stat-pill-box.owed { background: rgba(255,107,107,0.22); color: #ff8a8a; }
.stat-pill-box.tab { background: rgba(240,147,43,0.22); color: #ffb054; }
.stat-pill-box.pending { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.85); }

.savings-card { background: var(--theme-dark); color: #fff; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; }
.savings-top { display: flex; justify-content: space-between; align-items: flex-start; }
.savings-top .lbl { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--theme-accent); font-weight: 800; }
.savings-top .name { font-size: 14.5px; font-weight: 800; }
.savings-top .amt { font-size: 15px; font-weight: 900; color: var(--theme-accent); text-align: right; }
.savings-foot { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 6px; }

.day-group { margin-bottom: 14px; }
.day-label { font-size: 13px; font-weight: 800; color: var(--ink); margin: 4px 4px 8px; display: flex; justify-content: space-between; }
.day-label .total { color: var(--muted); font-weight: 700; }

.job-card2 { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--border); }
.job-card2.state-paid { border-left-color: var(--green); }
.job-card2.state-owed { border-left-color: var(--red); }
.job-card2.state-tab { border-left-color: var(--amber); }
.job-card2.state-pending { border-left-color: var(--border); }
.job-card2.state-skipped { border-left-color: var(--border); opacity: 0.6; }
.job-card2.off-day { opacity: 0.55; filter: grayscale(0.4); }
.job-card2.off-day .price, .job-card2.off-day .cust { color: var(--muted); }
.offday-chip { background: var(--bg); color: var(--muted); border: 1px dashed var(--border); }
.tab-run-chip { background: var(--amber-light); color: #b7791f; }
.job-card2-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.job-card2 .cust { font-weight: 800; font-size: 14.5px; }
.job-card2 .addr { font-size: 12px; color: var(--muted); }
.job-card2 .price { font-weight: 900; font-size: 15px; color: var(--ink); white-space: nowrap; }
.job-chip { display: inline-block; margin-top: 5px; background: var(--purple-light); color: var(--purple-dark); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.job-chip.freq { background: var(--bg); color: var(--muted); margin-left: 4px; }
.skip-chip { background: var(--red-light); color: #c0392b; }
.job-card2-actions { display: flex; gap: 6px; margin-top: 10px; }
.jc-btn { flex: 1; border: 2px solid var(--border); background: #fff; border-radius: 10px; padding: 8px 4px; font-size: 12px; font-weight: 800; color: var(--ink); text-align: center; }
.jc-btn.on.paid { background: var(--green); border-color: var(--green); color: #fff; }
.jc-btn.on.tab { background: var(--amber); border-color: var(--amber); color: #fff; }
.jc-btn.on.skip { background: var(--muted); border-color: var(--muted); color: #fff; }
.request-btn {
  background: none; border: 2px solid var(--purple-light); color: var(--purple); border-radius: 999px;
  padding: 4px 10px; font-size: 10.5px; font-weight: 800; white-space: nowrap;
}

/* ---------- Clients tab ---------- */
.clients-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.clients-header h2 { font-size: 22px; }
.add-btn { background: var(--theme-primary); color: #fff; border: none; border-radius: 999px; padding: 10px 16px; font-size: 13px; font-weight: 800; }

.customer-card2 { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.customer-top { display: flex; align-items: center; gap: 12px; }
.avatar-circle { width: 42px; height: 42px; border-radius: 50%; background: var(--purple-light); color: var(--purple-dark); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.customer-info { flex: 1; min-width: 0; }
.customer-info .name { font-weight: 800; font-size: 14.5px; }
.customer-info .meta { font-size: 12px; color: var(--muted); }
.customer-figs { text-align: right; }
.customer-figs .amt { font-weight: 900; font-size: 14px; color: var(--ink); }
.customer-figs .sub { font-size: 11px; color: var(--muted); }
.chevron-btn { background: none; border: none; font-size: 16px; color: var(--muted); padding: 4px; }
.tab-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--amber-light); color: #b7791f; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; margin-top: 4px; }

.customer-jobs { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.customer-job-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 13px; }
.customer-job-row .jname { font-weight: 700; }
.customer-job-row .jfreq { font-size: 11px; color: var(--muted); }
.customer-job-row .jright { display: flex; align-items: center; gap: 8px; }
.remove-job-btn { background: none; border: none; color: var(--red); font-size: 15px; font-weight: 800; padding: 2px 4px; }
.customer-actions { display: flex; gap: 8px; margin-top: 10px; }
.customer-actions .btn { flex: 1; }

/* ---------- Grow tab ---------- */
.growth-card { background: var(--theme-dark); color: #fff; }
.growth-card .top { display: flex; justify-content: space-between; align-items: center; }
.growth-card .lbl { font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 800; color: rgba(255,255,255,0.65); }
.growth-card .frac { font-size: 17px; font-weight: 900; color: var(--theme-accent); }
.shortcut-tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0; }
.shortcut-tile { border-radius: var(--radius-sm); padding: 14px 8px; text-align: center; border: none; }
.shortcut-tile .ic { font-size: 22px; display: block; margin-bottom: 6px; }
.shortcut-tile .lbl2 { font-size: 12px; font-weight: 800; }
.shortcut-tile.t1 { background: var(--purple-light); color: var(--purple-dark); }
.shortcut-tile.t2 { background: #fff7e0; color: #a8710a; }
.shortcut-tile.t3 { background: var(--green-light); color: #00875a; }

.action-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.action-row:last-child { border-bottom: none; }
.action-check { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.action-check.done { background: var(--green); border-color: var(--green); color: #fff; }
.action-label { flex: 1; font-size: 13.5px; font-weight: 600; }
.action-label.done { text-decoration: line-through; color: var(--muted); }

/* ---------- Setup tab ---------- */
.setup-section-title { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 10px; }
.logo-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; width: 100%; max-width: 100%; box-sizing: border-box; }
.logo-opt { aspect-ratio: 1; min-width: 0; width: 100%; border: 2px solid var(--border); border-radius: 12px; background: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; }
.logo-opt.selected { border-color: var(--ink); border-width: 2px; box-shadow: 0 0 0 2px rgba(0,0,0,0.05); }
.logo-opt.upload-opt { font-size: 12px; color: var(--muted); flex-direction: column; gap: 2px; white-space: nowrap; }
.logo-opt img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.custom-logo-preview { width: 60px; height: 60px; border-radius: 14px; overflow: hidden; border: 2px solid var(--ink); margin-bottom: 8px; }
.custom-logo-preview img { width: 100%; height: 100%; object-fit: cover; }

.scheme-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.scheme-opt { border: 2px solid var(--border); border-radius: 12px; padding: 10px 6px; text-align: center; background: #fff; }
.scheme-opt.selected { border-color: var(--ink); }
.scheme-dots { display: flex; justify-content: center; gap: 3px; margin-bottom: 6px; }
.scheme-dots span { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.scheme-opt .nm { font-size: 11px; font-weight: 700; }

.bg-grid-picker { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; }
.bg-opt { border: 2px solid var(--border); border-radius: 12px; padding: 6px; text-align: center; background: #fff; }
.bg-opt.selected { border-color: var(--ink); }
.bg-swatch { height: 34px; border-radius: 8px; background: var(--bg); margin-bottom: 5px; }
.bg-swatch.p-dots { background-image: radial-gradient(var(--border) 1.4px, transparent 1.4px); background-size: 8px 8px; }
.bg-swatch.p-grid { background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 10px 10px; }
.bg-swatch.p-diagonal { background-image: repeating-linear-gradient(45deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 6px); }
.bg-swatch.p-waves { background-image: radial-gradient(circle at 0% 0%, var(--border) 0, transparent 60%), radial-gradient(circle at 100% 100%, var(--border) 0, transparent 60%); }
.bg-swatch.p-metal { background-image: repeating-linear-gradient(115deg, #eef0f4 0px, #eef0f4 3px, #dcdee4 3px, #dcdee4 6px); }
.bg-swatch.p-wood { background-image: repeating-linear-gradient(90deg, #f1e4d0 0px, #f1e4d0 5px, #e3cda3 5px, #e3cda3 10px, #ecdcbc 10px, #ecdcbc 15px); }
.bg-swatch.p-glitter { background-image: radial-gradient(circle, rgba(108,92,231,0.35) 1px, transparent 1.6px), radial-gradient(circle, rgba(253,203,110,0.5) 1px, transparent 1.6px), radial-gradient(circle, rgba(232,67,147,0.35) 1px, transparent 1.6px); background-size: 9px 9px, 12px 12px, 15px 15px; background-position: 0 0, 4px 6px, 2px 10px; background-color: #faf9ff; }
.bg-swatch.p-stripes { background-image: repeating-linear-gradient(45deg, var(--border) 0px, var(--border) 5px, #fff 5px, #fff 10px); }
.bg-opt .nm { font-size: 10px; font-weight: 700; }

.setup-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--border); }
.setup-row:last-child { border-bottom: none; }
.setup-row .lbl3 { font-weight: 700; font-size: 13.5px; }

/* ---------- Parent dashboard ---------- */
.parent-shell .topbar { background: var(--ink); }
.back-app-btn { background: rgba(255,255,255,0.14); border: none; color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; margin-bottom: 10px; }
.parent-tabs { display: flex; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; overflow-x: auto; }
.parent-tab { flex: 1; background: none; border: none; padding: 12px 4px; font-size: 12px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.parent-tab.active { color: var(--purple); border-color: var(--purple); }

.glance-card .glance-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.glance-card .glance-row:last-child { border-bottom: none; }
.glance-row .gl-left { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.glance-row .gl-val { font-weight: 900; font-size: 15px; }

.alert-card { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.alert-card.danger { background: var(--red-light); border: 1px solid #ffd2d2; }
.alert-card .at { font-weight: 800; color: #c0392b; font-size: 14px; }
.alert-card p { color: #a83232; font-size: 12.5px; margin: 4px 0 0; }

.history-card { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow); }
.history-top { display: flex; justify-content: space-between; align-items: center; }
.history-top .hlabel { font-weight: 800; font-size: 13.5px; }
.history-top .hrange { font-size: 11px; color: var(--muted); margin-left: 6px; }
.hstat-chip { font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; margin-right: 4px; }
.hstat-chip.done { background: var(--green-light); color: #00875a; }
.hstat-chip.pending2 { background: var(--bg); color: var(--muted); }
.history-day { font-size: 11.5px; font-weight: 800; color: var(--muted); margin: 10px 0 4px; }
.history-job-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12.5px; }
.status-tag { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.status-tag.scheduled { background: var(--purple-light); color: var(--purple-dark); }
.status-tag.paid { background: var(--green-light); color: #00875a; }
.status-tag.owed { background: var(--red-light); color: #c0392b; }
.status-tag.tab { background: var(--amber-light); color: #b7791f; }
.status-tag.skipped { background: var(--bg); color: var(--muted); }

.accordion-row { border-bottom: 1px solid var(--border); }
.accordion-row:last-child { border-bottom: none; }
.accordion-head { width: 100%; background: none; border: none; display: flex; align-items: center; gap: 12px; padding: 13px 0; text-align: left; }
.accordion-head .aic { width: 36px; height: 36px; border-radius: 10px; background: var(--purple-light); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.accordion-head .at2 { flex: 1; font-weight: 700; font-size: 13.5px; }
.accordion-head .chev { color: var(--muted); transition: transform 0.2s; }
.accordion-head.open .chev { transform: rotate(90deg); }
.accordion-body { padding: 0 0 14px 48px; font-size: 12.5px; line-height: 1.5; color: var(--ink); }

.safety-banner { background: linear-gradient(135deg, var(--green), #00a884); color: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.safety-banner .sb-lbl { font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 800; opacity: 0.85; }
.safety-item-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.safety-item-row:last-child { border-bottom: none; }
.safety-item-row .sic { font-size: 17px; }
.emergency-box { background: var(--red-light); border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; }
.emergency-box .et { font-weight: 800; color: #c0392b; font-size: 13px; margin-bottom: 4px; }
.emergency-box p { color: #a83232; font-size: 12px; }
.emergency-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; color: #a83232; }
.convo-item { background: var(--card); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; font-size: 12.5px; font-style: italic; box-shadow: var(--shadow); }

/* modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(30,26,50,0.5); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { background: #fff; width: 100%; max-width: 480px; border-radius: 24px 24px 0 0; padding: 20px; max-height: 88vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-header h3 { font-size: 17px; }
.modal-close { background: var(--bg); border: none; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; }
.reason-grid { display: flex; flex-direction: column; gap: 8px; }
.reason-opt { display: flex; align-items: center; gap: 10px; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; font-size: 14px; font-weight: 600; text-align: left; }
.reason-opt .ic { font-size: 18px; }

.mini-cal { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13.5px; }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini-cal-dow { text-align: center; font-size: 10.5px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.mini-cal-day {
  aspect-ratio: 1; border: none; background: var(--bg); border-radius: 8px; font-size: 12.5px;
  font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center;
}
.mini-cal-day.empty { background: none; }
.mini-cal-day.greyed { color: #c3c0d1; background: #f2f1f7; }
.mini-cal-day.today { box-shadow: inset 0 0 0 2px var(--theme-primary); }
.mini-cal-day.selected { background: var(--theme-primary); color: #fff; }
.mini-cal-day.selected.greyed { background: var(--theme-primary); color: #fff; opacity: 0.6; }

.flyer-preview { border-radius: var(--radius); padding: 24px 18px; text-align: center; color: #fff; }
.flyer-preview .flyer-logo { font-size: 40px; }
.flyer-preview h2 { color: #fff; font-size: 22px; margin: 8px 0 4px; }
.flyer-preview .tagline { color: rgba(255,255,255,0.85); font-size: 13px; }
.flyer-preview .contact { margin-top: 16px; background: rgba(255,255,255,0.15); border-radius: 12px; padding: 10px; font-size: 12px; color: #fff; text-align: center; }
.flyer-services { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.flyer-service-chip { background: rgba(255,255,255,0.18); color: #fff; font-size: 11.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.flyer-qr-block { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flyer-qr-caption { color: #fff; font-size: 13px; font-weight: 600; margin: 0; }
.flyer-qr-box { background: #fff; padding: 8px; border-radius: 10px; display: inline-flex; }
.flyer-qr { display: block; width: 120px; height: 120px; }
.flyer-qr-link { color: rgba(255,255,255,0.75); font-size: 11px; margin: 0; word-break: break-all; text-align: center; }

.tabbar-spacer { height: 4px; }

/* ---------- Help & Support ---------- */
.help-status-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.help-status-badge.open { background: #FFF3CD; color: #8A6D00; }
.help-status-badge.answered { background: var(--green-light, #E3FBEE); color: #00875a; }
.help-status-badge.closed { background: var(--border); color: var(--muted); }
.help-thread-row { border: none; }
.help-thread-row:hover { box-shadow: 0 0 0 2px var(--purple-light); }
.help-thread-messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.help-bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; }
.help-bubble.user { align-self: flex-end; background: var(--purple); color: #fff; border-bottom-right-radius: 4px; }
.help-bubble.admin { align-self: flex-start; background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 4px; }
.help-bubble-label { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.7; margin-bottom: 3px; }
.help-bubble-body { font-size: 14px; white-space: pre-wrap; word-break: break-word; }

@media (min-width: 500px) {
  body { background: #EDEAFB; }
  #app { margin: 16px auto; min-height: calc(100vh - 32px); border-radius: 28px; overflow: hidden; box-shadow: 0 20px 60px rgba(76,66,140,0.18); }
}
