/* Шрифт надписи «надиктуй» в логотипе — круглый жирный, как у Groq. Лежит рядом, без интернета тоже работает. */
@font-face {
  font-family: "Nadiktuy Logo"; font-weight: 900; font-display: swap;
  src: url("/static/fonts/nunito-900-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nadiktuy Logo"; font-weight: 900; font-display: swap;
  src: url("/static/fonts/nunito-900-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
:root {
  --bg: #fbf8f1;
  --panel: #fffdf8;
  --line: #ebe6da;
  --text: #1d1b18;
  --muted: #6f6a60;
  --faint: #a29c90;
  --accent: #1d1b18;
  --active: #ece8df;
  --danger: #b4321f;
  --ok: #2d8a4e;
  --grad: linear-gradient(90deg, #6ee36c, #22d3ee, #8b5cf6, #ec4899, #f97362, #a3c13a, #6ee36c);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Golos Text", "Segoe UI", system-ui, sans-serif;
}
h1, h2 { font-family: "Lora", Georgia, serif; font-weight: 500; margin: 0; }
h1 { font-size: 34px; }
h2 { font-size: 30px; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }

.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.logo {
  display: flex; align-items: center; gap: 8px; padding: 0 8px 40px;
  font: 900 27px/1 "Nadiktuy Logo", "Golos Text", sans-serif; letter-spacing: -0.5px;
}
.logo span { padding-bottom: 3px; }  /* у круглого шрифта визуальный центр выше — выравниваем с микрофоном */
.logo svg { width: 34px; height: 34px; flex-shrink: 0; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav.bottom { margin-top: auto; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px;
  text-decoration: none; color: var(--muted); font-weight: 500; cursor: pointer;
}
.nav a svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.nav a:hover { color: var(--text); }
.nav a.active { background: var(--active); color: var(--text); font-weight: 600; }

main { flex: 1; min-width: 0; }
.page-head { padding: 44px 30px 34px; }
.page-head p { margin: 14px 0 0; }
.section { border-top: 1px solid var(--line); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-left: 30px; }
.grid2 > .cell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); margin-right: -1px; }
.cell { padding: 30px; display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .02em; }
.big { font-size: 22px; font-weight: 600; margin-top: 10px; }
.big small { font-size: 14px; font-weight: 600; }
.bar { height: 9px; border-radius: 9px; background: var(--line); overflow: hidden; margin: 14px 0 24px; }
.bar > i { display: block; height: 100%; background: var(--grad); background-size: 100vw 100%; border-radius: 9px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--accent);
  background: transparent; cursor: pointer; font-weight: 600; width: 100%; text-decoration: none;
}
.btn.dark { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.btn.small { height: 38px; width: auto; padding: 0 16px; font-size: 14px; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.btn-row { display: flex; gap: 12px; margin-top: 20px; }

.tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin-left: 30px; border-bottom: 1px solid var(--line); }
.tabs button {
  border: 0; border-left: 1px solid var(--line); background: none; padding: 10px; font-size: 12px;
  text-transform: uppercase; color: var(--faint); cursor: pointer;
}
.tabs button.active { background: var(--active); color: var(--text); }
.toolbar { display: flex; gap: 14px; padding: 30px; margin-left: 30px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.input {
  height: 50px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 20px; outline: none;
}
.input:focus { border-color: var(--muted); }
.toolbar .input { flex: 1; }
.toolbar .btn { width: auto; }

.list { margin-left: 30px; border-left: 1px solid var(--line); }
.item { padding: 30px; border-bottom: 1px solid var(--line); position: relative; }
.item .text { white-space: pre-wrap; word-break: break-word; }
.item .meta { margin-top: 18px; font-size: 11px; color: var(--faint); text-transform: uppercase; display: flex; gap: 14px; align-items: center; }
.item .actions { position: absolute; right: 24px; top: 22px; display: none; gap: 8px; }
.item:hover .actions { display: flex; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; height: 32px; padding: 0 10px; cursor: pointer; font-size: 13px; }
.icon-btn:hover { border-color: var(--muted); }
.empty { padding: 50px 30px; color: var(--muted); margin-left: 30px; border-left: 1px solid var(--line); }

.hotkey {
  border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; margin-top: 20px;
}
.hotkey b { color: #18a6b8; font-weight: 600; letter-spacing: .03em; }
.hotkey small { display: block; color: var(--faint); font-size: 11px; margin-top: 4px; }
.hotkey.capturing { border-color: #18a6b8; }

.auth { max-width: 420px; margin: 10vh auto; padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.auth .logo { justify-content: center; padding-bottom: 10px; }
.auth h1 { text-align: center; margin-bottom: 10px; }
.auth .switch { text-align: center; color: var(--muted); }
.auth .switch a { cursor: pointer; text-decoration: underline; }
.error { color: var(--danger); min-height: 22px; }
.notice { margin: 0 30px 30px; padding: 18px 22px; border-radius: 12px; background: var(--active); }

table { width: calc(100% - 30px); margin-left: 30px; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td .input { height: 36px; width: 90px; padding: 0 10px; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 20px; background: var(--active); }
.badge.active { background: #dff3e5; color: var(--ok); }
.badge.blocked { background: #f8e1dd; color: var(--danger); }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 10px; opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 800px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .logo { padding-bottom: 10px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a { padding: 8px 10px; }
  .nav.bottom { margin-top: 4px; }
  .page-head { padding: 28px 16px 22px; }
  .grid2 { grid-template-columns: 1fr; margin-left: 0; }
  .tabs, .toolbar, .list, .empty { margin-left: 0; border-left: 0; }
  .toolbar { flex-direction: column; padding: 16px; }
  .toolbar .input { flex: none; }
  .item, .cell { padding: 20px 16px; }
  table { width: 100%; margin-left: 0; display: block; overflow-x: auto; }
}
