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

:root {
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --bg: #f8f9fb;
  --card: #ffffff;
  --card-hover: #fdfdfe;
  --border: #e8eaed;
  --border-light: #f1f3f5;
  --text: #1a1d21;
  --text-secondary: #5f6368;
  --text-muted: #9aa0a6;
  --accent: #1a73e8;
  --accent-bg: #e8f0fe;
  --accent-hover: #1557b0;
  --green: #137333;
  --green-bg: #e6f4ea;
  --red: #c5221f;
  --red-bg: #fce8e6;
  --orange: #e37400;
  --orange-bg: #fef7e0;
  --purple: #7b1fa2;
  --purple-bg: #f3e8fd;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.1), 0 16px 48px rgba(0,0,0,.06);
  --transition: 150ms cubic-bezier(.4,0,.2,1);
}

body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px;
       line-height: 1.5; -webkit-font-smoothing: antialiased; }

/* ─── Navbar ─── */
.navbar { position: sticky; top: 0; z-index: 30; background: var(--card);
          border-bottom: 1px solid var(--border); padding: 0 24px;
          display: flex; align-items: center; height: 56px; gap: 16px;
          box-shadow: var(--shadow-sm); }
.navbar-brand { font-weight: 700; font-size: 16px; color: var(--text);
                display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.navbar-brand svg { flex-shrink: 0; }
.navbar-spacer { flex: 1; }
.navbar-breadcrumb { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted);
                     min-width: 0; }
.navbar-breadcrumb svg { flex-shrink: 0; color: var(--text-muted); opacity: .5; }
.navbar-breadcrumb-name { font-weight: 600; color: var(--accent); white-space: nowrap;
                          overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.navbar-breadcrumb-close { border: none; background: none; cursor: pointer; color: var(--text-muted);
                           font-size: 14px; padding: 2px 4px; border-radius: var(--radius-sm);
                           transition: all var(--transition); line-height: 1; flex-shrink: 0; }
.navbar-breadcrumb-close:hover { color: var(--red); background: rgba(239,68,68,.08); }
/* ── Push notification banner ── */
.push-banner { background: var(--accent); color: #fff; overflow: hidden; position: relative; }
.push-banner-content { display: flex; align-items: center; justify-content: center; gap: 12px;
                       padding: 8px 40px; font-size: 13px; font-weight: 400; }
.push-banner-text { white-space: nowrap; }
.push-banner-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45);
                   padding: 4px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500;
                   cursor: pointer; transition: all var(--transition); white-space: nowrap; letter-spacing: .01em; }
.push-banner-btn:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.7); }
.push-banner-close { background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer;
                     font-size: 15px; padding: 4px 8px; line-height: 1; transition: color var(--transition);
                     position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.push-banner-close:hover { color: #fff; }
@media (max-width: 600px) {
  .push-banner-content { padding: 7px 36px 7px 12px; font-size: 12px; gap: 8px; }
  .push-banner-hide-mobile { display: none; }
}

/* ─── Stats Bar ─── */
.stats-bar { display: flex; gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.stat-card { flex: 1; background: var(--card); padding: 14px 20px; text-align: center; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat-label { font-size: 11px; font-weight: 500; color: var(--text-muted); text-transform: uppercase;
              letter-spacing: .5px; margin-top: 2px; }
.stat-value.accent { color: var(--accent); }
.stat-value.green { color: var(--green); }
.stat-value.orange { color: var(--orange); }
.stat-action { cursor: pointer; transition: all var(--transition); background: var(--accent-bg); }
.stat-action:hover { background: var(--accent); }
.stat-action:hover .stat-value, .stat-action:hover .stat-label { color: #fff; }
.stat-action .stat-value { color: var(--accent); display: flex; align-items: center; justify-content: center; }
.stat-action .stat-label { color: var(--accent); font-weight: 600; }

/* ─── Filter Bar ─── */
.filter-bar { background: var(--card); border-bottom: 1px solid var(--border);
              padding: 14px 24px; display: none; }
.filter-bar.ready { display: block; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 10px; font-weight: 600; text-transform: uppercase;
                      letter-spacing: .6px; color: var(--text-muted); }
.filter-group input, .filter-group select {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font); background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; height: 33px; box-sizing: border-box;
}
.filter-group input:focus, .filter-group select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg);
}
.filter-group input[type=number] { width: 110px; }
.filter-group input[type=text] { width: 240px; }
.input-suffix { position: relative; display: inline-flex; }
.input-suffix input { width: 100% !important; padding-right: 24px; }
.input-suffix-label { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
                      font-size: 13px; color: var(--text-muted); pointer-events: none; }

/* Pills */
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { padding: 5px 11px; border: 1px solid var(--border); border-radius: 20px; cursor: pointer;
        font-size: 12px; font-weight: 500; background: var(--card); user-select: none;
        transition: all var(--transition); color: var(--text-secondary); line-height: 1; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Multi-select dropdown */
.multi-select { position: relative; }
.ms-trigger { display: flex; align-items: center; gap: 6px; padding: 7px 12px;
              border: 1px solid var(--border); border-radius: var(--radius-sm);
              font-size: 13px; font-family: var(--font); background: var(--bg);
              cursor: pointer; user-select: none; white-space: nowrap;
              transition: border-color var(--transition), box-shadow var(--transition);
              height: 33px; box-sizing: border-box; }
.ms-trigger:hover { border-color: var(--accent); }
.ms-trigger.open { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.ms-arrow { font-size: 10px; color: var(--text-muted); transition: transform var(--transition); margin-left: 2px; }
.ms-trigger.open .ms-arrow { transform: rotate(180deg); }
.ms-count { background: var(--accent); color: #fff; font-size: 10px; font-weight: 600;
            padding: 1px 7px; border-radius: 10px; margin-left: 2px; }
.ms-dropdown { position: absolute; top: calc(100% + 4px); left: 0; z-index: 50;
               background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
               box-shadow: var(--shadow-md); min-width: 240px; max-height: 460px; overflow-y: auto;
               display: none; }
.ms-dropdown#msTypeDropdown { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.ms-dropdown.open { display: block; }
.ms-section { padding: 6px 0; }
.ms-section + .ms-section { border-top: 1px solid var(--border); }
.ms-section-label { padding: 4px 14px; font-size: 10px; font-weight: 600; text-transform: uppercase;
                    letter-spacing: .6px; color: var(--text-muted); }
.ms-option { display: flex; align-items: center; gap: 8px; padding: 5px 14px; cursor: pointer;
             font-size: 13px; transition: background var(--transition); }
.ms-option:hover { background: var(--bg); }
.ms-option input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px;
                                   flex-shrink: 0; cursor: pointer; }
.ms-option label { cursor: pointer; flex: 1; line-height: 1.4; }
.ms-only-btn {
  margin-left: auto;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  line-height: 1.6;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), border-color var(--transition), color var(--transition), background var(--transition);
}
.ms-option:hover .ms-only-btn,
.ms-option:focus-within .ms-only-btn {
  opacity: 1;
  pointer-events: auto;
}
.ms-only-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-bg);
}
.ms-option.ms-all { font-weight: 600; padding-bottom: 6px; }
.ms-arr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 4px 12px 8px; }
.ms-arr-item { display: flex; align-items: center; justify-content: center; padding: 5px 0;
               font-size: 11px; font-weight: 500; cursor: pointer; border-radius: var(--radius-sm);
               transition: all var(--transition); user-select: none;
               border: 1px solid var(--border); background: var(--card); color: var(--text-secondary); }
