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

    :root {
      --bg:           #0c0c0f;
      --glass:        rgba(14,14,18,0.72);
      --glass-heavy:  rgba(14,14,18,0.88);
      --glass-border: rgba(255,255,255,0.06);
      --glass-glow:   rgba(255,255,255,0.02);
      --text:         #f0eeeb;
      --text-2:       #a09e99;
      --text-3:       #7c7a74;
      --accent:       #e8c26e;
      --accent-dim:   rgba(232,194,110,0.12);
      --accent-glow:  rgba(232,194,110,0.25);
      /* Aliases for tokens referenced across chat/presence/menus (audit fix:
         these were used but never defined, leaving elements with no background). */
      --primary:      var(--accent);
      --secondary:    #d99f4c;
      --gold:         var(--accent);
      --bg-2:         #14141a;
      --surface-2:    var(--glass-heavy);
      --glass-bg:     var(--glass);
      --blue:         #6ea8e8;
      --blue-dim:     rgba(110,168,232,0.12);
      --green:        #6ee8a0;
      --green-dim:    rgba(110,232,160,0.12);
      --red:          #e86e6e;
      --red-dim:      rgba(232,110,110,0.12);
      --orange:       #e8a86e;
      --sale:         #ec4899;
      --sale-dim:     rgba(236,72,153,0.14);
      --orange-dim:   rgba(232,168,110,0.12);
      --radius:       14px;
      --radius-sm:    8px;
      --radius-pill:  100px;
      --blur:         20px;
      --shadow:       0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px var(--glass-border);
      --shadow-lg:    0 16px 64px rgba(0,0,0,0.5), 0 0 0 1px var(--glass-border);
      --font:         'Manrope', -apple-system, sans-serif;
      --mono:         'JetBrains Mono', monospace;
      --transition:   0.2s cubic-bezier(0.16, 1, 0.3, 1);
      /* Z-index scale */
      --z-map:        0;
      --z-chrome:     100;
      --z-panel:      150;
      --z-drawer:     200;
      --z-ctx:        500;
      --z-overlay:    700;
      --z-modal:      900;
      --z-toast:      1000;
      --z-skip:       1100;
      /* Type scale — 10 steps replace 28 ad-hoc sizes; floor raised to 0.62rem
         (audit P5: smallest tiers were illegible). Change a token, not call sites. */
      --fs-3xs:       0.62rem;
      --fs-2xs:       0.68rem;
      --fs-xs:        0.72rem;
      --fs-sm:        0.78rem;
      --fs-md:        0.84rem;
      --fs-base:      0.9rem;
      --fs-lg:        1rem;
      --fs-xl:        1.2rem;
      --fs-2xl:       1.5rem;
      --fs-3xl:       2rem;
    }

    /* ── Skip link ── */
    .skip-link {
      position: absolute; top: -100px; left: 0; z-index: 10000;
      padding: 12px 24px; background: var(--accent); color: var(--bg);
      font-weight: 700; font-size: var(--fs-base); text-decoration: none;
      border-radius: 0 0 var(--radius-sm) 0;
      transition: top 0.2s;
    }
    .skip-link:focus { top: 0; }

    html, body { height: 100%; font-family: var(--font); font-size: var(--fs-base); background: var(--bg); color: var(--text); overflow: hidden; }
    button { font-family: inherit; cursor: pointer; border: none; background: none; }
    input, select, textarea { font-family: inherit; }
    ::selection { background: var(--accent); color: var(--bg); }

    /* ── Focus-visible for accessibility ── */
    :focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }
    :focus:not(:focus-visible) { outline: none; }

    /* ───── MAP ───── */
    #map { position: fixed; top: 48px; right: 0; bottom: 0; left: 52px; z-index: 0; }
    /* Arrow cursor over the map instead of MapLibre's constant grab hand —
       precision work (parcel clicks) reads better with a pointer that only
       becomes a hand WHILE dragging. JS still sets the pointer/crosshair
       cursors inline over markers and in draw mode, and inline wins. */
    .maplibregl-canvas-container.maplibregl-interactive { cursor: default; }
    .maplibregl-canvas-container.maplibregl-interactive:active { cursor: grabbing; }

    /* ───── APP SIDEBAR (map tools only) ───── */
    .app-sidebar {
      position: fixed; top: 48px; left: 0; bottom: 0; width: 52px; z-index: 100;
      background: var(--glass-heavy); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
      border-right: 1px solid var(--glass-border);
      display: flex; flex-direction: column; align-items: center;
      padding: 10px 0; gap: 4px;
      /* Small laptop screens: the column may exceed the viewport — scroll
         quietly instead of clipping the bottom tools */
      overflow-y: auto; scrollbar-width: none;
    }
    .app-sidebar::-webkit-scrollbar { display: none; }
    .app-sidebar.hidden { display: none; }
    .sb-sep { width: 28px; height: 1px; background: var(--glass-border); margin: 4px 0; }
    .sb-btn {
      width: 40px; height: 40px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-3); transition: var(--transition); position: relative;
      background: none; border: none; cursor: pointer; padding: 0;
    }
    .sb-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    /* Slim caret under a layer toggle (markets priority filter) */
    .sb-btn-caret { height: 16px; margin-top: -6px; border-radius: 6px; }
    .sb-btn-caret svg { width: 12px; height: 12px; }
    .sb-btn-caret.filtering { color: var(--accent); }
    /* ── Lead Sniper queue chip ── */
    .snipe-chip { position:absolute; bottom:22px; left:50%; transform:translateX(-50%); z-index:60;
      display:flex; flex-direction:column; gap:6px; padding:8px 12px; border-radius:14px;
      background:var(--glass-heavy); backdrop-filter:blur(20px); border:1px solid rgba(232,194,110,0.45);
      box-shadow:var(--shadow-lg); font-size:var(--fs-xs); max-width:min(420px, 90vw); }
    .snipe-chip-row { display:flex; align-items:center; gap:8px; }
    .snipe-list { max-height:240px; overflow-y:auto; display:flex; flex-direction:column; gap:2px;
      border-bottom:1px solid var(--glass-border); padding-bottom:6px; }
    .snipe-list-row { display:flex; align-items:center; gap:6px; padding:3px 4px; border-radius:6px; }
    .snipe-list-row:hover { background:rgba(255,255,255,0.05); }
    .snipe-list-info { flex:1; min-width:0; display:flex; flex-direction:column; cursor:pointer; }
    .snipe-list-addr { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .snipe-list-owner { color:var(--text-3); font-size:var(--fs-2xs); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .snipe-list-x { background:none; border:none; color:var(--text-3); font-size:1rem; cursor:pointer; padding:0 4px; flex:none; }
    .snipe-list-x:hover { color:var(--red); }
    /* Hover intel tooltip (owner + mailing while sniping) */
    .snipe-tip { position:absolute; z-index:70; pointer-events:none; max-width:280px;
      background:rgba(12,12,14,0.92); border:1px solid rgba(232,194,110,0.4); border-radius:8px;
      padding:8px 10px; box-shadow:var(--shadow-lg); font-size:var(--fs-xs); }
    .snipe-tip-owner { font-weight:700; color:#e8c26e; }
    .snipe-tip-addr { color:var(--text-2); font-size:var(--fs-2xs); margin-top:1px; }
    .snipe-tip-mail { color:var(--text-2); font-size:var(--fs-2xs); margin-top:3px; }
    .snipe-tip-wait { color:var(--text-3); font-style:italic; }
    .snipe-tip-intel { margin-top:6px; padding-top:6px; border-top:1px solid rgba(232,194,110,0.25);
      font-size:var(--fs-2xs); line-height:1.55; }
    .snipe-tip-insys { color:#7db8e8; }
    .snipe-tip-new { color:#7fd685; }
    .snipe-tip-streak { color:var(--text-2); }
    .snipe-tip-to { color:#e8c26e; font-weight:700; }
    .snipe-tip-x { margin-top:5px; font-size:var(--fs-3xs, 0.6rem); color:var(--text-3);
      letter-spacing:0.6px; text-transform:uppercase; }
    .snipe-tip-tag { color:#ef9a9a; font-weight:700; }
    .snipe-tip-tag.sug { color:#e8a33d; }
    .snipe-tip-tag.over { color:var(--text-3); font-weight:500; font-style:italic; }
    .snipe-tip-zrow { margin-top:3px; }
    .snipe-tip-zoning { color:var(--text-2); font-size:var(--fs-2xs); }
    .snipe-tip-tagpct { color:var(--text-3); font-weight:500; }
    .snipe-tag-line { display:flex; align-items:center; gap:5px; margin-top:3px; }
    .snipe-tag { display:inline-block; padding:1px 8px; border-radius:10px;
      font-size:var(--fs-3xs, 0.6rem); font-weight:700; line-height:1.6;
      max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .snipe-tag.on { background:rgba(244,67,54,0.16); color:#ef9a9a; }
    .snipe-tag.sug { background:rgba(232,163,61,0.14); color:#e8a33d; border:none; cursor:pointer; }
    .snipe-tag.sug:hover { background:rgba(232,163,61,0.26); }
    .snipe-tag.off { background:rgba(255,255,255,0.06); color:var(--text-3); font-weight:500; }
    .snipe-tag-x { background:none; border:none; color:var(--text-3); cursor:pointer;
      font-size:var(--fs-xs); padding:0 3px; line-height:1; }
    .snipe-tag-x:hover { color:var(--red); }
    .snipe-chip-dot { width:10px; height:10px; border-radius:50%; border:2.5px solid #e8c26e; background:rgba(0,0,0,0.35); box-sizing:border-box; flex:none; }
    .snipe-chip-count { font-weight:700; font-family:var(--mono); }
    .snipe-chip-hint { color:var(--text-3); }
    .snipe-chip-btn { background:rgba(255,255,255,0.06); border:1px solid var(--glass-border); border-radius:6px;
      color:var(--text-2); font-size:var(--fs-2xs); padding:3px 10px; cursor:pointer; }
    .snipe-chip-btn:hover { background:rgba(255,255,255,0.12); color:var(--text); }
    .snipe-chip-sync { background:#e8c26e; border-color:#e8c26e; color:#1a1918; font-weight:700; }
    .snipe-chip-sync:hover { background:#f0d08a; color:#1a1918; }

    /* True-owner fill: a long batch run, so the panel reports as it goes */
    .tof-bar { height:5px; border-radius:3px; background:rgba(255,255,255,0.08); overflow:hidden; }
    .tof-bar-fill { height:100%; background:#e8c26e; transition:width 0.3s ease; }
    .tof-line { font-size:var(--fs-2xs); color:var(--text-2); margin-top:9px; }
    .tof-stats { display:flex; gap:14px; flex-wrap:wrap; margin-top:7px;
      font-size:var(--fs-2xs); color:var(--text-3); font-family:var(--mono); }
    /* a crashed lookup is not a verdict — it reads as a problem, not a count */
    .tof-stat-err { color:var(--red); }
    .tof-note { font-size:var(--fs-2xs); color:var(--text-2); margin-top:10px;
      padding:8px 10px; background:rgba(255,255,255,0.03); border-radius:6px; }
    .tof-err { font-size:var(--fs-2xs); color:var(--red); margin-top:8px; line-height:1.5; }
    .tof-names { margin-top:12px; border-top:1px solid var(--glass-border); padding-top:9px;
      max-height:170px; overflow-y:auto; }
    .tof-name { display:flex; justify-content:space-between; gap:12px; padding:3px 0;
      font-size:var(--fs-2xs); }
    .tof-name-person { color:var(--text); font-weight:600; }
    .tof-name-owner { color:var(--text-3); text-align:right; }
    .sb-btn.active { background: rgba(255,255,255,0.10); color: var(--accent); }
    .sb-btn.pin-mode { background: rgba(232,194,110,0.2); color: var(--accent); animation: pin-pulse 1.5s ease-in-out infinite; }
    @keyframes pin-pulse { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 8px rgba(232,194,110,0.4); } }
    .sb-btn svg { width: 18px; height: 18px; }

    /* Sidebar tooltips (right side) — SUPERSEDED by js/tips.js.
       Kept off rather than deleted so the reason survives: the sidebar has
       overflow-y:auto for short screens, and non-visible overflow on one axis
       clips the other, so this rendered correctly and was sliced off at the
       sidebar's edge. Tips are drawn into document.body now. */
    .sb-btn[data-tip]:not(.legacy-tip)::after,
    .sb-btn[data-tip]:not(.legacy-tip)::before { content: none !important; }
    .sb-btn[data-tip]::after {
      content: attr(data-tip);
      position: absolute; left: calc(100% + 10px); top: 50%;
      padding: 6px 12px; background: var(--glass-heavy); backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border); border-radius: 6px;
      font-size: var(--fs-xs); font-weight: 600; color: var(--text); white-space: nowrap;
      pointer-events: none; opacity: 0; transition: opacity 0.15s, transform 0.15s;
      transform: translateY(-50%) translateX(-4px);
      box-shadow: var(--shadow); z-index: 200;
    }
    .sb-btn[data-tip]:hover::after, .sb-btn[data-tip]:focus-visible::after {
      opacity: 1; transform: translateY(-50%) translateX(0);
    }
    .sb-btn[data-tip]::before {
      content: ''; position: absolute; left: calc(100% + 4px); top: 50%;
      transform: translateY(-50%);
      border: 5px solid transparent; border-right-color: var(--glass-border);
      pointer-events: none; opacity: 0; transition: opacity 0.15s;
      z-index: 200;
    }
    .sb-btn[data-tip]:hover::before, .sb-btn[data-tip]:focus-visible::before { opacity: 1; }

    /* ───── TOP BAR ───── */
    .top-bar {
      position: fixed; top: 0; left: 0; right: 0; height: 48px; z-index: 100;
      background: var(--glass-heavy); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
      border-bottom: 1px solid var(--glass-border);
      display: flex; align-items: center; gap: 6px; padding: 0 12px;
    }
    .tb-logo { padding: 0 8px 0 4px; font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.5px; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
    .tb-sep { width: 1px; height: 22px; background: var(--glass-border); flex-shrink: 0; }
    /* ───── COMMAND BAR (legacy, hidden) ───── */
    .cmd-bar { display: none; }
    .cmd-sep { width: 1px; height: 22px; background: var(--glass-border); flex-shrink: 0; }
    .cmd-search { position: relative; flex: 1; min-width: 96px; max-width: 480px; margin: 0 auto; }
    .cmd-search input {
      width: 100%; padding: 9px 14px 9px 36px;
      background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10);
      border-radius: var(--radius-pill); color: #f0eeeb; font-size: var(--fs-md);
      outline: none; transition: var(--transition);
    }
    .cmd-search input::placeholder { color: rgba(255,255,255,0.35); }
    .cmd-search input:focus { background: rgba(255,255,255,0.10); border-color: var(--accent-dim); box-shadow: 0 0 0 3px rgba(232,194,110,0.10); }
    .cmd-search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
    .cmd-pill {
      padding: 7px 14px; border-radius: var(--radius-pill);
      font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; transition: var(--transition);
    }
    .cmd-pill.view { color: var(--text-2); }
    .cmd-pill.view.active { background: rgba(255,255,255,0.10); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
    .cmd-pill.view:hover:not(.active) { color: var(--text); }
    .cmd-pill.add { background: var(--accent); color: var(--bg); font-weight: 700; padding: 7px 18px; }
    .cmd-pill.add:hover { box-shadow: 0 0 20px var(--accent-glow); }

    .cmd-icon {
      position: relative; width: 32px; height: 32px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-2); transition: var(--transition);
    }
    .cmd-icon:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .cmd-icon svg { width: 16px; height: 16px; }
    .cmd-badge {
      position: absolute; top: -6px; right: -8px; min-width: 20px; height: 20px;
      background: #e53935; color: #fff; font-size: var(--fs-2xs); font-weight: 800;
      font-family: var(--mono); border-radius: 10px; display: none;
      align-items: center; justify-content: center; padding: 0 5px;
      box-shadow: 0 2px 8px rgba(229,57,53,0.5); border: 2px solid var(--bg);
      line-height: 1; letter-spacing: -0.3px;
    }
    .cmd-badge.pulse {
      animation: badgePulse 0.4s ease-out;
    }
    .notify-bell {
      position: relative; width: 40px; height: 40px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      color: var(--text-3); background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.08);
      cursor: pointer; transition: var(--transition); flex-shrink: 0;
      padding: 0; font: inherit; outline: none;
    }
    .notify-bell:hover { background: rgba(255,255,255,0.10); color: var(--text); }
    .notify-bell svg { width: 20px; height: 20px; }
    .notify-bell.has-unread {
      color: var(--accent);
      background: var(--accent-dim);
      border-color: rgba(232,194,110,0.25);
      animation: bellRing 0.6s ease-out;
    }
    .notify-bell.has-unread:hover { background: rgba(232,194,110,0.2); }
    @keyframes bellRing {
      0% { transform: rotate(0); }
      20% { transform: rotate(14deg); }
      40% { transform: rotate(-10deg); }
      60% { transform: rotate(6deg); }
      80% { transform: rotate(-2deg); }
      100% { transform: rotate(0); }
    }
    @keyframes badgePulse {
      0% { transform: scale(0.5); opacity: 0.5; }
      50% { transform: scale(1.3); }
      100% { transform: scale(1); opacity: 1; }
    }

    /* ───── TYPE PILLS ───── */
    .type-pills {
      display: flex; gap: 2px; padding: 3px;
      background: rgba(255,255,255,0.04);
      border-radius: var(--radius-pill); border: 1px solid var(--glass-border);
    }
    .type-pill {
      /* 16px of side padding on four pills spent 128px on empty space while
         the search field was squeezed to 96px. The pills are the widest thing
         in the bar and were the last place that needed the room. */
      padding: 6px 10px; border-radius: var(--radius-pill);
      font-size: var(--fs-sm); font-weight: 600; color: var(--text-3);
      transition: var(--transition); display: flex; align-items: center; gap: 5px;
      white-space: nowrap;
    }
    .type-pill.active { background: rgba(255,255,255,0.08); color: var(--text); }
    .type-pill:hover:not(.active) { color: var(--text-2); }
    .type-pill .cnt {
      font-family: var(--mono); font-size: var(--fs-2xs); font-weight: 500;
      padding: 1px 5px; border-radius: 20px;
      background: rgba(255,255,255,0.05); color: var(--text-3);
    }
    .type-pill.active .cnt { background: var(--accent-dim); color: var(--accent); }

    /* ───── STAT CHIPS (hidden — counts shown in type pills) ───── */
    .stat-chips { display: none; }

    /* ───── MAP CONTROLS (legacy — replaced by flyout) ───── */
    .map-ctrls {
      display: none !important;
      position: fixed; bottom: 16px; left: 16px; z-index: 100;
      gap: 4px; align-items: flex-end;
    }
    .map-ctrls-col { display: flex; flex-direction: column; gap: 4px; }
    .map-ctrl {
      padding: 7px 12px; background: var(--glass-heavy);
      backdrop-filter: blur(var(--blur)); border: 1px solid var(--glass-border);
      border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--fs-2xs);
      font-weight: 500; box-shadow: var(--shadow); transition: var(--transition);
      display: flex; align-items: center; gap: 5px; white-space: nowrap;
    }
    .map-ctrl:hover { background: rgba(255,255,255,0.08); color: var(--text); }
    .map-ctrl.active { border-color: var(--accent-dim); color: var(--accent); }
    .map-ctrl svg { width: 13px; height: 13px; }

    /* ── Heatmap Legend ── */
    .heatmap-legend {
      position: absolute; bottom: 16px; right: 16px; z-index: 10;
      background: var(--glass-heavy); backdrop-filter: blur(var(--blur));
      border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
      padding: 10px 14px; box-shadow: var(--shadow);
      min-width: 160px;
    }
    .heatmap-legend-title {
      font-size: var(--fs-2xs); font-weight: 700; color: var(--text-2);
      text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px;
    }
    .heatmap-legend-subtitle {
      font-size: var(--fs-3xs); font-style: italic; color: var(--text-3);
      margin-bottom: 6px;
    }
    .heatmap-metric-selector {
      display: flex; gap: 4px; margin-bottom: 8px;
    }
    .heatmap-metric-btn {
      flex: 1; padding: 3px 0; border: 1px solid var(--glass-border);
      border-radius: 4px; background: transparent;
      color: var(--text-3); font-size: var(--fs-3xs); font-weight: 600;
      cursor: pointer; font-family: var(--mono);
    }
    .heatmap-metric-btn:hover { border-color: var(--text-3); }
    .heatmap-metric-btn.active {
      background: var(--accent); color: #000; border-color: var(--accent);
    }
    .heatmap-legend-bar {
      height: 10px; border-radius: 5px;
      background: linear-gradient(to right,
        #2166ac, #67a9cf, #ffffbf, #fc8d59, #b2182b);
    }
    .heatmap-legend-labels {
      display: flex; justify-content: space-between; margin-top: 4px;
      font-size: var(--fs-3xs); color: var(--text-3); font-weight: 500;
      font-family: var(--mono);
    }

    /* ───── USER PILL ───── */
    .user-pill {
      margin-left: auto;
      padding: 5px 14px 5px 5px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius-pill);
      font-size: var(--fs-sm); color: var(--text-2); font-weight: 500;
      cursor: pointer; transition: var(--transition);
      display: flex; align-items: center; gap: 8px;
    }
    .user-pill:hover { background: rgba(255,255,255,0.08); color: var(--text); }
    /* Narrow desktop: the top bar holds a lot — tighten before it clips */
    @media (max-width: 1560px) {
      .top-bar { gap: 4px; }
      .cmd-pill { padding: 7px 10px; }
      .cmd-pill.add { padding: 7px 12px; }
      .my-comps-chip { padding: 5px 9px; }
      .tb-logo { padding: 0 4px 0 2px; }
    }
    @media (max-width: 1380px) {
      .top-bar .tb-sep { display: none; }
      .cmd-icon { width: 28px; }
    }

    .user-avatar {
      width: 26px; height: 26px; border-radius: 50%;
      background: var(--accent-dim); color: var(--accent);
      display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-3xs); font-weight: 700;
      position: relative;
    }
    .user-pill .self-presence {
      position: absolute; bottom: -1px; right: -1px;
      width: 8px; height: 8px; border-radius: 50%;
      background: #4ade80; border: 2px solid var(--bg-2);
    }
    .user-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .user-menu {
      position: fixed; z-index: 300;
      background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); padding: 6px; min-width: 180px;
    }
    .user-menu-item {
      display: flex; align-items: center; gap: 8px; width: 100%;
      padding: 8px 12px; border-radius: var(--radius-sm);
      font-size: var(--fs-md); color: var(--text-2); transition: var(--transition);
    }
    .user-menu-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .user-menu-item.danger { color: var(--red); }
    .user-menu-item.danger:hover { background: var(--red-dim); }

    /* ───── SIDE DRAWER ───── */
    .drawer {
      position: fixed; top: 0; right: 0; bottom: 0; width: 440px; z-index: 200;
      background: var(--glass-heavy); backdrop-filter: blur(30px);
      border-left: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
      display: flex; flex-direction: column;
      transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      will-change: transform;
    }
    .drawer.open { transform: translateX(0); box-shadow: -8px 0 40px rgba(0,0,0,0.3); }
    .drawer-header {
      padding: 20px 24px 16px; display: flex; align-items: center; gap: 10px;
      border-bottom: 1px solid var(--glass-border);
    }
    .drawer-header h3 { flex: 1; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.3px; }
    .drawer-close {
      width: 30px; height: 30px; border-radius: 50%;
      background: rgba(255,255,255,0.05); color: var(--text-3);
      display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-xl); transition: var(--transition);
    }
    .drawer-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
    .drawer-footer {
      padding: 16px 24px; border-top: 1px solid var(--glass-border);
      display: flex; gap: 8px;
    }

    /* ───── FORM STYLES ───── */
    .fg { margin-bottom: 14px; }
    .fg .req { color: var(--red); font-weight: 700; }
    .fg.invalid input, .fg.invalid select, .fg.invalid textarea { border-color: var(--red) !important; background: rgba(232,110,110,0.06); }
    .field-error { margin-top: 5px; font-size: var(--fs-xs); color: var(--red); font-weight: 600; animation: tIn 0.2s ease; }
    .fg label {
      display: block; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3);
      text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 5px;
    }
    .fg input, .fg select, .fg textarea {
      width: 100%; padding: 9px 12px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
      color: var(--text); font-size: var(--fs-base); outline: none; transition: var(--transition);
    }
    .fg input:focus, .fg select:focus, .fg textarea:focus {
      border-color: rgba(232,194,110,0.3);
      box-shadow: 0 0 0 3px rgba(232,194,110,0.06);
      background: rgba(255,255,255,0.06);
    }
    .fg input::placeholder { color: var(--text-3); }
    .fr { display: flex; gap: 10px; }
    .fr .fg { flex: 1; }
    .fg select {
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235c5a56'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px;
    }
    .section-label {
      font-size: var(--fs-3xs); font-weight: 700; color: var(--accent);
      text-transform: uppercase; letter-spacing: 1.2px;
      margin: 18px 0 10px; padding-bottom: 6px;
      border-bottom: 1px solid var(--glass-border);
    }
    .btn {
      padding: 9px 20px; border-radius: var(--radius-sm);
      font-size: var(--fs-md); font-weight: 600; transition: var(--transition);
    }
    .btn.primary { background: var(--accent); color: var(--bg); flex: 1; }
    .btn.primary:hover { box-shadow: 0 0 24px var(--accent-glow); }
    .btn.danger { background: var(--red-dim); color: var(--red); }
    .btn.danger:hover { background: var(--red); color: #fff; }
    .btn.ghost { color: var(--text-3); border: 1px solid var(--glass-border); }
    .btn.ghost:hover { background: rgba(255,255,255,0.05); color: var(--text-2); }

    /* ── Disaggregation ──
       Zlatniji nego ostatak forme (Ivanov zahtev 28.7: "magic effekat") —
       i dalje brand zlato, samo primetno: topliji gradijent, jači okvir,
       mek spoljni sjaj; rezultat blesne jednom kad se izračuna (.lit). */
    .disagg {
      background: linear-gradient(160deg, rgba(232,194,110,0.14), rgba(232,194,110,0.05) 45%, rgba(232,194,110,0.11));
      border: 1px solid rgba(232,194,110,0.38);
      box-shadow: 0 0 20px rgba(232,194,110,0.10), inset 0 0 30px rgba(232,194,110,0.05);
      border-radius: var(--radius); padding: 14px; margin-top: 10px;
    }
    .disagg h4 { font-size: var(--fs-2xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; text-shadow: 0 0 12px rgba(232,194,110,0.35); }
    @keyframes disaggLit {
      0% { text-shadow: 0 0 0 rgba(232,194,110,0); }
      40% { text-shadow: 0 0 16px rgba(232,194,110,0.9); }
      100% { text-shadow: 0 0 7px rgba(232,194,110,0.4); }
    }
    .disagg .dv.lit { animation: disaggLit 0.9s ease-out forwards; }
    .disagg-row { display: flex; justify-content: space-between; padding: 3px 0; }
    .disagg-row .dl { font-size: var(--fs-sm); color: var(--text-2); }
    .disagg-row .dv { font-size: var(--fs-sm); font-weight: 600; color: var(--text); font-family: var(--mono); }

    /* ───── PANEL TABS ───── */
    .panel-tabs { display: flex; gap: 2px; margin-bottom: 14px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); padding: 3px; }
    .panel-tab { flex: 1; padding: 7px 10px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); text-align: center; transition: var(--transition); }
    .panel-tab.active { background: rgba(232,194,110,0.1); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(232,194,110,0.14); }
    .panel-tab:hover:not(.active) { color: var(--text-2); }
    .tab-count { color: var(--accent); font-size: var(--fs-2xs); }

    /* ── Tag chips ── */
    .panel-tag-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; min-height: 24px; }
    .tag-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: var(--fs-2xs); font-weight: 600; background: color-mix(in srgb, var(--tag-color) 15%, transparent); color: var(--tag-color); border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent); }
    .tag-remove { background: none; border: none; color: inherit; font-size: var(--fs-md); cursor: pointer; padding: 0; line-height: 1; opacity: 0.6; }
    .tag-remove:hover { opacity: 1; }
    .tag-add-btn { padding: 3px 10px; border-radius: 20px; font-size: var(--fs-2xs); font-weight: 600; color: var(--text-3); border: 1px dashed var(--glass-border); background: none; cursor: pointer; transition: var(--transition); }
    .tag-add-btn:hover { color: var(--text-2); border-color: var(--text-3); }
    .tag-picker { position: absolute; z-index: 10; margin-top: 6px; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 12px; min-width: 240px; }
    .tag-pick-label { font-size: var(--fs-3xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
    .tag-pick-grid { display: flex; flex-wrap: wrap; gap: 4px; }
    .tag-pick-item { padding: 4px 10px; border-radius: 20px; font-size: var(--fs-2xs); font-weight: 600; background: color-mix(in srgb, var(--tag-color) 15%, transparent); color: var(--tag-color); border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent); cursor: pointer; transition: var(--transition); }
    .tag-pick-item:hover { filter: brightness(1.2); }
    .tag-pick-custom { display: flex; gap: 6px; align-items: center; }
    .tag-pick-custom input[type="text"] { flex: 1; padding: 5px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 6px; color: var(--text); font-size: var(--fs-sm); outline: none; }
    .tag-pick-add { padding: 5px 10px; background: var(--accent-dim); color: var(--accent); border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
    .pop-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
    .pop-tag { padding: 2px 8px; border-radius: 20px; font-size: var(--fs-3xs); font-weight: 700; background: color-mix(in srgb, var(--tag-color) 15%, transparent); color: var(--tag-color); }
    .table-tag { display: inline-block; padding: 1px 6px; border-radius: 10px; font-size: var(--fs-3xs); font-weight: 700; background: color-mix(in srgb, var(--tag-color) 15%, transparent); color: var(--tag-color); cursor: pointer; margin-right: 2px; }
    .table-tag:hover { filter: brightness(1.3); }
    .tag-filter-indicator { font-size: var(--fs-sm); color: var(--accent); padding: 4px 12px; background: var(--accent-dim); border-radius: 20px; }

    /* ── Comment thread ── */
    .comment-thread { max-height: 340px; overflow-y: auto; margin-bottom: 12px; }
    .comment-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--glass-border); transition: background 0.15s ease; }
    .comment-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; background: var(--blue-dim); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; cursor: pointer; }
    .comment-body { flex: 1; }
    .comment-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 3px; }
    .comment-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text); cursor: pointer; }
    .comment-date { font-size: var(--fs-2xs); color: var(--text-3); }
    .comment-edited { font-size: var(--fs-3xs); color: var(--text-3); font-style: italic; }
    .comment-text { font-size: var(--fs-md); color: var(--text-2); line-height: 1.6; }
    .comment-text .mention { color: var(--blue); font-weight: 600; }
    .comment-actions { margin-left: auto; }
    .comment-menu-btn { font-size: var(--fs-lg); color: var(--text-3); padding: 0 4px; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
    .comment-item:hover .comment-menu-btn { opacity: 1; }
    .comment-context-menu { background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px; z-index: 400; min-width: 100px; }
    .comment-context-menu button { display: block; width: 100%; text-align: left; padding: 6px 12px; font-size: var(--fs-sm); color: var(--text-2); border-radius: 4px; transition: var(--transition); }
    .comment-context-menu button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .comment-context-menu button.danger { color: var(--red); }
    .comment-context-menu button.danger:hover { background: var(--red-dim); }
    .comment-edit-input { width: 100%; padding: 6px 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--accent-dim); border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-md); outline: none; resize: none; margin-bottom: 6px; }
    .comment-edit-btns { display: flex; gap: 6px; }
    /* ── Thread / Reply styles ── */
    .comment-reply { margin-left: 32px; border-left: 2px solid var(--glass-border); padding-left: 10px; }
    .comment-reply-btn { font-size: var(--fs-2xs); color: var(--text-3); margin-top: 4px; padding: 2px 6px; border-radius: 4px; cursor: pointer; transition: var(--transition); background: none; border: none; }
    .comment-reply-btn:hover { color: var(--accent); background: rgba(255,255,255,0.04); }
    .reply-indicator { display: flex; align-items: center; gap: 6px; padding: 6px 10px; margin-bottom: 4px; background: rgba(232,194,110,0.06); border: 1px solid var(--accent-dim); border-radius: var(--radius-sm); font-size: var(--fs-xs); color: var(--accent); }
    .reply-indicator span { flex: 1; }
    .reply-cancel { font-size: var(--fs-lg); color: var(--text-3); cursor: pointer; background: none; border: none; padding: 0 4px; line-height: 1; }
    .reply-cancel:hover { color: var(--text); }

    .comment-input-wrap { display: flex; gap: 8px; position: relative; }
    .comment-input { flex: 1; padding: 8px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-md); outline: none; resize: none; transition: var(--transition); }
    .comment-input:focus { border-color: rgba(232,194,110,0.3); background: rgba(255,255,255,0.06); }
    .comment-send { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--accent); color: var(--bg); display: flex; align-items: center; justify-content: center; transition: var(--transition); align-self: flex-end; }
    .comment-send:hover { box-shadow: 0 0 16px var(--accent-glow); }

    /* ── Reactions ── */
    .comment-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
    .reaction-pill { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 20px; font-size: var(--fs-xs); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); color: var(--text-3); cursor: pointer; transition: var(--transition); }
    .reaction-pill:hover { background: rgba(255,255,255,0.08); }
    .reaction-pill.reacted { border-color: var(--accent-dim); background: var(--accent-dim); color: var(--accent); }
    .reaction-pill span { font-size: var(--fs-3xs); font-weight: 600; }
    .reaction-add { width: 22px; height: 22px; border-radius: 50%; font-size: var(--fs-sm); color: var(--text-3); background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); }
    .reaction-add:hover { background: rgba(255,255,255,0.08); color: var(--text); }
    .reaction-picker { display: flex; gap: 4px; padding: 6px; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--shadow); position: absolute; bottom: 100%; left: 0; z-index: 10; }
    .reaction-pick { font-size: var(--fs-lg); padding: 4px; border-radius: 6px; cursor: pointer; transition: var(--transition); line-height: 1; }
    .reaction-pick:hover { background: rgba(255,255,255,0.1); transform: scale(1.2); }

    /* ── @Mention dropdown ── */
    .mention-dropdown { position: absolute; bottom: 100%; left: 0; right: 0; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 180px; overflow-y: auto; display: none; z-index: 100; }
    .mention-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: var(--fs-md); color: var(--text-2); cursor: pointer; transition: var(--transition); }
    .mention-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .mention-avatar { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; }
    .mention-avatar.team { border-radius: 6px; background: var(--blue-dim); color: var(--blue); flex-shrink: 0; }
    .mention-team-note { margin-left: auto; font-size: var(--fs-3xs); color: var(--text-3); font-weight: 600; white-space: nowrap; }

    /* ── Chat attachments + typing ── */
    .chat-attach-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: rgba(255,255,255,0.05); color: var(--text-3); cursor: pointer; flex-shrink: 0; transition: var(--transition); }
    .chat-attach-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .chat-attach { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.08); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: var(--transition); }
    .chat-attach:hover { background: rgba(255,255,255,0.14); text-decoration: underline; }
    .chat-typing { padding: 2px 16px 4px; font-size: var(--fs-3xs); color: var(--text-3); font-style: italic; animation: tIn 0.2s ease; }

    /* ── What's new changelog ── */
    .wn-card { width: 460px; max-width: calc(100vw - 32px); }
    .wn-body { max-height: 60vh; overflow-y: auto; padding: 8px 20px 4px; }
    .wn-release-date { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); margin: 8px 0 10px; }
    .wn-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--glass-border); }
    .wn-item:first-of-type { border-top: none; }
    .wn-icon { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--accent-dim); color: var(--accent); }
    .wn-item-title { font-size: var(--fs-md); font-weight: 700; color: var(--text); margin-bottom: 2px; }
    .wn-item-body { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; }

    /* ── Help center ── */
    .hlp-card { width: 560px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; }
    .hlp-search { display: flex; align-items: center; gap: 8px; margin: 0 20px 4px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); color: var(--text-3); }
    .hlp-search:focus-within { border-color: rgba(232,194,110,0.4); }
    .hlp-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-size: var(--fs-sm); font-family: inherit; }
    .hlp-search input::placeholder { color: var(--text-3); }
    .hlp-body { max-height: 62vh; overflow-y: auto; padding: 8px 20px 12px; }
    .hlp-cat { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent); margin: 16px 0 6px; }
    .hlp-cat:first-child { margin-top: 4px; }
    .hlp-topic { border: 1px solid var(--glass-border); border-radius: 10px; margin-bottom: 6px; background: rgba(255,255,255,0.02); overflow: hidden; }
    .hlp-topic-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; background: none; border: none; color: var(--text); font-size: var(--fs-md); font-weight: 600; font-family: inherit; text-align: left; cursor: pointer; transition: var(--transition); }
    .hlp-topic-title:hover { background: rgba(255,255,255,0.04); }
    .hlp-chev { flex-shrink: 0; color: var(--text-3); transition: transform 0.18s ease; }
    .hlp-topic.open .hlp-chev { transform: rotate(180deg); }
    .hlp-topic-body { display: none; padding: 0 14px 12px; }
    .hlp-topic.open .hlp-topic-body { display: block; }
    .hlp-topic-body ol { margin: 4px 0 0; padding-left: 20px; }
    .hlp-topic-body li { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.55; margin-bottom: 6px; }
    .hlp-topic-body b { color: var(--text); font-weight: 700; }
    .hlp-tip { font-size: var(--fs-xs); color: var(--text-3); background: rgba(232,194,110,0.06); border: 1px solid rgba(232,194,110,0.14); border-radius: 8px; padding: 8px 12px; margin-top: 8px; line-height: 1.5; }
    .hlp-empty { text-align: center; color: var(--text-3); font-size: var(--fs-sm); padding: 32px 0; }

    /* ── Offline sync badge ── */
    .offline-badge { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: var(--z-toast); padding: 8px 16px; border-radius: var(--radius-pill); background: rgba(232,168,110,0.15); color: var(--orange); border: 1px solid rgba(232,168,110,0.25); font-size: var(--fs-xs); font-weight: 700; cursor: pointer; backdrop-filter: blur(16px); animation: tIn 0.3s ease; }
    .offline-badge:hover { background: rgba(232,168,110,0.25); }

    /* ── Notification mute-in-place ── */
    .notify-item { position: relative; }
    .notify-mute { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; display: none; align-items: center; justify-content: center; border-radius: 6px; background: rgba(255,255,255,0.06); color: var(--text-3); cursor: pointer; transition: var(--transition); }
    .notify-item:hover .notify-mute { display: flex; }
    .notify-mute:hover { background: rgba(255,255,255,0.12); color: var(--text); }
    @media (hover: none) { .notify-mute { display: flex; opacity: 0.6; } }
    .mute-menu { position: fixed; z-index: var(--z-ctx); min-width: 230px; padding: 6px; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
    .mute-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; background: transparent; transition: var(--transition); }
    .mute-menu button:hover { background: rgba(255,255,255,0.07); color: var(--text); }
    .mute-menu button b { color: var(--text); }

    /* ── Prefs modal: groups + master switch ── */
    .pref-group-label { padding: 12px 0 4px; font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); }
    .pref-master .pref-label { color: var(--accent); }

    /* ── Empty state ── */
    .empty-state {
      text-align: center; padding: 32px 24px; color: var(--text-3);
      font-size: var(--fs-base); line-height: 1.5;
    }

    /* ── File styles ── */
    .file-dropzone { border: 2px dashed var(--glass-border); border-radius: var(--radius); padding: 24px; text-align: center; transition: var(--transition); cursor: pointer; }
    .file-dropzone p { font-size: var(--fs-md); color: var(--text-3); margin-top: 8px; }
    .file-dropzone.dragover { border-color: var(--accent); background: var(--accent-dim); }
    .file-browse { color: var(--accent); font-weight: 600; cursor: pointer; }
    .file-list { margin-top: 12px; }
    .file-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--glass-border); }
    .file-icon { width: 32px; height: 32px; border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; }
    .file-info { flex: 1; }
    .file-name { font-size: var(--fs-md); color: var(--text); font-weight: 500; }
    .file-meta { font-size: var(--fs-2xs); color: var(--text-3); }
    .file-dl, .file-del, .file-extract { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: var(--transition); }
    .file-dl:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .file-del:hover { background: var(--red-dim); color: var(--red); }
    .file-extract { width: auto; padding: 0 8px; gap: 3px; font-size: var(--fs-3xs); font-weight: 700; color: var(--accent); }
    .file-extract:hover { background: var(--accent-dim); }

    /* AI Extract preview */
    .extract-grid { display: flex; flex-direction: column; gap: 8px; }
    .extract-row { display: flex; align-items: center; gap: 8px; }
    .extract-label { flex: 0 0 140px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); text-transform: capitalize; }
    .extract-value { flex: 1; padding: 6px 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 6px; color: var(--text); font-size: var(--fs-sm); font-family: var(--mono); outline: none; }
    .extract-value:focus { border-color: var(--accent); }

    /* ───── NOTES ───── */
    .notes-list { max-height: 400px; overflow-y: auto; margin-bottom: 12px; }
    .note-card { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; transition: border-color 0.2s ease, background 0.2s ease; }
    .note-card:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); }
    .note-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .note-body { font-size: var(--fs-md); color: var(--text-2); line-height: 1.6; white-space: pre-wrap; }
    .note-input-wrap { margin-top: 8px; }

    /* ───── TABLE VIEW ───── */
    .table-overlay { position: fixed; top: 48px; right: 0; bottom: 0; left: 0; z-index: 150; background: var(--bg); display: none; flex-direction: column; transition: opacity 0.25s ease; opacity: 0; }
    .table-overlay.active { display: flex; opacity: 1; }
    .table-topbar { padding: 12px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .table-topbar .back-btn { padding: 6px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.05); color: var(--text-2); font-size: var(--fs-md); font-weight: 500; }
    .table-topbar .back-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
    .table-topbar h3 { font-size: var(--fs-base); font-weight: 600; flex: 1; }
    .table-scroll { flex: 1; overflow: auto; }
    .comp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
    .comp-table thead { position: sticky; top: 0; z-index: 10; }
    .comp-table th { background: var(--bg); padding: 10px 14px; text-align: left; font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-2); border-bottom: 2px solid rgba(255,255,255,0.08); cursor: pointer; white-space: nowrap; user-select: none; }
    .comp-table th:hover { color: var(--text); background: rgba(255,255,255,0.03); }
    .comp-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); font-family: var(--mono); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
    /* Empty-value dashes recede so real data stands out */
    .comp-table td.cell-empty { color: rgba(255,255,255,0.14); }
    .comp-table td:first-child { color: var(--text); font-family: var(--font); font-weight: 500; }
    .comp-table td:nth-child(2) { color: var(--text); font-family: var(--font); font-weight: 600; }
    .comp-table tr { cursor: pointer; transition: background 0.1s; }
    .comp-table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
    .comp-table tr:hover td { background: rgba(255,255,255,0.045); }
    .comp-table tr.row-selected td { background: rgba(232,194,110,0.06); }
    .comp-table tr.row-selected:hover td { background: rgba(232,194,110,0.1); }
    .tbl-chk { width:14px; height:14px; accent-color: var(--accent); cursor:pointer; }
    .table-bulk-bar { position:absolute; bottom:0; left:0; right:0; padding:10px 20px; background:var(--bg); border-top:1px solid var(--accent); display:flex; align-items:center; gap:12px; z-index:20; }
    .bulk-count { font-size: var(--fs-md); font-weight:600; color:var(--accent); flex:1; }
    .table-empty {
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; padding: 80px 20px; color: var(--text-3);
    }
    .table-empty h4 { font-size: var(--fs-xl); color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
    .table-empty p { font-size: var(--fs-base); color: var(--text-3); max-width: 320px; line-height: 1.5; }

    /* ───── COLUMN DRAG REORDER ───── */
    .comp-table th[draggable="true"] { cursor: grab; }
    .comp-table th[draggable="true"]:active { cursor: grabbing; }
    .comp-table th.col-dragging { opacity: 0.35; background: rgba(232,194,110,0.08); }
    .comp-table th.col-drop-left { box-shadow: inset 3px 0 0 0 var(--accent); }
    .comp-table th.col-drop-right { box-shadow: inset -3px 0 0 0 var(--accent); }

    /* ───── TABLE FILTERS ───── */
    .tbl-filter-toggle { display: inline-flex; align-items: center; gap: 5px; }
    .tbl-filter-toggle.active { color: var(--accent) !important; border-color: rgba(232,194,110,0.25) !important; background: rgba(232,194,110,0.08) !important; }
    .tbl-filter-row th { padding: 4px 6px !important; background: rgba(255,255,255,0.02); border-bottom: 1px solid rgba(255,255,255,0.08); }
    .tbl-filter-input {
      width: 100%; padding: 4px 7px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); border-radius: 4px;
      color: var(--text); font-size: var(--fs-xs); font-family: var(--font);
      outline: none; transition: var(--transition);
    }
    .tbl-filter-input:focus { border-color: rgba(232,194,110,0.3); background: rgba(255,255,255,0.06); }
    .tbl-filter-input::placeholder { color: var(--text-3); font-size: var(--fs-2xs); }
    .tbl-filter-select {
      width: 100%; padding: 4px 7px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); border-radius: 4px;
      color: var(--text); font-size: var(--fs-xs); font-family: var(--font);
      outline: none; appearance: none; cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%235c5a56'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 6px center; padding-right: 18px;
    }
    .tbl-filter-select:focus { border-color: rgba(232,194,110,0.3); }
    .tbl-filter-range { display: flex; gap: 3px; }
    .tbl-filter-range .tbl-filter-input { min-width: 0; }

    /* ── Measure tool ── */
    .measure-readout {
      position: fixed; top: 58px; left: 50%; transform: translateX(-50%); z-index: 90;
      display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px;
      background: var(--glass-heavy); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
      border: 1px solid rgba(232,194,110,0.45); border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.45);
      max-width: min(92vw, 640px);
    }
    .measure-nums {
      font-family: var(--mono); font-size: var(--fs-sm); font-weight: 600; color: var(--accent);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .measure-nums.measure-hint { color: var(--text-3); font-family: inherit; font-weight: 500; }
    .measure-btns { display: flex; gap: 6px; flex: none; }
    .measure-btns .btn { font-size: var(--fs-xs); padding: 5px 10px; }
    .measure-btns .measure-exit { padding: 5px 9px; font-size: var(--fs-base); line-height: 1; }
    @media (max-width: 640px) {
      .measure-readout { top: auto; bottom: 76px; flex-direction: column; gap: 8px; padding: 10px 12px; }
      .measure-nums { max-width: 84vw; }
    }

    /* Reset-view map control (same visual language as the maplibre controls) */
    #mapResetBtn { display: flex; align-items: center; justify-content: center; }
    #mapResetBtn svg { display: block; }

    /* ── Map Popup ── */
    .maplibregl-popup-content { background: var(--glass-heavy) !important; color: var(--text) !important; border-radius: var(--radius) !important; padding: 0 !important; box-shadow: var(--shadow-lg) !important; border: 1px solid var(--glass-border); backdrop-filter: blur(24px) !important; min-width: 272px; max-width: 340px; overflow: hidden; }
    .maplibregl-popup-tip { border-top-color: rgba(14,14,18,0.88) !important; }
    .maplibregl-popup-close-button { color: var(--text-3) !important; font-size: var(--fs-xl); right: 10px !important; top: 8px !important; }
    .market-popup-v2 { padding: 14px 16px; }
    .pop {
      padding: 12px 16px 14px;
      position: relative;
      animation: popCardIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
      /* gold spine + faint top sheen — the Locus deal-card signature */
      border-left: 2px solid var(--accent);
      background:
        radial-gradient(120% 60% at 50% 0%, rgba(232,194,110,0.055), transparent 62%);
    }
    @keyframes popCardIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
    .pop-top { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
    .pop-type {
      font-size: var(--fs-3xs); font-weight: 800; text-transform: uppercase; letter-spacing: 1.1px;
      padding: 2px 8px; border-radius: var(--radius-pill);
    }
    .pop-type.lease { background: var(--accent-dim); color: var(--accent); }
    .pop-type.sale { background: var(--sale-dim); color: #f472b6; }
    .pop-top .pop-more { margin-left: auto; }
    .pop-addr { font-weight: 800; font-size: var(--fs-lg); line-height: 1.22; letter-spacing: -0.3px; margin-bottom: 2px; padding-right: 14px; }
    .pop-more { flex-shrink:0; width:24px; height:24px; display:flex; align-items:center; justify-content:center; border-radius:6px; font-size: var(--fs-lg); color:var(--text-3); cursor:pointer; transition:var(--transition); }
    .pop-more:hover { background:rgba(255,255,255,0.08); color:var(--text); }
    .pop-overflow-menu { display:none; position:absolute; right:12px; top:40px; background:var(--glass-heavy); border:1px solid var(--glass-border); border-radius:var(--radius-sm); padding:4px; z-index:10; min-width:170px; box-shadow:var(--shadow); backdrop-filter:blur(20px); }
    .pop-overflow-menu.open { display:block; }
    .pop-overflow-menu button, .pop-overflow-menu a { display:block; width:100%; padding:7px 10px; font-size: var(--fs-xs); color:var(--text-2); text-align:left; border-radius:4px; text-decoration:none; cursor:pointer; transition:var(--transition); font-family:inherit; }
    .pop-overflow-menu button:hover, .pop-overflow-menu a:hover { background:rgba(255,255,255,0.06); color:var(--text); }
    .pop-overflow-menu .danger { color:var(--red); }
    .pop-overflow-menu .danger:hover { background:var(--red-dim); }
    .pop-source { display:inline-block; font-size: var(--fs-3xs); padding:1px 6px; border-radius:var(--radius-pill); background:rgba(255,255,255,0.06); color:var(--text-3); font-weight:600; vertical-align:middle; max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .pop-loc { font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 10px; }

    /* Hero metric — the number IS the interface */
    .pop-hero {
      margin: 0 0 10px; padding: 10px 12px;
      background: rgba(232,194,110,0.05);
      border: 1px solid rgba(232,194,110,0.12);
      border-radius: var(--radius-sm);
    }
    .pop-hero-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
    .pop-hero-val {
      font-family: var(--mono); font-size: 1.55rem; font-weight: 600;
      color: var(--accent); letter-spacing: -0.5px; line-height: 1;
      font-variant-numeric: tabular-nums;
      text-shadow: 0 0 24px var(--accent-glow);
    }
    .pop-hero-meta { display: inline-flex; align-items: center; gap: 6px; }
    .pop-hero-unit { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 1px; color: var(--text-2); }
    .pop-hero-badge {
      font-size: var(--fs-3xs); font-weight: 800; letter-spacing: 0.8px;
      padding: 1px 6px; border-radius: 4px;
      background: var(--accent); color: var(--bg);
    }
    .pop-hero-badge.muted { background: rgba(255,255,255,0.1); color: var(--text-2); }
    .pop-hero-subs { margin-top: 5px; font-size: var(--fs-xs); color: var(--text-2); font-family: var(--mono); }
    .pop-hero-subs .dot-sep { margin: 0 6px; color: var(--text-3); }

    .pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin-bottom: 4px; }
    .pop-kv { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
    .pop-kv .k { font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); }
    .pop-kv .v { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pop-match { display: inline-block; font-size: var(--fs-3xs); padding: 2px 8px; border-radius: 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    .pop-match.best { background: var(--green-dim); color: var(--green); }
    .pop-match.middle { background: var(--orange-dim); color: var(--orange); }
    .pop-match.least { background: var(--red-dim); color: var(--red); }
    .pop-activity { display:flex; gap:10px; margin-top:8px; padding:8px 0; border-top:1px solid var(--glass-border); }
    .pop-act-item { display:flex; align-items:center; gap:5px; font-size: var(--fs-xs); font-weight:600; color:var(--text-2); }
    .pop-act-icon { width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size: var(--fs-3xs); line-height:1; }
    .pop-act-icon.msg { background:var(--blue-dim); color:var(--blue); }
    .pop-act-icon.msg::after { content:'\f075'; font-family:inherit; content:'💬'; font-size: var(--fs-3xs); }
    .pop-act-icon.note { background:var(--orange-dim); color:var(--orange); }
    .pop-act-icon.note::after { content:'📝'; font-size: var(--fs-3xs); }
    .pop-type.parcel { background: var(--accent-dim); color: var(--accent); }
    /* Multi-comp pager in the drawer header: "‹ 2 of 3 at this parcel ›" */
    .panel-sib-nav { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; }
    .sib-btn {
      width: 22px; height: 22px; border-radius: 6px; font-size: var(--fs-md); line-height: 1;
      background: var(--glass); border: 1px solid var(--glass-border); color: var(--text-2);
    }
    .sib-btn:hover { color: var(--accent); border-color: rgba(232,194,110,0.4); }
    .sib-count { font-size: var(--fs-2xs); color: var(--text-3); white-space: nowrap; }
    /* The zoom label's own lines, verbatim (Theresa: popup mimics the label) */
    .pop-label {
      margin: 8px 0 4px; padding: 7px 9px; border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.5; color: var(--text);
    }
    .pop-sec-head { font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); margin-bottom: 5px; }
    .pop-save {
      padding: 4px 10px; border-radius: var(--radius-sm); font-size: var(--fs-2xs); font-weight: 700;
      background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(232,194,110,0.18);
    }
    .pop-save:hover { background: var(--accent); color: var(--bg); }
    /* Inline disaggregated-rents editor */
    .pop-disagg { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--glass-border); }
    .pop-disagg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .pop-disagg-row label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); }
    .pop-disagg-row input {
      width: 100%; box-sizing: border-box; font-family: var(--mono); font-size: var(--fs-xs);
      background: var(--blue-dim); color: var(--blue); border: 1px solid transparent; border-radius: 5px; padding: 4px 7px;
    }
    .pop-disagg-row input:focus { outline: none; border-color: var(--blue); }
    .pop-disagg-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); min-height: 24px; }
    /* Popup discussion */
    .pop-disc { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--glass-border); }
    .pop-disc-list { max-height: 110px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
    .pop-disc-list.disc-tall { max-height: 48vh; }
    .pop-disc-item { font-size: var(--fs-xs); color: var(--text); line-height: 1.4; }
    .pop-disc-item b { color: var(--text-2); font-weight: 700; margin-right: 3px; }
    .pop-disc-empty { font-size: var(--fs-xs); color: var(--text-3); }
    .pop-disc-more { font-size: var(--fs-2xs); color: var(--accent); cursor: pointer; margin-bottom: 3px; }
    .pop-disc-input { display: flex; gap: 6px; align-items: flex-end; }
    .pop-disc-input textarea {
      flex: 1; resize: none; min-height: 30px; max-height: 72px; box-sizing: border-box;
      background: var(--glass); border: 1px solid var(--glass-border); border-radius: 6px;
      color: var(--text); font-size: var(--fs-xs); padding: 6px 8px; line-height: 1.4;
    }
    .pop-disc-input textarea:focus { outline: none; border-color: var(--blue); }
    .pop-mention-drop {
      margin-top: 4px; border: 1px solid var(--glass-border); border-radius: 6px;
      background: var(--bg-2, #232220); overflow: hidden;
    }
    .pop-mention-opt { padding: 5px 9px; font-size: var(--fs-xs); cursor: pointer; }
    .pop-mention-opt:hover { background: var(--blue-dim); color: var(--blue); }
    .pop-btns { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
    .pop-btns button { flex: 1; padding: 8px; border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.3px; transition: var(--transition); }
    .pop-btns .eb { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(232,194,110,0.18); }
    .pop-btns .eb .eb-arrow { display: inline-block; transition: transform 0.18s cubic-bezier(0.16,1,0.3,1); margin-left: 2px; }
    .pop-btns .eb:hover { background: var(--accent); color: var(--bg); box-shadow: 0 0 20px var(--accent-glow); }
    .pop-btns .eb:hover .eb-arrow { transform: translateX(3px); }

    /* ── Panel hero (financial summary strip in the details drawer) ── */
    .panel-hero {
      display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px;
      margin-bottom: 14px;
    }
    .ph-tile {
      display: flex; flex-direction: column; gap: 3px; min-width: 0;
      padding: 10px 12px; border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.03);
      border: 1px solid var(--glass-border);
    }
    .ph-tile.ph-primary {
      background: rgba(232,194,110,0.06);
      border-color: rgba(232,194,110,0.16);
    }
    .ph-val {
      font-family: var(--mono); font-size: var(--fs-lg); font-weight: 600;
      color: var(--text); letter-spacing: -0.3px; font-variant-numeric: tabular-nums;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .ph-primary .ph-val { color: var(--accent); text-shadow: 0 0 20px var(--accent-glow); }
    .ph-label { font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px; color: var(--text-3); }
    .ph-badge {
      font-size: var(--fs-3xs); font-weight: 800; letter-spacing: 0.6px;
      padding: 0px 5px; border-radius: 4px;
      background: var(--accent); color: var(--bg);
    }
    .ph-badge.muted { background: rgba(255,255,255,0.1); color: var(--text-2); }
    .match-badge { display: inline-block; font-size: var(--fs-3xs); padding: 2px 8px; border-radius: 20px; font-weight: 700; text-transform: uppercase; }
    .match-badge.best { background: var(--green-dim); color: var(--green); }
    .match-badge.middle { background: var(--orange-dim); color: var(--orange); }
    .match-badge.least { background: var(--red-dim); color: var(--red); }

    /* ───── ACTIVITY PANEL ───── */
    .activity-panel { position: fixed; top: 60px; left: 68px; bottom: 200px; width: 300px; z-index: 150; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(calc(-100% - 84px)); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
    .activity-panel.open { transform: translateX(0); }
    .activity-panel-header { padding: 14px 16px; display: flex; align-items: center; border-bottom: 1px solid var(--glass-border); }
    .activity-panel-header h4 { flex: 1; font-size: var(--fs-base); font-weight: 700; }
    .activity-list { flex: 1; overflow-y: auto; padding: 8px 12px; }
    .activity-group-label { font-size: var(--fs-3xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; padding: 10px 0 4px; border-bottom: 1px solid var(--glass-border); margin-bottom: 4px; }
    .activity-item { display: flex; gap: 8px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.02); cursor: pointer; transition: var(--transition); border-radius: 6px; }
    .activity-item:hover { background: rgba(255,255,255,0.03); }
    .activity-icon { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; }
    .activity-icon.msg { background: var(--blue-dim); color: var(--blue); }
    .activity-icon.msg::after { content: 'MSG'; }
    .activity-icon.tag { background: var(--accent-dim); color: var(--accent); }
    .activity-icon.tag::after { content: 'TAG'; }
    .activity-icon.act { background: rgba(255,255,255,0.06); color: var(--text-3); }
    .activity-icon.act::after { content: 'ACT'; }
    .activity-icon.edt { background: var(--green-dim); color: var(--green); }
    .activity-icon.edt::after { content: 'EDT'; }
    .activity-info { flex: 1; min-width: 0; }
    .activity-desc { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .activity-date { font-size: var(--fs-3xs); color: var(--text-3); margin-top: 2px; }

    /* ───── ACTIVITY TABS & MY FEED ───── */
    .activity-tabs { display:flex; gap:2px; flex:1; background:rgba(255,255,255,0.04); border-radius:var(--radius-pill); padding:2px; }
    .activity-tab { padding:5px 12px; border-radius:var(--radius-pill); font-size: var(--fs-xs); font-weight:600; color:var(--text-3); flex:1; text-align:center; transition:var(--transition); cursor:pointer; }
    .activity-tab.active { background:rgba(255,255,255,0.08); color:var(--text); }
    .feed-filter-bar { display:flex; gap:4px; padding:6px 12px; border-bottom:1px solid var(--glass-border); flex-wrap:wrap; }
    .feed-chip { padding:4px 10px; border-radius:var(--radius-pill); font-size: var(--fs-3xs); font-weight:600; color:var(--text-3); background:rgba(255,255,255,0.04); border:1px solid transparent; cursor:pointer; transition:var(--transition); white-space:nowrap; }
    .feed-chip:hover { background:rgba(255,255,255,0.08); color:var(--text-2); }
    .feed-chip.active { background:rgba(232,194,110,0.12); color:var(--accent); border-color:rgba(232,194,110,0.25); }
    .feed-address { font-size: var(--fs-xs); font-weight:600; color:var(--accent); margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .feed-item:hover .feed-address { color:var(--text); }
    .feed-load-more { width:100%; padding:10px; margin:8px 0; background:rgba(255,255,255,0.04); border:1px solid var(--glass-border); border-radius:var(--radius-sm); color:var(--accent); font-size: var(--fs-xs); font-weight:600; cursor:pointer; transition:var(--transition); }
    .feed-load-more:hover { background:rgba(255,255,255,0.08); }
    .activity-icon.note { background:var(--orange-dim); color:var(--orange); }
    .activity-icon.note::after { content:'📝'; font-size: var(--fs-3xs); }
    .activity-icon.mention { background:var(--blue-dim); color:var(--blue); }
    .activity-icon.mention::after { content:'@'; font-size: var(--fs-2xs); }

    /* ───── NOTIFICATION PANEL ───── */
    .notify-panel {
      position: fixed; top: 60px; right: 80px; width: 360px; max-height: 480px;
      z-index: 300; background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
      transform: translateY(-10px) scale(0.98); opacity: 0; pointer-events: none;
      transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease;
    }
    .notify-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }
    .notify-header { padding: 14px 16px; display: flex; align-items: center; border-bottom: 1px solid var(--glass-border); }
    .notify-header h4 { flex: 1; font-size: var(--fs-base); font-weight: 700; }
    .notify-header button:not(.drawer-close) { font-size: var(--fs-xs); color: var(--accent); font-weight: 600; }
    .notify-list { flex: 1; overflow-y: auto; max-height: 400px; }
    .notify-item { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); cursor: pointer; transition: var(--transition); }
    .notify-item.unread { background: rgba(232,194,110,0.04); }
    .notify-item:hover { background: rgba(255,255,255,0.04); }
    .notify-item.notify-group { border-left: 2px solid var(--accent); }
    .notify-icon { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; }
    .notify-icon.mention { background: var(--blue-dim); color: var(--blue); }
    .notify-icon.mention::after { content: '@'; font-size: var(--fs-xs); }
    .notify-icon.msg { background: var(--accent-dim); color: var(--accent); }
    .notify-icon.msg::after { content: 'MSG'; }
    .notify-icon.add { background: var(--green-dim); color: var(--green); }
    .notify-icon.add::after { content: '+'; font-size: var(--fs-md); }
    .notify-icon.tag { background: rgba(168,110,232,0.12); color: #a86ee8; }
    .notify-icon.tag::after { content: 'TAG'; }
    .notify-icon.act { background: rgba(255,255,255,0.06); color: var(--text-3); }
    .notify-icon.act::after { content: 'ACT'; }
    .notify-body { flex: 1; min-width: 0; }
    .notify-title { font-size: var(--fs-sm); font-weight: 600; color: var(--text); }
    .notify-text { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .notify-date { font-size: var(--fs-3xs); color: var(--text-3); margin-top: 3px; }

    /* ───── DASHBOARD VIEW ───── */
    .dashboard-view { position: fixed; top: 48px; right: 0; bottom: 0; left: 0; z-index: 150; background: var(--bg); display: none; flex-direction: column; transition: opacity 0.25s ease; opacity: 0; }
    .dashboard-view.active { display: flex; opacity: 1; }
    .dash-topbar { padding: 12px 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .dash-topbar .back-btn { padding: 6px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.05); color: var(--text-2); font-size: var(--fs-md); font-weight: 500; }
    .dash-topbar .back-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
    .dash-topbar h3 { font-size: var(--fs-base); font-weight: 600; flex: 1; }
    .dash-scroll { flex: 1; overflow-y: auto; padding: 20px; }
    .kpi-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
    .kpi-row, .chart-card, .ai-kpi-card { font-variant-numeric: tabular-nums; }
    .kpi-card {
      flex: 1; min-width: 140px; padding: 18px 22px;
      background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
      backdrop-filter: blur(var(--blur)); border: 1px solid var(--glass-border);
      border-radius: var(--radius); box-shadow: var(--shadow);
      position: relative; overflow: hidden;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .kpi-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--glass-border);
    }
    .kpi-card::before {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
      background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    }
    .kpi-card:nth-child(1)::before { background: linear-gradient(90deg, transparent, var(--blue), transparent); }
    .kpi-card:nth-child(2)::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
    .kpi-card:nth-child(3)::before { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
    .kpi-card:nth-child(4)::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
    .kpi-card:nth-child(5)::before { background: linear-gradient(90deg, transparent, var(--orange), transparent); }
    .kpi-card:nth-child(6)::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
    .kpi-label { font-size: var(--fs-2xs); font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
    .kpi-value { font-size: var(--fs-2xl); font-weight: 700; font-family: var(--mono); color: var(--text); }
    .kpi-value.blue { color: var(--blue); }
    .kpi-value.green { color: var(--green); }
    .kpi-value.sale { color: #ec4899; }
    .kpi-unit { font-size: var(--fs-2xs); font-weight: 500; color: var(--text-3); margin-left: 2px; }
    .kpi-sub { font-size: var(--fs-3xs); color: var(--text-3); font-family: var(--mono); margin-top: 2px; }
    .chart-note { font-size: var(--fs-3xs); color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }
    /* Honesty ink: every median carries its n; thin samples say so inline */
    .dash-n { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-3); min-width: 72px; text-align: right; }
    .dash-n-inline { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-3); }
    .dash-iqr { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); min-width: 118px; text-align: right; padding-left: 14px; }
    /* Stacked mix bar — 2px surface gaps so adjacent fills never touch */
    .dash-mix-bar { display: flex; gap: 2px; height: 26px; border-radius: 6px; overflow: hidden; margin: 4px 0 10px; }
    .dash-mix-seg { min-width: 3px; }
    .dash-mix-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
    .dash-mix-item { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
    .dash-mix-item b { font-family: var(--mono); color: var(--text); font-weight: 600; }
    .dash-mix-pct { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-3); }
    .dash-mix-hint { margin-top: 10px; font-size: var(--fs-2xs); color: var(--text-3); }
    .dash-sub-title { font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); margin: 14px 0 4px; }
    .dash-stats-block { display: flex; flex-direction: column; gap: 2px; }
    .dash-stat-row { display: flex; align-items: center; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .dash-stat-label { flex: 1; font-size: var(--fs-sm); color: var(--text-3); }
    .dash-stat-val { font-family: var(--mono); font-size: var(--fs-md); font-weight: 600; color: var(--text); min-width: 80px; text-align: right; }
    .dash-stat-median { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-3); min-width: 100px; text-align: right; }
    .dash-range { display: flex; align-items: center; padding: 4px 0; }
    .dash-range-label { flex: 1; font-size: var(--fs-xs); color: var(--text-3); }
    .dash-range-val { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); }
    .dash-list { display: flex; flex-direction: column; gap: 2px; }
    .dash-list-item { position: relative; display: flex; align-items: center; padding: 6px 10px; border-radius: 4px; overflow: hidden; }
    .dash-list-bar { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; z-index: 0; }
    .dash-list-name { position: relative; z-index: 1; flex: 1; font-size: var(--fs-md); color: var(--text); font-weight: 500; }
    .dash-list-count { position: relative; z-index: 1; font-family: var(--mono); font-size: var(--fs-sm); font-weight: 700; }
    /* ── State Analytics Table ── */
    .dash-state-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
    .dash-state-table thead { position: sticky; top: 0; z-index: 1; }
    .dash-state-table th { padding: 8px 10px; text-align: right; font-size: var(--fs-2xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--glass-border); background: var(--glass-heavy); cursor: pointer; user-select: none; white-space: nowrap; transition: color var(--transition); }
    .dash-state-table th:first-child { text-align: left; }
    .dash-state-table th:hover { color: var(--accent); }
    .dash-state-table th.active { color: var(--accent); }
    .dash-state-table td { padding: 7px 10px; text-align: right; font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); border-bottom: 1px solid rgba(255,255,255,0.02); white-space: nowrap; }
    .dash-state-table tbody tr:hover { background: rgba(255,255,255,0.03); }
    .dash-state-table tbody tr:hover td { color: var(--text); }

    .chart-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
    .chart-card { flex: 1; min-width: 300px; padding: 16px; background: var(--glass); backdrop-filter: blur(var(--blur)); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow); }
    .chart-title { font-size: var(--fs-xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
    .chart-card canvas { width: 100%; height: 220px; }
    .dash-recent { max-height: 300px; overflow-y: auto; }
    .dash-recent-item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .dash-recent-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
    .dash-recent-addr { font-size: var(--fs-md); color: var(--text); font-weight: 500; flex: 1; }
    .dash-recent-loc { font-size: var(--fs-xs); color: var(--text-3); }
    .dash-recent-date { font-size: var(--fs-2xs); color: var(--text-3); font-family: var(--mono); }

    /* ── Report / Import ── */
    .report { font-size: var(--fs-base); }
    .report-header h1 { font-size: var(--fs-xl); margin-bottom: 2px; }
    .report-header p { color: var(--text-3); font-size: var(--fs-md); margin-bottom: 16px; }
    .report-summary h2, .report-section h2 { font-size: var(--fs-base); color: var(--accent); margin: 16px 0 8px; border-bottom: 1px solid var(--glass-border); padding-bottom: 4px; }
    .report-stats { display: flex; flex-wrap: wrap; gap: 8px; }
    .report-stat { background: rgba(255,255,255,0.03); padding: 6px 12px; border-radius: 6px; }
    .rs-label { color: var(--text-3); font-size: var(--fs-sm); margin-right: 4px; }
    .rs-value { font-weight: 700; font-family: var(--mono); font-size: var(--fs-sm); }
    .report-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
    .report-table th { background: rgba(255,255,255,0.04); padding: 6px 8px; text-align: left; font-size: var(--fs-3xs); text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--glass-border); }
    .report-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.03); font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); }
    .report-footer { margin-top: 20px; padding-top: 8px; border-top: 1px solid var(--glass-border); font-size: var(--fs-xs); color: var(--text-3); }
    .import-mapping { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; }
    .import-map-row { display: grid; grid-template-columns: minmax(96px, auto) 52px 1fr; align-items: center; gap: 6px; padding: 1px 0; }
    .import-field { font-size: var(--fs-2xs); color: var(--text-2); font-weight: 600; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .import-select { width: 100%; padding: 3px 7px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 5px; color: var(--text); font-size: var(--fs-2xs); outline: none; appearance: none; min-height: 24px; }
    .import-select:focus { border-color: rgba(232,194,110,0.3); }
    .import-map-row .import-confidence { font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; text-align: center; }
    @media (max-width: 640px) { .import-mapping { grid-template-columns: 1fr; } }
    .import-confidence.exact { background: rgba(52,211,153,0.15); color: #34d399; }
    .import-confidence.fuzzy { background: rgba(251,191,36,0.15); color: #fbbf24; }
    .import-confidence.none { background: rgba(239,68,68,0.12); color: #ef4444; }
    .import-confidence.learned { background: rgba(110,168,232,0.15); color: #6ea8e8; }
    .import-preview-header-sub { font-size: var(--fs-3xs); color: var(--text-3); font-weight: 400; }
    .import-progress-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
    .import-progress-fill { height: 100%; background: var(--accent); width: 0; transition: width 0.3s; border-radius: 2px; }

    /* ───── MODAL OVERLAY ───── */
    .modal-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; }
    .modal-card { background: var(--glass-heavy); backdrop-filter: blur(40px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 90vh; }
    .modal-header { padding: 16px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--glass-border); }
    .modal-header h3 { flex: 1; font-size: var(--fs-lg); font-weight: 700; }
    .modal-body { padding: 20px; overflow-y: auto; flex: 1; min-height: 0; }
    .modal-footer { padding: 14px 20px; border-top: 1px solid var(--glass-border); display: flex; gap: 8px; flex-shrink: 0; }

    /* ── Profile ── */
    .profile-avatar-lg { width: 48px; height: 48px; border-radius: 50%; margin: 0 auto 16px; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xl); font-weight: 700; }
    .profile-photo-upload { position: relative; width: 64px; height: 64px; margin: 0 auto 16px; cursor: pointer; border-radius: 50%; overflow: hidden; }
    .profile-photo-upload .photo-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; border-radius: 50%; color: #fff; }
    .profile-photo-upload:hover .photo-overlay { opacity: 1; }

    /* ── Profile Hover Card ── */
    .profile-card { position: fixed; z-index: 350; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 16px; min-width: 220px; max-width: 280px; }
    .pc-header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
    .pc-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
    .pc-initials { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: 700; flex-shrink: 0; }
    .pc-info { flex: 1; min-width: 0; }
    .pc-name { font-size: var(--fs-base); font-weight: 600; }
    .pc-role { font-size: var(--fs-3xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--accent); background: var(--accent-dim); padding: 2px 8px; border-radius: 20px; }
    .pc-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: var(--fs-xs); }
    .pc-label { color: var(--text-3); }
    .pc-val { color: var(--text-2); font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pc-active { font-size: var(--fs-2xs); color: var(--green); margin-top: 6px; }

    /* ── Team styles ── */
    .team-list { max-height: 200px; overflow-y: auto; }
    .team-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); border: 1px solid transparent; }
    .team-item:hover { background: rgba(255,255,255,0.04); }
    .team-item.active { border-color: var(--accent-dim); background: rgba(232,194,110,0.04); }
    .team-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--accent-dim); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: var(--fs-base); font-weight: 700; flex-shrink: 0; }
    .team-info { flex: 1; }
    .team-name { font-size: var(--fs-base); font-weight: 600; }
    .team-meta { font-size: var(--fs-2xs); color: var(--text-3); display: flex; align-items: center; gap: 4px; }
    .team-check { color: var(--green); font-weight: 700; }
    .team-gear { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: var(--fs-base); transition: var(--transition); }
    .team-gear:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .team-role-badge { font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 2px 6px; border-radius: 20px; }
    .team-role-badge.admin { background: var(--accent-dim); color: var(--accent); }
    .team-role-badge.member { background: var(--blue-dim); color: var(--blue); }
    .team-role-badge.viewer { background: rgba(255,255,255,0.06); color: var(--text-3); }
    .team-tabs { display: flex; border-bottom: 1px solid var(--glass-border); }
    .team-tab { flex: 1; padding: 12px 16px; text-align: center; font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); transition: var(--transition); border-bottom: 2px solid transparent; }
    .team-tab.active { color: var(--text); border-bottom-color: var(--accent); }
    .team-tab:hover:not(.active) { color: var(--text-2); }
    .invite-count { font-size: var(--fs-3xs); background: var(--red); color: #fff; padding: 1px 5px; border-radius: 10px; margin-left: 4px; }
    .invite-item { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
    .invite-info { flex: 1; }
    .invite-actions { display: flex; gap: 6px; }
    .member-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .member-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-dim); color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: var(--fs-3xs); font-weight: 700; flex-shrink: 0; }
    .member-info { flex: 1; }
    .member-name { font-size: var(--fs-md); font-weight: 500; }
    .member-role { font-size: var(--fs-2xs); color: var(--text-3); }
    .member-role-select { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 4px; color: var(--text-2); outline: none; }
    .member-remove { width: 24px; height: 24px; border-radius: 50%; color: var(--text-3); font-size: var(--fs-base); display: flex; align-items: center; justify-content: center; transition: var(--transition); }
    .member-remove:hover { background: var(--red-dim); color: var(--red); }
    .team-sidebar { position: fixed; top: 70px; right: 0; bottom: 0; width: 200px; z-index: 90; background: var(--glass-heavy); backdrop-filter: blur(30px); border-left: 1px solid var(--glass-border); transform: translateX(100%); transition: transform 0.3s ease; padding: 16px 12px; }
    .team-sidebar.open { transform: translateX(0); }
    .sidebar-member { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
    .sidebar-member-name { font-size: var(--fs-sm); color: var(--text-2); }

    /* ── Notification Preferences ── */
    .pref-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .pref-info { flex: 1; }
    .pref-label { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
    .pref-desc { font-size: var(--fs-xs); color: var(--text-3); }
    .pref-matrix { width: 100%; }
    .pref-matrix-header { display: grid; grid-template-columns: 1fr 56px 56px 56px; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--glass-border); margin-bottom: 4px; }
    .pref-matrix-header .pref-channel { font-size: var(--fs-3xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }
    .pref-matrix-row { display: grid; grid-template-columns: 1fr 56px 56px 56px; gap: 4px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .pref-matrix-row .pref-channel { display: flex; justify-content: center; }
    .pref-matrix-label { min-width: 0; }
    .toggle-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex-shrink: 0; }
    .toggle-switch input { opacity: 0; width: 0; height: 0; }
    .toggle-slider { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,0.1); border-radius: 20px; transition: 0.2s; }
    .toggle-slider::before { content: ''; position: absolute; height: 14px; width: 14px; left: 3px; bottom: 3px; background: var(--text-3); border-radius: 50%; transition: 0.2s; }
    .toggle-switch input:checked + .toggle-slider { background: var(--accent-dim); }
    .toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--accent); }

    /* ───── FILTER PANEL ───── */
    .filter-panel { position: fixed; top: 60px; left: 68px; width: 280px; z-index: 150; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; transform: translateX(calc(-100% - 84px)); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); max-height: calc(100vh - 76px); overflow-y: auto; }
    .filter-panel.open { transform: translateX(0); }
    .filter-panel h4 { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 12px; }
    .filter-panel .fg { margin-bottom: 10px; }
    .filter-panel .fg label { font-size: var(--fs-3xs); }
    .filter-panel .fg input, .filter-panel .fg select { font-size: var(--fs-sm); padding: 7px 10px; }
    .filter-actions { display: flex; gap: 8px; margin-top: 14px; }

    /* ───── COMMAND PALETTE ───── */
    .cmd-palette-overlay { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); display: flex; align-items: flex-start; justify-content: center; padding-top: 20vh; }
    .cmd-palette { width: 480px; max-width: calc(100vw - 32px); background: var(--glass-heavy); backdrop-filter: blur(40px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
    .cmd-palette-search { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--glass-border); }
    .cmd-palette-search svg { flex-shrink: 0; color: var(--text-3); }
    .cmd-palette-search input { flex: 1; background: none; border: none; color: var(--text); font-size: var(--fs-base); outline: none; }
    .cmd-palette-search input::placeholder { color: var(--text-3); }
    .cmd-palette-hint { font-size: var(--fs-3xs); color: var(--text-3); background: rgba(255,255,255,0.06); padding: 2px 6px; border-radius: 4px; }
    .cmd-palette-list { max-height: 300px; overflow-y: auto; padding: 6px; }
    .cmd-palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
    .cmd-palette-item:hover, .cmd-palette-item.selected { background: rgba(255,255,255,0.06); }
    .cmd-palette-icon { width: 28px; height: 28px; border-radius: 6px; background: rgba(255,255,255,0.04); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xs); font-weight: 700; flex-shrink: 0; }
    .cmd-palette-info { flex: 1; }
    .cmd-palette-label { font-size: var(--fs-md); font-weight: 600; color: var(--text); }
    .cmd-palette-desc { font-size: var(--fs-2xs); color: var(--text-3); }
    .cmd-palette-empty { padding: 20px; text-align: center; color: var(--text-3); font-size: var(--fs-md); }
    .cmd-palette-section { padding: 10px 16px 4px; font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-3); border-top: 1px solid var(--glass-border); margin-top: 6px; }
    .cmd-palette-icon.comp.lease { background: var(--blue-dim); color: var(--blue); }
    .cmd-palette-icon.comp.sale { background: var(--green-dim); color: var(--green); }

    /* ───── ONBOARDING ───── */
    .onboard-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,0.6); }
    .onboard-spotlight { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,0.6); z-index: 601; pointer-events: none; }
    .onboard-tooltip { position: fixed; z-index: 602; background: var(--glass-heavy); backdrop-filter: blur(30px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; width: 320px; max-width: calc(100vw - 32px); }
    .onboard-modal { position: fixed; z-index: 602; top: 50%; left: 50%; transform: translate(-50%, -50%); background: var(--glass-heavy); backdrop-filter: blur(40px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 30px; width: 380px; max-width: calc(100vw - 32px); text-align: center; }
    .onboard-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 8px; }
    .onboard-text { font-size: var(--fs-md); color: var(--text-2); line-height: 1.5; margin-bottom: 16px; }
    .onboard-footer { display: flex; align-items: center; justify-content: space-between; }
    .onboard-dots { display: flex; gap: 6px; }
    .onboard-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.12); }
    .onboard-dot.active { background: var(--accent); }
    .onboard-dot.done { background: var(--green); }
    .onboard-btns { display: flex; gap: 8px; }
    .onboard-skip { font-size: var(--fs-sm); color: var(--text-3); padding: 6px 14px; }
    .onboard-skip:hover { color: var(--text-2); }
    .onboard-next { font-size: var(--fs-sm); font-weight: 600; background: var(--accent); color: var(--bg); padding: 6px 18px; border-radius: var(--radius-sm); }
    .onboard-next:hover { box-shadow: 0 0 16px var(--accent-glow); }
    .tour-arrow { position: absolute; width: 12px; height: 12px; background: var(--glass-heavy); border: 1px solid var(--glass-border); transform: rotate(45deg); }
    .tour-arrow.up { top: -7px; left: 24px; border-right: none; border-bottom: none; }
    .tour-arrow.down { bottom: -7px; left: 24px; border-left: none; border-top: none; }
    .tour-arrow.left { left: -7px; top: 20px; border-top: none; border-right: none; }
    .tour-counter { font-size: var(--fs-2xs); color: var(--text-3); margin-bottom: 8px; }

    /* ───── CONFIRM MODAL ───── */
    .confirm-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.2s; }
    .confirm-overlay.open { opacity: 1; }
    .confirm-card { background: var(--glass-heavy); backdrop-filter: blur(40px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 24px; min-width: 320px; max-width: 420px; transform: scale(0.95); transition: transform 0.2s; }
    .confirm-overlay.open .confirm-card { transform: scale(1); }
    .confirm-msg { font-size: var(--fs-base); color: var(--text); line-height: 1.5; margin-bottom: 20px; font-weight: 500; }
    .confirm-input { width: 100%; margin: -8px 0 20px; padding: 10px 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-base); font-family: var(--font); transition: var(--transition); }
    .confirm-input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.06); }
    .confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }
    .confirm-ok { background: var(--accent); color: var(--bg); font-weight: 600; }
    .confirm-ok:hover { box-shadow: 0 0 16px var(--accent-glow); }
    .confirm-ok.destructive { background: var(--red); color: #fff; }
    .confirm-ok.destructive:hover { box-shadow: 0 0 16px rgba(232,110,110,0.3); }

    /* ───── PWA INSTALL ───── */
    .install-app-btn { color: var(--accent) !important; }
    .install-app-btn:hover { background: rgba(232,194,110,0.1) !important; }

    /* ───── PWA INSTALL BANNER ───── */
    .install-banner {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
      transform: translateY(100%); transition: transform 0.3s ease;
      padding: 0 16px 16px;
    }
    .install-banner.visible { transform: translateY(0); }
    .install-banner-inner {
      display: flex; align-items: center; gap: 12px;
      max-width: 480px; margin: 0 auto;
      padding: 14px 16px;
      background: var(--glass-heavy); backdrop-filter: blur(40px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
    }
    .install-banner-icon { flex-shrink: 0; }
    .install-banner-text { flex: 1; min-width: 0; }
    .install-banner-title { font-size: var(--fs-base); font-weight: 700; color: var(--text); }
    .install-banner-sub { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
    .install-banner-sub strong { color: var(--text-2); }
    .install-banner-btn {
      flex-shrink: 0; padding: 8px 18px;
      background: var(--accent); color: var(--bg);
      font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-pill);
    }
    .install-banner-btn:hover { box-shadow: 0 0 16px var(--accent-glow); }
    .install-banner-dismiss {
      flex-shrink: 0; background: none; border: none;
      color: var(--text-3); font-size: var(--fs-xl); cursor: pointer;
      padding: 4px 8px; line-height: 1;
    }
    .install-banner-dismiss:hover { color: var(--text); }

    /* ───── ADMIN VIEW ───── */
    .admin-view { position: fixed; top: 48px; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--bg); overflow-y: auto; padding: 24px; display: none; }
    .admin-view.active { display: block; }
    .admin-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
    .admin-header h2 { font-size: var(--fs-xl); font-weight: 700; flex: 1; }
    .admin-tabs { display: flex; gap: 2px; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); padding: 3px; margin-bottom: 20px; }
    .admin-tab { flex: 1; padding: 8px 16px; text-align: center; font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); border-radius: 6px; cursor: pointer; transition: var(--transition); }
    .admin-tab.active { background: var(--glass); color: var(--text); }
    .admin-tab:hover:not(.active) { color: var(--text-2); }
    .admin-section { display: none; }
    .admin-section.active { display: block; }
    .admin-filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
    .admin-filter-bar select, .admin-filter-bar input { padding: 6px 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); border-radius: 6px; color: var(--text); font-size: var(--fs-sm); outline: none; }
    .admin-table { width: 100%; border-collapse: collapse; }
    .admin-table th { padding: 10px 12px; text-align: left; font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); border-bottom: 1px solid var(--glass-border); background: rgba(255,255,255,0.02); }
    .admin-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: var(--fs-md); color: var(--text-2); }
    .admin-table tr:hover td { background: rgba(255,255,255,0.02); }
    .admin-tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
    .admin-tag-card { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--glass); border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 10px; min-width: 180px; }
    .admin-tag-swatch { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; cursor: pointer; }
    .admin-tag-name { font-size: var(--fs-md); font-weight: 600; flex: 1; }
    .admin-tag-count { font-size: var(--fs-2xs); color: var(--text-3); font-family: var(--mono); }
    .admin-tag-actions { display: flex; gap: 4px; }
    .admin-tag-actions button { width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); color: var(--text-3); background: none; border: none; cursor: pointer; transition: var(--transition); }
    .admin-tag-actions button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .ai-kpi-row { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
    .ai-kpi-card { flex: 1; min-width: 140px; padding: 16px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); }
    .ai-kpi-label { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); margin-bottom: 6px; }
    .ai-kpi-value { font-size: var(--fs-2xl); font-weight: 700; font-family: var(--mono); color: var(--text); }
    .usage-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .usage-bar-label { font-size: var(--fs-sm); color: var(--text-2); min-width: 90px; text-align: right; }
    .usage-bar-track { flex: 1; height: 22px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; position: relative; }
    .usage-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; display: flex; align-items: center; padding-left: 8px; }
    .usage-bar-fill span { font-size: var(--fs-2xs); font-family: var(--mono); color: rgba(255,255,255,0.9); white-space: nowrap; }
    .usage-trend { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: 8px; }
    .usage-trend-bar { flex: 1; min-width: 6px; background: var(--accent); border-radius: 3px 3px 0 0; transition: height 0.3s ease; cursor: pointer; position: relative; }
    .usage-trend-bar:hover { opacity: 0.8; }
    .usage-trend-bar:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--bg); border: 1px solid var(--glass-border); padding: 4px 8px; border-radius: 4px; font-size: var(--fs-2xs); font-family: var(--mono); color: var(--text); white-space: nowrap; z-index: 10; pointer-events: none; }
    .usage-source-badge { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: var(--fs-3xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
    .usage-source-badge.api { background: rgba(110,168,232,0.15); color: #6ea8e8; }
    .usage-source-badge.client { background: rgba(110,232,168,0.15); color: #6ee8a8; }
    .admin-danger { margin-top: 24px; padding: 16px; border: 1px solid rgba(232,110,110,0.15); border-radius: var(--radius-sm); background: rgba(232,110,110,0.03); }
    .admin-danger h4 { font-size: var(--fs-sm); color: var(--red); margin-bottom: 8px; }
    .lock-icon { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; color: var(--accent); margin-right: 4px; }
    #compTableBody tr.row-focus { outline: 2px solid var(--accent); outline-offset: -2px; background: rgba(232,194,110,0.06); }

    /* ───── SKELETON LOADING ───── */
    .skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 100%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
    @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
    .skeleton-row { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.03); }
    .skeleton-cell { height: 14px; border-radius: 4px; }
    .search-spinner { display: none; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.08); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
    .search-spinner.active { display: block; }
    .search-clear { display: none; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--text-3); font-size: var(--fs-base); align-items: center; justify-content: center; cursor: pointer; border: none; flex-shrink: 0; transition: var(--transition); }
    .search-clear.visible { display: flex; }
    .search-clear:hover { background: rgba(255,255,255,0.12); color: var(--text); }

    /* ── Search suggestions ── */
    .search-suggestions {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      min-width: 340px;
      background: #16161f;
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 10px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.65);
      z-index: 9999;
      max-height: 380px;
      overflow: hidden auto;
      display: none;
      padding: 4px;
    }
    .search-suggestions.open { display: block; }
    .search-sug-item {
      display: grid;
      grid-template-columns: 26px minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      cursor: pointer;
      transition: background 0.12s;
      border-radius: 7px;
    }
    .search-sug-item:hover, .search-sug-item.active { background: rgba(255,255,255,0.06); }
    .search-sug-item.active { background: rgba(232,194,110,0.10); }
    .sug-thumb { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; display: block; border: 1px solid rgba(255,255,255,0.12); }
    .search-sug-icon {
      width: 26px; height: 18px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; opacity: 0.9;
    }
    .search-sug-icon svg { display: block; width: 14px; height: 14px; }
    .search-sug-icon.addr { color: var(--accent); }
    .search-sug-icon.city { color: #6ea8e8; }
    .search-sug-icon.state { color: #c49eff; }
    .search-sug-icon.county { color: #8ce8a0; }
    .search-sug-icon.coords { color: #6ee8a0; }
    .search-sug-icon.apn { color: var(--accent); }
    .search-sug-text {
      min-width: 0;
      display: flex;
      align-items: baseline;
      overflow: hidden;
      white-space: nowrap;
    }
    .search-sug-main {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: #f0eeeb;
      line-height: 1.35;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-shrink: 1;
      min-width: 60px;
    }
    .search-sug-sep {
      color: rgba(255,255,255,0.2);
      margin: 0 7px;
      flex-shrink: 0;
      font-size: var(--fs-2xs);
    }
    .search-sug-sub {
      font-size: var(--fs-md);
      color: #7a7a8e;
      line-height: 1.4;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-shrink: 0;
    }
    .search-sug-type {
      font-size: var(--fs-3xs);
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 3px 6px;
      border-radius: 4px;
      flex-shrink: 0;
      line-height: 1;
      white-space: nowrap;
    }
    .search-sug-type.addr { color: #e8c26e; background: rgba(232,194,110,0.10); }
    .search-sug-type.city { color: #6ea8e8; background: rgba(110,168,232,0.10); }
    .search-sug-type.state { color: #c49eff; background: rgba(196,158,255,0.10); }
    .search-sug-type.county { color: #8ce8a0; background: rgba(110,232,160,0.08); }
    .search-sug-hint {
      padding: 16px;
      font-size: var(--fs-md);
      color: #666;
      text-align: center;
    }
    .search-sug-divider {
      height: 1px;
      background: rgba(255,255,255,0.05);
      margin: 2px 18px;
    }

    /* ── Draft banner ── */
    .draft-banner { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--blue-dim); border: 1px solid rgba(110,168,232,0.15); border-radius: var(--radius-sm); margin-bottom: 14px; font-size: var(--fs-sm); color: var(--blue); }

    /* ───── TOAST ───── */
    .toast-box { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
    .toast { transition: opacity 0.3s; padding: 10px 16px; border-radius: var(--radius); font-size: var(--fs-md); font-weight: 500; animation: tIn 0.3s ease; backdrop-filter: blur(16px); border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 10px; max-width: 380px; }
    .toast.success { background: rgba(110,232,160,0.15); color: var(--green); border-color: rgba(110,232,160,0.15); }
    .toast.error { background: rgba(232,110,110,0.15); color: var(--red); border-color: rgba(232,110,110,0.15); }
    .toast.info { background: rgba(232,194,110,0.12); color: var(--accent); border-color: rgba(232,194,110,0.12); }
    .toast-action { padding: 3px 10px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 700; background: rgba(255,255,255,0.1); color: inherit; cursor: pointer; border: 1px solid rgba(255,255,255,0.15); transition: var(--transition); white-space: nowrap; }
    .toast-action:hover { background: rgba(255,255,255,0.2); }
    .toast.warning { background: rgba(232,168,110,0.15); color: var(--orange); border-color: rgba(232,168,110,0.15); }
    .toast-close { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: transparent; color: inherit; opacity: 0.55; cursor: pointer; font-size: var(--fs-lg); line-height: 1; flex-shrink: 0; transition: var(--transition); }
    .toast-close:hover { opacity: 1; background: rgba(255,255,255,0.12); }
    .toast-count:not(:empty) { font-weight: 700; opacity: 0.7; font-variant-numeric: tabular-nums; }
    @keyframes tIn { from { opacity: 0; transform: translateY(8px) scale(0.96); } }

    /* ── Update pill (new deploy available) ── */
    .update-pill { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 10001; display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; background: var(--accent); color: #16161f; font-size: var(--fs-md); font-weight: 700; cursor: pointer; border: none; box-shadow: 0 8px 28px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08), 0 0 24px var(--accent-glow); animation: pillIn 0.4s cubic-bezier(0.2, 1.2, 0.4, 1); transition: var(--transition); }
    .update-pill:hover { filter: brightness(1.08); transform: translateX(-50%) translateY(-1px); }
    .update-pill:disabled { opacity: 0.7; cursor: wait; }
    .update-pill svg { flex-shrink: 0; }
    @keyframes pillIn { from { opacity: 0; transform: translateX(-50%) translateY(-14px); } }

    /* ───── LOADING ───── */
    .load-overlay { position: fixed; inset: 0; background: rgba(12,12,15,0.6); display: flex; align-items: center; justify-content: center; z-index: 500; backdrop-filter: blur(8px); }
    .load-overlay.hidden { display: none; }
    .load-ring { width: 36px; height: 36px; border: 2.5px solid rgba(255,255,255,0.08); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ───── AUTH ───── */
    .auth { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: var(--bg); }
    .auth.hidden { display: none; }
    .auth::before {
      content: ''; position: absolute; inset: 0;
      background:
        radial-gradient(ellipse 600px 400px at 30% 40%, rgba(232,194,110,0.10), transparent 70%),
        radial-gradient(ellipse 500px 500px at 70% 60%, rgba(110,168,232,0.07), transparent 70%),
        radial-gradient(ellipse 300px 300px at 80% 20%, rgba(110,232,160,0.04), transparent 70%);
      animation: authBgDrift 20s ease-in-out infinite alternate;
    }
    @keyframes authBgDrift {
      0% { filter: hue-rotate(0deg); opacity: 1; }
      100% { filter: hue-rotate(8deg); opacity: 0.85; }
    }
    .auth-card {
      position: relative; width: 400px; padding: 40px;
      background: var(--glass-heavy); backdrop-filter: blur(40px);
      border: 1px solid rgba(255,255,255,0.10); border-radius: 20px;
      box-shadow: var(--shadow-lg), 0 0 80px rgba(232,194,110,0.06);
      animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes authCardIn {
      from { opacity: 0; transform: translateY(20px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .auth-brand { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -1.5px; color: var(--accent); margin-bottom: 2px; }
    .auth-sub { font-size: var(--fs-base); color: var(--text-3); margin-bottom: 28px; }
    .auth-err { background: var(--red-dim); color: var(--red); padding: 8px 12px; border-radius: var(--radius-sm); font-size: var(--fs-md); margin-bottom: 14px; display: none; border: 1px solid rgba(232,110,110,0.1); }
    .auth-card .fg { margin-bottom: 14px; }
    .auth-card .fg label { color: var(--text-3); }
    .auth-card .fg input { background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); padding: 11px 14px; border-radius: var(--radius-sm); font-size: var(--fs-base); }
    .auth-card .fg input:focus { border-color: rgba(232,194,110,0.3); background: rgba(255,255,255,0.06); box-shadow: 0 0 0 3px rgba(232,194,110,0.06); }
    .auth-submit { width: 100%; padding: 11px; background: var(--accent); color: var(--bg); border-radius: var(--radius-sm); font-weight: 700; font-size: var(--fs-base); margin-top: 6px; transition: var(--transition); }
    .auth-submit:hover { box-shadow: 0 0 30px var(--accent-glow); }
    .auth-foot { text-align: center; margin-top: 16px; font-size: var(--fs-md); color: var(--text-3); }
    .auth-foot a { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
    .auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
    .auth-divider-line { flex: 1; height: 1px; background: var(--glass-border); }
    .auth-divider-text { font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; }
    .auth-google { width: 100%; padding: 10px; background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); font-size: var(--fs-base); font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--transition); }
    .auth-google:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .auth-google svg { width: 16px; height: 16px; }
    .auth-forgot { display: block; text-align: right; margin-top: -8px; margin-bottom: 14px; font-size: var(--fs-sm); color: var(--text-3); cursor: pointer; }
    .auth-forgot:hover { color: var(--accent); }

    /* ── Invite banner ── */
    .auth-invite-banner {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; margin-bottom: 18px;
      background: var(--green-dim); border: 1px solid rgba(110,232,160,0.15);
      border-radius: var(--radius-sm); color: var(--green);
      font-size: var(--fs-md); font-weight: 600; line-height: 1.4;
    }
    .auth-invite-banner strong { color: var(--text); }

    /* ── No access screen ── */
    #noAccessScreen .auth-submit { display: block; }

    /* ── Parcel popup ── */
    .parcel-pop { padding: 14px 16px; min-width: 260px; }
    .pp-header { font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; }
    .pp-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: var(--fs-sm); gap: 12px; }
    .pp-k { color: var(--text-3); white-space: nowrap; }
    .pp-v { color: var(--text); font-weight: 600; font-family: var(--mono); font-size: var(--fs-xs); text-align: right; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pp-actions { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 4px; }
    .pp-actions button { width: 100%; padding: 7px; background: var(--accent-dim); color: var(--accent); border-radius: var(--radius-sm); font-size: var(--fs-xs); font-weight: 600; transition: var(--transition); cursor: pointer; border: none; }
    .pp-actions button:hover { background: var(--accent); color: var(--bg); }
    .pp-actions button.secondary { background: rgba(255,255,255,0.05); color: var(--text-2); }
    .pp-actions button.secondary:hover { background: rgba(255,255,255,0.12); color: var(--text); }
    .pp-actions-pair { display: flex; gap: 4px; }
    .pp-actions-pair button { flex: 1; width: auto; }

    /* ── Map Legend ── */
    .map-legend {
      position: fixed; bottom: 16px; right: 16px; z-index: 150;
      width: 240px; max-height: calc(100vh - 140px); overflow-y: auto;
      background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); padding: 0;
      transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none;
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    }
    .map-legend.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
    .legend-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 12px 14px 8px; border-bottom: 1px solid var(--glass-border);
      font-size: var(--fs-xs); font-weight: 700; color: var(--accent);
      text-transform: uppercase; letter-spacing: 0.8px;
    }
    .legend-close { width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,0.05); color: var(--text-3); display: flex; align-items: center; justify-content: center; font-size: var(--fs-base); cursor: pointer; border: none; transition: var(--transition); }
    .legend-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .legend-section { padding: 10px 14px 6px; }
    .legend-section + .legend-section { border-top: 1px solid var(--glass-border); }
    .legend-title { font-size: var(--fs-3xs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
    .legend-item { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: var(--fs-xs); color: var(--text-2); }
    .legend-pill {
      display: inline-flex; align-items: center; justify-content: center;
      padding: 1px 6px; border-radius: var(--radius-pill); font-size: var(--fs-3xs); font-weight: 700;
      font-family: var(--mono); color: #fff; border: 1.5px solid rgba(255,255,255,0.5);
      min-width: 28px; line-height: 1.4; flex-shrink: 0; text-align: center;
    }
    .legend-pill.lease { background: var(--blue); }
    .legend-pill.sale { background: var(--sale); color: #fff; }
    .legend-pill.plain { border-color: rgba(255,255,255,0.3); opacity: 0.6; }
    .legend-dot {
      position: absolute; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--bg);
    }
    .legend-dot.activity { top: -3px; left: -3px; background: var(--accent); }
    .legend-dot.verified { top: -3px; right: -3px; background: var(--green); }
    .legend-src {
      width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
      border: 1.5px solid var(--bg);
    }
    .legend-swatch {
      width: 16px; height: 10px; border-radius: 3px; flex-shrink: 0;
    }
    .legend-indicator { display: inline-flex; flex-shrink: 0; }

    /* ── Draw Tool ── */
    .draw-vertex {
      width: 10px; height: 10px; border-radius: 50%;
      background: #e8c26e; border: 2px solid #fff;
      box-shadow: 0 0 8px rgba(232,194,110,0.5), 0 0 2px rgba(0,0,0,0.4);
      cursor: pointer; transition: transform 0.15s;
    }
    .draw-vertex:hover { transform: scale(1.3); }
    .draw-vertex-first {
      width: 14px; height: 14px;
      background: #fff; border: 3px solid #e8c26e;
      box-shadow: 0 0 12px rgba(232,194,110,0.6), 0 0 2px rgba(0,0,0,0.4);
    }
    .draw-toolbar {
      position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
      z-index: 200; background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); padding: 12px 18px; text-align: center;
      min-width: 280px;
      animation: drawToolbarIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes drawToolbarIn {
      from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }
    .draw-tb-title { font-size: var(--fs-sm); font-weight: 700; color: var(--accent); margin-bottom: 2px; }
    .draw-tb-hint { font-size: var(--fs-2xs); color: var(--text-3); margin-bottom: 10px; }
    .draw-tb-btns { display: flex; gap: 6px; justify-content: center; }
    .draw-tb-btn {
      padding: 5px 14px; border-radius: var(--radius-pill); font-size: var(--fs-2xs); font-weight: 600;
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text-2); cursor: pointer; transition: var(--transition);
      display: flex; align-items: center; gap: 5px;
    }
    .draw-tb-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); color: var(--text); }
    .draw-tb-btn:disabled { opacity: 0.35; cursor: default; }
    .draw-tb-finish { background: rgba(232,194,110,0.15); color: var(--accent); border-color: rgba(232,194,110,0.3); }
    .draw-tb-finish:hover:not(:disabled) { background: rgba(232,194,110,0.25); }
    .draw-tb-cancel { color: var(--text-3); }
    .draw-tb-keys { font-size: var(--fs-3xs); color: var(--text-3); margin-top: 8px; opacity: 0.6; letter-spacing: 0.3px; }

    .draw-actions {
      position: absolute; top: 12px; right: 12px; z-index: 200;
      width: 420px; max-width: calc(100vw - 24px); background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); overflow: hidden;
      animation: drawActionsIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes drawActionsIn {
      from { opacity: 0; transform: translateY(-8px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .da-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 14px 6px; border-bottom: 1px solid var(--glass-border);
    }
    .da-title { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; }
    .da-close {
      width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,0.05);
      color: var(--text-3); display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-base); cursor: pointer; border: none; transition: var(--transition);
    }
    .da-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .da-stats {
      display: flex; gap: 6px; padding: 10px 14px; flex-wrap: wrap;
    }
    .da-stat {
      display: flex; flex-direction: column; align-items: center;
      padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); flex: 1; min-width: 50px;
    }
    .da-stat-total { border-color: rgba(232,194,110,0.2); background: rgba(232,194,110,0.06); }
    .da-stat-num { font-size: var(--fs-base); font-weight: 700; color: var(--text); font-family: var(--mono); }
    .da-stat-label { font-size: var(--fs-3xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }
    .da-group-title { font-size: var(--fs-3xs); font-weight:700; color:var(--text-3); text-transform:uppercase; letter-spacing:0.8px; padding:8px 14px 2px; border-top:1px solid var(--glass-border); }
    /* ── Lasso refine (metric-range) inputs ── */
    .da-refine { display:grid; grid-template-columns:1fr 1fr; gap:8px 10px; padding:6px 14px 10px; }
    .rf-field { min-width:0; }
    .rf-label { display:block; font-size:var(--fs-3xs); color:var(--text-3); margin-bottom:3px; letter-spacing:0.3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .rf-unit { opacity:0.65; font-weight:400; }
    .rf-inputs { display:flex; gap:4px; }
    .rf-inputs input { width:100%; min-width:0; padding:4px 6px; font-size:var(--fs-xs); font-family:var(--mono); background:rgba(255,255,255,0.04); border:1px solid var(--glass-border); border-radius:6px; color:var(--text-1); }
    .rf-inputs input:focus { outline:none; border-color:rgba(232,194,110,0.4); }
    .rf-inputs input::placeholder { color:var(--text-3); opacity:0.7; }
    .rf-count { color:var(--accent); font-family:var(--mono); font-weight:600; margin-left:4px; text-transform:none; letter-spacing:0; }
    .da-off { opacity:0.35; pointer-events:none; }
    .da-actions { padding: 6px 10px; display: flex; flex-direction: column; gap: 3px; }
    .da-btn {
      display: flex; align-items: center; gap: 8px; width: 100%;
      padding: 7px 10px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 500;
      color: var(--text-2); background: none; border: none; cursor: pointer;
      transition: var(--transition); text-align: left;
    }
    .da-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .da-btn-danger { color: var(--red); }
    .da-btn-danger:hover { background: rgba(220,50,50,0.08); }
    .da-empty { padding: 16px 14px; text-align: center; font-size: var(--fs-sm); color: var(--text-3); }
    .da-clear {
      display: block; width: 100%; padding: 8px; text-align: center;
      font-size: var(--fs-2xs); color: var(--text-3); background: rgba(255,255,255,0.02);
      border: none; border-top: 1px solid var(--glass-border); cursor: pointer;
      transition: var(--transition);
    }
    .da-clear:hover { color: var(--text-2); background: rgba(255,255,255,0.04); }
    .da-tag-picker { padding: 8px 10px; border-top: 1px solid var(--glass-border); }
    .da-tag-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
    .da-tag-pick {
      padding: 3px 8px; border-radius: var(--radius-pill); font-size: var(--fs-3xs); font-weight: 600;
      background: color-mix(in srgb, var(--tag-color) 15%, transparent);
      color: var(--tag-color); border: 1px solid color-mix(in srgb, var(--tag-color) 25%, transparent);
      cursor: pointer; transition: var(--transition);
    }
    .da-tag-pick:hover { background: color-mix(in srgb, var(--tag-color) 25%, transparent); }
    .da-tag-custom { display: flex; gap: 4px; align-items: center; }
    .da-tag-custom input[type="text"] {
      flex: 1; padding: 4px 8px; border-radius: 6px; font-size: var(--fs-2xs);
      background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
      color: var(--text); outline: none;
    }
    .da-tag-apply {
      padding: 4px 10px; border-radius: 6px; font-size: var(--fs-2xs); font-weight: 600;
      background: rgba(232,194,110,0.12); color: var(--accent);
      border: 1px solid rgba(232,194,110,0.2); cursor: pointer;
    }

    /* ── Draw Disaggregation ── */
    .da-dg-input {
      display: flex; align-items: center; gap: 8px; padding: 6px 10px;
    }
    .da-dg-input label { font-size: var(--fs-3xs); color: var(--text-3); white-space: nowrap; }
    .da-dg-input input {
      flex: 1; padding: 5px 8px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600;
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; font-family: var(--mono);
      transition: var(--transition);
    }
    .da-dg-input input:focus { border-color: var(--accent); background: rgba(232,194,110,0.06); }
    .da-dg-wrap {
      max-height: 180px; overflow-y: auto; margin: 0 4px;
      scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
    }
    .da-dg-table { width: 100%; border-collapse: collapse; font-size: var(--fs-3xs); }
    .da-dg-table thead { position: sticky; top: 0; z-index: 1; }
    .da-dg-table th {
      padding: 4px 5px; text-align: right; font-weight: 600; color: var(--text-3);
      background: var(--bg-2); border-bottom: 1px solid var(--glass-border);
      font-size: var(--fs-3xs); text-transform: uppercase; letter-spacing: 0.3px;
    }
    .da-dg-table th:first-child { text-align: left; }
    .da-dg-addr {
      text-align: left; padding: 3px 5px; font-size: var(--fs-3xs);
      color: var(--text-2); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .da-dg-num { text-align: right; padding: 3px 5px; font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-2); }
    .da-dg-row { border-bottom: 1px solid rgba(255,255,255,0.03); }
    .da-dg-row:hover { background: rgba(255,255,255,0.03); }
    .da-dg-summary { padding: 6px 10px; }
    .da-dg-sum-row {
      display: flex; justify-content: space-between; font-size: var(--fs-3xs); padding: 2px 0;
      color: var(--text-3);
    }
    .da-dg-sum-row strong { font-weight: 700; }

    /* ── Draw Filter Banner ── */
    .draw-filter-banner {
      position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
      z-index: 20; display: flex; align-items: center; gap: 8px;
      padding: 8px 12px; border-radius: var(--radius-pill);
      background: rgba(232,194,110,0.12); backdrop-filter: blur(12px);
      border: 1px solid rgba(232,194,110,0.25);
      color: var(--accent); font-size: var(--fs-xs); font-weight: 600;
      box-shadow: 0 4px 16px rgba(0,0,0,0.25);
      animation: filterBannerIn 0.2s ease-out;
    }
    .draw-filter-banner svg { opacity: 0.7; flex-shrink: 0; }
    .dfb-clear {
      margin-left: 4px; padding: 4px 12px; border-radius: var(--radius-pill);
      font-size: var(--fs-2xs); font-weight: 700; cursor: pointer;
      background: rgba(255,255,255,0.08); color: var(--text);
      border: 1px solid var(--glass-border); transition: var(--transition);
    }
    .dfb-clear:hover { background: rgba(255,255,255,0.15); }
    @keyframes filterBannerIn {
      from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
      to { opacity: 1; transform: translateX(-50%) translateY(0); }
    }

    /* ── My Comps Chip ── */
    .my-comps-chip {
      padding: 4px 12px;
      border-radius: var(--radius-pill);
      font-size: var(--fs-2xs);
      font-weight: 600;
      color: var(--text-3);
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border);
      cursor: pointer;
      transition: var(--transition);
      white-space: nowrap;
    }
    .my-comps-chip:hover { background: rgba(255,255,255,0.08); color: var(--text-2); }
    .my-comps-chip.active {
      background: rgba(232,194,110,0.12);
      color: var(--accent);
      border-color: rgba(232,194,110,0.25);
    }
    .my-comps-chip span {
      margin-left: 4px;
      font-size: var(--fs-3xs);
      opacity: 0.7;
    }

    /* ── Scrollbar ── */
    ::-webkit-scrollbar { width: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

    /* ── Smooth scrollbar across all panels ── */
    .drawer-body, .activity-list, .notify-list, .comment-thread, .notes-list, .table-scroll, .dash-scroll {
      scrollbar-width: thin;
      scrollbar-color: rgba(255,255,255,0.08) transparent;
    }

    /* ── Button micro-interactions ── */
    .btn.primary:active { transform: scale(0.97); }
    .cmd-pill.add:active { transform: scale(0.95); }
    .map-ctrl:active { transform: scale(0.95); }

    /* ───── MOBILE BOTTOM TABS ───── */
    .mobile-tabs {
      display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
      background: var(--glass-heavy); backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
      border-top: 1px solid var(--glass-border); padding: 6px 0;
      justify-content: space-around;
    }
    .mobile-tab {
      display: flex; flex-direction: column; align-items: center; gap: 2px;
      color: var(--text-3); font-size: var(--fs-3xs); font-weight: 600; padding: 4px 8px;
      background: none; border: none; cursor: pointer;
    }
    .mobile-tab.active { color: var(--accent); }
    .mobile-tab svg { width: 20px; height: 20px; }

    /* ── Mobile Tools Sheet ── */
    .mobile-tools-sheet {
      display: none; position: fixed; bottom: 56px; left: 0; right: 0; z-index: 150;
      background: var(--glass-heavy); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
      border-top: 1px solid var(--glass-border); border-radius: 16px 16px 0 0;
      padding: 16px; transform: translateY(100%); transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .mobile-tools-sheet.open { display: block; transform: translateY(0); }
    .mobile-tools-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    }
    .mobile-tool-item {
      display: flex; flex-direction: column; align-items: center; gap: 6px;
      padding: 14px 8px; border-radius: var(--radius-sm);
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      color: var(--text-2); font-size: var(--fs-xs); font-weight: 600;
      cursor: pointer; transition: var(--transition); min-height: 44px;
    }
    .mobile-tool-item:active { background: rgba(255,255,255,0.08); transform: scale(0.96); }
    .mobile-tool-item svg { width: 22px; height: 22px; }

    /* ── Tooltip utility class ── */
    [data-tooltip] {
      position: relative;
    }
    [data-tooltip]::after {
      content: attr(data-tooltip);
      position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
      padding: 5px 10px; background: var(--glass-heavy); border: 1px solid var(--glass-border);
      border-radius: 6px; font-size: var(--fs-2xs); color: var(--text-2); white-space: nowrap;
      pointer-events: none; opacity: 0; transition: opacity 0.15s;
      box-shadow: var(--shadow); z-index: 1000;
    }
    [data-tooltip]:hover::after { opacity: 1; }

    /* ── Reduced motion ── */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
      }
      .drawer { transition: none; }
      .activity-panel { transition: none; }
      .filter-panel { transition: none; }
      .notify-panel { transition: none; }
      .map-legend { transition: none; }
      .app-sidebar { transition: none; }
    }

    /* ── Print ── */
    @media print {
      .app-sidebar, .top-bar, .mobile-tabs,
      .cmd-bar, .type-pills, .stat-chips, .map-ctrls, .user-pill,
      .drawer, .toast-box, .load-overlay, .activity-panel, .notify-panel,
      .filter-panel, .team-sidebar { display: none !important; }
      .dashboard-view, .table-overlay { position: static !important; }
      #map { left: 0 !important; }
      body { overflow: auto !important; }
    }

    /* ── Responsive ── */
    @media (max-width: 1200px) {
      .activity-panel { width: 260px; }
      .map-legend { width: 220px; }
      .drawer { width: 380px; }
    }

    @media (max-width: 768px) {
      .app-sidebar { display: none; }
      #map { left: 0; bottom: 56px; }
      .drawer { width: 100%; border-left: none; border-radius: 16px 16px 0 0; bottom: 56px; }
      .type-pill { min-height: 44px; padding: 6px 10px; font-size: var(--fs-xs); }
      .map-ctrls { left: 16px; bottom: 72px; }
      .map-ctrl { min-height: 44px; min-width: 44px; }
      .map-ctrls-col { flex-direction: row; flex-wrap: wrap; gap: 4px; }
      .map-legend { width: 200px; right: 8px; bottom: 72px; }
      .heatmap-legend { bottom: 72px; right: 8px; min-width: 140px; }
      .activity-panel { width: 100%; left: 0; bottom: 56px; top: 48px; border-radius: 0; transform: translateX(-100%); }
      .activity-panel.open { transform: translateX(0); }
      .filter-panel { width: calc(100% - 16px); left: 8px; transform: translateX(calc(-100% - 24px)); }
      .filter-panel.open { transform: translateX(0); }
      .mobile-tabs { display: flex; }
      .kpi-row { flex-direction: column; }
      .chart-row { flex-direction: column; }
      .chart-card { min-width: auto; }
      .cmd-palette { width: calc(100vw - 16px); }
      .modal-card { width: calc(100vw - 32px); }
      .notify-panel { right: 8px; left: 8px; width: auto; top: 60px; }
      .table-topbar { flex-wrap: wrap; padding: 10px 12px; }
      .comp-table td, .comp-table th { padding: 8px 10px; }
      .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      .table-scroll-wrapper { position: relative; }
      .table-scroll-wrapper::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 24px; background: linear-gradient(to right, transparent, var(--bg)); pointer-events: none; z-index: 2; }
      .admin-view { padding: 16px 12px; }
      .admin-tabs { flex-wrap: wrap; }

      /* Phase 0A: Hide non-essential toolbar elements */
      .tb-logo, .tb-sep, .my-comps-chip, .user-pill { display: none !important; }
      #viewMap, #viewTable, #viewDash, #viewAdmin { display: none !important; }

      /* Phase 0A: Collapse search — icon-only toggle */
      .cmd-search { min-width: 0; flex: 0 0 auto; max-width: none; margin: 0; }
      .cmd-search input { width: 36px; padding: 8px 0 8px 34px; background: transparent; border-color: transparent; transition: width 0.25s ease, background 0.2s, padding 0.25s; }
      .cmd-search input:focus,
      .cmd-search input.expanded { width: 180px; padding: 8px 14px 8px 34px; background: rgba(255,255,255,0.04); flex: 1; }
      .cmd-search input::placeholder { opacity: 0; transition: opacity 0.2s; }
      .cmd-search input:focus::placeholder,
      .cmd-search input.expanded::placeholder { opacity: 1; }

      /* Phase 0B: Chat/Contacts panel full-screen overlay */
      .chat-panel { width: 100% !important; top: 0 !important; z-index: 800; border-left: none; }
      .contacts-panel { width: 100% !important; top: 0 !important; z-index: 800; border-left: none; }

      /* Phase 0C: Presence panel full-width */
      .presence-panel { width: 100% !important; left: 0 !important; right: 0 !important; top: 48px !important; border-radius: 0 !important; max-height: calc(100vh - 48px - 56px); }

      /* Phase 0D: Touch targets >= 44px */
      .cmd-icon { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
      .chat-send { min-width: 44px; min-height: 44px; width: 44px; height: 44px; }
      .chat-back { min-width: 44px; min-height: 44px; }
      .chat-close { min-width: 44px; min-height: 44px; font-size: var(--fs-2xl); }
      .mobile-tab { min-height: 44px; }
    }

    @media (max-width: 480px) {
      .cmd-bar { padding: 4px; }
      .cmd-pill.add { padding: 6px 12px; font-size: var(--fs-xs); }
      .auth-card { width: calc(100vw - 24px); padding: 24px; }
      .drawer-body { padding: 14px 16px; }
      .kpi-card { min-width: auto; padding: 12px 14px; }
      .kpi-value { font-size: var(--fs-xl); }
      .onboard-modal { width: calc(100vw - 24px); padding: 20px; }
    }

    /* Team presence panel */
    .presence-badge {
      background: #4ade80 !important;
      color: #000 !important;
      box-shadow: 0 0 6px rgba(74,222,128,0.5) !important;
    }
    .presence-panel {
      position: fixed;
      top: 52px;
      right: auto;
      z-index: 600;
      width: 280px;
      max-height: 400px;
      background: var(--bg-2);
      border: 1px solid var(--glass-border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      backdrop-filter: blur(var(--blur));
      overflow: hidden;
      animation: fadeSlideDown 0.15s ease;
    }
    @keyframes fadeSlideDown {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .presence-panel-header {
      padding: 12px 14px 8px;
      font-size: var(--fs-sm);
      font-weight: 700;
      color: var(--text-2);
      border-bottom: 1px solid var(--glass-border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .presence-panel-header .online-count {
      font-size: var(--fs-2xs);
      font-weight: 500;
      color: #4ade80;
    }
    .presence-panel-list {
      overflow-y: auto;
      max-height: 350px;
      padding: 6px 0;
    }
    .presence-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 7px 14px;
      cursor: pointer;
      transition: background 0.12s;
    }
    .presence-item:hover { background: var(--glass); }
    .presence-item-avatar {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--surface-2);
      color: var(--text-2);
      font-size: var(--fs-3xs);
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      flex-shrink: 0;
    }
    .presence-item-avatar img {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
    }
    .presence-item-dot {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      border: 2px solid var(--bg-2);
    }
    .presence-item-dot.online { background: #4ade80; }
    .presence-item-dot.offline { background: #6b7280; }
    .presence-item-info {
      flex: 1;
      min-width: 0;
    }
    .presence-item-name {
      font-size: var(--fs-sm);
      font-weight: 600;
      color: var(--text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .presence-item-status {
      font-size: var(--fs-2xs);
      margin-top: 1px;
    }
    .presence-item-status.is-online { color: #4ade80; }
    .presence-item-status.is-offline { color: var(--text-3); }

    /* Presence indicators */
    .presence-dot {
      position: absolute;
      bottom: -1px;
      right: -1px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      border: 2px solid var(--bg);
    }
    .presence-dot.online {
      background: var(--green);
    }

    /* ══ CHAT PANEL ══ */
    .chat-panel {
      position: fixed; right: 0; top: 48px; bottom: 0; width: 360px;
      z-index: 700; background: var(--bg); border-left: 1px solid var(--glass-border);
      display: flex; flex-direction: column;
      animation: chatSlideIn 0.2s ease;
    }
    @keyframes chatSlideIn {
      from { transform: translateX(100%); opacity: 0; }
      to { transform: translateX(0); opacity: 1; }
    }
    .chat-header {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; border-bottom: 1px solid var(--glass-border);
      min-height: 48px;
    }
    .chat-header-avatar {
      width: 30px; height: 30px; border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-2xs); font-weight: 700; color: white; flex-shrink: 0;
    }
    .chat-header-avatar img {
      width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    }
    .chat-header-name {
      font-size: var(--fs-base); font-weight: 600; color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
    }
    .chat-back {
      background: none; border: none; color: var(--text-2); cursor: pointer;
      padding: 4px; border-radius: 6px; display: flex; align-items: center;
    }
    .chat-back:hover { background: var(--glass); }
    .chat-close {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      font-size: var(--fs-xl); padding: 4px 6px; border-radius: 6px; line-height: 1;
    }
    .chat-close:hover { color: var(--text); background: var(--glass); }
    .chat-messages {
      flex: 1; overflow-y: auto; padding: 12px 14px;
      display: flex; flex-direction: column; gap: 2px;
    }
    .chat-date-sep {
      text-align: center; font-size: var(--fs-3xs); color: var(--text-3);
      margin: 12px 0 8px; font-weight: 500;
    }
    .chat-bubble-wrap {
      display: flex; flex-direction: column; max-width: 75%;
    }
    .chat-bubble-wrap.sent { align-self: flex-end; align-items: flex-end; }
    .chat-bubble-wrap.received { align-self: flex-start; align-items: flex-start; }
    .chat-bubble {
      padding: 8px 12px; border-radius: 12px; word-wrap: break-word;
      white-space: pre-wrap; font-size: var(--fs-md); line-height: 1.4;
      position: relative;
    }
    .chat-bubble.sent {
      background: rgba(232,194,110,0.15); color: var(--text);
      border-bottom-right-radius: 4px;
    }
    .chat-bubble.received {
      background: var(--glass); color: var(--text);
      border-bottom-left-radius: 4px;
    }
    .chat-bubble.sending { opacity: 0.6; }
    .chat-bubble-time {
      font-size: var(--fs-3xs); color: var(--text-3); margin-top: 2px; padding: 0 4px;
    }
    .chat-bubble-del {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      font-size: var(--fs-sm); padding: 0 2px; display: flex; align-items: center;
    }
    .chat-bubble-del:hover { color: var(--red); }
    .chat-input-row {
      border-top: 1px solid var(--glass-border); padding: 8px 10px;
      display: flex; align-items: flex-end; gap: 6px;
    }
    .chat-input {
      flex: 1; background: var(--glass); border: 1px solid var(--glass-border);
      border-radius: 20px; padding: 8px 14px; color: var(--text);
      font-size: var(--fs-md); font-family: inherit; resize: none;
      outline: none; max-height: 100px; line-height: 1.4;
    }
    .chat-input:focus { border-color: var(--primary); }
    .chat-input::placeholder { color: var(--text-3); }
    .chat-send {
      width: 32px; height: 32px; border-radius: 50%;
      background: var(--primary); border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      color: var(--bg); flex-shrink: 0;
    }
    .chat-send:hover { filter: brightness(1.1); }
    .chat-conv-list {
      flex: 1; overflow-y: auto;
    }
    .chat-conv-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px; cursor: pointer; transition: background 0.15s;
    }
    .chat-conv-item:hover { background: var(--glass); }
    .chat-conv-avatar {
      width: 36px; height: 36px; border-radius: 50%;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-xs); font-weight: 700; color: white; flex-shrink: 0;
    }
    .chat-conv-avatar img {
      width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    }
    .chat-conv-info { flex: 1; min-width: 0; }
    .chat-conv-name {
      font-size: var(--fs-md); font-weight: 500; color: var(--text);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chat-conv-preview {
      font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chat-conv-meta {
      display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0;
    }
    .chat-conv-time { font-size: var(--fs-3xs); color: var(--text-3); }
    .chat-conv-badge {
      background: var(--primary); color: var(--bg); font-size: var(--fs-3xs);
      font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px;
      text-align: center;
    }
    .chat-badge {
      position: absolute; top: -4px; right: -4px;
      background: var(--primary); color: var(--bg);
      font-size: var(--fs-3xs); font-weight: 700;
      padding: 1px 4px; border-radius: 8px; min-width: 16px;
      text-align: center; display: none;
    }
    .chat-empty {
      display: flex; align-items: center; justify-content: center;
      text-align: center; padding: 40px 20px;
      font-size: var(--fs-sm); color: var(--text-3); line-height: 1.5;
    }

    /* ── Chat: Reply/Quote ── */
    .chat-bubble-actions {
      position: absolute; top: 2px; right: 4px;
      display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s;
    }
    .chat-bubble:hover .chat-bubble-actions { opacity: 1; }
    .chat-bubble-reply {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      padding: 0 2px; font-size: var(--fs-xs); display: flex; align-items: center;
    }
    .chat-bubble-reply:hover { color: var(--accent); }
    .chat-quote {
      background: rgba(255,255,255,0.05); border-left: 2px solid var(--accent);
      padding: 4px 8px; margin-bottom: 6px; border-radius: 4px;
      font-size: var(--fs-xs); line-height: 1.3;
    }
    .chat-quote-name {
      display: block; font-weight: 600; color: var(--accent); font-size: var(--fs-3xs);
      margin-bottom: 1px;
    }
    .chat-quote-text { color: var(--text-3); }
    .chat-reply-bar {
      display: none; align-items: center; gap: 8px;
      padding: 6px 14px; background: rgba(232,194,110,0.06);
      border-top: 1px solid var(--glass-border);
    }
    .chat-reply-bar-content { flex: 1; min-width: 0; }
    .chat-reply-bar-name {
      display: block; font-size: var(--fs-3xs); font-weight: 600; color: var(--accent);
    }
    .chat-reply-bar-text {
      display: block; font-size: var(--fs-2xs); color: var(--text-3);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chat-reply-bar-cancel {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      font-size: var(--fs-lg); padding: 2px 6px; border-radius: 4px;
    }
    .chat-reply-bar-cancel:hover { color: var(--text); }

    /* ── Chat: Group ── */
    .chat-new-group {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px; cursor: pointer; font-size: var(--fs-sm);
      font-weight: 500; color: var(--accent); transition: background 0.15s;
      border-bottom: 1px solid var(--glass-border);
    }
    .chat-new-group:hover { background: var(--accent-dim); }

    /* ── Search: existing-comp badge ── */
    .search-sug-comp {
      font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
      padding: 2px 7px; border-radius: 100px; white-space: nowrap;
      background: var(--accent); color: #0c0c0f; margin-right: 6px;
    }

    /* ── Popup action icons ── */
    .pop-del {
      margin-left: auto; width: 24px; height: 24px; display: flex; align-items: center;
      justify-content: center; border-radius: 6px; color: var(--text-3);
      cursor: pointer; transition: var(--transition); background: none; border: none;
    }
    .pop-del:hover { color: var(--red); background: var(--red-dim); }
    .pop-btns .pop-act {
      flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
      padding: 8px 0; border-radius: var(--radius-sm); color: var(--text-2);
      border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03);
      cursor: pointer; transition: var(--transition); text-decoration: none;
    }
    .pop-btns .pop-act:hover { color: var(--accent); border-color: rgba(232,194,110,0.3); background: var(--accent-dim); }

    /* ── Aerial thumbnails (comp popup + details panel) ── */
    .pop-aerial {
      position: relative; margin: -12px -16px 10px; border-left: 2px solid var(--accent);
      height: 120px; overflow: hidden; background: #14141a;
    }
    .pop-aerial img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .pop-aerial::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(to top, rgba(14,14,18,0.55), transparent 45%);
      pointer-events: none;
    }
    .pop-aerial-credit {
      position: absolute; right: 6px; bottom: 4px; z-index: 1;
      font-size: 9px; color: rgba(255,255,255,0.55); font-family: var(--mono);
    }
    .panel-aerial {
      position: relative; height: 150px; overflow: hidden;
      border-radius: var(--radius-sm); margin-bottom: 12px;
      border: 1px solid var(--glass-border); background: #14141a;
    }
    .panel-aerial img { width: 100%; height: 100%; object-fit: cover; display: block; }

    /* ── File preview lightbox ── */
    .preview-overlay {
      position: fixed; inset: 0; z-index: 10000;
      background: rgba(5,5,8,0.88); backdrop-filter: blur(8px);
      display: flex; flex-direction: column;
    }
    .preview-bar {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 10px 16px; border-bottom: 1px solid var(--glass-border); flex-shrink: 0;
    }
    .preview-name { font-size: var(--fs-sm); font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .preview-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .preview-actions .btn { font-size: var(--fs-xs); padding: 5px 12px; }
    .preview-close {
      background: none; border: none; color: var(--text-3); font-size: var(--fs-xl);
      cursor: pointer; width: 32px; height: 32px; border-radius: 8px;
    }
    .preview-close:hover { color: var(--text); background: var(--glass); }
    .preview-body { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 16px; }
    .preview-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,0.6); }
    .preview-frame { width: 100%; height: 100%; border: none; border-radius: 8px; background: #fff; }
    .preview-fail { color: var(--text-2); font-size: var(--fs-sm); }
    .file-openable { cursor: pointer; }
    .file-openable:hover .file-name { color: var(--accent); }

    /* ── Chat: compose button + conversation delete ── */
    .chat-compose {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      width: 32px; height: 32px; border-radius: 8px; transition: background 0.15s, color 0.15s;
    }
    .chat-compose:hover { color: var(--accent); background: var(--glass); }
    .chat-conv-item { position: relative; }
    .chat-conv-del {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
      opacity: 0; transition: opacity 0.15s, background 0.15s, color 0.15s;
    }
    .chat-conv-item:hover .chat-conv-del { opacity: 1; }
    .chat-conv-del:hover { color: var(--red, #ef4444); background: var(--glass); }
    @media (hover: none) { .chat-conv-del { opacity: 1; } }

    /* ── Chat: New message picker ── */
    .chat-new-overlay {
      position: fixed; inset: 0; z-index: 10000;
      background: rgba(0,0,0,0.5); display: flex;
      align-items: center; justify-content: center; padding: 20px;
    }
    .chat-new-card {
      background: var(--surface, var(--bg)); border: 1px solid var(--glass-border);
      border-radius: 14px; width: 100%; max-width: 380px; max-height: 70vh;
      display: flex; flex-direction: column; overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    }
    .chat-new-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px; border-bottom: 1px solid var(--glass-border);
      font-size: var(--fs-md); font-weight: 600; color: var(--text);
    }
    .chat-new-search {
      margin: 12px 16px 8px; padding: 9px 12px; border-radius: 8px;
      border: 1px solid var(--glass-border); background: var(--glass);
      color: var(--text); font-size: var(--fs-sm); outline: none;
    }
    .chat-new-search:focus { border-color: var(--accent); }
    .chat-new-list { overflow-y: auto; padding-bottom: 8px; }
    .chat-new-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 16px; cursor: pointer; transition: background 0.15s;
    }
    .chat-new-item:hover { background: var(--glass); }
    .chat-group-sender {
      font-size: var(--fs-3xs); font-weight: 600; color: var(--accent);
      padding: 0 4px; margin-top: 6px;
    }
    .chat-group-member-pick {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 0; font-size: var(--fs-sm); color: var(--text);
      cursor: pointer;
    }
    .chat-group-member-pick input[type="checkbox"] {
      accent-color: var(--accent); width: 14px; height: 14px;
    }
    .chat-group-member-list {
      display: flex; flex-direction: column;
    }
    .chat-group-info-members {
      display: flex; flex-direction: column; gap: 6px;
    }
    .chat-group-info-member {
      display: flex; align-items: center; gap: 8px;
      font-size: var(--fs-sm); color: var(--text);
    }

    /* ══ CONTACTS PANEL ══ */
    .contacts-panel {
      position: fixed; right: 0; top: 48px; bottom: 0; width: 360px;
      z-index: 700; background: var(--bg); border-left: 1px solid var(--glass-border);
      display: flex; flex-direction: column;
      animation: chatSlideIn 0.2s ease;
    }
    .contacts-header {
      display: flex; align-items: stretch; justify-content: space-between;
      padding: 0 14px; min-height: 44px;
    }
    .contacts-close-btn {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      font-size: var(--fs-xl); padding: 4px 6px; border-radius: 6px; line-height: 1;
    }
    .contacts-close-btn:hover { color: var(--text); background: var(--glass); }
    .contacts-add-btn {
      background: none; border: none; color: var(--text-2); cursor: pointer;
      padding: 4px; border-radius: 6px; display: flex; align-items: center;
    }
    .contacts-add-btn:hover { background: var(--glass); color: var(--accent); }
    .contacts-search-wrap {
      position: relative; padding: 8px 14px; border-bottom: 1px solid var(--glass-border);
    }
    .contacts-search-wrap input {
      width: 100%; padding: 7px 10px 7px 32px;
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      border-radius: var(--radius-pill); color: var(--text); font-size: var(--fs-sm);
      outline: none; transition: var(--transition);
    }
    .contacts-search-wrap input:focus {
      border-color: var(--accent-dim); background: rgba(255,255,255,0.07);
    }
    .contacts-search-wrap input::placeholder { color: var(--text-3); }
    .contacts-content { flex: 1; overflow-y: auto; padding: 0 14px; }
    .contacts-list { display: flex; flex-direction: column; }
    .contact-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 4px; cursor: pointer; transition: background 0.15s;
      border-bottom: 1px solid var(--glass-border);
    }
    .contact-item:hover { background: rgba(255,255,255,0.03); }
    .contact-avatar {
      width: 32px; height: 32px; border-radius: 50%;
      background: linear-gradient(135deg, rgba(232,194,110,0.3), rgba(110,168,232,0.3));
      display: flex; align-items: center; justify-content: center;
      font-size: var(--fs-2xs); font-weight: 700; color: var(--text); flex-shrink: 0;
    }
    .contact-info { flex: 1; min-width: 0; }
    .contact-name {
      font-size: var(--fs-md); font-weight: 500; color: var(--text);
      display: flex; align-items: center; gap: 6px;
    }
    .contact-company {
      display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 1px;
    }
    .contact-role-badge {
      display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill);
      font-size: var(--fs-3xs); font-weight: 600; text-transform: capitalize;
    }
    .contact-role-broker { background: rgba(110,168,232,0.15); color: var(--blue); }
    .contact-role-tenant { background: rgba(232,194,110,0.15); color: var(--accent); }
    .contact-role-landlord { background: rgba(110,232,160,0.15); color: var(--green); }
    .contact-role-buyer { background: rgba(232,168,110,0.15); color: var(--orange); }
    .contact-role-seller { background: rgba(232,110,110,0.15); color: var(--red); }
    .contact-role-investor { background: rgba(160,110,232,0.15); color: #a06ee8; }
    .contact-role-listing_agent { background: rgba(110,168,232,0.15); color: var(--blue); }
    .contact-role-other { background: rgba(255,255,255,0.08); color: var(--text-3); }
    .contact-detail { padding: 10px 0; }
    .contact-detail-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 12px;
    }
    .contact-detail-card {
      background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
      border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px;
    }
    .contact-detail-row {
      display: flex; justify-content: space-between; padding: 4px 0;
      font-size: var(--fs-sm); border-bottom: 1px solid rgba(255,255,255,0.03);
    }
    .contact-detail-label { color: var(--text-3); font-weight: 500; }
    .contact-detail-section { margin-top: 12px; }
    .contacts-back-btn {
      background: none; border: none; color: var(--text-2); cursor: pointer;
      font-size: var(--fs-sm); padding: 4px 8px; border-radius: 6px;
    }
    .contacts-back-btn:hover { background: var(--glass); color: var(--text); }
    .contacts-edit-btn, .contacts-delete-btn {
      background: none; border: 1px solid var(--glass-border); color: var(--text-2);
      cursor: pointer; font-size: var(--fs-xs); padding: 3px 10px; border-radius: var(--radius-sm);
    }
    .contacts-edit-btn:hover { background: var(--glass); color: var(--text); }
    .contacts-delete-btn { color: var(--red); border-color: rgba(232,110,110,0.2); }
    .contacts-delete-btn:hover { background: var(--red-dim); }
    .contact-form { padding: 8px 0; }
    .contact-form .fg { margin-bottom: 8px; }
    .contact-form label { font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); margin-bottom: 3px; display: block; }
    .contact-form input, .contact-form select, .contact-form textarea {
      width: 100%; padding: 7px 10px;
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      border-radius: var(--radius-sm); color: var(--text); font-size: var(--fs-sm);
      outline: none; transition: var(--transition);
    }
    .contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
      border-color: var(--accent-dim); background: rgba(255,255,255,0.07);
    }

    /* ── Contact dropdown (autocomplete) ── */
    .contact-dropdown {
      position: absolute; left: 0; right: 0; top: 100%;
      background: var(--glass-heavy); backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
      box-shadow: var(--shadow); z-index: 600; max-height: 200px; overflow-y: auto;
      margin-top: 2px;
    }
    .contact-dropdown-item {
      padding: 7px 10px; font-size: var(--fs-sm); color: var(--text);
      cursor: pointer; transition: background 0.1s;
    }
    .contact-dropdown-item:hover, .contact-dropdown-active { background: rgba(255,255,255,0.06); }
    .contact-dropdown-comp {
      border-left: 3px solid var(--accent-dim);
      padding-left: 8px;
    }
    .contact-from-comp {
      display: inline-block;
      font-size: var(--fs-3xs);
      color: var(--accent);
      background: rgba(110,168,232,0.1);
      padding: 1px 5px;
      border-radius: 4px;
      margin-left: 4px;
      vertical-align: 1px;
    }

    /* ── Dedup hint ── */
    .dedup-hint {
      margin-top: 4px;
      padding: 6px 10px;
      font-size: var(--fs-xs);
      color: #b8860b;
      background: rgba(255,193,7,0.08);
      border: 1px solid rgba(255,193,7,0.2);
      border-radius: var(--radius-sm);
    }
    .dedup-hint a {
      color: var(--accent);
      text-decoration: underline;
      cursor: pointer;
    }

    /* ── Import review ── */
    .import-review {
      padding: 0 2px;
    }
    .import-cluster-list {
      max-height: 400px;
      overflow-y: auto;
    }
    .import-cluster-item {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      padding: 8px 10px;
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: var(--fs-sm);
      color: var(--text);
      transition: background 0.1s;
    }
    .import-cluster-item:hover {
      background: rgba(255,255,255,0.04);
    }
    .import-cluster-item input[type="checkbox"] {
      margin-top: 3px;
      accent-color: var(--accent);
    }
    .cluster-variants {
      font-size: var(--fs-2xs);
      color: var(--text-3);
      font-style: italic;
      margin-top: 2px;
    }
    .cluster-canonical-input {
      background: none; border: none; border-bottom: 1px dashed var(--glass-border);
      color: var(--text); font-size: var(--fs-sm); font-weight: 500;
      padding: 0 2px; outline: none; width: auto; max-width: 180px;
    }
    .cluster-canonical-input:focus {
      border-bottom-color: var(--accent-dim);
      background: rgba(255,255,255,0.03);
    }
    .import-summary {
      font-size: var(--fs-xs); color: var(--text-3); margin-bottom: 10px;
      padding: 6px 10px; background: rgba(255,255,255,0.03);
      border-radius: var(--radius-sm); border: 1px solid var(--glass-border);
    }
    .import-progress-wrap {
      width: 100%; height: 6px; background: rgba(255,255,255,0.06);
      border-radius: 3px; overflow: hidden;
    }
    .import-progress-bar {
      height: 100%; background: var(--accent);
      border-radius: 3px; transition: width 0.3s ease;
    }

    /* ── Tab bar ── */
    .contacts-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--glass-border); flex: 1; }
    .contacts-tab {
      padding: 10px 16px; text-align: center; font-size: var(--fs-sm); font-weight: 600;
      color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent;
      transition: var(--transition); position: relative; bottom: -1px;
    }
    .contacts-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
    .contacts-tab:hover { color: var(--text); }

    /* ── Role filter pills ── */
    .companies-role-bar {
      display: flex; gap: 5px; padding: 6px 0; flex-wrap: wrap; align-items: center;
      border-bottom: 1px solid var(--glass-border); margin-bottom: 2px;
    }
    .companies-role-pill {
      font-size: var(--fs-2xs); padding: 3px 9px; border-radius: var(--radius-pill);
      border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03);
      color: var(--text-3); cursor: pointer; transition: var(--transition);
      font-weight: 500;
    }
    .companies-role-pill:hover { background: rgba(255,255,255,0.07); color: var(--text-2); }
    .companies-role-pill.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

    /* ── Sort select ── */
    .companies-sort {
      font-size: var(--fs-2xs); padding: 3px 6px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); border-radius: 4px;
      color: var(--text-2); cursor: pointer; outline: none;
    }

    /* ── Company list ── */
    .companies-list { display: flex; flex-direction: column; }
    .company-item {
      display: flex; align-items: center; gap: 8px; padding: 8px 4px;
      border-bottom: 1px solid var(--glass-border); font-size: var(--fs-sm);
    }
    .company-item:hover { background: rgba(255,255,255,0.03); }
    .company-checkbox { accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
    .company-name { flex: 1; cursor: pointer; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .company-name:hover { color: var(--accent); }
    .company-count {
      font-size: var(--fs-2xs); color: var(--text-3); flex-shrink: 0;
      background: rgba(255,255,255,0.05); padding: 1px 6px; border-radius: var(--radius-pill);
    }
    .company-actions-btn {
      background: none; border: none; color: var(--text-3); cursor: pointer;
      padding: 2px 4px; font-size: var(--fs-sm); flex-shrink: 0; border-radius: 4px;
    }
    .company-actions-btn:hover { background: var(--glass); color: var(--text); }

    /* ── Bulk action bar ── */
    .companies-bulk { display: flex; gap: 8px; padding: 8px 0; align-items: center; }
    .companies-bulk button {
      font-size: var(--fs-xs); padding: 4px 10px; border-radius: var(--radius-pill);
      background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
      color: var(--text-2); cursor: pointer; transition: var(--transition);
    }
    .companies-bulk button:hover { background: var(--glass); color: var(--text); }
    .companies-summary { font-size: var(--fs-xs); color: var(--text-3); margin-left: auto; }

    /* ── Comp contacts list ── */
    .comp-contacts-list { max-height: 400px; overflow-y: auto; }

    /* ══ CONTEXT MENU ══ */
    .map-ctx-menu {
      position: fixed; z-index: 500;
      background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
      box-shadow: var(--shadow-lg); padding: 4px; min-width: 180px;
      animation: drawToolbarIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .map-ctx-item {
      display: flex; align-items: center; gap: 8px; width: 100%;
      padding: 8px 12px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 500;
      color: var(--text-2); background: none; border: none; cursor: pointer;
      transition: var(--transition); text-align: left;
    }
    .map-ctx-item:hover { background: rgba(255,255,255,0.08); color: var(--text); }

    /* ══ COMP FINDER (RADIUS) ══ */
    .radius-toolbar {
      position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
      z-index: 300; background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); padding: 12px 18px; text-align: center; min-width: 280px;
      animation: drawToolbarIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .radius-controls {
      position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
      z-index: 300; background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg); padding: 12px 16px; width: 340px; max-width: calc(100vw - 24px);
      animation: drawToolbarIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .radius-ctrl-title { font-size: var(--fs-xs); font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; }
    .radius-ctrl-addr { font-size: var(--fs-3xs); color: var(--text-3); margin: 2px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .radius-ctrl-slider-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .radius-ctrl-slider-row input[type="range"] { flex: 1; accent-color: var(--accent); }
    .radius-ctrl-slider-row input[type="number"] {
      padding: 4px 6px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 600;
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; font-family: var(--mono); text-align: center;
    }
    .radius-ctrl-unit { font-size: var(--fs-3xs); color: var(--text-3); }
    .radius-presets { display: flex; gap: 4px; }
    .radius-preset {
      padding: 4px 10px; border-radius: var(--radius-pill); font-size: var(--fs-2xs); font-weight: 600;
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text-2); cursor: pointer; transition: var(--transition);
    }
    .radius-preset:hover { background: rgba(232,194,110,0.15); color: var(--accent); border-color: rgba(232,194,110,0.3); }

    .radius-center-marker {
      animation: radiusPulse 2s ease-in-out infinite;
    }
    @keyframes radiusPulse {
      0%, 100% { filter: drop-shadow(0 0 4px rgba(232,194,110,0.4)); }
      50% { filter: drop-shadow(0 0 12px rgba(232,194,110,0.7)); }
    }

    .radius-actions {
      position: fixed; top: 72px; right: 12px; z-index: 300;
      width: 380px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); overflow-y: auto;
      background: var(--glass-heavy); backdrop-filter: blur(30px);
      border: 1px solid var(--glass-border); border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      animation: drawActionsIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent;
    }
    .radius-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 8px 14px 10px; }
    .radius-metric {
      display: flex; flex-direction: column; align-items: center; text-align: center;
      padding: 8px 10px 6px; border-radius: 6px; background: rgba(255,255,255,0.04);
      border: 1px solid var(--glass-border); overflow: hidden;
    }
    .radius-metric-val { font-size: var(--fs-sm); font-weight: 700; color: var(--text); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .radius-metric-label { font-size: var(--fs-3xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 3px; }
    .radius-sort-row { display: flex; gap: 3px; padding: 4px 14px; }
    .radius-sort-btn {
      padding: 3px 8px; border-radius: var(--radius-pill); font-size: var(--fs-3xs); font-weight: 600;
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      color: var(--text-3); cursor: pointer; transition: var(--transition);
    }
    .radius-sort-btn:hover { color: var(--text-2); background: rgba(255,255,255,0.08); }
    .radius-sort-btn.active { color: var(--accent); border-color: rgba(232,194,110,0.3); background: rgba(232,194,110,0.1); }
    .radius-comp-list { max-height: 240px; overflow-y: auto; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
    .radius-comp-item {
      display: flex; align-items: center; gap: 6px; width: 100%;
      padding: 5px 8px; border-radius: 6px; font-size: var(--fs-2xs);
      color: var(--text-2); background: none; border: none; cursor: pointer;
      transition: var(--transition); text-align: left;
    }
    .radius-comp-item:hover { background: rgba(255,255,255,0.06); color: var(--text); }
    .rc-badge {
      display: inline-flex; align-items: center; justify-content: center;
      width: 18px; height: 18px; border-radius: 4px; font-size: var(--fs-3xs); font-weight: 700; flex-shrink: 0;
    }
    .rc-lease { background: rgba(59,130,246,0.2); color: #6ea8e8; }
    .rc-sale { background: var(--sale-dim); color: #f472b6; }
    .rc-addr { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rc-val { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-3); white-space: nowrap; }
    .rc-dist { font-family: var(--mono); font-size: var(--fs-3xs); color: var(--text-3); white-space: nowrap; min-width: 42px; text-align: right; }

    /* ══ COMP FINDER ENHANCEMENTS ══ */
    .radius-search-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
    .radius-search-row input[type="text"] {
      flex: 1; padding: 5px 8px; border-radius: 6px; font-size: var(--fs-xs);
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; min-width: 0;
    }
    .radius-search-row input[type="text"]:focus { border-color: var(--accent); }
    .radius-search-row button {
      padding: 5px 10px; border-radius: 6px; font-size: var(--fs-2xs); font-weight: 600;
      background: var(--accent-dim); color: var(--accent); border: none; cursor: pointer;
      white-space: nowrap; transition: var(--transition);
    }
    .radius-search-row button:hover { background: rgba(232,194,110,0.2); }
    .radius-metric-range { font-size: var(--fs-3xs); }
    .radius-recency { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 14px 6px; }
    .radius-recency-item { font-size: var(--fs-3xs); color: var(--text-3); font-family: var(--mono); }
    .radius-time-filter { margin-top: 6px; border-top: 1px solid var(--glass-border); padding-top: 4px; }
    .radius-time-toggle {
      display: flex; align-items: center; gap: 4px; width: 100%; padding: 3px 0;
      font-size: var(--fs-3xs); font-weight: 600; color: var(--text-3); background: none;
      border: none; cursor: pointer; transition: var(--transition);
    }
    .radius-time-toggle:hover { color: var(--text-2); }
    .radius-time-arrow { font-size: var(--fs-3xs); transition: transform 0.15s; display: inline-block; }
    .radius-time-filter.open .radius-time-arrow { transform: rotate(90deg); }
    .radius-time-body { display: none; padding: 4px 0 2px; }
    .radius-time-filter.open .radius-time-body { display: block; }
    .radius-time-inputs { display: flex; align-items: center; gap: 6px; }
    .radius-time-inputs input[type="date"] {
      flex: 1; padding: 4px 6px; border-radius: 5px; font-size: var(--fs-2xs);
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; color-scheme: dark;
    }
    .radius-time-inputs input[type="date"]:focus { border-color: var(--accent); }
    .radius-time-sep { font-size: var(--fs-3xs); color: var(--text-3); }
    .radius-time-info { font-size: var(--fs-3xs); color: var(--text-3); margin-top: 4px; }
    .radius-time-active-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 4px; vertical-align: middle; }

    /* ── Condition Filter ── */
    .radius-cond-filter { margin-top: 6px; border-top: 1px solid var(--glass-border); padding-top: 4px; }
    .radius-cond-body { display: none; padding: 4px 0 2px; }
    .radius-cond-filter.open .radius-cond-body { display: block; }
    .radius-cond-logic-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
    .radius-cond-logic-label { font-size: var(--fs-3xs); color: var(--text-3); font-weight: 600; }
    .radius-cond-logic-btn {
      padding: 2px 8px; border-radius: 4px; font-size: var(--fs-3xs); font-weight: 600;
      background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
      color: var(--text-3); cursor: pointer; transition: var(--transition);
    }
    .radius-cond-logic-btn:hover { color: var(--text-2); border-color: var(--text-3); }
    .radius-cond-logic-btn.active { background: rgba(232,194,110,0.15); border-color: var(--accent); color: var(--accent); }
    .radius-cond-row { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
    .radius-cond-field, .radius-cond-op {
      padding: 3px 4px; border-radius: 4px; font-size: var(--fs-3xs);
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; color-scheme: dark; cursor: pointer;
    }
    .radius-cond-field { flex: 1; min-width: 0; }
    .radius-cond-op { width: 62px; flex-shrink: 0; }
    .radius-cond-field:focus, .radius-cond-op:focus { border-color: var(--accent); }
    .radius-cond-val {
      width: 56px; padding: 3px 4px; border-radius: 4px; font-size: var(--fs-3xs);
      font-family: var(--mono); text-align: center;
      background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
      color: var(--text); outline: none; color-scheme: dark;
      -moz-appearance: textfield;
    }
    .radius-cond-val::-webkit-outer-spin-button,
    .radius-cond-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .radius-cond-val:focus { border-color: var(--accent); }
    .radius-cond-sep { font-size: var(--fs-3xs); color: var(--text-3); flex-shrink: 0; }
    .radius-cond-remove {
      width: 20px; height: 20px; border-radius: 4px; font-size: var(--fs-base); line-height: 1;
      color: var(--text-3); background: none; border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0;
      transition: var(--transition);
    }
    .radius-cond-remove:hover { color: var(--red); background: rgba(232,110,110,0.1); }
    .radius-cond-add {
      display: inline-block; margin-top: 2px; padding: 2px 0; font-size: var(--fs-3xs);
      font-weight: 600; color: var(--accent); background: none; border: none;
      cursor: pointer; opacity: 0.8; transition: var(--transition);
    }
    .radius-cond-add:hover { opacity: 1; }

    /* ══ SAVED SEARCHES ══ */
    .saved-search-save-row { display: flex; gap: 6px; margin-bottom: 8px; }
    .saved-search-save-row input {
      flex: 1; padding: 6px 10px; border-radius: 6px; font-size: var(--fs-sm);
      background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
      color: var(--text); outline: none;
    }
    .saved-search-save-row input:focus { border-color: var(--accent); }
    .saved-search-list { max-height: 160px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }
    .saved-item { display: flex; align-items: center; gap: 4px; padding: 4px 0; }
    .saved-item-name {
      flex: 1; font-size: var(--fs-xs); color: var(--text-2); background: none; border: none;
      cursor: pointer; text-align: left; padding: 2px 4px; border-radius: 4px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: var(--transition);
    }
    .saved-item-name:hover { color: var(--accent); background: rgba(232,194,110,0.08); }
    .saved-item-date { font-size: var(--fs-3xs); color: var(--text-3); white-space: nowrap; }
    .saved-item-del {
      width: 18px; height: 18px; border-radius: 4px; font-size: var(--fs-sm); line-height: 1;
      color: var(--text-3); background: none; border: none; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      opacity: 0; transition: var(--transition);
    }
    .saved-item:hover .saved-item-del { opacity: 1; }
    .saved-item-del:hover { color: var(--red); background: rgba(232,110,110,0.1); }
    .saved-empty { font-size: var(--fs-2xs); color: var(--text-3); padding: 4px 0; }

    /* ── Report Builder (Presentation) ── */
    .pres-overlay { position: fixed; inset: 0; z-index: 850; background: var(--bg); display: flex; }
    .pres-layout { display: flex; width: 100%; height: 100%; }
    .pres-sidebar { width: 280px; min-width: 280px; background: rgba(255,255,255,0.03); border-right: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; overflow-y: auto; }
    .pres-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .pres-controls { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
    .pres-field label { display: block; font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); margin-bottom: 6px; }
    .pres-field input[type="text"] { width: 100%; padding: 7px 10px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: var(--text); font-size: var(--fs-md); font-family: var(--font); }
    .pres-field input[type="text"]:focus { border-color: var(--accent-dim); outline: none; }
    .pres-check { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; padding: 2px 0; }
    .pres-check input[type="checkbox"] { accent-color: var(--accent); }
    .pres-preview { flex: 1; overflow-y: auto; background: #fff; }
    .pres-preview-inner { padding: 0; min-height: 100%; }
    .pres-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 4px; }
    .pres-orient-btn { transition: background 0.15s, border-color 0.15s; }
    .pres-orient-active { background: rgba(232,194,110,0.15) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ── Network Graph ── */
    .network-overlay { position: fixed; inset: 0; z-index: 800; background: var(--bg); }
    .network-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
    .network-top-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: linear-gradient(to bottom, rgba(12,12,15,0.9), transparent); pointer-events: none; }
    .network-top-bar > * { pointer-events: all; }
    .network-search input { padding: 7px 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; color: var(--text); font-size: var(--fs-md); font-family: var(--font); width: 200px; }
    .network-search input:focus { border-color: var(--accent-dim); outline: none; }
    .network-search input::placeholder { color: var(--text-3); }
    .network-filters { display: flex; gap: 4px; flex-wrap: wrap; }
    .network-filter-btn { padding: 5px 10px; font-size: var(--fs-xs); font-family: var(--font); background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 5px; color: var(--text-2); cursor: pointer; transition: var(--transition); }
    .network-filter-btn:hover { background: rgba(255,255,255,0.1); color: var(--text); }
    .network-filter-btn.active { background: var(--accent-dim); color: var(--accent); border-color: rgba(232,194,110,0.2); }
    .network-threshold { display: flex; align-items: center; }
    .network-actions { margin-left: auto; display: flex; gap: 4px; }
    .network-action-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px; color: var(--text-2); cursor: pointer; font-size: var(--fs-lg); font-family: var(--font); transition: var(--transition); }
    .network-action-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); }
    .network-info { position: absolute; right: 0; top: 0; bottom: 0; width: 320px; background: rgba(12,12,15,0.95); border-left: 1px solid rgba(255,255,255,0.08); overflow-y: auto; z-index: 10; backdrop-filter: blur(12px); }
    .network-info.hidden { display: none; }
    .network-info-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
    .network-info-header h3 { margin: 0; font-size: var(--fs-lg); font-weight: 700; }
    .network-info-close { background: none; border: none; color: var(--text-3); font-size: var(--fs-xl); cursor: pointer; padding: 4px; }
    .network-info-close:hover { color: var(--text); }
    .network-info-body { padding: 16px; }
    .network-info-meta { margin-bottom: 16px; }
    .network-info-role { display: inline-block; padding: 2px 8px; background: var(--accent-dim); color: var(--accent); border-radius: 4px; font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; margin-right: 4px; }
    .network-info-section { margin-top: 16px; }
    .network-info-section-title { font-size: var(--fs-2xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); margin-bottom: 8px; }
    .network-info-conn { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: var(--fs-sm); }
    .network-info-conn-name { color: var(--text); }
    .network-info-conn-count { color: var(--text-3); font-size: var(--fs-xs); font-family: 'JetBrains Mono', monospace; }
    .network-legend { position: absolute; bottom: 16px; left: 16px; display: flex; gap: 14px; font-size: var(--fs-xs); color: var(--text-3); }
    .network-legend-item { display: flex; align-items: center; gap: 5px; }
    .network-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

    /* ── Comparison Overlay ── */
    .compare-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; }
    .compare-card { background: var(--bg); border: 1px solid var(--glass-border); border-radius: var(--radius); max-width: 90vw; max-height: 85vh; overflow: auto; box-shadow: 0 16px 48px rgba(0,0,0,0.5); }
    .compare-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--glass-border); }
    .compare-header h3 { font-size: var(--fs-base); font-weight: 700; }
    .compare-grid { display: grid; gap: 0; }
    .compare-cell { padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .compare-label { font-weight: 600; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.5px; background: rgba(255,255,255,0.02); }
    .compare-col-header { font-weight: 600; color: var(--text); background: rgba(255,255,255,0.02); }
    .compare-high { background: rgba(110,232,160,0.12); color: var(--green); }
    .compare-low { background: rgba(232,110,110,0.12); color: var(--red); }

    /* ── Column Picker ── */
    .col-picker-dropdown { position: absolute; top: 100%; right: 0; z-index: 500; background: var(--glass-heavy); backdrop-filter: blur(var(--blur)); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 8px 0; min-width: 200px; max-height: 360px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
    .col-picker-title { padding: 6px 14px; font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-3); }
    .col-picker-item { display: flex; align-items: center; gap: 8px; padding: 5px 14px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
    .col-picker-item:hover { background: rgba(255,255,255,0.04); }
    .col-picker-item input { accent-color: var(--accent); }

    /* ── Annotation Popup ── */
    .annotation-popup { font-size: var(--fs-md); }

    /* ── Saved Views ── */
    .saved-item.active .saved-item-name { color: var(--accent); font-weight: 600; }
    .saved-active-bar { display: flex; align-items: center; gap: 8px; padding: 6px 0; margin-bottom: 8px; border-bottom: 1px solid var(--glass-border); }
    .saved-active-label { font-size: var(--fs-xs); color: var(--text-3); flex: 1; }
    .saved-active-label strong { color: var(--accent); }

    /* ── Analytics: Online Indicator ── */
    .online-dot {
      display: inline-block; width: 8px; height: 8px;
      border-radius: 50%; background: #22c55e;
      box-shadow: 0 0 6px rgba(34,197,94,0.5);
    }
    .online-dot.offline { background: var(--text-3); box-shadow: none; }
    .analytics-online-strip {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 14px; font-size: var(--fs-sm); color: var(--text-2);
      border-bottom: 1px solid var(--glass-border); margin-bottom: 12px;
    }
    .online-avatars { display: flex; gap: 4px; margin-left: 8px; }

    /* ── Analytics: Activity Heatmap ── */
    .analytics-heatmap {
      display: grid; grid-template-columns: 40px repeat(24, 1fr);
      gap: 2px; font-size: var(--fs-3xs);
    }
    .heatmap-cell {
      aspect-ratio: 1; border-radius: 2px;
      background: rgba(232,194,110,0.05);
    }
    .heatmap-cell.h1 { background: rgba(232,194,110,0.15); }
    .heatmap-cell.h2 { background: rgba(232,194,110,0.3); }
    .heatmap-cell.h3 { background: rgba(232,194,110,0.5); }
    .heatmap-cell.h4 { background: rgba(232,194,110,0.75); }
    .heatmap-label { display: flex; align-items: center; color: var(--text-3); font-size: var(--fs-3xs); }

    /* ── Analytics: User Detail View ── */
    .user-detail-header {
      display: flex; align-items: center; gap: 12px;
      padding: 12px 0; border-bottom: 1px solid var(--glass-border);
      margin-bottom: 16px;
    }
    .user-detail-name { font-size: var(--fs-lg); font-weight: 700; }
    .user-detail-email { font-size: var(--fs-sm); color: var(--text-3); }
    .user-timeline { max-height: 400px; overflow-y: auto; scrollbar-width: thin; }
    .timeline-event {
      display: flex; align-items: center; gap: 10px;
      padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
      font-size: var(--fs-sm);
    }
    .timeline-time { font-family: var(--mono); font-size: var(--fs-2xs); color: var(--text-3); min-width: 120px; }
    .timeline-event-name { font-family: var(--mono); font-weight: 600; }
    .timeline-cat {
      font-size: var(--fs-2xs); padding: 1px 6px; border-radius: var(--radius-pill);
      background: rgba(255,255,255,0.06); color: var(--text-2);
    }
    .timeline-meta { font-size: var(--fs-2xs); color: var(--text-3); margin-left: auto; }

    /* ── Analytics: Session History Table ── */
    .session-table td { font-family: var(--mono); font-size: var(--fs-xs); }

    /* ── Market Focus ── */
    .markets-sidebar {
      position: fixed; top: 48px; right: 0; bottom: 0; width: 360px;
      background: var(--glass-bg); backdrop-filter: blur(20px);
      border-left: 1px solid var(--glass-border);
      z-index: 200; display: flex; flex-direction: column;
      transform: translateX(100%); transition: transform 0.2s ease;
    }
    .markets-sidebar.open { transform: translateX(0); }
    .markets-sidebar-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 12px 16px; border-bottom: 1px solid var(--glass-border);
    }
    .markets-filter-bar {
      display: flex; gap: 6px; padding: 8px 16px;
      border-bottom: 1px solid var(--glass-border);
    }
    .markets-list { flex: 1; overflow-y: auto; scrollbar-width: thin; }
    .market-list-item {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px; cursor: pointer;
      border-bottom: 1px solid rgba(255,255,255,0.03);
      transition: background 0.15s;
    }
    .market-list-item:hover { background: rgba(255,255,255,0.04); }
    .market-color-dot {
      width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    }
    .market-list-info { flex: 1; min-width: 0; }
    .market-list-name {
      font-size: var(--fs-md); font-weight: 600; white-space: nowrap;
      overflow: hidden; text-overflow: ellipsis;
    }
    .market-list-meta {
      display: flex; gap: 6px; align-items: center; margin-top: 3px;
      font-size: var(--fs-2xs); color: var(--text-3);
    }
    .market-list-date { font-size: var(--fs-2xs); color: var(--text-3); flex-shrink: 0; }
    .market-priority-badge {
      display: inline-block; padding: 1px 8px; border-radius: var(--radius-pill);
      font-size: var(--fs-2xs); font-weight: 600; color: #fff;
      text-transform: capitalize; line-height: 1.4;
    }
    .market-stale-badge {
      display: inline-block; padding: 1px 6px; border-radius: var(--radius-pill);
      font-size: var(--fs-3xs); font-weight: 600; background: var(--orange);
      color: #1a1918;
    }
    .market-detail-modal {
      background: var(--glass-heavy); backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
      border-radius: var(--radius);
      width: 520px; max-width: 95vw; max-height: 85vh;
      display: flex; flex-direction: column; overflow: hidden;
      border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg);
    }
    .market-detail-header {
      display: flex; justify-content: space-between; align-items: flex-start;
      padding: 16px 20px; border-bottom: 1px solid var(--glass-border);
    }
    .market-detail-tabs {
      display: flex; gap: 0; border-bottom: 1px solid var(--glass-border);
    }
    .market-detail-tab {
      padding: 8px 16px; font-size: var(--fs-sm); font-weight: 600;
      color: var(--text-3); cursor: pointer; border: none; background: none;
      border-bottom: 2px solid transparent; transition: all 0.15s;
    }
    .market-detail-tab:hover { color: var(--text); }
    .market-detail-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
    .market-detail-body { flex: 1; overflow-y: auto; scrollbar-width: thin; }

    @media (max-width: 768px) {
      .markets-sidebar { width: 100%; }
      .market-detail-modal { width: 100%; max-width: 100vw; }
    }

/* ═══ Owner X-Ray ═══ */
.xray-sidebar { width: 400px; z-index: 210; }
/* The veil is DOM on purpose: it must dim DOM market pins too, and canvas
   layers added mid tile-churn silently refuse to draw (see ownerxray.js) */
.xray-veil {
  position: absolute; inset: 0; z-index: 50; pointer-events: none;
  background: rgba(4, 6, 10, 0.66); opacity: 0; transition: opacity 0.45s ease;
}
.xray-veil.on { opacity: 1; }
.xray-marker { z-index: 60; width: 0; height: 0; cursor: pointer; }
.xray-marker .xm-ring {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px;
  border-radius: 50%; border: 3px solid; background: rgba(6, 8, 12, 0.75);
  box-shadow: 0 0 10px rgba(232, 194, 110, 0.35); box-sizing: border-box;
  transition: transform 0.15s ease;
}
.xray-marker:hover .xm-ring, .xray-marker.hl .xm-ring { transform: scale(1.45); }
.xray-marker .xm-pulse {
  position: absolute; left: -13px; top: -13px; width: 26px; height: 26px;
  border-radius: 50%; border: 2px solid rgba(232, 194, 110, 0.9);
  animation: xmPulse 2s ease-out infinite;
}
@keyframes xmPulse {
  0% { transform: scale(0.4); opacity: 0.85; }
  70% { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
.xray-owner-link {
  color: var(--gold); cursor: pointer; border-bottom: 1px dashed rgba(232,194,110,0.45);
  display: inline-flex; align-items: center; gap: 4px; transition: border-color 0.15s;
}
.xray-owner-link svg { opacity: 0.55; flex: none; }
.xray-owner-link:hover { border-bottom-color: var(--gold); }
.xray-owner-link:hover svg { opacity: 1; }
.xray-eyebrow {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--gold); margin-bottom: 3px;
}
.xray-stats {
  display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 9px 16px; font-size: var(--fs-2xs);
  color: var(--text-3); border-bottom: 1px solid var(--glass-border);
}
.xray-stats b { color: var(--text); font-weight: 700; }
.xray-legend { flex-basis: 100%; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); opacity: 0.8; }
.xray-group { border-bottom: 1px solid var(--glass-border); }
.xray-group-head { padding: 11px 16px 7px; }
.xray-group-name { font-weight: 700; font-size: var(--fs-sm); }
.xray-variants {
  font-size: var(--fs-3xs, 0.6rem); font-weight: 600; color: var(--text-3);
  border: 1px solid var(--glass-border); border-radius: 8px; padding: 1px 6px;
  vertical-align: 2px; cursor: help;
}
.xray-group-reason { font-size: var(--fs-2xs); color: var(--gold); margin-top: 2px; }
.xray-group-reason.seed { color: var(--text-3); }
.xray-caution { font-size: var(--fs-3xs, 0.6rem); color: #e8a33d; margin-top: 3px; line-height: 1.4; }
.xray-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 16px; cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.03); transition: background 0.15s;
}
.xray-row:hover, .xray-row.hl { background: rgba(232,194,110,0.08); }
/* A parcel with no coordinates has nowhere to fly to — it must not offer the
   pointer that promises a map move */
.xray-row-nogeo { cursor: default; opacity: 0.7; }
.xray-row-nogeo:hover { background: transparent; }
.xray-row.flash { animation: xrayFlash 0.9s ease; }
@keyframes xrayFlash { 0%, 40% { background: rgba(232,194,110,0.28); } 100% { background: rgba(232,194,110,0.08); } }
.xray-ring {
  width: 11px; height: 11px; border-radius: 50%; border: 2.5px solid;
  background: rgba(0,0,0,0.3); flex: none; box-sizing: border-box;
}
.xray-row-main { flex: 1; min-width: 0; }
.xray-row-addr { font-size: var(--fs-xs); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xray-row-sub { font-size: var(--fs-2xs); color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xray-st { font-size: var(--fs-3xs, 0.6rem); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; flex: none; }
.xray-hubs {
  padding: 10px 16px; font-size: var(--fs-2xs); color: var(--text-3);
  border-top: 1px solid var(--glass-border); line-height: 1.5;
}
.xray-hubs b { color: var(--text-2); }
.xray-stage {
  --stc: #8a97ad;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; color: var(--stc); background: color-mix(in srgb, var(--stc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--stc) 45%, transparent);
  border-radius: 9px; padding: 2px 8px; flex: none; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Real Streak chip: solid background + Streak's own text color (1:1 look) */
.xray-stage.xs-solid { border: none; padding: 3px 9px; }
.xray-warn {
  margin: 10px 12px 2px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(232, 163, 61, 0.45); background: rgba(232, 163, 61, 0.09);
}
.xray-warn-head { font-size: var(--fs-xs); font-weight: 700; color: #e8a33d; }
.xray-warn-sub { font-size: var(--fs-2xs); color: var(--text-2); margin: 3px 0 7px; line-height: 1.45; }
.xray-streak-strip {
  margin: 10px 12px 2px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); font-size: var(--fs-2xs); color: var(--text-3);
}
.xray-box-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 0; min-width: 0;
  font-size: var(--fs-2xs); color: var(--text-2);
}
.xray-box-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.xray-box-open { color: inherit; text-decoration: none; }
a.xray-box-open:hover { color: var(--gold); text-decoration: underline; }
.xray-box-cta { display: flex; align-items: center; gap: 8px; padding: 6px 16px 0; }
.xray-box-cta-sub { font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); }
.xray-cl-text {
  display: block; width: calc(100% - 32px); margin: 8px 16px 0;
  background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
  border-radius: 8px; padding: 8px 10px; font-size: var(--fs-2xs);
  color: var(--text); resize: vertical; font-family: inherit; line-height: 1.5;
}
.xray-cl-text:focus { outline: none; border-color: var(--gold); }
.xray-cl-row { display: flex; align-items: center; gap: 10px; padding: 7px 16px 0; font-size: var(--fs-2xs); color: var(--text-3); flex-wrap: wrap; }
.xray-cl-tag { display: flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text-2); }
.xray-cl-tag input { accent-color: var(--gold); }
.xray-box-why { color: var(--text-3); flex: none; margin-left: auto; font-size: var(--fs-3xs, 0.6rem); }
.xray-maybe { margin: 8px 12px 2px; font-size: var(--fs-2xs); color: var(--text-3); }
.xray-maybe summary { cursor: pointer; padding: 4px 0; }
.xray-new { border-bottom: 2px solid rgba(255,255,255,0.14); }
.xray-new-head {
  padding: 11px 16px 2px; font-size: var(--fs-sm); font-weight: 700; color: #e8edf7;
}
.xray-new-meta { padding: 0 16px 7px; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); }
.xray-new-empty { padding: 4px 16px 12px; font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.5; }
.xray-ring-new { border-color: #cfd8e6; border-style: dashed; }
.xray-snipe-btn { font-size: var(--fs-3xs, 0.6rem); padding: 3px 9px; flex: none; color: var(--gold); }
.xray-marker.xm-new .xm-ring { border-style: dashed; border-color: #cfd8e6; box-shadow: 0 0 10px rgba(207, 216, 230, 0.4); }
.xray-marker.xm-new .xm-pulse { border-color: rgba(207, 216, 230, 0.85); }

/* ── Panel sections: three labeled bands, one visual language ── */
.xray-sec { padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.xray-sec:last-child { border-bottom: none; }
.xray-sec-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 14px 16px 6px;
  font-size: var(--fs-2xs); font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--gold);
}
.xray-sec-head::before {
  content: ''; width: 3px; height: 11px; border-radius: 2px;
  background: var(--gold); opacity: 0.85; align-self: center; flex: none;
}
.xray-sec-sub {
  font-weight: 500; letter-spacing: 0.2px; text-transform: none;
  font-size: var(--fs-3xs, 0.6rem); color: var(--text-3);
}
.xray-sec .xray-warn { margin-top: 4px; }
.xray-sec .xray-streak-strip { margin-top: 2px; }

/* ── True Owner (F2) section ── */
.xray-to .xray-msg { padding: 8px 16px 4px; }
.xray-to-why { margin-top: 2px; }
.xray-to-why summary {
  cursor: pointer; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3);
  padding: 2px 0; user-select: none;
}
.xray-to-why summary:hover { color: var(--gold); }
.xray-group-counts { color: var(--text-3); font-weight: 500; }
.xray-to-empty { padding: 4px 16px 6px; font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.5; }
.xray-to-chip {
  display: inline-block; margin: 4px 16px 2px; padding: 3px 10px; border-radius: 20px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 700; letter-spacing: 0.3px;
  background: rgba(255,255,255,0.07); color: var(--text-2);
}
.xray-to-chip.ok { background: rgba(76,175,80,0.16); color: #7fd685; }
.xray-to-chip.no { background: rgba(255,255,255,0.07); color: var(--text-3); }
.xray-to-chip.auto { background: rgba(232,194,110,0.14); color: var(--gold); }
.xray-to-cand {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 16px;
  cursor: pointer; border-top: 1px solid var(--glass-border);
}
.xray-to-cand:hover { background: rgba(232,194,110,0.06); }
.xray-to-check { margin-top: 3px; accent-color: var(--gold); flex: none; }
.xray-to-main { flex: 1; min-width: 0; }
.xray-to-name { font-size: var(--fs-xs); font-weight: 700; }
.xray-to-score {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 12px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 700; vertical-align: 1px;
}
.xray-to-score.hi { background: rgba(76,175,80,0.16); color: #7fd685; }
.xray-to-score.mid { background: rgba(232,194,110,0.14); color: var(--gold); }
.xray-to-score.lo { background: rgba(255,255,255,0.08); color: var(--text-3); }
.xray-to-ev { font-size: var(--fs-2xs); color: var(--text-2); line-height: 1.45; margin-top: 3px; }
.xray-to-lyr { color: var(--gold); font-weight: 700; margin-right: 5px; }
.xray-to-together { font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); margin-top: 3px; font-style: italic; }
.xray-to-contacts { font-size: var(--fs-2xs); color: var(--text-3); margin-top: 4px; line-height: 1.6; }
.xray-to-correct { color: #7fd685; font-weight: 700; margin-right: 6px; }
.xray-to-actions { display: flex; gap: 8px; padding: 10px 16px 0; }
.xray-to-note { padding: 6px 16px 0; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); line-height: 1.45; }
.xray-to-mini { font-size: var(--fs-3xs, 0.6rem); padding: 2px 9px; vertical-align: 1px; }
.xray-to-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 12px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 700; vertical-align: 1px;
  background: rgba(255,255,255,0.08); color: var(--text-3);
}
.xray-to-badge.dead { background: rgba(244,67,54,0.14); color: #ef9a9a; }
.xray-to-addrow { display: flex; gap: 8px; padding: 8px 16px 0; align-items: center; }
.xray-to-addinput {
  flex: 1; min-width: 0; background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border); border-radius: 8px;
  padding: 5px 10px; font-size: var(--fs-2xs); color: var(--text);
}
.xray-to-addinput:focus { outline: none; border-color: var(--gold); }
.xray-to-src { margin-top: 3px; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); opacity: 0.85; }
.xray-more summary {
  cursor: pointer; padding: 9px 16px; font-size: var(--fs-2xs); font-weight: 700;
  color: var(--gold); border-bottom: 1px solid var(--glass-border);
}
.xray-more summary:hover { background: rgba(232,194,110,0.06); }
.xray-msg { padding: 26px 18px; font-size: var(--fs-xs); color: var(--text-3); line-height: 1.55; }
.xray-msg.err { color: var(--red); }
.xray-scan {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--gold); border-top-color: transparent; margin-right: 8px;
  animation: xraySpin 0.8s linear infinite; vertical-align: -1px;
}
@keyframes xraySpin { to { transform: rotate(360deg); } }
.xray-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 16px; border-top: 1px solid var(--glass-border);
}
.xray-footer:empty { display: none; }
.xray-hint { font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); }
@media (max-width: 768px) { .xray-sidebar { width: 100%; } }

