/* ═══════════════════════════════════════════════════════════════════════════
   QR Reviews — Design System
   Receipt / ticket aesthetic: parchment tones, perforations, stamp
   animations, IBM Plex typography.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  /* Palette — parchment */
  --paper:       #F0ECE1;
  --paper-deep:  #E4DFCF;
  --page-bg:     #DCD6C4;
  --ink:         #211F1B;
  --ink-soft:    #5F584B;
  --ink-faint:   #655E50;
  --line:        #BFB69E;

  /* Accent — overridden per-business via Jinja2 style block */
  --accent:      #3A5A78;
  --accent-deep: #24425D;
  --accent-soft: #DCE6ED;

  /* Semantic */
  --negative:    #8B3A3A;
  --positive:    #456443;
  --warning:     #9C7A2E;

  /* Typography */
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Code', 'Fira Code', monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing & Shape */
  --radius:      20px;
  --radius-sm:   12px;
  --radius-pill:  999px;

  /* Shadows */
  --shadow-card:  0 18px 40px -18px rgba(33,31,27,0.35);
  --shadow-float: 0 10px 26px rgba(0,0,0,0.25);
  --shadow-soft:  0 4px 16px rgba(33,31,27,0.12);

  /* Transitions */
  --ease-out: cubic-bezier(.22,.9,.36,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
}


/* ── Reset & Base ───────────────────────────────────────────────────────── */

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

html, body {
  margin: 0;
  min-height: 100vh;
}

body {
  background: var(--page-bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(33,31,27,0.06) 1px, transparent 0);
  background-size: 14px 14px;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent-deep);
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: color .15s ease;
}
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  line-height: 1.25;
}


/* ── Layout Utilities ───────────────────────────────────────────────────── */

.page-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 60px;
  min-height: 100vh;
}

.page-full {
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 420px;
}

.container-wide {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}


/* ── Typography ─────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin: 0 0 10px;
}

.mono-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.meta-line {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  margin: 0;
}

.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }

.hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 9px;
  line-height: 1.45;
}
.hint b {
  color: var(--ink);
  font-weight: 600;
}


/* ── Ticket Card ────────────────────────────────────────────────────────── */

.stage {
  width: 100%;
  max-width: 420px;
  position: relative;
}

.ticket {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-card);
  overflow: visible;
}

.ticket-head {
  padding: 22px 24px 18px;
  text-align: center;
}

.ticket-body {
  padding: 26px 24px 28px;
}

/* Perforation line */
.perf {
  position: relative;
  height: 0;
  border-top: 2px dashed var(--line);
  margin: 0 24px;
}
.perf::before,
.perf::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--page-bg);
}
.perf::before { left: -33px; }
.perf::after  { right: -33px; }

/* Torn bottom edge */
.torn-bottom {
  height: 16px;
  margin-top: -1px;
  background:
    linear-gradient(-45deg, var(--paper) 8px, transparent 0) 0 8px,
    linear-gradient( 45deg, var(--paper) 8px, transparent 0) 0 8px;
  background-repeat: repeat-x;
  background-size: 16px 16px;
  background-color: var(--page-bg);
}

.ticket-footer {
  padding: 14px 24px 4px;
  text-align: center;
}


/* ── Screens (HTMX swap targets) ────────────────────────────────────────── */

.screen {
  padding: 26px 24px 28px;
  animation: riseIn .38s var(--ease-out);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ── Business Branding ──────────────────────────────────────────────────── */

.biz-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.biz-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  flex: none;
  overflow: hidden;
}
.biz-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.biz-name {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}


/* ── Star Rating ────────────────────────────────────────────────────────── */

.stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  transition: transform .15s ease;
}
.star-btn:hover {
  transform: translateY(-2px);
}
.star-btn svg {
  width: 34px;
  height: 34px;
  display: block;
}
.star-btn path {
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 1.6;
  transition: fill .18s ease, stroke .18s ease;
}
.star-btn.filled path {
  fill: var(--accent);
  stroke: var(--accent-deep);
}

.rating-label {
  text-align: center;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 18px;
  letter-spacing: .03em;
}

