    /* ===== Map full-screen layout ===== */
    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        font-family: system-ui, -apple-system, Roboto, sans-serif;
        background: #e6eef6;             /* наш базовый цвет */
    }

    #map,
    .leaflet-container {
        width: 100vw;
        height: 100vh;
        background: #e6eef6;             /* тот же фон для карты */
    }

    #map {
        position: fixed;
        inset: 0;                        /* вместо top/left/width/height */
    }

    /* ==================== ПАНЕЛЬ ==================== */

    .askbase-panel {
        position:absolute;
        left:12px;
        top:12px;

        width:190px;
        min-width:190px;
        max-width:190px;

        max-height: calc(100vh - 32px);

        backdrop-filter: blur(22px);
        background: rgba(15, 23, 42, 0.22);

        border-radius:16px;
        border: none;

        padding:8px 8px 10px 8px;
        z-index:1000;
        color:#f9fafb;

        box-shadow: 0 24px 65px rgba(0,0,0,0.55);
        transition:transform .2s ease, opacity .2s ease;
    }

    /* компактная типографика внутри левой панели */
    .askbase-panel * {
        font-size:12px;
        line-height:1.2;
    }

/* === ЛЕВАЯ ПАНЕЛЬ: компактные фильтры OSM Retail и Urban Grid === */

/* === ЛЕВАЯ ПАНЕЛЬ: компактные фильтры OSM Retail и Urban Grid === */

/* общий уменьшенный шрифт и вертикальные зазоры в блоках фильтров */
.askbase-panel #osmRetailFilters,
.askbase-panel #wsGridFilters {
    font-size: 11px;
}

/* строки внутри фильтров (containter div) – уменьшаем gap */
.askbase-panel #osmRetailFilters > div,
.askbase-panel #wsGridFilters > div {
    gap: 4px !important;
}

/* кнопки / пилюли внутри фильтров:
   высота как у остальных кнопок панели */
.askbase-panel #osmRetailFilters .askbase-pill,
.askbase-panel #wsGridFilters .askbase-pill {
    min-height: 26px;        /* как .askbase-panel .askbase-pill */
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}

/* OSM Retail: основные кнопки-фильтры делаем чуть уже по ширине */
#osmRetailSegmentBtn,
#osmRetailCategoryBtn,
#osmRetailBrandBtn {
    flex: 0 0 80%;           /* вместо «во всю строку» */
}

/* спрятать отдельные крестики очистки у фильтров OSM retail */
#osmRetailSegmentClear,
#osmRetailCategoryClear,
#osmRetailBrandClear {
    display: none !important;
}

/* более узкие дропдауны для OSM Retail */
#osmRetailSegmentDropdown,
#osmRetailCategoryDropdown,
#osmRetailBrandDropdown {
    left: 4px !important;
    right: 4px !important;

    margin-top: 4px;
    max-height: 220px;

    padding: 6px 8px 8px;
    border-radius: 10px;
}

/* строки внутри этих "таблиц" */
#osmRetailSegmentDropdown .askbase-pill,
#osmRetailCategoryDropdown .askbase-pill,
#osmRetailBrandDropdown .askbase-pill {
    font-size: 10.5px;
    min-height: 20px;
    padding: 2px 6px;
    border-radius: 8px;
}

/* Urban Grid: селект доминирующего класса и число Conf компактнее */
#wsDominantClass {
    height: 24px;
    padding: 2px 6px;
    font-size: 10.5px;
}

#wsMinConfVal {
    width: 26px;
    font-size: 10.5px;
}

/* Urban Grid: селект доминирующего класса и число Conf компактнее */
#wsDominantClass {
    height: 24px;
    padding: 2px 6px;
    font-size: 10.5px;
}

#wsMinConfVal {
    width: 26px;
    font-size: 10.5px;
}

    /* =========================
       ANALYZE PANEL (bottom)
       ========================= */
    .askbase-analyze-panel {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 2500;

        display: none;
        flex-direction: column;
        gap: 8px;

        padding: 10px;
        border-top: 1px solid rgba(255,255,255,.16);

        background: rgba(15,23,42,.55);
        backdrop-filter: blur(12px);
    }

    .askbase-analyze-panel--open {
        display: flex;
    }

    .askbase-analyze-header {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .askbase-analyze-title {
        font-weight: 700;
        opacity: .95;
    }


     .askbase-analyze-body{
        margin-top: 10px;

        display: grid;
        grid-template-columns: 1fr 1fr 1.2fr 1.3fr; /* 👈 ВАЖНО */
        gap: 10px;

  flex: 1;
  min-height: 0;
  overflow: hidden;
}

    .askbase-analyze-col {
        flex: 1;
        min-width: 320px;

        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.16);
        background: rgba(2,6,23,.35);
        padding: 10px;

        max-height: 42vh;
        overflow: auto;
    }

    .askbase-panel--hidden {
        transform:translateX(-110%);
        opacity:0;
        pointer-events:none;
    }

    .askbase-panel__title-row {
        display:flex;
        align-items:flex-start;
        justify-content:space-between;
        gap:10px;
        margin-bottom:6px;
    }
    .askbase-panel__title {
        font-size:18px;
        font-weight:600;
    }
    .askbase-panel__subtitle {
        font-size:12px;
        opacity:0.8;
    }

    .askbase-panel__section {
        margin-top:16px;
    }
    .askbase-panel__section-title {
        font-size:14px;
        margin-bottom:8px;
        opacity:0.85;
    }

/* =========================
   PANEL CLOSE — LEFT, PILL Закрытие левой панели
   ========================= */

.askbase-panel__close {
    position: absolute;
    top: 10px;
    left: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 28px;
    min-width: 44px;
    padding: 0 10px;

    border-radius: 10px;              /* прямоугольная пилюля */
    border: 1px solid rgba(255,255,255,.22);

    background: rgba(148,163,184,.22); /* СВЕТЛЕЕ, не чёрный */
    backdrop-filter: blur(10px);

    color: #0f172a;                   /* тёмный × */
    font-size: 18px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15,23,42,.25);

    z-index: 5;
}

.askbase-panel__close:hover {
    background: rgba(148,163,184,.32);
}

.askbase-panel__close:active {
    transform: translateY(1px);
}

/* ==== ОБРАНЕ (FAVORITES) ==== */
.askbase-fav-summary {
    font-size: 12px;
    line-height: 1.4;
    color: #9ca3af;
    margin-top: 4px;
    margin-bottom: 6px;
}

.askbase-fav-open-btn {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.4);
    background: rgba(15,23,42,0.85);
    color: #e5e7eb;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(12px);
}

.askbase-fav-open-btn:hover {
    background: rgba(30,64,175,0.9);
}

