:root {
  --ink: #10302c; --ink-2: #47605c; --ink-3: #7c908c;
  --bg: #fbf7ef; --card: #ffffff; --line: #e7e0d2; --soft: #f3ecdf;
  --brand: #0f5c50; --brand-2: #0b463d; --sun: #ffb81c; --sun-2: #fff1cc;
  --ok: #1d8a5b; --ok-bg: #e2f5ea; --bad: #c2372e; --bad-bg: #fde9e6; --info-bg: #e6f0ff;
  --radius: 18px; --shadow: 0 1px 2px rgba(16,48,44,.06), 0 8px 24px rgba(16,48,44,.07);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef5f2; --ink-2: #b4c6c1; --ink-3: #849a95;
    --bg: #0c1917; --card: #132522; --line: #233a36; --soft: #182e2a;
    --brand: #35c2a4; --brand-2: #5fd6bc; --sun: #ffc23d; --sun-2: #3d3210;
    --ok: #4fd39a; --ok-bg: #123526; --bad: #ff8278; --bad-bg: #3b1a17; --info-bg: #14283f;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 520px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-2); } .small { font-size: .875rem; } .center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.hide { display: none !important; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a.link { color: var(--ink-2); text-decoration: none; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: .95rem; }
.nav a.link:hover { background: var(--soft); color: var(--ink); }
@media (max-width: 640px) { .nav a.link.opt { display: none; } }

/* buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 12px 20px; border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none; transition: transform .08s, background .15s; }
@media (prefers-color-scheme: dark) { .btn { color: #06211c; } }
.btn:hover { background: var(--brand-2); } .btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sun { background: var(--sun); color: #2b1d00; } .btn.sun:hover { filter: brightness(1.05); background: var(--sun); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); } .btn.ghost:hover { background: var(--soft); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.sm { padding: 7px 14px; font-size: .875rem; } .btn.lg { padding: 15px 28px; font-size: 1.05rem; } .btn.block { width: 100%; }
label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 1px; border-color: var(--brand); }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.field + .field { margin-top: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.sun { background: var(--sun-2); color: #7a5600; }
@media (prefers-color-scheme: dark) { .pill.sun { color: var(--sun); } }
.note { padding: 12px 14px; border-radius: 12px; background: var(--info-bg); font-size: .92rem; }
.note.warn { background: var(--sun-2); } .note.err { background: var(--bad-bg); color: var(--bad); } .note.good { background: var(--ok-bg); color: var(--ok); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 650; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
dialog { border: 0; border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog::backdrop { background: rgba(8,24,22,.55); backdrop-filter: blur(3px); }
dialog .inner { padding: 24px; }
.x { background: var(--soft); border: 0; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; color: var(--ink); }

/* landing */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
.eyebrow { font-weight: 800; color: var(--brand); text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; margin-bottom: 10px; }
.section { padding: 56px 0; }
.band { background: var(--soft); }
.step-n { width: 38px; height: 38px; border-radius: 50%; background: var(--sun); color: #2b1d00; font-weight: 800; display: grid; place-items: center; margin-bottom: 12px; }
.phone { width: min(320px, 100%); margin: 0 auto; background: #0b1f1c; border-radius: 42px; padding: 12px; box-shadow: 0 30px 60px rgba(16,48,44,.28); transform: rotate(2deg); }
.phone .screen { background: var(--bg); border-radius: 32px; padding: 22px 18px; min-height: 480px; }
.bubble { padding: 10px 14px; border-radius: 16px; max-width: 85%; font-size: .95rem; overflow-wrap: anywhere; }
.bubble.them { background: var(--soft); border-bottom-left-radius: 5px; }
.bubble.me { background: var(--brand); color: #fff; margin-left: auto; border-bottom-right-radius: 5px; }
@media (prefers-color-scheme: dark) { .bubble.me { color: #06211c; } }
.bubble.sys { background: var(--ok-bg); color: var(--ok); margin: 0 auto; font-size: .85rem; text-align: center; }
.chat { display: flex; flex-direction: column; gap: 8px; }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.product { display: flex; flex-direction: column; }
.product .art { height: 130px; border-radius: 14px; background: var(--soft); display: grid; place-items: center; margin-bottom: 14px; }
.product .art svg { width: 84px; height: 84px; }
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th:nth-child(2), .compare td:nth-child(2) { background: color-mix(in srgb, var(--sun) 14%, transparent); font-weight: 650; }
.scroll-x { overflow-x: auto; }
footer { padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }

/* app */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.tab { border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--ink-2); padding: 9px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.tab.on { background: var(--ink); color: var(--bg); }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; margin-left: 5px; }
.tagcard { display: flex; gap: 14px; align-items: flex-start; }
.tagcard .qr { width: 92px; height: 92px; flex: none; background: #fff; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.tagcard .qr svg { width: 100%; height: 100%; display: block; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 22px; flex: none; }
.list > * + * { border-top: 1px solid var(--line); }
.item { padding: 14px 0; display: flex; gap: 12px; align-items: center; }
button.item { width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { border: 0; background: none; width: 34px; height: 34px; font-size: 18px; cursor: pointer; color: var(--ink); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.lostbar { background: var(--bad); color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 700; }

/* admin */
.kpis { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { padding: 18px; }
.kpi .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .82rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.delta { font-size: .82rem; font-weight: 700; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.chart { width: 100%; height: 190px; display: block; }
.bar-row { display: grid; grid-template-columns: 132px 1fr 64px; gap: 10px; align-items: center; font-size: .9rem; padding: 5px 0; }
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel { display: grid; gap: 8px; }
.funnel div { background: var(--brand); color: #fff; border-radius: 10px; padding: 9px 12px; font-weight: 700; font-size: .9rem; min-width: 150px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .funnel div { color: #06211c; } }

/* print sheet */
.sheet { display: none; }
@media print {
  body > *:not(.sheet) { display: none !important; }
  .sheet { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 6mm; padding: 8mm; }
  .sticker { border: .3mm dashed #999; border-radius: 4mm; padding: 4mm; text-align: center; break-inside: avoid; color: #000; background: #fff; font-family: Arial, sans-serif; }
  .sticker svg { width: 34mm; height: 34mm; }
  .sticker b { display: block; font-size: 11pt; } .sticker span { font-size: 8pt; }
}
