/* App pages: sign-up, sign-in, home, customers, upload, settings. Palette and rules from the design doc, section 5.10:
   white-and-black base, black or violet buttons, bold tight headlines, bright colors only as blocks behind dark text. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/archivo-400.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/archivo-500.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/archivo-600.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/archivo-700.woff2) format('woff2'); }

:root {
  --ink: #0B0B0F;
  --paper: #FFFFFF;
  --panel: #F0F0F0;
  --line: #E2E2E6;
  --violet: #7C3AED;
  --lime: #B6FF3B;
  --lavender: #DCC2FF;
  --sky: #2FA8FF;
  --pale-sky: #C4E6FF;
  --sage: #8FA59C;
  --sun: #FFD84D;
  --pink: #FF2D6B;
  /* Not palette colors: readable grey text, and input borders dark enough to see (3:1 on white) */
  --muted: #5B5B66;
  --field-line: #8A8A96;
  --ink-2: #1C1C24;
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
h1 { font-size: 40px; }
h2 { font-size: 26px; }
p { margin: 0; }
a { color: var(--violet); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
.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;
}
.muted { color: var(--muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink);
  font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--panel); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); color: var(--paper); }
.btn-violet { background: var(--violet); border-color: var(--violet); color: var(--paper); }
.btn-violet:hover { background: #6A2BD6; border-color: #6A2BD6; color: var(--paper); }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn:disabled:hover { background: var(--paper); }
.btn-violet:disabled:hover { background: var(--violet); }
.btn-dark:disabled:hover { background: var(--ink); }
.btn-link {
  border: 0; background: none; padding: 0; font: 600 15px/1.4 var(--font); color: var(--violet); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.btn-link:hover { color: var(--ink); }
.btn-link:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* ---- Mark: the Harvori H (two text bubbles joined by a leaf), from the brand guidelines ---- */
.mark {
  display: inline-block; flex: none; width: 34px; height: 20px; background: url(harvori-mark.svg) no-repeat center / contain;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 17px; letter-spacing: -0.02em;
}
.brand:hover { color: var(--ink); }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Tags: color blocks behind dark text ---- */
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 4px; background: var(--lavender); color: var(--ink);
  font-weight: 700; font-size: 13px; letter-spacing: -0.01em;
}
.tag-lime { background: var(--lime); }
.tag-sky { background: var(--pale-sky); }
.tag-quiet { background: var(--panel); color: var(--muted); font-weight: 600; }

/* ---- Sign-up and sign-in pages ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px;
  border-bottom: 1px solid var(--line);
}
.bar-alt { font-size: 14px; color: var(--muted); text-align: right; }
.auth {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start;
  max-width: 1120px; margin: 0 auto; padding: 36px 24px 72px;
}
.auth-single { grid-template-columns: minmax(0, 440px); justify-content: center; }
.intro {
  position: sticky; top: 24px; overflow: hidden; padding: 32px; border-radius: 14px; background: var(--ink); color: var(--paper);
}
.intro h1 { font-size: 44px; letter-spacing: -0.04em; max-width: 12ch; }
.intro p { margin-top: 14px; color: rgba(255, 255, 255, .78); max-width: 38ch; }
.px { position: absolute; display: block; width: 12px; height: 12px; }
.px-1 { right: 64px; top: 26px; background: var(--lime); }
.px-2 { right: 46px; top: 44px; background: var(--violet); }
.px-3 { right: 84px; top: 56px; width: 7px; height: 7px; background: var(--sky); }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.steps li {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--ink-2);
  color: rgba(255, 255, 255, .78); font-weight: 500; font-size: 15px; counter-increment: step;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 6px;
  background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 13px;
}
.steps li.now { background: var(--lavender); color: var(--ink); font-weight: 700; }
.steps li.now::before { background: var(--ink); color: var(--paper); }

.card { min-width: 0; }
.card h1 { font-size: 36px; }
.card .lede { margin-top: 10px; color: var(--muted); }
.step-label { margin-bottom: 14px; }
.notice {
  margin-bottom: 22px; padding: 12px 14px; border-radius: 10px; background: var(--pale-sky); color: var(--ink); font-size: 15px;
}
.notice-ok { background: var(--lime); font-weight: 600; }
.form { margin-top: 26px; }
.field { margin-bottom: 18px; }
.field > label, .label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.optional { font-weight: 400; color: var(--muted); }
.hint { margin-top: 6px; font-size: 14px; color: var(--muted); }
.field > label + .hint { margin: -2px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=password], select {
  display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 400 16px/1.3 var(--font);
}
select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230B0B0F' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input:hover, select:hover { border-color: var(--ink); }
input:focus-visible, select:focus-visible { outline: 3px solid var(--violet); outline-offset: 0; border-color: var(--violet); }
[aria-invalid="true"] { border-color: var(--pink) !important; box-shadow: 0 0 0 1px var(--pink); }
.code-input { font-size: 24px !important; font-weight: 600 !important; letter-spacing: .3em; max-width: 240px; text-align: center; }

.field-error {
  display: flex; gap: 8px; align-items: baseline; margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--ink);
}
.field-error::before {
  content: ''; flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--pink); transform: translateY(1px);
}
.form-error {
  margin: 0 0 16px; padding: 12px 14px; border-left: 4px solid var(--pink); border-radius: 6px; background: var(--panel);
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.form-info {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 6px; background: var(--lime); color: var(--ink); font-size: 15px; font-weight: 500;
}

.group {
  margin: 28px 0 22px; padding: 20px 18px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
}
.group legend { padding: 0 6px; margin-left: -6px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.group .why { margin-bottom: 16px; font-size: 14px; color: var(--muted); }

.check, .field > label.check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 15px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--violet); cursor: pointer; }
.accept { padding: 14px; border-radius: 10px; background: var(--panel); }
.accept .check { font-weight: 600; }
.actions { margin-top: 22px; }
.after { margin-top: 18px; font-size: 15px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 18px; }

/* Password box (assets/password.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 52px; }
.pw-eye {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%); display: grid; place-items: center;
  width: 40px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer;
}
.pw-eye:hover { background: var(--panel); }
.pw-meter { margin-top: 10px; }
.pw-top { display: flex; align-items: center; gap: 12px; }
.pw-bar { display: flex; flex: 1; gap: 4px; max-width: 220px; }
.pw-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.pw-meter[data-score="1"] .pw-bar i:nth-child(-n+1) { background: var(--pink); }
.pw-meter[data-score="2"] .pw-bar i:nth-child(-n+2) { background: var(--sun); }
.pw-meter[data-score="3"] .pw-bar i:nth-child(-n+3) { background: var(--sky); }
.pw-meter[data-score="4"] .pw-bar i { background: var(--violet); }
.pw-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.pw-rules { display: grid; gap: 4px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.pw-rules li::before {
  content: ''; display: grid; place-items: center; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--field-line);
  border-radius: 4px; font-size: 11px; font-weight: 700; line-height: 1;
}
.pw-rules li.ok { color: var(--ink); }
.pw-rules li.ok::before { content: '\2713'; border-color: var(--ink); background: var(--lime); color: var(--ink); }
.pw-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- Home shell ---- */
.top {
  display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.top .brand { flex: 0 1 auto; max-width: 240px; }
.top > nav { flex: 1; min-width: 0; }
/* One row at every width; when it doesn't fit, the row scrolls sideways (the page never does) */
.nav {
  display: flex; flex-wrap: nowrap; gap: 2px; align-items: center; margin: 0; padding: 4px; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.nav li { flex: none; }
.nav-item {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 8px; border-radius: 6px; white-space: nowrap;
  color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none;
}
a.nav-item:hover { background: var(--panel); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--lavender); font-weight: 700; }
.nav-item.soon { color: var(--muted); cursor: default; }
.soon-tag {
  padding: 1px 4px; border-radius: 3px; background: var(--panel); color: var(--muted); font-size: 10px; font-weight: 600;
  letter-spacing: .02em; text-transform: uppercase;
}
.account { position: relative; flex: none; margin-left: auto; }
.account-btn { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.account-btn .chev { transition: transform .15s; }
.account-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; width: 260px; max-width: calc(100vw - 32px); padding: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 10px 30px rgba(11, 11, 15, .12);
}
.menu-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: 14px; overflow-wrap: anywhere; }
.menu-who b { display: block; }
.menu-item {
  display: block; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: none; color: var(--ink);
  font: 500 15px/1.3 var(--font); text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--panel); color: var(--ink); }
