/* ==========================================================================
   CRM рієлтора — тема "Blue Neon"
   ========================================================================== */

:root {
  --bg: #060a16;
  --bg-2: #0a1128;
  --panel: rgba(13, 20, 40, 0.72);
  --panel-solid: #0c1327;
  --border: rgba(56, 189, 248, 0.22);
  --border-strong: rgba(56, 189, 248, 0.55);
  --text: #e7edf9;
  --muted: #7c8bad;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-glow: rgba(56, 189, 248, 0.45);
  --cyan: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #4ade80;
  --slate: #64748b;
  --radius: 10px;
  --font-display: 'Orbitron', -apple-system, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* 29.08.2026, повторний production-аудит ("горизонтальний overflow
   dashboard приблизно на 3px"): .dashboard-hub — декоративний
   "hero"-віджет (styles.css нижче) із фоновим шаром на НЕГАТИВНОМУ inset
   (-30px -4%) для м'якого fade-переходу до країв — на вузьких/мобільних
   екранах, де main має менше бічного padding, цей шар ледь вилазить за
   межі viewport і додає горизонтальний скрол усій сторінці. Це загальний
   безпечний запобіжник (а не точковий фікс конкретного шару — ризиковано
   без живого рендеру перевіряти, що саме там "бахромиться"):
   overflow-x:hidden на html/body ніяк не змінює вертикальний скрол чи
   вигляд контенту В МЕЖАХ viewport — лише унеможливлює горизонтальний
   скрол сторінки, яким і так ніхто свідомо не мав користуватись. */
html, body { overflow-x: hidden; }

body {
  font-family: var(--font-body);
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(640px 480px at 110% 10%, rgba(99, 102, 241, 0.14), transparent 55%),
    radial-gradient(900px 600px at 50% 120%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  min-height: 100vh;
  position: relative;
}

/* 29.08.2026, за результатами аудиту ("word-break/overflow-wrap на вузьких
   екранах"): <code> ніде в проєкті не мав жодного стилю — на 360-390px
   довгий нерозривний рядок у <code> (напр. інструкція
   "https://api.telegram.org/bot<ТОКЕН>/getUpdates" в Налаштуваннях →
   Telegram) вилазив би за межі свого <p>, провокуючи горизонтальний скрол
   усієї сторінки. Глобальне правило (а не точковий фікс лише одного
   місця) — те саме, що вже раніше зробили вручну inline-стилем для
   посилання-запрошення на сторінці Команди (тепер це не потрібно,
   правило нижче покриває і його теж). */
code { overflow-wrap: anywhere; word-break: break-word; }

/* тонкі "сканлайни" для кіберпанк-відчуття, ледь помітні й нерухомі,
   щоб не заважати читанню */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(56, 189, 248, 0.035) 0px,
    rgba(56, 189, 248, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

::selection { background: rgba(56, 189, 248, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------------------------------- header ------------------------------- */

header.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 10, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 8px 24px -12px rgba(56, 189, 248, 0.25);
  padding: 0.9rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

header.topbar a.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 10px var(--accent-glow), 0 0 26px rgba(56, 189, 248, 0.25);
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
}

/* R-ONE — основний бренд; "CRM рієлтора" — маленький descriptor під ним
   (не окрема назва). Той самий .brand-text markup у sidebar і в топбарі
   без workspace (логін/реєстрація) — тому стилі тут, а не в .sidebar .brand. */
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { color: #fff; }
.brand-descriptor {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.52em;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-shadow: none;
  text-transform: none;
  margin-top: 0.15rem;
}

header.topbar nav { display: flex; gap: 1.5rem; }

header.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, text-shadow 0.15s ease;
}

header.topbar nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* ------------------------------ sidebar shell ---------------------------- */
/* Постійна ліва навігація для всіх авторизованих сторінок (заміна старої
   горизонтальної шапки з навігацією — сама шапка з брендом лишається на
   сторінках без workspace: логін/реєстрація/помилка). */

.app-shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  width: 240px;
  flex-shrink: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: rgba(6, 10, 22, 0.9);
  backdrop-filter: blur(10px);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 var(--border), 12px 0 32px -20px rgba(56, 189, 248, 0.25);
  padding: 1.1rem 0.85rem;
  overflow-y: auto;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 10px var(--accent-glow), 0 0 26px rgba(56, 189, 248, 0.25);
  padding: 0.35rem 0.5rem 1.1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.6rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.sidebar-link:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.06);
}

.sidebar-link.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--border-strong);
  box-shadow: 0 0 14px -4px rgba(56, 189, 248, 0.4);
}

.sidebar-link.active .sidebar-link-icon { color: var(--accent); text-shadow: 0 0 8px var(--accent-glow); }

.sidebar-link-icon {
  flex-shrink: 0;
  display: flex;
  width: 18px;
  height: 18px;
}
.sidebar-link-icon svg { width: 18px; height: 18px; }

.sidebar-link-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-badge {
  position: static;
  flex-shrink: 0;
}

.sidebar-plan-box {
  margin-top: 0.75rem;
  padding: 0.85rem 0.8rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}

.sidebar-plan-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

.sidebar-plan-status {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
}
/* 29.08.2026: past_due (оплата не пройшла) — єдиний статус підписки, що
   реально вимагає дії від власника оплати, а не просто інформаційний
   (cancelled/expired так само неактивні, але це вже відомий/очікуваний
   стан) — тому саме він отримує кольорове виділення. */
.sidebar-plan-status.warn { color: var(--amber); font-weight: 600; }

.sidebar-plan-btn {
  display: block;
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.72rem;
  padding: 0.4rem 0.6rem;
}

/* -------------------------------- top bar (slim) ------------------------- */

.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

header.topbar-slim {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 10, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 8px 24px -12px rgba(56, 189, 248, 0.25);
  padding: 0.7rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 340px;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  /* 29.08.2026: якір для .topbar-search-results — дропдаун результатів
     глобального пошуку (global-search.js) позиціюється відносно цього
     контейнера, а не всього topbar. */
  position: relative;
}
.topbar-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
  z-index: 40;
  padding: 0.35rem;
}
.topbar-search-group-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.4rem 0.6rem 0.2rem;
}
.topbar-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.45rem 0.6rem;
  border-radius: 7px;
  color: var(--text);
  text-decoration: none;
}
.topbar-search-item:hover,
.topbar-search-item.active { background: var(--panel-hover, rgba(148, 163, 184, 0.1)); }
.topbar-search-item-title { font-size: 0.85rem; }
.topbar-search-item-sub { font-size: 0.74rem; color: var(--muted); }
.topbar-search-empty { padding: 0.6rem; font-size: 0.82rem; color: var(--muted); }
/* 29.08.2026, повторний аудит: явний error-стан дропдауна пошуку (мережева
   помилка / timeout / протухла сесія) — раніше такі випадки мовчки ховали
   дропдаун, що виглядало так, ніби пошук узагалі нічого не робить. */
