/* ==========================================================================
   Review QR Studio - design system
   Navy + gold identity - Inter for UI - Fraunces for display accents
   ========================================================================== */

:root {
  /* Brand */
  --navy-900: #0b1524;
  --navy-800: #0f1b2d;
  --navy-700: #16263d;
  --navy-600: #22344f;
  --gold-700: #8f6412;
  --gold-600: #a97615;
  --gold-500: #c08e22;
  --gold-400: #d9ab45;
  --gold-100: #f8efd9;
  --gold-50:  #fcf7ea;

  /* Neutrals */
  --ink:      #131f33;
  --ink-2:    #3b4960;
  --muted:    #64728a;
  --faint:    #94a0b3;
  --line:     #e6eaf1;
  --line-2:   #eef1f6;
  --canvas:   #f4f6fa;
  --surface:  #ffffff;

  /* Status */
  --green-600: #0f8a5f;
  --green-50:  #e6f6ee;
  --blue-600:  #2f6fd6;
  --blue-50:   #e9f1ff;
  --violet-600:#6c4bc4;
  --violet-50: #f1ecff;
  --amber-700: #8a5d0b;
  --amber-50:  #fdf3dc;
  --red-600:   #cf4436;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow:    0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px rgba(15, 27, 45, .05);
  --shadow-lg: 0 12px 40px rgba(15, 27, 45, .14);
  --ring:      0 0 0 3px rgba(192, 142, 34, .25);

  --font-ui: Inter, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: Fraunces, Georgia, "Times New Roman", serif;
  --sidebar-w: 264px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--navy-800); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm);
  text-decoration: none; transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* Icons ------------------------------------------------------------------ */
.ic {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 16px; height: 16px; stroke-width: 2; }

/* Layout ----------------------------------------------------------------- */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.main {
  min-width: 0;
  padding: 0 40px 32px;
  max-width: 1320px;
  width: 100%;
}

/* Sidebar ---------------------------------------------------------------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 24px 16px 18px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(217, 171, 69, .10), transparent 55%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #dfe7f3;
  overflow-y: auto;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 0 8px; text-decoration: none; color: #fff;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #f2cf78, #b47b12);
  color: var(--navy-800);
  box-shadow: 0 6px 16px rgba(192, 142, 34, .35), inset 0 1px 0 rgba(255,255,255,.4);
}
.brand-mark .ic { width: 21px; height: 21px; stroke-width: 2; }
.brand-text { font: 600 18px/1.05 var(--font-display); letter-spacing: -.2px; }
.brand-text small {
  display: block; margin-top: 4px;
  font: 600 10px/1 var(--font-ui); letter-spacing: 3.2px; text-transform: uppercase; color: #9fb0c8;
}

.workspace {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 24px; padding: 11px 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius);
}
.workspace-dot { width: 8px; height: 8px; border-radius: 50%; background: #46d39a; box-shadow: 0 0 0 4px rgba(70,211,154,.18); }
.workspace-text b { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.workspace-text small { display: block; font-size: 12px; color: #93a4bd; margin-top: 1px; }
.workspace > .ic { margin-left: auto; color: #8a9bb4; }

.nav-label {
  padding: 0 12px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: #71829c;
}
.nav { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border: 0; border-radius: 10px; background: transparent;
  color: #a9b8ce; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: rgba(217, 171, 69, .14);
  color: #fff;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--gold-400);
}
.nav-item.active .ic { color: var(--gold-400); }
.nav-item em {
  margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 20px; background: var(--gold-400); color: var(--navy-800);
}
.nav-settings { margin-top: 12px; }
.nav-settings::after {
  content: ""; position: absolute; left: 12px; right: 12px; top: -7px; height: 1px; background: rgba(255,255,255,.08);
}

.sidebar-spacer { flex: 1; min-height: 28px; }

.sidebar-card {
  padding: 16px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(217,171,69,.16), rgba(255,255,255,.04));
  border: 1px solid rgba(217,171,69,.25);
}
.sidebar-card-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(217,171,69,.18); color: var(--gold-400);
}
.sidebar-card b { display: block; margin: 12px 0 4px; font-size: 14px; color: #fff; font-weight: 600; }
.sidebar-card p { font-size: 12.5px; line-height: 1.55; color: #a9b8ce; margin-bottom: 14px; }
.sidebar-card button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 9px;
  background: var(--gold-400); color: var(--navy-800); font-weight: 600; font-size: 13px;
  transition: background .15s;
}
.sidebar-card button:hover { background: #e4b955; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 16px 4px 0; font-size: 12px; color: #7f90a9; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #42d49b; }

/* Topbar ----------------------------------------------------------------- */
.topbar {
  height: 76px; margin-bottom: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb span { padding: 0 8px; color: #c2cad6; }
.breadcrumb b { color: var(--ink); font-weight: 600; }
.mobile-brand { display: none; align-items: center; gap: 10px; font: 600 16px var(--font-display); }
.mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.mobile-brand .brand-mark .ic { width: 18px; height: 18px; }

.top-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink-2);
  box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: #d3dae5; color: var(--ink); }
.icon-btn i { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--red-600); border: 2px solid #fff; }
.profile { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.profile-avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--navy-600), var(--navy-800)); color: var(--gold-400);
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.profile-name b { display: block; font-size: 13px; font-weight: 600; line-height: 1.2; }
.profile-name small { display: block; font-size: 12px; color: var(--muted); }