/* Кнопка открытия левой панели  */
    .askbase-panel-toggle {
        position: absolute;
        left: 12px;
        top: 8px;
        z-index: 1100;

        width: 38px;
        height: 38px;

        background: rgba(2, 6, 23, .55);
        backdrop-filter: blur(10px);

        border-radius: 10px;
        border: 1px solid rgba(255, 255, 255, .14);

        display: flex;
        align-items: center;
        justify-content: center;

        cursor: pointer;
        box-shadow: 0 12px 28px rgba(0, 0, 0, .45);

        color: rgba(255, 255, 255, .92);
        opacity: 0.95;
        transition: opacity .15s ease, transform .1s ease;
        font-size: 18px;         /* размер "бургер"-иконки ☰ */
        line-height: 1;
        padding: 0;
    }

.askbase-panel-toggle:hover {
    opacity: 1;
}

.askbase-panel-toggle:active {
    transform: scale(.94);
}

    .askbase-panel-toggle--hidden {
        display:none;
    }

    /* ==================== ПИЛЮЛИ ==================== */

    .askbase-pill-row {
        display:flex;
        gap:8px;
        flex-wrap:wrap;
    }

    .askbase-pill {
        padding:6px 12px;
        border-radius:999px;
        cursor:pointer;
        font-size:14px;
        white-space:nowrap;
        user-select:none;

        background: rgba(30, 41, 59, 0.18);
        border: 1px solid rgba(15, 23, 42, 0.95);
        color:#e5e7eb;

        box-shadow: 0 0 0 1px rgba(0,0,0,0.9);
        transition:
            background .18s ease,
            transform .12s ease,
            box-shadow .18s ease,
            color .12s ease;
    }

    .askbase-pill:hover {
        background: rgba(31, 41, 55, 0.85);
        border-color: rgba(15, 23, 42, 1);
        box-shadow:
          0 0 16px rgba(15,23,42,0.9),
          0 0 0 1px rgba(0,0,0,1);
    }

    .askbase-pill--active {
        color:#020617;
        border:none;
        box-shadow:
          0 0 0 1px rgba(15,23,42,0.9),
          0 12px 30px rgba(15,23,42,0.9);
        transform:translateY(-1px);
    }

    /* Спеціальні кольори для активних по шарах (для Метки/Теплова) */

    .askbase-pill--layer-master.askbase-pill--active {
        background:linear-gradient(135deg,#38bdf8,#0ea5e9);
    }
    .askbase-pill--layer-rc.askbase-pill--active {
        background:linear-gradient(135deg,#facc15,#f97316);
    }
    .askbase-pill--layer-mall.askbase-pill--active {
        background:linear-gradient(135deg,#fb923c,#ec4899);
    }
    .askbase-pill--layer-sup.askbase-pill--active {
        background:linear-gradient(135deg,#22d3ee,#a855f7);
    }
     .askbase-pill--layer-osm-retail.askbase-pill--active {
    background: linear-gradient(135deg,#22d3ee,#06b6d4);
    }
    .askbase-pill--layer-land.askbase-pill--active {
        background:linear-gradient(135deg,#4ade80,#22c55e);
    }

/* Рядок шарів — компактный, под узкую панель */
.askbase-layer-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:4px;              /* было 8 */
    margin-bottom:4px;    /* было 6 */
}

/* подпись слоя: максимально узко, но без переноса */
.askbase-layer-label {
    font-size:11px;       /* было 13 */
    flex: 0 0 auto;
    white-space: nowrap;
    max-width: 110px;     /* чтобы в 220px всё уместилось */
    overflow: hidden;
    text-overflow: ellipsis; /* длинное “Retailers” аккуратно обрежется */
}

/* блок pill’ов справа */
.askbase-layer-pills {
    display:flex;
    gap:4px;              /* было 6 */
    flex: 0 0 auto;
}

    /* ==================== ЛЕГЕНДА ШАРІВ ==================== */

    .askbase-legend {
        display:flex;
        flex-wrap:wrap;
        gap:6px 10px;
        font-size:12px;
        margin-top:4px;
    }
    .askbase-legend-item {
        display:flex;
        align-items:center;
        gap:4px;
        opacity:0.9;
    }
    .askbase-legend-color {
        width:10px;
        height:10px;
        border-radius:50%;
        box-shadow:0 0 8px rgba(15,23,42,0.9);
    }
    .askbase-legend-color--master { background:#0ea5e9; }
    .askbase-legend-color--rc { background:#facc15; }
    .askbase-legend-color--mall { background:#c084fc; }
    .askbase-legend-color--sup { background:#a855f7; }
    .askbase-legend-color--land { background:#22c55e; }

    @media (max-width: 640px) {
        /* левая панель на мобилке чуть уже */
        .askbase-panel {
            width: 86vw;
        }

        /* СИЛЬНО поднимаем ВСЕ нижние leaflet-контролы,
           чтобы zoom-минус точно был выше "подбородка" телефона */
        .leaflet-bottom.leaflet-right,
        .leaflet-bottom.leaflet-left {
            bottom: 90px;   /* можно потом уменьшить до 60/56, если сильно высоко */
        }

        /* правую колонку кнопок тоже чуть выше,
           чтобы жёлтая гео-кнопка гарантированно влезла */
        .leaflet-top.leaflet-right .askbase-right-panel {
            margin-top: 80px;   /* было ~52/60, поднимаем ещё */
            margin-right: 6px;
        }

        /* уменьшаем расстояние между кнопками на узком экране */
        .askbase-right-panel {
            gap: 6px;
        }
    }

/* ССЫЛКА НА КАБИНЕТ */

    .askbase-account-link {
        display:inline-flex;
        align-items:center;
        gap:6px;
        padding:8px 14px;
        margin-top:6px;
        border-radius:999px;
        font-size:13px;
        text-decoration:none;
        background:rgba(239, 68, 68, 0.12);
        color:#fecaca;
        border:1px solid rgba(248, 113, 113, 0.6);
        box-shadow:0 10px 22px rgba(127, 29, 29, 0.55);
        cursor:pointer;
        transition:
            background .18s ease,
            box-shadow .18s ease,
            transform .12s ease,
            color .12s ease,
            border-color .18s ease;
    }
    .askbase-account-link:hover {
        background:rgba(248, 113, 113, 0.25);
        border-color:rgba(252, 165, 165, 0.95);
        color:#fee2e2;
        transform:translateY(-1px);
        box-shadow:
          0 16px 35px rgba(127, 29, 29, 0.75),
          0 0 0 1px rgba(15,23,42,0.9);
    }
    .askbase-account-link__arrow {
        font-size:14px;
        opacity:0.9;
    }

    /* Бейдж режима редактора ЖК */
    .askbase-editor-badge {
        margin-top: 10px;
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 11px;

        display: inline-flex;
        align-items: center;
        gap: 6px;

        background: linear-gradient(135deg,
            rgba(34,197,94,0.20),
            rgba(129,140,248,0.18)
        );
        border: 1px solid rgba(52,211,153,0.55);
        box-shadow:
            0 0 0 1px rgba(15,23,42,0.9),
            0 10px 25px rgba(15,23,42,0.9);

        color: #e5e7eb;
    }
    .askbase-editor-badge-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #22c55e;
        box-shadow: 0 0 10px rgba(34,197,94,0.9);
    }

    /* 🔵 Легенда статусов ЖК */

    .rc-legend {
        position: absolute;
        right: 18px;
        bottom: 18px;

        backdrop-filter: blur(22px);
        background: rgba(15,23,42,0.22);
        border-radius: 14px;
        padding: 10px 12px;
        color: #e5e7eb;
        font-size: 12px;
        box-shadow: 0 12px 30px rgba(0,0,0,0.35);
        border: none;
        z-index: 900;
    }

    .rc-legend-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 6px;
    }
    .rc-legend-title {
        font-weight: 600;
        font-size: 13px;
        margin: 0;
    }
    .rc-legend-close {
        background: transparent;
        border: none;
        color: #e5e7eb;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        width: 22px;
        height: 22px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .rc-legend-close:hover {
        background: rgba(56,189,248,0.25);
    }

    .rc-legend-item {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 4px;
    }
    .rc-legend-icon {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        border: 2px solid #facc15;
        box-shadow: 0 0 3px rgba(0,0,0,0.6);
        flex-shrink: 0;
    }
    .rc-finished {
        background: #facc15;
    }
    .rc-building {
        background: #22c55e;
    }
    .rc-frozen {
        background: #111827;
    }
    .rc-project {
        background: #3b82f6;
    }
    .rc-unknown {
        background: #ffffff;
    }

/* Кнопка "Особистий кабінет" — неон зелено-фіолетовий */
.askbase-account-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 12px 18px;
    margin-top: 14px;

    border-radius: 16px;
    text-decoration: none;
    cursor: pointer;

    /* затемнённый, полупрозрачный фон */
    background: rgba(15, 23, 42, 0.82);
    color: #e5e7eb;

    /* неоновое свечение зелено-фиолетовое */
    box-shadow:
        0 18px 40px rgba(34, 197, 94, 0.35),
        0 0 26px rgba(129, 140, 248, 0.35);

    /* тонкая внутренняя рамка */
    border: 1px solid rgba(148, 163, 184, 0.35);

    font-size: 14px;
    font-weight: 500;

    transition:
        transform 0.16s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

/* градиентная подсветка снизу — зелёно-фиолетовый */
.askbase-account-link::after {
    content: "";
    position: absolute;
    inset: 92% 14px -6px 14px; /* тонкий “блик” под кнопкой */
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #4ade80, #6366f1);
    opacity: 0.7;
    filter: blur(10px);
    pointer-events: none;
    transition: opacity 0.18s ease, filter 0.18s ease;
}

/* стрелка */
.askbase-account-link__arrow {
    font-size: 16px;
    opacity: 0.9;
}

/* hover-эффект: чуть ярче, но без ядовитой подсветки */
.askbase-account-link:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow:
        0 20px 45px rgba(34, 197, 94, 0.45),
        0 0 32px rgba(129, 140, 248, 0.45);
    transform: translateY(-1px);
}

.askbase-account-link:hover::after {
    opacity: 0.95;
    filter: blur(12px);
}

/* =========================
   GEOLOC BUTTON (Google-like)
   ========================= */
.askbase-geo-btn {
    width: 36px;
    height: 36px;

    background: rgba(2,6,23,.55);
    backdrop-filter: blur(10px);

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);

    display: inline-flex;
    justify-content: center;
    align-items: center;

    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0,0,0,.45);

    color: rgba(255,255,255,.92);
}

.askbase-geo-btn:hover {
    background: rgba(2,6,23,.68);
}

.askbase-geo-btn:active {
    transform: translateY(1px);
}

.askbase-geo-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Панель режимів лінійки — як міні-рядок пошуку */
.askbase-ruler-modes {
    position: absolute;
    right: 52px;                 /* трохи правіше стовпчика кнопок */
    top:80%;
    transform: translateY(-50%);

    display: none;               /* ховаємо за замовчуванням */
    align-items: center;
    gap: 4px;

    padding: 4px 6px;
    border-radius: 999px;

    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

/* коли лінійка увімкнена — панель показуємо */
.askbase-ruler-modes.askbase-ruler-modes--open {
    display: inline-flex;
}

.askbase-ruler-mode {
    width: 24px;
    height: 24px;

    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;

    font-size: 11px;
    line-height: 1;
    text-align: center;

    cursor: pointer;
    padding: 0;
    outline: none;
}

.askbase-ruler-mode:hover {
    background: rgba(30, 64, 175, 0.9);
}

.askbase-ruler-mode--active {
    background: #FFE27A;
    color: #111827;
    border-color: #FFE27A;
}

/* ===== Measure popup (ruler save) ===== */
/* === RULER POPUP (лінія / радіус / маршрут / площа) === */
.askbase-measure-popup-leaflet .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.96);   /* темный, как правая панель */
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.45);
  padding: 4px 6px;
}

.askbase-measure-popup-leaflet .leaflet-popup-content {
  margin: 0;
}

.askbase-measure-popup-leaflet .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: none;
}

.askbase-measure-popup-leaflet .leaflet-popup-close-button {
  display: none; /* крестик не нужен, режим сам всё чистит */
}

/* Внутреннее содержимое попапа */
.askbase-measure-popup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.askbase-measure-popup-text {
  font-size: 13px;
  line-height: 1.4;
  color: #e5e7eb;
  white-space: nowrap;
}

/* Кнопка сохранения (одна зелёная звезда) */
.askbase-measure-save {
  border: none;
  outline: none;
  cursor: pointer;

  width: 24px;
  height: 24px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  line-height: 1;

  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.45);
}

/* убираем старую "вторую" звезду из ::before, если что-то осталось */
.askbase-measure-save::before {
  content: none;
}

.askbase-measure-save:hover {
  background: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.7);
}

/* ===== РЕЖИМЫ МОИХ МЕТОК (панель справа, стиль как у поиска/радара) ===== */

.askbase-userpoints-modes {
    position: absolute;
    right: 52px;

    /* было: top: 21%; transform: translateY(-50%); */
    top: 88px;              /* ← тут регулируй “поднять выше/ниже” */
    transform: none;        /* ← ключевое: больше не центрируем по высоте */

    display: none;
    flex-direction: column;
    gap: 8px;

    padding: 12px 14px 10px;
    min-width: 220px;

    background: rgba(6, 9, 18, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.48);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    color: rgba(226, 232, 240, 0.82);
    font-size: 11px;
    z-index: 3000;

    /* чтобы панель НЕ наезжала на радар */
    max-height: calc(100vh - 64px - 280px); /* 280px = запас под Radar (min-height 260 + отступы) */
    overflow: hidden; /* скроллим только внутри вкладки "Групи" */
}

.askbase-userpoints-group-title {
    color: rgba(148, 163, 184, 0.70);
}

/* когда панель открыта */
.askbase-userpoints-modes--open {
    display: flex;
}

/* группы внутри панели */
.askbase-userpoints-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.askbase-userpoints-group + .askbase-userpoints-group {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    padding-top: 6px;
    margin-top: 4px;
}

/* заголовки групп (ТИП / СЛОЙ / СТАТУС) */
.askbase-userpoints-group-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    margin-bottom: 2px;
}