/* ═══ Lasso-snipe (review panel + chip button) ═══ */
.snipe-chip-lasso.active { background: rgba(232,194,110,0.22); border-color: #e8c26e; color: #e8c26e; }
.lasso-panel { z-index: 215; } /* above the xray sidebar slot it shares */
.lasso-head-stats { font-size: var(--fs-sm); font-weight: 700; margin-top: 2px; }
.lasso-head-skipped { font-size: var(--fs-2xs); color: var(--text-3); margin-top: 2px; }
.lasso-skiptagged { padding: 8px 16px; border-bottom: 1px solid var(--glass-border); }
.lasso-skiptagged .btn { font-size: var(--fs-2xs); padding: 4px 10px; color: #ef9a9a; }
.lasso-body { flex: 1; overflow-y: auto; scrollbar-width: thin; padding: 4px 0 8px; }
.lasso-group { border-bottom: 1px solid rgba(255,255,255,0.04); padding: 8px 16px 6px; }
.lasso-group-head { display: flex; align-items: flex-start; gap: 9px; }
.lasso-group-head > input { margin-top: 3px; accent-color: #e8c26e; }
.lasso-group-owner { min-width: 0; flex: 1; }
.lasso-owner-name { font-size: var(--fs-md); font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.lasso-xray-btn {
  background: none; border: none; color: #e8c26e; cursor: pointer;
  font-size: var(--fs-sm); padding: 0 2px; vertical-align: -1px;
}
.lasso-xray-btn:hover { text-shadow: 0 0 8px rgba(232,194,110,0.6); }
.lasso-owner-meta { font-size: var(--fs-2xs); color: var(--text-3); margin-top: 1px; }
.lasso-owner-badges { margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.lasso-badge {
  display: inline-block; padding: 1px 7px; border-radius: 9px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 600; letter-spacing: 0.2px;
  background: rgba(255,255,255,0.06); color: var(--text-2);
}
.lasso-badge.insys { background: rgba(3,169,244,0.13); color: #81d4fa; }
.lasso-badge.streak { background: rgba(255,255,255,0.08); color: var(--text-2); }
.lasso-badge.to { background: rgba(232,194,110,0.14); color: #e8c26e; }
.lasso-badge.tagauto { background: rgba(244,67,54,0.16); color: #ef9a9a; }
.lasso-badge.tagsug { background: rgba(232,163,61,0.14); color: #e8a33d; }
.lasso-badge.tagover { background: rgba(255,255,255,0.05); color: var(--text-3); font-weight: 500; }
.lasso-parcel {
  display: flex; align-items: center; gap: 8px; padding: 3px 0 3px 26px;
  font-size: var(--fs-2xs); cursor: pointer; border-radius: 5px;
}
.lasso-parcel:hover { background: rgba(255,255,255,0.04); }
.lasso-parcel.off { opacity: 0.45; }
.lasso-parcel input { accent-color: #e8c26e; }
.lasso-parcel-addr { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lasso-parcel-meta { color: var(--text-3); font-family: var(--mono); font-size: var(--fs-3xs, 0.6rem); flex: none; }
.lasso-sechead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 10px 16px 6px; border-bottom: 1px solid var(--glass-border);
  font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-2);
}
.lasso-sechead em { font-style: normal; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-3); }
.lasso-sechead-toggle { cursor: pointer; margin-top: 6px; }
.lasso-sechead-toggle:hover { color: var(--text); }
.lasso-chevron { color: var(--text-3); font-size: var(--fs-3xs, 0.6rem); }
.lasso-ex-note { padding: 6px 16px 2px; font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); line-height: 1.4; }
.lasso-ex-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 16px;
  font-size: var(--fs-2xs); cursor: pointer; opacity: 0.75;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.lasso-ex-row:hover { background: rgba(255,255,255,0.04); opacity: 1; }
.lasso-ex-row.noforce { cursor: default; }
.lasso-ex-row.on { opacity: 1; background: rgba(232,194,110,0.07); }
.lasso-ex-row input { accent-color: #e8c26e; }
.lasso-ex-dot { color: var(--text-3); width: 13px; text-align: center; flex: none; }
.lasso-ex-owner { color: var(--text-3); }
.lasso-ex-chip {
  flex: none; padding: 1px 7px; border-radius: 9px;
  font-size: var(--fs-3xs, 0.6rem); font-weight: 600;
  background: rgba(255,255,255,0.06); color: var(--text-2);
}
.lasso-ex-chip.lead { background: rgba(76,175,80,0.14); color: #a5d6a7; }
.lasso-ex-chip.sniped { background: rgba(232,194,110,0.15); color: #e8c26e; }
.lasso-ex-chip.queued { background: rgba(255,255,255,0.08); color: var(--text-2); }
.lasso-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 16px; border-top: 1px solid var(--glass-border);
}
.lasso-foot-note { font-size: var(--fs-3xs, 0.6rem); color: var(--text-3); line-height: 1.35; }
.lasso-foot-btns { display: flex; gap: 8px; flex: none; }
.lasso-queue-btn { background: #e8c26e; border-color: #e8c26e; color: #1a1918; font-weight: 700; }
.lasso-queue-btn:hover:not(:disabled) { background: #f0d08a; }
.lasso-queue-btn:disabled { opacity: 0.5; cursor: default; }
/* Temporary marks on caught parcels while the review is open (Regrid-style):
   click toggles the parcel in/out, in lockstep with the panel checkboxes */
.lasso-mark {
  width: 19px; height: 19px; border-radius: 50%; box-sizing: border-box; cursor: pointer;
  border: 2.5px solid #3ce0ff; background: rgba(8, 12, 16, 0.6);
  box-shadow: 0 0 7px rgba(60, 224, 255, 0.55);
  display: flex; align-items: center; justify-content: center;
  color: #3ce0ff; font-size: 11px; font-weight: 700; line-height: 1;
  transition: transform 0.12s ease;
  z-index: 45;
}
.lasso-mark::after { content: '✓'; }
.lasso-mark:hover { transform: scale(1.3); }
.lasso-mark.off {
  border-style: dashed; border-color: rgba(255, 255, 255, 0.5);
  background: rgba(8, 12, 16, 0.35); box-shadow: none; color: transparent;
}
@media (max-width: 768px) { .lasso-panel { width: 100%; } }

/* ═══ Zoning intelligence (map legend + review tab + evidence card) ═══ */
.zn-legend { position: fixed; bottom: 16px; left: 68px; z-index: 150; width: 250px;
  background: var(--glass-heavy); backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: var(--fs-xs); color: var(--text-2);
  transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s; }
.zn-legend.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.zn-legend-head { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.zn-legend select { width: 100%; margin: 2px 0 8px; font-size: var(--fs-xs); background: var(--bg-2); color: var(--text); border: 1px solid var(--glass-border); border-radius: 6px; padding: 5px 6px; }
.zn-swatches { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0; }
.zn-swatch { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--text-2); }
.zn-swatch i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.zn-legend-tiers { color: var(--text-3); margin-top: 6px; }
.zn-legend-note { color: var(--text-3); margin-top: 6px; border-top: 1px solid var(--glass-border); padding-top: 6px; }
.zn-tier { cursor: help; }
.zn-banner { padding: 7px 10px; border-radius: 8px; margin: 8px 0; font-size: var(--fs-xs); color: var(--text); }
.zn-banner.zn-tier-verified { background: rgba(110,232,160,0.12); }
.zn-banner.zn-tier-auto { background: rgba(232,194,110,0.12); }
.zn-banner.zn-tier-none { background: rgba(255,255,255,0.05); }
.zn-matrix { width: 100%; border-collapse: collapse; margin: 6px 0; }
.zn-matrix td { padding: 4px 6px; border-bottom: 1px solid var(--glass-border); font-size: var(--fs-xs); color: var(--text-2); }
.zn-cite { margin: 10px 0; }
.zn-cite blockquote { margin: 4px 0; padding: 7px 10px; border-left: 3px solid var(--accent); background: rgba(255,255,255,0.04); font-size: var(--fs-xs); color: var(--text-2); white-space: pre-wrap; max-height: 170px; overflow-y: auto; border-radius: 0 6px 6px 0; }
.zn-cite-ref { font-weight: 600; font-size: var(--fs-xs); color: var(--text); }
.zn-cite-warn { color: #e87a6e; font-weight: 400; }
.zn-cite a { color: var(--accent); font-size: var(--fs-xs); }
.zn-conditions, .zn-rationale { font-size: var(--fs-xs); margin: 6px 0; color: var(--text-3); }
.zn-disclaimer { font-size: 10.5px; color: var(--text-3); margin-top: 10px; border-top: 1px solid var(--glass-border); padding-top: 6px; }
/* Solid, fully opaque surfaces — these float over the map, and ordinance
   text is unreadable through a glass wash of green parcels. */
.zn-modal, .zn-lookup { background: var(--bg-2); border: 1px solid var(--glass-border); box-shadow: var(--shadow-lg); border-radius: var(--radius); }
.zn-modal { max-width: 560px; max-height: 80vh; overflow-y: auto; padding: 16px 18px; }
.zn-card-head { color: var(--text); }
.zn-card-jur { color: var(--text-3); font-weight: 400; font-size: var(--fs-xs); }
.zn-absent { color: var(--text-3); }
.zn-pop-line { cursor: pointer; }
.zn-rev-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.zn-rev-toolbar select { background: var(--bg-2); color: var(--text); border: 1px solid var(--glass-border); border-radius: 6px; padding: 5px 8px; font-size: var(--fs-xs); }
.zn-rev-count { color: var(--text-3); font-size: var(--fs-xs); }
.zn-rev-split { display: grid; grid-template-columns: minmax(230px, 1fr) 2fr; gap: 14px; align-items: start; }
.zn-rev-list { max-height: 68vh; overflow-y: auto; border: 1px solid var(--glass-border); border-radius: var(--radius); }
.zn-rev-row { padding: 9px 11px; border-bottom: 1px solid var(--glass-border); cursor: pointer; font-size: var(--fs-xs); color: var(--text-2); }
.zn-rev-row.active { background: var(--accent-dim); }
.zn-rev-row b { color: var(--text); }
.zn-rev-jur { color: var(--text-3); font-size: 10.5px; }
.zn-rev-flag { color: #e87a6e; font-size: 10.5px; }
.zn-rev-detail { border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 14px; max-height: 68vh; overflow-y: auto; background: rgba(255,255,255,0.02); }
.zn-rev-empty { padding: 18px; color: var(--text-3); }
.zn-rev-meta { font-size: 10.5px; color: var(--text-3); margin: 4px 0 8px; }
.zn-rev-actions { margin-top: 12px; display: flex; gap: 8px; }
.zn-rev-help { margin-top: 8px; font-size: 10.5px; color: var(--text-3); }
@media (max-width: 800px) { .zn-rev-split { grid-template-columns: 1fr; } .zn-legend { left: 10px; bottom: 76px; } }

/* ═══ Zoning lookup modal (map-independent instant list) ═══ */
.zn-lookup { max-width: 620px; width: 92vw; max-height: 84vh; display: flex; flex-direction: column; padding: 0; }
.zn-lk-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--glass-border); }
.zn-lk-head b { color: var(--accent); text-transform: uppercase; letter-spacing: 0.8px; font-size: var(--fs-xs); }
.zn-lk-x { background: rgba(255,255,255,0.05); color: var(--text-2); border: none; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
.zn-lk-controls { display: flex; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.zn-lk-controls select, .zn-lk-controls input { background: var(--bg-2); color: var(--text); border: 1px solid var(--glass-border); border-radius: 7px; padding: 8px 10px; font-size: var(--fs-sm); flex: 1 1 auto; min-width: 120px; }
.zn-lk-summary { padding: 4px 16px 8px; font-size: var(--fs-xs); color: var(--text-3); }
.zn-lk-list { flex: 1 1 auto; overflow-y: auto; padding: 0 8px 8px; }
.zn-lk-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--glass-border); cursor: pointer; border-radius: 6px; }
.zn-lk-dotcol { white-space: nowrap; }
/* Verdict always sits in the last column, whether or not a dots column is
   present in this row — right edge stays aligned across mixed lists. */
.zn-lk-row .zn-lk-v { grid-column: 4; }
.zn-lk-row:hover { background: var(--accent-dim); }
.zn-lk-code { font-weight: 700; color: var(--text); font-size: var(--fs-sm); }
.zn-lk-name { color: var(--text-3); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zn-lk-v { justify-self: end; white-space: nowrap; }
.zn-lookup .zn-disclaimer { margin: 0; padding: 8px 16px 14px; }
@media (max-width: 640px) { .zn-lk-row { grid-template-columns: 60px 1fr auto; } .zn-lk-name { display: none; } .zn-lk-row .zn-lk-v { grid-column: 3; } }

/* Zoning lookup — search row + city+verdict result names */
.zn-lk-searchrow { padding: 0 16px 10px; }

/* ── Zoning readability layer (standard for every market) ── */
/* 9-dot IOS profile strip — one dot per use type, verdict-colored. */
.zn-dots { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.zn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; opacity: 0.9; }
.zn-dot-lens { outline: 1.5px solid var(--text); outline-offset: 1px; }
/* IOS-open chip in the city tree */
.zn-ioschip { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; color: #2e9e5b; background: rgba(46,158,91,0.13); border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.zn-ioschip-none { color: var(--text-3); background: rgba(255,255,255,0.05); font-weight: 400; }
.zn-state-ios { color: #2e9e5b; font-weight: 600; }
/* Filter chips (All / Opportunities) */
.zn-lk-filters { float: right; display: inline-flex; gap: 6px; }
.zn-filter { cursor: pointer; padding: 2px 10px; border-radius: 10px; font-size: 10.5px; color: var(--text-3); background: rgba(255,255,255,0.05); }
.zn-filter.active { color: var(--text); background: var(--accent-dim); font-weight: 600; }
/* Evidence card: per-use collapsible sections */
.zn-purpose { font-size: var(--fs-xs); color: var(--text-3); margin: 6px 0 2px; max-height: 72px; overflow-y: auto; }
.zn-uses { margin: 8px 0; }
.zn-use { border-bottom: 1px solid var(--glass-border); }
.zn-use summary { display: flex; align-items: center; gap: 8px; padding: 7px 4px; cursor: pointer; list-style: none; }
.zn-use summary::-webkit-details-marker { display: none; }
.zn-use-label { flex: 1 1 auto; font-size: var(--fs-xs); color: var(--text); }
.zn-use-caret { color: var(--text-3); transition: transform 0.15s; }
.zn-use[open] .zn-use-caret { transform: rotate(90deg); }
.zn-use-body { padding: 2px 4px 10px 12px; border-left: 2px solid var(--glass-border); margin: 0 0 8px 4px; }
.zn-use-empty { display: flex; align-items: center; gap: 8px; padding: 7px 4px; }
.zn-use-empty .zn-use-label { flex: 1 1 auto; font-size: var(--fs-xs); color: var(--text-3); }
@media (max-width: 640px) { .zn-dots, .zn-lk-dotcol { display: none; } .zn-lk-filters { float: none; display: flex; margin-top: 4px; } }
.zn-lk-searchrow input { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--glass-border); border-radius: 8px; padding: 10px 12px; font-size: var(--fs-sm); }
.zn-lk-searchrow input:focus { border-color: var(--accent); outline: none; }
.zn-lk-name b { color: var(--text-2); font-weight: 600; }

/* Zoning Intelligence — coverage tree · city view · grouped search */
.zn-lk-controls input { flex: 2 1 200px; }
.zn-lk-controls input:focus { border-color: var(--accent); outline: none; }
.zn-lk-crumb { flex: 1 1 auto; margin: 0 10px; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zn-lk-back { color: var(--accent); cursor: pointer; font-weight: 600; }
.zn-lk-back:hover { text-decoration: underline; }
.zn-lk-crumb-city { color: var(--text-2); margin-left: 6px; font-weight: 600; }
.zn-lk-state { position: sticky; top: 0; z-index: 2; background: var(--glass-heavy); backdrop-filter: blur(6px);
  padding: 8px 10px 5px; font-weight: 700; color: var(--accent); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--glass-border); }
.zn-lk-state span { color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.zn-lk-city { display: grid; grid-template-columns: minmax(110px, 1fr) auto auto auto 14px; align-items: center; gap: 10px;
  padding: 10px 10px; border-bottom: 1px solid var(--glass-border); cursor: pointer; border-radius: 6px; }
.zn-lk-city:hover { background: var(--accent-dim); }
.zn-lk-cityname { font-weight: 600; color: var(--text); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zn-lk-meta { color: var(--text-3); font-size: var(--fs-xs); white-space: nowrap; }
.zn-lk-go { color: var(--text-3); font-size: 15px; text-align: right; }
.zn-chip { font-size: 10px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 10px; white-space: nowrap; }
.zn-chip-full { color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(232,194,110,0.35); }
.zn-chip-ord { color: var(--blue); background: var(--blue-dim); border: 1px solid rgba(110,168,232,0.35); }
.zn-cat-head, .zn-lk-grouphead { position: sticky; top: 0; z-index: 2; background: var(--glass-heavy); backdrop-filter: blur(6px);
  padding: 8px 10px 5px; font-weight: 700; color: var(--text-2); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid var(--glass-border); }
.zn-cat-head span, .zn-lk-grouphead span { color: var(--text-3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.zn-lk-sumchips { margin-left: 8px; }
.zn-lk-ordlink { color: var(--accent); }
.zn-covkey i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: baseline; }
@media (max-width: 640px) { .zn-lk-city { grid-template-columns: 1fr auto auto 14px; } .zn-lk-meta { display: none; } }
.zn-use-hint { color: var(--text-3); font-size: 10px; white-space: nowrap; }
.zn-use summary:hover { background: var(--accent-dim); border-radius: 6px; }

/* ── Lease comp classification (comps normalization, Jul 2026) ── */
.type-pill-caret {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  padding: 4px 5px; margin-left: -4px; border-radius: 6px;
  display: inline-flex; align-items: center;
}
.type-pill-caret:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.type-pill-caret.filtering { color: var(--accent); }

.lease-class-dropdown {
  z-index: 900; background: var(--glass-heavy); backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border); border-radius: var(--radius-sm);
  padding: 8px 0; min-width: 230px; box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.lcd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lcd-count { color: var(--text-3); font-size: var(--fs-2xs); }

.pop-cls {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
  padding: 2px 7px; border-radius: 999px; border: 1px solid;
}

/* Comp Display admin editor */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cd-card { border: 1px solid var(--glass-border); border-radius: 10px; padding: 12px; }
.cd-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cd-card-head input[type=color] {
  width: 26px; height: 26px; padding: 0; border: 1px solid var(--glass-border);
  border-radius: 6px; background: none; cursor: pointer;
}
.cd-lines { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.cd-line { display: flex; align-items: center; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-2); }
.cd-line label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.cd-line input { accent-color: var(--accent); }
.cd-move button {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  font-size: 9px; padding: 2px 4px;
}
.cd-move button:hover:not(:disabled) { color: var(--text); }
.cd-move button:disabled { opacity: 0.25; cursor: default; }
.cd-preview {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(0,0,0,0.45); border-radius: 8px; padding: 10px 12px;
}
.cd-preview-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; margin-top: 2px; border: 1.5px solid rgba(255,255,255,0.6); }
.cd-preview-text { font-size: 11px; line-height: 1.3; font-weight: 600; text-shadow: 0 0 3px rgba(0,0,0,0.9); }

/* Sidebar category labels + table class badge (comps normalization, round 2) */
.sb-cat {
  font-size: 7.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); opacity: 0.8; margin: 7px 0 1px; user-select: none; pointer-events: none;
}
.sb-cat:first-child { margin-top: 0; }
.table-cls {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: var(--fs-2xs); font-weight: 600; color: var(--cls-color);
  background: color-mix(in srgb, var(--cls-color) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--cls-color) 35%, transparent);
  white-space: nowrap;
}

/* Table advanced search */
.tbl-search-wrap {
  display: flex; align-items: center; gap: 6px; flex: 1; max-width: 520px;
  margin-left: 14px; padding: 5px 10px; border: 1px solid var(--glass-border);
  border-radius: 8px; background: rgba(255,255,255,0.03); color: var(--text-3);
}
.tbl-search-wrap:focus-within { border-color: var(--accent); color: var(--text-2); }
.tbl-search {
  flex: 1; background: none; border: none; outline: none; color: var(--text);
  font-size: var(--fs-sm); font-family: inherit; min-width: 0;
}
.tbl-search::placeholder { color: var(--text-3); opacity: 0.7; }
.tbl-search-clear, .tbl-search-help {
  background: none; border: none; color: var(--text-3); cursor: pointer;
  font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 4px; flex: none;
}
.tbl-search-clear:hover, .tbl-search-help:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.tbl-search-help { font-size: 10px; font-weight: 700; border: 1px solid var(--glass-border); border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }
.search-help-pop { padding: 8px 0 10px; }
.search-help-pop .sh-row { padding: 3px 14px; font-size: var(--fs-xs); color: var(--text-2); line-height: 1.5; }
.search-help-pop code {
  background: rgba(255,255,255,0.07); border-radius: 4px; padding: 0 5px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--accent);
}

/* ── Table view polish ── */
/* Solid row backgrounds (zebra/hover/selected) so the sticky address column
   can match them exactly — rgba-over-transparent can't be replicated on a
   sticky cell that must fully cover scrolling content behind it. */
.comp-table th {
  font-size: 10px; letter-spacing: 0.9px; color: var(--text-3);
  padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.comp-table th:hover { color: var(--text-2); }
.comp-table th.th-sorted { color: var(--accent); }
.comp-table th.th-r { text-align: right; }
.comp-table td { padding: 8px 12px; font-size: var(--fs-sm); }
.comp-table td.td-r { text-align: right; }
.comp-table tbody tr td { background: var(--bg); }
.comp-table tbody tr:nth-child(even) td { background: #1e1d1b; }
.comp-table tbody tr:hover td { background: #26241f; }
.comp-table tbody tr.row-selected td { background: #2b2618; }
.comp-table tbody tr.row-selected:hover td { background: #322c1c; }
.comp-table tbody tr.row-focus td { background: #26241f; }

/* Sticky checkbox + address columns — keep orientation while scrolling wide */
.comp-table th:nth-child(1), .comp-table td:nth-child(1) {
  position: sticky; left: 0; z-index: 5;
}
.comp-table th:nth-child(2), .comp-table td:nth-child(2) {
  position: sticky; left: 36px; z-index: 5;
  box-shadow: 10px 0 14px -12px rgba(0,0,0,0.9);
}
.comp-table thead th:nth-child(1), .comp-table thead th:nth-child(2) { z-index: 12; }

/* Tighter, calmer topbar */
.table-topbar { gap: 10px; }
.table-topbar h3 { font-size: var(--fs-base); font-weight: 700; flex: none; white-space: nowrap; }

/* ── Sale = magenta diamond identity + lasso/finder class-mix chips ── */
.legend-diamond {
  width: 10px; height: 10px; background: var(--sale); border-radius: 2px;
  transform: rotate(45deg); display: inline-block; flex: none; margin: 0 3px;
}
.da-clsmix { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 14px 2px; }
.da-clsmix-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-2xs); color: var(--text-2); white-space: nowrap;
}
.da-hidden-note {
  padding: 6px 14px 0; font-size: var(--fs-2xs); color: var(--text-3); font-style: italic;
}
.radius-metric-label .lcd-dot { vertical-align: baseline; display: inline-block; }

/* ── Stacked-comp chooser (lease dot under a sale diamond at one point) ── */
.chooser-title {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-2); padding: 2px 2px 8px;
}
.chooser-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 8px; background: none; border: 1px solid transparent;
  border-radius: 8px; cursor: pointer; text-align: left;
}
.chooser-row:hover { background: rgba(255,255,255,0.06); border-color: var(--glass-border); }
.chooser-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.chooser-dot.diamond { border-radius: 2px; transform: rotate(45deg); width: 9px; height: 9px; }
.chooser-main { display: flex; flex-direction: column; min-width: 0; }
.chooser-addr {
  font-size: 0.78rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px;
}
.chooser-sub { font-size: 0.66rem; color: var(--text-3); }

/* ── Data Health ── */
.dh-group-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--text-3); margin: 20px 0 10px;
}
.dh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.dh-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.dh-card:hover { border-color: rgba(232,194,110,0.45); transform: translateY(-1px); }
.dh-card.active { border-color: var(--accent); }
.dh-card.clean { opacity: 0.55; }
.dh-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dh-sev { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dh-count { font-size: 1.25rem; font-weight: 800; font-family: var(--mono); }
.dh-acked { margin-left: auto; font-size: 0.62rem; color: var(--text-3); }
.dh-label { font-size: 0.8rem; font-weight: 700; margin-bottom: 4px; }
.dh-why { font-size: 0.66rem; color: var(--text-3); line-height: 1.4; }
.dh-type {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 5px; font-size: 0.62rem; font-weight: 800;
}
.dh-type.lease { background: rgba(59,130,246,0.18); color: #7eb3f7; }
.dh-type.sale { background: var(--sale-dim); color: #f472b6; }
.dh-cls {
  display: inline-block; padding: 1px 8px; border-radius: 9px; font-size: 0.66rem;
  font-weight: 700; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c);
}
.dh-btn { font-size: 0.64rem; padding: 2px 9px; }
.dh-states { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.dh-state-chip {
  font-size: 0.68rem; padding: 3px 9px; border-radius: 8px;
  background: rgba(110,168,232,0.12); color: var(--text-2); border: 1px solid var(--glass-border);
}
.dh-state-chip b { color: var(--text); margin-left: 2px; }
.dh-group-desc { font-size: 0.68rem; color: var(--text-3); margin: -6px 0 10px; max-width: 680px; line-height: 1.4; }
.dh-share { font-size: 0.6rem; color: var(--text-3); margin-left: 2px; }
.dh-state-chip { cursor: pointer; transition: border-color 0.12s; }
.dh-state-chip:hover { border-color: rgba(232,194,110,0.5); }
.dh-state-chip.active { border-color: var(--accent); color: var(--text); background: rgba(232,194,110,0.14); }

/* Lasso panel hero action */
.da-btn-hero {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px 14px; margin: 4px 0 10px;
  background: linear-gradient(135deg, #e8c26e, #d4a843); color: #1a1918;
  border: none; border-radius: 10px; font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.3px; cursor: pointer; transition: filter 0.15s, transform 0.15s;
}
.da-btn-hero:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ── Comp entry (Theresin spec 25.7) ── */
.calc-tag {
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase;
  color: var(--text-3); background: rgba(255,255,255,0.06); border-radius: 8px; padding: 1px 6px; margin-left: 5px;
}
input.ro { opacity: 0.75; cursor: default; background: rgba(255,255,255,0.03) !important; }
.prefix-wrap, .suffix-wrap { position: relative; display: flex; align-items: center; }
.prefix-wrap .prefix {
  position: absolute; left: 10px; color: var(--text-3); font-size: var(--fs-xs); pointer-events: none;
}
.prefix-wrap input { padding-left: 22px; width: 100%; }
.suffix-wrap .suffix {
  position: absolute; right: 10px; color: var(--text-3); font-size: var(--fs-2xs); pointer-events: none;
}
.suffix-wrap input { padding-right: 30px; width: 100%; }
.be-strip { display: flex; gap: 8px; margin: 4px 0 10px; flex-wrap: wrap; }
.be-pill {
  flex: 1; min-width: 100px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border); border-radius: 10px; padding: 7px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.be-l { font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3); }
.be-v { font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; }
.disagg-rev { margin-top: 8px; }
.disagg-rev summary { cursor: pointer; font-size: var(--fs-2xs); color: var(--text-3); padding: 3px 0; }
.disagg-rev summary:hover { color: var(--gold); }
.cc-overlay {
  position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
}
.cc-card {
  width: min(420px, 92vw); background: var(--bg-2, #16161a); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 18px; box-shadow: var(--shadow-lg);
}
.cc-title { font-weight: 700; font-size: var(--fs-md); margin-bottom: 12px; }
.cc-opt {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--glass-border); margin-bottom: 8px; cursor: pointer;
}
.cc-opt.sel { border-color: var(--gold); background: rgba(232,194,110,0.07); }
.cc-opt input { accent-color: var(--gold); }
.cc-name { font-weight: 700; font-size: var(--fs-xs); }
.cc-why { color: var(--text-3); font-size: var(--fs-2xs); margin-left: auto; text-align: right; }
.cc-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ── ④ potvrda preko mailing adrese (X-ray) ──
   Neutralno dok nema pogotka; zlatno tek kad adresa POTVRDI čoveka — boja
   ovde nosi značenje, pa se ne troši na "proverio sam i nema ničega". */
.xray-to-verify { font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.55;
  border-left: 2px solid var(--glass-border); padding: 6px 0 6px 9px; margin: 8px 0; }
.xray-to-verify.hit { color: var(--text-2); border-left-color: var(--accent);
  background: rgba(232,194,110,0.05); }
.xray-to-verify.err { color: #e57373; border-left-color: #e57373; }
.xray-to-verify summary { cursor: pointer; opacity: 0.75; }

/* ── Rent Analysis sidebar ──
   The sample spreadsheet's shape, kept on purpose: same row order, same names,
   typed cells visually separated from computed ones the way its blue/black
   colouring does. The team reads this every day and the muscle memory is worth
   more than a tidier layout. */
.ra-photo { margin: 0 0 14px; }
.ra-photo img { width: 100%; border-radius: 8px; display: block; }
.ra-photo-drop {
  border: 1px dashed var(--glass-border); border-radius: 8px; padding: 22px 12px;
  text-align: center; color: var(--text-3); font-size: var(--fs-xs); cursor: pointer;
}
.ra-photo-drop span { font-size: var(--fs-2xs); opacity: 0.75; }
.ra-sec {
  font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--text-2);
  margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--glass-border);
}
.ra-row { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: var(--fs-sm); }
.ra-row label, .ra-row > span:first-child { flex: 1 1 auto; color: var(--text-2); }
.ra-row input {
  flex: 0 0 44%; text-align: right; font-family: var(--mono);
  background: var(--blue-dim); border: 1px solid transparent; border-radius: 5px;
  color: var(--blue); padding: 4px 8px; font-size: var(--fs-sm);
}
.ra-row input:focus { outline: none; border-color: var(--blue); }
.ra-row-out .ra-val { flex: 0 0 44%; text-align: right; font-family: var(--mono); color: var(--text); }
.ra-row.ra-strong { font-weight: 700; }
.ra-row.ra-strong .ra-val { color: var(--accent); }
.ra-row.ra-em > span:first-child, .ra-row.ra-em .ra-val { font-style: italic; opacity: 0.85; }
/* The sheet's yellow — worn ONLY by Yield on Cost and Entry Cap Rate. */
.ra-row.ra-hl { font-weight: 700; }
.ra-row.ra-hl .ra-val {
  background: rgba(232, 194, 110, 0.16); color: #e8c26e;
  border: 1px solid rgba(232, 194, 110, 0.35); border-radius: 5px; padding: 3px 8px;
}
/* Breathing room between logical clusters, like the sample sheet's blank rows */
.ra-gap { height: 10px; }
/* Pricing Breakdown ┆ Current Property Information, side by side (her spec) */
.ra-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin-top: 12px; }
.ra-subhead {
  font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 4px;
}
.ra-cols .ra-row { display: block; padding: 2px 0; }
.ra-cols .ra-row label, .ra-cols .ra-row > span:first-child { display: block; font-size: var(--fs-2xs); }
.ra-cols .ra-row input, .ra-cols .ra-row-out .ra-val { display: block; width: 100%; box-sizing: border-box; text-align: left; flex: none; }
.ra-notes textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 60px;
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: 6px;
  color: var(--text); font-size: var(--fs-sm); padding: 8px 10px; line-height: 1.45;
}
.ra-notes textarea:focus { outline: none; border-color: var(--blue); }
.ra-offer { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; }
.ra-offer-hint { font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.3; }
.ra-offer.on {
  font-size: var(--fs-sm); color: #6ee8a0; background: rgba(110, 232, 160, 0.08);
  border: 1px solid rgba(110, 232, 160, 0.25); border-radius: 6px; padding: 6px 10px;
  justify-content: space-between;
}
.ra-assump { margin: 20px 0 8px; border-top: 1px solid var(--glass-border); padding-top: 10px; }
.ra-assump summary {
  cursor: pointer; font-size: var(--fs-2xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-2);
}
.ra-assump p { font-size: var(--fs-2xs); color: var(--text-3); margin: 6px 0 8px; line-height: 1.45; }

/* ── "What we think it should be" ──
   Appears only on a comp carrying a market-doubt tag. Deliberately quieter
   than the recorded numbers: it is an opinion sitting next to a fact. */
.md-rates {
  flex-basis: 100%; margin-top: 8px; padding: 8px 10px;
  border: 1px solid rgba(232,145,46,0.35); border-radius: 6px;
  background: rgba(232,145,46,0.07);
}
.md-rates .md-lab {
  font-size: var(--fs-2xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--orange); margin-bottom: 6px;
}
.md-rates label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--text-2); margin-right: 12px;
}
.md-rates input {
  width: 104px; text-align: right; font-family: var(--mono);
  font-size: var(--fs-xs); padding: 3px 7px; border-radius: 4px;
  background: var(--bg-2); border: 1px solid var(--glass-border); color: var(--text);
}
.md-rates .md-by { font-size: var(--fs-3xs); color: var(--text-3); margin-top: 5px; }
.md-rates.md-ro { font-size: var(--fs-xs); color: var(--text-2); }
.md-rates.md-ro span { color: var(--text-3); }

/* The Rent Analysis tab, opened before anyone has made one. */
.ra-empty {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%);
  z-index: 5; width: min(420px, 82vw); text-align: center;
  padding: 22px 24px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: var(--blur);
}
.ra-empty-title { font-weight: 700; margin-bottom: 6px; }
.ra-empty p { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; margin: 0 0 14px; }
.ra-photo.drag .ra-photo-drop { border-color: var(--accent); color: var(--accent); }
.ra-row select {
  flex: 0 0 44%; text-align: right; font-family: var(--font);
  background: var(--blue-dim); border: 1px solid transparent; border-radius: 5px;
  color: var(--blue); padding: 4px 8px; font-size: var(--fs-sm); cursor: pointer;
}

/* Rent analysis attachments */
.ra-files-empty { font-size: var(--fs-2xs); color: var(--text-3); line-height: 1.45; padding: 4px 0 8px; }
.ra-file { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--fs-xs); }
.ra-file a { color: var(--accent); text-decoration: none; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-file span { color: var(--text-3); font-size: var(--fs-3xs); }
.ra-file button { background: none; border: none; color: var(--text-3); cursor: pointer; font-size: var(--fs-base); line-height: 1; padding: 0 2px; }
.ra-file button:hover { color: var(--red); }
.ra-file-add { font-size: var(--fs-2xs); padding: 4px 10px; margin-top: 6px; }
.ra-del { color: var(--red); }

/* Rent-analysis import review */
.rai-card { width: min(760px, 94vw); }
.rai-lead { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.5; margin: 0 0 8px; }
.rai-quiet { font-size: var(--fs-xs); color: var(--text-3); }
.rai-warn {
  font-size: var(--fs-xs); line-height: 1.5; margin: 0 0 12px; padding: 8px 10px;
  border: 1px solid rgba(232,145,46,0.35); border-radius: 6px;
  background: rgba(232,145,46,0.07); color: var(--text-2);
}
.rai-list { max-height: 46vh; overflow-y: auto; }
.rai-row { padding: 10px 0; border-top: 1px solid var(--glass-border); }
.rai-row.rai-bad { opacity: 0.75; }
.rai-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.rai-file { font-size: var(--fs-3xs); color: var(--text-3); margin: 2px 0 0 22px; }
.rai-figs { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text-2); margin: 4px 0 0 22px; }
.rai-note { font-size: var(--fs-xs); color: var(--red); margin-top: 3px; }
.rai-mms { margin: 6px 0 0 22px; }
.rai-mm { font-size: var(--fs-2xs); color: var(--orange); line-height: 1.5; }


/* ── Hover descriptions (js/tips.js) ──
   Drawn into the body so no ancestor's overflow can clip them, which is what
   killed the previous ones. */
.cm-tip {
  position: fixed; z-index: 9999; max-width: 260px;
  padding: 8px 11px; border-radius: 7px;
  background: var(--glass-heavy); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  pointer-events: none; opacity: 0; transform: translateY(-2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.cm-tip.on { opacity: 1; transform: none; }
.cm-tip-t { font-size: var(--fs-xs); font-weight: 700; color: var(--text); }
.cm-tip-d { font-size: var(--fs-2xs); color: var(--text-2); line-height: 1.45; margin-top: 3px; }
.ra-photo-acts { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.ra-photo-acts .btn { font-size: var(--fs-2xs); padding: 5px 12px; }

/* Shown while the live map is briefly moved to photograph the site. */
.ra-capture-note {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  z-index: 9998; padding: 8px 16px; border-radius: 20px;
  background: var(--glass-heavy); backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); box-shadow: var(--shadow);
  font-size: var(--fs-sm); color: var(--text-2); pointer-events: none;
}

/* build epoch 30.7 pm */