/* Views ------------------------------------------------------------------ */
.view { display: none; }
.view.active { display: block; animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 24px;
}
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-600); margin-bottom: 8px; }
.page-heading h1 { font: 500 32px/1.15 var(--font-display); letter-spacing: -.5px; color: var(--ink); }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: 15px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink-2);
  font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15,27,45,.08); border-color: #d3dae5; }
.btn:active:not(:disabled) { transform: none; }
.btn:disabled { opacity: .5; box-shadow: none; }
.btn-primary {
  background: linear-gradient(180deg, #c99a30, var(--gold-600));
  border-color: var(--gold-700); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 12px rgba(169,118,21,.28);
}
.btn-primary:hover:not(:disabled) { border-color: var(--gold-700); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px rgba(169,118,21,.34); }
.btn-outline { background: var(--surface); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--gold-700); }
.btn-ghost:hover:not(:disabled) { background: var(--gold-50); border-color: transparent; box-shadow: none; }
.btn-light { background: #fff; border-color: transparent; color: var(--navy-800); }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

/* Cards ------------------------------------------------------------------ */
.card, .stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card { padding: 24px; min-width: 0; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.card-heading h2, .card > h2 { font-size: 17px; font-weight: 600; letter-spacing: -.2px; color: var(--ink); }
.card-heading p { margin-top: 3px; font-size: 13px; color: var(--muted); }

.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }

/* Badges & chips --------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--line-2); color: var(--ink-2);
}
.badge .dot, .badge i { width: 6px; height: 6px; border-radius: 50%; background: #38b982; }
.badge-green { background: var(--green-50); color: var(--green-600); }
.badge-gold  { background: var(--gold-100); color: var(--gold-700); }
.badge-amber { background: var(--amber-50); color: var(--amber-700); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.muted { color: var(--muted); }

/* Stats ------------------------------------------------------------------ */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 20px; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.icon-violet { background: var(--violet-50); color: var(--violet-600); }
.icon-green  { background: var(--green-50);  color: var(--green-600); }
.icon-blue   { background: var(--blue-50);   color: var(--blue-600); }
.icon-gold   { background: var(--gold-100);  color: var(--gold-600); }
.stat-card > strong {
  display: block; margin: 14px 0 10px;
  font: 500 36px/1 var(--font-display); letter-spacing: -1px; font-variant-numeric: tabular-nums;
}
.stat-card > strong.strong-sm { font: 600 20px/1.3 var(--font-ui); letter-spacing: -.2px; margin: 20px 0 16px; }
.stat-foot { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12.5px; }
.is-pending > strong { color: var(--faint); }

/* Grids ------------------------------------------------------------------ */
.content-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; align-items: start; }