/* строка с “пилюлями” */
.askbase-userpoints-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* кнопки-режимы */
.askbase-userpoints-mode {
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;

    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    cursor: pointer;
    white-space: nowrap;

    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* hover */
.askbase-userpoints-mode:hover {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 1);
}

/* активный режим */
.askbase-userpoints-mode--active {
    background: #6366f1;
    border-color: #6366f1;
    color: #f9fafb;
}

/* ===============================
   UserPoints — статусные кнопки
   Цвета синхронизированы с метками
   =============================== */

/* NEW — холодный синий (как default метки) */
.askbase-userpoints-mode--status-new {
    background: rgba(99, 102, 241, 0.28);
    color: #eef2ff;
    border: 1px solid rgba(99, 102, 241, 0.75);

    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.25),
        0 0 12px rgba(99, 102, 241, 0.35);
}

/* PROCESSING — желтый / amber */
.askbase-userpoints-mode--status-processing {
    background: rgba(234, 179, 8, 0.18);
    color: #fde68a;
    border: 1px solid rgba(234, 179, 8, 0.45);
}

/* WAITING — тёплый красно-оранжевый */
.askbase-userpoints-mode--status-waiting {
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

/* DONE — зелёный */
.askbase-userpoints-mode--status-done {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

/* ARCHIVED — приглушённый серо-красный */
.askbase-userpoints-mode--status-archived {
    background: rgba(148, 163, 184, 0.16);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

/* Hover — аккуратное усиление */
.askbase-userpoints-mode--status-new:hover,
.askbase-userpoints-mode--status-processing:hover,
.askbase-userpoints-mode--status-waiting:hover,
.askbase-userpoints-mode--status-done:hover,
.askbase-userpoints-mode--status-archived:hover {
    filter: brightness(1.15);
}

/* Активное состояние (когда кнопка выбрана) */
.askbase-userpoints-mode.askbase-userpoints-mode--active {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15),
                0 0 12px rgba(0,0,0,0.25) inset;
}

    /* ===== ГРУППЫ МОИХ МЕТОК — чипы с чекбоксом ===== */

    /* контейнер с группами */
    .askbase-userpoints-groups-row {
        margin-top: 6px;

        display: flex;
        flex-wrap: wrap;
        gap: 6px 10px;

        /* никакого своего фона и рамки, живём внутри общей панели */
        background: transparent;
        border: none;
        box-shadow: none;
    }

    /* одна группа — компактный прямоугольный чип */
    .askbase-userpoints-group-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;

        padding: 3px 8px;
        border-radius: 6px;

        border: 1px solid rgba(148, 163, 184, 0.55);
        background: rgba(15, 23, 42, 0.40);

        font-size: 11px;
        color: #e5e7eb;
        white-space: nowrap;

        cursor: pointer;
    }

    /* сам чекбокс — миниатюрный, в общем стиле формы */
    .askbase-userpoints-group-chip input[type="checkbox"] {
        margin: 0;
        width: 12px;
        height: 12px;
        accent-color: #6366f1; /* фиолетовый как у остальных элементов */
    }

    .askbase-userpoints-group-chip span {
        line-height: 1.2;
    }

/* ===== /РЕЖИМЫ МОИХ МЕТОК ===== */

    /* мини-панель справа под переключателем слоёв */
    .askbase-right-panel {
        position: relative;
        display: flex;
        ...
        position: relative;              /* нужно, чтобы позиционировать flyout */
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

/* чтобы блок кнопок не конфликтовал с переключателем "Map/Супутник" */
.leaflet-top.leaflet-right .askbase-right-panel {
    margin-top: 52px;
    margin-right: 10px;
}

/* "выключенная" кнопка (когда мої точки скрыты) */
.askbase-geo-btn--off {
    opacity: 0.4;
}

/* ===== 📡 RADAR FLYOUT (настройки радара) ===== */
.askbase-radar-flyout {
    position: absolute;
    top: 8px;                 /* на уровне кнопки */
    right: 64px;              /* как у поиска */

    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 12px 14px;
    border-radius: 18px;

    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);

    min-width: 280px;
    max-width: 320px;

    transform: translateX(12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
    z-index: 3000;
}

.askbase-radar-flyout--hidden {
    transform: translateX(12px);
    opacity: 0;
    pointer-events: none;
}

.askbase-radar-flyout:not(.askbase-radar-flyout--hidden) {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* элементы внутри радара */
.askbase-radar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.askbase-radar-row label {
    font-size: 12px;
    color: rgba(203, 213, 225, 0.9);
}

.askbase-radar-row select {
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.65);
    background: rgba(15, 23, 42, 0.75);
    color: #e5e7eb;
    padding: 0 12px;
    font-size: 13px;
}

/* ===== 📡 RADAR BUTTON – MOVE DOWN ===== */
.askbase-right-panel #askbase-radar-btn {
    margin-top: 24vh;   /* ← регулируешь здесь */
}

/* ==== POPUP CARD MODERN BLUR ==== */
.leaflet-popup-content-wrapper {
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.leaflet-popup-content {
  margin: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.leaflet-popup-tip {
  background: rgba(11, 15, 25, 0.92);
}

/* Шапка карточки */
.popup-mall-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.popup-mall-type {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a855f7;
}

.popup-mall-title {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
}

.popup-mall-address {
  font-size: 12px;
  color: #9ca3af;
}

/* Фото-блок */
.mall-photo-wrapper {
  margin: 8px 0 4px;
  border-radius: 12px;
  overflow: hidden;
}

.mall-photo-main img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.mall-photo-thumbs {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.mall-photo-thumbs img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.mall-photo-thumbs img:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* ==== POPUP: ТОРГОВІ ЦЕНТРИ ==== */

.mall-popup {
  width: 260px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: #e5e7eb;
}

.mall-popup-photo-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  height: 140px;
  background: radial-gradient(circle at 20% 0%, #4c1d95, #020617);
}

/* Фото */
.mall-popup-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

/* Тёмный градиент + лёгкий блюр поверх фото */
.mall-popup-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.75),
    rgba(15, 23, 42, 0.2)
  );
  backdrop-filter: blur(0.5px);
}

/* Шапка с названием и адресом */
.mall-popup-header {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.mall-popup-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
  color: #f9fafb;
}

.mall-popup-address {
  font-size: 12px;
  color: #d1d5db;
}

/* Тело попапа */
.mall-popup-body {
  margin-top: 10px;
}

/* GBA / GLA */
.mall-popup-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.mall-popup-stat {
  flex: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mall-popup-stat .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
}

.mall-popup-stat .value {
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
}

/* Кнопка "в обране" можно оставить твою или чуть подкрутить */
.mall-popup .popup-fav-btn {
  margin-top: 4px;
  width: 100%;
  border-radius: 999px;
}

/* === FIX: Retail multi-brand text color === */
#retailBrandDropdown {
  color: #0b1220;
}

