/* NEVIO «Дверь» — shared tokens and primitives for the shop, Mini App and admin.
   Neutral black, one blue→violet light, hairline borders. Presentation only: no account,
   license or authorization state lives here. */
@font-face { font-family: Manrope; src: url('/static/design/Manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@view-transition { navigation: auto; }

:root {
  color-scheme: dark;
  --bg: #07080a; --bg-deep: #050608; --surface: #0e0f13; --surface-2: #13141a; --surface-3: #1a1b22;
  --line: #ffffff17; --line-strong: #ffffff29; --field: #646876;
  --text: #f4f5f8; --text-2: #c0c3cf; --muted: #868a96;
  --lilac: #a9b8ff; --violet: #7c5cff; --peach: #b4a6ff; --mint: #3fd99a;
  --ink: #ffffff;
  --cta: linear-gradient(100deg, #3f66f2 0%, #6d4cf2 100%);
  --cta-hover: linear-gradient(100deg, #355ce8 0%, #6342e6 100%);
  --solid: #f4f5f8; --on-solid: #07080a;
  --hair: linear-gradient(180deg, #ffffff26, #ffffff0d 42%, #ffffff08);
  --soft: #4f7cff1c; --focus: #a9b8ff;
  --green: #3fd99a; --good-bg: #0d2a1f; --amber: #f2b84b; --warn-bg: #2a2010; --red: #ff8a8a; --bad-bg: #2c1416;
  --r-xs: 8px; --r-sm: 12px; --r: 18px; --r-lg: 24px; --r-xl: 30px; --pill: 999px;
  --control-radius: 12px;
  --shadow: 0 1px 0 #ffffff0a inset, 0 24px 48px -32px #000000cc;
  --glow: 0 0 0 1px #8fa5ff33, 0 18px 50px -22px #4f6bff99;
  --font: Manrope, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: var(--font);
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.16, 1, .3, 1);
  font-family: var(--font); font-size: 15px; font-synthesis: none;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f6fa; --bg-deep: #eceef4; --surface: #ffffff; --surface-2: #f1f3f8; --surface-3: #e8ebf2;
  --line: #0b0d1417; --line-strong: #0b0d1429; --field: #8b90a0;
  --text: #0e1120; --text-2: #2f3446; --muted: #5d6376;
  --lilac: #3346c4; --violet: #5b3fe6; --peach: #5b3fe6; --mint: #0d8a57;
  --ink: #ffffff;
  --cta: linear-gradient(100deg, #3f66f2 0%, #6d4cf2 100%);
  --cta-hover: linear-gradient(100deg, #355ce8 0%, #6342e6 100%);
  --solid: #0e1120; --on-solid: #ffffff;
  --hair: linear-gradient(180deg, #0b0d1426, #0b0d1414);
  --soft: #3346c414; --focus: #3346c4;
  --green: #0d8a57; --good-bg: #ddf3e8; --amber: #8a5a00; --warn-bg: #fdf0d2; --red: #c0353a; --bad-bg: #fde6e7;
  --shadow: 0 1px 2px #0b0d140f, 0 18px 40px -30px #0b0d1440;
  --glow: 0 0 0 1px #3346c426, 0 18px 50px -24px #3346c455;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--line-strong) var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: #4f7cff66; color: var(--text); }
a { color: var(--lilac); text-decoration: none; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
:where(.cta,.button,button,input,select,textarea):focus-visible { border-radius: var(--control-radius); }
input, textarea { caret-color: var(--lilac); }
input, select, textarea { color: var(--text); background: var(--surface); border: 1px solid var(--field); border-radius: var(--control-radius); padding: 11px 14px; min-height: 46px; max-width: 100%; width: 100%; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: var(--lilac); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--lilac) 18%, transparent); }
input[type='checkbox'], input[type='radio'] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--violet); flex-shrink: 0; box-shadow: none; }
input[type='file'] { padding: 9px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.help-text.field-error { color: var(--red); font-weight: 650; }
input[aria-invalid='true'], select[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--red); border-width: 2px; }
[aria-invalid='true']:focus-visible { outline-color: var(--red); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
button:disabled, .cta[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }

h1, h2, h3 { line-height: 1.1; text-wrap: balance; color: var(--text); margin: 0 0 14px; }
h1 { font: 800 clamp(30px, 4.6vw, 56px)/1.02 var(--font-display); letter-spacing: -.045em; }
h2 { font: 800 clamp(20px, 2.2vw, 28px)/1.12 var(--font-display); letter-spacing: -.035em; }
h3 { font-size: 17px; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; }
p { max-width: 66ch; margin: 0 0 14px; text-wrap: pretty; }
strong, b { font-weight: 750; }
small { font-size: 12.5px; }
code, .mono { font: .9em/1.5 var(--font-mono); background: var(--surface-3); color: var(--text); padding: 2px 7px; border-radius: 7px; overflow-wrap: anywhere; }
.muted, .help-text, .note { color: var(--muted); }
.help-text { font-size: 13.5px; }
.lead { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.icon { flex-shrink: 0; vertical-align: middle; }

/* Actions. `.cta` = shop vocabulary, `.button` = admin vocabulary. */
.button, .cta, button.primary { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--line-strong); border-radius: var(--control-radius); font: 750 15px/1.1 var(--font); letter-spacing: -.005em; text-decoration: none; color: var(--text); background: var(--surface-2); transition: transform .2s var(--spring), box-shadow .25s var(--ease), background .2s, border-color .2s; white-space: nowrap; isolation: isolate; }
.cta, .button.primary, button.primary { background: var(--cta); color: var(--ink); border-color: transparent; box-shadow: inset 0 1px 0 #ffffff40, 0 10px 28px -12px #5a6cffcc; }
.cta:hover, .button.primary:hover, button.primary:hover { text-decoration: none; background: var(--cta-hover); transform: translateY(-1px); box-shadow: inset 0 1px 0 #ffffff4d, 0 14px 34px -12px #5a6cffdd; }
.cta.solid { background: var(--solid); color: var(--on-solid); box-shadow: inset 0 -1px 0 #00000022, 0 8px 26px -12px #8aa2ff99; }
.cta.solid:hover { background: var(--solid); filter: brightness(.96); }
.cta:active, .button:active { transform: translateY(0) scale(.98); }
.ghost, .cta.ghost, .button.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none; }
.ghost:hover, .cta.ghost:hover, .button.ghost:hover { background: var(--surface-2); border-color: var(--line-strong); transform: none; box-shadow: none; }
.cta.danger, .button.danger { background: var(--bad-bg); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); box-shadow: none; }
.cta.block, .button.block { width: 100%; }
.cta .icon, .button .icon { width: 18px; height: 18px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-weight: 750; }
.text-link .icon { width: 17px; height: 17px; transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translateX(3px); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--text-2); background: transparent; flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--line-strong); color: var(--text); }
.theme-dark, [data-theme='light'] .theme-light { display: none; }
[data-theme='light'] .theme-dark { display: block; }

/* Status: always words plus colour; the server decides the state. */
.status, .availability, .chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: var(--pill); font: 750 12.5px/1.25 var(--font); white-space: nowrap; color: var(--text-2); background: var(--surface-3); border: 1px solid transparent; }
.status i, .availability i, .chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.good, .open, .owned { color: var(--green); background: var(--good-bg); }
.warn, .soon { color: var(--amber); background: var(--warn-bg); }
.bad, .err { color: var(--red); background: var(--bad-bg); }
.quiet, .closed { color: var(--muted); background: var(--surface-3); }
.brand-chip { color: var(--lilac); background: var(--soft); }

.card, .panel { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--hair) border-box; border-radius: var(--r); box-shadow: var(--shadow); }
.banner, .notice { padding: 14px 18px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.err { padding: 14px 18px; border-radius: var(--r-sm); }
p.warn, div.warn { padding: 14px 18px; border-radius: var(--r-sm); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid > .full-width, .full-width { grid-column: 1 / -1; }
label { display: grid; gap: 7px; font-weight: 650; font-size: 14px; color: var(--text-2); }
label.checkbox, .checkbox-row { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; color: var(--text); }
fieldset { padding: 0; border: 0; min-width: 0; margin: 0 0 26px; }
legend { padding: 0; font: 750 16px/1.3 var(--font); margin-bottom: 16px; color: var(--text); }
details summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } @view-transition { navigation: none; } }