a.menu-item { min-height: 44px; text-decoration: none; }

.page { max-width: 1180px; margin: 0 auto; padding: 24px 24px 72px; }
.banner {
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 18px; padding: 12px 16px;
  border-radius: 10px; background: var(--lavender); color: var(--ink); font-size: 15px; overflow-wrap: anywhere;
}
.banner b { font-weight: 700; }
.hero {
  position: relative; overflow: hidden; padding: 28px; border-radius: 14px; background: var(--ink); color: var(--paper);
}
.hero .k { font-size: 14px; color: rgba(255, 255, 255, .75); overflow-wrap: anywhere; }
.hero h1 { margin-top: 8px; font-size: 48px; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.hero .tag { margin-top: 14px; }
.empty {
  display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; justify-content: space-between; margin-top: 16px;
  padding: 26px 24px; border-radius: 14px; background: var(--panel);
}
.empty h2 { font-size: 28px; }
.empty p { margin-top: 8px; max-width: 52ch; color: var(--muted); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translateX(-50%); max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 10px; background: var(--lime); color: var(--ink); font-weight: 700;
  box-shadow: 0 10px 30px rgba(11, 11, 15, .18);
}
.loading { padding: 48px 24px; text-align: center; color: var(--muted); }

/* ---- Signed-in pages: shared bits ---- */
.page-narrow { max-width: 860px; }
.page-head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-sub { margin-top: 8px; font-size: 15px; }
.page .lede { margin-top: 8px; color: var(--muted); max-width: 62ch; overflow-wrap: anywhere; }
.back { margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.back a { display: inline-flex; align-items: center; min-height: 44px; }
.back a::before { content: '\2190\00a0'; }
.missing .after a { display: inline-flex; align-items: center; min-height: 44px; }
.sub-title { margin: 24px 0 10px; font-size: 18px; letter-spacing: -0.02em; }
.panel { min-width: 0; margin-top: 16px; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.panel > h2 { font-size: 22px; }
.panel > .hint { margin-top: 6px; }
.panel .form { margin-top: 18px; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tile h2 { overflow-wrap: anywhere; }
.missing { padding: 32px 0; }
.missing h1 { font-size: 32px; }
textarea {
  display: block; width: 100%; min-height: 88px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 400 16px/1.4 var(--font); resize: vertical;
}
textarea:hover { border-color: var(--ink); }
textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 0; border-color: var(--violet); }

/* Consent pills (consented lime, none panel, opted out sage) and the complaint dot */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px; color: var(--ink); font-size: 13px; font-weight: 700;
  white-space: nowrap; letter-spacing: -0.01em;
}
.pill-lime { background: var(--lime); }
.pill-panel { background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.pill-sage { background: var(--sage); }
.dot-pink { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); vertical-align: middle; }

/* ---- Customers list ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--paper); color: var(--ink); font: 600 14px/1.2 var(--font); cursor: pointer;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-n { padding: 1px 7px; border-radius: 999px; background: var(--panel); color: var(--ink); font-size: 12px; font-weight: 700; }
.chip[aria-pressed="true"] .chip-n { background: var(--lavender); }
.search { max-width: 420px; margin-bottom: 16px; }
input[type=search] {
  display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font: 400 16px/1.3 var(--font); -webkit-appearance: none; appearance: none;
}
input[type=search]:hover { border-color: var(--ink); }
input[type=search]:focus-visible { outline: 3px solid var(--violet); outline-offset: 0; border-color: var(--violet); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th {
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); text-align: left; font-size: 13px;
  font-weight: 700; color: var(--muted); white-space: nowrap;
}
.table td { padding: 4px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-name a { display: block; min-height: 44px; padding: 11px 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.cell-name a:hover { color: var(--violet); }
.cell-name a.muted { color: var(--muted); font-weight: 500; }
.cell-mobile { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-flag { width: 44px; text-align: center; }
.cell-sub { display: none; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .col-mobile { display: none; }
  .cell-sub { display: block; }
  .cell-name a { padding: 6px 0; }
}
.none-match { padding: 28px 16px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: center; margin-top: 18px; font-size: 15px; }

/* ---- Upload customers ---- */
.stepper { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 22px; padding: 0; list-style: none; counter-reset: step; }
.stepper li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 8px; background: var(--panel);
  color: var(--muted); font-size: 14px; font-weight: 600; counter-increment: step;
}
.stepper li::before {
  content: counter(step); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  background: var(--paper); color: var(--ink); font-size: 13px; font-weight: 700;
}
.stepper li.done { color: var(--ink); }
.stepper li.done::before { content: '\2713'; background: var(--lime); }
.stepper li[aria-current="step"] { background: var(--lavender); color: var(--ink); }
.stepper li[aria-current="step"]::before { background: var(--ink); color: var(--paper); }
.step-panel > h2 { font-size: 26px; }
.step-panel > h2:focus { outline: none; }
.drop {
  display: grid; justify-items: center; gap: 8px; margin-top: 20px; padding: 32px 20px; border: 2px dashed var(--field-line);
  border-radius: 14px; background: var(--panel); text-align: center;
}
.drop.over { border-color: var(--violet); background: var(--lavender); }
.drop.busy { opacity: .6; pointer-events: none; }
.drop-title { font-size: 18px; font-weight: 700; }
.drop .hint { margin-top: 4px; }
/* The real file input is kept for keyboards and screen readers; its label is the visible button */
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-input:focus-visible + label { outline: 3px solid var(--violet); outline-offset: 2px; }
.file-input + label { cursor: pointer; }
.upload-status { margin-top: 12px; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin-top: 20px; }
.match-row > label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.match-row select { text-overflow: ellipsis; }
.table-sample td { white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.consent-confirm { margin-top: 22px; }
.consent-confirm .check span { min-width: 0; overflow-wrap: anywhere; }
.consent-column { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.facts { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.facts li {
  padding: 12px 14px 12px 16px; border-left: 4px solid var(--violet); border-radius: 6px; background: var(--panel);
  font-size: 16px; font-weight: 500;
}

/* ---- One customer ---- */
.customer-name { font-size: 36px; overflow-wrap: anywhere; }
.banner-sun {
  align-items: center; justify-content: space-between; gap: 12px 20px; margin: 18px 0 0; padding: 14px 16px; background: var(--sun);
}
.banner-sun .btn { flex: none; }
.banner-note { margin-top: 4px; overflow-wrap: anywhere; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 16px 0 0; font-size: 15px; }
.details dt { color: var(--muted); font-weight: 600; }
.details dd { margin: 0; overflow-wrap: anywhere; }
.consent-now { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 14px; font-size: 15px; }
.history { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.history li { padding-left: 12px; border-left: 3px solid var(--line); }
.history-what { font-weight: 700; font-size: 15px; }
.wording { margin: 6px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--panel); color: var(--ink); overflow-wrap: anywhere; }
.flag-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.note-form { margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--panel); }
.note-form label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.panel .form-error { margin-top: 14px; }
.flags { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.flag { padding: 10px 12px; border-radius: 8px; background: var(--panel); overflow-wrap: anywhere; }
.flag-open { box-shadow: inset 4px 0 0 var(--pink); }
.flag-note { margin-top: 4px; }

/* ---- Settings ---- */
.optin { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 18px; }
.optin-qr { flex: none; width: 140px; height: 140px; border: 1px solid var(--line); border-radius: 8px; }
.optin-main { flex: 1 1 260px; min-width: 0; }
.optin-url { margin-top: 2px; font-weight: 600; overflow-wrap: anywhere; }
.optin-url a { display: inline-block; padding: 10px 0; }
.optin .form-error { margin-top: 14px; }

/* ---- Campaigns and texting ---- */
.banner-pink { margin: 14px 0 0; padding: 12px 16px; background: var(--pink); font-weight: 600; }
.status-line { margin-top: 14px; font-weight: 600; overflow-wrap: anywhere; }
.status-link { margin-top: 6px; }
.status-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.panel > .muted:not(.hint) { margin-top: 6px; }
.allowance { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; }
.drafts, .moments, .texts { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.moments { margin-top: 0; }
.draft, .moment, .text { padding: 14px 16px; border-radius: 10px; background: var(--panel); overflow-wrap: anywhere; }
.draft-head, .text-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.draft-who { font-weight: 700; color: var(--ink); }
.draft-body, .text-body { margin-top: 8px; white-space: pre-wrap; }
.draft .step-actions, .moment .step-actions { margin-top: 12px; }
.moment-top { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.moment-label { font-weight: 700; }
.moment-wait { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--muted); }
.moment .wording { margin-top: 10px; background: var(--paper); }
/* An on/off switch: the knob's side says on or off as well as the color */
.switch {
  position: relative; flex: none; width: 64px; min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
}
.switch::before {
  content: ''; position: absolute; left: 4px; top: 6px; width: 56px; height: 32px; border: 2px solid var(--field-line);
  border-radius: 999px; background: var(--paper);
}
.switch[aria-checked="true"]::before { background: var(--lime); border-color: var(--ink); }
.switch-knob { position: absolute; left: 10px; top: 12px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch[aria-checked="true"] .switch-knob { transform: translateX(26px); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.text-in { box-shadow: inset 4px 0 0 var(--violet); }
.text-out { background: var(--paper); border: 1px solid var(--line); }
.code-field { margin-top: 18px; }
.code-field .code-input { max-width: 240px; }
.panel > .banner { margin: 14px 0 0; }

/* ---- Hosted opt-in page (public, phone-first) ---- */
.join { max-width: 480px; margin: 0 auto; padding: 32px 20px 40px; }
.join-card { min-width: 0; }
.join-title { font-size: 34px; overflow-wrap: anywhere; }
.join .lede { margin-top: 10px; color: var(--muted); }
.join .notice { margin: 22px 0 0; }
.join .accept .check { font-weight: 500; font-size: 14px; line-height: 1.45; }
.join .check span { min-width: 0; overflow-wrap: anywhere; }
.join-submit { min-height: 52px; font-size: 16px; }
.powered { margin-top: 32px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- Printable QR page ---- */
.qr-back { flex: none; margin-left: auto; min-height: 40px; padding: 8px 12px; font-size: 14px; }
.qr-sheet { max-width: 520px; margin: 8px auto 0; text-align: center; }
.qr-business { font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.qr-title { margin-top: 8px; font-size: 36px; overflow-wrap: anywhere; }
.qr-img { display: block; width: 100%; max-width: 330px; height: auto; margin: 28px auto 0; }
.qr-url { margin-top: 16px; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.qr-sheet .btn { margin-top: 28px; min-width: 160px; }
@media print {
  @page { margin: 12mm; }
  .no-print, .toast { display: none !important; }
  .qr-title, .qr-url { color: #000; }
  .page { padding: 0; }
  .qr-sheet { margin-top: 48px; }
  .qr-img { max-width: 360px; }
}

/* ---- Reviews ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tab {
  min-height: 44px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink);
  font: 600 15px/1.2 var(--font); cursor: pointer;
}
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.asks { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.ask { padding: 14px 16px; border-radius: 10px; background: var(--panel); overflow-wrap: anywhere; }
.ask-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.ask-who { font-weight: 700; color: var(--ink); }
.ask-date { margin-left: auto; font-size: 14px; }
.stars { color: var(--ink); letter-spacing: 1px; white-space: nowrap; }
.message { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: var(--paper); box-shadow: inset 4px 0 0 var(--violet); }
.message-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.message-choices { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.message-body { margin-top: 8px; white-space: pre-wrap; }
.message .step-actions { margin-top: 12px; }
.avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--lavender); color: var(--ink); font-size: 14px; font-weight: 700;
}
.review-reply { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--violet); background: var(--paper); border-radius: 0 6px 6px 0; white-space: pre-wrap; }
.review > .btn { margin-top: 12px; }
.reply-form { margin-top: 12px; }
.reply-form .form-error { margin-top: 10px; }
#panel-google > p:first-child { font-weight: 700; }
.choices { margin: 16px 0 0; padding: 0; border: 0; display: grid; gap: 12px; }
.choices legend { padding: 0; }
.panel .choices + .step-actions { margin-top: 16px; }
.logo-box { margin-top: 14px; }
.logo-img { display: block; max-width: 220px; max-height: 120px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.logo-box + .field { margin-top: 16px; }
.ask-box { margin-top: 24px; padding-top: 4px; border-top: 1px solid var(--line); }
.ask-box .sub-title { margin-top: 18px; }
.ask-box .form-info, .ask-box .form-error { margin-top: 12px; }
#google-title-line { margin-top: 14px; }
#link-form { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
#google-notice { margin-top: 14px; }

/* ---- Phones and small tablets ---- */
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 20px 16px 56px; }
  .auth-single { grid-template-columns: minmax(0, 1fr); }
  .intro { position: relative; top: 0; padding: 22px 20px; }
  .intro h1 { font-size: 30px; }
  .steps { display: none; }
  .card h1 { font-size: 30px; }
  .bar { padding: 12px 16px; }
  .top { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .top .brand { flex: 1 1 0; max-width: none; }
  .top > nav { order: 3; flex: 0 0 calc(100% + 32px); margin: 0 -16px; }
  .nav { padding: 2px 8px 4px; }
  .page { padding: 16px 16px 56px; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 34px; }
  .hero .px { display: none; }
  .empty { padding: 22px 18px; }
  .empty h2 { font-size: 24px; }
  .empty .btn { width: 100%; }
  .nav-item, .account-btn, .qr-back { min-height: 44px; }
  h1, .customer-name { font-size: 30px; }
  .page-head .btn { width: 100%; }
  .search { max-width: none; }
  .panel { padding: 18px 16px 20px; }
  .cols, .match { grid-template-columns: minmax(0, 1fr); }
  .details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .details dd { margin-bottom: 8px; }
  .step-actions .btn { flex: 1 1 100%; }
  .banner-sun .btn { width: 100%; }
  .flag-buttons .btn { flex: 1 1 100%; }
  .table th, .table td { padding: 8px 10px; }
  .drop { padding: 24px 16px; }
  .optin-qr { width: 120px; height: 120px; }
  .ask-date { margin-left: 0; flex-basis: 100%; }
  .message .step-actions .btn, .reply-form .step-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