.topbar-search-error { color: var(--amber); }
.topbar-search-icon { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.7; }
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--muted); }
.topbar-search input:disabled { cursor: not-allowed; }
.topbar-search-kbd {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.05rem 0.35rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.topbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.topbar-icon-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.topbar-icon-btn svg { width: 17px; height: 17px; }

.topbar-badge {
  position: absolute;
  top: -4px;
  right: -4px;
}

.profile-menu { position: relative; }
.profile-menu summary { list-style: none; cursor: pointer; }
.profile-menu summary::-webkit-details-marker { display: none; }

.profile-summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.profile-summary:hover { border-color: var(--border-strong); }

.profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 160px;
  line-height: 1.25;
}
.profile-email {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-role {
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-chevron { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.profile-menu[open] .profile-chevron { transform: rotate(180deg); }

.profile-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 170px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}
.profile-dropdown a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
}
.profile-dropdown a:hover { background: rgba(56, 189, 248, 0.08); color: var(--accent); }
.profile-dropdown form { margin: 0; }
.profile-dropdown .btn { width: 100%; }

/* ----------------------------------- main -------------------------------- */

main {
  position: relative;
  z-index: 1;
  /* Було max-width:1140px — на широких desktop (1440-1920px) це лишало
     контент вузькою центральною колонкою з величезними порожніми полями
     обабіч sidebar. Піднято до 1680px (у межах запрошених 1600-1680px),
     горизонтальний padding — 2.5rem (40px, у межах 32-48px). Це стосується
     лише ширини контейнера: сам .dashboard-hub і .attention-strip нижче
     навмисно мають ВЛАСНИЙ, вужчий max-width (1500px) і власне
     центрування — тому Command Center не розтягується на всю цю ширину
     й лишається просторим, але не "розмазаним" на 1920px. */
  /* width:100% — критично: main є flex-дитиною .app-content
     (.app-content{display:flex;flex-direction:column}), а margin:0 auto
     на flex-item в такому контейнері вимикає стандартний stretch по
     cross-axis (авто-margins "з'їдають" вільний простір замість
     розтягування) — САМЕ ЦЕ й було справжньою причиною звуження: без
     явного width:100% main просідав до content-based (~966px) ширини
     своїх дітей і ІГНОРУВАВ max-width повністю (max-width лише обрізає
     зверху, не змушує рости). З width:100% main коректно заповнює всю
     доступну ширину .app-content, а max-width далі обмежує це на дуже
     великих екранах, з центруванням через margin:auto. */
  width: 100%;
  padding: 2rem 2.5rem 3rem;
  max-width: 1680px;
  margin: 0 auto;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  margin: 0 0 1.25rem;
  color: #fff;
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.3);
}

h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

a { color: var(--accent); }

/* ----------------------------------- table -------------------------------- */

table { width: 100%; border-collapse: collapse; background: transparent; }

th, td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr { transition: background 0.15s ease, box-shadow 0.15s ease; }
tbody tr:hover td {
  background: rgba(56, 189, 248, 0.06);
  box-shadow: inset 3px 0 0 var(--accent);
}

td a { text-decoration: none; font-weight: 600; }
td a:hover { text-shadow: 0 0 8px var(--accent-glow); }

/* ---------------------------------- filters -------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.25rem; }

.filters select, .filters input {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filters select:focus, .filters input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

/* ------------------------------------ buttons ------------------------------ */

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #04101f;
  font-weight: 700;
  padding: 0.55rem 1.05rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35), 0 6px 20px -6px rgba(56, 189, 248, 0.55);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 0 0 1px var(--accent), 0 10px 26px -6px rgba(56, 189, 248, 0.75); }
.btn:active { transform: translateY(0); }

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn.secondary:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 12px rgba(56, 189, 248, 0.25); }

/* 29.08.2026: form-guard.js додає це на submit — захист від подвійного кліку. */
.btn:disabled, button:disabled, input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: none;
  transform: none;
}
form.is-submitting { position: relative; }

/* ------------------------------------- cards -------------------------------- */

.card {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 30px -18px rgba(56, 189, 248, 0.35);
}

/* ------------------------------- фото об'єкта -------------------------------- */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.photo-gallery a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.photo-gallery img { display: block; width: 100%; height: 110px; object-fit: cover; transition: transform .15s ease; }
.photo-gallery a:hover img { transform: scale(1.05); }

.photo-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; flex-shrink: 0; }

/* R-ONE Property Placeholder — заміна колишнього порожнього dashed-квадрата:
   іконка будинку на темному navy-градієнті з тонким cyan glow, використовується
   всюди, де для об'єкта немає фото (Hot Deals, Останні об'єкти). */
.photo-thumb-placeholder {
  flex-shrink: 0;
  width: 56px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.75));
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: inset 0 0 10px rgba(56, 189, 248, 0.12);
  color: var(--accent);
}
.photo-thumb-placeholder svg { width: 18px; height: 18px; opacity: 0.75; }
.photo-thumb-placeholder.small { width: 42px; height: 42px; border-radius: 8px; }
.photo-thumb-placeholder.small svg { width: 16px; height: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }

/* 29.08.2026, повторний production-аудит ("Ринок: базові інструменти
   фільтрації") — сітка полів форми фільтрів market/index.ejs, той самий
   auto-fit/minmax патерн, що й .stat-grid вище, лише вужчі колонки
   (кожне поле фільтра компактніше за статистичну картку). */
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem 1rem; }
.filters-grid label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.82rem; color: var(--muted); }

.stat-tile {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.stat-tile:hover { border-color: var(--border-strong); box-shadow: 0 0 24px -8px rgba(56, 189, 248, 0.45); transform: translateY(-2px); }

.stat-tile .value {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}
.stat-tile .label { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; letter-spacing: 0.02em; }

/* -------------------------------------- forms --------------------------------- */

form.stacked label { display: block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--muted); }
form.stacked input, form.stacked select, form.stacked textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
form.stacked input:focus, form.stacked select:focus, form.stacked textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

/* -------------------------------------- badges -------------------------------- */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--slate);
}

.badge.stage-new { background: rgba(56, 189, 248, 0.12); border-color: rgba(56, 189, 248, 0.5); color: var(--accent); box-shadow: 0 0 10px rgba(56, 189, 248, 0.25); }
.badge.stage-contacted { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.5); color: var(--cyan); box-shadow: 0 0 10px rgba(34, 211, 238, 0.25); }
.badge.stage-viewing { background: rgba(167, 139, 250, 0.14); border-color: rgba(167, 139, 250, 0.5); color: var(--violet); box-shadow: 0 0 10px rgba(167, 139, 250, 0.25); }
.badge.stage-negotiation { background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.5); color: var(--amber); box-shadow: 0 0 10px rgba(251, 191, 36, 0.22); }
.badge.stage-closed_won { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.5); color: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.25); }
.badge.stage-closed_lost { background: rgba(100, 116, 139, 0.14); border-color: rgba(100, 116, 139, 0.4); color: var(--slate); }
/* "Ринок" — оголошення від приватного власника (без агенції-посередника), той самий зелений акцент, що й "закрито успішно". */
.badge.owner { background: rgba(74, 222, 128, 0.14); border-color: rgba(74, 222, 128, 0.5); color: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.25); }

/* -------------------------------------- board (угоди) --------------------------- */

.board { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; }

.board-column {
  min-width: 230px;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
}
.board-column h3 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.board-card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 7px;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.55rem;
  font-size: 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.board-card:hover { border-color: var(--accent); box-shadow: 0 0 16px -4px rgba(56, 189, 248, 0.45); transform: translateY(-1px); }
.board-card a { text-decoration: none; color: var(--text); font-weight: 700; }
.board-card a:hover { color: var(--accent); }

/* -------------------------------------- misc ------------------------------------ */

.muted { color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

/* -------------------------------------- auth (crm-saas) ------------------------- */

.auth-wrap {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-card { width: 100%; max-width: 420px; padding: 2rem 1.75rem; }
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}
.auth-card p.sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 1.5rem; }
.auth-card .btn { width: 100%; margin-top: 0.4rem; text-align: center; }
.auth-card .switch { margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
/* 29.08.2026: чекбокс згоди на реєстрації — той самий компактний inline-стиль,
   що вже є в .ai-compare-checkbox, лише трохи більший розмір шрифту
   (readability для юридичного тексту, а не допоміжної позначки на картці). */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  cursor: pointer;
  margin: -0.2rem 0 0.2rem;
}
.checkbox-label input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; }
.checkbox-label a { color: var(--text); }
.auth-error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #fca5a5;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 1.1rem;
}

/* 29.08.2026, за результатами аудиту: /terms та /privacy — навмисно без
   бічної панелі (публічні, доступні і до входу), тому свій легкий wrap
   замість .app-content. Ширше за .auth-card (420px) — це текст-документ,
   а не форма, 720px лишається читабельним (~75-90 символів у рядку). */
.legal-wrap {
  min-height: 100vh;
  padding: 2.5rem 1.25rem 4rem;
  display: flex;
  justify-content: center;
}
.legal-card { width: 100%; max-width: 720px; padding: 2rem 2.25rem; }
.legal-card h1 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 0.35rem; }
.legal-card .legal-updated { color: var(--muted); font-size: 0.82rem; margin: 0 0 1.5rem; }
.legal-card h2 { font-size: 1.05rem; margin: 1.6rem 0 0.5rem; }
.legal-card p, .legal-card li { line-height: 1.6; font-size: 0.92rem; }
.legal-card ul { padding-left: 1.3rem; }
.legal-disclaimer {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: var(--amber);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
  line-height: 1.55;
}
.legal-back { display: inline-block; margin-bottom: 1.25rem; font-size: 0.85rem; color: var(--muted); }

