/* =====================================================================
   RANCH — базовые токены, тема и общие компоненты.
   Разделы (dashboard.css, place.css, pages.css) переопределяют свои экраны.
   ===================================================================== */
:root {
  color-scheme: light;
  --brand: #b31329;
  --brand-600: #9a0f22;
  --brand-700: #7d0c1c;
  --brand-50: #fbeeee;
  --brand-100: #f4d9da;
  --ink: #2a1012;
  --ink-2: #4b3335;
  --muted: #7d6b6c;
  --bg: #f7f3f1;
  --card: #fffdfc;
  --line: #ece3e0;
  --line-2: #e0d4d1;
  --focus: rgba(179, 19, 41, 0.25);

  --st-free: #2f6fb5;
  --st-occupied: #7a6a6b;
  --st-reserved: #e0a030;
  --st-active: #2e8b57;
  --st-ending: #c8102e;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(42, 16, 18, 0.04), 0 4px 16px rgba(42, 16, 18, 0.06);
  --shadow-lg: 0 2px 6px rgba(42, 16, 18, .06), 0 24px 60px -12px rgba(42, 16, 18, 0.28);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Montserrat', var(--font);
  --sidebar: 248px;

  /* Общие токены редизайна — используются всеми разделами */
  --surface-2: #ffffff;          /* поля ввода, вложенные поверхности */
  --track: #f1e9e7;              /* фон полос прогресса и треков графиков */
  --ph-1: #f4eeec;               /* заглушки фото — полосы */
  --ph-2: #efe7e4;
  --hover: #f7f1ef;              /* фон строк/пунктов при наведении */
  --grad-brand: linear-gradient(135deg, #d4213d 0%, #b31329 55%, #7d0c1c 100%);
  --grad-ink: linear-gradient(160deg, #3a1517 0%, #2a1012 60%, #1d0a0b 100%);
  --shadow-hover: 0 2px 4px rgba(42, 16, 18, .05), 0 14px 34px rgba(42, 16, 18, .12);
  --glass: rgba(255, 253, 252, .78);
  --on-brand: #ffffff;
  --map-filter: none;            /* в тёмной теме карта слегка приглушается */

  /* Дополнительные токены темы (новые) */
  --brand-ink: #a50f26;          /* бренд-цвет для ТЕКСТА (ссылки, акценты) — читаем в обеих темах */
  --shadow-xs: 0 1px 2px rgba(42, 16, 18, .06);
  --focus-ring: 0 0 0 2px var(--card), 0 0 0 4px rgba(179, 19, 41, .55);
  --backdrop: rgba(42, 16, 18, .42);
  --inv-bg: #2a1012;             /* «инверсные» элементы: тёмная кнопка, тост, подсказка, активный чип */
  --inv-fg: #ffffff;
  --inv-hover: #45201f;
  --topbar-bg: rgba(247, 243, 241, .72);
  --scroll: #d6c8c5;
  --scroll-hover: #bba8a5;
  --selection: rgba(179, 19, 41, .18);
  --kbd-bg: #ffffff;
  --sk-1: #efe7e4;
  --sk-2: #f8f3f1;
  /* Цвета ТЕКСТА статусов на мягком фоне (бейджи «soft») */
  --st-free-ink: #1f5796;
  --st-occupied-ink: #5e5051;
  --st-reserved-ink: #8a5a00;
  --st-active-ink: #1f6b41;
  --st-ending-ink: #a50f26;
}

/* Тёмная тема: html[data-theme=dark] — тёплые бордово-графитовые поверхности */
:root[data-theme=dark] {
  color-scheme: dark;
  --brand: #d42a44;
  --brand-600: #e23d56;
  --brand-700: #8e1426;
  --brand-50: #33171b;
  --brand-100: #4d1f27;
  --ink: #f5eceb;
  --ink-2: #d9cbca;
  --muted: #a89597;
  --bg: #161011;
  --card: #1f1718;
  --line: #33292a;
  --line-2: #45393a;
  --focus: rgba(240, 86, 107, .35);
  --st-free: #4a8ad6;
  --st-occupied: #9a8a8b;
  --st-reserved: #e7ac3f;
  --st-active: #3aa76b;
  --st-ending: #e8334f;
  --surface-2: #261d1e;
  --track: #2d2324;
  --ph-1: #2a2122;
  --ph-2: #231b1c;
  --hover: #2a2021;
  --grad-brand: linear-gradient(135deg, #e03550 0%, #c0182f 55%, #8a0f20 100%);
  --grad-ink: linear-gradient(165deg, #2a1416 0%, #1c0f10 55%, #130a0b 100%);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 20px rgba(0, 0, 0, .28);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 28px 70px -12px rgba(0, 0, 0, .7);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .5);
  --glass: rgba(31, 23, 24, .74);
  --map-filter: brightness(.7) contrast(1.05) saturate(.8);

  --brand-ink: #ff8396;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --focus-ring: 0 0 0 2px var(--card), 0 0 0 4px rgba(255, 110, 130, .6);
  --backdrop: rgba(8, 4, 5, .62);
  --inv-bg: #f3e8e6;
  --inv-fg: #2a1012;
  --inv-hover: #ffffff;
  --topbar-bg: rgba(22, 16, 17, .7);
  --scroll: #3e3334;
  --scroll-hover: #57494a;
  --selection: rgba(255, 110, 130, .3);
  --kbd-bg: #2a2122;
  --sk-1: #241c1d;
  --sk-2: #2f2627;
  --st-free-ink: #9cc2f2;
  --st-occupied-ink: #cdbfc0;
  --st-reserved-ink: #f2c66e;
  --st-active-ink: #82d7a6;
  --st-ending-ink: #ff95a4;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss01';
}
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .25s ease, border-color .25s ease, color .2s ease, fill .2s ease !important;
}
::selection { background: var(--selection); color: inherit; }
* { scrollbar-width: thin; scrollbar-color: var(--scroll) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-hover); }

h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.022em; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
h4 { font-size: 13px; font-weight: 700; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.tnum, .num { font-variant-numeric: tabular-nums; }
.num-xl { font: 800 34px/1 var(--font-head); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.eyebrow {
  font: 700 12px/1 var(--font-head);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-ink);
}
kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px;
  font: 600 11px/1 var(--font); color: var(--muted);
  background: var(--kbd-bg); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px;
}
code { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--card); color: var(--ink);
  font-weight: 600; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .08s, filter .15s;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--line-2)); background: var(--hover); }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.985); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; }
