/* =============================================================
   ProfitLeak AI — styles
   Modern, clean SaaS design. Fully responsive:
   desktop · tablet · mobile. No external fonts or frameworks.
   ============================================================= */

/* ------------------------- tokens ------------------------- */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-muted: #5b6b82;
  --border: #e3e8f0;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-soft: #eef2ff;
  --green: #059669;
  --green-strong: #10b981;
  --green-bg: #ecfdf5;
  --amber: #b45309;
  --amber-strong: #f59e0b;
  --amber-bg: #fffbeb;
  --red: #dc2626;
  --red-strong: #ef4444;
  --red-bg: #fef2f2;
  --ink: #0f172a;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid #c7d2fe;
  outline-offset: 2px;
  border-radius: 6px;
}

.muted { color: var(--text-muted); }
.text-pos { color: var(--green); }
.text-neg { color: var(--red); }
.danger-text { color: var(--red); }

.num { font-variant-numeric: tabular-nums; }

/* ------------------------- buttons ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  color: #fff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, #4338ca, #5b21b6); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: #c7d2fe; background: var(--primary-soft); color: var(--primary-600); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(255, 255, 255, 0.25); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-xl { padding: 16px 30px; font-size: 16.5px; border-radius: 13px; }

/* ------------------------- badges ------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: #047857; }
.badge-amber { background: var(--amber-bg); color: #b45309; }
.badge-red   { background: var(--red-bg);   color: #b91c1c; }

/* ------------------------- cards ------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.card-title { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* =============================================================
   LANDING PAGE
   ============================================================= */
