/* СТАК-Транспорт — фирменное оформление.
   Подключается последним. Палитра программы сохранена (бирюзовый акцент #176b75,
   тёмно-синяя панель навигации, светлый фон, оранжевый/зелёный/красный в показателях).
   Изменены только шрифты, ритм типографики, логотип и мелкая отделка элементов. */

:root {
  --font-ui: "Golos Text", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-num: "IBM Plex Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  --brand: #176b75;
  --brand-dark: #11545d;
  --brand-light: #62d6cf;
  --radius: 10px;
}

/* ---------- Типографика ---------- */
body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, .card .num, .summary-kpis b { letter-spacing: -0.012em; }
h1, h2, h3, h4 { font-weight: 650; }
.muted, .lbl, label.f, .userbox { letter-spacing: 0; }
input, select, textarea, button { font-family: inherit; }

/* Цифры — моноширинные по ширине знака: колонки в таблицах не «пляшут» */
table.grid, .summary-table, .card .num, .summary-kpis b, .kv dd,
.route-stop-coords, .schedule-preview-departures span, .badge,
input[type="number"], input[type="date"], input[type="time"] { font-variant-numeric: tabular-nums; }

/* ---------- Логотип и боковая панель ---------- */
aside .brand {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 6px 16px 14px; font-size: 15.5px; font-weight: 650; letter-spacing: -0.015em;
}
aside .brand .brand-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; margin-top: 1px; }
aside .brand .brand-text { display: block; min-width: 0; line-height: 1.25; }
aside .brand small { margin-top: 3px; font-size: 10.5px; line-height: 1.35; color: #8aa4bd; letter-spacing: 0.005em; }
aside .grp { font-size: 10px; letter-spacing: 0.08em; font-weight: 600; }
aside a { font-size: 13px; transition: background .12s ease, color .12s ease; }
aside a.active { font-weight: 600; }
aside::-webkit-scrollbar { width: 9px; }
aside::-webkit-scrollbar-thumb { background: #2a4453; border-radius: 9px; }
aside::-webkit-scrollbar-track { background: transparent; }
.nav-search input { border-radius: 8px; }

/* ---------- Верхняя панель ---------- */
.topbar { box-shadow: 0 1px 0 var(--line), 0 4px 14px #0f2a3a08; }
.topbar h2 { font-weight: 650; letter-spacing: -0.015em; }
.userbox a { font-weight: 600; text-decoration: none; }
.userbox a:hover { text-decoration: underline; }

/* ---------- Карточки показателей ---------- */
.card { border-radius: var(--radius); transition: box-shadow .14s ease, border-color .14s ease; }
.card:hover { border-color: #c6d4e2; box-shadow: 0 4px 16px #0f2a3a12; }
.card .num { font-weight: 700; letter-spacing: -0.02em; }
.card .lbl { font-size: 11.5px; line-height: 1.35; }
.panel { border-radius: var(--radius); }
.panel h3 { font-weight: 650; }

/* ---------- Кнопки, поля, вкладки ---------- */
.btn { border-radius: 8px; font-weight: 600; letter-spacing: 0.005em; transition: background .12s ease, box-shadow .12s ease; }
.btn:not(.sec):not(.ghost):not(.danger) { box-shadow: 0 1px 2px #11545d33; }
.btn.ghost { font-weight: 600; }
input, select, textarea { border-radius: 8px; transition: border-color .12s ease, box-shadow .12s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px #176b7526; }
label.f { font-weight: 500; }
.tabs button, .route-tab, .vehicle-tab { font-weight: 500; }
.tabs button.on, .route-tab.on, .vehicle-tab.on { font-weight: 650; }
.badge { font-weight: 650; letter-spacing: 0.005em; }

/* ---------- Таблицы ---------- */
table.grid th, .summary-table th { font-weight: 650; letter-spacing: 0.005em; }
table.grid tr:hover td { background: #f1f8f9; }
.tbl-wrap { border-radius: var(--radius); }

/* ---------- Экран входа ---------- */
#login-screen::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 18% 78%, #ffffff10 0 22%, transparent 22.5%),
    repeating-linear-gradient(115deg, #ffffff0a 0 2px, transparent 2px 34px);
}
.login-box { position: relative; border-radius: 14px; box-shadow: 0 26px 70px #06202b66; }
.login-brand { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.login-brand img { width: 52px; height: 52px; border-radius: 13px; flex: 0 0 auto; margin-top: 2px; }
.login-brand h1 { margin: 0; font-size: 23px; font-weight: 700; letter-spacing: -0.02em; color: #12313a; }
.login-brand p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.login-box .sub { font-size: 12px; line-height: 1.6; color: var(--muted); border-top: 1px solid var(--line); padding-top: 11px; }
.login-box .sub b { color: var(--brand-dark); }
.login-box .btn { font-size: 14px; letter-spacing: 0.01em; }

/* ---------- Печать ---------- */
@media print {
  body { font-family: var(--font-ui); }
  #login-screen::before { display: none; }
}