.ms-arr-item:hover { border-color: var(--accent); color: var(--accent); }
.ms-arr-item.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.filter-separator { width: 100%; height: 0; }
.filter-toggle { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--border);
                 border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer;
                 background: var(--bg); color: var(--text-secondary); transition: all var(--transition);
                 align-self: flex-end; height: 33px; box-sizing: border-box; }
.filter-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.filter-toggle.open { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.filter-toggle svg { transition: transform var(--transition); }
.filter-toggle.open svg { transform: rotate(180deg); }
.filter-extra { display: none; }
.filter-extra.show { display: contents; }

/* ─── Content Toolbar ─── */
.content-toolbar { display: flex; align-items: center; justify-content: space-between;
                   padding: 10px 24px; background: var(--bg); }
.toolbar-left { display: flex; gap: 4px; }
.toolbar-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
               border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--card);
               cursor: pointer; color: var(--text-muted); transition: all var(--transition); }
.toolbar-btn:hover { border-color: var(--accent); color: var(--accent); }
.toolbar-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.toolbar-search { position: relative; flex: 1; max-width: 320px; margin: 0 16px; }
.toolbar-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
                       color: var(--text-muted); pointer-events: none; }
.toolbar-search-input { width: 100%; padding: 7px 12px 7px 32px; border: 1px solid var(--border);
                        border-radius: 8px; background: var(--card); font-family: var(--font);
                        font-size: 13px; color: var(--text-primary); outline: none;
                        transition: all var(--transition); }
.toolbar-search-input::placeholder { color: var(--text-muted); }
.toolbar-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); background: #fff; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.toolbar-sort-label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
                      letter-spacing: .5px; }
.toolbar-sort { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
                font-size: 13px; font-family: var(--font); background: var(--card); cursor: pointer;
                outline: none; transition: border-color var(--transition), box-shadow var(--transition); }
.toolbar-sort:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* ─── Content ─── */
.content { padding: 0 24px 16px; }

/* ─── Table ─── */
.table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
              box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
col.col-photo { width: 88px; }
col.col-annonce { width: 14%; }
col.col-loc { width: 16%; }
col.col-surf { width: 9%; }
col.col-ch { width: 5%; }
col.col-floor { width: 8%; }
col.col-price { width: 13%; }
col.col-pm2 { width: 10%; }
col.col-delta { width: 9%; }
col.col-actions { width: 8%; }
thead th { padding: 10px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase;
           letter-spacing: .5px; color: var(--text-muted); background: var(--bg);
           border-bottom: 2px solid var(--border); text-align: left;
           white-space: nowrap; user-select: none; }
thead th[data-sort] { cursor: pointer; transition: color var(--transition); }
thead th[data-sort]:hover { color: var(--text); }
thead th.sort-active { color: var(--accent); }
.sort-arrow { font-size: 10px; opacity: 0; transition: opacity var(--transition); }
thead th.sort-active .sort-arrow { opacity: 1; }
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border-light); font-size: 13px;
           vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
