/* Стиль «Деловой синий» (макеты — docs/design/blue): шрифт IBM Plex Sans, скругление 6 px, плоские белые карточки
   с рамкой 1 px, один синий акцент, без градиентов и декоративных теней. Тема одна, светлая.
   Здесь токены, шрифты, базовые элементы и общие компоненты (кнопки, поля, метки, уведомления) сайта и админки. */

/* Шрифт отдаётся с нашего сервера (static/fonts, пакет @fontsource/ibm-plex-sans, лицензия SIL OFL — fonts/OFL.txt):
   посетители не обращаются к сторонним серверам. Подмножества latin и cyrillic, начертания 400/500/600. */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/ibm-plex-sans-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/ibm-plex-sans-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/ibm-plex-sans-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --font-ui: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f7f9fb; --surface-3: #eef1f5;
  --border: #dde2ea; --border-strong: #c9d1dd;
  --text: #1b2533; --text-2: #3b4859; --muted: #5f6b7c;
  --accent: #2a5db0; --accent-hover: #1d4688; --accent-soft: #e8f0fb; --accent-ink: #1f4a96; --accent-line: #c9dbf5;
  --navy: #162844; --navy-text: #c5d0e2; --navy-muted: #aab8cf; --navy-link: #9fc0f2; --navy-line: rgba(255, 255, 255, .14); --navy-hover: rgba(255, 255, 255, .12);
  --ok: #1e7a46; --ok-soft: #e3f3ea; --ok-ink: #14572f; --ok-line: #bfe3cd;
  --warn: #946200; --warn-soft: #fdf3dc; --warn-ink: #6e4900; --warn-line: #f3dfae;
  --danger: #b3261e; --danger-soft: #fbe9e7; --danger-ink: #8f1d17; --danger-line: #f1c4be;
  --focus-ring: 0 0 0 3px rgba(42, 93, 176, .25);
  --radius: 6px; --radius-lg: 8px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-ui); font-size: 16px; line-height: 1.5; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: inherit; font-weight: 600; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--text); }
.mono { font-family: var(--font-mono); font-size: .86em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

/* кнопки: высота 36, основная — синяя, обычная — белая с рамкой */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 16px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.25;
  text-decoration: none; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-hover); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover, .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.danger { border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm, .btn.sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn[disabled], .btn:disabled { background: var(--surface-3); border-color: var(--border); color: #8a95a5; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--surface-3); border-color: var(--border); color: #8a95a5; }

/* поля ввода: высота 38, рамка #C9D1DD, фокус — синяя рамка и кольцо */
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], input[type=file], select, textarea {
  font: inherit; font-size: 14px; height: 38px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); max-width: 100%; }
select { padding-right: 6px; }
textarea { height: auto; min-height: 70px; padding: 8px 10px; resize: vertical; }
input[type=file] { height: auto; min-height: 38px; padding: 6px 10px; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; font-weight: 500; height: 26px; padding: 0 10px; margin-right: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); cursor: pointer; }
input::placeholder, textarea::placeholder { color: #6b7788; opacity: 1; }
input:focus, select:focus, textarea:focus, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid transparent; border-color: var(--accent); box-shadow: var(--focus-ring); border-radius: var(--radius); }
input[aria-invalid=true] { border-color: var(--danger); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-3); border-color: var(--border); color: #6b7788; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* метки состояния */
.badge, .chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge.info, .chip.info { background: var(--accent-soft); color: var(--accent-ink); }
.chip.ok { background: var(--ok-soft); color: var(--ok-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* уведомления: цветной фон, рамка и точка слева, текст основного цвета */
.err, .flash, .notice, .draft { position: relative; padding: 10px 12px 10px 30px; border-radius: var(--radius); border: 1px solid; color: var(--text); font-size: 14.5px; }
.err::before, .flash::before, .notice::before, .draft::before { content: ''; position: absolute; left: 12px; top: 1.05em; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.err { background: var(--danger-soft); border-color: var(--danger-line); } .err::before { color: var(--danger); }
.flash, .notice { background: var(--ok-soft); border-color: var(--ok-line); } .flash::before, .notice::before { color: var(--ok); }
.draft { background: var(--warn-soft); border-color: var(--warn-line); } .draft::before { color: var(--warn); }