/* Business list ---------------------------------------------------------- */
.business-list { display: grid; }
.business-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-top: 1px solid var(--line-2);
}
.business-row:first-child { border-top: 0; padding-top: 4px; }
.business-art {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-50), #f1e0b8);
  color: var(--gold-700); font: 600 18px var(--font-display);
}
.business-info { flex: 1; min-width: 0; }
.business-info b { display: block; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.business-info small { display: flex; align-items: center; gap: 8px; margin-top: 3px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.business-meta { display: flex; align-items: center; gap: 8px; }
.icon-action {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--faint);
  transition: background .15s, color .15s;
}
.icon-action:hover { background: var(--line-2); color: var(--ink); }
.icon-action.danger:hover { background: #fdeceb; color: var(--red-600); }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 0;
  border: 0; background: transparent; color: var(--blue-600); font-weight: 600; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }
.list-empty { padding: 24px 0 8px; text-align: center; color: var(--muted); }

/* Checklist -------------------------------------------------------------- */
.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-bottom: 14px; }
.progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .4s ease; }
.checklist { display: grid; gap: 4px; }
.checklist li {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px; margin: 0 -8px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.checklist li.todo { cursor: pointer; }
.checklist li.todo:hover { background: var(--line-2); }
.checklist .tick {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  border: 2px solid #d3dae5; color: transparent;
}
.checklist .tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.checklist li.done .tick { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.checklist li.done span { color: var(--muted); text-decoration: line-through; text-decoration-color: #c2cad6; }
.checklist li .go { margin-left: auto; color: var(--faint); }

/* Empty state ------------------------------------------------------------ */
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state.compact { padding: 8px 12px 6px; }
.empty-art {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-50), var(--gold-100)); color: var(--gold-600);
}
.empty-art .ic { width: 30px; height: 30px; }
.empty-state h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-state p { max-width: 340px; margin: 0 auto 18px; font-size: 14px; color: var(--muted); }
.empty-state.compact .empty-art { width: 56px; height: 56px; border-radius: 18px; }

/* Promo ------------------------------------------------------------------ */
.promo {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 28px; padding: 28px 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(217,171,69,.28), transparent 60%),
    linear-gradient(120deg, var(--navy-800), var(--navy-700));
  color: #fff; box-shadow: var(--shadow);
}
.promo-qr {
  width: 84px; height: 84px; flex-shrink: 0; border: 8px solid #fff; border-radius: 10px;
  background: repeating-conic-gradient(var(--navy-800) 0% 25%, #fff 0% 50%) 50% / 14px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); transform: rotate(-4deg);
}
.promo-copy { flex: 1; min-width: 0; }
.promo .eyebrow { color: var(--gold-400); margin-bottom: 6px; }
.promo h2 { font: 500 26px/1.2 var(--font-display); letter-spacing: -.3px; }
.promo p { margin-top: 6px; color: #b4c2d8; font-size: 14.5px; }

/* Forms ------------------------------------------------------------------ */
.field { margin-top: 18px; }
.field:first-of-type { margin-top: 0; }
.field label, .label-row label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; }
.label-row label { margin-bottom: 7px; }
.required { color: var(--red-600); }
.optional { font-size: 12px; color: var(--muted); }
.control {
  width: 100%; padding: 11px 13px;
  border: 1px solid #d9e0ea; border-radius: 10px; background: #fff; color: var(--ink);
  font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.control::placeholder { color: #a3adbd; }
.control:hover { border-color: #c6cfdc; }
.control:focus { border-color: var(--gold-500); box-shadow: var(--ring); }
.control[readonly] { background: var(--canvas); color: var(--ink-2); }
.control.invalid { border-color: var(--red-600); box-shadow: 0 0 0 3px rgba(207,68,54,.14); }
textarea.control { resize: vertical; min-height: 96px; line-height: 1.55; }
.select-wrap, .input-icon { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 38px; }
.select-wrap .ic { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.input-icon .ic { position: absolute; left: 13px; top: 21px; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-icon .control { padding-left: 38px; }
.field-hint { margin-top: 7px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.field-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.field-row .btn { margin-top: 4px; flex-shrink: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-2); }
.status-message { min-height: 20px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--gold-700); }
.status-message.error { color: var(--red-600); }
.status-message.ok { color: var(--green-600); }

/* Builder ---------------------------------------------------------------- */
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.preview-card { position: sticky; top: 16px; }
.preview-stage {
  padding: 28px 16px; border-radius: var(--radius);
  background:
    radial-gradient(#dde3ec 1px, transparent 1px) 0 0 / 16px 16px,
    var(--canvas);
}

.printable {
  position: relative; max-width: 340px; margin: 0 auto; padding: 22px 22px 18px; text-align: center;
  border-radius: 18px; background: #fffdf8;
  border: 1px solid #ecdcb6;
  box-shadow: 0 18px 40px rgba(143,100,18,.16), 0 2px 6px rgba(15,27,45,.06);
}
.printable::before {
  content: ""; position: absolute; inset: 7px; border: 1px dashed #ead9aa; border-radius: 12px; pointer-events: none;
}
.printable-top { display: flex; justify-content: center; }
.mini-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-700); }
.print-stars { margin-top: 10px; font-size: 16px; letter-spacing: 4px; color: #d9a52c; }
.print-headline { margin-top: 6px; font: 500 26px/1.15 var(--font-display); letter-spacing: -.3px; color: var(--navy-800); }
.print-sub { margin-top: 3px; font-size: 13px; color: #7d7462; }
.qr-image {
  min-height: 236px; margin: 16px auto 14px; padding: 12px; display: grid; place-items: center;
  border-radius: 14px; background: #fff; border: 1px solid #efe4c9; box-shadow: 0 4px 14px rgba(143,100,18,.08);
}
.qr-image img { display: block; width: 210px; height: 210px; max-width: 100%; image-rendering: pixelated; }
.qr-placeholder { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #a9853a; }
.qr-placeholder .ic { width: 64px; height: 64px; stroke-width: 1.25; opacity: .8; }
.qr-placeholder b { font-size: 14px; font-weight: 600; }
.qr-placeholder small { font-size: 12px; color: #a39c8e; }
.print-business { font: 500 21px/1.2 var(--font-display); color: var(--navy-800); overflow-wrap: anywhere; }
.printable-bottom { margin-top: 14px; padding-top: 12px; border-top: 1px solid #efe4c9; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold-700); }

.preview-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.note {
  display: flex; gap: 10px; margin-top: 18px; padding: 12px 14px;
  border-radius: 10px; background: var(--canvas); color: var(--muted);
}
.note .ic { margin-top: 2px; color: var(--faint); }
.note p { font-size: 13px; line-height: 1.55; }
.note-plain { margin-top: 20px; }

/* Add business ----------------------------------------------------------- */
.add-business-form {
  display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 14px; align-items: end;
  padding: 18px; margin-bottom: 8px; border-radius: var(--radius); background: var(--canvas);
}
.add-business-form .field { margin: 0; }
.business-list-large .business-row { padding: 18px 4px; }
.business-list-large .business-row:first-child { padding-top: 18px; }

/* Analytics -------------------------------------------------------------- */
.analytics-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.analytics-row + .analytics-row { margin-top: 22px; }
.analytics-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; }
.analytics-label b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 10px; margin-top: 9px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bar span { display: block; height: 100%; min-width: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--gold-500), var(--gold-400)); transition: width .5s ease; }

/* Settings --------------------------------------------------------------- */
.settings-card { max-width: 760px; }
.settings-card > h2 { margin-bottom: 18px; }
.settings-card .control { max-width: 460px; }
.settings-card .field label { display: block; }
.integration-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.google-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-50); font: 800 20px var(--font-ui); color: #4285f4; }
.integration-row div { flex: 1; min-width: 0; }
.integration-row b { display: block; font-size: 14px; font-weight: 600; }
.integration-row small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 12px; padding: 32px 2px 0; font-size: 12.5px; color: var(--faint); }

/* Toast ------------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px;
  background: var(--navy-800); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 24px); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: var(--red-600); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
  .main { padding: 0 28px 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  :root { --sidebar-w: 76px; }
  .sidebar { padding: 20px 12px; align-items: center; }
  .brand { padding: 0; }
  .brand-text, .workspace, .nav-label, .nav-item span, .nav-item em, .sidebar-card, .sidebar-foot { display: none; }
  .nav { margin-top: 26px; width: 100%; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .nav-item.active::before { left: -12px; }
  .nav-settings::after { left: 8px; right: 8px; }
  .content-grid, .builder-grid { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .analytics-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .shell { display: block; }
  .main { padding: 0 16px 24px; }

  /* Sidebar becomes a bottom tab bar */
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50;
    height: auto; padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--navy-800); border-top: 1px solid rgba(255,255,255,.08);
    overflow: visible;
  }
  .brand, .sidebar-spacer { display: none; }
  .nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; margin: 0; }
  .nav-item {
    flex-direction: column; gap: 3px; padding: 8px 2px; border-radius: 10px;
    font-size: 11px; text-align: center; justify-content: center;
  }
  .nav-item span { display: block; }
  .nav-item .ic { width: 22px; height: 22px; }
  .nav-item.active::before { display: none; }
  .nav-settings { margin-top: 0; }
  .nav-settings::after { display: none; }

  .topbar { height: 62px; margin-bottom: 18px; }
  .breadcrumb, .profile-name { display: none; }
  .mobile-brand { display: flex; }
  .profile { padding-left: 0; border-left: 0; }
  .top-actions { gap: 10px; }

  .page-heading { flex-direction: column; align-items: stretch; margin-bottom: 18px; }
  .page-heading h1 { font-size: 27px; }
  .page-heading p { font-size: 14px; }

  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-top { font-size: 12px; align-items: flex-start; }
  .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .stat-card > strong { font-size: 30px; margin: 10px 0 8px; }
  .stat-card > strong.strong-sm { font-size: 16px; margin: 14px 0 12px; }
  .stat-foot { font-size: 12px; flex-wrap: wrap; gap: 4px 6px; }

  .card { padding: 18px 16px; border-radius: 14px; }
  .card-heading { margin-bottom: 14px; }

  .analytics-stats { grid-template-columns: 1fr 1fr; }
  .analytics-stats .stat-card:last-child { grid-column: 1 / -1; }

  .promo { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px 20px; }
  .promo h2 { font-size: 22px; }
  .promo .btn { width: 100%; }

  .business-row { flex-wrap: wrap; }
  .business-info { flex: 1 1 calc(100% - 60px); }
  .business-meta { width: 100%; padding-left: 60px; margin-top: -4px; }
  .business-meta .btn { flex: 1; }
  .add-business-form { grid-template-columns: 1fr; padding: 14px; }
  .form-actions > * { flex: 1; }
  .field-row { flex-direction: column; gap: 0; }
  .preview-stage { padding: 18px 8px; }
  .preview-actions > * { flex: 1; padding-left: 10px; padding-right: 10px; }
  .integration-row { flex-wrap: wrap; }
  footer { flex-direction: column; }
  .toast { bottom: 92px; }
}

