:root {
  --bg: #eef0f5;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --wb: #cb11ab;
  --ozon: #005bff;
  --nav: 72px;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  --font: "SF Pro Display", "Segoe UI", system-ui, sans-serif;
}
html[data-theme="dark"] {
  --bg: #0b0f19;
  --card: #151b2b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: #243049;
  --shadow: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; background: var(--bg); }
.page { padding: 18px 16px calc(var(--nav) + 28px); }
.hero { min-height: 100vh; min-height: 100dvh; padding: 56px 22px 32px; display: flex; flex-direction: column; }
.brand { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.h { font-size: 28px; font-weight: 760; margin: 0; letter-spacing: -0.045em; line-height: 1.12; }
.h.sm { font-size: 20px; margin: 20px 0 10px; }
.sub { color: var(--muted); font-size: 15px; margin: 8px 0 0; line-height: 1.45; }
.hello { font-size: 15px; color: var(--muted); margin: 0 0 4px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.kpi-num { font-size: 34px; font-weight: 780; letter-spacing: -0.05em; line-height: 1; }
.delta { font-size: 13px; font-weight: 700; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.row { display: flex; gap: 10px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 15px 16px;
  font-size: 16px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn.sec { background: #e8eaf3; color: var(--text); }
html[data-theme="dark"] .btn.sec { background: #243049; color: var(--text); }
.btn.sm { width: auto; padding: 10px 14px; font-size: 13px; border-radius: 12px; }
.btn:disabled { opacity: .45; }
.ghost { background: transparent; border: 0; color: var(--accent); font-weight: 700; padding: 8px 0; cursor: pointer; }
.pills { display: flex; gap: 8px; margin: 12px 0 0; }
.pill {
  border: 0;
  background: #eef0f6;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  color: var(--text);
}
html[data-theme="dark"] .pill { background: #243049; }
.pill.on { background: var(--text); color: var(--bg); }
.markets { display: flex; gap: 14px; margin: 14px 0 16px; font-size: 13px; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; margin-right: 6px; }
.dot.wb { background: var(--wb); }
.dot.ozon { background: var(--ozon); }
.spark { width: 100%; height: 78px; margin-top: 14px; color: var(--accent); }
.ai-card {
  background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 52%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 16px 40px rgba(79, 70, 229, .28);
}
.ai-card .muted, .ai-card .sub { color: rgba(255,255,255,.78); }
.ai-card .btn { background: #fff; color: #312e81; margin-top: 14px; }
.stat { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; font-size: 14px; line-height: 1.35; }
.task { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.task .arrow { color: var(--muted); font-size: 18px; }
.badge { font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.bad { background: #fee2e2; color: var(--bad); }
.badge.ok { background: #d1fae5; color: var(--ok); }
.mp { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; color: #fff; }
.mp.wb { background: var(--wb); }
.mp.ozon { background: var(--ozon); }
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 430px;
  height: var(--nav);
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.nav a.on { color: var(--accent); font-weight: 700; }
.nav a.ai.on { color: #7c3aed; }
.nav svg { width: 22px; height: 22px; }
.photo {
  height: 180px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 72px;
  margin: 8px 0 16px;
  color: #fff;
}
.ring-wrap { display: flex; gap: 16px; align-items: center; }
.ring { width: 92px; height: 92px; }
.bars { display: grid; gap: 10px; flex: 1; }
.bars .line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.bar { height: 8px; background: #eef0f6; border-radius: 99px; overflow: hidden; }
html[data-theme="dark"] .bar { background: #243049; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.search, .field, .ask {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  padding: 14px;
  font-size: 16px;
}
.ask { min-height: 88px; resize: none; }
.choice { display: grid; gap: 10px; }
.choice button {
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  color: var(--text);
}
.choice button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.compare { display: grid; gap: 10px; }
.compare .box { background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.compare .was { opacity: .78; }
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bubble { background: var(--card); border-radius: 18px; padding: 12px 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; box-shadow: var(--shadow); }
.bubble.me { background: #eef2ff; margin-left: 28px; }
html[data-theme="dark"] .bubble.me { background: #1e293b; }
.hints { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.hint { background: var(--card); border: 0; border-radius: 999px; padding: 9px 12px; font-size: 12px; font-weight: 650; cursor: pointer; color: var(--text); box-shadow: var(--shadow); }
.paywall { background: #111827; color: #fff; border-radius: var(--radius); padding: 18px; }
.paywall .btn { background: #fff; color: #111827; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.composer .btn { width: auto; padding: 14px 16px; }
.ws-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.ws-tabs a {
  text-align: center;
  padding: 9px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.ws-tabs a.on { background: var(--text); color: var(--bg); }
.form-err { color: var(--bad); font-size: 13px; font-weight: 650; margin: 10px 0 0; }
.empty-shops { text-align: center; padding: 28px 16px; }
