:root {
  /* Шрифтовая пара №2: M PLUS Rounded 1c + Onest */
  --font-h: 'M PLUS Rounded 1c', 'Onest', sans-serif;
  --font-b: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sum: 'M PLUS Rounded 1c', 'Onest', sans-serif;
  --weight-h: 300;
  --weight-n: 100;

  /* Оптическая геометрия канта Liquid Glass */
  --bg-dim: 0.14;
  --rim-w: 0.6px;
  --rim-pill-w: 0.5px;

  /* Цветовая система для прозрачной оптической среды */
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(235, 239, 248, 0.68);
  --text-muted: rgba(220, 226, 240, 0.48);
  --text-high: rgba(255, 255, 255, 0.95);
  --text-mid: rgba(235, 239, 248, 0.70);
  --text-low: rgba(220, 226, 240, 0.48);

  --accent: #63b3ff;
  --accent-light: #89c8ff;
  --accent-dark: #3b8ee6;
  --accent-warm: #ff9852;
  --accent-glow: rgba(99, 179, 255, 0.36);

  --good: #4ee38b;
  --critical: #ff6b6b;
  --warning: #ffd166;
  --sig-ok: #4ee38b;
  --sig-warn: #ffd166;
  --sig-alert: #ff6b6b;
  --sig-alert-bg: rgba(255, 107, 107, 0.14);

  --glass-stage: transparent;
  --glass-surface: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.24));
  --glass-surface-hover: linear-gradient(145deg, rgba(255, 235, 215, 0.15), rgba(44, 38, 34, 0.30));
  --glass-inset: rgba(10, 12, 16, 0.36);
  --border-outer: rgba(255, 255, 255, 0.18);
  --border-inner: rgba(255, 255, 255, 0.11);

  --r-stage: 28px;
  --r-panel: 24px;
  --r-card: 24px;
  --r-ctrl: 14px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(247, 136, 59, 0.42) rgba(10, 12, 16, 0.36);
}

/* Единые полосы прокрутки в стиле Liquid Glass */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 12, 16, 0.38);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24) 0%, rgba(247, 136, 59, 0.44) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.36) 0%, rgba(247, 136, 59, 0.68) 100%);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #0c0d10;
  color: var(--text-high);
  font-family: var(--font-b);
  font-size: 14px;
  line-height: 1.48;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

.sum-serif {
  font-family: var(--font-h);
  font-weight: 300;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.num {
  font-variant-numeric: tabular-nums lining-nums;
}

button, input, textarea, select {
  font-family: var(--font-b);
  font-variant-numeric: tabular-nums lining-nums;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Оптический фон интерьера (жёсткая фиксация 100lvh без рывков на мобильном скролле) */
.bg-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  background-color: #0c0d10;
  background-image: url('./assets/bg-desktop.jpg');
  background-image: image-set(
    url('./assets/bg-desktop.webp') type('image/webp'),
    url('./assets/bg-desktop.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  pointer-events: none;
}

.bg-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(8, 10, 14, 0.05) 0%, rgba(6, 8, 12, var(--bg-dim)) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.16) 0%, rgba(8, 10, 14, var(--bg-dim)) 100%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .bg-scene {
    height: 100vh;
    height: 100lvh;
    background-image: url('./assets/bg-desktop.jpg');
    background-image: image-set(
      url('./assets/bg-mobile.webp') type('image/webp'),
      url('./assets/bg-desktop.jpg') type('image/jpeg')
    );
    background-position: center top;
  }
  .bg-scene::after {
    background:
      radial-gradient(120% 90% at 50% 10%, rgba(8, 10, 14, 0.12) 0%, rgba(6, 8, 12, 0.24) 100%),
      linear-gradient(180deg, rgba(8, 10, 14, 0.22) 0%, rgba(8, 10, 14, 0.28) 100%);
  }
}

/* App Shell */
.app-root {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 18px 18px;
}

@media (min-width: 1024px) {
  .app-root.is-unlocked {
    padding-left: 86px;
  }
}

/* Password Lock Screen */
.lock-wrapper {
  min-height: calc(100dvh - 56px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lock-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 405px;
  padding: 30px 26px 26px;
  border-radius: var(--r-stage);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.13), rgba(28, 25, 24, 0.44));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.48), inset 0 0.5px 0 rgba(255, 255, 255, 0.22);
}

.lock-title {
  margin: 0 0 4px;
  font-family: var(--font-h);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: -0.015em;
}

.lock-sub {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--text-mid);
}

.lock-field {
  position: relative;
  margin-bottom: 13px;
}

.ctrl-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  background: rgba(12, 14, 18, 0.42);
  color: var(--text-high);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ctrl-input:focus {
  border-color: var(--accent);
  background: rgba(12, 14, 18, 0.58);
}

.lock-eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lock-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-mid);
  margin-bottom: 16px;
  cursor: pointer;
  user-select: none;
}

.lock-remember input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}

.btn-warm {
  height: 40px;
  padding: 0 18px;
  border: 0.6px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.38), rgba(99, 179, 255, 0.16));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.26), inset 0 0 14px rgba(99, 179, 255, 0.22);
  color: #fff;
  font-weight: 500;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.14s ease, filter 0.14s ease;
}

.btn-warm:hover {
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.50), rgba(99, 179, 255, 0.24));
  transform: translateY(-1px);
}

.btn-warm:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.065);
  color: var(--text-high);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.36);
}

.lock-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--sig-alert-bg);
  color: var(--sig-alert);
  font-size: 13px;
}

.lock-meta {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-low);
  display: flex;
  justify-content: space-between;
}

/* Spatial Top Window Bar — Liquid Glass Studio Dock */
.spatial-topbar {
  position: relative;
  z-index: 40;
  width: 100%;
  max-width: 1460px;
  height: 50px;
  margin-bottom: 16px;
  padding: 0 14px;
  border-radius: 25px;
  background: linear-gradient(160deg, rgba(22, 25, 32, 0.58) 0%, rgba(12, 14, 18, 0.70) 100%);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 0.6px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.44), inset 0 0.6px 0 rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topbar-spacer {
  width: 210px;
  flex-shrink: 0;
}

.topbar-title-bar {
  flex: 1;
  min-width: 0;
  max-width: 460px;
  height: 34px;
  padding: 0 10px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-mid);
}

.topbar-addr-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-right {
  min-width: 210px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.guide-toggle-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.guide-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-high);
}

.guide-toggle-btn.active {
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.34), rgba(99, 179, 255, 0.14));
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  box-shadow: inset 0 0 12px rgba(99, 179, 255, 0.22);
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-high);
}

.icon-btn.active-eye {
  background: rgba(99, 179, 255, 0.22);
  color: var(--accent-light);
}

.icon-btn.spinning svg {
  animation: spinAnim 0.9s linear infinite;
}

@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

/* Workspace & Left Vertical Capsule Dock */
.spatial-workspace {
  width: 100%;
  max-width: 1460px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.spatial-dock {
  position: fixed;
  left: 14px;
  top: 76px;
  z-index: 35;
  width: 56px;
  padding: 8px 8px;
  border-radius: 30px;
  background: rgba(52, 46, 41, 0.72);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 0.8px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dock-active-thumb {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #F7883B, #C25311);
  box-shadow: 0 6px 18px rgba(232, 111, 36, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.36);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.dock-btn {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(246, 243, 238, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.dock-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.dock-btn.active {
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.dock-label {
  display: none;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.1;
}

.dock-divider {
  width: 24px;
  height: 0.6px;
  background: rgba(255, 255, 255, 0.14);
  margin: 2px 0;
}

.dock-count {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 2;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #F07C2E;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Открытый оптический контейнер: каждый блок внутри преломляет живой интерьер напрямую! */
.spatial-stage {
  flex: 1;
  width: 100%;
  max-width: 1460px;
  min-height: 0;
  padding: 4px 2px 4px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: none;
  box-shadow: none;
  position: relative;
}

/* ---------- Spotlight Training / Onboarding Overlay ---------- */
.tour-backdrop-catcher {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: transparent;
  cursor: pointer;
}

.tour-spotlight-ring {
  position: fixed;
  z-index: 96;
  pointer-events: none;
  border-radius: 24px;
  border: 1.5px solid var(--accent);
  box-shadow:
    0 0 0 9999px rgba(8, 10, 14, 0.80),
    0 0 0 5px rgba(99, 179, 255, 0.20),
    0 18px 50px rgba(0, 0, 0, 0.65);
  transition:
    top 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.tour-popover {
  position: fixed;
  z-index: 98;
  width: min(430px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(155deg, rgba(22, 26, 34, 0.96), rgba(12, 14, 18, 0.98));
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 0.6px solid rgba(99, 179, 255, 0.48);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.78), inset 0 0.6px 0 rgba(255, 255, 255, 0.20);
  color: var(--text-high);
}

.tour-pop-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #90cbff;
  font-weight: 600;
  margin-bottom: 6px;
}

.tour-pop-title {
  margin: 0 0 8px;
  font-family: var(--font-h);
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  letter-spacing: -0.01em;
}

.tour-pop-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(242, 245, 252, 0.90);
  margin-bottom: 14px;
}

.tour-pop-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.tour-pop-body li {
  margin-bottom: 4px;
}

.tour-pop-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 10px;
  margin-bottom: 12px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.10);
}

.tour-sec-chip {
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-mid);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  cursor: pointer;
}

.tour-sec-chip.active {
  background: rgba(99, 179, 255, 0.26);
  border-color: rgba(99, 179, 255, 0.55);
  color: #fff;
}

.tour-pop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- Custom Date Range Picker Bar ---------- */
input[type="date"] {
  color-scheme: dark;
}

.custom-range-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 16px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.10), rgba(22, 25, 32, 0.44));
  backdrop-filter: blur(42px) saturate(165%);
  -webkit-backdrop-filter: blur(42px) saturate(165%);
  border: 0.6px solid rgba(99, 179, 255, 0.34);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

.date-mini-input {
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-high);
  font-size: 13px;
  outline: none;
}