tbody tr { transition: background var(--transition); cursor: pointer; }
tbody tr:hover { background: #f8f9fb; }
tbody tr.no-price { opacity: .5; }
tbody tr:last-child td { border-bottom: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Photo */
.thumb { width: 72px; height: 52px; border-radius: var(--radius-sm); overflow: hidden;
         position: relative; flex-shrink: 0; background: var(--bg); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block;
             transition: transform .3s ease; }
.thumb:hover img { transform: scale(1.05); }
.thumb-badge { position: absolute; bottom: 3px; right: 4px; background: rgba(0,0,0,.65);
               color: #fff; font-size: 10px; font-weight: 600; padding: 1px 6px;
               border-radius: 10px; backdrop-filter: blur(4px); }

/* Tags / Badges */
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px;
         border-radius: 20px; font-size: 11px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.badge-zip { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-alt-zip, .card-alt-zip { opacity: 0.55; }
.badge-neighborhood { background: var(--accent-bg, #e8f0fe); color: var(--accent, #1a73e8); border: 1px solid var(--accent, #1a73e8); opacity: 0.85; }
.card-loc-neighborhood { color: var(--accent, #1a73e8); font-weight: 500; font-size: 12px; }
.badge-elev { background: var(--green-bg); color: var(--green); }
.badge-balcony { background: var(--purple-bg); color: var(--purple); }
.badge-pool { background: var(--accent-bg); color: var(--accent); }
.badge-type { background: var(--orange-bg); color: var(--orange); font-size: 10px; }
.badge-new { background: var(--accent-bg); color: var(--accent); font-size: 10px; font-weight: 600; }
.badge-sold { background: var(--red-bg); color: var(--red); font-size: 10px; font-weight: 600; }
.badge-offer { background: var(--orange-bg); color: var(--orange); font-size: 10px; font-weight: 600; }
.badge-auction { background: #fff3e0; color: #e65100; font-size: 10px; font-weight: 600; }

/* Price */
.price-main { font-weight: 600; white-space: nowrap; }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 11px; }
.price-m2 { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.delta-down { color: var(--green); font-weight: 600; font-size: 12px; }
.delta-up { color: var(--red); font-weight: 600; font-size: 12px; }
.delta-pct { font-size: 10px; font-weight: 500; opacity: .8; }

/* Floor */
.floor-info { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* Details / Location */
.loc-cell { max-width: 200px; }
.loc-name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden;
            text-overflow: ellipsis; max-width: 160px; display: block; }
.actions-cell { text-align: right; white-space: nowrap; }
.row-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-bottom: 2px; }
.site-name { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.row-loc-inline { display: none; font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.row-loc-inline .badge-zip { font-size: 10px; padding: 1px 5px; vertical-align: middle; }
.row-date-sep { color: var(--text-muted); }
.row-date-inline { color: var(--text-muted); }
.row-date { font-size: 11px; color: var(--text-muted); }

/* Expand row */
.expand-row td { padding: 0 12px 14px !important; border-bottom: 2px solid var(--border); background: #fafbfc; }
.expand-inner { display: flex; gap: 16px; align-items: flex-start; }
.expand-photos { display: grid; grid-template-columns: 88px 88px; grid-auto-rows: 88px;
                 gap: 4px; flex-shrink: 0; }
.expand-photo { border-radius: var(--radius-sm); overflow: hidden;
                cursor: pointer; background: var(--bg); position: relative; }
.expand-photo img { position: absolute; inset: 0; width: 100%; height: 100%;
                    object-fit: cover; display: block; transition: transform .3s; }
.expand-photo:hover img { transform: scale(1.05); }
.expand-photo.more { display: flex; align-items: center; justify-content: center;
                     font-size: 14px; font-weight: 600; color: var(--text-muted);
                     background: var(--bg); border: 1px solid var(--border); }
.expand-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6;
               max-height: 14.4em; overflow: hidden; display: -webkit-box;
               -webkit-line-clamp: 9; -webkit-box-orient: vertical; cursor: pointer;
               transition: max-height .3s; flex: 1; min-width: 0; margin-top: 6px; }
.expand-desc.expanded { max-height: none; -webkit-line-clamp: unset; }
.expand-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.expand-link { display: inline-flex; align-items: center; gap: 5px;
               padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px;
               background: var(--card); font-family: var(--font); font-size: 12px; font-weight: 500;
               color: var(--text-secondary); text-decoration: none; transition: all var(--transition); }
.expand-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); text-decoration: none; }
.expand-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ─── Card / Rich View ─── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition);
        display: flex; flex-direction: column; cursor: pointer; min-width: 0; overflow: hidden; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-img { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: var(--bg);
            touch-action: pan-y; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card-img-track { display: flex; width: 100%; height: 100%; min-width: 0; transition: transform .3s ease; will-change: transform; }
.card-img-track.no-transition { transition: none; }
.card-img-slide { flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; }
.card-img-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-img-status { position: absolute; bottom: 10px; left: 10px; z-index: 3; }
.card-img-new { position: absolute; bottom: 10px; left: 10px; z-index: 3; }
.card-img-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
                width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.45);
                color: #fff; border: none; cursor: pointer; display: flex; align-items: center;
                justify-content: center; font-size: 14px; opacity: 0; transition: opacity .2s;
                backdrop-filter: blur(4px); }
.card-img:hover .card-img-nav { opacity: 1; }
.card-img-nav:hover { background: rgba(0,0,0,.65); }
.card-img-nav.prev { left: 6px; }
.card-img-nav.next { right: 6px; }
.card-img-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 3;
                 display: flex; gap: 5px; }
.card-img-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45);
                transition: background .2s, transform .2s; }
.card-img-dot.active { background: #fff; transform: scale(1.3); }
.card-img-count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6);
                  color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px;
                  border-radius: 20px; backdrop-filter: blur(6px); z-index: 3; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-price { font-size: 20px; font-weight: 700; color: var(--text); white-space: nowrap; }
.card-price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; font-weight: 400; }
.card-delta { font-size: 12px; font-weight: 600; white-space: nowrap; }
.card-delta.down { color: var(--green); }
.card-delta.up { color: var(--red); }
.card-location { font-size: 14px; color: var(--text); font-weight: 600; }
.card-location .card-loc-zip { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.card-details { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-secondary); }
.card-detail { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.card-detail strong { color: var(--text); font-weight: 600; }
.card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.card-badges .badge { background: var(--border-light); color: var(--text-secondary); }
.card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6;
             display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
             overflow: hidden; cursor: pointer; transition: max-height .3s; }
.card-desc.expanded { -webkit-line-clamp: unset; display: block; overflow: visible; }
.card-footer { display: flex; align-items: center; justify-content: space-between;
               padding: 12px 16px; border-top: 1px solid var(--border-light); margin-top: auto; position: relative; }
.card-source { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.card-source-name { font-weight: 600; color: var(--text-secondary); }
.card-date { font-size: 11px; color: var(--text-muted); }
.card-link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px;
                 border: 1px solid var(--border); border-radius: 20px; background: var(--card);
                 font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text-secondary);
                 text-decoration: none; transition: all var(--transition); }
.card-link-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); text-decoration: none; }
.card-copy-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
                 border: 1px solid var(--border); border-radius: 50%; background: var(--card);
                 color: var(--text-muted); cursor: pointer; transition: all var(--transition); padding: 0; flex-shrink: 0; }