h2.q {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin: 2px 0 22px;
}


/* ── Stamp Animations ───────────────────────────────────────────────────── */

.stamp-wrap {
  display: flex;
  justify-content: center;
  min-height: 0;
  margin-top: 16px;
}

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-deep);
  border: 2px dashed var(--accent);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  transform: rotate(-6deg) scale(1);
  opacity: 0;
}
.stamp.show {
  animation: stampIn .5s var(--ease-bounce) forwards;
}
@keyframes stampIn {
  0%   { opacity: 0; transform: rotate(-22deg) scale(1.9); }
  70%  { opacity: 1; }
  100% { opacity: 1; transform: rotate(-6deg) scale(1); }
}

.mini-stamp {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
}
.mini-stamp.on {
  color: var(--accent-deep);
  border-color: var(--accent);
}

.stamp-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}


/* ── Chips ──────────────────────────────────────────────────────────────── */

.chip-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--paper-deep);
  cursor: pointer;
  color: var(--ink);
  transition: all .15s ease;
}
.chip:hover {
  border-color: var(--accent);
}
.chip.selected {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: var(--paper);
}


/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s ease, opacity .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary[disabled] {
  opacity: .35;
  cursor: not-allowed;
}
.btn-primary:not([disabled]):hover {
  background: var(--accent-deep);
}

.btn-accent {
  background: var(--accent);
  color: var(--paper);
}
.btn-accent:hover {
  background: var(--accent-deep);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--paper-deep);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 500;
  font-size: 13.5px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  padding: 6px;
  width: auto;
  margin: 0 auto;
  cursor: pointer;
  display: inline-flex;
}
.btn-ghost:hover { color: var(--ink); }

.btn-danger {
  background: var(--negative);
  color: var(--paper);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 11px;
}

.btn-inline {
  width: auto;
  display: inline-flex;
}

.continue-row { margin-top: 22px; }

.action-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.action-row .btn { flex: 1; }

.copied-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--accent-deep);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .2s ease;
  margin-left: 8px;
}
.copied-tag.show { opacity: 1; }


/* ── Form Inputs ────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.form-input,
.wa-input,
textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  padding: 12px 14px;
  line-height: 1.5;
  transition: border-color .15s ease, background .15s ease, box-shadow .2s ease;
}
.form-input:focus,
.wa-input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: none;
  min-height: 78px;
}

.form-input::placeholder,
textarea::placeholder {
  color: var(--ink-faint);
}

.form-hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 5px;
  line-height: 1.4;
}
.form-hint a {
  color: var(--accent);
}

.form-error {
  font-size: 12px;
  color: var(--negative);
  margin-top: 5px;
  font-weight: 500;
}

/* Password field with toggle */
.input-wrap {
  position: relative;
}
.input-wrap .form-input {
  padding-right: 44px;
}
.input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-faint);
  padding: 4px;
  font-size: 14px;
  line-height: 0;
}
.input-toggle:hover { color: var(--ink-soft); }

/* Color picker */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.color-preview {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--line);
  flex: none;
  cursor: pointer;
}
.color-input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.color-hex {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}

/* File upload */
.upload-area {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  background: var(--paper-deep);
}
.upload-area:hover {
  border-color: var(--accent);
  background: var(--paper);
}
.upload-area .upload-icon {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--ink-faint);
}
.upload-area .upload-text {
  font-size: 13px;
  color: var(--ink-soft);
}
.upload-area .upload-text b { color: var(--accent); }
.upload-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  margin: 0 auto 12px;
}


/* ── Generating / Printer Animation ─────────────────────────────────────── */

.printer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 0 10px;
}

.slot {
  width: 120px;
  height: 8px;
  background: var(--ink);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}
.slot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: feed 1.1s linear infinite;
}
@keyframes feed {
  from { transform: translateX(-120px); }
  to   { transform: translateX(120px); }
}

.printer-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.printer-label .dots::after {
  content: '';
  animation: dots 1.1s steps(4) infinite;
}
@keyframes dots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100%{ content: ''; }
}


/* ── Review Box ─────────────────────────────────────────────────────────── */