.date-mini-input:focus {
  border-color: var(--accent-light);
}

/* ---------- Insights & Actionable Conclusions Block ---------- */
.insights-panel {
  position: relative;
  isolation: isolate;
  padding: 20px 22px;
  border-radius: var(--r-panel);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(34, 30, 28, 0.28));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.40), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.insights-exec-bar {
  padding: 11px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.34);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-mid);
}

.signal-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.signal-impact {
  font-family: var(--font-h);
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Clear Ranked Apartments Leaderboard (1st, 2nd, 3rd...) ---------- */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-card {
  position: relative;
  isolation: isolate;
  padding: 16px 20px;
  border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(34, 30, 28, 0.26));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.rank-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
}

.rank-card.rank-top-1 {
  background: linear-gradient(135deg, rgba(255, 196, 92, 0.16) 0%, rgba(34, 30, 28, 0.28) 65%);
  border-color: rgba(255, 209, 102, 0.44);
}

.rank-card.rank-top-2 {
  background: linear-gradient(135deg, rgba(164, 205, 255, 0.14) 0%, rgba(34, 30, 28, 0.28) 65%);
  border-color: rgba(164, 205, 255, 0.34);
}

.rank-card.rank-top-3 {
  background: linear-gradient(135deg, rgba(255, 152, 82, 0.15) 0%, rgba(34, 30, 28, 0.28) 65%);
  border-color: rgba(255, 152, 82, 0.36);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-mid);
  flex-shrink: 0;
}

.rank-badge.pos-1 {
  background: linear-gradient(135deg, #F6B756, #CE7A19);
  color: #1A140E;
}

.rank-badge.pos-2 {
  background: linear-gradient(135deg, #E2E6EC, #9FA8B5);
  color: #181A1E;
}

.rank-badge.pos-3 {
  background: linear-gradient(135deg, #E39A6E, #A85B32);
  color: #fff;
}

.rank-rel-bar {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(16, 14, 13, 0.55);
  overflow: hidden;
}

.rank-rel-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

/* ---------- Overview Screen (Reference Two-Column Spatial Grid) ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(310px, 1fr);
  gap: 22px;
  align-items: start;
}

.overview-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.overview-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.overview-main .stage-head {
  margin-bottom: 0;
}

.stage-title {
  margin: 0;
  font-family: var(--font-h);
  font-size: clamp(24px, 2.6vw, 31px);
  font-weight: 300;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.44);
}

.controls-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Unified 3-Metric Strip — Blur · One UI on Overview */
.summary-strip {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 18px 22px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.40), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.summary-cell {
  min-width: 0;
}

.summary-lbl {
  font-size: 12.5px;
  color: rgba(240, 244, 252, 0.80);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.summary-val {
  font-family: var(--font-h);
  font-weight: 100;
  font-size: 31px;
  white-space: nowrap;
}

.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin: 0;
  font-family: var(--font-h);
  font-size: 17px;
  font-weight: 300;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.46);
}

/* Dual-Spline Chart Card — Blur · One UI */
.chart-card {
  position: relative;
  isolation: isolate;
  padding: 20px 22px 16px;
  border-radius: var(--r-panel);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.24));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.40), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.chart-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-title {
  margin: 0;
  font-family: var(--font-h);
  font-size: 16px;
  font-weight: 300;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 12px;
  color: var(--text-mid);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.spline-wrap {
  position: relative;
  width: 100%;
  height: 205px;
  user-select: none;
}

.spline-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(16, 19, 26, 0.84);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  z-index: 5;
}

.tooltip-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--sig-ok);
}

/* Bottom Split Row on Overview */
.overview-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.80fr) minmax(0, 1.34fr);
  gap: 16px;
  align-items: stretch;
}

.overview-bottom-grid > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.goals-pair {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
  align-items: stretch;
}

.goal-card {
  position: relative;
  height: 100%;
  padding: 16px 16px;
  border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.24));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.goal-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.34);
}

.goal-pct {
  font-family: var(--font-h);
  font-weight: 100;
  font-size: 32px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
}

.goal-caption {
  font-size: 12.5px;
  color: var(--text-mid);
}

/* Second Clear · iOS Accent Block on Overview */
.origins-mini-card {
  position: relative;
  flex: 1;
  height: 100%;
  margin-top: 10px;
  padding: 16px 20px;
  border-radius: var(--r-card);
  background: radial-gradient(
    110% 110% at 50% 50%,
    rgba(8, 10, 14, 0.10) 54%,
    rgba(255, 255, 255, 0.08) 88%,
    rgba(255, 255, 255, 0.20) 100%
  );
  backdrop-filter: url(#lg-clear-core) saturate(165%) contrast(1.06);
  -webkit-backdrop-filter: blur(4px) saturate(165%) contrast(1.06);
  border: 0.6px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.42), inset 0 1px 1.5px rgba(255, 255, 255, 0.26);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.68), 0 0 3px rgba(0, 0, 0, 0.52);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.origins-mini-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.46);
}

.origins-mini-amount {
  font-family: var(--font-h);
  font-weight: 100;
  font-size: 28px;
  margin: 4px 0 8px;
}

.curr-accent {
  color: var(--accent);
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 1fr));
  align-items: end;
  gap: 10px;
  height: 92px;
  flex: 1;
  max-width: 340px;
}

.mini-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  height: 100%;
}

.mini-bar-pct {
  font-family: var(--font-h);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(242, 246, 255, 0.9);
  line-height: 1;
}

.mini-bar-rect {
  width: 18px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--accent), rgba(99, 179, 255, 0.45));
  border: 0.5px solid rgba(255, 255, 255, 0.34);
  min-height: 8px;
}

.mini-bar-lbl {
  font-size: 11px;
  font-weight: 500;
  color: rgba(240, 244, 252, 0.92);
  white-space: nowrap;
}

/* Right Column Owner Panel — Clear · iOS Liquid Glass Accent Block on Overview */
.owner-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  background: radial-gradient(
    110% 110% at 50% 50%,
    rgba(8, 10, 14, 0.10) 54%,
    rgba(255, 255, 255, 0.08) 88%,
    rgba(255, 255, 255, 0.20) 100%
  );
  backdrop-filter: url(#lg-clear-core) saturate(165%) contrast(1.06);
  -webkit-backdrop-filter: blur(3px) saturate(165%) contrast(1.06);
  border: 0.6px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.44),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.28),
    inset 0 -1px 1.5px rgba(255, 255, 255, 0.15),
    inset 0 0 18px rgba(255, 255, 255, 0.065);
}

.owner-panel > *:not(.card-meniscus) {
  position: relative;
  z-index: 2;
}

.owner-panel .owner-sub,
.owner-panel .owner-name,
.owner-panel .quick-action-label {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.72), 0 0 3px rgba(0, 0, 0, 0.55);
}

.owner-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.owner-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
}

.owner-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(99, 179, 255, 0.28), rgba(255, 152, 82, 0.24));
  border: 0.8px solid rgba(255, 255, 255, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-weight: 300;
  font-size: 20px;
  margin-bottom: 8px;
}

.owner-sub {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 3px;
}

.owner-name {
  margin: 0;
  font-family: var(--font-h);
  font-size: 18px;
  font-weight: 300;
}

.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.quick-action-btn {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 2px;
}

.quick-action-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.12), rgba(10, 12, 16, 0.42));
  border: 0.6px solid rgba(255, 255, 255, 0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s ease, transform 0.14s ease, border-color 0.15s ease;
}

.quick-action-btn:hover .quick-action-circle {
  background: rgba(99, 179, 255, 0.24);
  border-color: rgba(99, 179, 255, 0.55);
  transform: translateY(-2px);
}

.quick-action-label {
  font-size: 11.5px;
  color: var(--text-mid);
}

.signature-pass-card {
  position: relative;
  height: 152px;
  border-radius: 20px;
  overflow: hidden;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 0.6px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.20);
  background:
    radial-gradient(circle at 18% 24%, rgba(99, 179, 255, 0.42) 0%, transparent 52%),
    radial-gradient(circle at 78% 82%, rgba(255, 152, 82, 0.36) 0%, transparent 55%),
    linear-gradient(140deg, rgba(22, 28, 40, 0.78) 0%, rgba(14, 16, 22, 0.88) 100%);
}

.pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pass-brand {
  font-family: var(--font-h);
  font-weight: 400;
  font-size: 15px;
}

.pass-chip {
  width: 26px;
  height: 19px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(144, 203, 255, 0.35));
  border: 0.6px solid rgba(255, 255, 255, 0.5);
}

.pass-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.pass-amount {
  font-family: var(--font-h);
  font-weight: 100;
  font-size: 27px;
}

