:root {
  --accent: #3457d5;
  --accent-hover: #2a45ad;
  --accent-soft: #eef1fc;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e2e4ea;
  --text: #171922;
  --muted: #6b7080;
  --danger: #c93a4b;
  --danger-soft: #fbe9eb;
  --ok: #1a8a5f;
  --shadow: 0 1px 2px rgba(20, 22, 35, .04), 0 1px 1px rgba(20, 22, 35, .03);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6f8bff;
    --accent-hover: #869cff;
    --accent-soft: #1a2140;
    --bg: #0f1117;
    --card: #171925;
    --line: #2a2d3a;
    --text: #e8e9ee;
    --muted: #8a8fa0;
    --danger: #f2707f;
    --danger-soft: #391c22;
    --ok: #4fd196;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 1px rgba(0, 0, 0, .2);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
}
.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

nav { display: flex; align-items: center; gap: 20px; margin-left: auto; flex-wrap: wrap; }
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: color .12s ease;
}
nav a:hover { color: var(--text); }
.who { color: var(--muted); font-size: 13px; padding-left: 4px; border-left: 1px solid var(--line); margin-left: 4px; }

main { max-width: 1080px; margin: 32px auto 64px; padding: 0 24px; }

h1 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
h2 {
  font-size: 14px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 30px 0 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
th { background: transparent; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s ease; }
tbody tr:hover td { background: var(--accent-soft); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 14px 0 5px; }
input, textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 70px; }

button, .btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 9px 16px;
  border-radius: 7px;
  font: inherit;
  font-weight: 550;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  line-height: 1.3;
  transition: background .12s ease, transform .05s ease;
}
button:hover, .btn:hover { background: var(--accent-hover); color: #fff; }
button:active, .btn:active { transform: translateY(1px); }
button.secondary, .btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
button.secondary:hover, .btn.secondary:hover { background: var(--accent-soft); border-color: var(--accent); }
button.danger { background: var(--danger); }
button.danger:hover { background: #a92e3d; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.tile .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.tile .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.flash {
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--text); padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px;
}
.err {
  background: var(--danger-soft); border: 1px solid var(--danger);
  color: var(--text); padding: 11px 15px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px;
}

.badge {
  background: var(--danger); color: #fff; padding: 2px 8px;
  border-radius: 20px; font-size: 11.5px; font-weight: 650;
}
.muted { color: var(--muted); }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }

pre.transcript {
  white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line);
  padding: 16px; border-radius: 8px; font: 13px/1.65 ui-monospace, "SF Mono", Consolas, monospace;
  color: var(--text);
}

.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 16px; }
.filters > div { flex: 0 0 auto; }
.filters label { margin: 0 0 5px; }

.login-wrap { max-width: 380px; margin: 12vh auto 0; }
.login-wrap h1 { justify-content: center; margin-bottom: 24px; font-size: 19px; }
.login-wrap .card { padding: 26px; }
.login-wrap button { width: 100%; margin-top: 6px; padding: 10px 16px; }
