/* Фирстиль Авто.ру (skills/autoru-presentation-style), без логотипа.
   Палитра: #E60000 / #1A1E21 / #F2F7FB / #CCFF00; лайм — максимум один элемент. */
:root {
  --red: #E60000;
  --ink: #1A1E21;
  --bg: #FFFFFF;
  --soft: #F2F7FB;
  --lime: #CCFF00;
  --muted: #6A6D6F;
  --line: rgba(26,30,33,.1);
  --line-strong: rgba(26,30,33,.22);
  --ff: 'TT Neoris Pro', 'Inter', 'Helvetica Neue', system-ui, Arial, sans-serif;
  --ff-text: 'TT Neoris Pro', 'Inter', 'Helvetica Neue', system-ui, Arial, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}
/* Фирменный шрифт TT Neoris Pro (с 2026-09-15 вместо YS Geo/YS Text): файлы отдаёт сам сайт из static/fonts,
   CSP default-src 'self' это разрешает; local() первым. */
@font-face { font-family: 'TT Neoris Pro'; src: local('TT Neoris Pro Regular'), local('TTNeorisPro-Rg'), url('fonts/tt-neoris-pro-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'TT Neoris Pro'; src: local('TT Neoris Pro Medium'), local('TTNeorisPro-Md'), url('fonts/tt-neoris-pro-medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'TT Neoris Pro'; src: local('TT Neoris Pro Bold'), local('TTNeorisPro-Bd'), url('fonts/tt-neoris-pro-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--ff-text); line-height: 1.45; letter-spacing: .01em;
  margin: 0; min-height: 100vh;
}
h1, h2 { font-family: var(--ff); font-weight: 500; letter-spacing: -.005em; }
h1 { font-size: 26px; margin: 0 0 16px; }
h2 { font-size: 18px; margin: 0 0 12px; }

.topbar { border-bottom: 1px solid var(--line); background: #fff; }
.topbar-in {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
}
.wordmark { font-family: var(--ff); font-weight: 500; font-size: 19px; }
.wordmark b { color: var(--red); font-weight: 500; }
.freshness { font-family: var(--ff-mono); font-size: 11px; color: var(--muted); }
.topnav { margin-left: auto; display: flex; gap: 16px; align-items: baseline; }
.topnav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); font-size: 14px; }
.inline-form { display: inline; }
.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 14px; border-bottom: 1px solid var(--line);
}

.page { max-width: 1160px; margin: 0 auto; padding: 24px 20px 64px; }

/* --- формы --- */
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=password], select, input[type=file] {
  font: inherit; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; background: #fff; min-width: 160px;
}
input:focus, select:focus, button:focus, summary:focus, a:focus {
  outline: 2px solid var(--red); outline-offset: 1px;
}
.btn {
  font: inherit; font-weight: 500; cursor: pointer;
  background: var(--red); color: #fff; border: none;
  border-radius: 999px; padding: 9px 22px;
}
.btn.secondary { background: var(--soft); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }

.filters-form { margin-bottom: 22px; }
.filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--soft); border-radius: 18px; padding: 14px 16px;
}
.f-city input { min-width: 220px; }

.mselect { position: relative; }
.mselect summary {
  list-style: none; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 8px 14px; background: #fff; font-size: 14px; user-select: none;
}
.mselect summary::-webkit-details-marker { display: none; }
.mselect[open] summary { border-color: var(--ink); }
.mselect-list {
  position: absolute; z-index: 10; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 6px 20px rgba(26,30,33,.12);
  padding: 10px 14px; max-height: 280px; overflow-y: auto; min-width: 240px;
  display: flex; flex-direction: column; gap: 6px;
}
.mselect-list label { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 13.5px; }

/* --- таблица --- */
.result-note { font-size: 13.5px; color: var(--muted); margin: 0 0 10px; }
.result-note a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.result-note a.cur { border-bottom: 2px solid var(--red); font-weight: 500; }
.tbl-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 900px; }
th {
  font-family: var(--ff-mono); text-align: left; font-size: 10.5px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; padding: 8px 12px;
  border-bottom: 2px solid var(--ink); white-space: nowrap;
}
th.num, td.num { text-align: right; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.mark { font-weight: 500; }
td.model { font-weight: 500; }
.spec { color: var(--muted); }
.disc-note { display: block; font-size: 11.5px; color: var(--muted); }
a.cat { color: var(--red); text-decoration: none; border-bottom: 1px solid rgba(230,0,0,.35); font-size: 13px; white-space: nowrap; }

/* --- состояния --- */
.empty { padding: 56px 20px; text-align: center; background: var(--soft); border-radius: 18px; }
.empty .t { font-family: var(--ff); font-weight: 500; font-size: 17px; margin: 0 0 6px; }
.empty .d { font-size: 13.5px; color: var(--muted); margin: 0 auto; max-width: 46ch; }
.error { color: var(--red); font-size: 14px; }
.notice {
  background: var(--soft); border-left: 3px solid var(--red);
  border-radius: 0 12px 12px 0; padding: 8px 14px; font-size: 14px;
}

/* --- логин --- */
.login-box { max-width: 360px; margin: 8vh auto 0; display: flex; flex-direction: column; gap: 6px; }
.login-box form { display: flex; flex-direction: column; gap: 14px; }

/* --- админка --- */
.card { background: var(--soft); border-radius: 18px; padding: 18px 22px; margin-bottom: 18px; }
.card form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pw-form { max-width: 420px; }
.card h3 { font-size: 15px; margin: 18px 0 10px; }
.user-list { gap: 8px; }
.user-list li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.user-list .user-name { font-weight: 500; min-width: 160px; }
.card .user-list form { flex-direction: row; }
.btn.small { padding: 4px 12px; font-size: 12.5px; }
.small-note { font-size: 12.5px; margin: 12px 0 0; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.plain.small { font-size: 12.5px; max-height: 260px; overflow-y: auto; }
.muted { color: var(--muted); }
details summary { cursor: pointer; font-size: 14px; margin: 6px 0; }