.feed-card {
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 12px;
  transition: background 0.14s ease;
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.feed-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.guest-init {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(99, 179, 255, 0.16);
  border: 0.5px solid rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.see-all-bar {
  width: 100%;
  height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
  backdrop-filter: blur(42px) saturate(165%);
  -webkit-backdrop-filter: blur(42px) saturate(165%);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  color: var(--text-high);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.see-all-bar:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
}

/* Custom Liquid Glass Dropdown */
.c-select {
  position: relative;
  display: inline-block;
  min-width: 168px;
  z-index: 5;
}

.c-select.open {
  z-index: 65;
}

.c-select-full {
  display: block;
  width: 100%;
}

.c-select-trigger {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 14px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.24);
  background: rgba(18, 20, 26, 0.56);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  color: var(--text-high);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.c-select-trigger:hover {
  background: rgba(26, 30, 38, 0.68);
  border-color: rgba(255, 255, 255, 0.38);
}

.c-select.open .c-select-trigger {
  border-color: var(--accent);
  background: rgba(99, 179, 255, 0.18);
}

.c-select-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-select-chevron {
  display: inline-flex;
  color: var(--text-mid);
  transition: transform 0.16s ease;
}

.c-select.open .c-select-chevron {
  transform: rotate(180deg);
  color: var(--accent-light);
}

.c-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 99;
  min-width: 100%;
  width: max-content;
  max-width: min(350px, calc(100vw - 32px));
  max-height: 290px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(22, 25, 34, 0.99), rgba(11, 13, 18, 0.995));
  backdrop-filter: blur(32px) saturate(165%);
  -webkit-backdrop-filter: blur(32px) saturate(165%);
  border: 0.8px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.82);
  display: none;
}

.c-select-align-left .c-select-menu,
.c-select-full .c-select-menu {
  left: 0;
  right: auto;
}

.c-select-full .c-select-menu {
  width: 100%;
}

.c-select.open .c-select-menu {
  display: block;
}

.c-select-option {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-mid);
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.c-select-option:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.c-select-option.selected {
  background: rgba(99, 179, 255, 0.22);
  color: #fff;
}

.c-select-check {
  color: var(--accent-light);
  display: inline-flex;
}

/* Segmented Filter Group */
.seg-bar {
  display: inline-flex;
  background: rgba(12, 14, 18, 0.44);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  overflow-x: auto;
  max-width: 100%;
}

.seg-item {
  border: none;
  background: transparent;
  color: var(--text-mid);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.seg-item:hover {
  color: var(--text-high);
}

.seg-item.active {
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.30), rgba(99, 179, 255, 0.12));
  color: #fff;
  box-shadow: inset 0 0 0 0.6px rgba(144, 203, 255, 0.48);
}

.search-input {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  background: rgba(12, 14, 18, 0.46);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: var(--text-high);
  font-size: 13px;
  min-width: 245px;
  outline: none;
}

.search-input:focus {
  border-color: var(--accent);
}

/* Apartments & Arrivals Cards — Blur · One UI */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.item-card {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.38), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.item-card.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.item-card.clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.36);
}

.item-card.alert-edge {
  border-left: 3px solid var(--sig-alert);
}

.apt-metrics-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(10, 12, 16, 0.34);
  font-size: 13px;
}

.port-metrics-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(10, 12, 16, 0.34);
  font-size: 12.5px;
}

.strip-14 {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 3px;
}

.strip-cell {
  height: 21px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.065);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-mid);
}

.strip-cell.booked {
  background: rgba(99, 179, 255, 0.56);
  color: #fff;
  font-weight: 500;
}

.strip-cell.request {
  background: rgba(255, 209, 102, 0.45);
  color: #fff;
}

.strip-cell.orphan {
  box-shadow: inset 0 0 0 1px var(--sig-warn);
  color: var(--sig-warn);
}

.strip-cell.today {
  box-shadow: inset 0 0 0 1.5px #fff;
}

/* Financial Dashboard 2026 Specific Styles */
.kpi-five-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-tile {
  padding: 15px 16px;
  border-radius: var(--r-card);
  background: var(--glass-surface);
  border: 1px solid var(--border-inner);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}

.kpi-tile.signal-loss {
  border-left: 3px solid var(--sig-alert);
  background: linear-gradient(135deg, rgba(242, 125, 114, 0.10), rgba(255, 255, 255, 0.05));
}

.kpi-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-mid);
}

.formula-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 0.6px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 600;
  cursor: help;
  flex-shrink: 0;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.formula-hint:hover,
.formula-hint:focus {
  background: rgba(99, 179, 255, 0.22);
  border-color: rgba(144, 203, 255, 0.55);
  color: #fff;
  outline: none;
}

.formula-hint:hover::after,
.formula-hint:focus::after {
  display: none !important;
}

/* Глобальный плавающий тултип поверх всех карточек без обрезки и наслоения */
.crm-float-tip {
  position: fixed;
  z-index: 9999;
  max-width: 286px;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(16, 18, 24, 0.96);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  border: 0.6px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.68), inset 0 0.5px 0 rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-b);
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.44;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.crm-float-tip.is-open {
  opacity: 1;
  transform: translateY(0);
}

.kpi-main-sum {
  font-size: 23px;
}

.kpi-foot {
  font-size: 12px;
  color: var(--text-mid);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.txt-ok { color: var(--sig-ok); }
.txt-warn { color: var(--sig-warn); }
.txt-alert { color: var(--sig-alert); }
.txt-muted { color: var(--text-low); }

.be-bar-wrap {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: rgba(16, 14, 13, 0.58);
  margin: 4px 0 2px;
  overflow: visible;
}

.be-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.be-marker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(255, 255, 255, 0.78);
}

.be-marker.amort {
  background: var(--sig-warn);
}

.fin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.glass-panel {
  position: relative;
  padding: 20px 22px;
  border-radius: var(--r-card);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.40), inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.glass-panel-warm {
  background:
    radial-gradient(ellipse at 42% 52%, rgba(99, 179, 255, 0.12) 0%, transparent 70%),
    linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.25));
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.panel-title {
  margin: 0;
  font-family: var(--font-h);
  font-size: 17.5px;
  font-weight: 300;
  letter-spacing: -0.01em;
}

.ladder-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ladder-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr) 118px;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13.5px;
}

.ladder-row.is-level {
  background: rgba(255, 255, 255, 0.068);
  font-weight: 600;
}

.ladder-row.is-level-5 {
  background: rgba(99, 179, 255, 0.16);
  border: 0.6px solid rgba(99, 179, 255, 0.40);
}

.ladder-row.is-deduction {
  color: var(--text-mid);
  font-size: 13px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.wf-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 3px;
  background: rgba(16, 14, 13, 0.45);
  position: relative;
  overflow: hidden;
}

.wf-bar-seg {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}

.ladder-val {
  text-align: right;
  white-space: nowrap;
}

.scenario-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 0.6px solid rgba(255, 255, 255, 0.10);
}

.scenario-btn {
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-mid);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.scenario-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.scenario-btn.active {
  background: linear-gradient(135deg, rgba(99, 179, 255, 0.30), rgba(99, 179, 255, 0.12));
  border-color: rgba(144, 203, 255, 0.55);
  color: #fff;
}

.signals-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signal-card {
  padding: 13px 15px;
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.34);
  border: 0.5px solid rgba(255, 255, 255, 0.10);
  border-left: 3px solid var(--text-low);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signal-card.sev-alert {
  border-left-color: var(--sig-alert);
  background: rgba(255, 107, 107, 0.09);
}

.signal-card.sev-warn {
  border-left-color: var(--sig-warn);
}

.signal-card.sev-opportunity {
  border-left-color: var(--sig-ok);
}

.signal-title {
  font-weight: 600;
  font-size: 13.5px;
}

.signal-reason {
  font-size: 13px;
  color: var(--text-mid);
}

.signal-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
  font-size: 12.5px;
}

/* Tables & Matrix */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 20px;
  border: 0.6px solid rgba(255, 255, 255, 0.20);
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.09), rgba(22, 24, 30, 0.44));
  backdrop-filter: blur(42px) saturate(160%);
  -webkit-backdrop-filter: blur(42px) saturate(160%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.36);
}

.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.fin-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-mid);
  padding: 10px 12px;
  border-bottom: 0.6px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.035);
}

.fin-table td {
  padding: 10px 12px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.fin-table tr:last-child td {
  border-bottom: none;
}

.fin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.055);
}

.fin-table .num-col {
  text-align: right;
}

.matrix-input {
  width: 96px;
  height: 32px;
  padding: 0 8px;
  border-radius: 9px;
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 14, 18, 0.52);
  color: var(--text-high);
  font-size: 13px;
  text-align: right;
  outline: none;
}

.matrix-input:focus {
  border-color: var(--accent);
  background: rgba(12, 14, 18, 0.78);
}

.comm-inline-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.comm-pct-input {
  width: 68px;
  height: 32px;
  padding: 0 7px;
  border-radius: 9px;
  border: 0.6px solid rgba(255, 255, 255, 0.18);
  background: rgba(12, 14, 18, 0.52);
  color: var(--text-high);
  font-size: 13px;
  text-align: right;
  outline: none;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.comm-pct-input:focus {
  border-color: var(--accent);
  background: rgba(12, 14, 18, 0.80);
}

.comm-pct-input.is-custom {
  border-color: rgba(99, 179, 255, 0.58);
  background: rgba(99, 179, 255, 0.14);
}

.comm-preset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.fin-table td.comm-note-cell {
  white-space: normal;
  min-width: 200px;
  max-width: 340px;
  line-height: 1.35;
}

.comm-meta-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(99, 179, 255, 0.12);
  border: 0.5px solid rgba(144, 203, 255, 0.25);
  color: #a8d6ff;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
}

