:root { --paper:#EEF1F4; --sheet:#FFFFFF; --ink:#1C2433; --muted:#5B6678; --line:#C9D1DB; --soft:#E3E7EC;
        --stamp:#2B4BD8; --tape:#F2C230; --diff:#FBEBB5; --danger:#B42318; }
* { box-sizing:border-box; margin:0; padding:0; }
html,body { min-height:100%; }
body { background:var(--paper); color:var(--ink); font:400 15px/1.45 "Golos Text",system-ui,sans-serif;
       -webkit-tap-highlight-color:transparent; padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
body.no-nav { padding-bottom:0; }
button, input, select, textarea { font:inherit; color:inherit; }
:focus-visible { outline:3px solid var(--stamp); outline-offset:2px; }
[hidden] { display:none !important; }

main { padding:20px 16px 24px; display:flex; flex-direction:column; gap:20px; max-width:640px; margin:0 auto; }
main.wide { max-width:980px; }
h1 { font:700 22px/1.15 Unbounded,sans-serif; }
h2 { font:500 16px/1.3 Unbounded,sans-serif; }
.muted { color:var(--muted); }
.small { font-size:13px; }
.row { display:flex; justify-content:space-between; align-items:center; gap:10px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:0 18px; border-radius:10px;
       border:0; background:var(--ink); color:#fff; font-weight:600; cursor:pointer; }
.btn.blue { background:var(--stamp); }
.btn.ghost { background:transparent; color:var(--ink); border:1.5px solid var(--ink); }
.btn.small { min-height:40px; padding:0 14px; font-size:14px; }
.btn.block { width:100%; }
.btn[disabled] { opacity:.5; cursor:default; }
.link { background:none; border:0; color:var(--stamp); cursor:pointer; padding:6px 0; }

.cta { display:flex; justify-content:space-between; align-items:center; width:100%; border:0; text-align:left;
       background:var(--ink); color:#fff; border-radius:12px; padding:18px; cursor:pointer; }
.cta b { display:block; font-weight:600; font-size:17px; }
.cta small { font-size:13px; color:var(--line); }

.card { background:var(--sheet); border:1px solid var(--line); border-radius:10px; padding:14px; }
.card.click { cursor:pointer; text-align:left; width:100%; display:flex; flex-direction:column; gap:6px; }
.card .t { font-weight:600; font-size:16px; }
.sheet { background:var(--sheet); border:1px solid var(--line); border-radius:6px; padding:14px 16px; display:flex; flex-direction:column; gap:4px; }

.status { font-size:12px; font-weight:600; border-radius:6px; padding:1px 7px; white-space:nowrap; }
.status.active { color:var(--stamp); border:1.5px solid var(--stamp); }
.status.moderation { color:var(--muted); border:1.5px dashed #8A94A6; }
.status.rejected { color:var(--danger); border:1.5px solid var(--danger); }
.status.closed { color:var(--muted); border:1.5px solid var(--line); }
.dot { display:inline-block; width:8px; height:8px; border-radius:4px; background:var(--tape); border:1px solid #C79A0B; margin-right:6px; }

.stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.stat .n { font:700 26px/1 Unbounded,sans-serif; color:var(--stamp); }
.stat .l { font-size:13px; color:var(--muted); margin-top:6px; }
.stamp { display:inline-block; font:700 13px Unbounded,sans-serif; color:var(--stamp); border:2px solid var(--stamp);
         border-radius:6px; padding:4px 8px; transform:rotate(-4deg); }
.stamp.big { font-size:20px; padding:10px 16px; border-width:3px; }

/* форма */
.field { display:flex; flex-direction:column; gap:6px; }
.field > label, .field > .lbl { font-size:13px; font-weight:600; color:var(--muted); }
.input { width:100%; min-height:48px; padding:0 14px; background:var(--sheet); border:1px solid var(--line); border-radius:10px; }
textarea.input { padding:12px 14px; min-height:96px; resize:vertical; }
select.input { appearance:none; background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
               background-position:calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size:5px 5px; background-repeat:no-repeat; padding-right:36px; }
.grid2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.chips { display:flex; flex-wrap:wrap; gap:8px; }
.chip { min-height:38px; padding:0 14px; border-radius:19px; border:1px solid var(--line); background:var(--sheet); font-size:14px; cursor:pointer; }
.chip[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:#fff; }
.hint { font-size:13px; color:var(--muted); }
.file { display:flex; align-items:center; gap:10px; min-height:52px; padding:0 14px; border:1.5px dashed #8A94A6; border-radius:10px; cursor:pointer; background:transparent; width:100%; text-align:left; }
.error { background:#FDECEA; color:var(--danger); border-radius:10px; padding:12px 14px; font-size:14px; }
.bar { position:fixed; left:0; right:0; bottom:0; z-index:4; padding:10px 16px calc(14px + env(safe-area-inset-bottom)); background:var(--sheet); border-top:1px solid var(--line); }
.bar .in { max-width:640px; margin:0 auto; }

/* сравнение */
.tablebox { overflow-x:auto; background:var(--sheet); border:1px solid var(--line); border-radius:10px; }
table.cmp { border-collapse:collapse; font-size:13px; min-width:100%; }
table.cmp th, table.cmp td { padding:10px; text-align:left; vertical-align:top; border-bottom:1px dashed var(--line); min-width:130px; }
table.cmp thead th { border-bottom:2px solid var(--ink); font-weight:600; font-size:14px; }
table.cmp tbody tr:last-child th, table.cmp tbody tr:last-child td { border-bottom:0; }
table.cmp th[scope="row"] { position:sticky; left:0; background:var(--sheet); color:var(--muted); font-weight:500; min-width:88px; width:88px; }
table.cmp thead th:first-child { position:sticky; left:0; background:var(--sheet); }
.mark { background:var(--diff); border-radius:4px; padding:1px 5px; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.legend { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.legend i { width:14px; height:14px; background:var(--diff); border-radius:3px; border:1px solid #E2C35A; }
.opened { font-size:13px; font-weight:600; color:var(--stamp); border:1.5px solid var(--stamp); border-radius:6px; padding:3px 8px; transform:rotate(-3deg); display:inline-block; }

/* выбор итога */
.options { display:flex; flex-direction:column; gap:8px; }
.option { min-height:52px; text-align:left; padding:0 16px; border-radius:10px; border:1px solid var(--line); background:var(--sheet); cursor:pointer; }

.center { min-height:70vh; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:14px; padding:32px 24px; }
.center p { color:var(--muted); max-width:36ch; }

nav { position:fixed; left:0; right:0; bottom:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); background:var(--sheet);
      border-top:1px solid var(--line); padding-bottom:env(safe-area-inset-bottom); z-index:5; }
nav button { display:flex; flex-direction:column; align-items:center; gap:3px; padding:10px 0 9px; min-height:56px; border:0; background:none;
             font-size:11px; color:var(--muted); cursor:pointer; }
nav button[aria-current="page"] { color:var(--stamp); font-weight:600; }
nav button[disabled] { opacity:.45; cursor:default; }
nav svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
body:not(.no-nav) .bar { bottom:calc(64px + env(safe-area-inset-bottom)); padding-bottom:12px; }
body.has-bar { padding-bottom:calc(150px + env(safe-area-inset-bottom)); }
body.no-nav.has-bar { padding-bottom:calc(86px + env(safe-area-inset-bottom)); }
.card.row > span { min-width:0; }
.card.row .btn { flex-shrink:0; }

/* поставщик */
.seg { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; }
.seg button { min-height:44px; border-radius:10px; border:1px solid var(--line); background:var(--sheet); font-size:14px; cursor:pointer; padding:0 6px; }
.seg button[aria-pressed="true"] { background:var(--ink); border-color:var(--ink); color:#fff; }
.search { display:flex; align-items:center; gap:8px; min-height:46px; padding:0 12px; background:var(--sheet); border:1px solid var(--line); border-radius:10px; }
.search input { flex:1; border:0; background:transparent; min-height:42px; outline:none; }
.new { font-size:12px; font-weight:600; background:var(--diff); border-radius:4px; padding:0 6px; }
.responded { font-size:13px; font-weight:600; color:var(--stamp); border:1.5px solid var(--stamp); border-radius:8px; padding:6px 10px; white-space:nowrap; }
.list { background:var(--sheet); border:1px solid var(--line); border-radius:10px; }
.list > * + * { border-top:1px solid var(--soft); }
.li { display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:54px; padding:8px 14px; width:100%; background:none; border-left:0; border-right:0; border-bottom:0; text-align:left; cursor:pointer; }
.li:first-child { border-top:0; }
.check { width:22px; height:22px; border-radius:6px; border:2px solid #8A94A6; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; }
.check.on { background:var(--stamp); border-color:var(--stamp); }
.check.part { background:#C9D3F7; border-color:var(--stamp); }
.switch { width:48px; height:28px; border:0; border-radius:14px; background:#B6BFCC; position:relative; cursor:pointer; flex-shrink:0; }
.switch::after { content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:11px; background:#fff; transition:left .15s; }
.switch[aria-checked="true"] { background:var(--stamp); }
.switch[aria-checked="true"]::after { left:23px; }
.trial { position:relative; background:var(--sheet); border:2px solid var(--ink); border-radius:10px; padding:16px; display:flex; flex-direction:column; gap:8px; }
.li { border:0; border-radius:0; }
.li + .li { border-top:1px solid var(--soft); }
.check.on::after { content:""; width:6px; height:11px; border:solid #fff; border-width:0 2.5px 2.5px 0; transform:rotate(45deg) translate(-1px,-1px); }
.check.part::after { content:""; width:10px; height:2.5px; background:var(--stamp); border-radius:2px; }