.trial-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 18px -6px rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}
.trial-banner strong { color: var(--accent); }
.trial-banner.expired {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 18px -6px rgba(251, 191, 36, 0.3);
}
.trial-banner.expired strong { color: var(--amber); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.feature-tile {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
}
.feature-tile .name { font-weight: 700; margin-bottom: 0.2rem; }
.feature-tile.on { border-left: 3px solid var(--green); }
.feature-tile.off { border-left: 3px solid var(--slate, #64748b); opacity: 0.6; }

/* ---------------------- "Потребує уваги" (дашборд, компактна KPI-стрічка) ---
   Заміняє 4 великі секції (Найближчі задачі / Hot Deals / Smart Matches /
   Останні об'єкти) на головному Dashboard — самі модулі й сторінки нижче
   лишаються, це суто інша, компактніша презентація тих самих 4 чисел.
   Висота навмисно невелика (~90-100px разом із заголовком, в межах
   запрошених 80-110px) — тонке glass-скло того ж стилю, що й інші картки
   dashboard-hub/feature-tile (var(--panel)/var(--border)), без важких
   ефектів. */
.attention-strip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1.1rem 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 24px -16px rgba(56, 189, 248, 0.45);
  /* Та сама ширина/центрування, що й у .dashboard-hub вище (1500px) — щоб
     на дуже широких екранах це не була вузька картка посеред величезного
     екрана, а водночас лишалась вирівняною з Command Center над нею. */
  max-width: 1500px;
  margin: 0 auto;
}
.attention-strip-title {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.9;
}
.attention-strip-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}
.attention-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.2rem 0.6rem;
  text-decoration: none;
  color: inherit;
  border-right: 1px solid var(--border);
  border-radius: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}
.attention-item:last-child { border-right: none; }
.attention-item:hover { background: rgba(56, 189, 248, 0.08); transform: translateY(-1px); }
.attention-value {
  /* Було var(--font-display) (Orbitron) — у цього шрифту стилізований "0"
     рендериться як суцільний квадрат із діагональною рискою (виглядає як
     зламана іконка, а не цифра). Усі інші числові значення в проєкті
     (.hub-card-value, .hot-deal-pct тощо) навмисно використовують
     --font-mono саме тому — тут повертаю ту саму конвенцію. */
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}
.attention-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 640px) {
  .attention-strip-row { flex-wrap: wrap; gap: 0.5rem 0; }
  .attention-item { flex: 1 1 50%; border-right: none; }
}

/* ---------------------- тарифні тайли v2 (дашборд, згруповані) --------------- */

.dashboard-section-title {
  /* ~48px до секції тарифу (в межах запрошених 40-64px) — попереднє 2.25rem
     саме собою невелике, але через align-items:start у .dashboard-panels
     (нижче) картки в рядку мали різну висоту, тому НАЙКОРОТШІ колонки
     закінчувались на 60-130px раніше за найдовшу — і саме ця нерівна межа
     читалась як величезний порожній простір перед тарифом, а не сам margin. */
  margin: 3rem 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}

.feature-groups {
  display: grid;
  /* Було repeat(auto-fit, minmax(240px,1fr)) — на реальних desktop-ширинах
     (content ~1084-1120px) auto-fit фактично рахував лише 2 колонки, хоч
     місця вистачало б і на 4. Явні breakpoint'и нижче гарантують саме ту
     поведінку, яку просив користувач: 4 групи в один ряд від 1440px,
     2 колонки на проміжних/планшетних ширинах (базове правило тут),
     1 колонка на мобільних (@media max-width:640px нижче). */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (min-width: 1440px) {
  .feature-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (max-width: 640px) {
  .feature-groups { grid-template-columns: 1fr; }
}

.feature-group {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
}

.feature-group-title {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.feature-group-tiles { display: flex; flex-direction: column; gap: 0.4rem; }

.feature-tile-v2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.feature-tile-v2 .feature-tile-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.feature-tile-v2 .feature-tile-icon svg { width: 13px; height: 13px; }
.feature-tile-v2 .feature-tile-body { display: flex; flex-direction: column; min-width: 0; }
.feature-tile-v2 .feature-tile-label { font-size: 0.82rem; font-weight: 600; }
.feature-tile-v2 .feature-tile-value { font-size: 0.72rem; }

.feature-tile-v2.on {
  background: rgba(74, 222, 128, 0.06);
  border-color: rgba(74, 222, 128, 0.18);
}
.feature-tile-v2.on .feature-tile-icon {
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
}
.feature-tile-v2.off { opacity: 0.62; }
.feature-tile-v2.off .feature-tile-icon {
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
}
.feature-tile-v2.off:hover { opacity: 0.85; background: rgba(148, 163, 184, 0.05); }

/* ------------------------------ opportunity score -------------------------- */

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.score-badge.na { background: rgba(124, 139, 173, 0.14); border: 1px solid rgba(124, 139, 173, 0.3); color: var(--muted); }
.score-badge.low { background: rgba(100, 116, 139, 0.14); border: 1px solid rgba(100, 116, 139, 0.4); color: var(--slate, #94a3b8); }
.score-badge.mid { background: rgba(251, 191, 36, 0.14); border: 1px solid rgba(251, 191, 36, 0.5); color: var(--amber); box-shadow: 0 0 10px rgba(251, 191, 36, 0.22); }
.score-badge.high { background: rgba(74, 222, 128, 0.14); border: 1px solid rgba(74, 222, 128, 0.5); color: var(--green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.25); }

.opportunity-card ul { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: 0.88rem; }
.opportunity-card ul li { margin-bottom: 0.25rem; }

/* ------------------------------ notifications ------------------------------ */

.notif-link { position: relative; }
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1204;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: var(--font-mono);
  vertical-align: middle;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.notif-list { display: flex; flex-direction: column; gap: 0.6rem; }
.notif-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.notif-item.unread { border-color: var(--border-strong); box-shadow: 0 0 14px -4px var(--accent-glow); }
.notif-item .notif-title { font-weight: 700; }
.notif-item .notif-title a { color: var(--text); text-decoration: none; }
.notif-item .notif-title a:hover { color: var(--accent); }
.notif-item .notif-meta { color: var(--muted); font-size: 0.78rem; margin-top: 0.2rem; }
.notif-item form { flex-shrink: 0; }

/* ============================================================================
   Dashboard Hub — центральний "Real Estate Command Center" (тільки home.ejs).
   Нічого з існуючих класів вище не чіпаємо — це суто додаткові стилі.
   ============================================================================ */

.hub-trial-banner { margin-bottom: 1rem; }

.hub-page-head { margin-bottom: 0; }
.hub-page-head h1 { margin-bottom: 0.3rem; }
.hub-page-head p { margin: 0; }

/* 29.08.2026: банер "З чого почати" для щойно створеного (без жодних
   даних) workspace — над радіальним хабом, не замість нього (сам хаб
   лишається видимим, просто з нулями, доки перші дані не з'являться). */
.empty-hub-banner { margin-top: 1.25rem; }
.empty-hub-banner h2 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.empty-hub-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }

/* Hero-композиція дашборду: постійний будинок у центрі, 8 KPI-карток навколо
   нього на "радіальних" (не строго-сіткових) позиціях — за референсом
   користувача. Це БАЗОВІ правила, і вони розраховані математично (не на
   око): будинок max 32% ширини контейнера (не більше 340px), картки 200px,
   і мінімум 24-40px visual clearance між ними на кожній ширині контейнера
   від ~800px до ~1140px. Тому ця radial-композиція вмикається лише від
   1100px viewport (нижче — звичайний стекований grid, як був): на вужчих
   "десктопних" вікнах для будинку + карток обабіч просто фізично не
   вистачає горизонтального місця без накладання. */
.dashboard-hub {
  position: relative;
  isolation: isolate;
  height: 720px;
  /* Власний, вужчий за main max-width (1450-1550px, як просив користувач) —
     Command Center лишається просторим, але не розтягується на всю ширину
     дуже великих екранів (main тепер до 1680px). Це НЕ впливає на безпеку
     від накладання будинку/карток: усі 8 .area-* позиціонуються у % ВІД
     ЦЬОГО контейнера (left:22%/50%/78%, top:16%/50%/84%), а .hub-house має
     width:min(391px, 36.8%) — при будь-якій ширині контейнера ≥ ~1063px
     (391/0.368) будинок вже впирається у свій ABSOLUTE 391px-кап і більше
     не росте, тож розширення контейнера з 1084px (попередній перевірений
     максимум) до 1500px лише розсуває картки (left%) ще далі від центру
     по горизонталі — ніякого нового ризику накладання це не додає
     (перевірено додатково скріншотом на 1920/1728/1440 після деплою).
     Висота (720px, фіксована) і вертикальні позиції карток — не залежать
     від ширини взагалі, тож найгірший вертикальний випадок лишається
     ідентичним раніше перевіреному. */
  max-width: 1500px;
  margin: 2rem auto 3rem;
}

/* Легкий фон hero-зони: перспективна сітка (тепер тихіша, з fade до країв,
   щоб не конкурувала з будинком/картками) + м'яка віньєтка. Частинки —
   окремий шар нижче (.hub-particles), бо їм потрібні власні DOM-вузли для
   drift-анімації, а не просто CSS-градієнт. */
.dashboard-hub::before {
  content: '';
  position: absolute;
  inset: -30px -4%;
  z-index: -1;
  pointer-events: none;
  border-radius: 24px;
  background:
    /* Центральний atmospheric glow за будинком: cyan у центрі → deep blue
       → прозоро, замість однорідної "синьої плями" — три зупинки дають
       відчуття глибини, а не плаского кола. */
    radial-gradient(ellipse 58% 56% at 50% 44%, rgba(34, 211, 238, 0.20), rgba(29, 78, 216, 0.13) 46%, transparent 74%),
    repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.02) 0px, rgba(56, 189, 248, 0.02) 1px, transparent 1px, transparent 46px),
    repeating-linear-gradient(90deg, rgba(56, 189, 248, 0.02) 0px, rgba(56, 189, 248, 0.02) 1px, transparent 1px, transparent 46px),
    radial-gradient(ellipse 72% 72% at 50% 48%, transparent 45%, rgba(6, 10, 22, 0.55) 100%);
  /* fade сітки й glow до країв контейнера — не різкий обрив (трохи щільніший
     fade, ніж раніше, щоб grid/glow ще менше конкурували з будинком і картками) */
  mask-image: radial-gradient(ellipse 66% 66% at 50% 45%, #000 40%, transparent 96%);
  -webkit-mask-image: radial-gradient(ellipse 66% 66% at 50% 45%, #000 40%, transparent 96%);
}

/* Digital-particles шар — 20-50 нерегулярних крапок (генеруються в
   home.ejs з випадковими позиціями/розміром/кольором при кожному
   рендері), частина з дуже повільним drift. НЕ зоряне небо: щільність
   низька, кольори лише з теми (cyan/electric blue/navy), без анімації
   "миготіння". */
.hub-particles {
  position: absolute;
  inset: -30px -4%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  border-radius: 24px;
  mask-image: radial-gradient(ellipse 68% 68% at 50% 45%, #000 45%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 50% 45%, #000 45%, transparent 100%);
}
.hub-particle { position: absolute; border-radius: 50%; }
.hub-particle.glow { box-shadow: 0 0 6px 1.5px currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .hub-particle.drift {
    animation: hub-particle-drift var(--drift-dur, 20s) ease-in-out infinite alternate;
    animation-delay: var(--drift-delay, 0s);
  }
}
@keyframes hub-particle-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(var(--drift-dx, 8px), var(--drift-dy, 8px)); }
}

.hub-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.hub-nodes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
/* Дволанковий "потік даних": широкий розмитий glow-шар позаду і тонка
   чітка core-лінія поверх — замість однієї "технічної" схемної лінії. */
.hub-line-glow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-opacity: 0.16;
  vector-effect: non-scaling-stroke;
  filter: blur(2.5px);
  transition: stroke-opacity 0.22s ease, stroke-width 0.22s ease;
}
.hub-line-core {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-opacity: 0.55;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.5));
  transition: stroke-opacity 0.22s ease, stroke-width 0.22s ease, filter 0.22s ease;
}
/* Вузли на кінці кожної лінії — окремі HTML-елементи (не <circle> у
   non-uniform-масштабованому SVG viewBox, який раніше робив "точку"
   еліпсом): гарантований круглий core ~5px + м'яке halo навколо. */