.card-copy-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.card-copy-btn.copied { border-color: var(--green, #27ae60); color: var(--green, #27ae60); background: rgba(39,174,96,.08); }

/* Instant custom tooltips */
.has-tooltip { position: relative; }
.has-tooltip::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--text, #333);
  color: #fff; font-size: 11px; font-weight: 500; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s; z-index: 50; }
.has-tooltip:hover::after, .has-tooltip.tooltip-visible::after { opacity: 1; }
.card-pm2 { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.card-footer-actions { display: flex; align-items: center; gap: 10px; }

/* Report error link — replaces source info on card hover */
.report-link { font-size: 12px; color: var(--text-muted); cursor: pointer; transition: color var(--transition), opacity var(--transition);
               white-space: nowrap; user-select: none; opacity: 0; position: absolute; left: 16px; }
.report-link:hover { color: var(--red, #e74c3c); }
.card-source { transition: opacity var(--transition); }
.card:hover .card-source { opacity: 0; }
.card:hover .card-footer .report-link { opacity: 1; }
.expand-row .report-link { opacity: 1; position: static; }

/* Report popup */
.report-popup-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.35);
                        backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
                        padding: 24px; animation: fadeIn .15s ease; }
.report-popup { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
                width: 100%; max-width: 340px; padding: 20px; animation: modalIn .2s ease; }
.report-popup-header { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.report-popup-options { display: flex; flex-direction: column; gap: 6px; }
.report-opt { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--border);
              border-radius: var(--radius); background: var(--card); font-family: var(--font); font-size: 13px;
              color: var(--text-secondary); cursor: pointer; transition: all var(--transition); text-align: left; }
.report-opt:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.report-popup-custom { display: flex; gap: 8px; margin-top: 8px; }
.report-popup-input { flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius);
                      font-size: 13px; font-family: var(--font); outline: none;
                      transition: border-color var(--transition), box-shadow var(--transition); }
.report-popup-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.report-popup-send { padding: 9px 18px; border: none; border-radius: var(--radius); background: var(--accent);
                     color: #fff; font-family: var(--font); font-size: 13px; font-weight: 600;
                     cursor: pointer; transition: background var(--transition); white-space: nowrap; }
.report-popup-send:hover { background: var(--accent-hover); }

@media (max-width: 768px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card-price { font-size: 18px; }
  .card-body { padding: 12px; gap: 8px; }
  .card-footer { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ─── Lightbox ─── */
.lightbox { display: none; position: fixed; inset: 0; z-index: 200;
            background: rgba(0,0,0,.92); backdrop-filter: blur(8px);
            justify-content: center; align-items: center; flex-direction: column; }
.lightbox.open { display: flex; }
.lb-viewport { position: relative; width: 88vw; height: 82vh; overflow: hidden; touch-action: pan-y; }
.lb-track { display: flex; height: 100%; transition: transform .35s cubic-bezier(.4,0,.2,1); will-change: transform; }
.lb-track.no-transition { transition: none; }
.lb-slide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-slide img { max-width: 100%; max-height: 100%; object-fit: contain;
                border-radius: var(--radius); user-select: none;
                box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.lb-close { position: absolute; top: 16px; right: 20px; color: rgba(255,255,255,.8);
            font-size: 20px; cursor: pointer; width: 40px; height: 40px;
            display: flex; align-items: center; justify-content: center;
            border-radius: 50%; background: rgba(255,255,255,.1);
            transition: background var(--transition); backdrop-filter: blur(8px); }
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%);
          color: rgba(255,255,255,.8); font-size: 28px; cursor: pointer;
          user-select: none; background: rgba(255,255,255,.08);
          border-radius: 50%; width: 48px; height: 48px;
          display: flex; align-items: center; justify-content: center;
          transition: background var(--transition); backdrop-filter: blur(8px); }
.lb-nav:hover { background: rgba(255,255,255,.18); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-counter { position: absolute; bottom: 24px; color: rgba(255,255,255,.6);
              font-size: 13px; font-weight: 500; letter-spacing: .5px; }

/* ─── Navbar button ─── */
.navbar-btn { display: flex; align-items: center; gap: 6px; padding: 6px 14px;
              border: 1px solid var(--border); border-radius: 20px; background: var(--card);
              font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text-secondary);
              cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.navbar-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.navbar-btn svg { flex-shrink: 0; }

/* ─── Analytics Modal ─── */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.4);
                 backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center;
                 padding: 24px; }
.modal-overlay.open { display: flex; }
.modal { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
         width: 100%; max-width: 860px; max-height: 85vh; display: flex; flex-direction: column;
         overflow: hidden; animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px); } }
.modal-header { display: flex; align-items: center; justify-content: space-between;
                padding: 20px 24px 12px; flex-shrink: 0; }
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted);
               padding: 4px; border-radius: var(--radius-sm); transition: all var(--transition); }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-tabs { display: flex; gap: 0; padding: 0 24px; border-bottom: 1px solid var(--border);
              overflow-x: auto; -webkit-overflow-scrolling: touch; flex-shrink: 0; }
.modal-tab { background: none; border: none; border-bottom: 2px solid transparent;
             padding: 8px 14px; font-family: var(--font); font-size: 13px; font-weight: 600;
             color: var(--text-muted); cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.modal-body { overflow-y: auto; padding: 20px 24px 24px; flex: 1; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Analytics charts */
.analytics-section { margin-bottom: 28px; }
.analytics-section h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text);
                        display: flex; align-items: center; gap: 8px; }
.analytics-section h3 small { font-weight: 400; color: var(--text-muted); font-size: 11px; }
.bar-chart { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.bar-label { width: 130px; flex-shrink: 0; text-align: right; color: var(--text-secondary);
             font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 22px; background: var(--bg); border-radius: 4px; overflow: hidden;
             position: relative; }
.bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease;
            display: flex; align-items: center; padding-left: 8px;
            font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; min-width: fit-content; }
