/* ─────────────────────────────────────────────────────────────────────────
   tm.hub — дизайн-система кабинета (27.10, направление «Б»).
   Светлый фон, белые карточки, тёмно-синий текст, один бирюзовый акцент
   для действий и подтверждённых денег, красный — только для просрочки.
   Один шрифт без засечек (Geist, свой файл — работает и в закрытом
   контуре), цифры табличные. Макеты: холст «tm.hub — макеты кабинета».

   Правила:
   · у каждого блока заголовок и одна строка «зачем это»: что за цифра
     и что с ней делать — экран читает директор, а не бухгалтер;
   · одно главное действие на экране, в шапке справа;
   · кнопки не ниже 44 px, поле клика целиком;
   · главная цифра экрана одна и крупная, остальные мельче.
   ───────────────────────────────────────────────────────────────────────── */

@font-face { font-family: Geist; src: url("/app/static/fonts/Geist-Variable.woff2") format("woff2");
             font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/app/static/fonts/GeistMono-Variable.woff2") format("woff2");
             font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --surface:      #f7f8f6;
  --surface-sunk: #eef1f0;
  --paper:        #ffffff;
  --surface-mint: #e3f1f2;
  --ink:          #082b42;
  --ink-muted:    #4f6577;
  --ink-subtle:   #5f7382;
  --ink-inv:      #ffffff;
  --line:         #e3e7e6;
  --line-strong:  #cfd8dc;

  --accent:       #075968;
  --accent-hover: #064b58;
  --accent-soft:  #e3f1f2;
  --accent-mark:  #087e87;
  --accent-warm:  #d4a76a;
  --night:        #082b42;

  --crit:    #b23a22;
  --crit-bg: #fdf1ed;
  --warn:    #8a5a14;
  --warn-bg: #f7eedf;
  --money:   #075968;

  --sans:  Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: var(--sans);
  --mono:  "Geist Mono", ui-monospace, SFMono-Regular, monospace;

  --t-display: clamp(2.25rem, 1.2rem + 4.4vw, 4rem);
  --t-h1:      clamp(1.75rem, 1.45rem + 1vw, 2.125rem);
  --t-h2:      1.25rem;
  --t-h3:      1.0625rem;
  --t-lead:    1.0625rem;
  --t-body:    1rem;
  --t-small:   .9375rem;
  --t-label:   .8125rem;
  --t-metric:  clamp(2rem, 1.4rem + 2.4vw, 3.25rem);

  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --tap: 44px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0; background: var(--surface); color: var(--ink);
  font: 400 var(--t-body)/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent-mark); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; margin: 0; }
h1 { font-size: var(--t-h1); line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: var(--t-h2); line-height: 1.25; }
h3 { font-size: var(--t-h3); line-height: 1.35; }

.num, .mono { font-variant-numeric: tabular-nums; }
.label, .eyebrow, .tile-cat, .state, .proof-k-mono {
  font: 500 var(--t-label)/1.3 var(--sans); color: var(--ink-muted);
}
.lede { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-muted);
        max-width: 62ch; margin: 0 0 1.25rem; }
.hint { font-size: var(--t-small); color: var(--ink-muted); }
/* «зачем это»: одна строка под заголовком блока, объясняет цифры простыми словами */
.why { font-size: var(--t-small); line-height: 1.45; color: var(--ink-muted); margin: 4px 0 0; max-width: 72ch; }

/* ─── кнопки ─── */
button, .btn {
  font: 500 .9375rem/1.2 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); min-height: var(--tap); padding: 10px 18px;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
button:hover, .btn:hover { border-color: var(--ink-subtle); background: var(--surface); color: var(--ink); }
button[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1rem; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .875rem; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent-hover); }
.btn-light { background: #fff; border-color: #fff; color: var(--night); }
.btn-light:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--night); }
.btn svg, button svg, .nav svg, .tile-go svg { width: 20px; height: 20px; flex: none; }
.back svg { width: 18px; height: 18px; }
.dz-ico svg { width: 36px; height: 36px; }
kbd { font: 500 .75rem/1 var(--sans); border: 1px solid currentColor; border-radius: 6px;
      padding: 2px 6px; opacity: .7; }

label { display: block; font-size: var(--t-small); font-weight: 500; color: var(--ink); margin-bottom: 8px; }
select, input[type=text], input[type=email], input:not([type]) {
  font: var(--t-body) var(--sans); min-height: var(--tap); padding: 10px 12px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink);
}
select:focus, input:focus { border-color: var(--accent); outline: none;
                            box-shadow: 0 0 0 3px var(--accent-soft); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
          gap: 20px; margin-bottom: 20px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

/* ─── лендинг (витрина и страница модуля кабинета) ─── */
.page { max-width: 80rem; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4.5rem) 96px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; }
.top .brand { padding: 0; }
.top-nav { display: flex; gap: 12px; align-items: center; }
.section { padding: clamp(3rem, 7vw, 6rem) 0 0; }
.section-head { padding-top: 14px; margin-bottom: 30px; display: flex; align-items: baseline;
                justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; }