.comm-reset-mini {
  border: 0.6px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
}

.comm-reset-mini:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text-high);
}

.chart-svg-box {
  position: relative;
  width: 100%;
  height: 220px;
  user-select: none;
}

.chart-float-tip {
  position: absolute;
  pointer-events: none;
  padding: 8px 11px;
  border-radius: 12px;
  background: rgba(16, 19, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 0.6px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  font-size: 12px;
  z-index: 6;
  white-space: nowrap;
}

/* Chessmate Table */
.chess-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.chess-table th, .chess-table td {
  padding: 8px 6px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
  border-right: 0.5px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  min-width: 58px;
}

.chess-table th.sticky-col, .chess-table td.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(20, 22, 28, 0.94);
  text-align: left;
  min-width: 170px;
  max-width: 200px;
  padding-left: 12px;
  font-weight: 500;
}

.chess-booked {
  background: rgba(99, 179, 255, 0.32);
  color: #fff;
  cursor: pointer;
}

.chess-free {
  cursor: pointer;
  color: var(--text-mid);
}

.chess-free:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* Modal / Bottom Sheet */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(8, 10, 14, 0.66);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  max-height: 88dvh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(150deg, rgba(32, 34, 42, 0.88), rgba(16, 18, 24, 0.94));
  backdrop-filter: blur(48px) saturate(165%);
  -webkit-backdrop-filter: blur(48px) saturate(165%);
  border: 0.6px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.68), inset 0 0.5px 0 rgba(255, 255, 255, 0.20);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.kv-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 13.5px;
}

.kv-row span:first-child {
  color: var(--text-mid);
}

/* Privacy Blur */
body.privacy-masked .maskable {
  filter: blur(7px);
  user-select: none;
}

/* Responsive Mobile First Ergonomics */
@media (max-width: 1180px) {
  .kpi-five-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fin-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1023px) {
  .app-root {
    padding: 10px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .spatial-topbar {
    height: 46px;
    margin-bottom: 10px;
    padding: 0 10px;
  }

  .topbar-spacer {
    display: none;
  }

  .topbar-right {
    min-width: 0;
    width: auto;
  }

  .guide-btn-text {
    display: none;
  }

  .guide-toggle-btn {
    padding: 0 9px;
  }

  .topbar-title-bar {
    justify-content: flex-start;
  }

  .spatial-dock {
    position: fixed;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
    height: 64px;
    padding: 6px 8px;
    border-radius: 26px;
    flex-direction: row;
    justify-content: space-between;
    gap: 4px;
    background: rgba(34, 30, 27, 0.92);
  }

  .dock-active-thumb {
    width: 58px;
    height: 50px;
    border-radius: 16px;
  }

  .dock-divider,
  .dock-logout-desktop,
  .dock-overflow-item {
    display: none !important;
  }

  .dock-more-mobile {
    display: flex !important;
  }

  .dock-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 50px;
    padding: 4px 2px;
    border-radius: 16px;
  }

  .dock-btn svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
  }

  .dock-label {
    display: block;
    font-size: 10.5px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .overview-bottom-grid > div,
  .overview-grid > div,
  .lg-grid > *,
  .stage-head > *,
  .settings-page-pad > *,
  .apt-model-card > * {
    min-width: 0;
    max-width: 100%;
  }

  .seg-bar,
  .fin-quick-jumps {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    max-width: 100%;
    border-radius: 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .seg-bar::-webkit-scrollbar,
  .fin-quick-jumps::-webkit-scrollbar {
    display: none;
  }

  .seg-item,
  .fin-jump-pill {
    flex: 0 0 auto;
    white-space: nowrap;
    border-radius: 10px;
  }

  .spatial-stage {
    padding: 16px 14px 20px;
    border-radius: 22px;
    min-height: auto;
  }

  .overview-grid,
  .overview-bottom-grid,
  .summary-strip,
  .kpi-five-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .summary-cell {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
  }

  .summary-lbl {
    margin-bottom: 0;
  }

  .summary-val {
    font-size: 19px;
  }

  .ladder-row {
    grid-template-columns: minmax(0, 1fr) 108px;
  }

  .ladder-row .wf-bar-track {
    display: none;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .port-metrics-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .c-select-menu {
    left: 0;
    right: auto;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 18px 15px calc(22px + env(safe-area-inset-bottom));
  }

  .fin-subnav-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .fin-subnav-bar .seg-item,
  .comm-preset-seg .seg-item {
    text-align: center;
    padding: 7px 8px;
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .comm-preset-seg {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .comm-pct-input {
    height: 34px;
  }
}


/* ==========================================================================
 * Guided Settings Page, 5-Step Checklist, Apartment Models & Bottom Voice Dock
 * ========================================================================== */
.settings-page-pad {
  padding-bottom: 148px;
}

.settings-hero-card,
.settings-hero-lg {
  padding: 20px 22px;
  margin-bottom: 16px;
}

.settings-lg-panel {
  padding: 20px 22px;
}

.settings-live-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.settings-kpi-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
}

.settings-kpi-lbl {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 5px;
  line-height: 1.3;
}

.settings-kpi-val {
  font-family: var(--font-h);
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 400;
  color: var(--text-high);
  font-variant-numeric: tabular-nums;
}

.settings-bulk-box {
  padding: 13px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.048);
  border: 0.6px solid rgba(255, 255, 255, 0.13);
  margin-bottom: 14px;
}

.shadow-tax-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.shadow-tax-card {
  display: flex;
  flex-direction: column;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
}

.shadow-tax-card.is-current {
  border-color: rgba(255, 138, 61, 0.56);
  background: rgba(255, 138, 61, 0.09);
}

.shadow-tax-card.is-best {
  border-color: rgba(78, 227, 139, 0.55);
  background: linear-gradient(145deg, rgba(78, 227, 139, 0.12), rgba(20, 28, 24, 0.25));
}

.vat-limits-box {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(12, 15, 22, 0.34);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
}

.vat-limits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vat-limit-item {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.042);
  border: 0.6px solid rgba(255, 255, 255, 0.09);
}

.settings-step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  margin-top: 6px;
}

.settings-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.settings-progress-track {
  flex: 1 1 220px;
  height: 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.settings-progress-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--sig-ok));
  transition: width 0.28s ease;
}

.checklist-five-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.chk-step-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 14px 15px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.10), rgba(34, 30, 28, 0.28));
  backdrop-filter: blur(42px) saturate(160%);
  -webkit-backdrop-filter: blur(42px) saturate(160%);
  border: 0.6px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.chk-step-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.32);
}

.chk-step-card.is-active {
  background: linear-gradient(145deg, rgba(99, 179, 255, 0.20), rgba(28, 32, 42, 0.36));
  border-color: rgba(99, 179, 255, 0.58);
}

.chk-step-card.is-done {
  border-color: rgba(78, 227, 139, 0.42);
}

.chk-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chk-step-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
}

.chk-step-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.chk-step-state.done {
  background: rgba(138, 215, 176, 0.16);
  color: var(--sig-ok);
}

.chk-step-state.todo {
  background: rgba(240, 184, 91, 0.15);
  color: var(--sig-warn);
}

.chk-step-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-high);
  line-height: 1.3;
}

.chk-step-sub {
  font-size: 11.5px;
  color: var(--text-mid);
  line-height: 1.3;
}

.option-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.opt-choice-card {
  text-align: left;
  padding: 13px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(255, 255, 255, 0.11);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.opt-choice-card:hover {
  background: rgba(255, 255, 255, 0.09);
}

.opt-choice-card.selected {
  background: rgba(99, 179, 255, 0.17);
  border-color: rgba(99, 179, 255, 0.58);
}

.opt-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 4px;
}

.opt-choice-desc {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.38;
}

.apt-setup-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apt-setup-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.apt-setup-card.is-confirmed {
  border-color: rgba(138, 215, 176, 0.34);
}

.apt-setup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.apt-setup-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  align-items: end;
}

.field-lbl {
  display: block;
  font-size: 11.5px;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.sync-dirty-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 15px;
  border-radius: 13px;
  background: rgba(240, 184, 91, 0.14);
  border: 1px solid rgba(240, 184, 91, 0.42);
  margin-bottom: 14px;
  font-size: 13px;
}

.live-sync-toast {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 85;
  padding: 10px 15px;
  border-radius: 12px;
  background: rgba(26, 36, 30, 0.95);
  border: 1px solid rgba(138, 215, 176, 0.5);
  color: var(--sig-ok);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}

/* Persistent Bottom Voice & Text Setup Assistant Dock */
.setup-dock {
  position: fixed;
  left: 98px;
  right: 22px;
  bottom: 14px;
  z-index: 62;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(22, 25, 32, 0.92), rgba(12, 14, 18, 0.96));
  border: 0.6px solid rgba(99, 179, 255, 0.42);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
  overflow: hidden;
  display: none;
  flex-direction: column;
  max-width: 1120px;
  margin: 0 auto;
}

.setup-dock.is-visible {
  display: flex;
}

.setup-dock.size-collapsed .setup-dock-body {
  display: none;
}

.setup-dock.size-normal .setup-dock-body {
  height: 360px;
}

.setup-dock.size-tall .setup-dock-body {
  height: min(72dvh, 640px);
}

.setup-dock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.045);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.setup-dock.size-collapsed .setup-dock-bar {
  border-bottom: none;
}

.setup-dock-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 13.5px;
}

