/* M2M — общий стиль. Светлая и тёмная темы по настройке системы; цвета только токенами. */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --text: #14181f; --muted: #5b6573; --line: #dfe3e9;
  --brand: #07538f; --on-brand: #ffffff; --ok: #16794a; --err: #b3261e; --warn: #9a6700; --focus: #00718c;
  --brand-fill: #07538f; --brand-edge: #07538f; --on-fill: #ffffff; --radius: 10px; --gap: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #171b22; --text: #e8ebf0; --muted: #9aa5b4; --line: #2a303a;
    --brand: #00a9ae; --on-brand: #0a0d16; --ok: #4cc38a; --err: #ff8a80; --warn: #e3b341; --focus: #4cc9ce;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #171b22; --text: #e8ebf0; --muted: #9aa5b4; --line: #2a303a;
  --brand: #00a9ae; --on-brand: #0a0d16; --ok: #4cc38a; --err: #ff8a80; --warn: #e3b341; --focus: #4cc9ce;
}
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif; }
a { color: var(--focus); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
header.top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
header.top h1 { font-size: 18px; margin: 0; }
nav.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; }
nav.tabs button { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 36px; }
nav.tabs button[aria-current="page"] { background: var(--brand-fill, var(--brand)); color: var(--on-fill, var(--on-brand)); border-color: transparent; font-weight: 600; }
main { padding: 8px 16px 48px; max-width: 1200px; margin: 0 auto; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 var(--gap); }
.card h2, .card h3 { margin: 0 0 10px; font-size: 16px; }
.metric { font-size: 28px; font-weight: 700; }
.muted { color: var(--muted); }
.field { display: grid; gap: 4px; margin-bottom: 10px; }
.field span { font-size: 13px; color: var(--muted); }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; min-height: 40px; }
textarea { font-family: ui-monospace, Consolas, monospace; }
.btn { background: var(--brand-fill, var(--brand)); color: var(--on-fill, var(--on-brand)); border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; min-height: 40px; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; }
.pill.tech { background: var(--warn); color: var(--surface); border-color: transparent; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.toasts { position: fixed; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 24px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); touch-action: pan-y; }
.toast > div { flex: 1; min-width: 0; }
.toast b { display: block; }
.toast small { color: var(--muted); }
.toast.crit { border-left-color: var(--err); }
.toast.warn { border-left-color: var(--warn); }
.toast-x { flex: none; width: 26px; height: 26px; margin: -4px -8px 0 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer; }
/* Логика тоста и сроки показа — /ui/feedback.js, общий с кабинетом и CRM. */
.notice { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--surface); margin-bottom: var(--gap); }
@media (max-width: 600px) { main { padding: 8px 12px 48px; } .metric { font-size: 24px; } }

/* кабинет туриста */
body.tourist { display: grid; place-items: start center; padding: 20px 16px; }
.tourist-card { width: min(440px, 100%); }
.tourist .big { font-size: 40px; font-weight: 800; margin: 8px 0; }
.lang { display: flex; gap: 8px; margin-bottom: 14px; }
.lang button { flex: 1; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.lang button[aria-pressed="true"] { background: var(--brand-fill, var(--brand)); color: var(--on-fill, var(--on-brand)); font-weight: 700; border-color: transparent; }
.reception { border-left: 4px solid var(--warn); padding: 12px 14px; background: var(--surface); border-radius: 8px; }