#retailBrandDropdown .rbm-name,
#retailBrandDropdown .rbm-count {
  color: #0b1220;
}

#retailBrandDropdown input[type="checkbox"] {
  accent-color: #f97316;
} 

/* === FIX: Retail categories dropdown text visibility === */
#retailClassDropdown {
  color: #0b1220 !important;
  background: rgba(255,255,255,0.92) !important;
}

#retailClassDropdown,
#retailClassDropdown * {
  color: #0b1220 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

#retailClassDropdown label,
#retailClassDropdown .rbm-name,
#retailClassDropdown .rbm-count {
  color: #0b1220 !important;
}

/* === FIX: Master Types dropdown text contrast === */
#masterTypeDropdown,
#masterTypeDropdown * {
    color: #111827 !important; /* тёмный текст */
}

#masterTypeDropdown {
    background: rgba(255,255,255,0.92) !important;
}

#masterTypeDropdown label,
#masterTypeDropdown div,
#masterTypeDropdown span,
#masterTypeDropdown button {
    color: #111827 !important;
}

/* OSM Retail dropdown text fix */
#osmRetailBrandDropdown label {
    color: #111827;
}

/* Чтоб галочка была видна и в твоём стиле */
#osmRetailBrandDropdown input[type="checkbox"] {
    accent-color: #38bdf8;
}

