/* Панель Дозора. Цвета — набор Зентума (Zentum.ru/tools/brand/zentum-tokens.css), шрифт Onest — со своего сервера.
   Фирменный оранжевый в статусы не берём. Только этот файл: встроенные стили запрещены политикой CSP. */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --zt-navy: #1C3D6E;
  --zt-navy-hover: #15305A;
  --zt-text: #14202E;
  --zt-text-2: #3A4757;
  --zt-caption: #56657A;
  --zt-bg: #FFFFFF;
  --zt-band: #F4F6F8;
  --zt-line: #DCE1E7;
  --zt-line-2: #E6E9ED;
  --zt-ok: #1F6B3A;
  --zt-warn: #8A5A00;
  --zt-danger: #B42318;
  --zt-info: #1D5FA8;
  --zt-p4: #6B7785;
  --zt-font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --zt-font-mono: ui-monospace, Consolas, monospace;
  --zt-radius: 8px;
  --zt-radius-lg: 12px;
  --zt-shadow: 0 1px 2px rgba(20, 32, 46, .06), 0 4px 16px rgba(20, 32, 46, .06);
  --header-bg: #1C3D6E;
  --header-text: #FFFFFF;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --zt-text: #E8EDF3; --zt-text-2: #C3CCD7; --zt-caption: #93A1B3;
    --zt-bg: #0F1722; --zt-band: #162130; --zt-line: #263447; --zt-line-2: #1E2A3A;
    --zt-navy: #8DB2E8; --zt-navy-hover: #A9C6F0;
    --zt-ok: #5BC37F; --zt-warn: #E0B04F; --zt-danger: #FF7A6E; --zt-info: #7DB5F0; --zt-p4: #9AA6B4;
    --header-bg: #162130;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--zt-font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--zt-text);
  background: var(--zt-band);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--zt-navy); }
a:hover { color: var(--zt-navy-hover); }
code { font-family: var(--zt-font-mono); font-size: .9em; background: var(--zt-line-2); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 16px; letter-spacing: -.01em; }

/* шапка */
.top {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 10px 24px; background: var(--header-bg); color: var(--header-text);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--header-text); text-decoration: none; font-weight: 800; font-size: 19px; }
.brand:hover { color: var(--header-text); }
.brand svg { width: 22px; height: 22px; }
.top nav { display: flex; gap: 4px; flex: 1; }
.top nav a { color: var(--header-text); text-decoration: none; padding: 6px 12px; border-radius: var(--zt-radius); opacity: .85; }
.top nav a:hover { opacity: 1; background: rgba(255, 255, 255, .1); }
.top nav a[aria-current="page"] { opacity: 1; background: rgba(255, 255, 255, .16); }
.logout { display: flex; align-items: center; gap: 12px; margin: 0; }
.who { font-size: 13px; opacity: .85; }
.btn-link { background: none; border: 1px solid rgba(255, 255, 255, .4); color: var(--header-text); font: inherit; font-size: 13px; padding: 4px 12px; border-radius: var(--zt-radius); cursor: pointer; }
.btn-link:hover { background: rgba(255, 255, 255, .1); }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; }
footer { text-align: center; font-size: 12px; color: var(--zt-caption); padding: 16px; }
.crumbs { font-size: 13px; color: var(--zt-caption); margin-bottom: 4px; }

/* карточки и таблицы */
.list {
  width: 100%; border-collapse: collapse; background: var(--zt-bg);
  border-radius: var(--zt-radius-lg); box-shadow: var(--zt-shadow); overflow: hidden;
}
.list th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--zt-caption); padding: 10px 14px; border-bottom: 1px solid var(--zt-line); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--zt-line-2); vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.list td.act { text-align: right; white-space: nowrap; }
.list td.mono { font-family: var(--zt-font-mono); font-size: 12px; overflow-wrap: anywhere; }
.list .row-revoked td { color: var(--zt-caption); }
.cap { font-size: 12px; color: var(--zt-caption); }
.empty { background: var(--zt-bg); border-radius: var(--zt-radius-lg); box-shadow: var(--zt-shadow); padding: 24px; color: var(--zt-text-2); }
.updated { font-size: 12px; color: var(--zt-caption); margin-top: 10px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* состояния ПК */
.badge, .chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.chip { font-weight: 500; margin: 0 4px 4px 0; }
.s-online { color: var(--zt-ok); }
.s-shutdown { color: var(--zt-p4); }
.s-stopped { color: var(--zt-warn); }
.s-lost { color: var(--zt-danger); }
.s-never { color: var(--zt-info); }
.s-revoked { color: var(--zt-p4); text-decoration: line-through; }
.badge.s-lost { background: var(--zt-danger); color: #fff; border-color: var(--zt-danger); }

/* кнопки и формы */
.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  padding: 8px 18px; border-radius: var(--zt-radius); border: 1px solid var(--zt-navy);
  background: var(--zt-navy); color: #fff;
}
.btn:hover { background: var(--zt-navy-hover); border-color: var(--zt-navy-hover); }
.btn-danger { background: transparent; color: var(--zt-danger); border-color: var(--zt-danger); padding: 4px 12px; font-size: 13px; }
.btn-danger:hover { background: var(--zt-danger); color: #fff; border-color: var(--zt-danger); }
.htmx-request .btn, .btn.htmx-request { opacity: .6; cursor: progress; }
form { margin: 0; }

.login { max-width: 380px; margin: 48px auto; background: var(--zt-bg); border-radius: var(--zt-radius-lg); box-shadow: var(--zt-shadow); padding: 28px; }
.login h1 { font-size: 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--zt-text-2); }
.stack input {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--zt-text); background: var(--zt-bg);
  padding: 9px 12px; border: 1px solid var(--zt-line); border-radius: var(--zt-radius);
}
.stack input:focus { outline: 2px solid var(--zt-navy); outline-offset: -1px; border-color: var(--zt-navy); }
.stack .btn { margin-top: 6px; padding: 10px; }
.alert { background: color-mix(in srgb, var(--zt-danger) 10%, var(--zt-bg)); color: var(--zt-danger); border: 1px solid color-mix(in srgb, var(--zt-danger) 35%, transparent); border-radius: var(--zt-radius); padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.hint { font-size: 12px; color: var(--zt-caption); margin: 18px 0 0; }

/* телефон: таблица превращается в карточки */
@media (max-width: 720px) {
  .top { padding: 10px 14px; gap: 10px; }
  .who { display: none; }
  main { padding: 14px; }
  h1 { font-size: 20px; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list { background: none; box-shadow: none; }
  .list thead { display: none; }
  .list tr { background: var(--zt-bg); border-radius: var(--zt-radius-lg); box-shadow: var(--zt-shadow); margin-bottom: 10px; padding: 6px 0; }
  .list td { border: 0; padding: 4px 14px; }
  .list td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--zt-caption); }
  .list td.act { text-align: left; padding-top: 8px; padding-bottom: 8px; }
  .login { margin: 16px auto; padding: 20px; }
}
