/* ДЖИ ТЕКС — светлый монохромный стиль (решение №100, ui-ux-pro-max).
   Мобильный экран — основной. Без внешних шрифтов и CDN: system-ui,
   бренд — разрядкой, как в логотипе. */

:root {
  --bg: #fafafa;
  --card: #ffffff;
  --ink: #18181b;
  --ink-soft: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #18181b;        /* монохром: главная кнопка — чернильная */
  --accent-ink: #ffffff;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(24, 24, 27, 0.04), 0 8px 24px rgba(24, 24, 27, 0.05);
}

* { box-sizing: border-box; margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
}

/* ---- Бренд: игла между словами, как в фирменном знаке ---- */
.brandmark { display: flex; align-items: center; justify-content: center; gap: 10px; }
.brandmark .word {
  font-size: 26px; font-weight: 300; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--ink);
  /* компенсация разрядки последней буквы */
  margin-right: -0.32em;
}
.brandmark svg { height: 44px; width: auto; flex: none; color: var(--ink); }
.brand-sub {
  text-align: center; color: var(--muted); font-size: 11px;
  letter-spacing: 0.42em; text-transform: uppercase;
  margin-top: 10px; margin-right: -0.42em;
}

header.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
header.bar .brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 400; letter-spacing: 0.22em; text-transform: uppercase; font-size: 14px;
}
header.bar .brand svg { height: 22px; width: auto; color: var(--ink); }
header.bar .brand .section { color: var(--muted); letter-spacing: 0.06em; text-transform: none; }
header.bar button {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 14px; padding: 8px; min-height: 44px;
  transition: color 200ms ease;
}
header.bar button:hover { color: var(--ink); }

.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }

h1 { font-size: 20px; font-weight: 600; margin: 22px 0 10px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.card .title { font-weight: 600; }
.card .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }

form label { display: block; font-size: 13px; color: var(--ink-soft); margin: 14px 0 5px; font-weight: 500; }
input, select {
  width: 100%; padding: 12px 13px; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
input:focus, select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

button.primary {
  width: 100%; margin-top: 20px; padding: 14px; font-size: 16px; font-weight: 600;
  color: var(--accent-ink); background: var(--accent);
  border: none; border-radius: 10px; cursor: pointer; min-height: 48px;
  transition: opacity 200ms ease, transform 150ms ease;
}
button.primary:hover { opacity: 0.88; }
button.primary:active { transform: scale(0.99); }
button.primary:disabled { opacity: 0.55; cursor: default; }
button.primary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

button.ghost {
  padding: 10px 14px; font-size: 14px; color: var(--danger); min-height: 44px;
  background: none; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease;
}
button.ghost:hover { border-color: var(--danger); background: rgba(220, 38, 38, 0.04); }

.error { color: var(--danger); margin-top: 12px; font-size: 14px; min-height: 1.2em; }
.hint { color: var(--muted); font-size: 14px; margin-top: 12px; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }

.progress { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--ink); transition: width 300ms ease; }

.stage-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  text-align: center; font-size: 11px; color: var(--muted); margin-top: 12px;
}
.stage-grid .num { display: block; font-size: 16px; color: var(--ink); }

.badge {
  display: inline-block; font-size: 12px; padding: 3px 10px;
  border-radius: 999px; background: #f4f4f5; color: var(--ink-soft);
  border: 1px solid var(--line); white-space: nowrap;
}

.total { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
table.simple { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
table.simple td { padding: 8px 4px; border-bottom: 1px solid var(--line); }
table.simple tr:last-child td { border-bottom: none; }
table.simple td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.center-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px;
  box-shadow: var(--shadow);
}
.auth-card .brandmark { margin-bottom: 2px; }
.auth-card .tag { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