.hub-node {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 4px 1px rgba(34, 211, 238, 0.55), 0 0 10px 3px rgba(34, 211, 238, 0.22);
  transition: box-shadow 0.22s ease, background 0.22s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .hub-node { animation: hub-dot-pulse 3.2s ease-in-out infinite; }
}
@keyframes hub-dot-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Підсвічуємо обидва шари лінії (і точку на її кінці) тієї картки, яку
   зараз наведено — приблизно на 30-40% яскравіше, без агресивної анімації. */
.dashboard-hub:has(.area-market:hover) .hub-line-glow[data-for="market"],
.dashboard-hub:has(.area-clients:hover) .hub-line-glow[data-for="clients"],
.dashboard-hub:has(.area-deals:hover) .hub-line-glow[data-for="deals"],
.dashboard-hub:has(.area-properties:hover) .hub-line-glow[data-for="properties"],
.dashboard-hub:has(.area-presentations:hover) .hub-line-glow[data-for="presentations"],
.dashboard-hub:has(.area-hotdeals:hover) .hub-line-glow[data-for="hotdeals"],
.dashboard-hub:has(.area-tasks:hover) .hub-line-glow[data-for="tasks"],
.dashboard-hub:has(.area-notifications:hover) .hub-line-glow[data-for="notifications"] {
  stroke-opacity: 0.32;
  stroke-width: 8;
}
.dashboard-hub:has(.area-market:hover) .hub-line-core[data-for="market"],
.dashboard-hub:has(.area-clients:hover) .hub-line-core[data-for="clients"],
.dashboard-hub:has(.area-deals:hover) .hub-line-core[data-for="deals"],
.dashboard-hub:has(.area-properties:hover) .hub-line-core[data-for="properties"],
.dashboard-hub:has(.area-presentations:hover) .hub-line-core[data-for="presentations"],
.dashboard-hub:has(.area-hotdeals:hover) .hub-line-core[data-for="hotdeals"],
.dashboard-hub:has(.area-tasks:hover) .hub-line-core[data-for="tasks"],
.dashboard-hub:has(.area-notifications:hover) .hub-line-core[data-for="notifications"] {
  stroke-opacity: 0.9;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
}
.dashboard-hub:has(.area-market:hover) .hub-node[data-for="market"],
.dashboard-hub:has(.area-clients:hover) .hub-node[data-for="clients"],
.dashboard-hub:has(.area-deals:hover) .hub-node[data-for="deals"],
.dashboard-hub:has(.area-properties:hover) .hub-node[data-for="properties"],
.dashboard-hub:has(.area-presentations:hover) .hub-node[data-for="presentations"],
.dashboard-hub:has(.area-hotdeals:hover) .hub-node[data-for="hotdeals"],
.dashboard-hub:has(.area-tasks:hover) .hub-node[data-for="tasks"],
.dashboard-hub:has(.area-notifications:hover) .hub-node[data-for="notifications"] {
  box-shadow: 0 0 6px 2px rgba(34, 211, 238, 0.85), 0 0 16px 5px rgba(34, 211, 238, 0.35);
}

.hub-house {
  grid-area: house;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  /* 28.08.2026: збільшено ще раз (391px/36.8% → 414px/39.0%), за прямим
     проханням користувача "збільшити будинок з картками на дашборді",
     умова — нічого не зламати. Стара цифра (391/36.8%, "+22.9px на
     cw=1084") була ще з часів, коли main мав max-width:1140px — відтоді
     main підняли до 1680px (див. коментар біля `main` вище), і реальний
     найгірший випадок зсунувся: тепер найтісніше не на cw≈1084, а на
     МІНІМАЛЬНІЙ ширині radial-режиму (cw=780, viewport=1100px, callback
     .area-* лишаються фіксованих 200px — на вузькому контейнері вони
     займають БІЛЬШУ частку простору, ніж будинок, що масштабується у %).
     Перевірено Playwright headless-браузером (не на око) — реальний
     rendered .hub-house (картинка+підпис) проти всіх 8 .hub-card на
     кроці 10px по cw від 780 до 1500: найгірший випадок лишився
     card="presentations" на cw=780, чистий проміжок +13.1px (без жодного
     накладання на всьому діапазоні); наступний крок розміру (+18% від
     старого, тобто ще одне збільшення) вже дає накладання (-3.7px) — тож
     414px/39.0% це свідомо консервативний вибір із запасом, а не
     максимально можливий розмір. */
  width: min(414px, 39.0%);
}