.bar-fill.accent { background: var(--accent); }
.bar-fill.green { background: var(--green); }
.bar-fill.orange { background: var(--orange); }
.bar-fill.purple { background: #7b1fa2; }
.bar-fill.red { background: var(--red); }
.bar-fill.muted { background: var(--text-muted); }
.bar-value { width: 80px; flex-shrink: 0; text-align: right; font-weight: 600; color: var(--text);
             font-size: 12px; font-variant-numeric: tabular-nums; }
.bar-count { color: var(--text-muted); font-weight: 400; font-size: 11px; margin-left: 4px; }
.bar-row .bar-median { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(0,0,0,.25);
                       z-index: 1; }
.analytics-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-style: italic; }
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 768px) { .analytics-grid { grid-template-columns: 1fr; } }

/* ─── Loading ─── */
.loading { display: flex; align-items: center; justify-content: center; padding: 120px 24px;
           gap: 12px; color: var(--text-muted); font-size: 15px; }
.loading-spinner { width: 20px; height: 20px; border: 2.5px solid var(--border);
                   border-top-color: var(--accent); border-radius: 50%;
                   animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Link button (expand row) ─── */

/* ─── Empty state ─── */
.empty { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 15px; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .stats-bar { flex-wrap: wrap; }
  .stat-card { min-width: 33%; }
}
@media (max-width: 768px) {
  /* ── Navbar ── */
  .navbar { padding: 0 12px; gap: 8px; height: 46px; }
  .navbar-brand { font-size: 14px; gap: 6px; }
  .navbar-brand svg { width: 18px; height: 18px; }
  .navbar-btn { padding: 4px 10px; font-size: 11px; gap: 4px; }
  .navbar-btn svg { width: 14px; height: 14px; }

  /* ── Stats bar — horizontal scroll strip ── */
  .stats-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
                scrollbar-width: none; }
  .stats-bar::-webkit-scrollbar { display: none; }
  .stat-card { flex: 0 0 auto; min-width: unset; padding: 8px 14px; }
  .stat-value { font-size: 16px; }
  .stat-label { font-size: 9px; letter-spacing: .3px; }

  /* ── Filters ── */
  .filter-bar { padding: 10px 12px; }
  .filter-row { gap: 8px; }
  .filter-group input[type=text] { width: 100%; }
  .filter-group input[type=number] { width: 80px; }
  .filter-group input, .filter-group select { padding: 6px 10px; font-size: 12px; }
  .ms-trigger { padding: 6px 10px; font-size: 12px; }

  /* ── Toolbar ── */
  .content-toolbar { padding: 8px 12px; }
  .toolbar-btn { width: 32px; height: 32px; }
  .toolbar-search { margin: 0 8px; max-width: none; }
  .toolbar-sort { padding: 6px 10px; font-size: 12px; }
  .toolbar-sort-label { font-size: 11px; }

  /* ── Content ── */
  .content { padding: 0 8px 8px; }
  .table-wrap { border-radius: var(--radius); }

  /* ── Table — hide Loc, Ch, Étage, €/m², Δ columns (loc merged into Annonce) ── */
  table { table-layout: auto; width: 100%; }
  /* Reset all col widths — let auto layout handle visible columns */
  col { width: auto !important; }
  col.col-photo { width: 64px !important; }
  col.col-actions { width: 50px !important; }
  /* Hide unwanted columns: 3=Loc, 5=Ch, 6=Étage, 8=€/m², 9=Δ */
  th:nth-child(3), td:nth-child(3),
  th:nth-child(5), td:nth-child(5),
  th:nth-child(6), td:nth-child(6),
  th:nth-child(8), td:nth-child(8),
  th:nth-child(9), td:nth-child(9) { display: none; }
  .row-loc-inline { display: block !important; }
  .row-loc-inline .badge-zip { display: none; }
  .row-date { display: none; }

  thead th { padding: 7px 6px; font-size: 10px; letter-spacing: .3px; }
  tbody td { padding: 7px 6px; font-size: 12px; }

  .thumb { width: 56px; height: 42px; }
  .thumb-badge { font-size: 8px; padding: 0 4px; bottom: 2px; right: 2px; }
  .site-name { font-size: 11px; }
  .badge { font-size: 10px; padding: 1px 6px; }
  .badge-new, .badge-sold, .badge-offer, .badge-auction, .badge-type { font-size: 9px; }
  .loc-name { font-size: 11px; max-width: 80px; }
  .price-main { font-size: 12px; }
  .price-old { font-size: 10px; }
  .price-m2 { font-size: 10px; }
  .row-comment-badge { font-size: 10px; padding: 1px 6px; }

  /* ── Expand row ── */
  .expand-photos { display: none; }
  .expand-inner { flex-direction: column; gap: 10px; }
  .expand-row td { padding: 0 8px 10px !important; }
  .expand-desc { font-size: 12px; line-height: 1.5; }

  /* ── Analytics modal ── */
  .modal { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 90vh; }
  .modal-header { padding: 16px 16px 0; }
  .modal-header h2 { font-size: 16px; }
  .modal-body { padding: 16px; }
  .modal-tabs { padding: 12px 16px 0; }
  .bar-label { width: 80px; font-size: 11px; }
  .bar-value { width: 60px; font-size: 11px; }
  .bar-fill { font-size: 10px; }

  /* ── Lightbox ── */
  .lb-nav { width: 36px; height: 36px; font-size: 22px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-close { top: 10px; right: 10px; width: 34px; height: 34px; }
}

/* Extra-small screens */
@media (max-width: 480px) {
  .filter-group input[type=number] { width: 70px; }
  .input-suffix { width: 91px !important; }
  #fSurfMin { width: 88px; }
  #fBedMin { width: 88px; }
  .loc-name { max-width: 60px; }
  .thumb { width: 48px; height: 36px; }
  col.col-photo { width: 56px !important; }
  col.col-actions { width: 42px !important; }
}

/* ═══════════════════════════════════════════════════════════
   Collab: Auth
   ═══════════════════════════════════════════════════════════ */
.collab-only { display: none !important; }
.collab-only.collab-visible { display: flex !important; }
.auth-signin { display: flex; align-items: center; gap: 6px; padding: 5px 14px;
               border: 1px solid var(--border); border-radius: 20px; background: var(--card);
               font-family: var(--font); font-size: 12px; font-weight: 600; color: var(--text-secondary);
               cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.auth-signin:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.auth-user { display: none; align-items: center; gap: 8px; position: relative; }
.auth-avatar { width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
               border: 2px solid var(--border); transition: border-color var(--transition); }
.auth-avatar:hover { border-color: var(--accent); }
.auth-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
                 background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
                 box-shadow: var(--shadow-md); padding: 8px 0; min-width: 180px; }
.auth-dropdown.open { display: block; }
.auth-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px;
                      font-size: 13px; cursor: pointer; transition: background var(--transition);
                      color: var(--text-secondary); border: none; background: none; width: 100%;
                      font-family: var(--font); text-align: left; }