.hero { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.hero h1 { font-size: var(--t-display); line-height: 1.06; letter-spacing: -.035em;
           max-width: 19ch; margin: 20px 0 22px; }
.hero h1 em { font-style: normal; color: var(--ink-muted); }
.hero .lede { max-width: 58ch; }
.hero-proof { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 26px;
              font: 500 var(--t-label)/1.7 var(--sans); color: var(--ink-muted); }
.proof { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.proof > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
               padding: 18px 20px; }
.proof-v { font: 600 var(--t-metric)/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.proof-v.crit { color: var(--crit); }
.proof-k { margin-top: 8px; font-size: var(--t-small); color: var(--ink-muted); max-width: 26ch; }
.steps-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; }
.step-no { font: 600 var(--t-label)/1 var(--sans); color: var(--accent); }
.step h3 { margin: 12px 0 8px; font-size: 1.1rem; }
.step p { margin: 0; font-size: var(--t-small); color: var(--ink-muted); }
.shot { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-sunk); overflow: hidden;
        box-shadow: 0 1px 2px rgba(8,43,66,.05), 0 12px 32px rgba(8,43,66,.07); }
.shot-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px;
            border-bottom: 1px solid var(--line); background: var(--paper); }
.shot-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.shot-url { margin-left: 10px; font: 500 var(--t-label)/1 var(--sans); color: var(--ink-subtle); }
.shot img { display: block; width: 100%; height: auto; }
.shot-empty { padding: 72px 24px; text-align: center; color: var(--ink-subtle); font-size: var(--t-small); }
.mint { background: var(--surface-mint); border-radius: var(--radius-md);
        padding: clamp(2rem, 4vw, 3.25rem); margin-top: clamp(3rem, 7vw, 6rem); }
.mint h2 { margin-bottom: 16px; }
.cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.col h4 { margin: 0 0 10px; font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-muted); }
.col p { margin: 0; font-size: var(--t-small); line-height: 1.6; }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.qa summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; float: right; color: var(--accent); }
.qa details[open] summary::after { content: "–"; }
.qa p { margin: 12px 0 0; font-size: var(--t-small); color: var(--ink-muted); max-width: 68ch; }
.site-foot { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line);
             padding-top: 22px; display: flex; justify-content: space-between;
             gap: 20px; flex-wrap: wrap; font-size: var(--t-small); color: var(--ink-muted); }


/* ═════════════════════════ КАБИНЕТ ═════════════════════════ */

/* ─── каркас: меню слева ─── */
.shell { display: flex; min-height: 100vh; }
.side { width: 240px; flex: none; border-right: 1px solid var(--line);
        padding: 22px 14px; background: var(--paper);
        display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { font: 700 1.3rem/1 var(--sans); letter-spacing: -.03em; padding: 4px 12px 0;
         color: var(--ink); text-decoration: none; display: block; }
.brand span { color: var(--accent-mark); }
.side-org { margin: 0 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius-xs);
            background: var(--surface); font-size: .875rem; font-weight: 600; line-height: 1.3;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
         text-decoration: none; color: #36536a; font-weight: 500; font-size: .9375rem;
         border-radius: var(--radius-sm); }