.review-box { margin-bottom: 6px; }
.review-box textarea {
  min-height: 120px;
  font-size: 14.5px;
}

.private-link-row {
  text-align: center;
  margin-top: 18px;
}


/* ── Thank You ──────────────────────────────────────────────────────────── */

.thanks-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.thanks-icon svg {
  width: 26px;
  height: 26px;
}
.thanks-icon path {
  stroke: var(--accent-deep);
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}
.thanks-sub {
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 4px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.dash {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

.dash-sidebar {
  width: 240px;
  background: var(--paper);
  border-right: 1.5px solid var(--line);
  padding: 24px 0;
  flex: none;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-brand {
  padding: 0 20px 20px;
  border-bottom: 1.5px dashed var(--line);
  margin-bottom: 8px;
}
.dash-brand-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.dash-brand-sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 3px;
}

.dash-nav {
  flex: 1;
  padding: 8px 0;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: all .15s ease;
  border-left: 3px solid transparent;
}
.dash-nav-item:hover {
  color: var(--ink);
  background: var(--paper-deep);
}
.dash-nav-item.active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-left-color: var(--accent);
  font-weight: 600;
}

.dash-nav-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-nav-icon svg {
  width: 16px;
  height: 16px;
}
.dash-nav-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dash-nav-divider {
  height: 0;
  border-top: 1.5px dashed var(--line);
  margin: 8px 20px;
}

.dash-sidebar-footer {
  padding: 16px 20px;
  border-top: 1.5px dashed var(--line);
  margin-top: auto;
}

/* ── Main Content ───────────────────────────────────────────────────────── */

.dash-main {
  flex: 1;
  padding: 32px 36px;
  overflow-y: auto;
}

.dash-header {
  margin-bottom: 28px;
}
.dash-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.dash-subtitle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Mobile Nav Toggle ──────────────────────────────────────────────────── */

.dash-mobile-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1.5px solid var(--line);
  padding: 12px 16px;
}

.dash-mobile-toggle {
  background: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(33,31,27,0.5);
}
.dash-mobile-menu.open {
  display: block;
}
.dash-mobile-menu-inner {
  background: var(--paper);
  width: 260px;
  height: 100%;
  padding: 24px 0;
  box-shadow: var(--shadow-float);
  animation: slideIn .25s var(--ease-out);
}
@keyframes slideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}


/* ── Stat Cards ─────────────────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.stat-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-value .stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-left: 2px;
}

.stat-change {
  font-family: var(--mono);
  font-size: 10.5px;
  margin-top: 6px;
  letter-spacing: .04em;
}
.stat-change.up   { color: var(--positive); }
.stat-change.down { color: var(--negative); }


/* ── CSS Bar Chart ──────────────────────────────────────────────────────── */

.chart-receipt {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 28px;
}

.chart-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 16px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-top: 8px;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 32px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height .4s var(--ease-out);
  position: relative;
}
.chart-bar:hover {
  background: var(--accent-deep);
}
.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-soft);
  opacity: 0;
  transition: opacity .15s ease;
}
.chart-bar:hover::after {
  opacity: 1;
}

.chart-bar-label {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: .04em;
}


/* ── Receipt Table ──────────────────────────────────────────────────────── */

.receipt-table {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.receipt-table-head {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1.5px dashed var(--line);
  background: var(--paper-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.receipt-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
  gap: 12px;
}
.receipt-row:last-child { border-bottom: none; }
.receipt-row:hover { background: var(--paper-deep); }

.receipt-col {
  flex: 1;
  min-width: 0;
}
.receipt-col-sm {
  flex: 0 0 70px;
  text-align: center;
}
.receipt-col-md {
  flex: 0 0 100px;
}

.receipt-rating {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
}
.receipt-rating .star-filled { color: var(--accent); }
.receipt-rating .star-empty  { color: var(--line); }

.receipt-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.receipt-text-expanded {
  white-space: normal;
}

.receipt-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: .03em;
}

.receipt-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid;
}
.receipt-badge.copied {
  color: var(--positive);
  border-color: var(--positive);
}
.receipt-badge.pending {
  color: var(--ink-faint);
  border-color: var(--line);
}