/* Слот під фотореалістичний PNG/WEBP-рендер будинку. Файл покладено за
   /public/assets/rone-dashboard-house.webp — реальний png-оригінал також
   лишається поруч (rone-dashboard-house.png) як джерело, на сайт віддається
   лише webp. Якщо файл колись прибрати/перейменувати — <img> просто не
   завантажиться (onerror) і замість нього покажеться SVG-заглушка
   (partials/dashboard-house.ejs), щоб сторінка не ламалась. */
.hub-house-visual { position: relative; width: 100%; isolation: isolate; }
.hub-house-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(56, 189, 248, 0.22));
}
/* М'яке неонове світіння позаду асета (не поверх нього — z-index нижче
   картинки) для глибини на темному фоні; сам рендер вже містить власне
   підсвічування, тож тут навмисно дуже тонкий шар, а не дублювання. */
.hub-house-visual::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  width: 78%;
  height: 22%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(56, 189, 248, 0.32), transparent 72%);
  filter: blur(18px);
}
/* Platform під будинком: плоский elliptical bloom (замість круглого glow
   вище) + дуже тонке "відображення" — не дзеркальна копія, просто легке
   світлове розмиття внизу, як від підсвіченої підлоги, і кілька дрібних
   яскравих акцентів по краю платформи. */
.hub-house-visual::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4%;
  transform: translateX(-50%);
  width: 66%;
  height: 10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.28), rgba(56, 189, 248, 0.1) 55%, transparent 80%);
  filter: blur(10px);
}
.hub-platform-accents {
  position: absolute;
  left: 50%;
  bottom: 1%;
  transform: translateX(-50%);
  width: 58%;
  height: 4px;
  z-index: -1;
  pointer-events: none;
}
.hub-platform-accents span {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px 1px rgba(34, 211, 238, 0.7);
  opacity: 0.7;
}
.hub-house-svg-wrap { display: none; }
.hub-house-visual.hub-house-fallback .hub-house-img { display: none; }
.hub-house-visual.hub-house-fallback .hub-house-svg-wrap { display: block; }
.hub-house-svg { width: 100%; height: auto; filter: drop-shadow(0 12px 28px rgba(56, 189, 248, 0.25)); }
.hub-house-label { text-align: center; }
.hub-house-logo-halo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.28), inset 0 0 10px rgba(56, 189, 248, 0.1);
}
.hub-house-logo {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 7px;
  background: var(--panel-solid);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
/* Дім лишається головнішим за слоган — тому підпис навмисно тихіший (не
   accent-колір, без text-transform "кричалки", менший glow), ніж було. */
.hub-house-tagline {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.85;
  letter-spacing: 0.03em;
}

.hub-card {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 200px;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(18, 28, 56, 0.85), rgba(10, 16, 36, 0.85));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 0.75rem 0.9rem 0.8rem;
  text-decoration: none;
  color: var(--text);
  /* inset top-highlight (тонка світла лінія вгорі) — типовий прийом
     "premium glass" card, додає скляного відблиску без зміни розміру/кольору */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(56, 189, 248, 0.06), 0 0 22px -12px rgba(56, 189, 248, 0.55);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
/* Позиції прораховані так, щоб бокс будинку (картинка + логотип + підпис
   під ним) НІКОЛИ не перетинався з жодною карткою на всій ширині
   контейнера цього tier (~800-1140px) — з запасом 24-40px. Верхній і
   нижній ряд рознесені по вертикалі (16%/84%), лівий і правий стовпець —
   по горизонталі (16%/84%), самого будинку (50%/50%) вони не чіпають в
   жодній комбінації розмірів. */
.area-market { left: 22%; top: 16%; }
.area-clients { left: 50%; top: 16%; }
.area-deals { left: 78%; top: 16%; }
.area-properties { left: 16%; top: 50%; }
.area-presentations { left: 84%; top: 50%; }
.area-hotdeals { left: 22%; top: 84%; }
.area-tasks { left: 50%; top: 84%; }
.area-notifications { left: 78%; top: 84%; }

.hub-card:hover {
  transform: translate(-50%, -50%) translateY(-3px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.1), 0 14px 32px -14px rgba(56, 189, 248, 0.65);
}

.hub-card-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
}
.hub-card-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(99, 102, 241, 0.28));
  border: 1px solid rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  color: #eaf6ff;
}
.hub-card-icon svg { width: 16px; height: 16px; }
.hub-card:hover .hub-card-icon { box-shadow: 0 0 18px rgba(56, 189, 248, 0.55); }

.hub-card-label { font-size: 0.78rem; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.hub-card-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.4);
}
.hub-card-unit { font-size: 0.7rem; color: var(--muted); }
.hub-card-sub { font-size: 0.7rem; color: var(--green); margin-top: 0.1rem; font-weight: 600; }

/* Hot Deals — теплий акцент, у межах теми (як amber уже використовується для score-badge.mid) */
/* Hot Deals: помаранчевий лишається лише невеликим акцентом (іконка +
   тонкий бордер/glow) — сама картка й далі navy, як усі інші, число —
   звичайний білий (без orange text-shadow, щоб не "фарбувати" всю картку). */