/* ===== Retail analyze circle glow ===== */
.leaflet-interactive.retail-analyze-circle {
  filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.55))
          drop-shadow(0 0 14px rgba(250, 204, 21, 0.35));
}

/* ===== FIX: prevent horizontal layout shift ===== */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* карта всегда на весь экран */
#map {
  position: fixed;
  inset: 0;
}

/* панели не должны расширять страницу */
.askbase-panel {
  max-width: calc(100vw - 24px);
}

/* анализ: таблицы/контент не должны раздвигать страницу */
#retailAnalyzeResult,
#masterStatsTable,
#retailAnalyzeTable {
  max-width: 100%;
  overflow-x: auto;
}

/* если внутри рисуются таблицы */
#retailAnalyzeResult table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

#retailAnalyzeResult th,
#retailAnalyzeResult td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================
   BASEMAP TOGGLE (pill switch)
   ========================= */
.askbase-basemap-toggle{
  position:absolute;
  top: 10px;
  right: 10px;
  z-index: 2600;

  display:flex;
  align-items:center;

  height: 26px;
  padding: 2px 3px;
  border-radius: 8px;

  background: rgba(10, 14, 26, 0.42);
  border: 1px solid rgba(148,163,184,0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.28);

  overflow:hidden;
}

/* прячем старую кнопку кабинета в правой колонке */
.askbase-right-panel #askbase-account-btn {
    display: none;
}

/* ===== TOP ACCOUNT BUTTON (кабинет, рядом с поиском / Map/Earth) ===== */
.askbase-account-top-btn {
    position: fixed;          /* фиксируем к окну, не к правой панели */

    /* Позиция — подгони под себя:
       top   — выше/ниже,
       right — левее/правее.
    */
    top: 8px;
    right: 135px;

    width: 36px;
    height: 36px;

    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.14);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,0.92);
    cursor: pointer;
    z-index: 2600;

    transition:
        background .18s ease,
        transform .12s ease,
        box-shadow .18s ease;
}

.askbase-account-top-btn:hover {
    background: rgba(2, 6, 23, 0.68);
}

.askbase-account-top-btn:active {
    transform: translateY(1px);
}

/* кнопки Map / Earth */
.askbase-basemap-pill{
  position: relative;
  z-index: 2;

  height: 22px;
  min-width: 56px;
  padding: 0 8px;

  border: 0;
  background: transparent;

  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: rgba(226,232,240,0.72);

  cursor: pointer;
  user-select: none;

  display:flex;
  align-items:center;
  justify-content:center;

  transition: color .15s ease;
}

.askbase-basemap-pill:hover{
  color: rgba(255,255,255,0.95);
}

.askbase-basemap-pill--active{
  color: rgba(255,255,255,0.98);
}

/* тонкий индикатор под активной кнопкой */
.askbase-basemap-indicator{
  position: absolute;
  bottom: 4px;                 /* было 3 → чуть выше, ровнее */
  left: 8px;                   /* было 6 → короче и симметричнее */

  width: calc(50% - 16px);     /* было 50% - 12px → полоска покороче */
  height: 1.5px;               /* тоньше, менее заметна */

  border-radius: 999px;

  background: rgba(148, 163, 184, 0.80);   /* вместо почти белого */
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.50);

  transition: transform .18s ease;
}

.askbase-basemap-toggle[data-mode="sat"]
  .askbase-basemap-indicator{
  transform: translateX(100%);
}

.askbase-basemap-pill:hover{
  color: rgba(255,255,255,0.95);
}

.askbase-basemap-pill--active{
  color: rgba(255,255,255,0.98);
}

/* индикатор активного режима */
.askbase-basemap-indicator{
  position:absolute;
  top: 2px;
  left: 3px;

  width: calc(50% - 3px);
  height: 22px;

  border-radius: 6px;

  background: rgba(15, 23, 42, 0.75);
  box-shadow:
    inset 0 0 0 1px rgba(148,163,184,0.22),
    0 4px 10px rgba(0,0,0,0.25);

  transition: transform .18s ease;
}

.askbase-basemap-toggle[data-mode="sat"]
  .askbase-basemap-indicator{
  transform: translateX(100%);
}

/* =========================
   ANALYZE PANEL: tables UI
   ========================= */

#retailAnalyzeResult{
  display: none !important;
  max-width: 100%;
}

/* общий текст/отступы внутри результата */
#retailAnalyzeResult,
#retailAnalyzeResult *{
  font-size: 12px;
  line-height: 1.25;
}

/* заголовки секций внутри панели */
#retailAnalyzeResult > div > div[style*="font-weight:600"]{
  font-size: 12px;
  letter-spacing: .2px;
  margin-bottom: 6px !important;
}

/* таблицы: компактнее + аккуратнее */
#retailAnalyzeResult table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12px;
}

/* шапка таблицы */
#retailAnalyzeResult th{
  padding: 6px 8px;
  font-weight: 600;
  opacity: .9;
  background: rgba(2,6,23,.35);
  position: sticky;
  top: 0;
  z-index: 2;
}

/* строки */
#retailAnalyzeResult td{
  padding: 6px 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  vertical-align: middle;
}

/* более “узкие” числовые колонки */
#retailAnalyzeResult td:last-child,
#retailAnalyzeResult th:last-child{
  width: 72px;
  text-align: right;
  white-space: nowrap;
}

/* первая колонка — обрезка длинных названий */
#retailAnalyzeResult td:first-child,
#retailAnalyzeResult th:first-child{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* скролл в таблицах — красивый и ниже по высоте */
#retailAnalyzeResult div[style*="overflow:auto"],
#retailAnalyzeResult div[style*="overflow: auto"]{
  max-height: 160px !important;
  overflow: auto !important;
  border-radius: 10px;
}