.setup-mic-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(232, 111, 36, 0.24);
  color: var(--accent-light);
  flex-shrink: 0;
}

.setup-dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.setup-dock-body {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: rgba(16, 14, 13, 0.75);
}

.setup-ai-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  flex: 1 1 auto;
}

.quick-wiz-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 16px;
  gap: 10px;
  overflow-y: auto;
}

.quick-wiz-log {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.qw-msg {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.42;
  max-width: 92%;
}

.qw-msg.bot {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  align-self: flex-start;
}

.qw-msg.user {
  background: rgba(232, 111, 36, 0.24);
  border: 1px solid rgba(232, 111, 36, 0.45);
  align-self: flex-end;
}

.quick-wiz-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mic-rec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  flex-shrink: 0;
}

.mic-rec-btn.recording {
  background: rgba(242, 125, 114, 0.28);
  border-color: var(--sig-alert);
  color: var(--sig-alert);
}

@media (max-width: 1100px) {
  .checklist-five-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-live-kpis,
  .vat-limits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .setup-dock {
    left: 10px;
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .setup-dock.size-normal .setup-dock-body {
    height: 320px;
  }
  .setup-dock.size-tall .setup-dock-body {
    height: calc(74dvh - 80px);
  }
}

@media (max-width: 600px) {
  .checklist-five-grid,
  .settings-live-kpis,
  .vat-limits-grid {
    grid-template-columns: 1fr;
  }
  .settings-hero-lg,
  .settings-lg-panel {
    padding: 16px 14px;
  }
  .setup-dock-sub {
    display: none;
  }
  .setup-dock.size-collapsed .setup-dock-actions #setup-dock-mode-seg,
  .setup-dock.size-collapsed .setup-dock-actions [data-dock-size="collapsed"],
  .setup-dock.size-collapsed .setup-dock-actions [data-dock-size="tall"] {
    display: none;
  }
  .setup-dock.size-collapsed .setup-dock-bar {
    flex-wrap: nowrap;
    padding: 8px 12px;
  }
  .setup-dock.size-collapsed .setup-dock-title {
    font-size: 12.5px;
    min-width: 0;
  }
  .settings-page-pad {
    padding-bottom: 164px;
  }
  .setup-dock-bar {
    padding: 9px 12px;
    flex-wrap: wrap;
  }
}


/* ==========================================================================
 * Two-Level Rules (Network KB + 6-Section Apartment Card & Overrides)
 * ========================================================================== */
.modal-sheet.modal-apt-full {
  max-width: 860px;
  padding: 22px 24px;
}

.apt-card-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}

.apt-tab-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.apt-tab-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-high);
}

.apt-tab-btn.active {
  background: rgba(99, 179, 255, 0.22);
  border-color: rgba(99, 179, 255, 0.58);
  color: var(--text-high);
}

.eff-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 14px;
  font-size: 12px;
}

.eff-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
}

.eff-chip.is-override {
  background: rgba(99, 179, 255, 0.20);
  border: 1px solid rgba(99, 179, 255, 0.48);
  color: #bce0ff;
  font-weight: 600;
}

.override-row-card {
  padding: 13px 15px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.048);
  border: 1px solid rgba(255, 255, 255, 0.10);
  margin-bottom: 10px;
}

.override-row-card.active-override {
  background: rgba(99, 179, 255, 0.11);
  border-color: rgba(99, 179, 255, 0.48);
}

.override-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.apt-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.apt-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ctrl-textarea {
  width: 100%;
  min-height: 66px;
  padding: 9px 11px;
  border-radius: var(--r-ctrl);
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 14, 18, 0.44);
  color: var(--text-high);
  font-size: 13px;
  line-height: 1.4;
  resize: vertical;
}

.ctrl-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .modal-sheet.modal-apt-full {
    padding: 16px 14px calc(22px + env(safe-area-inset-bottom));
  }
  .apt-form-grid-2,
  .apt-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
 * LIQUID GLASS 6-BLOCK FINANCIAL DASHBOARD (Blur · One UI + Clear · iOS)
 * Pair #2: M PLUS Rounded 1c (300 / 100) + Onest
 * ========================================================================== */
.lg-surface {
  position: relative;
  isolation: isolate;
}

.lg-surface::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  padding: var(--rim-w);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    rgba(255, 255, 255, 0.18) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Основной блок: Blur · One UI */
.lg-surface.lg-blur {
  background: linear-gradient(145deg, rgba(255, 235, 215, 0.11), rgba(38, 32, 28, 0.24));
  backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  -webkit-backdrop-filter: blur(52px) saturate(165%) brightness(1.07);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.40),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

/* Акцентные блоки (2–3 на экран): Clear · iOS Liquid Glass */
.lg-surface.lg-clear {
  background: radial-gradient(
    110% 110% at 50% 50%,
    rgba(8, 10, 14, 0.08) 54%,
    rgba(255, 255, 255, 0.075) 88%,
    rgba(255, 255, 255, 0.19) 100%
  );
  backdrop-filter: url(#lg-clear-core) saturate(165%) contrast(1.06);
  -webkit-backdrop-filter: blur(3px) saturate(165%) contrast(1.06);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.44),
    inset 0 1px 1.5px rgba(255, 255, 255, 0.28),
    inset 0 -1px 1.5px rgba(255, 255, 255, 0.15),
    inset 0 0 18px rgba(255, 255, 255, 0.065);
}

.lg-surface.lg-clear::before {
  background: linear-gradient(
    138deg,
    rgba(255, 255, 255, 0.56) 0%,
    rgba(255, 255, 255, 0.15) 23%,
    rgba(255, 255, 255, 0.03) 48%,
    rgba(255, 255, 255, 0.05) 74%,
    rgba(255, 255, 255, 0.34) 100%
  );
}

.lg-surface > .card-meniscus {
  display: none;
}

.lg-surface.lg-clear > .card-meniscus {
  display: block;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  padding: 5px;
  backdrop-filter: url(#lg-bevel-smooth) saturate(185%) brightness(1.06);
  -webkit-backdrop-filter: blur(6px) saturate(185%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.78;
}

.lg-surface.lg-clear h3,
.lg-surface.lg-clear .why,
.lg-surface.lg-clear .kpi-label,
.lg-surface.lg-clear .kpi-value,
.lg-surface.lg-clear .kpi-delta,
.lg-surface.lg-clear .lg-legend-row {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.68), 0 0 3px rgba(0, 0, 0, 0.52);
}

.dash-section {
  margin-bottom: 34px;
}

.sec-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 26px 0 13px;
}

.sec-bar h2 {
  font-family: var(--font-h);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.94);
  margin: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.sec-bar-sub {
  font-size: 12.5px;
  color: rgba(235, 239, 248, 0.68);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.50);
}

.lg-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.s12 { grid-column: span 12; }
.s8  { grid-column: span 8; }
.s7  { grid-column: span 7; }
.s6  { grid-column: span 6; }
.s5  { grid-column: span 5; }
.s4  { grid-column: span 4; }
.s3  { grid-column: span 3; }

@media (max-width: 1080px) {
  .s8, .s7, .s6, .s5, .s4 { grid-column: span 12; }
  .s3 { grid-column: span 6; }
}

@media (max-width: 600px) {
  .s3 { grid-column: span 12; }
}

.lg-card {
  border-radius: 24px;
  padding: 20px 22px 16px;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-b);
}

.lg-card.allow-overflow {
  overflow: visible;
}

.lg-card > *:not(.card-meniscus) {
  position: relative;
  z-index: 2;
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.lg-card h3 {
  font-family: var(--font-h);
  font-weight: var(--weight-h);
  font-size: 18.5px;
  margin: 0 0 4px;
  line-height: 1.26;
  color: var(--text-primary);
}

.lg-card .why {
  font-family: var(--font-b);
  color: var(--text-secondary);
  font-size: 12.5px;
  margin: 0 0 10px;
  line-height: 1.42;
}

.chart {
  width: 100%;
  height: 300px;
}

.chart.tall {
  height: 380px;
}

.chart.short {
  height: 220px;
}

.chart.cal {
  height: 235px;
}

/* Hero KPI Tiles (M PLUS Rounded 1c weight 100 + Onest) */
.lg-kpi .kpi-label {
  font-family: var(--font-b);
  color: var(--text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lg-kpi .kpi-value {
  font-family: var(--font-h);
  font-weight: var(--weight-n);
  font-size: 33px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 4px;
  color: #fff;
}

.lg-kpi .kpi-delta {
  font-family: var(--font-b);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.lg-kpi .kpi-delta.up { color: var(--good); }
.lg-kpi .kpi-delta.down { color: var(--critical); }
.lg-kpi .kpi-delta.neutral { color: var(--text-secondary); }
.lg-kpi .spark { height: 54px; margin: 6px -6px -4px; }

/* Bullet graphs (Stephen Few) */
.bullets {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.bullet {
  display: grid;
  grid-template-columns: 152px 1fr 138px;
  gap: 14px;
  align-items: center;
}

@media (max-width: 640px) {
  .bullet {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.bullet .name {
  font-family: var(--font-b);
  font-weight: 600;
  font-size: 13.5px;
  color: #fff;
}

.bullet .name small {
  display: block;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 11.5px;
}

.bullet .track {
  position: relative;
  height: 24px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
}

.bullet .band {
  position: absolute;
  top: 0;
  bottom: 0;
}

.bullet .bar {
  position: absolute;
  top: 9px;
  height: 6px;
  left: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.65), #ffffff);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.bullet .target {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-warm);
  box-shadow: 0 0 8px rgba(255, 152, 82, 0.8);
}

.bullet .num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 12.5px;
}

.bullet .num b {
  display: block;
  font-family: var(--font-h);
  font-weight: 400;
  font-size: 15.5px;
  color: #fff;
}

.lg-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 0;
  margin-top: 2px;
}

.lg-status.ok {
  color: #6ef0a3;
}

.lg-status.bad {
  color: #ff8787;
}

.lg-legend-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 12px;
}

.lg-legend-row i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: -1px;
  margin-right: 6px;
}

.fin-quick-jumps {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(12, 14, 18, 0.44);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 0.6px solid rgba(255, 255, 255, 0.16);
}

.fin-jump-pill {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-b);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.fin-jump-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.data-source-note {
  font-size: 12px;
  color: rgba(235, 239, 248, 0.62);
}

/* ================= РАЗДЕЛ КОНТРОЛЯ ЗАДАЧ (GGAIDO TASK CONTROL — ЭТАП 1) ================= */
.tc-shift-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  border-radius: 20px;
}

.tc-shift-cell {
  min-width: 0;
}

.tc-shift-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.tc-shift-val {
  font-family: var(--font-h);
  font-weight: 100;
  font-size: 26px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 820px) {
  .tc-shift-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 14px;
  }
  .tc-shift-val {
    font-size: 22px;
  }
}