.hub-card.accent-hot { border-color: rgba(251, 146, 60, 0.3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(251, 146, 60, 0.05), 0 0 18px -12px rgba(251, 146, 60, 0.4); }
.hub-card.accent-hot .hub-card-icon { background: linear-gradient(135deg, rgba(251, 146, 60, 0.45), rgba(251, 191, 36, 0.25)); border-color: rgba(251, 146, 60, 0.55); color: #fff7ed; }
.hub-card.accent-hot:hover { border-color: rgba(251, 146, 60, 0.55); box-shadow: 0 14px 32px -14px rgba(251, 146, 60, 0.45); }

/* Задачі з простроченням — subtle warn accent */
.hub-card.accent-warn .hub-card-sub { color: #fb923c; }
.hub-card.accent-warn .hub-card-icon { border-color: rgba(251, 146, 60, 0.5); }

/* ------------------------------ нижні панелі -------------------------------- */

.dashboard-panels {
  display: grid;
  /* Задачі / Hot Deals / Smart Matches / Останні об'єкти — не рівні 1fr:
     Hot Deals і Останні об'єкти мають трохи більше контенту (thumbnail +
     badge / довші назви), тож отримують трохи ширше місце. */
  grid-template-columns: 1fr 1.2fr 1fr 1.1fr;
  gap: 1.1rem;
  /* stretch, а не start: 4 картки мають різну природну висоту (порожній
     стан коротший за список), і з align-items:start нижній край рядка був
     нерівний — коротші колонки закінчувались на 60-130px раніше, що
     виглядало як зайвий порожній простір перед тарифним блоком. Зі stretch
     усі 4 картки вирівнюються по висоті найвищої — рядок має рівний низ. */
  align-items: stretch;
}
.dashboard-panels .card.panel-compact { display: flex; flex-direction: column; }
.dashboard-panels .panel-empty { flex: 1; justify-content: center; }
.dashboard-panels .card { margin-bottom: 0; }
.card.panel-compact { padding: 0.95rem 1rem; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}
.panel-head h2 { margin: 0; }
.panel-head-link { font-size: 0.76rem; color: var(--accent); text-decoration: none; flex-shrink: 0; white-space: nowrap; }
.panel-head-link:hover { text-shadow: 0 0 8px var(--accent-glow); }

/* ------------------------------ компактні рядки задач ------------------------ */

.task-rows { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.7rem; }
.task-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.task-row:hover { border-color: var(--border); background: rgba(56, 189, 248, 0.05); }
.task-row-dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--slate, #64748b); }
.task-row.urgency-today .task-row-dot { background: var(--amber); box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.task-row.urgency-overdue .task-row-dot { background: #fb7185; box-shadow: 0 0 8px rgba(251, 113, 133, 0.6); }
.task-row-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.task-row-title { font-size: 0.84rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row-meta { font-size: 0.72rem; color: var(--muted); }
.task-row-meta a { color: var(--muted); }
.task-row-meta a:hover { color: var(--accent); }
.task-row form { flex-shrink: 0; }
.task-row-done {
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}
.task-row-done svg { width: 13px; height: 13px; }

/* ------------------------------ порожні стани панелей ------------------------ */

.panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 1.1rem 0.5rem 0.6rem;
}
.panel-empty-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border);
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.panel-empty-icon svg { width: 17px; height: 17px; }
.panel-empty-title { font-size: 0.85rem; font-weight: 700; }
.panel-empty-sub { font-size: 0.76rem; max-width: 22ch; }
.panel-empty .btn { margin-top: 0.5rem; }

/* Комбінований селектор (замість самостійного .clamp-2) навмисно — щоб
   однозначно переважати .panel-list-title { white-space: nowrap } нижче,
   незалежно від порядку правил у каскаді (та ж специфічність інакше). */
.panel-list-title.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.25;
}

.panel-list { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 0.85rem; }
.panel-list-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.panel-list-item:hover { border-color: var(--border); background: rgba(56, 189, 248, 0.05); }
.panel-list-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.panel-list-title { font-weight: 700; font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-list-link { font-size: 0.78rem; color: var(--accent); flex-shrink: 0; }

.hot-deal-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }

.hot-deal-pct {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  color: #fb923c;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.avatar-initials {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: var(--violet);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}

/* ------------------------------ responsive ---------------------------------- */

/* Radial hero-композиція математично розрахована на контейнер ≥~800px
   (детальний коментар вище, біля .dashboard-hub) — нижче 1100px viewport
   для будинку + карток обабіч фізично не вистачає горизонтального місця
   без накладання, тож повертаємось до звичайного стекованого grid: будинок
   зверху на всю ширину, картки під ним по 2 в ряд. Це навмисно ширший поріг,
   ніж у sidebar (960px) нижче — то окрема, вужча умова. */
@media (max-width: 1099px) {
  .dashboard-hub {
    display: grid;
    position: static;
    height: auto;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "house       house"
      "market      clients"
      "deals       properties"
      "presentations hotdeals"
      "tasks       notifications";
    gap: 0.85rem;
  }
  .dashboard-hub::before { display: none; }
  .hub-lines { display: none; }
  .hub-house { position: static; transform: none; width: auto; max-width: 420px; margin: 0 auto; padding: 1rem 0; }
  .hub-house-svg { width: 100%; }
  .hub-card {
    position: static;
    z-index: auto;
    width: auto;
    transform: none;
  }
  .hub-card:hover { transform: translateY(-3px) scale(1.01); }
  .dashboard-panels { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  /* icon-only рейка замість повної sidebar з підписами — на цю ширину вже
     немає сенсу тримати 240px постійно зайнятими під текст пунктів меню */
  .sidebar { width: 64px; padding: 1.1rem 0.4rem; align-items: center; }
  .sidebar .brand { padding: 0.35rem 0 1.1rem; justify-content: center; }
  .sidebar .brand-text { display: none; }
  .sidebar-link { justify-content: center; padding: 0.6rem; }
  .sidebar-link-label, .sidebar-plan-box { display: none; }
  .sidebar-badge { position: absolute; top: 2px; right: 2px; font-size: 0.62rem; padding: 0.05rem 0.35rem; }
  .topbar-search { max-width: 220px; }
  .profile-info { display: none; }
}

@media (max-width: 640px) {
  .sidebar { width: 52px; }
  header.topbar-slim { padding: 0.6rem 0.85rem; gap: 0.6rem; }
  .topbar-search { display: none; }

  .dashboard-hub {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "house       house"
      "market      clients"
      "deals       properties"
      "presentations hotdeals"
      "tasks       notifications";
    gap: 0.75rem;
  }
  .hub-house { max-width: 300px; }
  .hub-card { padding: 0.8rem 0.85rem; gap: 0.4rem; }
  .hub-card-value { font-size: 1.25rem; }
  .dashboard-panels { grid-template-columns: 1fr; }
  header.topbar { flex-wrap: wrap; gap: 0.75rem; padding: 0.75rem 1rem; }
  header.topbar nav { gap: 0.85rem; flex-wrap: wrap; }
  main { padding: 1.25rem 1rem 2rem; }

  /* Списки (об'єкти/клієнти/угоди/адмін-таблиці — 20 різних .ejs, тому
     фікс тут один, глобальний, а не в кожному шаблоні окремо) на телефоні
     фізично не влазять по ширині (7-9 колонок). display:block на самій
     <table> перетворює її на звичайний блок зі скролом, а thead/tbody/tr/td
     лишаються зі стандартним table-* display з UA-стилів — браузер сам
     будує анонімний table-box навколо них, тож розмітка колонок не ламається,
     просто весь блок тепер скролиться вбік пальцем, а не стискає комірки
     в нечитабельну кашу. white-space:nowrap — щоб довгі адреси/назви не
     переносились по буквах, а саме розширювали таблицю (і провокували скрол). */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { white-space: nowrap; }

  /* 29.08.2026, за результатами аудиту ("верифікація 360-390px"): .notif-item
     (Сповіщення/AI Асистент/Smart Match — усі три використовують один і той
     самий клас) — фото + текст + блок дій в один ряд (justify-content:
     space-between, без flex-wrap на самому .notif-item). На AI Асистенті
     блок дій сам по собі — 2-4 кнопки з довгим українським текстом
     ("AI: Підготувати повідомлення") — разом із фото (56px) і текстом це
     фізично не влазить у 360-390px без стиснення в кашу. Стек в колонку
     на вузьких екранах: фото+текст зверху, кнопки дій під ними на всю
     ширину (де їм і так уже потрібен flex-wrap, який був заданий inline
     в ai-assistant/index.ejs/smart-match/index.ejs).
  */
  .notif-item { flex-direction: column; align-items: stretch; }
  .notif-item-actions { width: 100%; }

  /* Touch-таргети (WCAG 2.5.5 / Apple-Google guideline ~44×44px):
     .sidebar-link у мобільному icon-only режимі (@media 960px вище) мав
     висоту лише ~37px (18px іконка + 2×0.6rem padding) — трохи менше
     мінімуму. .topbar-icon-btn (дзвіночок сповіщень) — фіксовані 36×36px
     на будь-якій ширині. Обидва підняті рівно до 44px лише тут (мобільний
     контекст — на десктопі з мишею це не потрібно). */
  .sidebar-link { padding: 0.85rem 0.6rem; }
  .topbar-icon-btn { width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  /* Найвужчі телефони (iPhone SE/mini — 375px і менше): ще трохи стискаємо
     відступи й таблиці, щоб корисного контенту влазило більше без скролу. */
  main { padding: 1rem 0.75rem 1.75rem; }
  th, td { padding: 0.5rem 0.6rem; font-size: 0.8rem; }
  h1 { font-size: 1.25rem; }
}

/* ==========================================================================
   AI Асистент (Етап 2) — спільна модалка для "Чому цей варіант?" /
   "Підготувати повідомлення" / "Порівняти об'єкти" (public/ai-assistant.js,
   partials/ai-modal.ejs) + чекбокси порівняння. Компактна панель у тому
   самому dark/cyan стилі, що й решта R-ONE — свідомо НЕ окремий
   ChatGPT-подібний інтерфейс.
   ========================================================================== */

.ai-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ai-modal-backdrop[hidden] { display: none; }

.ai-modal {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  overflow-y: auto;
  margin: 0;
}

.ai-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.ai-modal-head h3 { margin: 0; font-size: 1rem; color: var(--accent); }

.ai-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}
.ai-modal-close:hover { color: var(--text); }

.ai-modal-body {
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 0.92rem;
  min-height: 2.5rem;
}
.ai-modal-body.is-loading { color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.ai-modal-body.is-error { color: var(--amber); }

.ai-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.ai-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: ai-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

.ai-compare-bar { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ai-compare-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}

/* -------------------------------------- реєстрація — лендинг (25.08.2026) -------
   "Wow"-версія /register: замість голої картки — два стовпці. Ліва колонка
   (.reg-hero) не картка, а просто контент прямо на фоні сторінки (той самий
   radial-gradient body з styles.css вище) — так лендинг відчувається
   просторішим, а .auth-card праворуч лишається візуальним фокусом. */
.reg-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem 3rem;
  align-items: center;
}
.reg-hero { min-width: 0; }
.reg-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.1rem;
}
.reg-headline {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.reg-accent-text {
  background: linear-gradient(90deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.reg-subheadline {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
  max-width: 50ch;
  margin: 0 0 1.75rem;
}
.reg-hero-visual {
  /* 28.08.2026: було 440px, потім 620px — за другим прямим фідбеком
     користувача ("ще збільшити") піднято ще раз, в одному масштабі з
     .login-house-wrap (700px) на /login. min() з відсотковим фолбеком
     все одно убезпечує від переповнення на вужчих контейнерах. */
  width: min(720px, 96%);
  margin: 0 auto 1.5rem;
  position: relative;
  isolation: isolate;
}
/* Неоновий скайлайн позаду будинку (partials/neon-skyline.ejs) — сидить у
   тому самому контейнері, ПЕРЕД .hub-house-visual у DOM, розтягнутий
   ширше/вище за сам контейнер (overflow visible) так, щоб читатись як
   міський горизонт за будинком, а не рамка навколо нього. z-index нижчий за
   .hub-house-visual (яка сама встановлює z-index:1 нижче), і в межах
   власного stacking-контексту нижче glow-шарів самого будинку. */
.reg-skyline {
  position: absolute;
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
  width: 168%;
  max-width: none;
  z-index: 0;
  pointer-events: none;
}
/* 28.08.2026: скайлайн-partial повністю переписаний (реалістична нерівна
   панорама замість "bar chart" — деталі в самому partial-і); тут лише
   притлумлюємо його до тихого фонового шару (opacity ~12-20%, як просив
   користувач), решта атмосфери — трохи нижче. */
.reg-skyline-svg { display: block; width: 100%; height: auto; opacity: 0.18; filter: brightness(0.75); }
.hub-house-visual { z-index: 1; }
/* Атмосферні шари між скайлайном і будинком (замість окремих div-"будинків"
   — кілька layered pseudo-елементів з різною opacity/blur/z-index, як прямо
   просив користувач). ::before — дуже слабкий ambient cyan haze + radial
   glow за ВСІЄЮ сценою (z-index нижче скайлайну, тому позаду навіть його).
   ::after — легка атмосферна димка над скайлайном, але під будинком
   (z-index між ними), щоб місто "тонуло" у повітрі, а не стояло різким
   шаром прямо за будинком. */
.reg-hero-visual::before {
  content: '';
  position: absolute;
  inset: -18% -30%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.12), transparent 72%);
  filter: blur(26px);
}
/* 28.08.2026: ::after (нижня "димка" між скайлайном і будинком) прибрано —
   .reg-hero-visual тепер показує лише готове фото (rone-login-house.webp,
   .reg-house-photo вище), у якого вже є власний подіум/glow, і темна
   розмита смуга поверх лише замулювала б його низ. ::before (ambient haze
   вище) лишається — він позаду фото (z-index -1) і додає легке додаткове
   світіння по краях, не перекриваючи сам кадр. */
.reg-benefits {
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  margin: 0 auto 2rem;
  flex-wrap: wrap;
  max-width: 480px;
}
.reg-benefit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 96px;
  text-align: center;
}
.reg-benefit-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 18px -4px var(--accent-glow);
}
.reg-benefit-icon svg { width: 22px; height: 22px; }
.reg-benefit-label { font-size: 0.76rem; color: var(--muted); line-height: 1.3; }
.reg-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.reg-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 0.9rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.reg-feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.reg-feature-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
}
.reg-feature-icon svg { width: 17px; height: 17px; }
.reg-feature-title { font-size: 0.86rem; font-weight: 700; margin-bottom: 0.15rem; }
.reg-feature-text { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }
.reg-trust {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--green);
  letter-spacing: 0.02em;
}
.reg-form-col { min-width: 0; }
.reg-form-col .auth-card { max-width: 460px; margin: 0 auto; padding: 2.3rem 2rem; }

/* Легка послідовна поява зверху вниз — не претендує на "ефект", радше
   прибирає відчуття статичної/мертвої сторінки при першому завантаженні. */
@keyframes regFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.reg-eyebrow, .reg-headline, .reg-subheadline, .reg-hero-visual, .reg-benefits, .reg-features, .reg-trust, .reg-form-col .auth-card {
  animation: regFadeUp 0.55s ease both;
}
.reg-eyebrow { animation-delay: 0s; }
.reg-headline { animation-delay: 0.06s; }
.reg-subheadline { animation-delay: 0.12s; }
.reg-hero-visual { animation-delay: 0.18s; }
.reg-benefits { animation-delay: 0.22s; }
.reg-features { animation-delay: 0.28s; }
.reg-trust { animation-delay: 0.34s; }
.reg-form-col .auth-card { animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .reg-eyebrow, .reg-headline, .reg-subheadline, .reg-hero-visual, .reg-benefits, .reg-features, .reg-trust, .reg-form-col .auth-card {
    animation: none;
  }
}

@media (max-width: 960px) {
  .reg-shell { grid-template-columns: 1fr; padding-top: 2rem; text-align: center; }
  .reg-subheadline { margin-left: auto; margin-right: auto; }
  .reg-features { grid-template-columns: 1fr; text-align: left; }
  /* Той самий виразний масштаб будинку, що й на мобільній сторінці входу. */
  .reg-hero-visual { width: min(440px, 100%); }
  .reg-benefits { gap: 1.1rem; }
  .reg-benefit { width: 78px; }
}

/* -------------------------------------- вхід — premium SaaS (25.08.2026) --------
   Повністю окремий набір класів .login-* — НЕ .reg-*, якими користується
   /register. Жодне з правил нижче не чіпає .reg-* й навпаки: обидва
   простори імен незалежні, хоча й переливаються з тих самих design-токенів
   (:root вище) та переюзають спільні partial-и dashboard-house.ejs /
   neon-skyline.ejs (сам SVG скайлайну зберігає клас .reg-skyline-svg,
   заданий у partial-і, — тут стилюється через дескрипт-селектор
   `.login-skyline .reg-skyline-svg`, аби не чіпати сам partial і не
   впливати на /register). За детальним ТЗ користувача: контейнер
   ~1420-1500px, колонки ~55/45, gap 80-100px, будинок 520-620px, скайлайн
   15-25% opacity "майже чорний", 4 переваги з розділювачами під будинком,
   картка входу 500-560px, high-density inputs 52-56px. */
.login-shell {
  position: relative;
  max-width: 1460px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.25rem, 4vw, 4rem);
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* ~55% / 45% */
  gap: 3rem 5.5rem; /* 88px колонковий gap — у діапазоні 80-100px */
  align-items: center;
}
/* Дуже тиха фонова атмосфера, ізольована власним ::before — не дублює
   глобальний body-градієнт вище, лише трохи підсилює його в зоні форми,
   без яскравих плям ("premium clean look", не cyberpunk). */