/* подсветка строки при наведении */
#retailAnalyzeResult tbody tr:hover td{
  background: rgba(255,255,255,.06);
}

/* =========================
   LEAFLET ZOOM — matte style (match basemap toggle)
   ========================= */

/* позиция зума уже перенесена в JS через zoomControl — тут только стиль */
.leaflet-control-zoom {
  border: 1px solid rgba(255,255,255,.14) !important;
  border-radius: 999px !important;
  overflow: hidden !important;

  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(12px) !important;

  box-shadow:
    0 18px 45px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.06) !important;
}

.leaflet-control-zoom a {
  /* размеры — пропорционально твоему basemap (высота ~24) */
  width: 28px !important;
  height: 22px !important;
  line-height: 26px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  color: rgba(255,255,255,.92) !important;
  font-weight: 700 !important;
  text-decoration: none !important;

  background: transparent !important;
  border: 0 !important;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid rgba(255,255,255,.12) !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(255,255,255,.08) !important;
}

.leaflet-control-zoom a:active {
  transform: scale(0.98);
}

.leaflet-bar a.leaflet-disabled {
  opacity: .45 !important;
  background: transparent !important;
}

#osmRetailBrandDropdown,
#osmRetailBrandDropdown * {
    color: #ffffff !important;
}

#osmRetailBrandDropdown label {
    cursor: pointer;
}

#osmRetailBrandDropdown label:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
}

        /* ===== Radar results bottom sheet ===== */
        .askbase-bottom-sheet {
            position: fixed;
            left: 16px;
            right: 16px;
            bottom: 12px;

            max-width: calc(100vw - 32px);
            height: 38vh;
            min-height: 260px;

            padding: 12px 12px 10px;
            border-radius: 18px;

            background: rgba(15, 23, 42, 0.72);
            border: 1px solid rgba(148, 163, 184, 0.55);
            box-shadow: 0 18px 45px rgba(0,0,0,0.45);

            transform: translateY(18px);
            opacity: 0;
            pointer-events: none;
            transition: transform .18s ease, opacity .18s ease;
            z-index: 5000;
        }

        .askbase-bottom-sheet--open {
            transform: translateY(0);
            opacity: 1;
            pointer-events: auto;
        }

        .askbase-bottom-sheet__header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 8px;
        }

        .askbase-bottom-sheet__title {
            font-size: 14px;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.95);
        }

        .askbase-bottom-sheet__subtitle {
            font-size: 12px;
            color: rgba(203, 213, 225, 0.9);
            margin-top: 2px;
        }

/* ==================================================
   RADAR BOTTOM SHEET — CLOSE BUTTON (UNIFIED STYLE)
   ================================================== */

.askbase-bottom-sheet__close {
    position: absolute !important;

    /* === ПОЗИЦИЯ === */
    top: 10px;              /* ↑ ниже / выше */
    right: 12px;            /* ← левее / правее */
    left: unset !important;
    bottom: unset;

    /* === РАЗМЕР === */
    width: 28px;
    height: 28px;

    /* === ВИЗУАЛ (как у левой панели) === */
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);

    /* === ТЕКСТ === */
    color: rgba(226, 232, 240, 0.9);
    font-size: 18px;
    font-weight: 500;
    line-height: 1;

    /* === ВЫРАВНИВАНИЕ === */
    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 20;

    /* === УБИРАЕМ ДЕФОЛТНОЕ === */
    outline: none;
    text-decoration: none;
    padding: 0;
}

/* hover */
.askbase-bottom-sheet__close:hover {
    background: rgba(15, 23, 42, 0.7);
}

/* active */
.askbase-bottom-sheet__close:active {
    transform: translateY(1px);
}

/* focus / focus-visible — без синего свечения */
.askbase-bottom-sheet__close:focus,
.askbase-bottom-sheet__close:focus-visible {
    outline: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

        .askbase-bottom-sheet__body {
            height: calc(100% - 48px);
            overflow: auto;
            padding-right: 4px;
        }

        .askbase-results-grid {
            display: grid;
            grid-template-columns: 1.1fr 1fr 1fr 1.1fr;
            gap: 10px;
        }

        @media (max-width: 1200px) {
            .askbase-results-grid { grid-template-columns: 1fr 1fr; }
        }

        @media (max-width: 780px) {
            .askbase-bottom-sheet { height: 46vh; }
            .askbase-results-grid { grid-template-columns: 1fr; }
        }

        .askbase-result-card {
            border-radius: 16px;
            background: rgba(15, 23, 42, 0.55);
            border: 1px solid rgba(148, 163, 184, 0.35);
            padding: 10px;
        }

        .askbase-result-card h4 {
            margin: 0 0 8px;
            font-size: 13px;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.95);
        }
        /* ===== /Radar results bottom sheet ===== */

/* Radar center square — більш акуратний “піксель” */
.askbase-radar-center-wrap {
    background: transparent !important;
    border: none !important;
    width: 0;
    height: 0;
}

.askbase-radar-center {
    width: 5px;
    height: 5px;
    background: #facc15;                 /* той самий жовтий, що й контур */
    border-radius: 1.5px;                  /* легке згладжування, не “цвях” */
    box-shadow: 0 0 0 1px rgba(0,0,0,.35);  /* тоненький темний контур */
}

    /* ===== Radar radius pills (soft UI) ===== */
    .askbase-radar-radius-pills {
        margin-top: 4px;
        display: inline-flex;
        gap: 4px;
        padding: 2px;
        border-radius: 999px;
        background: rgba(15,23,42,0.20);   /* мягкий тёмный фон */
        backdrop-filter: blur(8px);
    }

    .askbase-radar-radius-pill {
        border: 1px solid rgba(148,163,184,0.35);
        outline: none;
        cursor: pointer;
        font-size: 11px;
        line-height: 1.25;
        padding: 3px 8px;
        border-radius: 999px;
        background: rgba(15,23,42,0.55);
        color: rgba(226,232,240,0.88);
        transition:
            background 0.15s ease,
            color 0.15s ease,
            border-color 0.15s ease;
    }

    .askbase-radar-radius-pill:hover {
        background: rgba(15,23,42,0.80);
        border-color: rgba(148,163,184,0.55);
    }

    .askbase-radar-radius-pill--active {
        background: rgba(15,23,42,0.92);          /* почти как фон */
        border-color: rgba(250,204,21,0.85);      /* тонкая жёлтая рамка */
        color: rgba(250,250,250,0.98);
        font-weight: 500;
    }

    /* ===== Radar bottom sheet: analytic table v2 ===== */

    #radar-bottom-sheet .askbase-result-card table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 6px; /* разрыв между строками */
        font-size: 12px;
    }

    #radar-bottom-sheet .askbase-result-card thead {
        display: none; /* убираем классический header */
    }

    #radar-bottom-sheet .askbase-result-card tr {
        background: rgba(15,23,42,0.55);
        backdrop-filter: blur(6px);
        border-radius: 10px;
        transition: background .15s ease;
    }

    #radar-bottom-sheet .askbase-result-card tr:hover {
        background: rgba(15,23,42,0.75);
    }

    #radar-bottom-sheet .askbase-result-card td {
        padding: 8px 10px;
        border: none;
        color: rgba(226,232,240,0.92);
        vertical-align: middle;
    }

    /* первый столбец — название */
    #radar-bottom-sheet .askbase-result-card td:first-child {
        font-weight: 600;
        color: #e5e7eb;
    }

    /* числовые значения */
    #radar-bottom-sheet .askbase-result-card td:last-child,
    #radar-bottom-sheet .askbase-result-card td[data-value] {
        text-align: right;
        font-weight: 600;
        color: #facc15;
    }

    /* слабые вторичные числа */
    #radar-bottom-sheet .askbase-result-card td.muted {
        color: rgba(226,232,240,0.55);
        font-weight: 400;
    }

    /* заголовки блоков */
    #radar-bottom-sheet .askbase-result-card h4 {
        margin: 0 0 10px 0;
        font-size: 13px;
        font-weight: 600;
        color: #f8fafc;
        letter-spacing: .2px;
    }

    /* ===== /Radar bottom sheet: analytic table v2 ===== */

