/* Общий вид TerraPOS (docs/design/DESIGN.md): касса и админка берут цвета, шрифт, размеры,
   скругления и тени только отсюда. Другая тема или цвет клиента — замена значений в :root. */

@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin.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 {
  /* цвета */
  --c-ink: #16181D;
  --c-ink-2: #2A2D35;
  --c-on-ink: #F9FAFB;
  --c-on-ink-2: #D1D5DB;
  --c-accent: #F59E0B; /* цвет бренда: меняется одной переменной */
  --c-on-accent: var(--c-ink);
  --c-success: #15803D; /* белый текст на кнопке: контраст 5:1 */
  --c-success-dark: #166534; /* нажатие и наведение */
  --c-success-text: #15803D; /* зелёный для мелкого текста и кнопок: контраст 4.5:1 */
  --c-danger: #DC2626;
  --c-danger-text: #B91C1C; /* красный текст на сером и розовом фоне: контраст 4.5:1 */
  --c-warning-text: #B45309;
  --c-bg: #F3F4F6;
  --c-surface: #FFFFFF;
  --c-surface-2: #F9FAFB;
  --c-border: #E5E7EB;
  --c-border-strong: #D1D5DB;
  --c-text: #111827;
  --c-text-2: #374151;
  --c-muted: #6B7280;
  --c-muted-strong: #4B5563; /* подписи прямо на фоне приложения: контраст 4.5:1 */
  --c-faint: #9CA3AF;
  --c-online-bg: #14532D;
  --c-online: #BBF7D0;
  --c-online-dot: #4ADE80;
  --c-wait-bg: #78350F;
  --c-wait: #FDE68A;
  --c-wait-dot: #FBBF24;
  --c-offline-bg: #7F1D1D;
  --c-offline: #FECACA;
  --c-offline-dot: #F87171;
  --c-danger-bg: #FEF2F2;
  --c-warning-bg: #FFFBEB;
  --c-success-bg: #F0FDF4;
  --c-overlay: rgba(17, 24, 39, .55);

  /* группы меню «Функции» */
  --g-shift: #D97706;
  --g-fiscal: #DC2626;
  --g-stock: #2563EB;
  --g-staff: #16A34A;
  --g-hardware: #7C3AED;
  --g-other: #4B5563;

  /* шрифт */
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* размеры, скругления, тени */
  --tap: 44px;
  --btn-h: 52px;
  --pay-h: 64px;
  --head-h: 64px;
  --r-s: 8px;
  --r-btn: 10px;
  --r-btn-l: 12px;
  --r-card: 14px;
  --r-modal: 20px;
  --r-pill: 20px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, .06);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font); }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
.icon { flex-shrink: 0; display: block; }
::placeholder { color: var(--c-muted); opacity: 1; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

/* логотип-надпись */
.logo { font-size: 18px; font-weight: 800; letter-spacing: -.01em; color: inherit; white-space: nowrap; }
.logo b { font-weight: inherit; color: var(--c-accent); }

/* окна */
.backdrop { position: fixed; inset: 0; background: var(--c-overlay); display: grid; place-items: center; padding: 12px; z-index: 20; }
.modal { background: var(--c-surface); color: var(--c-text); border-radius: var(--r-modal); box-shadow: var(--shadow-modal); width: 100%; max-width: 460px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { max-width: 720px; }
.modal.xwide { max-width: 1040px; background: var(--c-surface-2); }
.modal-head { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--c-border); background: var(--c-surface); flex-shrink: 0; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.modal-head .modal-sub { font-size: 14px; color: var(--c-muted); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.modal-close { width: var(--tap); height: var(--tap); flex-shrink: 0; border: 0; border-radius: var(--r-btn); background: var(--c-bg); color: var(--c-text-2); display: grid; place-items: center; padding: 0; }
.modal-close:hover { background: var(--c-border); }
.modal-body { padding: 20px 24px 24px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.ask { display: flex; flex-direction: column; gap: 16px; }
.ask p { margin: 0; font-size: 16px; line-height: 1.4; white-space: pre-line; }
.ask-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
@media (max-width: 760px) {
  .modal-head { padding-left: 16px; }
  .modal-body { padding: 16px; }
}
