/* УМВИ — общие токены и компоненты для всех страниц */
:root {
  --bg: #07080c;
  --bg-2: #0d0f16;
  --surface: #11131b;
  --surface-2: #171a24;
  --chip: #1a1d28;
  --chip-hover: #232736;
  --line: #262a38;
  --text: #eceef5;
  --muted: #8d93a6;
  --violet: #8b4dff;
  --violet-2: #6d4bff;
  --cyan: #38c6f4;
  --blue: #4a7dff;
  --warm: #8b4dff;   /* левое свечение */
  --cool: #38c6f4;   /* правое свечение */
  --pink: #b06bff;
  --grad: linear-gradient(120deg, #8b4dff 0%, #5b6cff 50%, #38c6f4 100%);
  --ok: #3fd69a;
  --warn: #ffb547;
  --danger: #ff6b7a;
  --glow-strength: 0.85;
  --glyph-opacity: 0.7;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font: "Onest", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Unbounded", "Onest", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f4f9;
  --bg-2: #e9ebf3;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --chip: #eef0f6;
  --chip-hover: #e3e6ef;
  --line: #d6d9e4;
  --text: #12141c;
  --muted: #5d6375;
  --warm: #8b4dff;
  --cool: #22b3e6;
  --glow-strength: 0.42;
  --glyph-opacity: 0.55;
  --ok: #129a63;
  --warn: #b7700a;
  --danger: #d33b4c;
  --shadow: 0 20px 50px rgba(40, 40, 90, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
code { font-family: var(--mono); font-size: 0.88em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; line-height: 1.15;
  height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--chip); color: var(--text); font-size: 14.5px; font-weight: 500; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--chip-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; transform: none; }
.btn.primary { border: 0; color: #fff; background: var(--grad); box-shadow: 0 8px 26px -10px rgba(110, 90, 255, 0.8); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.lg { height: 50px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }

/* поля */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); }
.input, .field input, .field textarea, .field select {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); outline: 0; transition: border-color 0.15s;
}
.field textarea { height: auto; padding: 10px 14px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--violet); }
.field small { color: var(--muted); font-size: 12.5px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); }
.check input { margin-top: 3px; accent-color: var(--violet); width: 16px; height: 16px; flex: none; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 1000;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: min(560px, 92vw);
  display: flex; gap: 12px; align-items: center;
}
.toast a, .toast button { white-space: nowrap; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo img { width: 34px; height: 34px; }
.logo b { font: 700 19px/1 var(--display); letter-spacing: 0.02em; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