.tc-toolbar {
  position: relative;
  z-index: 32;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tc-toolbar:has(.c-select.open),
.stage-head:has(.c-select.open),
.controls-bar:has(.c-select.open) {
  position: relative;
  z-index: 95;
}

.tc-row.has-open-menu,
.tc-row:has(.tc-pop-menu) {
  z-index: 90;
  opacity: 1 !important;
}

.lg-card:has(.tc-pop-menu),
.lg-card:has(.c-select.open),
.glass-panel:has(.c-select.open),
.settings-lg-panel:has(.c-select.open) {
  z-index: 70 !important;
  overflow: visible !important;
}

.lg-card > *:has(.c-select.open),
.lg-card > *:has(.tc-pop-menu),
.apt-setup-card:has(.c-select.open),
.apt-setup-fields:has(.c-select.open),
.settings-bulk-box:has(.c-select.open) {
  position: relative;
  z-index: 80 !important;
  overflow: visible !important;
}

.apt-dir-btn.is-asc {
  border-color: rgba(99, 179, 255, 0.55);
  background: rgba(99, 179, 255, 0.16);
  color: #fff;
}

.tc-filters-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.tc-board-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1180px) {
  .tc-board-wrap {
    grid-template-columns: 1fr;
  }
}

.tc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-row {
  position: relative;
  display: grid;
  grid-template-columns: 118px 52px minmax(140px, 1.05fr) minmax(160px, 1.5fr) minmax(135px, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(14, 16, 22, 0.36);
  border: 0.6px solid rgba(255, 255, 255, 0.13);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tc-row:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.tc-row.is-selected {
  background: rgba(99, 179, 255, 0.14);
  border-color: rgba(144, 203, 255, 0.52);
}

.tc-row.is-overdue {
  border-left: 3px solid var(--critical);
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.15) 0%, rgba(14, 16, 22, 0.38) 65%);
}

.tc-row.is-warn {
  border-left: 3px solid var(--warning);
}

.tc-row.is-paused {
  opacity: 0.80;
  font-style: italic;
}

@media (max-width: 860px) {
  .tc-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 13px;
  }
  .tc-row-unit,
  .tc-row-sum,
  .tc-row-assg {
    grid-column: 1 / -1;
  }
}

.tc-timer {
  font-family: var(--font-h);
  font-weight: 400;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.tc-prio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  font-style: normal;
  white-space: nowrap;
}

.tc-prio.p1 { background: rgba(255, 107, 107, 0.22); color: #ff9898; }
.tc-prio.p2 { background: rgba(247, 136, 59, 0.22); color: #ffc08d; }
.tc-prio.p3 { background: rgba(99, 179, 255, 0.18); color: #9ed0ff; }
.tc-prio.p4 { background: rgba(255, 255, 255, 0.09); color: var(--text-secondary); }

.tc-repeat-mark {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-style: normal;
  background: rgba(255, 209, 102, 0.16);
  color: var(--warning);
}

.tc-more-wrap {
  position: relative;
  justify-self: end;
}

.tc-more-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tc-more-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tc-pop-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 70;
  min-width: 210px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(16, 18, 24, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 0.6px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
}

.tc-pop-item {
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 12.5px;
  cursor: pointer;
}

.tc-pop-item:hover {
  background: rgba(99, 179, 255, 0.18);
}

.tc-pop-item.danger {
  color: #ff9494;
}

/* Боковая панель карточки задачи W-02 */
.tc-drawer {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 1180px) {
  .tc-drawer {
    position: relative;
    top: auto;
    max-height: none;
  }
}

.tc-sec-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  margin: 14px 0 6px;
}

.tc-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.tc-tl-item {
  font-size: 12px;
  line-height: 1.42;
}

.tc-tl-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

.tc-chat-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.36);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 8px;
}

.tc-chat-msg {
  font-size: 12px;
  line-height: 1.38;
}

.tc-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tc-kb-col {
  padding: 12px;
  border-radius: 18px;
  background: rgba(12, 14, 18, 0.34);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-kb-card {
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.tc-kb-card.is-selected {
  border-color: rgba(144, 203, 255, 0.56);
  background: rgba(99, 179, 255, 0.14);
}

.tc-alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 15px 18px;
  border-radius: 18px;
  background: rgba(14, 16, 22, 0.40);
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid var(--warning);
  margin-bottom: 10px;
}

.tc-alert-card.critical {
  border-left-color: var(--critical);
  background: linear-gradient(90deg, rgba(255, 107, 107, 0.14) 0%, rgba(14, 16, 22, 0.42) 60%);
}

.tc-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: rgba(99, 179, 255, 0.14);
  border: 0.6px solid rgba(144, 203, 255, 0.40);
}

.tc-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
}

.tc-nav-badge.crit { background: rgba(255, 107, 107, 0.28); color: #ffb3b3; }
.tc-nav-badge.warn { background: rgba(247, 136, 59, 0.28); color: #ffd0a8; }

/* ---------- Task Control Stage 2: W-04, A-02, A-03, A-04, A-06, A-07, A-08 ---------- */
.tc-review-layout {
  display: grid;
  grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 1080px) {
  .tc-review-layout {
    grid-template-columns: 1fr;
  }
}

.tc-review-qitem {
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(14, 16, 22, 0.36);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.tc-review-qitem:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tc-review-qitem.is-selected {
  background: rgba(99, 179, 255, 0.15);
  border-color: rgba(144, 203, 255, 0.56);
}

.tc-review-qitem.has-flags {
  border-left: 3px solid var(--warning);
}

.tc-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

@media (max-width: 900px) {
  .tc-triptych {
    grid-template-columns: 1fr;
  }
}

.tc-photo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px;
  border-radius: 15px;
  background: rgba(10, 12, 16, 0.44);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
}

.tc-photo-card.is-flagged {
  border-color: rgba(255, 190, 92, 0.55);
  background: linear-gradient(180deg, rgba(255, 190, 92, 0.11) 0%, rgba(10, 12, 16, 0.48) 100%);
}

.tc-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 11px;
  overflow: hidden;
  background: #141821;
  border: 0.6px solid rgba(255, 255, 255, 0.12);
}

.tc-photo-frame svg,
.tc-photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tc-watermark {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(8, 10, 14, 0.76);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  font-size: 10.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.90);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.tc-flag-banner {
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(255, 190, 92, 0.14);
  border: 0.6px solid rgba(255, 190, 92, 0.42);
  color: #ffe2ad;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 10px;
}

.tc-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
  border: 0.6px solid rgba(255, 255, 255, 0.26);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.tc-angle-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tc-angle-btn {
  padding: 6px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.tc-angle-btn.active {
  background: rgba(99, 179, 255, 0.20);
  border-color: rgba(144, 203, 255, 0.56);
  color: #ffffff;
}

.tc-angle-btn.flagged {
  border-color: rgba(255, 190, 92, 0.55);
  color: #ffd89b;
}

/* Shift schedule matrix (A-04) */
.tc-shift-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 92px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 0.6px solid rgba(255, 255, 255, 0.15);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transition: transform 0.12s ease, background 0.14s ease;
}

.tc-shift-slot:hover {
  background: rgba(255, 255, 255, 0.13);
}

.tc-shift-slot.morning {
  background: rgba(92, 224, 155, 0.15);
  border-color: rgba(92, 224, 155, 0.36);
  color: #b7f7d3;
}

.tc-shift-slot.day {
  background: rgba(99, 179, 255, 0.16);
  border-color: rgba(144, 203, 255, 0.38);
  color: #cde6ff;
}

.tc-shift-slot.evening {
  background: rgba(247, 136, 59, 0.18);
  border-color: rgba(247, 136, 59, 0.40);
  color: #ffd3ad;
}

.tc-shift-slot.duty {
  background: rgba(186, 148, 255, 0.18);
  border-color: rgba(186, 148, 255, 0.42);
  color: #e4d4ff;
}

.tc-shift-slot.off {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Visual escalation chain & simulation (A-06) */
.tc-chain-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 920px) {
  .tc-chain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .tc-chain-grid {
    grid-template-columns: 1fr;
  }
}

.tc-chain-node {
  padding: 12px;
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.42);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tc-sim-log {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10, 14, 20, 0.55);
  border: 0.6px solid rgba(144, 203, 255, 0.36);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

/* Routing order & Room checklists (A-07, A-08) */
.tc-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(12, 14, 20, 0.38);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 7px;
}