.auth-dropdown-item:hover { background: var(--bg); color: var(--text); }
.auth-dropdown-name { font-weight: 600; color: var(--text); padding: 6px 16px; font-size: 13px;
                      border-bottom: 1px solid var(--border); margin-bottom: 4px; }

/* ═══════════════════════════════════════════════════════════
   Collab: Saved Searches Panel
   ═══════════════════════════════════════════════════════════ */
.navbar-item { position: relative; }
.searches-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
                  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
                  box-shadow: var(--shadow-lg); width: 340px; max-height: 480px; overflow: hidden;
                  animation: modalIn .15s ease; }
.searches-panel.open { display: flex; flex-direction: column; }
.searches-header { display: flex; align-items: center; justify-content: space-between;
                   padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.searches-header h3 { font-size: 14px; font-weight: 700; }
.searches-list { overflow-y: auto; flex: 1; max-height: 280px; }
.search-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
               cursor: pointer; transition: background var(--transition); gap: 8px; }
.search-item:hover { background: var(--bg); }
.search-item.active { background: var(--accent-bg); }
.search-item-info { flex: 1; min-width: 0; }
.search-item-name { font-size: 13px; font-weight: 600; color: var(--text);
                    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.search-item-actions { display: flex; gap: 2px; flex-shrink: 0; }
.search-item-btn { width: 28px; height: 28px; border: none; background: none; border-radius: var(--radius-sm);
                   cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
                   color: var(--text-muted); transition: all var(--transition); }
.search-item-btn:hover { background: var(--bg); color: var(--text); }
.search-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.searches-footer { padding: 10px 16px; border-top: 1px solid var(--border); }
.searches-new-btn { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
                    background: var(--bg); font-family: var(--font); font-size: 12px; font-weight: 600;
                    color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
                    margin-bottom: 8px; }
.searches-new-btn:hover { background: var(--card); border-color: var(--text-muted); color: var(--text); }
.searches-save-btn { width: 100%; padding: 8px; border: 1px dashed var(--border); border-radius: var(--radius-sm);
                     background: none; font-family: var(--font); font-size: 12px; font-weight: 600;
                     color: var(--accent); cursor: pointer; transition: all var(--transition); }
.searches-save-btn:hover { background: var(--accent-bg); border-color: var(--accent); }
.searches-join { display: flex; gap: 6px; margin-top: 8px; }
.searches-join input { flex: 1; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
                       font-size: 12px; font-family: var(--font); outline: none; }
.searches-join input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.searches-join button { padding: 6px 12px; border: none; border-radius: var(--radius-sm);
                        background: var(--accent); color: #fff; font-family: var(--font);
                        font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════════
   Collab: Active Search Bar
   ═══════════════════════════════════════════════════════════ */
.filters-dirty-bar { display: none; background: var(--accent-bg); border-bottom: 1px solid #c5d8f0;
                    padding: 8px 24px; align-items: center; justify-content: center; gap: 12px; }
.filters-dirty-text { font-size: 13px; color: var(--accent); }
.filters-dirty-btn { padding: 5px 14px; border: none; border-radius: var(--radius-sm);
                     background: var(--accent); color: #fff; font-family: var(--font); font-size: 12px;
                     font-weight: 600; cursor: pointer; transition: all var(--transition); }
.filters-dirty-btn:hover { background: var(--accent-hover); }
.update-search-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
                        border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
                        cursor: pointer; text-align: left; font-family: var(--font); transition: all var(--transition);
                        margin-bottom: 8px; }
.update-search-option:hover { border-color: var(--accent); background: var(--accent-bg); }
.update-search-option-icon { font-size: 20px; flex-shrink: 0; }
.update-search-option-text { display: flex; flex-direction: column; gap: 2px; }
.update-search-option-text strong { font-size: 13px; color: var(--text-primary); }
.update-search-option-text small { font-size: 11px; color: var(--text-muted); }

.active-search-bar { display: none !important; }
.active-search-info { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
                      color: var(--accent); min-width: 0; }
.active-search-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-count { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
               padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.active-search-actions { display: flex; gap: 6px; flex-shrink: 0; }
.mark-read-btn { padding: 4px 12px; border: 1px solid var(--accent); border-radius: 20px; background: none;
                 font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--accent);
                 cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.mark-read-btn:hover { background: var(--accent); color: #fff; }
.close-search-btn { width: 28px; height: 28px; border: 1px solid var(--accent); border-radius: 50%;
                    background: none; font-size: 14px; color: var(--accent); cursor: pointer;
                    display: flex; align-items: center; justify-content: center;
                    transition: all var(--transition); }
.close-search-btn:hover { background: var(--accent); color: #fff; }

/* ═══════════════════════════════════════════════════════════
   Collab: Favorites
   ═══════════════════════════════════════════════════════════ */
.fav-btn { display: inline-flex; align-items: center; justify-content: center;
           width: 28px; height: 28px; border: none; background: none; border-radius: var(--radius-sm);
           cursor: pointer; font-size: 16px; color: var(--text-muted); transition: all var(--transition);
           vertical-align: middle; padding: 0; line-height: 1; }
.fav-btn:hover { color: var(--red); transform: scale(1.2); }
.fav-btn.fav-active { color: var(--red); }
.fav-btn.fav-active:hover { opacity: .7; }
.favs-only-toggle { display: none; }
.favs-only-toggle.show { display: flex; }
/* Card overlay buttons (fav + hide): hidden by default, shown on hover */
.card-fav, .card-hide {
  position: absolute; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: all var(--transition); box-shadow: 0 1px 4px rgba(0,0,0,.1);
  opacity: 0; pointer-events: none;
}
.card-fav { top: 10px; right: 10px; font-size: 18px; }
.card-hide { top: 10px; left: 10px; font-size: 14px; }
.card:hover .card-fav, .card:hover .card-hide { opacity: 1; pointer-events: auto; }
.card-fav.fav-active { opacity: 1; pointer-events: auto; color: var(--red); background: rgba(255,255,255,.95); }
.card-fav:hover { color: var(--red); transform: scale(1.1); }
.card-hide:hover { color: var(--red); transform: scale(1.1); }
/* On touch devices (no hover), always show overlay buttons */
@media (hover: none) {
  .card-fav, .card-hide { opacity: 1; pointer-events: auto; }
}
/* List view hide button */
.hide-btn { display: inline-flex; align-items: center; justify-content: center;
            width: 24px; height: 24px; border: none; background: none; border-radius: var(--radius-sm);
            cursor: pointer; color: var(--text-muted); transition: all var(--transition);
            vertical-align: middle; padding: 0; }
.hide-btn:hover { color: var(--red); transform: scale(1.2); }
.badge-inbox-new { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
                   animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }

/* ═══════════════════════════════════════════════════════════
   Collab: Comments
   ═══════════════════════════════════════════════════════════ */
.comments-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.comments-title { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px;
                  text-transform: uppercase; letter-spacing: .5px; }
.comment-item { display: flex; gap: 8px; margin-top: 8px; margin-bottom: 8px; align-items: flex-start; }
.comment-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.comment-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; flex: 1; min-width: 0; }
.comment-author { font-weight: 600; color: var(--text); margin-right: 4px; }
.comment-time { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.comment-text { margin-top: 2px; }

/* Card comments (grid mode) */
.card-comments { padding: 2px 14px 10px 14px; background: var(--bg); border-radius: 0 0 var(--radius) var(--radius);
                 border-top: 1px solid var(--border); }
.card-comments-title { display: none; }
.comment-input-wrap { display: flex; gap: 6px; margin-top: 8px; }
.comment-input { flex: 1; padding: 7px 12px; border: 1px solid var(--border); border-radius: 20px;
                 font-size: 13px; font-family: var(--font); outline: none;
                 transition: border-color var(--transition), box-shadow var(--transition); }
.comment-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.comment-send { width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--accent);
                color: #fff; font-size: 14px; cursor: pointer; display: flex; align-items: center;
                justify-content: center; transition: background var(--transition), opacity .15s, transform .15s; flex-shrink: 0;
                opacity: 1; transform: scale(1); }
.comment-send.hidden { opacity: 0; transform: scale(0.5); pointer-events: none; width: 0; padding: 0; margin: 0; overflow: hidden; }
.comment-send:hover { background: var(--accent-hover); }

/* Row: inline comment badge (only shown when comments exist) */
.row-comment-badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px;
                     border-radius: 20px; font-size: 11px; font-weight: 500; line-height: 1.4;
                     background: var(--accent-bg); color: var(--accent); cursor: pointer;
                     transition: all var(--transition); white-space: nowrap; }
.row-comment-badge:hover { background: var(--accent); color: #fff; }

/* Expand row: comment button */
.expand-comment-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px;
                      border: 1px solid var(--border); border-radius: 20px; background: var(--card);
                      font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text-secondary);
                      cursor: pointer; transition: all var(--transition); }
.expand-comment-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Comment popup overlay */
.comment-popup-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.35);
                         backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
                         padding: 24px; }
