:root {
  --bg: #EEF2F7;
  --card: #FFFFFF;
  --ink: #1C2541;
  --ink-2: #4A5470;
  --ink-3: #7D869E;
  --line: #D9DFEA;
  --line-2: #C4CCDB;
  --navy: #1C2541;
  --on-navy: #FFFFFF;
  --soft: #E3E9F2;
  --warn: #B4471F;
  --warn-bg: #FBE9E1;
  --ok: #17785A;
  --ok-bg: #DDF3EA;
  --focus: #3D6BE0;
  --radius: 14px;
  --radius-s: 9px;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11162A; --card: #1A2138; --ink: #E7EBF5; --ink-2: #B3BBD0; --ink-3: #848DA8;
    --line: #2B3452; --line-2: #3A4566; --navy: #DCE3F5; --on-navy: #11162A; --soft: #232B46;
    --warn: #F29A78; --warn-bg: #3B2219; --ok: #6AD3AE; --ok-bg: #173229; --focus: #8EA9FF;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--card); font-weight: 500;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.btn.danger { color: var(--warn); border-color: currentColor; background: transparent; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }

input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 9px 12px; border: 1.5px solid var(--line-2); border-radius: var(--radius-s);
  background: var(--card);
}
textarea { min-height: 80px; resize: vertical; }
input, select { min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }

#toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--navy); color: var(--on-navy); padding: 12px 16px; border-radius: 12px; text-align: center; animation: pop .2s ease-out; }
.toast.err { background: var(--warn); color: #fff; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