/* ===== Radar text color FIX ===== */

/* базовый текст в карточках радара */
#radar-bottom-sheet,
#radar-bottom-sheet * {
    color: rgba(226, 232, 240, 0.92);
}

/* заголовки блоков */
#radar-bottom-sheet h3,
#radar-bottom-sheet h4,
#radar-bottom-sheet .askbase-result-title {
    color: #f8fafc;
    font-weight: 600;
}

/* ключевые значения (цифры, проценты) */
#radar-bottom-sheet strong,
#radar-bottom-sheet .value,
#radar-bottom-sheet td:last-child {
    color: #facc15; /* жёлтый акцент */
    font-weight: 600;
}

/* вторичный текст */
#radar-bottom-sheet .muted,
#radar-bottom-sheet small,
#radar-bottom-sheet .sub {
    color: rgba(226, 232, 240, 0.6);
}

/* строки таблиц — убираем чёрный */
#radar-bottom-sheet td,
#radar-bottom-sheet th {
    color: rgba(226, 232, 240, 0.9);
}

/* защита от наследования старых table styles */
#radar-bottom-sheet table * {
    color: inherit !important;
}

/* ===== /Radar text color FIX ===== */

/* =========================
   LEFT PANEL – SAFE TUNE
   ========================= */

/* сама панель */
.askbase-panel {
    width: 340px;

    /* светлее и "воздушнее" */
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(14px);

    border: 1px solid rgba(148,163,184,0.25);
    box-shadow: 0 16px 40px rgba(0,0,0,0.45);

    /* НЕ заходим под радар */
    max-height: calc(100vh - 220px);
}

/* если радар открыт — ещё выше */
.askbase-analyze-panel--open ~ .askbase-panel {
    max-height: calc(100vh - 360px);
}

/* общий текст компактнее */
.askbase-panel,
.askbase-panel * {
    font-size: 12px;
}

/* строки фильтров */
.askbase-layer-row {
    margin-bottom: 6px;
}

/* ЛЕВАЯ ПАНЕЛЬ: прямоугольные кнопки / пилюли */
.askbase-panel .askbase-pill {
    min-height: 26px;
    padding: 4px 8px;

    background: rgba(15,23,42,0.60);
    border: 1px solid rgba(148,163,184,0.35);
    border-radius: 6px;              /* ❗ вместо 999px */

    font-size: 11px;
    font-weight: 500;
    color: #e5e7eb;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    box-shadow: none;
}

/* маленькие кнопки (×, Points/Heatmap) */
.askbase-panel .askbase-pill[style*="width"] {
    min-width: 24px;
    padding: 0 6px;
}

/* hover — спокойный */
.askbase-panel .askbase-pill:hover {
    background: rgba(30,41,59,0.85);
    border-color: rgba(148,163,184,0.55);
}

/* логотипы на карте остаются круглыми */
.retail-logo-marker img {
    border-radius: 999px;
    box-shadow: 0 0 6px rgba(15, 23, 42, 0.6);
    background: #ffffff;
}

/* ===== ACTIVE PILL – Transparent Lime Gradient ===== */

.askbase-panel .askbase-pill--active {
    background: linear-gradient(
        180deg,
        rgba(57, 255, 20, 0.55) 0%,
        rgba(168, 255, 0, 0.45) 60%,
        rgba(234, 255, 0, 0.40) 100%
    ) !important;

    color: #0f172a !important;

    border: 1px solid rgba(132, 204, 22, 0.65) !important;

    box-shadow:
        0 0 0 1px rgba(132, 204, 22, 0.35),
        0 0 12px rgba(132, 204, 22, 0.35),
        0 6px 16px rgba(132, 204, 22, 0.25);

    backdrop-filter: blur(6px);

    transition: all 0.2s ease;
}

.askbase-panel .askbase-pill--active:hover {
    filter: brightness(1.08);
}

/* ===== Legacy radar controls – visually hidden, JS-safe ===== */
#retailAnalyzeBtn,
#retailAnalyzeClear,
#retailAnalyzeRadius,
#retailAnalyzeType {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== Left panel: hide extra clear-crosses (JS-safe) ===== */

#masterTypeClear,
#wsDominantClear,
#wsConfClear {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === ЛЕВАЯ ПАНЕЛЬ: выравнивание рядов по левому краю === */

/* строки слоёв в панели */
.askbase-panel .askbase-layer-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* вместо space-between / flex-end */
    gap: 6px;
}

/* подпись слоя — компактная, но без переноса, рядом с кнопками */
.askbase-panel .askbase-layer-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* блок с кнопками (pill’ами) в панели — тоже слева */
.askbase-panel .askbase-layer-pills {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;   /* главное: не вправо */
    gap: 6px;
}

/* содержимое самих кнопок внутри панели — чуть влево */
.askbase-panel .askbase-pill {
    justify-content: flex-start;
    text-align: left;
}

/* ===== TOP SEARCH POSITION Кнопка поиска - Позиция   ===== */
.askbase-top-search {
    position: absolute;
    top: 8px;
    right: 180px; /* левее Map/Earth */
    z-index: 1100;

    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ===== UserPoints: Groups — RESET STYLE ===== */

.askbase-userpoints-groups-row {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.askbase-userpoints-groups-row--open {
    display: flex;
}

.askbase-userpoints-group-chip {
    all: unset;                 /* 🔥 сбрасываем ВСЁ */
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e5e7eb;
    cursor: pointer;
}

.askbase-userpoints-group-chip input[type="checkbox"] {
    cursor: pointer;
}

.askbase-userpoints-group-chip span {
    all: unset;
}

/* === NORMALIZE RETAIL FILTER BUTTONS WIDTH === */

/* базовая ширина всех контролов внутри панели */
.askbase-panel .askbase-pill,
.askbase-panel select,
.askbase-panel input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

/* Retail: сегменты / категории / бренды — уже визуально */
#osmRetailSegmentBtn,
#osmRetailCategoryBtn,
#osmRetailBrandBtn {
    width: 100% !important;
    padding-left: 10px;
    padding-right: 10px;
}

/* визуально "обрезаем воздух" справа */
.askbase-layer-row {
    padding-right: 0;
}

/* === SAME HEIGHT AS OTHER PANEL BUTTONS === */

.askbase-panel #osmRetailFilters .askbase-pill {
    min-height: 26px;
    height: 26px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 11.5px;
}