.comment-popup-panel { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
                       width: 100%; max-width: 420px; max-height: 70vh; display: flex; flex-direction: column;
                       overflow: hidden; animation: modalIn .2s ease; }
.comment-popup-header { display: flex; align-items: center; justify-content: space-between;
                        padding: 14px 16px; border-bottom: 1px solid var(--border); }
.comment-popup-header h4 { font-size: 14px; font-weight: 700; margin: 0; }
.comment-popup-close { border: none; background: none; cursor: pointer; color: var(--text-muted);
                       font-size: 16px; padding: 4px 8px; border-radius: var(--radius-sm);
                       transition: all var(--transition); line-height: 1; }
.comment-popup-close:hover { color: var(--text); background: var(--bg); }
.comment-popup-body { overflow-y: auto; padding: 12px 16px; flex: 1; }
.comment-popup-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   Collab: Notification Bell & Panel
   ═══════════════════════════════════════════════════════════ */
.notif-bell { position: relative; display: flex; align-items: center; justify-content: center;
              width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%;
              background: var(--card); cursor: pointer; transition: all var(--transition); }
.notif-bell:hover { border-color: var(--accent); color: var(--accent); }
.notif-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
               background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
               border-radius: 9px; display: none; align-items: center; justify-content: center;
               padding: 0 5px; line-height: 1; border: 2px solid var(--card); }
.notif-panel { display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
               background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
               box-shadow: var(--shadow-lg); width: 380px; max-height: 500px; overflow: hidden;
               animation: modalIn .15s ease; }
.notif-panel.open { display: flex; flex-direction: column; }
.notif-close { display: none; border: none; background: none; font-size: 18px; color: var(--text-muted);
               cursor: pointer; padding: 4px 8px; border-radius: var(--radius-sm); }