.receipt-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
}


/* ── QR Code Display & Paywall ──────────────────────────────────────────── */

.qr-display {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.qr-preview {
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Locked / blurred state */
.qr-locked .qr-preview {
  position: relative;
  overflow: hidden;
}
.qr-locked .qr-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(240,236,225,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.qr-locked .qr-preview .lock-icon {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  color: var(--ink-soft);
}

.qr-url {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: .03em;
  margin: 12px 0 0;
  word-break: break-all;
}

.qr-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.qr-actions .btn {
  width: auto;
  padding: 12px 24px;
}

/* Paywall */
.paywall {
  margin-top: 24px;
  text-align: center;
}
.paywall-price {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.paywall-price .currency {
  font-size: 18px;
  font-weight: 500;
  vertical-align: top;
  margin-right: 2px;
}
.paywall-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.paywall-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.paywall-features li {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.paywall-features li::before {
  content: "✓";
  color: var(--positive);
  font-weight: 700;
}


/* ── Toast Notification ─────────────────────────────────────────────────── */

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  max-width: 340px;
  text-align: center;
  box-shadow: var(--shadow-float);
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.toast.toast-error {
  background: var(--negative);
}
.toast.toast-success {
  background: var(--positive);
}


/* ── Flash Messages ─────────────────────────────────────────────────────── */

.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1.5px solid;
  display: flex;
  align-items: center;
  gap: 8px;
}
.flash-error {
  background: #f5e6e6;
  border-color: var(--negative);
  color: var(--negative);
}
.flash-success {
  background: #e6f0e6;
  border-color: var(--positive);
  color: var(--positive);
}
.flash-warning {
  background: #f5f0e0;
  border-color: var(--warning);
  color: var(--warning);
}


/* ═══════════════════════════════════════════════════════════════════════════
   LANDING / MARKETING PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(220,214,196,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
}
.landing-nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.landing-logo {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.landing-nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color .15s ease;
}
.landing-nav-links a:hover { color: var(--ink); }
.landing-nav-links a.btn-primary,
.landing-nav-links a.btn-primary:hover { color: var(--paper); }

.landing-hero {
  padding: 120px 24px 80px;
  text-align: center;
}
.landing-hero-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.landing-hero-sub {
  font-size: clamp(14px, 2vw, 17px);
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto 32px;
}

.landing-section {
  padding: 60px 24px;
  max-width: 1080px;
  margin: 0 auto;
}

.landing-section-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 32px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.step-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.step-number {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}
.step-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.landing-cta {
  text-align: center;
  padding: 40px 24px 80px;
}

.landing-footer {
  border-top: 1.5px dashed var(--line);
  padding: 24px;
  text-align: center;
}
.landing-footer p {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: .06em;
}

.landing-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 14px;
}
.landing-footer-links a,
.section-link a {
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.landing-footer-links a:hover,
.section-link a:hover { color: var(--ink); }

.landing-copy-intro {
  max-width: 760px;
  margin: 0 auto 30px;
  text-align: center;
}
.landing-copy-intro h2,
.faq-section > h2,
.audience-section h2,
.included-section h2,
.physical-stand-section h2 {
  font-size: clamp(24px, 3.5vw, 36px);
  line-height: 1.18;
  letter-spacing: -.025em;
  margin: 8px 0 14px;
}
.landing-copy-intro > p:last-child,
.public-page-hero > p,
.physical-stand-section p,
.landing-cta > p {
  color: var(--ink-soft);
  line-height: 1.7;
}
.feature-summary-grid,
.feature-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-summary-card,
.feature-detail-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-summary-card h3,
.feature-detail-card h2 {
  font-size: 17px;
  line-height: 1.35;
  margin-bottom: 9px;
}
.feature-summary-card p,
.feature-detail-card > p:last-child {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}
.section-link { margin-top: 22px; text-align: center; }

.faq-section { max-width: 820px; }
.faq-section > .eyebrow,
.faq-section > h2 { text-align: center; }
.faq-list { margin-top: 28px; display: grid; gap: 10px; }
.faq-list details {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 0 18px;
}
.faq-list summary {
  cursor: pointer;
  font-weight: 650;
  line-height: 1.45;
  padding: 17px 26px 17px 0;
}
.faq-list details p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
  padding: 0 0 18px;
}

.public-page-hero {
  max-width: 820px;
  margin: 0 auto;
  padding: 128px 24px 54px;
  text-align: center;
}
.public-page-hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -.035em;
  margin: 10px 0 18px;
}
.public-page-hero > p { max-width: 650px; margin: 0 auto; }
.public-hero-cta { margin-top: 26px; text-decoration: none; }
.feature-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-detail-card h2 { font-size: 20px; }
.audience-section,
.included-section,
.physical-stand-section {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(300px, 1.1fr);
  gap: 48px;
  align-items: center;
}
.audience-list,
.included-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.audience-list li,
.included-list li {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px 13px 34px;
  font-size: 13px;
}
.audience-list li::before,
.included-list li::before {
  content: "✓";
  position: absolute;
  left: 13px;
  color: var(--positive);
  font-weight: 800;
}
.pricing-page-section { padding-top: 20px; }
.public-plan-grid { max-width: 780px; margin: 0 auto; }
.public-plan-grid .btn { margin-top: 20px; text-decoration: none; }
.physical-stand-section {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 34px;
}
.physical-stand-section .btn { justify-self: end; text-decoration: none; }
.landing-cta .btn + .btn { margin-left: 8px; }


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .dash-sidebar { display: none; }
  .dash-mobile-nav { display: block; }
  .dash-main { padding: 20px 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-actions { flex-direction: column; }
  .qr-actions .btn { width: 100%; }
  .landing-nav-links a:not(.btn-inline) { display: none; }
  .feature-summary-grid,
  .feature-detail-grid,
  .audience-section,
  .included-section,
  .physical-stand-section { grid-template-columns: 1fr; }
  .physical-stand-section .btn { justify-self: start; }
}

@media (max-width: 520px) {
  .audience-list,
  .included-list { grid-template-columns: 1fr; }
  .landing-cta .btn { display: flex; margin: 8px 0 0; }
  .landing-cta .btn + .btn { margin-left: 0; }
}

/* Production account, pricing, and QR controls */
.auth-ticket { max-width: 460px; }
.auth-brand { font-size: 24px; font-weight: 700; margin: 6px 0; }
.security-intro { text-align: center; padding: 4px 0 18px; }
.security-icon { font-size: 34px; margin-bottom: 8px; }
.otp-input { text-align: center; font-family: var(--mono); font-size: 26px; letter-spacing: .45em; padding-left: .45em; }
.otp-resend-form { margin-top: 14px; text-align: center; }
.security-alert { max-width: 920px; margin: 0 auto 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; line-height: 1.5; }
.error-alert { background: #fff0ee; border-color: #d79287; color: #76291e; }
.success-alert { background: #edf8ef; border-color: #7da98a; color: #225d35; }
.remove-logo-option { display: inline-flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--ink-soft); font-size: 13px; }

.qr-page-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 380px); gap: 28px; align-items: start; max-width: 1020px; margin: 0 auto; }
.qr-workspace, .stand-order-card, .subscription-shell { background: var(--paper); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-soft); }
.qr-workspace { padding: 24px; text-align: center; }
.qr-customizer { text-align: left; background: var(--paper-deep); border: 1.5px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 22px; }
.qr-customizer .form-label { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.label-optional { margin-left: auto; font-weight: 400; opacity: .65; text-transform: none; letter-spacing: 0; }
.qr-tag-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; align-items: stretch; }
.qr-tag-input { width: 100%; min-width: 0; margin: 0; }
.qr-clear-button { width: auto !important; min-width: 76px; margin: 0; height: 100%; }
.qr-color-row { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qr-control-label { font: 700 11px var(--mono); color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.qr-color-picker { display: flex; gap: 9px; }
.qr-color-btn { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.qr-color-btn.active { border-color: var(--paper); outline: 2px solid var(--ink); }
.qr-preview-card { width: min(100%, 320px); margin: 0 auto; background: white; border: 1px solid #e4e4e7; border-radius: 18px; padding: 20px; box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.qr-preview-card img { width: 100%; height: auto; display: block; }
.qr-meta { margin-top: 18px; font-weight: 700; }
.qr-url { word-break: break-all; font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.image-download-section { margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 16px; text-align: left; align-items: center; }
.image-download-section .form-hint { margin: 4px 0 0; }
.qr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.qr-actions .btn { width: auto; min-width: 82px; }
.qr-standee-link { display: block; margin-top: 12px; text-decoration: none; }
.stand-order-card { padding: 24px; }
.stand-order-card h2 { font-size: 21px; margin: 7px 0 4px; }
.stand-order-price { font-size: 34px; font-weight: 700; margin: 10px 0 2px; }
.stand-order-price span { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.stand-order-card form { display: grid; gap: 10px; margin-top: 18px; }
.stand-order-card textarea { resize: vertical; }
.stand-quantity-row { display: grid; grid-template-columns: 1fr 100px; align-items: center; gap: 12px; }
.stand-quantity-row .form-label { margin: 0; }
.recent-orders { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); }
.recent-order-row { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 13px; }
.status-pill { font: 600 10px var(--mono); text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--paper-deep); }
.subscription-shell { max-width: 900px; margin: 0 auto; padding: 28px; }
.subscription-heading { text-align: center; max-width: 560px; margin: 0 auto 24px; }
.subscription-heading h2 { font-size: 27px; margin: 7px 0; }
.subscription-heading > p:last-child { color: var(--ink-soft); }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.plan-card { position: relative; border: 1.5px solid var(--line); border-radius: 16px; padding: 24px; background: var(--paper-deep); text-align: left; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 10px 30px rgba(70,70,110,.12); }
.plan-badge { position: absolute; right: 14px; top: 14px; background: var(--accent); color: white; border-radius: 99px; padding: 5px 9px; font: 700 10px var(--mono); text-transform: uppercase; }
.plan-price { font-size: 43px; font-weight: 700; margin-top: 9px; }
.plan-price span { font-size: 21px; vertical-align: top; line-height: 1.6; }
.plan-period { color: var(--ink-soft); font-size: 13px; }
.plan-saving { margin-top: 8px; min-height: 20px; color: var(--positive); font-size: 12px; font-weight: 600; }
.plan-pay-button { margin-top: 18px; }
.payment-note { text-align: center; color: var(--ink-faint); font-size: 12px; margin-top: 20px; }

@media (max-width: 850px) {
  .qr-page-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .plan-grid { grid-template-columns: 1fr; }
  .subscription-shell, .qr-workspace, .stand-order-card { padding: 18px; }
  .qr-tag-row { grid-template-columns: 1fr; }
  .qr-clear-button { height: auto; }
  .image-download-section { align-items: stretch; flex-direction: column; }
  .qr-actions .btn { flex: 1; }
}
.admin-order-list { display: grid; gap: 12px; }
.admin-order-card { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper-deep); }
.admin-order-address { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.admin-order-status { display: grid; grid-template-columns: 1fr auto; gap: 7px; align-items: end; }
.admin-order-status .form-label { grid-column: 1 / -1; margin: 0; }
.admin-order-status .btn { width: auto; }
@media (max-width: 650px) { .admin-order-card { grid-template-columns: 1fr; } }

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .steps-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   HTMX INDICATORS
   ═══════════════════════════════════════════════════════════════════════════ */

.htmx-indicator {
  display: none;
}
.htmx-request .htmx-indicator {
  display: flex;
}
.htmx-request .htmx-hide-on-request {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   REVIEW VARIATION TABS
   ═══════════════════════════════════════════════════════════════════════════ */

.variation-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.variation-tab {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .2s var(--ease-out);
}
.variation-tab:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}
.variation-tab.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}


/* ═══════════════════════════════════════════════════════════════════════════
   WHATSAPP PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.wa-quick-send {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.wa-quick-send-inner { max-width: 100%; }
.wa-quick-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.wa-input-group { display: flex; flex-direction: column; gap: 6px; }
.wa-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.wa-input {
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
.wa-input:focus { border-color: var(--accent); }

.wa-link-box {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.wa-link-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.wa-link-display code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  flex: 1;
}

.wa-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.wa-template-card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.wa-template-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}
.wa-template-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wa-template-name {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.wa-template-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}
.wa-template-preview {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 16px;
  white-space: pre-line;
}
.wa-template-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* WhatsApp Preview Modal */
.wa-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wa-preview-modal-inner {
  max-width: 380px;
  width: 100%;
}
.wa-preview-chat {
  background: #ECE5DD;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}
.wa-chat-header {
  background: #075E54;
  color: white;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wa-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
.wa-chat-body {
  padding: 20px 16px;
  min-height: 120px;
}
.wa-chat-bubble {
  background: white;
  border-radius: 0 12px 12px 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #303030;
  white-space: pre-line;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.wa-chat-footer {
  padding: 12px 16px;
  background: #F0F0F0;
}

.wa-source-builder {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   AI REPLY
   ═══════════════════════════════════════════════════════════════════════════ */

.review-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.ai-reply-trigger {
  font-size: 11px !important;
}
.ai-reply-box {
  margin-top: 12px;
  padding: 16px;
  background: var(--paper-deep);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}
.ai-reply-option {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ai-reply-option:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.ai-reply-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--ink-faint);
  margin-bottom: 6px;
}
.ai-reply-text {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 8px;
}
.ai-reply-actions,
.manual-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.manual-reply-box {
  margin-top: 12px;
  padding: 16px;
  background: var(--paper-deep);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
}
.manual-reply-box textarea {
  min-height: 104px;
  resize: vertical;
  margin-bottom: 10px;
  background: var(--paper);
}
.manual-reply-hint {
  margin-top: 9px;
  line-height: 1.45;
}


/* ═══════════════════════════════════════════════════════════════════════════
   STANDEE KIT
   ═══════════════════════════════════════════════════════════════════════════ */

.standee-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.standee-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 24px;
}

.standee-card {
  width: 280px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-align: center;
  transition: width .3s ease;
}
.standee-card.standee-a5 { width: 320px; }
.standee-card.standee-a4 { width: 380px; }

.standee-accent {
  height: 6px;
  width: 100%;
}
.standee-header {
  padding: 24px 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.standee-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.standee-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
}
.standee-biz-name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}
.standee-headline {
  padding: 16px 20px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #333;
}
.standee-stars {
  font-size: 24px;
  letter-spacing: 4px;
  padding: 4px 0;
}
.standee-qr {
  padding: 20px 0;
  width: 100%;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  align-self: stretch;
  text-align: center;
}
.standee-qr-frame {
  width: 160px;
  height: 160px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}
.standee-qr img {
  width: 160px;
  height: 160px;
  display: block;
  margin: 0 !important;
  justify-self: center;
  object-fit: contain;
  border-radius: 8px;
}
.standee-instruction {
  font-family: var(--sans);
  font-size: 13px;
  color: #666;
  padding: 0 20px 8px;
  line-height: 1.5;
}
.standee-url {
  font-family: var(--mono);
  font-size: 10px;
  color: #999;
  letter-spacing: .04em;
  padding: 8px 20px;
  word-break: break-all;
}
.standee-badge {
  font-family: var(--sans);
  font-size: 11px;
  color: #666;
  padding: 8px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.standee-controls {
  padding: 8px 0;
}
.standee-control-group {
  margin-bottom: 20px;
}
.standee-size-btn.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}


/* ═══════════════════════════════════════════════════════════════════════════
   SOURCE ATTRIBUTION
   ═══════════════════════════════════════════════════════════════════════════ */

.source-attribution {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.source-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.source-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--paper-deep);
  border-radius: var(--radius-sm);
}
.source-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.source-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — NEW FEATURES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .standee-layout { grid-template-columns: 1fr; }
  .wa-templates-grid { grid-template-columns: 1fr; }
  .wa-quick-row { grid-template-columns: 1fr; }
}