.nav a:hover { color: var(--ink); background: var(--surface); }
.nav a[aria-current] { color: var(--ink); background: var(--accent-soft); font-weight: 600; }
.nav a[aria-current] svg { color: var(--accent); }
.nav-count { margin-left: auto; font: 600 .75rem/1 var(--sans); font-variant-numeric: tabular-nums;
             background: var(--accent); color: #fff; border-radius: 999px; padding: 4px 8px; }
.side-bot { display: flex; align-items: center; gap: 10px; margin: 0 2px; padding: 12px; border-radius: var(--radius-sm);
            background: var(--surface); color: var(--ink); text-decoration: none; font-size: .8125rem; line-height: 1.35; }
.side-bot:hover { background: var(--accent-soft); color: var(--ink); }
.side-bot b { display: block; font-weight: 600; font-size: .875rem; }
.side-bot svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.side-foot { margin-top: auto; padding: 0 12px; font-size: .8125rem; color: var(--ink-muted); line-height: 1.5; }
.side-foot b { display: block; font-weight: 600; color: var(--ink); font-size: .875rem;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot a { color: var(--ink-muted); }
.side-exit { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
             min-height: 36px; color: var(--ink-muted); text-decoration: none; font-size: .875rem; }
.side-exit:hover { color: var(--crit); }
.side-exit svg { width: 18px; height: 18px; }
.side-legal { padding: 0 12px; font-size: .75rem; color: var(--ink-subtle); }
.side-legal a { color: var(--ink-subtle); }
.main { flex: 1; min-width: 0; padding: 32px 40px 96px; }
.main > * { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* ─── шапка страницы ─── */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
      flex-wrap: wrap; margin-bottom: 24px; }
.ph-text { min-width: 0; max-width: 760px; }
.ph-sub { margin: 6px 0 0; font-size: var(--t-small); color: var(--ink-muted); }
.ph-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ph-actions form { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem;
        color: var(--ink-muted); text-decoration: none; margin-bottom: 10px; }
.back:hover { color: var(--accent); }

.sec { margin-top: 32px; }
.sec:first-child { margin-top: 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px;
            margin-bottom: 14px; flex-wrap: wrap; }
.sec-head h2 { font-size: var(--t-h2); }
.sec-head .hint { margin: 0; }
.main h2, .main h3 { margin-top: 0; }

/* ─── метки статуса ─── */
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px;
        border-radius: 999px; font: 500 .8125rem/1.2 var(--sans);
        background: var(--surface-sunk); color: var(--ink-muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.plain::before { display: none; }
.pill.ok   { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.crit { background: var(--crit-bg); color: var(--crit); }
.pill a { color: inherit; }

/* ─── карточки ─── */
.panel, .box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
               padding: 22px 24px; }
.panel + .panel { margin-top: 16px; }
.panel h2, .box h2 { font-size: 1.125rem; margin-bottom: 4px; }
.panel h3 { margin-bottom: 6px; }
.panel .hint { margin: 0 0 16px; }
.box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.grid2 > .panel + .panel { margin-top: 0; }
.grid3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.note { padding: 14px 18px; background: var(--accent-soft); border-radius: var(--radius-sm);
        font-size: var(--t-small); margin: 0 0 20px; }
.note.warn { background: var(--warn-bg); color: #4d3a14; }
.note.crit { background: var(--crit-bg); color: #5a1f12; }
.note b { font-weight: 600; }
.note .actions { margin-top: 14px; }

.empty { border: 1px dashed var(--line-strong); border-radius: var(--radius-md);
         padding: 48px 24px; text-align: center; color: var(--ink-muted); background: var(--paper); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.empty p { margin: 0 auto 22px; max-width: 52ch; }

details.more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center;
                         gap: 8px; min-height: var(--tap); font-weight: 600; color: var(--ink); }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-weight: 600; color: var(--accent); width: 18px; }
details.more[open] > summary::before { content: "–"; }

/* ─── сводка ─── */
.home-top { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.hero-num { font: 600 clamp(2.5rem, 1.6rem + 3vw, 3.5rem)/1 var(--sans); letter-spacing: -.035em;
            font-variant-numeric: tabular-nums; margin: 10px 0 14px; }
.hero-num.money { color: var(--ink); }
.meter { height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--accent-mark); border-radius: 999px; }
.meter-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
             font-size: .875rem; color: var(--ink-muted); margin-top: 8px; }
.box-dark { background: var(--night); border-color: var(--night); color: #fff; display: flex; flex-direction: column; gap: 6px; }
.box-dark .label, .box-dark .why { color: #b9cbd6; }
.box-dark .big { font: 600 2rem/1.1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.box-dark .btn { margin-top: auto; }
.kinds { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kind { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
a.kind:hover { border-color: var(--accent); color: var(--ink); }
.kind-v { font: 600 1.5rem/1.2 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kind-bar { height: 6px; border-radius: 999px; background: var(--surface-sunk); overflow: hidden; margin: 6px 0 2px; }
.kind-bar i { display: block; height: 100%; background: var(--accent-mark); }

/* ─── каталог ─── */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line);
        border-radius: var(--radius-md); background: var(--paper); overflow: hidden;
        text-decoration: none; color: inherit; transition: border-color .2s var(--ease); }
a.tile:hover { border-color: var(--accent); }
.tile.muted { background: none; }
.tile.muted .tile-art { opacity: .5; }
.tile-art { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 4px; }
.tile-art svg { display: block; width: 100%; height: 88px; }
.tile-art .af  { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.tile-art .af2 { fill: var(--surface-mint); stroke: var(--ink); stroke-width: 1.5; }
.tile-art .al  { fill: none; stroke: var(--accent-mark); stroke-width: 1.5; stroke-linecap: round; }
.tile-body { padding: 18px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.tile h3 { margin: 8px 0 8px; font-size: 1.125rem; }
.tile p { margin: 0 0 18px; font-size: var(--t-small); color: var(--ink-muted);
          display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { font: 500 var(--t-label)/1 var(--sans); padding: 6px 10px;
        border: 1px solid var(--line); border-radius: 999px; color: var(--ink-muted); }
.tile-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between;
             gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.tile-price { font: 600 1rem/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.tile-price small { color: var(--ink-muted); font: 400 .875rem var(--sans); }
.tile-go { font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.state.live { color: var(--accent); }
.state.coming, .state.on_request { color: var(--ink-subtle); }

/* ─── загрузка документов ─── */
.step-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--night); color: #fff;
          display: inline-flex; align-items: center; justify-content: center;
          font: 600 .875rem/1 var(--sans); flex: none; }
.step-h h2 { font-size: 1.2rem; }
.drops { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dz { position: relative; display: flex; flex-direction: column; gap: 6px; margin: 0;
      border: 2px dashed var(--line-strong); border-radius: var(--radius-md);
      background: var(--paper); padding: 22px 22px 20px; cursor: pointer; min-height: 168px;
      transition: border-color .15s var(--ease), background .15s var(--ease); }
.dz:hover, .dz.over { border-color: var(--accent); background: #f4f9f9; }
.dz input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dz-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dz-title { font: 600 1.0625rem/1.3 var(--sans); color: var(--ink); }
.dz-ico { width: 40px; height: 40px; color: var(--accent); flex: none; }
.dz-hint { font-size: var(--t-small); color: var(--ink-muted); }
.dz-act { margin-top: auto; padding-top: 10px; font-weight: 600; color: var(--accent); }
.dz-file { display: none; margin-top: auto; padding: 10px 12px; border-radius: var(--radius-xs);
           background: var(--accent-soft); color: var(--accent); font: 500 .9375rem/1.3 var(--sans);
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz.has-file { border-style: solid; border-color: var(--accent); }
.dz.has-file .dz-file { display: block; }
.dz.has-file .dz-act { display: none; }
.runbar { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 24px;
          padding: 20px 24px; background: var(--paper); border: 1px solid var(--line);
          border-radius: var(--radius-md); }
.runbar .hint { margin: 0; flex: 1; min-width: 220px; }

/* ─── итоги: карточки цифр ─── */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 24px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px; }
.stat-k { font-size: .875rem; color: var(--ink-muted); }
.stat-v { font: 600 1.75rem/1.15 var(--sans); letter-spacing: -.025em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-v small { font-size: 1rem; color: var(--ink-muted); }
.stat-v.crit { color: var(--crit); }
.stat-v.money { color: var(--money); }
.stat.hl { background: var(--accent); border-color: var(--accent); color: #fff; }
.stat.hl .stat-k, .stat.hl .hint { color: #cfe6e8; }
.stat.hl .stat-v.money { color: #fff; }
.totals { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.totals > * { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 20px; }
.total-k { font-size: .875rem; color: var(--ink-muted); }
.total-v { font: 600 1.6rem/1.15 var(--sans); margin-top: 4px; font-variant-numeric: tabular-nums; }
.total-v.crit { color: var(--crit); }
.total-v.money { color: var(--money); }

/* ─── фильтры ─── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filters button, .filters .btn { min-height: 38px; padding: 6px 14px; font-weight: 500; font-size: .875rem;
                                 background: var(--paper); border-radius: 999px; }
.filters button b, .filters .btn b { font-weight: 600; margin-left: 4px; color: var(--ink-muted); }
.filters button[aria-pressed="true"], .filters .btn[aria-current], .filters .btn.btn-primary {
  background: var(--night); border-color: var(--night); color: #fff; }
.filters button[aria-pressed="true"] b, .filters .btn[aria-current] b { color: #fff; }

/* ─── ведомость: строки в карточке ─── */
.ledger { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.row { display: grid; grid-template-columns: 48px 1fr auto; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-no { font: 500 .8125rem/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--ink-subtle);
          padding: 22px 0 0 16px; }
.row-body { padding: 16px 20px 16px 8px; min-width: 0; }
.row-amt { padding: 16px 20px; text-align: right; white-space: nowrap;
           font: 600 1.0625rem/1.5 var(--sans); font-variant-numeric: tabular-nums; }
.row-amt.dim { color: var(--ink-subtle); font-size: var(--t-small); font-weight: 500; }
.row-title { font-size: 1rem; font-weight: 600; line-height: 1.4; }
.row-detail { font-size: var(--t-small); color: var(--ink-muted); margin-top: 4px; }
.row-src { font: .8125rem/1.5 var(--sans); color: var(--ink-subtle); margin-top: 6px; }
.tag { display: inline-flex; align-items: center; font: 500 .75rem/1 var(--sans);
       padding: 5px 10px; border-radius: 999px; margin-bottom: 8px;
       background: var(--surface-sunk); color: var(--ink-muted); }
.tag.crit { color: var(--crit); background: var(--crit-bg); }
.tag.warn { color: var(--warn); background: var(--warn-bg); }
.tag.ok { color: var(--accent); background: var(--accent-soft); }
.row.f-crit { box-shadow: inset 3px 0 0 var(--crit); }
.row.f-warn { box-shadow: inset 3px 0 0 var(--accent-warm); }
.row[hidden] { display: none; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags .tag { margin-bottom: 6px; }
@media (min-width: 1100px) {
  #findings .row-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; }
  #findings .row-body > * { grid-column: 1; }
  #findings .row-body > .verdict { grid-column: 2; grid-row: 1 / span 4; align-self: start; margin-top: 2px; }
}
.verdict { margin-top: 12px; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.verdict button { min-height: 40px; padding: 6px 16px; font-size: .875rem; font-weight: 500; }
.verdict button[aria-pressed="true"] { opacity: 1; cursor: default; background: var(--night);
                                       border-color: var(--night); color: #fff; }

/* ─── таблица задач ─── */
.tbl { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.tr { display: grid; grid-template-columns: 48px minmax(0, 1fr) 150px 130px 150px; align-items: center;
      gap: 0 16px; min-height: 68px; border-bottom: 1px solid var(--line);
      text-decoration: none; color: inherit; }
.tr:last-child { border-bottom: 0; }
a.tr:hover { background: #f4f9f9; }
a.tr:hover .tr-title { color: var(--accent); }
.tr-head { min-height: 44px; font-size: .8125rem; color: var(--ink-muted); background: var(--surface); }
.tr-no { font: 500 .8125rem/1 var(--sans); color: var(--ink-subtle); padding-left: 16px; }
.tr-title { font-weight: 600; font-size: 1rem; }
.tr-sub { font-size: .875rem; color: var(--ink-muted); margin-top: 2px;
          overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-date { font: .875rem/1.4 var(--sans); color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.tr-res { text-align: right; font: 600 1rem/1.3 var(--sans); padding-right: 16px; font-variant-numeric: tabular-nums; }
.tr-res.money { color: var(--money); }
.tr-res small { display: block; font: .8125rem var(--sans); color: var(--ink-muted); }

/* ─── прогресс ─── */
.prog { margin: 0 0 24px; padding: 18px 20px; background: var(--paper);
        border: 1px solid var(--line); border-radius: var(--radius-md); }
.prog-head { display: flex; justify-content: space-between; align-items: baseline;
             font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
.prog-pct { font: 600 1rem var(--sans); color: var(--accent); font-variant-numeric: tabular-nums; }
.prog-track { height: 8px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--accent-mark); border-radius: 999px; transition: width .6s ease; }
.prog-hint { font-size: var(--t-small); color: var(--ink-muted); margin-top: 10px; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.steps span { font-size: .8125rem; padding: 4px 10px; border-radius: 999px;
              background: var(--surface-sunk); color: var(--ink-muted); }
.steps b { font-weight: 600; color: var(--accent); }

/* ─── вкладки: переключатель ─── */
.tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; padding: 4px;
        background: var(--surface-sunk); border-radius: 13px; }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
          text-decoration: none; color: #36536a; font-weight: 500; font-size: .9rem; border-radius: 10px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); background: var(--paper); font-weight: 600;
                        box-shadow: 0 1px 2px rgba(8,43,66,.08); }
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px 32px; align-items: end; }
.usage-k { font-size: var(--t-small); color: var(--ink-muted); }
.usage-v { font: 600 1.5rem/1.2 var(--sans); margin-top: 4px; font-variant-numeric: tabular-nums; }
.usage-v small { font-size: 1rem; color: var(--ink-muted); }
.bar { height: 8px; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--accent-mark); }

/* ─── тарифы ─── */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plan { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
        border-radius: var(--radius-md); padding: 22px; }
.plan.current { border: 2px solid var(--accent); padding: 21px; }
.plan-name { font-weight: 600; font-size: 1.0625rem; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.plan-price { font: 600 1.75rem/1.2 var(--sans); letter-spacing: -.02em; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.plan-price small { font: 400 .9375rem var(--sans); color: var(--ink-muted); }
.plan-lim { font-size: var(--t-small); color: var(--ink-muted); margin-bottom: 14px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 20px; font-size: var(--t-small); }
.plan-features li { padding: 5px 0 5px 26px; position: relative; }
.plan-features li::before, .checks li::before {
  content: ""; position: absolute; left: 2px; top: 10px; width: 12px; height: 7px;
  border-left: 2px solid var(--accent-mark); border-bottom: 2px solid var(--accent-mark); transform: rotate(-45deg); }
.plan-features li.no { color: var(--ink-subtle); }
.plan-features li.no::before { border: 0; height: 2px; background: var(--ink-subtle); top: 14px; transform: none; width: 12px; }
.plan-foot { margin-top: auto; }
.plan-foot .btn, .plan-foot button.btn-primary { width: 100%; }
.offer-accept { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; cursor: pointer;
                font-size: .875rem; font-weight: 400; line-height: 1.4; color: var(--ink-muted); }
.offer-accept input { margin-top: 1px; flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
.btn-link { background: none; border: 0; min-height: 40px; padding: 0; font: inherit; font-size: var(--t-small);
            font-weight: 500; color: var(--accent); cursor: pointer; text-decoration: underline; width: 100%; justify-content: center; }
.btn-link:hover { background: none; color: var(--accent-hover); }
.plan-actions form { margin: 0; }
.plan-actions form + form { margin-top: 4px; }

/* ─── выбор вариантов карточками ─── */
.choices { display: grid; gap: 10px; margin-bottom: 18px; }
.choices.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice { position: relative; margin: 0; display: flex; gap: 12px; align-items: flex-start;
          padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
          background: var(--paper); cursor: pointer; font-weight: 400; }
.choice:hover { border-color: var(--ink-subtle); }
.choice input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.choice b { display: block; font-weight: 600; font-size: .9375rem; }
.choice span { font-size: .875rem; color: var(--ink-muted); }
.choice:has(input:checked) { border-color: var(--accent); background: #f4f9f9; box-shadow: inset 0 0 0 1px var(--accent); }
.code-big { font: 600 2rem/1 var(--mono); letter-spacing: .12em; margin: 8px 0; color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; font-size: 1rem; }

/* ─── люди и входы ─── */
.person { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center;
          padding: 12px 0; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.ava { width: 36px; height: 36px; border-radius: 999px; background: var(--night); color: #fff;
       display: flex; align-items: center; justify-content: center; font-size: .8125rem; font-weight: 600; }
.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 12px; font-size: var(--t-small); }
.kv dt { color: var(--ink-muted); }
.kv dd { margin: 0; }

/* ─── деньги: список и карточка ─── */
.inbox { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-list { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.inbox-item { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-bottom: 1px solid var(--line);
              text-decoration: none; color: var(--ink); }
.inbox-item:last-child { border-bottom: 0; }
.inbox-item:hover { background: #f4f9f9; color: var(--ink); }
.inbox-item[aria-current] { background: #e9f3f4; box-shadow: inset 3px 0 0 var(--accent); }
.inbox-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.inbox-who { font-weight: 600; font-size: .9375rem; min-width: 0; }
.inbox-sum { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inbox-sub { font-size: .8125rem; color: var(--ink-muted); }
.inbox-st { font-size: .8125rem; font-weight: 500; color: var(--warn); }
.inbox-st.ok { color: var(--accent); }
.inbox-st.no { color: var(--ink-subtle); }
.detail { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
          display: flex; flex-direction: column; position: sticky; top: 16px; }
.detail-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }
.detail-amt { font: 600 clamp(2rem, 1.4rem + 2vw, 2.75rem)/1.05 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.detail-who { font: 600 1.25rem/1.3 var(--sans); letter-spacing: -.02em; }
.detail-facts { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 18px; }
.detail-facts div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 11px 0;
                    border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.detail-facts div:last-child { border-bottom: 0; }
.detail-facts dt { color: var(--ink-muted); }
.detail-facts dd { margin: 0; }
.detail-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 28px;
              border-top: 1px solid var(--line); }
.detail-bar .btn-primary { min-width: 180px; }
.detail-bar .hint { margin-left: auto; font-size: .8125rem; }

/* ─── 1С ─── */
.onec-grid { display: grid; gap: 16px; margin: 0 0 32px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.onec-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
             padding: 20px 22px; display: flex; flex-direction: column; min-width: 0; }
.onec-card h3 { margin: 0 0 6px; font: 600 .9375rem/1.3 var(--sans); color: var(--ink-muted); }
.onec-total { font: 600 1.25rem/1.35 var(--sans); margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.onec-lines { font-size: var(--t-small); line-height: 1.5; border-top: 1px solid var(--line); }
.onec-lines div { padding: 8px 0; border-bottom: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onec-cut { margin-top: 12px; font-size: .875rem; color: var(--ink-muted); }
.onec-grid.onec-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }
.onec-rows { font-size: var(--t-small); line-height: 1.4; }
.onec-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.onec-row-main { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.onec-row-main span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.onec-row-main b { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.onec-row-note { font-size: .8125rem; color: var(--crit); margin-top: 2px; font-variant-numeric: tabular-nums; }
.onec-xlsx { margin-top: 12px; align-self: flex-start; }
.onec-meta { font-size: var(--t-small); color: var(--ink-muted); }
.onec-locked { background: transparent; border-style: dashed; border-color: var(--line-strong); }
.onec-price { font: 600 1.1rem/1.3 var(--sans); margin: 0 0 8px; }
.onec-desc { font-size: var(--t-small); line-height: 1.5; color: var(--ink-muted); margin-bottom: 16px; }
.onec-ask { margin-top: auto; width: 100%; }
.onec-contact { margin-top: auto; display: none; }
.onec-contact .onec-ask { margin-top: 10px; }
.onec-hint { font-size: .875rem; color: var(--ink-muted); margin-top: 10px; }
.onec-state { margin: 0; }
.onec-code { max-width: 220px; text-transform: uppercase; letter-spacing: .12em; font-family: var(--mono) !important; }
.onec-err { color: var(--crit); font-size: var(--t-small); margin-top: 10px; display: none; }
.onec-ok { color: var(--accent); font-size: 1rem; font-weight: 600; margin-top: 14px; display: none; }
.hidden { display: none !important; }

/* ─── найденные деньги: карта ─── */
.map-total { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
             padding: 20px 24px; margin-bottom: 24px; }
.map-total-v { font: 600 2.6rem/1.15 var(--sans); letter-spacing: -.03em; color: var(--money); margin: 6px 0;
               font-variant-numeric: tabular-nums; }
.map-bars { display: grid; gap: 10px; margin-bottom: 32px; }
.map-bar { display: grid; grid-template-columns: minmax(150px, 260px) 1fr minmax(120px, auto); align-items: center; gap: 14px; }
.map-bar-k { font-size: var(--t-small); }
.map-bar-track { height: 10px; background: var(--surface-sunk); border-radius: 999px; }
.map-bar-fill { height: 10px; background: var(--accent-mark); border-radius: 999px; }
.map-bar-v { text-align: right; font: 600 1rem/1 var(--sans); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .map-bar { grid-template-columns: 1fr auto; }
  .map-bar-track { grid-column: 1 / -1; grid-row: 2; }
}
.map-group .row-amt { font-size: 1rem; }
.map-bar-fill.is-zero { width: 0; }
.stats-money { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stats-money .stat-v { font-size: 1.5rem; white-space: nowrap; }

/* ─── вход, страница модуля на витрине ─── */
/* вход: слева форма, справа — что внутри кабинета */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-main { display: flex; flex-direction: column; justify-content: center; gap: 28px;
             padding: 40px clamp(24px, 6vw, 88px); max-width: 560px; width: 100%; margin: 0 auto; }
.auth-main .brand { padding: 0; font-size: 1.4rem; }
.auth-card h1 { font-size: 1.75rem; }
.auth-card .why { margin-bottom: 24px; }
.auth-tg { width: 100%; }
.auth-tg svg { width: 20px; height: 20px; }
.auth-hint { font-size: var(--t-small); color: var(--ink-muted); margin: 12px 0 0; }
.auth-hint:empty { display: none; }
.auth-hint .btn-link { display: inline; width: auto; min-height: 0; padding: 0; font-size: inherit; vertical-align: baseline; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px;
           font-size: var(--t-label); color: var(--ink-subtle); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-row { display: flex; gap: 8px; }
.auth-row input { flex: 1; min-width: 0; }
.auth-row button { flex: none; }
.auth-form { display: grid; gap: 0; }
.auth-form .auth-tg { margin-top: 16px; }
.auth-code { font: 500 1.5rem/1 var(--mono) !important; letter-spacing: .4em; text-align: center; }
.auth-note { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line);
             font-size: var(--t-label); line-height: 1.5; color: var(--ink-muted); }
.auth-legal { margin: 0; font-size: var(--t-label); color: var(--ink-subtle); }
.auth-legal a { color: var(--ink-subtle); }
.auth-side { background: var(--night); color: #fff; display: flex; align-items: center;
             padding: 40px clamp(24px, 5vw, 72px); }
.auth-side-in { max-width: 460px; }
.auth-side .label { color: #8fd0d5; }
.auth-side h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); line-height: 1.2; letter-spacing: -.03em;
                margin: 10px 0 28px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--t-small);
                  line-height: 1.5; color: #b9cbd6; }
.auth-points b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.auth-points svg { width: 22px; height: 22px; flex: none; color: #8fd0d5; margin-top: 1px; }
.auth-foot { margin-top: 36px; font-size: var(--t-label); color: #8fa6b4; }
.auth-foot a { color: #b9cbd6; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-main { padding: 28px 20px; justify-content: flex-start; }
  .auth-side { padding: 28px 20px 36px; }
  .auth-side h2 { margin-bottom: 20px; }
  .auth-row { flex-direction: column; }
}
.mod-head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.mod-head h1 { font-size: var(--t-h1); margin: 16px 0 18px; }
.mod-io { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.io-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; }
.io-box h4 { margin: 0 0 12px; font: 600 var(--t-label)/1.3 var(--sans); color: var(--ink-muted); }
.io-box ul { margin: 0; padding-left: 18px; }
.io-box li { font-size: var(--t-small); margin-bottom: 8px; color: var(--ink-muted); }

/* ─── прежние компоненты: пробная проверка без входа, админка ─── */
.slot { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 12px; background: var(--paper); }
.slot.slot-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.slot-name { font-size: var(--t-body); }
.slot-req { font: 500 var(--t-label)/1 var(--sans); color: var(--ink-subtle); }
.slot-hint { font-size: var(--t-small); color: var(--ink-muted); margin-top: 5px; }
.file { display: flex; gap: 12px; align-items: baseline; margin-top: 12px; padding: 10px 12px; background: var(--surface-sunk); border-radius: var(--radius-xs); }
.file.warn { background: var(--warn-bg); color: var(--warn); }
.file-name { font: 500 var(--t-small)/1.4 var(--sans); }
.file-meta { font-size: .8125rem; color: var(--ink-muted); }
.cards { border-top: 1px solid var(--line-strong); }
.card { display: grid; grid-template-columns: 1fr 150px 116px; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }

/* ─── мобильный: меню внизу, с подписями ─── */
.tabbar { display: none; }
@media (max-width: 1100px) {
  .home-top { grid-template-columns: 1fr; }
  .inbox { grid-template-columns: 1fr; }
  .detail { position: static; }
}
@media (max-width: 960px) {
  .main { padding: 24px 24px 80px; }
  .tr { grid-template-columns: 40px minmax(0,1fr) 120px; }
  .tr .tr-date, .tr-head .tr-date { display: none; }
  .tr-head .tr-st { display: none; }
  .tr .tr-st { grid-column: 2; padding-bottom: 12px; }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; z-index: 5; width: auto; height: auto; border-right: 0;
          border-bottom: 1px solid var(--line); padding: 12px 16px; flex-direction: row;
          align-items: center; gap: 12px; }
  .brand { padding: 0; }
  .side-org { margin: 0 0 0 auto; max-width: 55%; }
  .side .nav, .side-bot, .side-foot, .side-legal { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
            background: var(--paper); border-top: 1px solid var(--line); padding: 0 4px env(safe-area-inset-bottom); }
  .tabbar a { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
              gap: 3px; min-height: 58px; color: var(--ink-muted); text-decoration: none; font-size: .6875rem; font-weight: 500; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current] { color: var(--accent); font-weight: 600; }
  .main { padding: 20px 16px 96px; }
  .ph { align-items: flex-start; }
  .ph-actions { width: 100%; }
  .ph-actions > *, .ph-actions form, .ph-actions form button { flex: 1 1 auto; }
  .tiles { grid-template-columns: 1fr; }
  .mod-head { grid-template-columns: 1fr; gap: 26px; }
  .card { grid-template-columns: 1fr; gap: 10px; }
  .row { grid-template-columns: 36px 1fr; }
  .row-no { padding-left: 12px; }
  .row-body { padding: 14px 14px 10px 4px; }
  .row-amt { grid-column: 2; text-align: left; padding: 0 14px 14px 4px; }
  .verdict { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-v { font-size: 1.35rem; }
  .choices.row3 { grid-template-columns: 1fr; }
  .runbar .btn-lg { width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .tr { grid-template-columns: 32px minmax(0,1fr) auto; gap: 0 10px; }
  .tr-head { display: none; }
  .kv, .detail-facts div { grid-template-columns: 1fr; gap: 2px; }
  .detail-body { padding: 20px; }
  .detail-bar { padding: 14px 20px; }
  .detail-bar .btn { flex: 1 1 0; }
  .detail-bar .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.ava svg { width: 18px; height: 18px; }
.btn { white-space: nowrap; }
@media (max-width: 1100px) {
  /* на узком экране открытая находка — сверху, список под ней */
  .inbox .detail { order: -1; }
}
@media (max-width: 860px) {
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .tabs a { flex: none; }
  .detail-bar kbd { display: none; }
  .stat .hint { font-size: .8125rem; }
}
.ph-meta .pill { white-space: normal; }

/* ─── плотность (27.10, после первого просмотра: «всё крупновато») ───
   На компьютере базовый шрифт 14 px вместо 16: все размеры в rem сжимаются
   на восьмую часть, отступы и высоты в px подтянуты вручную. На телефоне —
   15 px и кнопки 44 px: там палец, а не курсор. */
html { font-size: 15px; }
@media (min-width: 861px) {
  html { font-size: 14px; }
  :root { --tap: 38px; }
  .side { width: 216px; padding: 18px 12px; gap: 18px; }
  .nav a { min-height: 36px; gap: 10px; }
  .btn svg, button svg, .nav svg { width: 18px; height: 18px; }
  .main { padding: 26px 36px 80px; }
  .panel, .box { padding: 18px 20px; }
  .stat { padding: 14px 16px; }
  .ph { margin-bottom: 20px; }
  .sec { margin-top: 28px; }
  .btn-lg { min-height: 46px; padding: 10px 22px; }
  .btn-sm { min-height: 32px; padding: 4px 12px; }
}

/* ─── компания: сотрудники, приглашения, объединение (27.10) ─── */
.kv > div { display: contents; }
.invite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
              padding: 10px 0; border-bottom: 1px solid var(--line); }
.invite-row input { font: 400 var(--t-small)/1.2 var(--mono); color: var(--ink-muted); background: var(--surface); }
.invite-meta { grid-column: 1 / -1; font-size: var(--t-label); margin: 0; }
.invite-new { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 12px;
              align-items: end; margin-top: 18px; }
.invite-new label { margin-bottom: 6px; }
.steps-list, .auth-list { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px;
                          font-size: var(--t-small); color: var(--ink); }
.auth-list { color: var(--ink-muted); }
@media (max-width: 860px) {
  .invite-new { grid-template-columns: 1fr; }
  .invite-row { grid-template-columns: minmax(0, 1fr) auto; }
  .invite-row form { grid-column: 2; }
}