@media (max-width: 380px) {
  .nav-item { font-size: 10px; }
}

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


/* ==========================================================================
   Round 2 - themes, pickers, donut, toolbar
   ========================================================================== */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.style-opt {
  flex: 1 1 0; min-width: 96px; display: grid; gap: 8px; justify-items: center; padding: 10px 8px 9px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; transition: border-color .15s, box-shadow .15s, background .15s;
}
.style-opt:hover { border-color: #cfd7e3; }
.style-opt[aria-checked="true"] { border-color: var(--gold-500); box-shadow: var(--ring); background: var(--gold-50); color: var(--ink); }
.mini { display: block; width: 100%; height: 44px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); position: relative; }
.mini::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%,-50%); border-radius: 4px;
  background: repeating-conic-gradient(currentColor 0% 25%, #fff 0% 50%) 50% / 7px 7px; border: 3px solid #fff; }
.mini-gold { background: linear-gradient(160deg, #fffdf8, #f8ecc9); color: #8f6412; }
.mini-navy { background: linear-gradient(160deg, #16263d, #0b1524); color: #111c2e; }
.mini-mono { background: #fff; color: #111; border-color: #d9e0ea; }
.dot-opt {
  width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--c);
  box-shadow: 0 0 0 1.5px #d3dae5; transition: transform .15s, box-shadow .15s;
}
.dot-opt:hover { transform: scale(1.08); }
.dot-opt[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--gold-500); }

/* Card themes */
.printable.theme-navy {
  background: radial-gradient(90% 60% at 50% 0%, #22344f, #0b1524);
  border-color: #2a3d5a; box-shadow: 0 18px 40px rgba(11,21,36,.4), 0 2px 6px rgba(15,27,45,.1);
}
.printable.theme-navy::before { border-color: rgba(217,171,69,.35); }
.printable.theme-navy .mini-brand, .printable.theme-navy .printable-bottom { color: var(--gold-400); }
.printable.theme-navy .print-headline, .printable.theme-navy .print-business { color: #fff; }
.printable.theme-navy .print-sub { color: #a9b8ce; }
.printable.theme-navy .printable-bottom { border-top-color: rgba(255,255,255,.14); }
.printable.theme-navy .qr-image { border-color: transparent; }
.printable.theme-mono { background: #fff; border-color: #dfe3ea; box-shadow: 0 18px 40px rgba(15,27,45,.12); }
.printable.theme-mono::before { border-color: #cfd5df; }
.printable.theme-mono .mini-brand, .printable.theme-mono .printable-bottom { color: #4a5568; }
.printable.theme-mono .print-stars { color: #111; }
.printable.theme-mono .print-sub { color: #6b7280; }
.printable.theme-mono .qr-image { border-color: #e5e7eb; box-shadow: none; }
.printable.theme-mono .printable-bottom { border-top-color: #e5e7eb; }

/* List toolbar / search */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 0 4px; flex-wrap: wrap; }
.list-toolbar h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.input-icon.search { width: 280px; max-width: 100%; }
.input-icon.search .ic { top: 50%; }
.input-icon.search .control { padding: 9px 12px 9px 36px; }

/* Analytics: bars + donut */
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.donut-wrap { display: grid; justify-items: center; gap: 18px; }
.donut { position: relative; width: 180px; height: 180px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; transition: stroke-dasharray .6s ease; }
.donut .track { stroke: var(--line-2); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font: 500 34px/1 var(--font-display); letter-spacing: -1px; }
.donut-center small { margin-top: 4px; font-size: 12px; color: var(--muted); }
.legend { display: grid; gap: 8px; width: 100%; max-width: 260px; }
.legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.analytics-row .bar span { background: var(--c, var(--gold-500)); }

/* Extra polish */
.page-heading .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.stat-card { position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: radial-gradient(closest-side, rgba(217,171,69,.14), transparent); pointer-events: none; }
.is-pending::after { display: none; }
.business-row { transition: background .15s; border-radius: 10px; }
.business-row:hover { background: #fafbfd; }
.empty-search { padding: 28px 0 8px; text-align: center; color: var(--muted); }

@media (max-width: 1080px) { .analytics-grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 720px) {
  .style-opt { min-width: 84px; }
  .input-icon.search { width: 100%; }
  .donut { width: 160px; height: 160px; }
}

/* ==========================================================================
   Round 3 - businesses page
   ========================================================================== */
.summary-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.summary-chip { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.summary-chip b { font: 500 28px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.summary-chip span { font-size: 13px; color: var(--muted); font-weight: 500; }
.summary-chip.ok b { color: var(--green-600); }
.summary-chip.warn b { color: var(--amber-700); }
.add-panel { margin-bottom: 20px; border-color: #ecd9a5; background: linear-gradient(180deg, #fffdf7, #fff); animation: viewIn .25s ease both; }
.add-panel[hidden] { display: none; }
.add-panel .add-business-form { margin-bottom: 0; }
.list-toolbar { margin: 0 0 6px; }
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--line-2); border-radius: 11px; }
.seg { padding: 7px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background .15s, color .15s; }
.seg:hover { color: var(--ink); }
.seg.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.biz-link { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.biz-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.biz-link.none { color: var(--amber-700); }
.biz-link .icon-action { width: 26px; height: 26px; border-radius: 7px; }
.biz-link .icon-action .ic { width: 14px; height: 14px; }
.business-row.editing { flex-wrap: wrap; background: #fafbfd; padding: 16px; margin: 6px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.edit-form { flex: 1 1 100%; display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; margin-top: 4px; }
.edit-form .field { margin: 0; }
.edit-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 720px) {
  .summary-row { gap: 8px; }
  .summary-chip { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; }
  .summary-chip b { font-size: 24px; }
  .summary-chip span { font-size: 12px; }
  .edit-form { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
  .seg { flex: 1; padding: 8px 6px; }
  .biz-link span { max-width: 26ch; }
}

/* ==========================================================================
   Round 4 - sign-in gate, tracking chart
   ========================================================================== */
.gate { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(120% 60% at 50% 0%, #22344f, #0b1524); }
.gate[hidden], [hidden] { display: none !important; }
.gate-card { width: 100%; max-width: 400px; padding: 30px 26px 22px; text-align: center; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); }
.gate-card .brand-mark { margin: 0 auto 14px; }
.gate-card h2 { font: 500 26px var(--font-display); margin-bottom: 8px; }
.gate-card p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.gate-card label { display: block; text-align: left; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gate-card code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
.gate-card .btn { width: 100%; margin-top: 4px; }
.gate-msg { min-height: 20px; margin: 8px 0 8px !important; font-size: 13px !important; color: var(--red-600) !important; text-align: left; }
.gate-demo { margin-top: 12px; }
.qr-target { word-break: break-all; }

.analytics-stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: none; }
.legend-inline { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend-inline i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.lg-s { background: var(--gold-500); } .lg-c { background: var(--navy-700); }
.spark { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; align-items: end; min-height: 150px; }
.spark .empty-search { grid-column: 1 / -1; align-self: center; }
.spark-col { display: grid; gap: 6px; justify-items: center; }
.spark-bars { width: 100%; height: 120px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line); }
.spark-bars span { flex: 1; max-width: 14px; min-height: 2px; border-radius: 4px 4px 0 0; transition: height .5s ease; }
.spark-s { background: var(--gold-500); } .spark-c { background: var(--navy-700); }
.spark-col small { font-size: 11px; color: var(--muted); height: 14px; }
@media (max-width: 1080px) { .analytics-stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .analytics-stats.four .stat-card:last-child { grid-column: auto; } .spark { gap: 3px; } }

/* ==========================================================================
   Print - only the QR card
   ========================================================================== */
@media print {
  @page { margin: 12mm; }
  body { background: #fff; padding: 0; }
  body * { visibility: hidden; }
  #qrPrintable, #qrPrintable * { visibility: visible; }
  #qrPrintable {
    position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 340px; box-shadow: none;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

.insights { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.insights h3 { margin: 0 0 10px; font-size: 14px; }
.insights .empty-search { padding: 8px 0; }

.team-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #e6e9f0; }
.viewer .admin-only, .viewer #toggleAdd, .viewer #importCsv, .viewer #importData, .viewer #addSource,
.viewer .icon-action[title="Edit"], .viewer .icon-action[title="Remove business"] { display: none !important; }

.feedback-list{display:grid;gap:12px}
.feedback-item{border:1px solid #e7e2d9;border-radius:14px;padding:14px;background:#fff}
.feedback-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px;color:#6b6a67;margin-bottom:7px}
.feedback-stars{letter-spacing:2px;color:#c08e22}
.feedback-text{margin:0;line-height:1.5}

.feedback-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}.feedback-actions .control{min-height:38px}.feedback-item{padding:14px 0;border-bottom:1px solid #eee}.feedback-item:last-child{border-bottom:0}
