/* Менеджер · AVTOKVARTAL. Тёмная тема та же, что в дашборде закупа —
   чтобы люди не переучивались, переходя между сайтами. */
:root {
  --bg: #0f1420;
  --panel: #171e2e;
  --panel-2: #1e2739;
  --line: #2a3448;
  --text: #e6ebf5;
  --muted: #8b97ad;
  --accent: #4f8cff;
  --green: #35c98a;
  --red: #ff6b6b;
  --amber: #f5b544;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* ---------- вход ---------- */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.login-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; width: 340px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.login-card h1 { margin: 0; font-size: 20px; }
.login-sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-card input, .login-card button {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 15px;
}
.login-card input { background: var(--panel-2); color: var(--text); }
.login-card button {
  background: var(--accent); color: #fff; border: none; cursor: pointer; font-weight: 600;
}
.login-card button:hover { filter: brightness(1.08); }
.login-card button:disabled { opacity: .6; cursor: default; }
.login-error { display: none; color: var(--red); font-size: 13px; margin: 0; text-align: center; }
.login-hint { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }
.login-hint a { color: var(--muted); }

/* ---------- каркас ---------- */
header.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; margin: 0; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .kto { color: var(--muted); font-size: 12px; }
.topbar a.logout { color: var(--muted); text-decoration: none; font-size: 13px; }
.topbar a.logout:hover { color: var(--text); }

.tabs {
  display: flex; gap: 4px; padding: 0 24px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.tab {
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 11px 14px; font-size: 14px; cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

main { padding: 24px; max-width: 1100px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; margin-bottom: 18px;
}
.panel h2 { font-size: 15px; margin: 0 0 14px; }
/* второй заголовок в той же карточке не должен липнуть к предыдущему блоку */
.panel h2 + * + h2, .shapka + h2 { margin-top: 20px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- ввод накладной ---------- */
.poisk { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.poisk .polya { display: flex; flex-direction: column; gap: 8px; flex: 1 1 320px; }
.poisk input {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 11px 13px; font-size: 15px; width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.poisk input:focus { outline: none; border-color: var(--accent); }
.poisk button.osnovnaya {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 11px 22px; font-size: 15px; font-weight: 600; cursor: pointer;
}
.poisk button.osnovnaya:hover { filter: brightness(1.08); }
.poisk button.osnovnaya:disabled { opacity: .55; cursor: default; }
.podskazka { color: var(--muted); font-size: 12px; margin: 12px 0 0; line-height: 1.6; }
.knopka-tihaya {
  background: none; border: none; color: var(--accent);
  font-size: 12px; cursor: pointer; padding: 0; text-align: left; align-self: flex-start;
}
.knopka-tihaya:hover { text-decoration: underline; }

/* ---------- кнопки талонов ---------- */
.talony { display: flex; gap: 10px; flex-wrap: wrap; }
.talony button.osnovnaya {
  background: var(--accent); color: #fff; border: none; border-radius: 8px;
  padding: 11px 20px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.talony button.osnovnaya:hover { filter: brightness(1.08); }
.talony button.osnovnaya:disabled { opacity: .55; cursor: default; }

/* ---------- вердикт: главное на странице ---------- */
.verdikt {
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px;
  display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.5;
}
.verdikt .znak { font-size: 22px; line-height: 1; }
.verdikt.da { background: rgba(53,201,138,.12); border: 1px solid rgba(53,201,138,.45); }
.verdikt.net { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.45); }
.verdikt b { display: block; margin-bottom: 4px; }
.verdikt .prichina { color: var(--muted); font-size: 13px; }

.oshibka {
  background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.45);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; font-size: 14px;
}

/* ---------- шапка накладной ---------- */
.shapka { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 16px; }
.shapka > div { display: flex; flex-direction: column; gap: 3px; }
.shapka .podpis { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.shapka .znachenie { font-size: 15px; }

/* ---------- позиции ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
td.chislo, th.chislo { text-align: right; white-space: nowrap; }
tr.negarant td { color: var(--muted); }
.metka {
  display: inline-block; border-radius: 5px; padding: 2px 7px;
  font-size: 11px; white-space: nowrap;
}
.metka.garantiya { background: rgba(79,140,255,.18); color: #9dbcff; }
.metka.sputnik { background: rgba(53,201,138,.16); color: #7fdcb4; }

/* ---------- спутники ---------- */
.trebovaniya { list-style: none; padding: 0; margin: 0; }
.trebovaniya li {
  display: flex; gap: 9px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.trebovaniya li:last-child { border-bottom: none; }
.trebovaniya .est { color: var(--green); }
.trebovaniya .net { color: var(--red); }

@media (max-width: 640px) {
  main { padding: 14px; }
  .tabs { padding: 0 14px; }
  header.topbar { padding: 12px 14px; gap: 12px; }
  .shapka { gap: 16px; }
}
