:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7385; --line: #e3e6ec;
  --accent: #1f6feb; --accent-bg: #e8eefc; --ok: #1f8a4c; --ok-bg: #e5f5ec;
  --warn: #b26a00; --warn-bg: #fdf1dc; --bad: #c0392b; --bad-bg: #fbe7e5;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px; background: var(--card);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.brand { font-weight: 700; font-size: 18px; color: var(--text); display: flex; align-items: center; gap: 10px;
  white-space: nowrap; flex-shrink: 0; }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand:hover { text-decoration: none; }
.brand span { font-weight: 400; color: var(--muted); }
.top nav { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; }
.top nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); }
.top nav a.on { background: var(--accent-bg); color: var(--accent); }
.top nav a:hover { text-decoration: none; color: var(--text); }

main { max-width: 1200px; margin: 0 auto; padding: 24px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 28px 0 10px; }
.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.sub { color: var(--muted); margin-bottom: 20px; }
.muted { color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: 13px; color: var(--muted); background: #fafbfc; }
tr:last-child td { border-bottom: none; }
tr.link { cursor: pointer; }
tr.link:hover td { background: #f3f6fd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600;
  background: var(--line); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.live { background: var(--accent-bg); color: var(--accent); }

.cards { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  display: block; color: var(--text); }
a.card:hover { text-decoration: none; border-color: var(--accent); }
.card .head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.card .title { font-weight: 600; }
.card .time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card .preview { color: var(--muted); margin-top: 6px; font-size: 14px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.panel h3 { margin: 0 0 8px; font-size: 15px; }
.transcript { white-space: pre-wrap; font-size: 14px; max-height: 60vh; overflow: auto; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
audio { width: 100%; margin: 8px 0 0; }
.empty { padding: 32px; text-align: center; color: var(--muted); background: var(--card);
  border: 1px dashed var(--line); border-radius: 10px; }
pre.events { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px;
  font-size: 12px; overflow: auto; max-height: 50vh; }

.app-release { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
@media (max-width: 800px) { .app-release { grid-template-columns: 1fr; } }
.qr { text-align: center; font-size: 13px; word-break: break-all; }
.qr svg { width: 220px; height: 220px; display: block; margin: 0 auto 8px; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-weight: 600; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
code { background: #eef0f4; padding: 1px 6px; border-radius: 4px; font-size: 13px; }

.search { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; margin-bottom: 12px; background: var(--card); }
td.code { font-variant-numeric: tabular-nums; color: var(--muted); width: 60px; }
tr.inactive td { opacity: .55; }

/* вход */
body.auth { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.auth-box { width: 100%; max-width: 400px; padding: 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; margin-bottom: 20px; }
.auth-brand img { width: 36px; height: 36px; border-radius: 8px; }
.auth-step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.auth-step h1 { margin-bottom: 16px; }
.auth-step label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.auth-step input[type=email] { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; margin-bottom: 14px; }
.btn.wide { width: 100%; border: 0; cursor: pointer; font: inherit; font-weight: 600; text-align: center; }
.btn:disabled { opacity: .55; cursor: default; }
.auth-note { padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.auth-note.bad { background: var(--bad-bg); color: var(--bad); }
.top .user { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px;
  white-space: nowrap; }
.top .user form { margin: 0; }
.top .user button { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { margin-bottom: 0; }
.btn.ghost { background: var(--card); color: var(--accent); border: 1px solid var(--line); cursor: pointer; font-weight: 500; }
.auth-note { background: var(--accent-bg); color: var(--accent); }
.auth-note.ok { background: var(--ok-bg); color: var(--ok); }
