/* Kaztend · панель. One sheet, no framework: phone first, then desktop. */
@font-face { font-family: "Onest"; src: url("/static/Onest.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
:root {
  --bg: #f5f6f8; --card: #fff; --ink: #141821; --muted: #5d6675; --faint: #8b93a1; --line: #e3e6eb; --line-strong: #cfd4dc;
  --accent: #2747b8; --accent-ink: #fff; --accent-soft: #e9eefc;
  --ok: #17724a; --ok-soft: #e3f4ea; --warn: #8a5d00; --warn-soft: #fcf0d4; --bad: #b3261e; --bad-soft: #fbe4e1;
  --tabys: #ffd60a; --tabys-ink: #3d3300; --dastarhan: #0e6b58; --dastarhan-soft: #dff1ea;
  --radius: 14px; --gap: 16px; --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Frame */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #10131a; color: #c9cfda; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; padding: 4px 10px 18px; }
.brand b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); font-size: 15px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c9cfda; padding: 9px 10px; border-radius: 10px; font-weight: 500; }
.nav a:hover { background: #1b2030; text-decoration: none; color: #fff; }
.nav a.on { background: #232a3d; color: #fff; }
.nav .sep { height: 1px; background: #232838; margin: 10px 6px; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.who { margin-top: 18px; padding: 12px 10px; border-top: 1px solid #232838; font-size: 13px; }
.who strong { color: #fff; display: block; }
.who form { margin-top: 8px; }
.who button { background: none; border: 0; color: #9aa3b5; padding: 0; font: inherit; cursor: pointer; }
.main { padding: 24px 28px 80px; max-width: 1280px; width: 100%; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head .sub { color: var(--muted); margin-top: 4px; }
.topbar { display: none; }

/* Pieces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: var(--gap); }
.grid { display: grid; gap: var(--gap); }
.grid > .card + .card, .cols > .card + .card { margin-top: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef0f3; color: #394150; white-space: nowrap; }
.chip.tabys { background: var(--tabys); color: var(--tabys-ink); }
.chip.dastarhan { background: var(--dastarhan-soft); color: var(--dastarhan); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.blue { background: var(--accent-soft); color: var(--accent); }
.stage-new, .stage-contacted { background: #eef0f3; color: #394150; }
.stage-demo { background: #efe7fb; color: #5b2f9c; }
.stage-trial, .stage-launch { background: var(--accent-soft); color: var(--accent); }
.stage-first_check { background: #e2f3f6; color: #0d6475; }
.stage-paid, .stage-active { background: var(--ok-soft); color: var(--ok); }
.stage-lost, .stage-churned { background: var(--bad-soft); color: var(--bad); }
.flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; background: var(--ok-soft); color: #0f4f33; border: 1px solid #c6e8d4; }
.flash.error { background: var(--bad-soft); color: #7f1d17; border-color: #f3c7c2; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: #5c3f00; }
.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }

/* Lists */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 11px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.client-line { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.client-line .name { font-weight: 600; color: var(--ink); }
.late { color: var(--bad); font-weight: 600; }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.column { background: #eceef2; border-radius: var(--radius); padding: 10px; min-height: 120px; scroll-snap-align: start; }
.column h3 { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 2px 4px 10px; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; color: var(--ink); }
.tile:hover { border-color: var(--accent); text-decoration: none; }
.tile .t { font-weight: 600; }
.tile .m { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: #333a46; margin: 0 0 5px; }
.field { margin-bottom: 12px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; min-height: 42px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #b8c6f3; outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.check input { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #aeb6c3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #1f3b9c; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: #fff; border-color: #efb4ad; color: var(--bad); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.wa { background: #1fa855; border-color: #1fa855; color: #fff; }
.inline { display: inline; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters select, .filters input { width: auto; min-width: 140px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: 999px; color: var(--muted); font-weight: 600; }
.tabs a.on { background: var(--ink); color: #fff; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary { margin-bottom: 12px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 18px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); }
.timeline .when { font-size: 12px; color: var(--faint); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.code { font: 600 28px/1 ui-monospace, Menlo, monospace; letter-spacing: .2em; }
.copy { cursor: pointer; }
.public { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, #e4e9fb, transparent), var(--bg); }
.public .box { width: 100%; max-width: 400px; }
.public .brand { color: var(--ink); justify-content: center; padding-bottom: 20px; }

/* Phone */
@media (max-width: 900px) {
  .app { display: block; }
  .side { display: none; position: fixed; inset: 0; z-index: 20; height: auto; }
  .side.open, .side:target { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #10131a; color: #fff; position: sticky; top: 0; z-index: 10; }
  .topbar .brand { padding: 0; }
  .topbar a { color: #fff; font-weight: 600; }
  .main { padding: 16px 14px 90px; }
  .cols, .g2, .g3 { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: 21px; }
  .kv { grid-template-columns: 110px 1fr; }
  .hide-phone { display: none; }
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { text-align: center; padding: 9px 2px 10px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a span { display: block; font-size: 18px; line-height: 1.1; }
  table.resp thead { display: none; }
  table.resp tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  table.resp td { display: block; border: 0; padding: 2px 0; }
}
@media (min-width: 901px) {
  .tabbar { display: none; }
  .nav a.close-menu { display: none; }
  /* the menu's dark column goes down the whole page, also past the first screen */
  .app { background: linear-gradient(90deg, #10131a 240px, transparent 240px); }
}

/* Spacing and sizes the pages ask for: classes, because the strict CSP
   (style-src 'self') ignores style attributes. */
.mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt10 { margin-top: 10px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt14only { margin: 14px 0 0; }
.mb0 { margin-bottom: 0; } .mb6 { margin-bottom: 6px; } .mb8 { margin-bottom: 8px; } .mb10 { margin-bottom: 10px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.my6 { margin: 6px 0; } .my8 { margin: 8px 0; }
.fs13 { font-size: 13px; } .break { word-break: break-all; } .tr { text-align: right; }
.w100 { width: 100%; } .wauto { width: auto; } .w140 { width: 140px; } .w180 { width: 180px; } .mw720 { max-width: 720px; }
.grow { flex: 1; } .minw200 { min-width: 200px; } .white { color: #fff; }
.bd-accent { border-color: var(--accent); } .bd-bad { border-color: #efb4ad; } .bg-accent-soft { background: var(--accent-soft); }