.btn.disabled { pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: var(--grad-brand); border-color: transparent; color: var(--on-brand);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(125, 12, 28, .3), 0 6px 16px -6px rgba(179, 19, 41, .55);
}
.btn-primary:hover { background: var(--grad-brand); border-color: transparent; filter: brightness(1.07) saturate(1.05); }
.btn-primary:focus-visible { box-shadow: var(--focus-ring), 0 6px 16px -6px rgba(179, 19, 41, .55); }
.btn-dark { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-fg); }
.btn-dark:hover { background: var(--inv-hover); border-color: var(--inv-hover); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--hover); border-color: transparent; }
.btn-danger { color: var(--brand-ink); }
.btn-danger:hover { background: var(--brand-50); border-color: var(--brand-100); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-excel { background: #2e7d4f; border-color: #2e7d4f; color: #fff; }
.btn-excel:hover { background: #256a42; border-color: #256a42; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .01em; }
.field > span .req { color: var(--brand-ink); }
.input, .field input, .field select, .field textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface-2); color: var(--ink); outline: none;
  box-shadow: inset 0 1px 1px rgba(42, 16, 18, .03);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input[type=checkbox], .field input[type=radio] { width: 18px; height: 18px; box-shadow: none; }
.input::placeholder, .field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line-2)); }
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus);
}
select.input, .field select { cursor: pointer; }
.field small { color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.form-error {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand-ink); border: 1px solid var(--brand-100);
  font-weight: 500;
}
.form-error[hidden] { display: none !important; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 38px; }

/* ---------- Layout shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 10;
  display: flex; flex-direction: column; gap: 2px;
  padding: 22px 14px 14px; background: var(--grad-ink); color: #f3e7e6;
  overflow-y: auto; overflow-x: hidden; isolation: isolate;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06);
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
/* свечение бренда и тонкая сетка */
.sidebar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(212, 33, 61, .32), transparent 60%),
    radial-gradient(90% 40% at 100% 100%, rgba(212, 33, 61, .14), transparent 70%);
}
.sidebar::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 45%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 45%);
}
.logo { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-bar { width: 26px; height: 3px; background: currentColor; border-radius: 2px; }
.sidebar .logo-bar { background: linear-gradient(90deg, #ff4d66, #d4213d); box-shadow: 0 0 12px rgba(255, 77, 102, .7); }
.logo-text { font: 800 17px/1 var(--font-head); letter-spacing: 0.24em; }
.logo-sub { display: block; font: 500 11px/1.3 var(--font); letter-spacing: 0; color: #c9b5b4; margin-top: 4px; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  color: #e3d2d1; font-weight: 500; text-decoration: none !important;
  transition: background .15s, color .15s;
}
.nav-link svg { width: 20px; height: 20px; flex: none; opacity: .8; transition: opacity .15s, color .15s; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-link:hover svg { opacity: 1; }
.nav-link:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255, 131, 150, .8); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(212, 33, 61, .28), rgba(212, 33, 61, .08));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}
.nav-link.active::before {
  content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0;
  background: #ff4d66; box-shadow: 0 0 12px rgba(255, 77, 102, .8);
}
.nav-link.active svg { opacity: 1; color: #ff8b98; }
.nav-sep { flex: 1; min-height: 12px; }
.nav-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; margin-top: 8px; font-size: 13px;
  border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07);
}
.nav-user b { display: block; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user span { color: #c9b5b4; }
.nav-user .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .12); }
.nav-cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 10px; height: 42px;
  border-radius: 12px; background: var(--grad-brand); color: #fff; font-weight: 700; text-decoration: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 22px -6px rgba(212, 33, 61, .65);
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.nav-cta::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%);
  transition: transform .6s ease;
}
.nav-cta:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 26px -6px rgba(212, 33, 61, .75); }
.nav-cta:hover::after { transform: translateX(120%); }
.nav-cta:focus-visible { outline: 2px solid #ff8b98; outline-offset: 2px; }
.nav-cta svg { width: 18px; height: 18px; }
.nav-group { font: 700 10.5px/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: #a48b8a; padding: 16px 12px 8px; }
.nav-link .nav-short { display: none; }
.nav-link.mobile-nav-only { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 28px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 8px 24px -16px rgba(42, 16, 18, .35); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.content { padding: 24px 28px 40px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* Переключатель темы */
.theme-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 11px; background: var(--track); border: 1px solid var(--line);
}
.theme-switch button {
  width: 30px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.theme-switch button svg { width: 16px; height: 16px; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed=true] { background: var(--card); color: var(--brand-ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.theme-switch button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.theme-switch.wide { display: flex; width: 100%; }
.theme-switch.wide button { flex: 1; width: auto; gap: 6px; display: inline-flex; justify-content: center; font-size: 12px; font-weight: 600; }

.bell { position: relative; }
.bell-count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--grad-brand); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--bg); font-variant-numeric: tabular-nums;
}
.bell.has-alert svg { animation: bellWiggle 4s ease-in-out 1s infinite; transform-origin: 50% 10%; }
@keyframes bellWiggle { 0%, 88%, 100% { transform: rotate(0); } 91% { transform: rotate(12deg); } 94% { transform: rotate(-10deg); } 97% { transform: rotate(5deg); } }

.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 1000;
  width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  transform-origin: top right; animation: menuIn .16s cubic-bezier(.2, .8, .3, 1.2);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.dropdown-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dropdown-item { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none !important; transition: background .12s; }
.dropdown-item:hover { background: var(--hover); }
.dropdown-item:last-child { border-bottom: 0; }
.menu-item {
  display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 12px; margin: 0;
  background: none; border: 0; border-radius: 9px; text-align: left; cursor: pointer; color: inherit; font-weight: 500;
  text-decoration: none !important;
}
.menu-item svg { color: var(--muted); }
.menu-item:hover { background: var(--hover); }
.menu-item:hover svg { color: var(--ink); }
.menu-item:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus); }
.menu-item.danger { color: var(--brand-ink); }
.menu-item.danger svg { color: var(--brand-ink); }
.menu-item.danger:hover { background: var(--brand-50); }
.wrap-rel { position: relative; }
.menu-item.mobile-only { display: none; }

/* Меню пользователя */
.user-menu { width: 272px !important; padding: 0; }
.user-menu-head { display: flex; gap: 12px; align-items: center; padding: 16px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.user-menu-head::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%); pointer-events: none; }
.user-menu-head > * { position: relative; }
.user-menu-head b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-menu-head .muted { font-size: 12px; }
.user-menu-sec { padding: 6px; border-bottom: 1px solid var(--line); }
.user-menu-sec:last-child { border-bottom: 0; }
.user-menu-label { font: 700 10.5px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 8px 8px; }
.role-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--brand-50); color: var(--brand-ink); margin-top: 4px; }