/* === RETAIL FILTERS — SOFTER VISUAL WEIGHT === */

#osmRetailSegmentBtn,
#osmRetailCategoryBtn,
#osmRetailBrandBtn {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148,163,184,0.25);
}

/* ===== USERPOINTS MODES v2 FINAL (stable, no jump) ===== */
.askbase-userpoints-modes{
  position: fixed !important;

  right: 52px !important;   /* как было визуально */
  top: 92px !important;     /* подстрой: 70–120px */

  left: auto !important;
  bottom: auto !important;
  transform: none !important;

  width: 360px !important;
  max-width: 360px !important;

  max-height: calc(100vh - 140px) !important;
  overflow: hidden !important;

  z-index: 3000 !important;
  box-sizing: border-box !important;
}

/* ================================
   USERPOINTS PANEL — FINAL LAYER
   ================================ */

:root{
  --radar-safe-height: 300px; /* под Radar, можно 280–320 */
}

/* 1. позиция панели */
.askbase-userpoints-modes{
  top: 60px !important;              /* регулируй высоту */
  bottom: var(--radar-safe-height) !important;
  max-height: calc(100vh - var(--radar-safe-height) - 20px) !important;
}

/* 2. внутренний скролл для вкладки "Групи" */
.askbase-userpoints-groups-row{
  max-height: 160px !important;
  overflow-y: auto !important;
  padding-right: 4px;
}

/* ===== FINAL: Groups dropdown стабильный ===== */
.askbase-userpoints-groups-row{
  display:none;
  margin-top:6px;

  /* лучше grid, чем flex — не будет "ползти" по ширине */
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;

  max-height: 180px;
  overflow-y: auto;
  overflow-x: hidden;     /* <- убираем горизонтальный скролл */
  padding-right: 6px;
}

.askbase-userpoints-groups-row--open{
  display: grid;
}

.askbase-userpoints-group-chip{
  display:flex;
  align-items:center;
  gap:8px;

  min-width: 0;           /* важно для обрезки текста */
  white-space: nowrap;

  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(15,23,42,0.40);
  font-size: 11px;
  color: #e5e7eb;
  cursor: pointer;
}

.askbase-userpoints-group-chip span{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow: ellipsis; /* длинные названия не ломают ширину */
}

/* ===== Groups: nicer checkbox ===== */
.askbase-userpoints-group-chip{
  background: rgba(15,23,42,0.28);
  border-color: rgba(148,163,184,0.35);
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.askbase-userpoints-group-chip:hover{
  background: rgba(99,102,241,0.12);
  border-color: rgba(99,102,241,0.45);
  transform: translateY(-1px);
}

/* кастомный чекбокс */
.askbase-userpoints-group-chip input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(2,6,23,0.25);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.askbase-userpoints-group-chip input[type="checkbox"]::after{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #6366f1;
  transform: scale(0);
  transition: transform .12s ease;
}

.askbase-userpoints-group-chip input[type="checkbox"]:checked{
  border-color: rgba(99,102,241,0.9);
  background: rgba(99,102,241,0.18);
}

.askbase-userpoints-group-chip input[type="checkbox"]:checked::after{
  transform: scale(1);
}

/* FINAL: panel should NOT stretch vertically */
.askbase-userpoints-modes{
  top: 46px !important;              /* регулируй */
  bottom: auto !important;           /* <-- ВАЖНО: убрать растяжение */
  height: auto !important;

  /* ограничение по высоте вместо bottom */
  max-height: calc(100vh - 46px - 300px) !important; /* 300px = запас под Radar */
  overflow: hidden !important;        /* группы скроллим внутри */
}

.askbase-userpoints-groups-row{
  max-height: 180px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* =========================
   TOP SEARCH FLYOUT — COMPACT
   (NO HTML CHANGES)
   ========================= */

/* якорь для абсолютного позиционирования */
.askbase-right-panel{
  position: relative;
}

/* сам flyout (контейнер) */
#top-search-flyout.askbase-search-flyout{
  position: absolute;
  top: 1px;
  right: 40px;

  width: auto;

  display: flex;
  align-items: center;

  /* компактнее */
  padding: 6px 8px;
  border-radius: 12px;

  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.30);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.32);

  z-index: 2600;

  /* анимация выезда */
  transform: translateX(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}

/* показ */
#top-search-flyout.askbase-search-flyout:not(.askbase-search-flyout--hidden){
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* скрытие — НЕ display:none (чтобы анимация работала) */
#top-search-flyout.askbase-search-flyout.askbase-search-flyout--hidden{
  display: flex;
}

/* внутренняя строка: input + button */
#top-search-flyout .askbase-search{
  display: flex;
  align-items: center;
  gap: 8px;            /* было 10px */

  flex: 1 1 auto;
  min-width: 0;
}

/* инпут */
#top-search-flyout #search-input{
  flex: 1 1 auto;
  min-width: 200px;    /* было 260px -> легче ужимается */

  height: 24px;        /* было 40px */
  padding: 0 8px;     /* было 0 14px */
  border-radius: 999px;

  border: 1px solid rgba(148,163,184,0.35);
  background: rgba(15,23,42,0.55);
  color: rgba(226,232,240,0.95);

  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

#top-search-flyout #search-input::placeholder{
  color: rgba(148,163,184,0.70);
}

/* кнопка “Знайти” — компактнее */
#top-search-flyout #search-btn{
  flex: 0 0 auto;

  height: 24px;        /* было 40px */
  padding: 0 8px;     /* было 0 18px */
  border-radius: 999px;

  border: 1px solid rgba(34,197,94,0.55);
  background: rgba(34,197,94,0.18);
  color: rgba(236,253,245,0.95);

  font-weight: 600;
  font-size: 13px;

  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,0.20);
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}

#top-search-flyout #search-btn:hover{
  background: rgba(34,197,94,0.26);
  border-color: rgba(34,197,94,0.75);
  transform: translateY(-1px);
}

#top-search-flyout #search-btn:active{
  transform: translateY(0);
}

/* статус НЕ влияет на верстку: под flyout, в одну строку */
#top-search-flyout #search-status{
  position: absolute;
  left: 10px;
  top: calc(100% + 6px);

  width: 100%;

  font-size: 12px;
  line-height: 1.2;
  color: rgba(226,232,240,0.78);

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
}

/* мобилка */
@media (max-width: 900px){
  #top-search-flyout.askbase-search-flyout{
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  #top-search-flyout #search-input,
  #top-search-flyout #search-btn{
    height: 28px;
  }
}

    
