/* Оформление — то же, что у Broker OS (broker-pipeline/public/styles.css): токены,
   шапка, экран «Работа» в три колонки, чипы, таблицы, канбан. Взято подмножество. */
:root {
  /* Все цвета — из tokens.css (фирменный стиль Idigov). Здесь только привязка имён. */
  --bg: var(--idg-bg); --surface: var(--idg-surface); --surface-2: var(--idg-surface-2); --surface-3: var(--idg-surface-3);
  --ink: var(--idg-text); --ink-2: var(--idg-text-2); --ink-3: var(--idg-text-3); --line: var(--idg-line); --line-2: var(--idg-line-2);
  color-scheme: light dark;
  --accent: var(--idg-primary); --accent-soft: var(--idg-primary-soft); --accent-ink: var(--idg-primary-ink);
  --hot: var(--idg-danger); --hot-soft: var(--idg-danger-soft); --hot-ink: var(--idg-danger-ink);
  --warn: var(--idg-warn); --warn-soft: var(--idg-warn-soft); --warn-ink: var(--idg-warn-ink);
  --ok: var(--idg-ok); --ok-soft: var(--idg-ok-soft); --ok-ink: var(--idg-ok-ink);
  --info: var(--idg-info); --info-soft: var(--idg-info-soft); --info-ink: var(--idg-info-ink);
  --shadow: var(--idg-shadow); --radius: var(--idg-radius-l); --radius-s: var(--idg-radius-s);
  --font: var(--idg-font); --mono: var(--idg-mono);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 18px; } h2 { font-size: 15px; }