.tc-room-box {
  padding: 13px 15px;
  border-radius: 15px;
  background: rgba(12, 14, 20, 0.36);
  border: 0.6px solid rgba(255, 255, 255, 0.13);
  margin-bottom: 12px;
}

.tc-chk-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  margin-top: 6px;
}

.tc-tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.tc-tag-chip.ok {
  background: rgba(92, 224, 155, 0.18);
  color: #b7f7d3;
}

.tc-tag-chip.warn {
  background: rgba(255, 190, 92, 0.20);
  color: #ffe0a3;
}

/* QR stickers grid (A-02) */
.tc-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 12px;
}

.tc-qr-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px;
  border-radius: 16px;
  background: rgba(12, 14, 20, 0.40);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
}

.tc-qr-card.stale {
  border-color: rgba(255, 190, 92, 0.50);
}

.tc-qr-box {
  width: 78px;
  height: 78px;
  padding: 5px;
  border-radius: 9px;
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 640px) {
  .tc-review-actions {
    flex-direction: column;
    align-items: stretch !important;
  }
  .tc-review-actions .btn-warm,
  .tc-review-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Task Control Stage 3: D-01..D-03, W-08 Cluster Map & PWA Links ---------- */
.tc-map-clusters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.tc-cluster-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(12, 15, 22, 0.42);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.tc-pin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.6px solid rgba(255, 255, 255, 0.10);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tc-pin-row:hover {
  background: rgba(255, 255, 255, 0.10);
}

.tc-pin-row.is-selected {
  border-color: rgba(144, 203, 255, 0.56);
  background: rgba(99, 179, 255, 0.14);
}

.tc-pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tc-pin-dot.crit { background: var(--critical); box-shadow: 0 0 8px rgba(255, 107, 107, 0.7); }
.tc-pin-dot.warn { background: var(--warning); box-shadow: 0 0 8px rgba(247, 136, 59, 0.65); }
.tc-pin-dot.ok { background: var(--good); }

.tc-heat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.tc-heat-0 { background: rgba(255, 255, 255, 0.03); color: var(--text-muted); }
.tc-heat-1 { background: rgba(99, 179, 255, 0.16); color: #cde6ff; }
.tc-heat-2 { background: rgba(255, 190, 92, 0.24); color: #ffe0a3; }
.tc-heat-3 { background: rgba(255, 107, 107, 0.28); color: #ffb8b8; }

.tc-digest-pre {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(8, 10, 15, 0.56);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text-primary);
}

/* ---------- Mobile 5th Tab "Ещё" Slide-Up Sheet, Polished Selects & Onboarding Landing ---------- */
.dock-more-mobile {
  display: none;
}

select.ctrl-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(235,239,248,0.78)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  cursor: pointer;
}

select.ctrl-input option {
  background-color: #141720;
  color: #f4f7fc;
}

/* Tasks dropdowns & mobile subnav polish */
.c-select.open {
  z-index: 125;
}

.tc-subnav-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tc-subnav-mobile {
  display: none;
}

@media (max-width: 860px) {
  .tc-subnav-desktop {
    display: none !important;
  }
  .tc-subnav-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: rgba(12, 14, 18, 0.54);
    border: 0.6px solid rgba(255, 255, 255, 0.16);
  }
  .tc-subnav-mobile .seg-item {
    flex: 1 1 auto;
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
  }
}

@media (max-width: 680px) {
  .tc-filters-group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }
  .tc-filters-group .c-select {
    min-width: 0;
    width: 100%;
  }
  .tc-filters-group .c-select:nth-child(even) .c-select-menu {
    right: 0;
    left: auto;
  }
  .tc-filters-group .c-select:nth-child(odd) .c-select-menu {
    left: 0;
    right: auto;
  }
  .tc-filters-group .c-select-menu {
    max-width: calc(100vw - 36px);
  }
}

/* Slide-up Bottom Sheet ("Ещё" & Tasks Subsections) */
@keyframes sheetSlideUp {
  from {
    opacity: 0;
    transform: translate3d(0, 36px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.more-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(6, 8, 12, 0.64);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.more-sheet-panel {
  width: 100%;
  max-width: 520px;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 12px 16px calc(22px + env(safe-area-inset-bottom));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(160deg, rgba(28, 25, 24, 0.94) 0%, rgba(14, 16, 22, 0.98) 100%);
  backdrop-filter: blur(36px) saturate(165%);
  -webkit-backdrop-filter: blur(36px) saturate(165%);
  border-top: 0.8px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.68);
  animation: sheetSlideUp 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.more-sheet-grabber {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  margin: 0 auto 14px;
}

.more-sheet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.more-sheet-item {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-high);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.more-sheet-item:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.28);
}

.more-sheet-item.is-active {
  background: linear-gradient(135deg, rgba(247, 136, 59, 0.24), rgba(194, 83, 17, 0.14));
  border-color: rgba(247, 136, 59, 0.56);
}

.more-sheet-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.more-sheet-item.is-active .more-sheet-icon {
  background: linear-gradient(145deg, #F7883B, #C25311);
  border-color: rgba(255, 255, 255, 0.34);
}

/* Onboarding Landing Page inside Settings ("Настройки -> Онбординг") */
.onb-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.onb-nav-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 0.6px solid rgba(255, 255, 255, 0.15);
  background: rgba(14, 16, 22, 0.44);
  color: var(--text-mid);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.onb-nav-card:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
}

.onb-nav-card.active {
  background: linear-gradient(135deg, rgba(247, 136, 59, 0.26), rgba(99, 179, 255, 0.14));
  border-color: rgba(247, 136, 59, 0.56);
  color: #fff;
}

.onb-hero {
  position: relative;
  padding: 24px 26px;
  margin-bottom: 16px;
}

.onb-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.onb-step-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(14, 16, 22, 0.42);
  border: 0.6px solid rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onb-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(247, 136, 59, 0.34), rgba(194, 83, 17, 0.22));
  border: 0.6px solid rgba(247, 136, 59, 0.5);
  font-weight: 700;
  font-size: 13px;
  color: #ffd8b5;
}

@media (max-width: 640px) {
  .onb-hero {
    padding: 18px 16px;
  }
  .onb-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
 * Profit Radar (Радар упущенной прибыли: 16 детекторов, Автопилот и графики)
 * ========================================================================== */
.radar-page-wrap {
  padding-bottom: 0;
}

.radar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.radar-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 18px 20px;
}

.radar-kpi-big {
  font-family: var(--font-h);
  font-weight: 300;
  font-size: clamp(23px, 2.3vw, 31px);
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}

.radar-queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 336px;
  overflow-y: auto;
  padding-right: 4px;
}

.radar-finding-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.048);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
}

.radar-finding-card.pending {
  border-color: rgba(240, 184, 91, 0.42);
}

.radar-finding-card.approved,
.radar-finding-card.autopilot {
  border-color: rgba(78, 227, 139, 0.36);
}

.radar-formula-line {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(12, 15, 22, 0.45);
  border: 0.6px dashed rgba(99, 179, 255, 0.36);
  font-size: 12px;
  color: #cfe6ff;
  font-variant-numeric: tabular-nums;
}

.radar-r16-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.radar-r16-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  padding: 12px 14px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.048);
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  color: var(--text-high);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.radar-r16-cell:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 159, 67, 0.48);
  transform: translateY(-1px);
}

.radar-r16-cell.is-core {
  border-style: dashed;
  border-color: rgba(99, 179, 255, 0.42);
  background: rgba(99, 179, 255, 0.06);
}

.radar-r16-cell.is-active {
  background: linear-gradient(135deg, rgba(232, 111, 36, 0.34), rgba(99, 179, 255, 0.22));
  border-style: solid;
  border-color: rgba(255, 165, 89, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.radar-r16-num {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.radar-r16-val {
  font-family: var(--font-h);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--sig-warn);
  font-variant-numeric: tabular-nums;
}

.radar-r16-cell.is-active .radar-r16-val,
.radar-r16-cell.is-active .radar-r16-num {
  color: #fff;
}

.radar-r16-name {
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.25;
}

.radar-r16-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.radar-r16-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(12, 14, 20, 0.48);
  border: 0.6px solid rgba(255, 159, 67, 0.38);
}

.radar-r16-col {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.radar-r16-col.is-solution {
  background: linear-gradient(145deg, rgba(232, 111, 36, 0.42), rgba(164, 68, 16, 0.36));
  border: 0.6px solid rgba(255, 178, 112, 0.52);
}

.radar-r16-step-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 8px;
}

.radar-ap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 15px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
}

.radar-ap-row.is-on {
  border-color: rgba(78, 227, 139, 0.44);
  background: rgba(78, 227, 139, 0.07);
}