.landing-nav {
  background: #0b1120;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { border-radius: 8px; flex: none; }
.brand-name { font-size: 17.5px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand-ai { color: #a5b4fc; }

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1120 0%, #101a33 55%, #0b1120 100%);
  color: #fff;
  padding: 24px 24px 84px;
  text-align: center;
}

.hero-glow {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.hero-glow-a { background: #4f46e5; top: -280px; right: -160px; }
.hero-glow-b { background: #0ea5e9; bottom: -340px; left: -180px; opacity: 0.22; }

.hero-inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  animation: rise 0.7s ease both;
}

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

.hero-eyebrow {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #c7d2e4;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(30px, 5.6vw, 54px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.hero .accent {
  background: linear-gradient(90deg, #818cf8, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: clamp(16px, 2.4vw, 19px);
  color: #c7d2e4;
}

.hero-cta { margin-top: 34px; }

/* --- hero example card --- */
.hero-example {
  margin: 56px auto 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 26px 28px 22px;
  text-align: left;
}

.he-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 18px;
}

.he-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
}

.he-col h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.he-truth h3 { color: var(--red); }

.he-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
}
.he-line span { color: var(--text-muted); }
.he-line strong { font-variant-numeric: tabular-nums; font-size: 15.5px; }

.he-total { border-bottom: none; margin-top: 4px; padding-top: 12px; border-top: 2px solid var(--text); }
.he-total strong { font-size: 22px; font-weight: 800; }
.he-bad strong { color: var(--red); }

.he-note { margin-top: 10px; font-size: 13.5px; color: var(--text-muted); }

.mini-bar-wrap { margin: 14px 0 10px; }

.mini-bar {
  position: relative;
  display: flex;
  height: 22px;
  border-radius: 7px;
  overflow: hidden;
  background: #eef2f7;
}

.mini-seg { display: block; height: 100%; min-width: 2px; }

.mini-marker {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

.mini-caption { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }

.he-cta {
  display: inline-block;
  margin-top: 18px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
}
.he-cta:hover { text-decoration: underline; }

/* --- benefits / how / cta band / footer --- */
.benefits, .how { padding: 72px 24px; }
.benefits { background: var(--bg); }
.how { background: var(--surface); border-top: 1px solid var(--border); }

.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(23px, 3.4vw, 30px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin-top: 12px; color: var(--text-muted); font-size: 15.5px; }

.benefits-grid, .how-grid {
  max-width: 1020px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}

.benefit-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.benefit-icon-indigo  { background: var(--primary-soft); color: var(--primary); }
.benefit-icon-emerald { background: var(--green-bg);     color: var(--green); }
.benefit-icon-amber   { background: var(--amber-bg);     color: var(--amber); }

.benefit-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.benefit-card p { font-size: 14.5px; color: var(--text-muted); }

.step { text-align: center; padding: 10px 12px; }
.step-num {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  background: var(--primary-soft);
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--text-muted); }

.cta-band {
  background: linear-gradient(135deg, #312e81, #4f46e5 60%, #6d28d9);
  color: #fff;
  text-align: center;
  padding: 72px 24px;
}
.cta-band h2 { font-size: clamp(23px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.cta-band p { margin: 14px 0 30px; color: #e0e7ff; font-size: 16px; }

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 30px 24px 36px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}
.site-footer p + p { margin-top: 6px; }

/* =============================================================
   APP SHELL
   ============================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar .brand-name { color: var(--ink); }
.topbar .brand-ai { color: var(--primary); }

.topbar-nav { display: flex; align-items: center; gap: 18px; }

.nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 2px;
}
.nav-link:hover { color: var(--primary-600); }
.nav-link.active { color: var(--primary-600); box-shadow: inset 0 -2px 0 var(--primary); }

.storage-banner {
  background: var(--amber-bg);
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  padding: 9px 20px;
  text-align: center;
}

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 90px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 5px; max-width: 640px; }

/* ------------------------- KPI cards ------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px 14px;
  border-top: 3px solid transparent;
}
.kpi-red   { border-top-color: var(--red-strong); }
.kpi-amber { border-top-color: var(--amber-strong); }
.kpi-green { border-top-color: var(--green-strong); }

.kpi-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.kpi-value { font-size: 25px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ------------------------- alerts ------------------------- */
.alerts { display: grid; gap: 10px; margin-bottom: 22px; }

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  border: 1px solid;
}
.alert-red   { background: var(--red-bg);   border-color: #fecaca; color: #7f1d1d; }
.alert-amber { background: var(--amber-bg); border-color: #fde68a; color: #78350f; }
.alert-icon { font-size: 16px; line-height: 1.4; }

/* ------------------------- charts ------------------------- */
.charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 18px;
  margin-bottom: 22px;
}

.chart-empty { color: var(--text-muted); font-size: 13.5px; padding: 18px 0; }

.bars { display: grid; gap: 10px; }

.bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 150px) 1fr 76px;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: var(--text);
}
.bar-row:hover .bar-name { color: var(--primary-600); }

.bar-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  height: 14px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.bar-pos { background: linear-gradient(90deg, #34d399, #10b981); }
.bar-neg { background: linear-gradient(90deg, #f87171, #ef4444); }

.bar-val { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }
.bar-val-pos { color: var(--green); }
.bar-val-neg { color: var(--red); }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }

.donut { position: relative; width: 168px; height: 168px; flex: none; }
.donut svg { width: 100%; height: 100%; display: block; }

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center strong { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.donut-center span { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.legend { flex: 1; min-width: 190px; display: grid; gap: 7px; }

.legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}

.dot { width: 11px; height: 11px; border-radius: 4px; flex: none; }
.legend-label { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-pct { color: var(--text-muted); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------- product table ------------------------- */
.table-card { padding: 20px 22px; }

.table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.table-head .card-sub { margin-bottom: 0; }
.table-tools { display: flex; gap: 8px; flex-wrap: wrap; }

.table-responsive { overflow-x: auto; }

/* --- status filter chips --- */
.table-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.chip:hover { border-color: #c7d2fe; color: var(--primary-600); }

.chip-active { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary-600); }

.chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chip-dot-all         { background: #94a3b8; }
.chip-dot-losing      { background: var(--red-strong); }
.chip-dot-low         { background: var(--amber-strong); }
.chip-dot-profitable  { background: var(--green-strong); }

.chip-count {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.chip-active .chip-count { background: #fff; }

.data-table { width: 100%; border-collapse: collapse; min-width: 960px; }

.data-table th {
  font-size: 10.8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 10px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--primary-600); }
th.num, td.num { text-align: right; }

.sort-ind { font-size: 9px; margin-left: 4px; color: var(--primary); }

.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13.8px;
  vertical-align: middle;
}

.data-table tbody tr.clickable { cursor: pointer; transition: background 0.1s ease; }
.data-table tbody tr.clickable:hover { background: #f7f9ff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.p-name { font-weight: 650; }

.cell-rec {
  max-width: 250px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-actions { white-space: nowrap; text-align: right; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary-600); }
.icon-btn-danger:hover { background: var(--red-bg); color: var(--red); }

.empty-state { text-align: center; padding: 54px 20px 40px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 14px; max-width: 380px; margin: 0 auto 20px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* =============================================================
   ADD / EDIT FORM
   ============================================================= */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.form-card { padding: 26px 26px 22px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.field-full { grid-column: 1 / -1; }

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.per {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
}

.req { color: var(--red); }

.field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 16px; /* 16px or larger prevents iOS Safari auto-zoom on focus */
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #e0e7ff;
}
.field input::placeholder { color: #a8b3c5; }

/* hide number spinners for a cleaner fintech look */
.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.field-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

.field-error { font-size: 12.5px; color: var(--red); margin-top: 5px; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error input { border-color: var(--red); box-shadow: 0 0 0 3px #fee2e2; }

.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 24px; flex-wrap: wrap; }

.form-note { font-size: 12.5px; color: var(--text-muted); margin-top: 16px; }

/* --- live preview panel --- */
.live-preview {
  position: sticky;
  top: 82px;
  padding: 20px 22px;
  background: linear-gradient(180deg, #fbfcff, #f6f8fd);
}

.lp-head { display: flex; align-items: center; gap: 9px; }
.lp-head h2 { font-size: 15px; font-weight: 800; }

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-strong);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lp-hint { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 14px; }

.lp-rows { display: grid; gap: 2px; }

.lp-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13.5px;
}
.lp-row span:first-child { color: var(--text-muted); }
.lp-row span:last-child { font-weight: 650; font-variant-numeric: tabular-nums; }

.lp-strong {
  border-bottom: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 14.5px;
}
.lp-strong span:first-child { font-weight: 700; }
.lp-strong span:last-child { font-size: 16.5px; font-weight: 800; }

.lp-status { margin-top: 14px; }

/* =============================================================
   PRODUCT ANALYSIS
   ============================================================= */
.back-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.back-link:hover { color: var(--primary-600); }

.an-head-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.an-head-main h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.analysis-meta { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }

.an-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.analysis-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  border-left: 4px solid var(--border);
}
.stat-red { border-left-color: var(--red-strong); }
.stat-green { border-left-color: var(--green-strong); }

.stat-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.stat-value { font-size: 23px; font-weight: 800; margin-top: 5px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

.analysis-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.analysis-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* --- numbers table --- */
.numbers-table { width: 100%; border-collapse: collapse; }

.numbers-table th {
  font-size: 10.8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 8px;
  border-bottom: 2px solid var(--border);
}

.numbers-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.numbers-table .rev-row td { font-weight: 650; }
.numbers-table .total-row td { border-top: 2px solid var(--text); border-bottom: none; font-weight: 700; background: var(--surface-2); }
.numbers-table .total-row td:first-child { border-radius: 8px 0 0 8px; }
.numbers-table .total-row td:last-child { border-radius: 0 8px 8px 0; }
.numbers-table .profit-row td { border-bottom: none; padding-top: 12px; background: none; }

/* --- unit economics stacked bar --- */
.anatomy-track {
  position: relative;
  display: flex;
  height: 34px;
  border-radius: 9px;
  overflow: visible;
  background: #edf1f7;
  margin-top: 26px;
}

.anatomy-seg { display: block; height: 100%; min-width: 2px; }
.anatomy-seg:first-child { border-radius: 9px 0 0 9px; }
.anatomy-seg:last-child { border-radius: 0 9px 9px 0; }
.anatomy-seg:only-child { border-radius: 9px; }

.anatomy-marker {
  position: absolute;
  top: -20px;
  bottom: -4px;
  width: 2.5px;
  background: var(--ink);
  border-radius: 2px;
}

.anatomy-marker-label {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.anatomy .legend { margin-top: 18px; }
.anatomy-caption { margin-top: 16px; font-size: 13.5px; color: var(--text-muted); line-height: 1.6; }

/* --- findings --- */
.findings { display: grid; gap: 10px; }

.finding {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 13px 15px;
  border: 1px solid;
  border-left-width: 4px;
}
.finding-danger { background: var(--red-bg);   border-color: #fecaca; border-left-color: var(--red-strong); }
.finding-warn   { background: var(--amber-bg); border-color: #fde68a; border-left-color: var(--amber-strong); }
.finding-ok     { background: var(--green-bg); border-color: #a7f3d0; border-left-color: var(--green-strong); }

.finding-icon { font-size: 19px; line-height: 1.3; flex: none; }
.finding h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 3px; }
.finding p { font-size: 13.5px; color: var(--text); opacity: 0.85; }

/* --- cost ranking ("your costs, biggest first") --- */
.rank-block { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px dashed var(--border); }

.rank-block-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.rank-list { display: grid; gap: 8px; }

.rank-row {
  display: grid;
  grid-template-columns: 18px minmax(88px, 122px) 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 9px;
}

.rank-first { background: var(--primary-soft); box-shadow: inset 0 0 0 1px #c7d2fe; }

.rank-pos { font-size: 11px; font-weight: 800; color: var(--text-muted); text-align: center; }
.rank-first .rank-pos { color: var(--primary-600); }

.rank-label { font-size: 12.5px; font-weight: 650; }

.rank-tag {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 2px;
  vertical-align: 1px;
  white-space: nowrap;
}

.rank-track { height: 10px; background: #e9eef6; border-radius: 999px; overflow: hidden; }
.rank-first .rank-track { background: #e0e7ff; }
.rank-fill { display: block; height: 100%; border-radius: 999px; }

.rank-val { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-pct { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.rank-over .rank-pct { color: var(--amber); }

/* =============================================================
   SMART PROFIT DIAGNOSIS + WHAT-IF SIMULATOR
   ============================================================= */
.diagnosis-card {
  margin-bottom: 22px;
  padding: 24px;
  border-top: 4px solid var(--primary);
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 45%);
}

.diag-icon { margin-right: 4px; }

.diag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 18px 0 14px;
}

.diag-tile {
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.diag-current.diag-good { background: var(--green-bg); border-color: #a7f3d0; }
.diag-current.diag-bad  { background: var(--red-bg);   border-color: #fecaca; }
.diag-leak   { background: #fff7ed; border-color: #fed7aa; }
.diag-action { background: var(--primary-soft); border-color: #c7d2fe; }

.diag-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.diag-value { font-size: 19px; font-weight: 800; margin-top: 5px; letter-spacing: -0.02em; line-height: 1.25; }
.diag-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }

.diag-secondary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #c7d2fe;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--primary-600);
  line-height: 1.5;
}

.diag-sentence {
  font-size: 15px;
  line-height: 1.65;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  margin: 4px 0 20px;
}

/* --- what-if simulator --- */
.wi-block { border-top: 1px dashed var(--border); padding-top: 20px; margin-top: 20px; }

.wi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wi-title { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.wi-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.wi-rows { display: grid; gap: 16px; margin: 20px 0 18px; }

.wi-row {
  display: grid;
  grid-template-columns: 180px 1fr 92px;
  grid-template-areas: "info slider num";
  gap: 8px 16px;
  align-items: center;
}

.wi-info { grid-area: info; display: flex; flex-direction: column; gap: 1px; }
.wi-name { font-size: 13.5px; font-weight: 700; }
.wi-current { font-size: 11.5px; color: var(--text-muted); }

.wi-slider {
  grid-area: slider;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  margin: 0;
  cursor: pointer;
}
.wi-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
}
.wi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(79, 70, 229, 0.45);
  margin-top: -6px;
}
.wi-slider::-moz-range-track { height: 6px; border-radius: 999px; background: #e2e8f0; }
.wi-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--primary);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 5px rgba(79, 70, 229, 0.45);
}
.wi-slider:focus-visible { outline: 3px solid #c7d2fe; outline-offset: 2px; border-radius: 8px; }

.wi-num {
  grid-area: num;
  width: 100%;
  padding: 7px 9px;
  font-size: 16px; /* 16px or larger prevents iOS Safari auto-zoom on focus */
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wi-num:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #e0e7ff; }

.wi-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.wi-res-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
}

.wi-res-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.wi-res-value { font-size: 17.5px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.wi-res-badge { margin-top: 7px; }

.wi-verdict {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  border: 1px solid;
  line-height: 1.5;
}
.wi-verdict-pos     { background: var(--green-bg); border-color: #a7f3d0; color: #065f46; }
.wi-verdict-neg     { background: var(--red-bg);   border-color: #fecaca; color: #7f1d1d; }
.wi-verdict-neutral { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }

/* --- profit goal finder --- */
.goal-block { margin-top: 18px; border-top: 1px dashed var(--border); padding-top: 18px; }

.goal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
}

.goal-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 5px 10px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.goal-input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px #e0e7ff; }

.goal-currency { color: var(--text-muted); font-weight: 700; }

#goal-input {
  border: none;
  outline: none;
  width: 84px;
  font-size: 16px; /* 16px or larger prevents iOS Safari auto-zoom on focus */
  font-weight: 800;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
}
#goal-input::-webkit-outer-spin-button,
#goal-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#goal-input { -moz-appearance: textfield; appearance: textfield; }

.goal-per { color: var(--text-muted); font-size: 12.5px; font-weight: 600; }

.goal-out { margin-top: 12px; font-size: 14px; line-height: 1.65; }
.goal-hint { color: var(--text-muted); font-size: 13px; }

.goal-met {
  background: var(--green-bg);
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 10px;
  padding: 10px 14px;
}

.goal-ways { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.goal-ways li {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 13px;
}

/* --- what-if simulator on tablet/mobile --- */
@media (max-width: 900px) {
  .wi-row {
    grid-template-columns: 1fr 92px;
    grid-template-areas: "info num" "slider slider";
  }
}

/* --- recommendations --- */
.recs { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: rec; }

.recs li {
  counter-increment: rec;
  position: relative;
  padding: 12px 14px 12px 48px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
}

.recs li::before {
  content: counter(rec);
  position: absolute;
  left: 13px;
  top: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================================
   TOASTS + MODAL
   ============================================================= */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  z-index: 100;
  display: grid;
  gap: 10px;
  justify-items: end;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 420px;
  background: var(--ink);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px 12px 18px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

.toast-msg { flex: 1; }

.toast-action {
  background: none;
  border: none;
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
}
.toast-action:hover { text-decoration: underline; }

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}
.toast-close:hover { color: #fff; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  max-width: 430px;
  width: 100%;
  padding: 26px;
  animation: pop 0.18s ease;
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.modal-message { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* =============================================================
   RESPONSIVE — tablet & mobile
   ============================================================= */
@media (max-width: 1020px) {
  .charts-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .live-preview { position: static; }
  .analysis-grid, .analysis-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .benefits-grid, .how-grid { grid-template-columns: 1fr; max-width: 460px; }
  .he-grid { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  .app-main { padding: 22px 16px 70px; }
  .page-head h1 { font-size: 22px; }
  .landing-nav { padding: 16px; }
  .hero { padding: 12px 16px 64px; }
  .hero-example { padding: 20px 18px 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }

  /* table becomes stacked cards */
  .data-table { min-width: 0; }
  .data-table thead { display: none; }

  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }

  .data-table tbody tr.clickable {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 4px;
    margin-bottom: 12px;
    background: var(--surface);
  }

  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    border-bottom: 1px dashed var(--border);
    padding: 8px 12px;
    text-align: right;
  }
  .data-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    flex: 1;
  }
  .data-table td[data-label="Product"] {
    border-bottom: 2px solid var(--border);
    text-align: left;
    font-size: 15.5px;
    padding-top: 12px;
  }
  .data-table td[data-label="Product"]::before { display: none; }
  .data-table td[data-label="Recommendation"] { text-align: left; }
  .data-table td[data-label="Recommendation"]::before { flex: none; }
  .cell-rec { max-width: 60%; -webkit-line-clamp: 3; text-align: right; }
  .data-table td[data-label="Actions"] {
    display: flex;
    justify-content: flex-end;
    border-bottom: none;
    padding-bottom: 10px;
  }
  .data-table td[data-label="Actions"]::before { display: none; }

  .numbers-table, .numbers-table tbody, .numbers-table tr, .numbers-table td, .numbers-table th { display: block; width: 100%; }
  .numbers-table thead { display: none; }
  .numbers-table tr { border: 1px dashed var(--border); border-radius: 10px; padding: 4px 0; margin-bottom: 10px; }
  .numbers-table td {
    display: flex;
    justify-content: space-between;
    text-align: right;
    border-bottom: 1px dashed var(--border);
    padding: 7px 12px;
  }
  .numbers-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
  }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .rank-row { grid-template-columns: 15px minmax(72px, 100px) 1fr auto; gap: 7px; }
  .rank-label { font-size: 11.5px; }
  .rank-val { font-size: 11.5px; }
  .kpi-value { font-size: 21px; }
  .btn-xl { padding: 14px 22px; font-size: 15px; }
  .analysis-stats { grid-template-columns: 1fr 1fr; }
  .toast-container { justify-items: stretch; }
  .toast { max-width: none; width: 100%; }
  .bar-row { grid-template-columns: minmax(80px, 110px) 1fr 70px; }
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* =============================================================
   CSV IMPORT PREVIEW MODAL
   ============================================================= */
.import-modal { max-width: 640px; }

.import-summary { font-size: 13.5px; margin: 8px 0 14px; line-height: 1.6; }
.imp-good { color: var(--green); font-weight: 700; }
.imp-bad { color: var(--red); font-weight: 700; }

.import-body { max-height: 46vh; overflow-y: auto; }

.imp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.imp-table { width: 100%; border-collapse: collapse; min-width: 480px; }

.imp-table th {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 9px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.imp-table th.num, .imp-table td.num { text-align: right; }

.imp-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.imp-table tbody tr:last-child td { border-bottom: none; }

.imp-notice {
  border-radius: 10px;
  padding: 11px 14px;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.imp-notice p + p { margin-top: 6px; }
.imp-notice-red   { background: var(--red-bg);   border: 1px solid #fecaca; color: #7f1d1d; }
.imp-notice-amber { background: var(--amber-bg); border: 1px solid #fde68a; color: #78350f; }

.imp-errors {
  margin-top: 12px;
  background: var(--red-bg);
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
}
.imp-errors-title { font-size: 12.5px; font-weight: 800; color: #7f1d1d; margin-bottom: 6px; }
.imp-errors ul { margin: 0; padding-left: 16px; color: #7f1d1d; font-size: 12.5px; display: grid; gap: 5px; line-height: 1.5; }
.imp-row { font-weight: 800; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .import-modal { padding: 18px; }
  .import-body { max-height: 52vh; }
  .modal-actions .btn { flex: 1; }
}

/* =============================================================
   PROFIT REPORT
   ============================================================= */
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.report-toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-hint { font-size: 12.5px; color: var(--text-muted); }

.report-doc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 44px 34px;
}

.rep-head { border-bottom: 3px solid var(--ink); padding-bottom: 16px; }
.rep-brand { font-size: 13px; font-weight: 800; color: var(--primary-600); letter-spacing: 0.02em; }
.rep-title { font-size: clamp(24px, 4vw, 32px); font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.rep-date { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

.rep-section { margin-top: 28px; }

.rep-sec-head h2 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rep-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.rep-sub { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 14px; }

.rep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
}

.rep-tile {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-left: 4px solid var(--border);
}
.rep-tile-good { border-left-color: var(--green-strong); }
.rep-tile-bad  { border-left-color: var(--red-strong); }

.rep-tile-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.rep-tile-value { font-size: 18px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.rep-tile-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.rep-table-wrap { overflow-x: auto; }

.rep-table { width: 100%; border-collapse: collapse; min-width: 520px; }

.rep-table th {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.rep-table th.num, .rep-table td.num { text-align: right; }

.rep-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.rep-table tbody tr:last-child td { border-bottom: none; }

.rep-rank { font-weight: 800; color: var(--text-muted); width: 30px; }
.rep-pos { color: var(--green); }
.rep-neg { color: var(--red); }

.rep-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: -0.5px;
}

.rep-bar-cell { width: 30%; min-width: 90px; }
.rep-bar { display: block; height: 10px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.rep-bar span { display: block; height: 100%; border-radius: 999px; }

.rep-note-ok {
  background: var(--green-bg);
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13.5px;
}

.rep-foot {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
}

@media (max-width: 640px) {
  .report-doc { padding: 22px 18px 18px; }
  .rep-table { min-width: 460px; }
  .report-hint { display: none; }
}

/* ---- print: a clean document, nothing but the report ---- */
/* ------------------------- license activation ------------------------- */
.license-box { margin-top: 18px; padding: 14px; border: 1.5px dashed var(--border);
  border-radius: 10px; background: #f8fafc; text-align: left; }
.license-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.license-row { display: flex; gap: 8px; }
.license-row input { flex: 1; min-width: 0; padding: 9px 11px; font-size: 16px;
  font-family: inherit; color: var(--text); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 8px; }
.license-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px #e0e7ff; }
.license-row button { white-space: nowrap; }
.license-error { font-size: 12.5px; color: var(--red); margin-top: 8px; }
.license-active { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-size: 13px; color: var(--text); }
.license-active .ok { font-weight: 700; color: #047857; }
@media (max-width: 520px) { .license-row { flex-direction: column; } }

@media print {
  @page { size: A4; margin: 12mm; }

  body { background: #fff !important; }

  .topbar,
  .storage-banner,
  .report-toolbar,
  .toast-container,
  .modal-overlay,
  .welcome-overlay,
  #plan-banner { display: none !important; }

  /* interactive chrome never belongs on paper (also when the user
     presses Ctrl+P outside the report page) */
  .table-tools,
  .table-filters,
  .chip,
  .help-btn,
  .help-box,
  .btn,
  .btn-view,
  .icon-btn,
  .link-btn,
  .back-link,
  .wi-slider,
  .wi-num { display: none !important; }

  .app-main { max-width: none !important; padding: 0 !important; margin: 0 !important; }

  .report-doc {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    padding: 0 !important;
  }

  .rep-section,
  .rep-tile,
  .rep-table tr,
  .rep-sec-head { page-break-inside: avoid; }

  a { color: inherit !important; text-decoration: none !important; }
  .rep-pos { color: #047857 !important; }
  .rep-neg { color: #b91c1c !important; }
}

/* =============================================================
   ONBOARDING — welcome, demo badges, metric help
   ============================================================= */
.welcome-card {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  max-width: 540px;
  width: 100%;
  padding: 32px 30px 24px;
  text-align: center;
  animation: pop 0.18s ease;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.welcome-logo { margin-bottom: 12px; }

.welcome-card h2 { font-size: clamp(22px, 4.5vw, 27px); font-weight: 800; letter-spacing: -0.02em; }

.welcome-sub { margin-top: 8px; color: var(--text-muted); font-size: 15px; line-height: 1.55; }

.welcome-steps {
  list-style: none;
  margin: 22px 0 24px;
  padding: 0;
  display: grid;
  gap: 10px;
  text-align: left;
}

.welcome-steps li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.ws-num {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-steps strong { display: block; font-size: 14.5px; }
.welcome-steps li span:last-child { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }

.welcome-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.welcome-note { margin-top: 15px; font-size: 12px; color: var(--text-muted); }

/* --- demo data badge --- */
.badge-demo {
  background: #eef2ff;
  color: #4338ca;
  border: 1px dashed #c7d2fe;
  font-size: 10px;
  padding: 2px 8px;
  vertical-align: 1px;
  margin-left: 4px;
}

/* --- plain-language metric help --- */
.help-btn {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  text-transform: none;
  letter-spacing: 0;
}
.help-btn:hover { color: var(--primary-600); border-color: #c7d2fe; background: var(--primary-soft); }

.help-box {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--primary-soft);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

/* --- labeled View Analysis button (table rows) --- */
.btn-view {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-view:hover { border-color: #c7d2fe; background: var(--primary-soft); color: var(--primary-600); }

@media (max-width: 520px) {
  .welcome-card { padding: 24px 18px 20px; }
  .btn-view { padding: 5px 8px; font-size: 11.5px; }
}

/* =============================================================
   PLAN (FREE / PRO) — pricing, gating, banners
   ============================================================= */
.landing-nav-right { display: flex; align-items: center; gap: 20px; }

.landing-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: #c7d2e4;
}
.landing-nav-link:hover { color: #fff; }

.cta-band-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.4);
}
.btn-gold:hover { background: linear-gradient(135deg, #d97706, #b45309); transform: translateY(-1px); }

.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.4);
}

/* --- free plan banner (dashboard) --- */
.free-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  color: #78350f;
  border-radius: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
}
.fb-text { line-height: 1.5; }
.free-banner .btn-light { color: #78350f; background: #fff; }

/* --- locked Pro panels --- */
.pro-locked {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1.5px dashed #c7d2fe;
  border-radius: 12px;
  background: var(--primary-soft);
  margin-top: 18px;
}

.pro-locked-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: var(--shadow-sm);
}

.pro-locked-body h3 { font-size: 14.5px; font-weight: 750; margin-bottom: 3px; }
.pro-locked-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.55; }

/* --- add-form upsell (limit reached) --- */
.upsell-card { text-align: center; padding: 44px 26px; }
.upsell-icon { font-size: 38px; margin-bottom: 12px; }
.upsell-card h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.upsell-text { max-width: 440px; margin: 0 auto 20px; color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }
.upsell-note { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); }

/* --- pricing page --- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: 880px;
  margin: 10px auto 0;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px 30px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.price-card-pro {
  background: linear-gradient(160deg, #1e1b4b 0%, #4338ca 65%, #6d28d9 100%);
  border: none;
  color: #fff;
  box-shadow: 0 22px 50px rgba(67, 56, 202, 0.35);
  transform: scale(1.03);
}

.price-ribbon {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #f59e0b, #f97316);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.price-name {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.price-card-pro .price-name { color: #c7d2fe; }

.price-value { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; margin-top: 8px; }
.price-value small { font-size: 15px; font-weight: 600; opacity: 0.65; letter-spacing: 0; }

.price-tag { font-size: 13.5px; color: var(--text-muted); margin-top: 2px; }
.price-card-pro .price-tag { color: #c7d2fe; }

.price-feats {
  list-style: none;
  margin: 22px 0 26px;
  padding: 0;
  display: grid;
  gap: 11px;
  font-size: 14px;
}
.price-feats li { display: flex; gap: 11px; align-items: flex-start; }

.feat-check { color: var(--green-strong); font-weight: 800; flex: none; }
.price-card-pro .feat-check { color: #34d399; }

.feat-soon {
  flex: none;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
  color: #e0e7ff;
  border-radius: 5px;
  padding: 3px 8px;
  margin-top: 1px;
}

.price-actions { margin-top: auto; text-align: center; }
.price-note { margin-top: 10px; font-size: 12px; color: #c7d2fe; }

.pro-active-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12.5px;
  font-weight: 650;
  color: #c7d2fe;
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { color: #fff; }

.pricing-trust {
  text-align: center;
  margin-top: 30px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .pricing-grid { grid-template-columns: 1fr; gap: 32px; max-width: 460px; }
  .price-card-pro { transform: none; }
  .pro-locked { flex-direction: column; text-align: center; align-items: center; }
  .pro-locked-body p { margin-left: auto; margin-right: auto; max-width: 340px; }
  .free-banner { flex-direction: column; align-items: flex-start; }
  .landing-nav-right { gap: 12px; }
}


/* ================================================================
   FREE-TRIAL PAYWALL (v1.9) — one-session free plan
================================================================ */
.trial-overlay { position: fixed; inset: 0; z-index: 120; display: flex;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(4, 6, 20, 0.94); overflow-y: auto; }
.trial-overlay[hidden] { display: none; }
.trial-card { width: 100%; max-width: 540px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 18px; padding: 34px 30px 26px;
  text-align: center; box-shadow: var(--shadow-lg); }
.trial-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.trial-card h2 { font-size: 24px; margin: 0 0 10px; color: var(--text); }
.trial-text { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 20px; }
.trial-actions { display: flex; justify-content: center; margin-bottom: 10px; }
.trial-note { font-size: 12px; color: var(--text-muted); margin: 0 0 20px; }
.trial-license { border-top: 1.5px dashed var(--border); padding-top: 18px; margin-bottom: 16px; }
.trial-license .license-row input { background: var(--surface-2); }
.trial-safe { font-size: 12px; color: var(--text-muted); margin: 0; }
@media (max-width: 520px) { .trial-card { padding: 26px 18px 20px; } }


/* ============ ON-SITE CHECKOUT OPTIONS (v1.10) ============ */
.pay-opts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pay-opts a { font-size: 12.5px; font-weight: 600; color: var(--primary); text-decoration: none;
  border: 1.5px solid var(--border); border-radius: 999px; padding: 8px 15px;
  background: var(--surface-2); transition: border-color .15s, background .15s; }
.pay-opts a:hover { border-color: var(--primary); background: var(--primary-soft); }
.trial-card .pay-opts a { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.28); }
.trial-card .pay-opts a:hover { border-color: #f5c93c; background: rgba(255,255,255,.13); }

/* email signup for bonus sessions (v1.11) */
.trial-email { border-top: 1.5px dashed var(--border); padding-top: 16px; margin-bottom: 14px; }


/* ============ WHATSAPP ORDERS + PUBLIC PAGES (v1.12) ============ */
.wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.wa-box { background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; padding: 16px; }
.wa-box .license-row input { flex: 1; min-width: 0; padding: 9px 11px; font-size: 16px;
  border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.wa-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }
.wa-actions { white-space: nowrap; text-align: right; }
.wa-feed-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.wa-feed-head h2 { font-size: 18px; }
.wa-upsell { text-align: center; padding: 46px 20px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 16px; }
@media (max-width: 760px) { .wa-grid { grid-template-columns: 1fr; } }

/* public order/store pages (customers — no app chrome) */
#view-public { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: radial-gradient(ellipse at 50% 30%, #16163e 0%, #070716 60%); }
#view-public[hidden] { display: none; }
.pub-card { width: 100%; max-width: 460px; background: #fff; color: #0f172a;
  border-radius: 20px; padding: 34px 28px; text-align: center; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.pub-logo { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 13px;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6); position: relative; }
.pub-logo::after { content: ''; position: absolute; inset: 16px; border-radius: 50% 50% 50% 0;
  transform: rotate(45deg); background: #fff; }
.pub-card h1 { font-size: 23px; margin: 4px 0 8px; }
.pub-price { font-size: 34px; font-weight: 800; color: #4f46e5; margin: 8px 0 4px; }
.pub-sub { font-size: 14px; color: #5b6b82; line-height: 1.6; margin-bottom: 14px; }
.pub-label { display: block; text-align: left; font-size: 12.5px; font-weight: 700; color: #334155; margin: 12px 0 4px; }
.pub-label input { width: 100%; padding: 12px 13px; font-size: 16px; border: 1.5px solid #e3e8f0;
  border-radius: 12px; margin-top: 5px; }
.pub-label input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px #e0e7ff; }
.pub-wa-btn { display: block; width: 100%; margin-top: 18px; padding: 15px; border: 0; border-radius: 14px;
  background: #25D366; color: #fff; font-size: 16.5px; font-weight: 800; cursor: pointer;
  text-decoration: none; text-align: center; }
.pub-wa-btn:hover { background: #1fb958; }
.pub-wa-btn[disabled] { opacity: .7; cursor: wait; }
.pub-ok { font-size: 15px; font-weight: 700; color: #059669; margin: 14px 0 0; }
.pub-note { font-size: 11.5px; color: #94a3b8; margin-top: 16px; }
.pub-loading { color: #c7d2fe; font-size: 15px; }
.pub-grid { display: grid; gap: 10px; margin-top: 12px; }
.pub-item { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #f8fafc; border: 1.5px solid #e3e8f0; border-radius: 12px; padding: 13px 15px;
  text-decoration: none; color: #0f172a; font-size: 15px; }
.pub-item:hover { border-color: #4f46e5; }
.pub-item span { font-weight: 800; color: #4f46e5; white-space: nowrap; }


/* ============ ORDER-LINK ICONS + BUYER PHONES (v1.13) ============ */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  padding: 0; border: 1.5px solid var(--border); border-radius: 8px; background: transparent;
  color: var(--text-muted); cursor: pointer; vertical-align: middle; }
.icon-btn:hover { color: var(--text); border-color: var(--text-muted); }
.icon-btn.icon-danger:hover { color: #ef4444; border-color: #ef4444; }
.wa-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0 10px; }
.wa-edit input { padding: 8px 10px; font-size: 14px; border: 1.5px solid var(--border);
  border-radius: 8px; background: var(--surface-2); color: var(--text); }
.wa-edit #wa-e-name { flex: 1; min-width: 150px; }
.wa-edit #wa-e-price { width: 110px; }
.wa-edit-row td { background: var(--surface-2); }
.wa-phone { color: #25D366; font-weight: 700; text-decoration: none; white-space: nowrap; }
.wa-phone:hover { text-decoration: underline; }
.pub-err { margin-top: 12px; font-size: 13.5px; font-weight: 700; color: #dc2626; }
@media (max-width: 760px) { .wa-actions { white-space: normal; } }


/* ============ NUMBERED TABLE + WHATSAPP BOX CONTROLS (v1.14) ============ */
.wa-num-cell { color: var(--text-muted); font-weight: 700; width: 36px; }
.wa-box .license-row .icon-btn { flex: 0 0 auto; }


/* ============ SUBSCRIPTION PLANS + FREE-YEAR PROMO (v1.21) ============ */
.plan-toggle { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.plan-opt { flex: 1; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text-muted); font-weight: 700; cursor: pointer; }
.plan-opt.active { border-color: var(--accent, #6366f1); color: var(--text); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.plan-save { display: inline-block; margin-inline-start: 6px; font-size: 10.5px; padding: 2px 6px;
  border-radius: 999px; background: #16a34a; color: #fff; vertical-align: middle; }
.plan-price { font-size: 30px; font-weight: 800; margin: 2px 0 12px; }
.freeyear-box { margin-bottom: 16px; padding: 12px 14px; border: 1.5px dashed #16a34a;
  border-radius: 12px; background: rgba(22,163,74,.08); font-size: 14px; line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   v1.24 — professional trust polish
   (hero trust chips · trust bar · FAQ · footer grid · pay chips)
   ═══════════════════════════════════════════════════════════════ */

/* ---- hero trust chips ---- */
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 28px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: #c7d2fe; background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(129, 140, 248, .38);
}
.trust-chip svg { flex: 0 0 auto; color: #a5b4fc; }

/* ---- trust bar (under the hero) ---- */
.trust-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 34px 24px; }
.trust-bar-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item { display: flex; gap: 13px; align-items: flex-start; }
.trust-ico { font-size: 20px; line-height: 1.35; }
.trust-item strong { display: block; font-size: 14.5px; color: var(--ink); margin-bottom: 3px; }
.trust-item span { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ---- FAQ ---- */
.faq { background: var(--bg); padding: 76px 24px; }
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] { border-color: #c7d2fe; box-shadow: 0 10px 30px rgba(79, 70, 229, .08); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex;
  justify-content: space-between; align-items: center; gap: 14px;
  padding: 17px 20px; font-weight: 700; font-size: 15.5px; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .faq-chev { flex: 0 0 auto; color: #6366f1; transition: transform .2s ease; }
.faq-item[open] summary .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 0 20px 18px; color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }
.faq-a p + p { margin-top: 8px; }

/* ---- payment chips (pricing + paywall) ---- */
.pay-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin: 14px 0 4px; }
.pay-chips span {
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 7px; padding: 4px 10px;
}
.price-note a { color: #4f46e5; font-weight: 700; }

/* ---- footer ---- */
.site-footer { padding: 0; }
.footer-grid {
  max-width: 1080px; margin: 0 auto; padding: 44px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; text-align: left;
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-brand strong { font-size: 16px; color: var(--ink); }
.footer-brand p { margin-top: 5px; font-size: 13px; line-height: 1.55; color: var(--text-muted); max-width: 250px; }
.footer-col h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 11px; }
.footer-col a, .footer-col span { display: block; font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; text-decoration: none; }
.footer-col a:hover { color: #4f46e5; text-decoration: underline; }
.site-footer .muted { padding: 0 24px; }
.footer-copy { border-top: 1px solid var(--border); padding: 16px 24px 22px !important; font-size: 12.5px; }

@media (max-width: 900px) {
  .trust-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .trust-bar-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-trust { gap: 7px; }
  .trust-chip { font-size: 12px; padding: 6px 11px; }
}