h3 { color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12px; } .xs { font-size: 11px; }
.num, .mono { font-variant-numeric: tabular-nums; } .mono { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Шапка ── */
.topbar { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; height: 48px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.brand .logo { width: 22px; height: 22px; border-radius: 6px; display: block; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 10px; border-radius: var(--radius-s); color: var(--ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.nbadge:empty { display: none; }
.nbadge { font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav a.active .nbadge { background: var(--accent); color: #fff; }
.status { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.status .who { color: var(--ink); font-weight: 500; }
.status .out { color: var(--ink-3); cursor: pointer; }
.status .out:hover { color: var(--ink); }
.lang { background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); cursor: pointer; }
.lang:hover { color: var(--ink); border-color: var(--line-2); }
@media (max-width: 860px) { .topbar .brand span { display: none; } }
@media (max-width: 640px) {
  .topbar { grid-template-columns: minmax(0, 1fr); height: auto; row-gap: 4px; padding: 6px 10px; }
  .topbar .brand { display: none; }
  .status { justify-content: flex-end; }
}

/* ── Общее ── */
.page { padding: 18px 20px 40px; max-width: 1400px; margin: 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 2px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.panel-b { padding: 12px 14px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.btn { border-radius: var(--idg-btn-radius); display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--idg-btn-border); color: var(--idg-on-primary); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.lg { height: 36px; padding: 0 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; background: var(--surface-2); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: 0 0 auto; border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; cursor: pointer; color: var(--ink-2); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button .n { font-size: 11px; color: var(--ink-3); }
.seg button.active .n { color: var(--accent-ink); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok-ink); } .chip.info { background: var(--info-soft); color: var(--info-ink); }
.chip.accent { background: var(--accent-soft); color: var(--accent-ink); } .chip.hot { background: var(--hot-soft); color: var(--hot-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
input.in, select.in, textarea.in { height: 30px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--surface); outline: none; }
textarea.in { height: auto; padding: 8px 9px; min-height: 64px; resize: vertical; width: 100%; }
input.in:focus, select.in:focus, textarea.in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label.lbl { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; display: block; margin-bottom: 4px; }
.empty { padding: 36px 20px; text-align: center; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin-bottom: 6px; font-size: 14px; }
.loading { padding: 30px; color: var(--ink-3); text-align: center; }
.errbox { padding: 12px 14px; border: 1px solid var(--hot); background: var(--hot-soft); border-radius: var(--radius); color: var(--hot-ink); }
.err { color: var(--hot-ink); font-size: 12px; min-height: 1.2em; }
.infobox { padding: 10px 12px; border-radius: var(--radius-s); background: var(--info-soft); color: var(--info-ink); font-size: 12px; }

/* ── Таблицы ── */
.tbl-wrap { overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 70vh; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tbl th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 8px 10px; font-weight: 600; font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 18px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters .in { min-width: 160px; }
.filters input.in { flex: 1 1 220px; }

/* ── Экран «Обзвон» = «Работа» ── */
.work { display: grid; grid-template-columns: 236px clamp(340px, 32vw, 560px) minmax(420px, 1fr); height: calc(100vh - 48px); }
@media (max-width: 1240px) { .work { grid-template-columns: 210px minmax(320px, 1fr) 420px; } }
@media (max-width: 1050px) { .work { grid-template-columns: minmax(0, 1fr) 400px; } .work .scope { display: none; } .scope-select { display: block !important; } }
.scope-select { display: none; width: 100%; }
.qrow > * { min-width: 0; }
.work > * { min-height: 0; }
.scope { border-right: 1px solid var(--line); background: var(--surface); overflow: auto; padding: 12px 10px; }
.scope .today { padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.scope .today .big { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.scope .today .ln { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); padding: 2px 0; }
.scope .today .ln b { color: var(--ink); font-weight: 600; }
.scope .area { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 12px; margin-top: 2px; }
.scope .area:hover { background: var(--surface-2); }
.scope .area.active { background: var(--accent-soft); color: var(--accent-ink); }
.scope .cnt { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }
.scope .cnt b { color: var(--accent-ink); font-weight: 600; }
.queue { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.queue .qhead { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.queue .qhead input.in { width: 100%; }
.queue .qlist { overflow: auto; padding: 8px 10px 40px; }
.qrow { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; padding: 9px 12px 9px 14px; margin-bottom: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .1s; }
.qrow::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 0 2px 2px 0; background: var(--line-2); }
.qrow.t-high::before { background: var(--hot); } .qrow.t-medium::before { background: var(--warn); }
.qrow:hover { border-color: var(--line-2); }
.qrow.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.qrow .nm { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .rt { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.qrow .pr, .qrow .why, .qrow .fx { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); }
.qrow .fx { color: var(--ink-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .why { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qmore { display: flex; justify-content: center; padding: 8px 0; }
.card-pane { border-left: 1px solid var(--line); background: var(--surface); overflow: auto; }
.card-back { display: none; }
@media (max-width: 800px) {
  .work { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100vh - 48px); }
  .queue { overflow: visible; } .queue .qlist { overflow: visible; }
  .card-pane { position: fixed; inset: 0; z-index: 40; }
  .card-pane.hidden { display: none; }
  .card-back { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 2; padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
}
.card { padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 12px; }
.card .who h1 { font-size: 17px; }
.card .who .ph { font-family: var(--mono); font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.card section { border-top: 1px solid var(--line); padding-top: 10px; }
.card section h3 { margin-bottom: 8px; }
.why-now { background: var(--surface-2); border-radius: var(--radius); padding: 8px 12px; }
.why-now ul { margin: 0; padding-left: 18px; }
.why-now li { margin: 2px 0; }
.outcomes { display: flex; flex-wrap: wrap; gap: 6px; }
.tl .ev { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 12px; }
.tl .ev:first-child { border-top: 0; }
.tl .ev .t { color: var(--ink-3); white-space: nowrap; }
.empty-card { padding: 60px 24px; text-align: center; color: var(--ink-2); }
.empty-card h2 { color: var(--ink); margin-bottom: 6px; font-size: 14px; }

/* ── Канбан лидов ── */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 380px); justify-content: start; gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border-radius: var(--radius); padding: 8px; min-height: 200px; }
.kcol h3 { display: flex; justify-content: space-between; padding: 2px 4px 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 12.5px; }
.kcard .n { font-weight: 600; } .kcard .m { color: var(--ink-2); font-size: 12px; }
.kcard .f { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--ink-3); flex-wrap: wrap; }

/* ── Объекты ── */
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.mcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.mcard .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mcard .t b { font-size: 14px; }
.mcard .psf { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.mcard pre { white-space: pre-wrap; font: inherit; font-size: 12px; color: var(--ink-2); margin: 6px 0 0; }
.mcard details summary { cursor: pointer; color: var(--ink-2); font-size: 12px; }
.lastline { font-size: 11.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; }

/* ── Действия в карточке ── */
.actbox { display: flex; flex-direction: column; gap: 6px; }
.actbox .tl { margin-top: 4px; }

/* ── Вход ── */
.login { max-width: 360px; margin: 12vh auto; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.login .head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.login .head .brand { color: var(--ink); font-size: 15px; }
.login label.lbl { margin-top: 12px; }
.login input.in { width: 100%; height: 36px; }
.login .btn { width: 100%; margin-top: 16px; height: 36px; }
@media (max-width: 420px) { .login { margin: 6vh 12px; } }

/* ── Итог звонка — как в Broker OS (card.js → renderOutcomes) ── */
.outcomes { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 8px 16px 10px; margin: 0 -16px -30px; display: flex; flex-direction: column; gap: 6px; }
.outcomes .ohead { display: flex; align-items: baseline; gap: 8px; }
.ogrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ogroup > summary { list-style: none; cursor: pointer; padding: 6px 4px; font-weight: 600; font-size: 12px; color: var(--ink-2); border-radius: 6px; }
.ogroup > summary::-webkit-details-marker { display: none; }
.ogroup > summary::before { content: '▸'; display: inline-block; width: 12px; font-size: 10px; color: var(--ink-3); }
.ogroup[open] > summary::before { content: '▾'; }
.ogroup > summary:hover { background: var(--surface-2); }
.ogrid-sub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 2px 0 4px; }
.obtn { height: 38px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0 6px; text-align: center; line-height: 1.15; }
.obtn:hover { background: var(--surface-2); }
.obtn.freq { background: var(--surface-2); }
.obtn small { font-weight: 400; color: var(--ink-3); font-size: 10px; }
.obtn.sell { border-color: var(--ok); color: var(--ok-ink); } .obtn.sell:hover { background: var(--ok-soft); }
.obtn.later { border-color: var(--info); color: var(--info-ink); } .obtn.later:hover { background: var(--info-soft); }
.obtn.no { color: var(--ink-2); }
.obtn.bad { color: var(--hot-ink); } .obtn.bad:hover { background: var(--hot-soft); }
.obtn.active { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.obtn.sm { height: 28px; flex-direction: row; }
.ofollow { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--surface-2); border-radius: 8px; }
.ofollow .orow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ofollow .orow.end { justify-content: flex-end; }
.ofollow .lbl { margin: 0; }
.ofollow .chips { display: flex; gap: 4px; flex-wrap: wrap; }
.ofollow .in.w150 { width: 150px; } .ofollow .in.w110 { width: 110px; } .ofollow .in.w200 { width: 200px; }
.ofollow .in.grow { flex: 1 1 200px; }
.btn.danger { color: var(--hot-ink); border-color: var(--hot); }
.btn.ghost { border-color: transparent; background: transparent; }
kbd { font: 10px/1 var(--mono); padding: 2px 4px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 4px; color: var(--ink-3); background: var(--surface-2); }
.scope .today .out-today { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.scope .today .out-today .oc { display: flex; gap: 4px; align-items: baseline; font-size: 11px; color: var(--ink-2); }
.scope .today .out-today .oc b { color: var(--ink); font-weight: 600; font-size: 12px; }
.qrow .due { font-size: 11px; color: var(--ink-3); } .qrow .due.over { color: var(--hot-ink); font-weight: 600; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: var(--bg); border-radius: 8px; padding: 9px 12px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-size: 12.5px; max-width: 420px; }
.toast.err { background: var(--hot); color: #fff; }
.toast .btn { height: 26px; background: transparent; color: inherit; border-color: currentColor; }
@media (max-width: 640px) { .ogrid, .ogrid-sub { grid-template-columns: repeat(2, minmax(0, 1fr)); } .toasts { left: 12px; right: 12px; } }

/* ── Вход: генплан посёлка слева, форма справа ── */
.auth {
  --paper: var(--idg-plan-bg); --ink: var(--idg-plan-text); --ink-soft: var(--idg-plan-muted); --line: var(--idg-plan-line);
  --plot: var(--idg-plan-plot); --plot-line: var(--idg-plan-plot-line); --sand: var(--idg-accent); --indigo: var(--idg-primary);
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
  background: var(--paper); color: var(--ink);
}
.auth-plan { position: relative; overflow: hidden; border-right: 1px solid var(--line); }
.auth-plan .plan { position: absolute; inset: 0; width: 100%; height: 100%; }
.plan .road { fill: none; stroke: var(--line); stroke-width: 20; opacity: .7; }
.plan rect.plot { fill: var(--plot); stroke: var(--plot-line); stroke-width: 1.2; }
.plan .pno { font: 600 10px/1 var(--font); fill: var(--ink-soft); text-anchor: middle; opacity: .55; letter-spacing: .02em; }
.plan .next rect.plot { fill: var(--sand); stroke: var(--sand); }
.plan .next .pno { fill: var(--ink); opacity: 1; }
.plan-note { position: absolute; left: 32px; bottom: 28px; margin: 0; max-width: 28ch; font-size: 15px; line-height: 1.4; color: var(--ink-soft); }
.plan-note::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--sand); margin-right: 10px; vertical-align: 0; }

.auth-side { display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 48px clamp(28px, 5vw, 72px); }
.auth-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.auth-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.auth-mark .logo { width: 28px; height: 28px; border-radius: 7px; }
.auth .lang { color: var(--ink-soft); border-color: var(--line); background: transparent; }
.auth-title { font-size: clamp(40px, 4.6vw, 60px); line-height: 1; letter-spacing: -.035em; margin: 0 0 28px; }
.auth-title em { font-style: italic; font-weight: 300; letter-spacing: -.03em; }
.auth-title strong { font-weight: 800; }
.auth-form { display: flex; flex-direction: column; max-width: 360px; }
.auth-lead { font-size: 17px; line-height: 1.45; margin: 0 0 22px; color: var(--ink); }
.auth .muted { color: var(--ink-soft); }
.f-lbl { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin: 14px 0 6px; }
.auth .in { height: 46px; font-size: 16px; background: transparent; color: var(--ink); border: 1.5px solid var(--plot-line); border-radius: var(--idg-radius-m); padding: 0 14px; }
.auth .in:focus { border-color: var(--idg-input-focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--idg-input-focus) 25%, transparent); outline: none; }
.auth-go { height: 48px; margin-top: 24px; font-size: 15px; font-weight: 600; border-radius: var(--idg-btn-radius); background: var(--idg-btn-bg); border: 1px solid var(--idg-btn-border); color: var(--idg-btn-text); }
.auth-go:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.auth .err { margin: 12px 0 0; min-height: 1.4em; font-size: 14px; }
.auth-foot { margin: 48px 0 0; max-width: 34ch; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: 170px auto; }
  .auth-plan { border-right: 0; border-bottom: 1px solid var(--line); }
  .plan-note { left: 12px; bottom: 10px; font-size: 13px; background: var(--paper); padding: 4px 10px 4px 8px; border-radius: 6px; max-width: none; }
  .auth-side { padding: 28px 16px 40px; justify-content: flex-start; }
  .auth-top { margin-bottom: 28px; }
  .auth-title { font-size: 40px; margin-bottom: 20px; }
  .auth-form { max-width: none; }
  .auth-foot { margin-top: 32px; }
}
@media (prefers-reduced-motion: no-preference) {
  .plan .next rect.plot { animation: nextcall 2.4s ease-in-out 1 .4s both; }
  @keyframes nextcall { 0% { fill: var(--plot); stroke: var(--plot-line); } 100% { fill: var(--sand); stroke: var(--sand); } }
}

/* Зерно поверх генплана — плёночная фактура, как фоны idigov.com */
.auth-plan .grain { position: absolute; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@media (prefers-color-scheme: dark) { .auth-plan .grain { mix-blend-mode: screen; opacity: .16;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); } }
.plan .next .pno { fill: var(--idg-on-accent); }

.auth-tools { display: inline-flex; gap: 8px; align-items: center; }
.idg-theme { background: transparent; border: 1px solid var(--line); border-radius: var(--idg-radius-pill); padding: 2px 9px; font: 600 11px var(--idg-font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.auth .idg-theme { color: var(--ink-soft); border-color: var(--line); }
.idg-theme:hover { color: var(--ink); }