@media (max-width: 1120px) {
  .radar-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .radar-r16-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .radar-r16-dock {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .radar-kpi-grid,
  .radar-r16-grid {
    grid-template-columns: 1fr;
  }
  .radar-page-wrap {
    padding-bottom: 12px;
  }
}

/* ==========================================================================
 * Guests CRM & Expenses Ledger (База гостей str_guest_card и Хранилище расходов)
 * ========================================================================== */
.guests-page-wrap,
.expenses-page-wrap {
  padding-bottom: 0;
}

.guest-list-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.guest-list-row {
  width: 100%;
  padding: 12px 13px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  border: 0.6px solid rgba(255, 255, 255, 0.12);
  color: var(--text-high);
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.guest-list-row:hover {
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.24);
}

.guest-list-row.is-active {
  background: linear-gradient(135deg, rgba(247, 136, 59, 0.24), rgba(99, 179, 255, 0.14));
  border-color: rgba(247, 136, 59, 0.6);
}

.guest-list-row.is-risk {
  border-color: rgba(255, 107, 107, 0.45);
}

.guest-avatar-pill {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(247, 136, 59, 0.34), rgba(99, 179, 255, 0.22));
  border: 0.6px solid rgba(255, 255, 255, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-h);
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
}

.guest-avatar-pill.lg {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 16px;
}

.guest-mini-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  color: var(--text-mid);
}

.guest-ai-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14, 17, 24, 0.45);
  border: 0.6px solid rgba(99, 179, 255, 0.34);
}

.guest-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guest-fact-cell {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.042);
  border: 0.6px solid rgba(255, 255, 255, 0.10);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

.guest-fact-cell .txt-muted {
  font-size: 11.5px;
}

@media (max-width: 720px) {
  .guest-facts-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   v26: Universal Glass Selects, Unified Tooltips, Block "?" Hints,
        Classic 3,833 Contacts CRM & Radar Hero Action Conclusions
   ========================================================================== */
.native-select-hidden {
  display: none !important;
}

.c-select-upgraded.is-full-w {
  display: block;
  width: 100%;
  min-width: 0;
}

.c-select-upgraded.is-auto-w {
  display: inline-block;
  width: auto;
  min-width: 184px;
}

.c-select-upgraded.is-full-w .c-select-trigger {
  border-radius: 13px;
}

.c-select-upgraded.compact .c-select-trigger {
  height: 33px;
  padding: 0 10px 0 12px;
  border-radius: 11px;
  font-size: 12.5px;
}

.c-select-upgraded.is-full-w .c-select-menu {
  left: 0;
  right: auto;
  min-width: 100%;
}

.c-select.drop-up .c-select-menu {
  top: auto !important;
  bottom: calc(100% + 6px) !important;
}

.tc-chain-node:has(.c-select.open),
.tc-chain-grid:has(.c-select.open),
.guest-ai-box:has(.c-select.open),
.modal-card:has(.c-select.open),
.table-wrap:has(.c-select.open),
tr:has(.c-select.open),
td:has(.c-select.open) {
  position: relative;
  z-index: 88 !important;
  overflow: visible !important;
}

/* Unified Liquid Glass Tooltip (Financial Dashboard Reference Style) */
.crm-float-tip {
  max-width: 356px;
  padding: 12px 15px;
  border-radius: 15px;
  background: linear-gradient(155deg, rgba(18, 21, 29, 0.96), rgba(11, 13, 19, 0.97));
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 0.7px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.72), inset 0 0.5px 0 rgba(255, 255, 255, 0.18);
}

.tip-sec-title {
  font-family: var(--font-h);
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.tip-sec-body {
  font-family: var(--font-b);
  font-size: 12.5px;
  line-height: 1.46;
  color: rgba(235, 240, 250, 0.9);
}

/* Circular Question-Mark Toggle in Topbar + Per-Block "?" Badges */
.help-circle-toggle {
  border-radius: 999px !important;
}

.help-circle-toggle.active-help {
  background: linear-gradient(145deg, #f7883b, #e3681e) !important;
  border-color: rgba(255, 200, 150, 0.65) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(247, 136, 59, 0.42);
}

.has-block-help {
  position: relative !important;
}

.block-help-badge {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 26 !important;
  width: 22px !important;
  height: 22px !important;
  padding: 0;
  border-radius: 999px;
  border: 0.8px solid rgba(255, 190, 130, 0.68);
  background: linear-gradient(145deg, rgba(247, 136, 59, 0.92), rgba(214, 94, 24, 0.92));
  color: #ffffff;
  font-family: var(--font-h);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.48), 0 0 0 2px rgba(15, 17, 24, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.owner-panel > .block-help-badge {
  top: 23px !important;
  right: 60px !important;
}

.block-help-badge:hover,
.block-help-badge:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 8px 20px rgba(247, 136, 59, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* Structured Tour Value & How-To Boxes */
.tour-val-box,
.tour-how-box {
  padding: 10px 12px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.48;
}

.tour-val-box {
  background: rgba(78, 227, 139, 0.08);
  border: 0.6px solid rgba(78, 227, 139, 0.28);
  margin-bottom: 8px;
}

.tour-how-box {
  background: rgba(255, 255, 255, 0.055);
  border: 0.6px solid rgba(255, 255, 255, 0.15);
}

.tour-sub-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffd8a8;
  margin-bottom: 3px;
}

.tour-sub-lbl.ok {
  color: #7bf1ab;
}

/* Profit Radar Hero Queue & Per-Block Takeaway Footer */
.radar-hero-queue {
  border-color: rgba(247, 136, 59, 0.56) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46), inset 0 0 0 0.6px rgba(247, 136, 59, 0.26) !important;
}

.radar-queue-hero-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 980px) {
  .radar-queue-hero-list {
    grid-template-columns: 1fr;
  }
}

.radar-what-todo-box {
  margin-top: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(247, 136, 59, 0.13);
  border: 0.6px solid rgba(247, 136, 59, 0.4);
  font-size: 12.8px;
  line-height: 1.45;
  color: #ffffff;
}

.block-takeaway-bar {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(247, 136, 59, 0.11), rgba(99, 179, 255, 0.09));
  border: 0.6px solid rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.takeaway-line {
  font-size: 12.8px;
  line-height: 1.46;
  color: var(--text-high);
}

.takeaway-line + .takeaway-line {
  margin-top: 4px;
}

.takeaway-lbl {
  font-weight: 600;
  color: #90cdf4;
}

.takeaway-lbl.act {
  color: #ffb877;
}

/* Classic CRM 3,833 Contacts Table */
.crm-contacts-table tbody tr.crm-contact-tr {
  cursor: pointer;
  transition: background 0.14s ease;
}

.crm-contacts-table tbody tr.crm-contact-tr:hover {
  background: rgba(255, 255, 255, 0.065);
}

.crm-contacts-table tbody tr.crm-contact-tr.is-selected {
  background: linear-gradient(90deg, rgba(247, 136, 59, 0.22), rgba(99, 179, 255, 0.1));
}

/* UAE Adaptation Additions (Р00.2.Б01 RTL, Р00.2.Б03 Topbar Counters, Р00.2.Б05 Slices) */
.rtl-doc {
  direction: rtl;
  text-align: right;
  font-family: 'Noto Sans Arabic', var(--font-b), sans-serif;
  line-height: 1.7;
}

.topbar-alert-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-high);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.14s ease;
}

.topbar-alert-pill:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.topbar-alert-pill.is-warn {
  border-color: rgba(247, 136, 59, 0.52);
  background: rgba(247, 136, 59, 0.16);
  color: #ffd4b0;
}

.topbar-alert-pill.is-danger {
  border-color: rgba(255, 107, 107, 0.56);
  background: rgba(255, 107, 107, 0.16);
  color: #ffc2c2;
}

.topbar-alert-pill .pill-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.uae-lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 0.6px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.uae-slices-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.uae-gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.uae-gate-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 0.6px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.uae-gate-chip.ok {
  border-color: rgba(78, 227, 139, 0.42);
  background: rgba(78, 227, 139, 0.12);
  color: #9bf3bd;
}

.uae-gate-chip.warn {
  border-color: rgba(247, 136, 59, 0.5);
  background: rgba(247, 136, 59, 0.15);
  color: #ffd0a6;
}

.uae-gate-chip.danger {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.16);
  color: #ffb8b8;
}

@media (max-width: 1180px) {
  .topbar-alert-pill .pill-lbl {
    display: none;
  }
}

/* Step 2: Р01 (5-KPI strip, DET Compliance, Voice of Guest) & Р02 (4 Gates, DET Timer, Pre-arrival, Extensions) */
.summary-strip.uae-5kpi {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.summary-strip.uae-5kpi .summary-val {
  font-size: 21px;
}
@media (max-width: 1280px) {
  .summary-strip.uae-5kpi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .summary-strip.uae-5kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.uae-ov-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 960px) {
  .uae-ov-dual-grid {
    grid-template-columns: 1fr;
  }
}

.uae-det-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.uae-det-stat-btn {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 0.6px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-high);
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.uae-det-stat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(247, 136, 59, 0.45);
}
.uae-det-stat-btn.is-danger {
  border-color: rgba(255, 107, 107, 0.48);
  background: rgba(255, 107, 107, 0.11);
}
.uae-det-stat-btn.is-warn {
  border-color: rgba(247, 136, 59, 0.45);
  background: rgba(247, 136, 59, 0.11);
}

.uae-ops-panels-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 1080px) {
  .uae-ops-panels-grid {
    grid-template-columns: 1fr;
  }
}

.uae-mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 0.6px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}
.uae-mini-row.is-danger {
  border-color: rgba(255, 107, 107, 0.5);
  background: rgba(255, 107, 107, 0.1);
}
.uae-mini-row.is-warn {
  border-color: rgba(247, 136, 59, 0.48);
  background: rgba(247, 136, 59, 0.1);
}

.uae-prearrival-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 0.6px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
}
@media (max-width: 640px) {
  .uae-prearrival-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