/* Колокольчик: список истекающих */
.bell-days {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-content: center; text-align: center;
  font: 800 16px/1 var(--font-head); font-variant-numeric: tabular-nums;
}
.bell-days small { display: block; font: 600 9px/1 var(--font); margin-top: 2px; opacity: .85; }
.bell-days.crit { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 12px -4px rgba(179, 19, 41, .6); }
.bell-days.warn { background: color-mix(in srgb, var(--brand) 30%, var(--card)); color: var(--ink); }
.bell-days.soft { background: var(--brand-50); color: var(--brand-ink); }
.bell-item-main { min-width: 0; flex: 1; }
.bell-item-main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-item-main .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-item-main .meta { font-size: 12px; color: var(--ink-2); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-body { padding: 18px 20px; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title svg { width: 20px; height: 20px; color: var(--brand-ink); }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  position: relative; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 16px 14px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink);
  transition: transform .15s, border-color .15s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-hover); }
.kpi-label { font-weight: 600; color: var(--ink-2); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi-value { font: 800 32px/1.1 var(--font-head); margin-top: 4px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: var(--grad-brand); border-color: transparent; color: #fff; }
.kpi.accent .kpi-label, .kpi.accent .kpi-sub { color: #fbe2e4; }
.kpi-free { --tone: var(--st-free); }
.kpi-occupied { --tone: var(--st-occupied); }
.kpi-reserved { --tone: var(--st-reserved); }
.kpi-active { --tone: var(--st-active); }
.kpi-ending { --tone: var(--st-ending); }
.kpi-ink { --tone: var(--ink); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent);
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi.accent .kpi-icon { color: #fff; background: rgba(255, 255, 255, .18); }
.kpi-bar { height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; margin: 8px 0 4px; }
.kpi-bar i { display: block; height: 100%; background: var(--tone); border-radius: 0 2px 2px 0; }
.kpi.active { border-color: var(--tone, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone, var(--brand)) 22%, transparent); }
.kpi.accent.active { box-shadow: 0 0 0 3px rgba(179, 19, 41, .3); }

.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.dot-free { background: var(--st-free); }
.dot-occupied { background: var(--st-occupied); }
.dot-reserved { background: var(--st-reserved); }
.dot-active { background: var(--st-active); }
.dot-ending { background: var(--st-ending); }

/* ---------- Badges ----------
   По умолчанию бейджи статусов «мягкие»: тонированный фон + точка + читаемый текст.
   Сплошной вариант — модификатор .badge-solid. */
.badge {
  --tone: var(--muted); --tone-ink: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1;
  color: var(--tone-ink); background: color-mix(in srgb, var(--tone) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
  font-variant-numeric: tabular-nums;
}
.badge-free, .badge-occupied, .badge-reserved, .badge-active, .badge-ending { padding-left: 8px; }
.badge-free::before, .badge-occupied::before, .badge-reserved::before, .badge-active::before, .badge-ending::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--tone) 25%, transparent);
}
.badge-free { --tone: var(--st-free); --tone-ink: var(--st-free-ink); }
.badge-occupied { --tone: var(--st-occupied); --tone-ink: var(--st-occupied-ink); }
.badge-reserved { --tone: var(--st-reserved); --tone-ink: var(--st-reserved-ink); }
.badge-active { --tone: var(--st-active); --tone-ink: var(--st-active-ink); }
.badge-ending { --tone: var(--st-ending); --tone-ink: var(--st-ending-ink); }
.badge-soft { --tone: var(--brand); --tone-ink: var(--brand-ink); }
.badge-grey { --tone: var(--muted); --tone-ink: var(--ink-2); }
.badge-solid { background: var(--tone); color: #fff; box-shadow: none; }
.badge-solid::before { background: #fff; box-shadow: none; }
.badge-solid.badge-reserved { color: #2a1012; }
.badge-solid.badge-reserved::before { background: #2a1012; }

/* ---------- Dashboard map (базовые; раздел переопределяет в dashboard.css) ---------- */
.map-layout {
  display: grid; grid-template-columns: 340px 1fr; gap: 0;
  height: calc(100vh - 250px); min-height: 520px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.map-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.map-side-filters { padding: 16px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.map-side-list { flex: 1; overflow: auto; }
.map-side-count { padding: 10px 16px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.result {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line);
  background: none; text-align: left; cursor: pointer; color: var(--ink);
}
.result:hover, .result.active { background: var(--hover); }
.result .dot { margin-top: 5px; }
.result-title { font-weight: 700; }
.result-sub { font-size: 12px; color: var(--muted); }
.map-wrap { position: relative; min-width: 0; }
.map { position: absolute; inset: 0; background: var(--ph-2); }
.map-legend {
  position: absolute; left: 12px; bottom: 24px; z-index: 500;
  display: flex; flex-wrap: wrap; gap: 6px 14px; max-width: calc(100% - 24px);
  padding: 10px 14px; background: var(--glass); color: var(--ink);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; font-weight: 600;
}
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .dot-ending { box-shadow: 0 0 0 2px var(--ink); width: 12px; height: 12px; }
.map-geo { position: absolute; top: 12px; right: 12px; z-index: 600; width: min(340px, calc(100% - 70px)); }
.map-geo .input { box-shadow: var(--shadow); border-color: transparent; }
.geo-results { margin-top: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.geo-results button { display: block; width: 100%; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; cursor: pointer; font-size: 13px; color: var(--ink); }
.geo-results button:hover { background: var(--hover); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 15px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s;
}
.chip:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--line-2)); background: var(--hover); }
.chip:active { transform: scale(.97); }
.chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chip.on { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-fg); box-shadow: var(--shadow-xs); }
.chip.on .dot { box-shadow: 0 0 0 2px var(--inv-bg); }
.chip.on-free { background: var(--st-free); border-color: var(--st-free); color: #fff; }
.chip.on-ending { background: var(--st-ending); border-color: var(--st-ending); color: #fff; }
.more-filters { display: flex; flex-direction: column; gap: 10px; }
.filters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filters-grid select { height: 36px; font-size: 13px; }
.filters-grid.bar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-ink); font-weight: 600; cursor: pointer; font-size: 12px; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Leaflet: тема ---------- */
.leaflet-container { background: var(--ph-2); font-family: var(--font); }
.leaflet-tile-pane { filter: var(--map-filter); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-lg); padding: 0; overflow: hidden; background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.leaflet-popup-tip { background: var(--card); box-shadow: none; border: 1px solid var(--line); }
.leaflet-popup-content { margin: 0; font: 13px/1.45 var(--font); color: var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: #fff; top: 6px; right: 6px; font-size: 20px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.leaflet-bar { border: 1px solid var(--line-2) !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a, .leaflet-bar a:hover { background-color: var(--card); color: var(--ink); border-bottom-color: var(--line); }
.leaflet-bar a:hover { background-color: var(--hover); }
.leaflet-bar a.leaflet-disabled { background-color: var(--card); color: var(--muted); opacity: .6; }
.leaflet-control-layers { background: var(--card) !important; color: var(--ink); border: 1px solid var(--line-2) !important; box-shadow: var(--shadow) !important; border-radius: 10px !important; font: 600 13px var(--font); }
.leaflet-control-layers-separator { border-top-color: var(--line) !important; }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--muted) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: 8px 0 0 0; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }
.map-ctl { width: 34px; height: 34px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; padding: 0; color: var(--ink); background-clip: padding-box; box-shadow: var(--shadow); }
.map-ctl:hover { background-color: var(--hover); }
.map-ctl svg { width: 18px; height: 18px; }
.map-ctl.busy svg { animation: spin 1s linear infinite; color: var(--brand-ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.leaflet-tooltip.num-label { background: var(--card); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); padding: 1px 6px; font: 700 11px var(--font); color: var(--ink); border-radius: 6px; }
.leaflet-tooltip.num-label::before { display: none; }

/* ---------- Expiring ---------- */
.warn-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.warn-tile { padding: 14px 16px; border-radius: 12px; cursor: pointer; border: 0; text-align: left; transition: transform .15s; }
.warn-tile:hover { transform: translateY(-2px); }
.warn-tile b { display: block; font: 800 30px/1 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.warn-tile span { font-size: 12px; font-weight: 600; }
.warn-30 { background: color-mix(in srgb, var(--brand) 14%, var(--card)); color: var(--ink); }
.warn-15 { background: color-mix(in srgb, var(--brand) 38%, var(--card)); color: var(--ink); }
.warn-7 { background: var(--grad-brand); color: #fff; }
.warn-tile.on { box-shadow: 0 0 0 3px var(--ink); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; padding: 11px 14px; background: var(--card); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--ink); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--hover); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thumb { width: 52px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--grad-brand); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty > svg, .empty-ic {
  display: block; width: 52px; height: 52px; padding: 13px; margin: 0 auto 12px; border-radius: 16px;
  color: var(--brand-ink); background: var(--brand-50);
  box-shadow: inset 0 0 0 1px var(--brand-100), 0 8px 20px -10px rgba(179, 19, 41, .4);
}
.empty b, .empty strong { display: block; color: var(--ink); font: 700 15px/1.3 var(--font-head); margin-bottom: 4px; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .search-input { flex: 1 1 260px; }
.toolbar select { width: auto; min-width: 150px; height: 38px; }

/* ---------- Place card (базовые; раздел переопределяет в place.css) ---------- */

.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Wizard ---------- */
.wizard-body { padding: 22px; }
.wizard-foot { display: flex; justify-content: space-between; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }
.picker-map { height: 420px; border-radius: 12px; border: 1px solid var(--line); }
.picker-wrap { position: relative; }
.picker-wrap .map-geo { top: 10px; right: 10px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.preview { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; border: 3px solid transparent; cursor: pointer; }
.preview.main { border-color: var(--brand); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .tag { position: absolute; left: 6px; top: 6px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.preview .x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--glass); color: var(--ink); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; font-size: 16px; line-height: 1; }
.dropzone { display: block; border: 2px dashed var(--line-2); border-radius: 14px; padding: 34px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-50); color: var(--brand-ink); }
.dropzone svg { width: 34px; height: 34px; margin: 0 auto 8px; }
.seg { display: inline-flex; padding: 4px; background: var(--track); border: 1px solid var(--line); border-radius: 12px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--ink-2); transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review .card { padding: 16px; }
.review h3 { margin-bottom: 10px; }

/* ---------- Reports ---------- */
.tg-steps code, .card code { background: var(--track); color: var(--ink); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* ---------- Analytics ---------- */

/* ---------- Import ---------- */
.stat { padding: 14px 16px; }
.stat b { display: block; font: 800 26px/1.1 var(--font-head); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.ok b { color: var(--st-active-ink); }
.stat.warn b { color: var(--brand-ink); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width .3s; }

/* ---------- Modal ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 2000; background: var(--backdrop);
  -webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2);
  display: grid; place-items: center; padding: 24px; overflow: auto; animation: fade .2s ease;
}
.modal {
  width: min(680px, 100%); background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg);
  animation: pop .26s cubic-bezier(.2, .9, .3, 1.15);
  position: relative; overflow: hidden;
}
.modal::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad-brand); opacity: .9;
}
.modal.wide { width: min(940px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 24px 16px; }
.modal-head h2 { font-size: 20px; letter-spacing: -0.02em; }
.modal-head .btn-icon { border-radius: 50%; color: var(--muted); }
.modal-head .btn-icon:hover { color: var(--ink); }
.modal-body { padding: 6px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px;
  border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.modal-foot .btn { min-width: 110px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }

.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(14, 6, 7, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: grid; place-items: center; animation: fade .2s; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 26px; display: grid; place-items: center; transition: background .15s; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; top: 76px; z-index: 4000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px; border-radius: 14px;
  background: var(--inv-bg); color: var(--inv-fg);
  box-shadow: var(--shadow-lg); max-width: 380px; font-weight: 500;
  animation: toastIn .32s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.out { animation: toastOut .22s ease forwards; }
.toast-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--st-active); color: #fff; }
.toast-ic svg { width: 16px; height: 16px; }
.toast.error { background: var(--grad-brand); color: #fff; }
.toast.error .toast-ic { background: rgba(255, 255, 255, .2); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }

/* ---------- Быстрый поиск (командная палитра) ---------- */
.topbar-search { flex: 0 1 380px; min-width: 0; }
.qs { position: relative; }
.qs-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 8px 0 12px;
  border: 1px solid var(--line-2); border-radius: 11px; background: var(--card); color: var(--muted);
  cursor: pointer; text-align: left; box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.qs-trigger:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line-2)); box-shadow: var(--shadow); }
.qs-trigger:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.qs-trigger svg { width: 17px; height: 17px; flex: none; }
.qs-trigger .qs-ph { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.qs-trigger kbd { flex: none; }
.qs kbd { position: static; transform: none; }

.cmdk-back {
  position: fixed; inset: 0; z-index: 2500; background: var(--backdrop);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  animation: fade .15s ease;
}
.cmdk {
  width: min(640px, 100%); max-height: min(560px, 76vh); display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--brand) 6%, transparent);
  overflow: hidden; animation: pop .22s cubic-bezier(.2, .9, .3, 1.15);
}
.cmdk-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-head > svg { width: 20px; height: 20px; color: var(--brand-ink); flex: none; }
.cmdk-input {
  flex: 1; min-width: 0; height: 58px; border: 0; outline: none; background: none; color: var(--ink);
  font-size: 16px; font-weight: 500;
}
.cmdk-input::placeholder { color: var(--muted); font-weight: 400; }
.cmdk-input::-webkit-search-cancel-button { display: none; }
.cmdk-list { flex: 1; overflow: auto; padding: 8px; overscroll-behavior: contain; }
.cmdk-group { font: 700 10.5px/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 12px 10px 8px; display: flex; justify-content: space-between; }
.qs-item {
  display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 11px;
  color: inherit; text-decoration: none !important; cursor: pointer; position: relative;
  scroll-margin: 8px;
}
.qs-item.active { background: var(--hover); box-shadow: inset 0 0 0 1px var(--line); }
.qs-item.active::before { content: ''; position: absolute; left: -8px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.qs-ic {
  --tone: var(--brand);
  width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center;
  color: var(--tone); background: color-mix(in srgb, var(--tone) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 18%, transparent);
}
.qs-ic svg { width: 18px; height: 18px; }
.qs-ic.st-free { --tone: var(--st-free); }
.qs-ic.st-occupied { --tone: var(--st-occupied); }
.qs-ic.st-reserved { --tone: var(--st-reserved); }
.qs-ic.st-active { --tone: var(--st-active); }
.qs-ic.st-ending { --tone: var(--st-ending); }
.qs-ic.cmd { --tone: var(--ink-2); }
.qs-main { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-main small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.qs-main mark { background: var(--selection); color: inherit; border-radius: 3px; padding: 0 1px; }
.qs-go { width: 16px; height: 16px; color: var(--muted); opacity: 0; flex: none; transition: opacity .12s; }
.qs-item.active .qs-go { opacity: 1; }
.cmdk-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.cmdk-empty svg { width: 44px; height: 44px; padding: 11px; border-radius: 14px; background: var(--track); color: var(--muted); display: block; margin: 0 auto 10px; }
.cmdk-empty b { display: block; color: var(--ink); font-family: var(--font-head); margin-bottom: 2px; }
.cmdk-foot {
  display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--bg) 55%, var(--card));
}
.cmdk-foot span { display: inline-flex; align-items: center; gap: 4px; }
.cmdk-foot .sp { flex: 1; }
.cmdk-foot b { font: 800 11px var(--font-head); letter-spacing: .2em; color: var(--brand-ink); }

/* ---------- Аватар ---------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grad-brand); color: #fff; font: 700 13px var(--font-head); letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.user-btn { padding: 0 10px 0 5px; gap: 8px; border-radius: 22px; height: 38px; }
.user-btn .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.user-btn[aria-expanded=true] .chev { transform: rotate(180deg); }

/* ---------- Photo placeholders ---------- */
.thumb-empty { display: grid; place-items: center; background: repeating-linear-gradient(135deg, var(--ph-1) 0 6px, var(--ph-2) 6px 12px); color: color-mix(in srgb, var(--muted) 60%, transparent); }
.thumb-empty svg { width: 18px; height: 18px; }

/* ---------- Facts strip ---------- */

/* ---------- Login ---------- */
.login {
  position: relative; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--bg); isolation: isolate;
}
.login-hero {
  background: var(--grad-brand); color: #fff;
  padding: 44px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  position: relative; overflow: hidden; isolation: isolate;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 40px 40px;
  -webkit-mask-image: radial-gradient(120% 90% at 30% 40%, #000 40%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 30% 40%, #000 40%, transparent 100%);
}
.login-hero::after { display: none; }
.login-hero > * { position: relative; z-index: 1; }
.login-hero > .login-art { position: absolute; z-index: 0; }
.login-hero h1 { font-size: clamp(32px, 3.6vw, 54px); line-height: 1.06; max-width: 580px; font-weight: 800; letter-spacing: -0.03em; color: #fff; }
.login-hero p { font-size: 17px; opacity: .92; max-width: 460px; margin: 18px 0 0; }
.login-hero .eyebrow { color: #ffd6db; margin-bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 20px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.login-hero .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #7dffb0; box-shadow: 0 0 0 3px rgba(125, 255, 176, .25); }
.login-art { position: absolute; right: -40px; bottom: 30px; width: min(560px, 62%); pointer-events: none; }
.login-art .pulse { transform-box: fill-box; transform-origin: center; animation: mapPulse 2.8s ease-out infinite; }
.login-art .pulse.d1 { animation-delay: .7s; } .login-art .pulse.d2 { animation-delay: 1.4s; } .login-art .pulse.d3 { animation-delay: 2.1s; }
.login-art .route { stroke-dasharray: 6 10; animation: dash 1.6s linear infinite; }
.login-art .float { animation: floaty 6s ease-in-out infinite; }
@keyframes mapPulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes dash { to { stroke-dashoffset: -32; } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
.login-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 12px 14px; max-width: 520px;
  border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 12px; font-weight: 600; color: #fff;
}
.login-legend span { display: inline-flex; align-items: center; gap: 6px; }
.login-legend i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.login-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.login-copy { opacity: .75; font-size: 13px; }
.login-panel {
  position: relative; display: grid; place-items: center; padding: 32px 24px; overflow: hidden;
}
.login-panel::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 40% at 85% 10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(40% 40% at 10% 95%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%),
    radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.2px) 0 0 / 18px 18px;
}
.login-tools { position: absolute; top: 18px; right: 18px; z-index: 2; }
.login-form {
  width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px;
  padding: 32px; border-radius: 22px;
  background: var(--glass); border: 1px solid color-mix(in srgb, var(--line-2) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--shadow-lg);
  animation: pop .4s cubic-bezier(.2, .9, .3, 1.1) both;
}
.login-form h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.025em; }
.login-form .btn { height: 46px; font-size: 15px; }
.login-form .btn-primary svg { transition: transform .15s; }
.login-form .btn-primary:hover svg { transform: translateX(3px); }
.login-mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; margin-bottom: 18px; box-shadow: 0 10px 24px -8px rgba(179, 19, 41, .6); font: 800 18px var(--font-head); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: var(--hover); }
.pw-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.pw-toggle svg { width: 18px; height: 18px; }
.login-demo { font-size: 12px; color: var(--muted); background: color-mix(in srgb, var(--card) 70%, transparent); border: 1px dashed var(--line-2); border-radius: 14px; padding: 12px; }
.login-demo-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; padding: 0 2px; }
.login-demo-head svg { width: 15px; height: 15px; color: var(--brand-ink); }
.login-demo-list { display: grid; gap: 4px; }
.demo-acc {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 9px;
  background: none; color: var(--ink); cursor: pointer; text-align: left; font-size: 12px;
}
.demo-acc:hover { background: var(--hover); }
.demo-acc:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.demo-acc code { color: var(--ink); font-weight: 600; font-size: 12px; }
.demo-acc .role { margin-left: auto; color: var(--muted); }
.demo-acc .avatar { width: 24px; height: 24px; font-size: 10px; }
.login-demo code { color: var(--ink); font-weight: 600; }

/* ---------- Print / PDF (всегда светлая) ---------- */
.print-page {
  --ink: #2a1012; --ink-2: #4b3335; --muted: #7d6b6c; --line: #ece3e0; --line-2: #e0d4d1; --card: #fff; --bg: #fff;
  --brand: #b31329; --brand-ink: #a50f26; --surface-2: #fff; --inv-bg: #2a1012; --inv-fg: #fff; --inv-hover: #45201f; --hover: #f7f1ef;
  color-scheme: light;
  background: #fff; color: #000; padding: 28px; min-height: 100vh;
}
.print-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 18px; }
.print-head .logo { color: var(--brand); padding: 0 0 8px; }
.print-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.print-table th { background: var(--ink); color: #fff; text-align: left; padding: 6px 8px; font-weight: 600; }
.print-table td { border-bottom: 1px solid #ddd; padding: 6px 8px; vertical-align: top; }
.print-table tr:nth-child(even) td { background: #faf6f5; }
.print-total { margin-top: 14px; font-weight: 700; display: flex; gap: 30px; }
.print-bar { display: flex; gap: 10px; margin-bottom: 18px; }
@media print {
  .print-bar { display: none; }
  .print-page { padding: 0; }
  @page { size: A4 landscape; margin: 12mm; }
  .print-table th, .print-table tr:nth-child(even) td, .print-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html, body { background: #fff !important; }
}

/* ---------- Анимации, скелетоны ---------- */
.view-enter { animation: viewIn .32s cubic-bezier(.2, .8, .3, 1) backwards; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

.boot { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.boot-side { background: var(--grad-ink); }
.boot-main { padding: 90px 28px 28px; display: flex; flex-direction: column; gap: 18px; }
.boot-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.sk {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--sk-1) 0%, var(--sk-1) 35%, var(--sk-2) 50%, var(--sk-1) 65%, var(--sk-1) 100%);
  background-size: 250% 100%; animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .topbar-actions > .theme-switch { display: none; }
}
@media (max-width: 1100px) {
  .map-layout { grid-template-columns: 300px 1fr; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .app { grid-template-columns: 1fr; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 1500; overflow: visible;
    flex-direction: row; padding: 6px 8px; gap: 2px; justify-content: space-around; align-items: center;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    background: var(--glass); color: var(--ink);
    -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(42, 16, 18, .25);
  }
  .sidebar::before, .sidebar::after { display: none; }
  .logo, .nav-sep, .nav-user, .nav-link.desktop-only { display: none; }
  .nav-cta, .nav-group { display: none; }
  .nav-link.mobile-nav-only { display: flex; }
  .nav-link[data-nav=map] { order: 1; }
  .nav-link[data-nav=places] { order: 2; }
  .nav-link[data-nav=new] { order: 3; }
  .nav-link[data-nav=analytics] { order: 4; }
  .nav-link[data-nav=reports] { order: 5; }
  .nav-link .nav-full { display: none; }
  .nav-link .nav-short { display: inline; }
  .nav-link {
    flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 10.5px; font-weight: 600; flex: 1;
    text-align: center; border-radius: 12px; color: var(--muted); min-height: 52px; justify-content: center;
  }
  .nav-link svg { width: 22px; height: 22px; opacity: 1; }
  .nav-link:hover { background: none; color: var(--ink); }
  .nav-link.active { background: none; color: var(--brand-ink); box-shadow: none; }
  .nav-link.active svg { color: var(--brand-ink); }
  .nav-link.active::before {
    display: block; left: 50%; top: -6px; bottom: auto; width: 26px; height: 3px; transform: translateX(-50%);
    border-radius: 0 0 3px 3px; background: var(--brand); box-shadow: 0 2px 10px rgba(212, 33, 61, .6);
  }
  .nav-link.active::after {
    content: ''; position: absolute; top: 4px; left: 50%; width: 46px; height: 30px; transform: translateX(-50%); z-index: -1;
    border-radius: 15px; background: var(--brand-50);
  }
  .nav-link { isolation: isolate; }
  /* Центральная кнопка «Добавить» */
  .nav-link[data-nav=new] { color: var(--ink-2); }
  .nav-link[data-nav=new] svg {
    width: 44px; height: 44px; padding: 11px; margin-top: -22px; border-radius: 16px;
    background: var(--grad-brand); color: #fff; box-shadow: 0 8px 20px -6px rgba(179, 19, 41, .65), 0 0 0 4px var(--bg);
  }
  .nav-link[data-nav=new].active::after, .nav-link[data-nav=new].active::before { display: none; }
  .nav-link[data-nav=new].active svg { color: #fff; }
  .boot { grid-template-columns: 1fr; }
  .boot-side { display: none; }
  .boot-kpis { grid-template-columns: repeat(2, 1fr); }
  .page-head h1 { font-size: 24px; }
  .menu-item.mobile-only { display: flex; }
  .topbar { padding: 10px 16px; min-height: 58px; gap: 8px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-search { flex: 0 0 auto; }
  .qs-trigger { width: 38px; padding: 0; justify-content: center; border-radius: 10px; }
  .qs-trigger .qs-ph, .qs-trigger kbd { display: none; }
  .cmdk-back { padding: 10px 10px; align-items: flex-start; }
  .cmdk { max-height: 72vh; }
  .cmdk-foot .hint-keys { display: none; }
  .content { padding: 16px 16px 28px; }
  .map-layout { grid-template-columns: 1fr; grid-template-rows: 60vh auto; height: auto; min-height: 0; }
  .map-wrap { order: -1; min-height: 60vh; }
  .map-side { border-right: 0; border-top: 1px solid var(--line); }
  .map-side-list { max-height: 420px; }
  .grid-2, .grid-3, .review, .report-list { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .filters-grid.bar { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 10px; }
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-hero { padding: 24px 22px 76px; min-height: 0; gap: 18px; }
  .login-hero h1 { font-size: 30px; }
  .login-hero p { font-size: 15px; margin-top: 10px; }
  .login-art { width: 300px; right: -70px; bottom: auto; top: 20px; opacity: .5; }
  .login-legend { display: none; }
  .login-copy { display: none; }
  .login-panel { place-items: start center; padding: 0 16px 32px; overflow: visible; }
  .login-form { margin-top: -56px; padding: 24px 20px; }
  .login-tools { top: 18px; right: 16px; position: absolute; }
  .hide-mobile { display: none !important; }
  .picker-map { height: 340px; }
  .toasts { left: 16px; right: 16px; top: 64px; }
  .toast { max-width: none; }
  /* Таблица → карточки */
  .table.responsive thead { display: none; }
  .table.responsive tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table.responsive td { padding: 0; border: 0; }
  .table.responsive td[data-m='hide'] { display: none; }
  .table.responsive td[data-m='thumb'] { grid-row: span 4; }
  .table.responsive td[data-m='full'] { grid-column: 2 / -1; }
  .table.responsive td.num { text-align: left; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi-label { font-size: 12px; line-height: 1.3; }
  .kpi-value { font-size: 24px; margin-top: 6px; }
  .kpi-sub { display: none; }
  .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis-4 .kpi-value { font-size: 20px !important; }
  .kpis.kpis-4 .kpi-sub { display: block; }
  .warn-tiles { gap: 8px; }
  .warn-tile b { font-size: 24px; }
  .kpi-icon { width: 28px; height: 28px; border-radius: 8px; }
  .kpi-icon svg { width: 15px; height: 15px; }
  .kpi-bar { margin: 4px 0 0; }
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100%; border-radius: 22px 22px 0 0; max-height: 94vh; overflow: auto; animation-name: sheetUp; }
  .modal-head { position: relative; padding-top: 26px; }
  .modal-head::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-2); }
  .modal-foot { position: sticky; bottom: 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; min-width: 0; }
  .page-head .btn { flex: 1; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Пункты, переезжающие в меню пользователя на телефоне */
.mobile-only-sec { display: none; }
@media (max-width: 900px) { .mobile-only-sec { display: block; } }

/* Окно подтверждения */
.confirm-body { display: flex; gap: 14px; align-items: flex-start; }
.confirm-body p { margin: 0; padding-top: 8px; color: var(--ink-2); }
.confirm-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-ink); box-shadow: inset 0 0 0 1px var(--brand-100); }
.confirm-ic svg { width: 20px; height: 20px; }
.form-error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

/* Быстрый поиск: бейдж статуса под адресом на узких экранах */
.qs-main .qs-badge-b { display: none; }
@media (max-width: 600px) {
  .qs-item > .badge, .qs-go { display: none; }
  .qs-main { white-space: normal; }
  .qs-main .qs-t, .qs-main small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .qs-main .qs-badge-b { display: inline-flex; margin-top: 5px; height: 22px; font-size: 11px; }
}
/* Колокольчик: шапка списка закреплена */
[data-bell-menu] .dropdown-head { position: sticky; top: 0; z-index: 1; background: var(--card); }
/* Вход: подсказка демо-доступа */
.login-demo-head { flex-wrap: wrap; }
.login-demo-head .muted { white-space: nowrap; }
:root[data-theme=dark] .login-hero { background: linear-gradient(140deg, #9a1528 0%, #6a0f1c 50%, #2e0a10 100%); }
@media (max-width: 900px) {
  .login-hero .logo { display: flex; }
  .login-panel { position: static; }
  .login-tools { top: 16px; right: 16px; }
  .login-tools .theme-switch { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  .login-tools .theme-switch button { color: rgba(255, 255, 255, .85); }
  .login-tools .theme-switch button[aria-pressed=true] { color: var(--brand-ink); }
  .login-art { opacity: .35; }
}
@media (min-width: 901px) {
  .login-hero { justify-content: flex-end; }
  .login-hero > .logo { margin-bottom: auto; }
  .login-art { top: 70px; bottom: auto; right: -30px; width: min(560px, 66%, 58vh); }
}