.login-shell::before {
  content: '';
  position: absolute;
  inset: -4% -6%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(620px 480px at 10% 8%, rgba(56, 189, 248, 0.09), transparent 60%),
    radial-gradient(680px 560px at 96% 92%, rgba(167, 139, 250, 0.07), transparent 62%);
}

.login-hero { min-width: 0; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.2rem;
}
.login-logo-mark { width: 32px; height: 32px; border-radius: 8px; display: block; }
.login-logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.login-logo-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
}
.login-logo-sub { font-size: 0.68rem; color: var(--muted); }

.login-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  margin-bottom: 1.1rem;
}
.login-headline {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 4.2vw, 4rem); /* ~52-64px, як просив користувач */
  line-height: 1.12;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.login-accent {
  background: linear-gradient(90deg, var(--accent), var(--cyan) 55%, var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-subheadline {
  color: var(--muted);
  font-size: 1.28rem; /* ~20-24px діапазон */
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 0 2.2rem;
}

/* Будинок + скайлайн-фон: той самий підхід, що й .reg-hero-visual/.reg-skyline
   (будинок сам собою .hub-house-visual{width:100%}, тому розмір задає
   контейнер), лише більший і з тихішим/темнішим скайлайном. */
.login-house-wrap {
  /* 28.08.2026: було 600px — за другим прямим фідбеком користувача ("ще
     збільшити") піднято ще раз, в одному масштабі з .reg-hero-visual
     (720px) на /register. */
  width: min(700px, 95%);
  /* У вихідному кадрі є атмосферний простір над дахом. Негативний верхній
     відступ піднімає всю сцену, а разом із нею — блок переваг нижче. */
  margin: -4rem auto 0.35rem;
  position: relative;
  isolation: isolate;
}
/* 28.08.2026 (2): попередній варіант фейдив краї через CSS mask-image
   поверх непрозорого фото — на живій сторінці все одно лишався помітний
   темний прямокутник ("чорні краї", за фідбеком користувача): сам файл був
   суцільним RGB без альфи, а CSS-градієнт як mask по-різному (і не завжди
   передбачувано) трактується різними рушіями. Тепер натомість реальний
   альфа-канал запечений ПРЯМО у сам rone-login-house.webp (RGBA, той самий
   принцип, що вже в rone-dashboard-house.webp для дашборду) — плавний
   радіальний vignette-фейд у прозорість, порахований і застосований до
   пікселів файлу напряму, а не через CSS-хак. Це стандартний, однозначний
   спосіб рендеру в БУДЬ-ЯКОМУ браузері — жодних CSS mask-властивостей тут
   більше не потрібно. */
.login-house-photo, .reg-house-photo {
  display: block;
  width: 100%;
  height: auto;
}
.login-skyline {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 186%;
  max-width: none;
  z-index: 0;
  pointer-events: none;
}
/* 28.08.2026: перекриває opacity/яскравість partial-у ще нижче, ніж на
   /register (0.18) — на /login будинок повинен лишатись явно яскравішим
   фокусом. "Майже чорні" будівлі: низька opacity + затемнення filter-ом. */
.login-skyline .reg-skyline-svg {
  opacity: 0.15;
  filter: brightness(0.55) saturate(0.8);
}
/* Ті самі layered-атмосферні pseudo-елементи, що й на /register (див.
   .reg-hero-visual::before/::after) — окремі правила тут, бо контейнер
   інший (.login-house-wrap), але підхід і z-index-логіка ідентичні:
   ::before = слабкий ambient cyan haze + radial glow позаду всієї сцени,
   ::after = легка димка над скайлайном, під будинком. */
.login-house-wrap::before {
  content: '';
  position: absolute;
  inset: -16% -26%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.11), transparent 72%);
  filter: blur(30px);
}
/* 28.08.2026: ::after прибрано з тієї ж причини, що й .reg-hero-visual::after
   вище — .login-house-photo вже містить власний подіум/glow, темна смуга
   поверх лише замулювала б низ фото. ::before (ambient haze) лишається. */