.notif-close:hover { color: var(--text); background: var(--bg); }
.notif-header { display: flex; align-items: center; justify-content: space-between;
                padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.notif-header h3 { font-size: 14px; font-weight: 700; }
.notif-mark-all { border: none; background: none; font-family: var(--font); font-size: 12px;
                  font-weight: 600; color: var(--accent); cursor: pointer; padding: 4px 8px;
                  border-radius: var(--radius-sm); transition: background var(--transition); }
.notif-mark-all:hover { background: var(--accent-bg); }
.notif-list { overflow-y: auto; flex: 1; max-height: 420px; }
.notif-item { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border-light);
              transition: background var(--transition); cursor: pointer; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: var(--accent-bg); }
.notif-item.unread:hover { background: #dbeafe; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center;
              justify-content: center; font-size: 16px; flex-shrink: 0; }
.notif-icon.fav { background: var(--red-bg); }
.notif-icon.unfav { background: var(--bg); }
.notif-icon.comment { background: var(--accent-bg); }
.notif-body { flex: 1; min-width: 0; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.notif-actor { font-weight: 600; color: var(--text); }
.notif-search { color: var(--accent); font-weight: 500; font-size: 12px; }
.notif-text { font-style: italic; color: var(--text-muted); }
.notif-time { float: right; font-size: 11px; color: var(--text-muted); margin-left: 8px; white-space: nowrap; }
.notif-day { padding: 6px 16px; font-size: 11px; font-weight: 600; color: var(--text-muted);
             text-transform: uppercase; letter-spacing: .5px; background: var(--bg); }
.notif-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* ═══════════════════════════════════════════════════════════
   Collab: Invite Modal
   ═══════════════════════════════════════════════════════════ */
.collab-modal { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.4);
                backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center;
                padding: 24px; }
.collab-modal.open { display: flex; }
.modal-sm { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
            width: 100%; max-width: 420px; padding: 24px; animation: modalIn .2s ease; }
.collab-modal-box { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
                    width: 100%; max-width: 420px; padding: 24px; animation: modalIn .2s ease; }
.collab-modal-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.collab-modal-box label { font-size: 12px; font-weight: 600; color: var(--text-muted);
                          text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 6px; }
.collab-modal-box input { width: 100%; padding: 10px 14px; border: 1px solid var(--border);
                          border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font);
                          outline: none; margin-bottom: 16px; }
.collab-modal-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.collab-modal-actions { display: flex; gap: 8px; justify-content: flex-end; }
.collab-modal-actions button { padding: 8px 20px; border: none; border-radius: var(--radius-sm);
                               font-family: var(--font); font-size: 13px; font-weight: 600;
                               cursor: pointer; transition: all var(--transition); }
.collab-btn-primary { background: var(--accent); color: #fff; }
.collab-btn-primary:hover { background: var(--accent-hover); }
.collab-btn-secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border) !important; }
.collab-btn-secondary:hover { background: var(--card); }
.invite-code-display { display: flex; align-items: center; gap: 8px; padding: 12px 16px;
                       background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
                       margin-bottom: 16px; }
.invite-code-text { flex: 1; font-size: 18px; font-weight: 700; font-family: monospace; letter-spacing: 2px;
                    color: var(--text); }
.invite-copy-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
                   background: var(--card); font-family: var(--font); font-size: 12px; font-weight: 600;
                   cursor: pointer; transition: all var(--transition); color: var(--text-secondary); }
.invite-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.invite-link-display { font-size: 12px; color: var(--text-muted); word-break: break-all;
                       margin-bottom: 16px; padding: 8px 12px; background: var(--bg);
                       border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════════════════
   Collab: Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .searches-panel { width: 300px; left: 0; }
  .notif-panel { width: 320px; right: -60px; }
  .auth-signin span { display: none; }
  .navbar-breadcrumb-name { max-width: 120px; font-size: 12px; }
  .collab-modal-box { margin: 12px; padding: 20px; }
}
@media (max-width: 480px) {
  .searches-panel { width: 280px; left: 0; }
  .notif-panel { position: fixed; top: 0; left: 0; right: 0; bottom: 0; width: 100vw; max-height: 100vh;
                 border-radius: 0; z-index: 200; animation: none; }
  .notif-list { max-height: none; }
  .notif-close { display: block; }
}

/* ── Cross-site badge + instant tooltip ── */
.cross-site-badge { display: inline-block; background: var(--accent); color: #fff; font-size: 10px;
  font-weight: 700; padding: 1px 5px; border-radius: 8px; margin-left: 4px; vertical-align: middle;
  cursor: default; line-height: 1.4; position: relative; }
.cross-site-badge:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); font-size: 11px;
  font-weight: 500; padding: 4px 8px; border-radius: 4px; white-space: nowrap; z-index: 100;
  pointer-events: none; }
.cross-site-badge:hover::before { content: ''; position: absolute; bottom: calc(100% + 2px);
  left: 50%; transform: translateX(-50%); border: 4px solid transparent;
  border-top-color: var(--text); z-index: 100; pointer-events: none; }

/* ── Visit dropdown (hover with delay) ── */
.visit-dropdown { position: relative; display: inline-block; }
.visit-compact-toggle { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 2px 6px; font-size: 11px; color: var(--accent); cursor: pointer; }
.visit-dropdown-menu { position: absolute; right: 0; bottom: 100%;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; min-width: 160px;
  padding-bottom: 8px; /* invisible bridge to button */
  visibility: hidden; opacity: 0; transition: visibility 0s .6s, opacity .15s; }
.visit-dropdown:hover .visit-dropdown-menu { visibility: visible; opacity: 1; transition: visibility 0s, opacity .15s; }
.visit-dropdown-item { display: block; padding: 8px 12px; font-size: 12px; color: var(--text);
  text-decoration: none; white-space: nowrap; transition: background var(--transition); }
.visit-dropdown-item:hover { background: var(--bg-hover); }