.login-benefits {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 580px;
}
.login-benefit {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.15rem;
  text-align: center;
}
.login-benefit + .login-benefit::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: var(--border);
}
.login-benefit-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 16px -3px var(--accent-glow);
}
.login-benefit-icon svg { width: 19px; height: 19px; }
.login-benefit-title { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.login-benefit-sub { font-size: 0.72rem; color: var(--muted); }

/* -------- права колонка: картка входу -------- */
.login-form-col { min-width: 0; display: flex; justify-content: center; }
.login-card {
  width: 100%;
  max-width: 540px; /* 500-560px діапазон */
  padding: clamp(2.75rem, 4vw, 3.25rem); /* 44-52px */
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px -32px rgba(56, 189, 248, 0.4), 0 0 0 1px rgba(56, 189, 248, 0.04);
}
.login-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 22px -4px var(--accent-glow);
}
.login-card-icon svg { width: 24px; height: 24px; }
.login-card h1 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  text-align: center;
  margin: 0 0 0.5rem;
}
.login-card .sub {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
  margin: 0 0 2rem;
}
.login-card .auth-error { margin-bottom: 1.3rem; }

.login-form { display: flex; flex-direction: column; gap: 1.2rem; } /* 18-20px */
.login-field { display: flex; flex-direction: column; gap: 0.4rem; }
.login-field-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.login-field-wrap { position: relative; display: flex; align-items: center; }
.login-field-icon {
  position: absolute;
  left: 16px;
  display: flex;
  color: var(--muted);
  pointer-events: none;
}
.login-field-icon svg { width: 18px; height: 18px; }
.login-field-wrap input {
  width: 100%;
  height: 54px; /* 52-56px */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 44px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.login-field-wrap input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}
.login-eye-btn {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
}
.login-eye-btn:hover { color: var(--text); }
.login-eye-btn svg { width: 18px; height: 18px; }

/* 29.08.2026, за результатами аудиту: show/hide-обгортка для секретних полів
   поза login (напр. Telegram Bot Token у /settings) — той самий принцип,
   що й .login-field-wrap/.login-eye-btn вище, лише без фіксованої висоти
   логін-форми, щоб вписуватись у звичайні form.stacked картки. */
.secret-field-wrap { position: relative; display: flex; align-items: center; }
.secret-field-wrap input { padding-right: 40px !important; }
.secret-toggle-btn {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  font-size: 1rem;
}
.secret-toggle-btn:hover { color: var(--text); }

.email-verify-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -0.2rem;
}
.login-remember { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.login-forgot { color: var(--accent); text-decoration: none; }
.login-forgot:hover { text-decoration: underline; }

.login-submit {
  height: 56px; /* 54-58px */
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  color: #04101f;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 32px -12px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 38px -10px var(--accent-glow); }

.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.6rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.login-google {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}
.login-google:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.05); }

.login-switch {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.login-switch a { color: var(--accent); text-decoration: none; font-weight: 600; }
.login-switch a:hover { text-decoration: underline; }

/* Легка послідовна поява — той самий підхід, що й regFadeUp (keyframe вище,
   переюзаний тут як є, без дублювання). */
.login-logo, .login-badge, .login-headline, .login-subheadline, .login-house-wrap, .login-benefits, .login-card {
  animation: regFadeUp 0.55s ease both;
}
.login-logo { animation-delay: 0s; }
.login-badge { animation-delay: 0.05s; }
.login-headline { animation-delay: 0.1s; }
.login-subheadline { animation-delay: 0.16s; }
.login-house-wrap { animation-delay: 0.22s; }
.login-benefits { animation-delay: 0.28s; }
.login-card { animation-delay: 0.14s; }

@media (prefers-reduced-motion: reduce) {
  .login-logo, .login-badge, .login-headline, .login-subheadline, .login-house-wrap, .login-benefits, .login-card {
    animation: none;
  }
}

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; padding-top: 2.5rem; text-align: center; min-height: auto; gap: 2.5rem; }
  .login-subheadline { margin-left: auto; margin-right: auto; }
  /* На вузькому екрані 78% робили будинок непропорційно малим. Займаємо
     всю доступну ширину колонки, залишаючи верхню межу для планшетів. */
  .login-house-wrap { width: min(440px, 100%); margin-top: -2.75rem; }
  .login-skyline { width: 220%; }
  .login-benefits { flex-wrap: wrap; row-gap: 1.3rem; max-width: 320px; }
  .login-benefit { flex: 0 0 46%; padding: 0 0.5rem; }
  .login-benefit + .login-benefit::before { display: none; }
  .login-card { max-width: 100%; }
}

@media (max-width: 480px) {
  header.topbar a.brand {
    gap: 0.72rem;
    align-items: center;
  }
  header.topbar .brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    object-fit: contain;
    transform: translateY(-1px);
  }
  header.topbar .brand-text {
    justify-content: center;
    line-height: 1.08;
  }
  header.topbar .brand-descriptor {
    margin-top: 0.22rem;
    line-height: 1.1;
  }
  .login-shell { padding-top: 1.5rem; }
  .login-headline { font-size: clamp(2.1rem, 9vw, 2.6rem); }
  .login-subheadline { font-size: 1.05rem; }
}
