/* ══════════════════════════════════════════════════════════════
   RADAR TERMINATOR — Estilos
   Base oscura profesional con acento dorado (InmoRadar premium)
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #07090F;
  --bg2:        #0F1420;
  --bg3:        #181F30;
  --raised:     #1A2640;
  --border:     rgba(255,255,255,.07);
  --border-md:  rgba(255,255,255,.12);
  --gold:       #C9993A;
  --gold-hi:    #E8B84B;
  --gold-lo:    rgba(201,153,58,.12);
  --cream:      #E8E4DC;
  --text-1:     #E8E4DC;
  --text-2:     #9BA5B8;
  --text-3:     #5C6678;
  --text:       #E8E4DC;
  --text-muted: #9BA5B8;
  --red:        #EF4444;
  --orange:     #F59E0B;
  --green:      #22C55E;
  --blue:       #3B82F6;
  --purple:     #A78BFA;
  --accent:     #C9993A;
  --accent2:    #7c5cfc;
  --sidebar-w:  230px;
  --radius:     10px;
  --sh-card:    0 2px 12px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
  --sh-hover:   0 8px 32px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.08);
  --sh-modal:   0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06);
}

html, body {
  height: 100%;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(201,153,58,.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(59,130,246,.04) 0%, transparent 50%);
  color: var(--text-1);
  font-size: 14px;
  overflow: hidden;
}

/* ── MODAL ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center; z-index: 9999;
  backdrop-filter: blur(8px);
}
.modal-box {
  background: var(--bg2); border: 1px solid var(--border-md); border-radius: 18px;
  padding: 40px; width: 460px; max-width: 95vw; display: flex; flex-direction: column; gap: 16px;
  box-shadow: var(--sh-modal);
}
.modal-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800;
}
.modal-logo i { color: var(--gold); font-size: 24px; }
.accent { color: var(--gold); }
.modal-box h2 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--text-1); }
.modal-box p { color: var(--text-2); line-height: 1.6; font-size: 13px; }
.input-group { display: flex; flex-direction: column; gap: 6px; position: relative; }
.input-group label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.input-group input, .input-group select, .input-group textarea {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 10px 40px 10px 12px; border-radius: var(--radius); font-size: 14px; outline: none;
  transition: border .2s; font-family: inherit;
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,153,58,.12);
}
.btn-show-key {
  position: absolute; right: 10px; bottom: 10px; background: none; border: none;
  color: var(--text-3); cursor: pointer; font-size: 15px; transition: color .15s;
}
.btn-show-key:hover { color: var(--gold); }
.hint { font-size: 11px !important; color: var(--text-3) !important; line-height: 1.5; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-primary {
  background: var(--gold); color: #07090F; border: none; border-radius: var(--radius);
  padding: 10px 20px; font-size: 13px; font-weight: 700; cursor: pointer; display: flex;
  align-items: center; gap: 8px; transition: background .2s, transform .1s; white-space: nowrap;
  font-family: inherit;
}
.btn-primary:hover { background: var(--gold-hi); }
.btn-primary:active { transform: scale(.97); }
.btn-primary.full-width { width: 100%; justify-content: center; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-secondary {
  background: var(--bg3); color: var(--text-1); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 16px; font-size: 13px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background .2s, border-color .2s;
  font-family: inherit;
}
.btn-secondary:hover { background: var(--raised); border-color: var(--border-md); }

.btn-danger-sm {
  background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.3);
  border-radius: var(--radius); padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; gap: 6px; transition: background .2s;
  font-family: inherit;
}
.btn-danger-sm:hover { background: rgba(239,68,68,.22); }

.btn-copy {
  background: var(--bg3); color: var(--text-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 5px; transition: color .2s;
  font-family: inherit;
}
.btn-copy:hover { color: var(--gold); }

/* ── LAYOUT ────────────────────────────────────────────────── */
.app-container { display: flex; height: 100vh; width: 100vw; overflow: hidden; }
.hidden { display: none !important; }

/* ── SIDEBAR ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w); background: var(--bg2);
  border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 10;
}
.sidebar-brand {
  padding: 20px 18px; display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif; font-size: 17px; font-weight: 800;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand i { color: var(--gold); font-size: 20px; }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; border: none; background: none; color: var(--text-2);
  font-size: 13px; font-weight: 500; cursor: pointer; text-align: left; width: 100%;
  transition: background .15s, color .15s; font-family: inherit; position: relative;
}
.nav-item:hover { background: var(--bg3); color: var(--text-1); }
.nav-item.active { background: var(--gold-lo); color: var(--gold); }
.nav-item.active i { color: var(--gold); }
.nav-item i { width: 18px; text-align: center; font-size: 14px; }
.nav-item .badge {
  margin-left: auto; background: var(--gold); color: #07090F;
  border-radius: 10px; padding: 1px 7px; font-size: 11px; font-weight: 800;
}
.badge-warning { background: var(--orange) !important; color: #07090F !important; }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.credits-info { display: flex; align-items: center; gap: 7px; color: var(--text-3); font-size: 11px; }
.product-tag {
  background: var(--gold-lo); border: 1px solid rgba(201,153,58,.25); border-radius: 20px;
  padding: 3px 10px; font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── MAIN CONTENT ──────────────────────────────────────────── */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }

/* ── VIEWS ─────────────────────────────────────────────────── */
.view { display: none; flex-direction: column; height: 100%; overflow: hidden; }
.view.active { display: flex; }

/* ── TOP BAR ───────────────────────────────────────────────── */
.top-bar {
  padding: 12px 16px; background: var(--bg2); border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
}
.search-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.select-wrapper {
  display: flex; align-items: center; gap: 8px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; min-width: 0;
  transition: border-color .2s;
}
.select-wrapper:focus-within { border-color: var(--gold); }
.select-wrapper i { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.select-wrapper select {
  background: none; border: none; color: var(--text-1); font-size: 13px;
  outline: none; cursor: pointer; font-family: inherit;
}
.select-wrapper select option { background: var(--bg3); }

.results-summary {
  display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); flex-wrap: wrap;
}
.sort-label { margin-left: 6px; }
.results-summary select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; outline: none; cursor: pointer;
  font-family: inherit;
}

/* ── CONTENT SPLIT ─────────────────────────────────────────── */
.content-split { display: flex; flex: 1; overflow: hidden; }

/* ── MAP ───────────────────────────────────────────────────── */
.map-wrapper { flex: 1; position: relative; min-width: 0; }
#map { width: 100%; height: 100%; }
.map-legend {
  position: absolute; bottom: 28px; left: 12px; background: rgba(7,9,15,.88);
  backdrop-filter: blur(8px); border: 1px solid var(--border-md); border-radius: 8px;
  padding: 8px 12px; display: flex; gap: 14px; z-index: 500; font-size: 11px;
  box-shadow: var(--sh-card);
}
.legend-item { display: flex; align-items: center; gap: 5px; color: var(--text-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.red { background: var(--red); }
.dot.orange { background: var(--orange); }
.dot.green { background: var(--green); }

/* ── LEAD PANEL ────────────────────────────────────────────── */
.lead-panel {
  width: 360px; min-width: 300px; background: var(--bg2); border-left: 1px solid var(--border);
  overflow-y: auto; display: flex; flex-direction: column;
}
.lead-panel::-webkit-scrollbar { width: 4px; }
.lead-panel::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--text-3); padding: 32px; text-align: center;
}
.empty-state i { font-size: 40px; opacity: .3; }
.empty-state p { line-height: 1.7; font-size: 13px; max-width: 260px; color: var(--text-2); }

/* ── LEAD CARD ─────────────────────────────────────────────── */
.lead-list { display: flex; flex-direction: column; padding: 8px; gap: 6px; }
.lead-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .2s;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh-card); position: relative;
}
.lead-card:hover { border-color: var(--gold); background: rgba(201,153,58,.04); box-shadow: var(--sh-hover); }
.lead-card.selected { border-color: var(--gold); background: var(--gold-lo); }

.lead-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lead-card-checkbox {
  appearance: none; width: 16px; height: 16px; border: 1px solid var(--border-md); border-radius: 4px;
  background: var(--bg); cursor: pointer; flex-shrink: 0; margin-top: 2px; transition: all .15s;
}
.lead-card-checkbox:checked { background: var(--gold); border-color: var(--gold); }
.lead-card-checkbox:checked::after { content: '✓'; display: block; text-align: center; color: #07090F; font-weight: 800; font-size: 12px; line-height: 14px; }
.lead-name { font-weight: 700; font-size: 13px; color: var(--text-1); line-height: 1.3; font-family: 'Syne', sans-serif; flex: 1; }
.lead-type { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.lead-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stars { color: var(--gold); font-size: 12px; }
.rating-num { font-weight: 700; font-size: 13px; color: var(--cream); }
.reviews-num { color: var(--text-3); font-size: 11px; }

.opportunity-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.opp-high   { background: rgba(239,68,68,.18);  color: var(--red);    border: 1px solid rgba(239,68,68,.4); }
.opp-medium { background: rgba(245,158,11,.15); color: var(--orange); border: 1px solid rgba(245,158,11,.35); }
.opp-low    { background: rgba(34,197,94,.12);  color: var(--green);  border: 1px solid rgba(34,197,94,.3); }

.lead-address { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-score-bar { height: 3px; border-radius: 2px; background: var(--border); margin-top: 2px; }
.lead-score-fill { height: 100%; border-radius: 2px; transition: width .3s; }

/* ── SOLUTION TAGS ─────────────────────────────────────────── */
.solution-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sol-tag {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}
.sol-ia { background: rgba(124,92,252,.15); color: var(--purple); border: 1px solid rgba(124,92,252,.3); }
.sol-crm { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.3); }
.sol-mantenimiento { background: rgba(245,158,11,.15); color: var(--orange); border: 1px solid rgba(245,158,11,.35); }
.sol-reputacion { background: rgba(201,153,58,.15); color: var(--gold); border: 1px solid rgba(201,153,58,.35); }
.sol-reservas { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.sol-web { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.3); }

/* ── PAGE HEADER ───────────────────────────────────────────── */
.page-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; flex-wrap: wrap; gap: 10px;
}
.page-header h1 {
  font-size: 18px; display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif; font-weight: 700;
}
.page-header h1 i { color: var(--gold); }
.crm-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── CRM TABLE ─────────────────────────────────────────────── */
.crm-table-wrapper { flex: 1; overflow: auto; padding: 16px; }
.crm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.crm-table th {
  background: var(--bg3); padding: 10px 12px; text-align: left; font-weight: 700;
  color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap;
  font-size: 10px; text-transform: uppercase; letter-spacing: .05em;
}
.crm-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.crm-table tr:hover td { background: var(--bg3); }
.crm-table input[type=text] {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; width: 140px; outline: none;
  font-family: inherit;
}
.crm-table select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; outline: none; cursor: pointer;
  font-family: inherit;
}
.crm-table input[type="date"] {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-2);
  padding: 4px 6px; border-radius: 6px; font-size: 12px; outline: none; cursor: pointer; width: 130px;
  font-family: inherit;
}
.crm-table input[type="date"]:focus { border-color: var(--gold); }
.crm-table input[type="date"].followup-due {
  border-color: var(--orange); color: var(--orange);
  background: rgba(245,158,11,.1);
}
.crm-name-btn {
  background: none; border: none; color: var(--gold); font-weight: 700;
  font-size: 13px; cursor: pointer; padding: 0; text-align: left;
  text-decoration: underline; text-underline-offset: 3px; font-family: inherit;
}
.crm-name-btn:hover { opacity: .85; }

.status-badge {
  padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  white-space: nowrap;
}
.status-nuevo      { background: rgba(59,130,246,.15); color: var(--blue); }
.status-contactado { background: rgba(245,158,11,.15); color: var(--orange); }
.status-demo       { background: rgba(124,92,252,.15); color: var(--purple); }
.status-propuesta  { background: rgba(201,153,58,.15); color: var(--gold); }
.status-cerrado    { background: rgba(34,197,94,.12);  color: var(--green); }
.status-descartado { background: var(--bg3); color: var(--text-3); border: 1px solid var(--border); }

/* ── AI ASSISTANT ──────────────────────────────────────────── */
.ai-layout { flex: 1; display: flex; overflow: hidden; gap: 0; }
.ai-config-panel {
  width: 320px; min-width: 280px; border-right: 1px solid var(--border);
  padding: 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto;
}
.ai-config-panel h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-family: 'Syne', sans-serif; }
.ai-config-panel h3 i { color: var(--gold); }

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.field-group input, .field-group select, .field-group textarea {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 9px 12px; border-radius: var(--radius); font-size: 13px; outline: none;
  transition: border .2s; font-family: inherit;
}
.field-group input:focus, .field-group select:focus { border-color: var(--gold); }
.field-group select option { background: var(--bg3); }

.api-key-row { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--border); }
.api-key-row label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.api-key-row input {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 9px 12px; border-radius: var(--radius); font-size: 13px; outline: none;
}

.ai-output-panel { flex: 1; padding: 20px; display: flex; flex-direction: column; overflow: hidden; }
.ai-output { display: flex; flex-direction: column; flex: 1; overflow: hidden; gap: 10px; }
.output-header { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.output-text {
  flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; font-size: 13px; line-height: 1.7; color: var(--text-1);
  overflow-y: auto; white-space: pre-wrap; outline: none; font-family: inherit;
}
.output-text:focus { border-color: var(--gold); }

/* ── SETTINGS ──────────────────────────────────────────────── */
.settings-card {
  margin: 16px 24px; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.settings-card h3 { font-size: 14px; color: var(--text-1); font-family: 'Syne', sans-serif; font-weight: 700; }
.settings-card.danger-zone { border-color: rgba(239,68,68,.3); }
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 9px 12px; border-radius: var(--radius); font-size: 13px; outline: none;
  font-family: inherit;
}
.input-row input:focus { border-color: var(--gold); }

input[type=range] { width: 100%; accent-color: var(--gold); cursor: pointer; }

/* ── MAKE STATUS ───────────────────────────────────────────── */
.make-status {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  display: flex; align-items: center; gap: 5px;
}
.make-status-on { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.make-status-off { background: var(--bg3); color: var(--text-3); border: 1px solid var(--border); }
.make-status .fa-circle { font-size: 7px; }

/* ── DRAWER ────────────────────────────────────────────────── */
.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 420px; max-width: 95vw;
  background: var(--bg2); border-left: 1px solid var(--border-md); z-index: 1000;
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 32px rgba(0,0,0,.5);
}
.drawer:not(.hidden) { transform: translateX(0); }

.drawer-header {
  padding: 18px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.drawer-header h2 { flex: 1; font-size: 16px; line-height: 1.3; font-family: 'Syne', sans-serif; font-weight: 700; }
.drawer-close {
  background: none; border: none; color: var(--text-3); font-size: 18px;
  cursor: pointer; padding: 2px; flex-shrink: 0; transition: color .15s;
}
.drawer-close:hover { color: var(--text-1); }

.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-body::-webkit-scrollbar { width: 4px; }
.drawer-body::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 2px; }

.drawer-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rating-badge {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--gold);
}
.reviews-badge {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 12px; color: var(--text-2);
}
.score-badge {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3);
  border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--red);
}

.drawer-address, .drawer-phone, .drawer-website {
  font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 8px;
}
.drawer-website a { color: var(--gold); text-decoration: none; }
.drawer-website a:hover { text-decoration: underline; }

.drawer-section h4 { font-size: 12px; color: var(--text-3); margin-bottom: 10px; display: flex; align-items: center; gap: 7px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.drawer-section h4 i { color: var(--gold); }

.reviews-list { display: flex; flex-direction: column; gap: 10px; }
.review-item {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 12px;
}
.review-item.negative { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.04); }
.review-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.review-author { font-weight: 700; font-size: 12px; }
.review-stars { font-size: 11px; color: var(--gold); }
.review-text { font-size: 12px; color: var(--text-2); line-height: 1.5; }

.ai-insight {
  background: rgba(201,153,58,.06); border: 1px solid rgba(201,153,58,.2);
  border-radius: 8px; padding: 14px; font-size: 12px; color: var(--text-1); line-height: 1.6;
}
.ai-insight ul { padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.ai-insight strong { color: var(--gold); }

.loading-spinner { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; padding: 8px; }

.drawer-email-row { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; }
.drawer-email-row i { color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.drawer-email-row input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 10px; color: var(--text-1); font-size: 13px; font-family: inherit;
}
.drawer-email-row input:focus { outline: none; border-color: var(--gold); }
.drawer-email-row input::placeholder { color: var(--text-3); }
.drawer-actions {
  display: flex; gap: 6px; margin-top: 4px; padding-top: 14px;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.drawer-actions .btn-primary, .drawer-actions .btn-secondary {
  flex: 1; justify-content: center; min-width: 90px; padding: 8px 10px; font-size: 12px;
}

/* ── NOTIFICATIONS / TOAST ─────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border-md); border-radius: 10px;
  padding: 12px 20px; font-size: 13px; color: var(--text-1); z-index: 9000;
  box-shadow: 0 4px 24px rgba(0,0,0,.4); display: flex; align-items: center; gap: 8px;
  animation: slideUp .2s ease; white-space: nowrap;
}
.toast.success { border-color: rgba(34,197,94,.4); }
.toast.error { border-color: rgba(239,68,68,.4); }
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ── SECTOR CHIPS ──────────────────────────────────────────── */
.sector-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.sector-label { font-size: 11px; color: var(--text-3); white-space: nowrap; display: flex; align-items: center; gap: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.sector-chips, .group-chips { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; }

.chip {
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg3); color: var(--text-3);
  cursor: pointer; transition: all .15s; white-space: nowrap; font-family: inherit;
}
.chip:hover { border-color: var(--gold); color: var(--text-1); }
.chip.active { background: var(--gold-lo); border-color: var(--gold); color: var(--gold); font-weight: 700; }

.chip-group {
  padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700;
  border: 1px solid var(--border-md); background: var(--bg3); color: var(--text-2);
  cursor: pointer; transition: all .15s; white-space: nowrap; font-family: inherit;
  text-transform: uppercase; letter-spacing: .03em;
}
.chip-group:hover { border-color: var(--gold); color: var(--text-1); }
.chip-group.active { background: var(--gold); border-color: var(--gold); color: #07090F; }

.chip-toggle-all {
  font-size: 11px; color: var(--text-3); background: none; border: none;
  cursor: pointer; white-space: nowrap; text-decoration: underline;
  text-underline-offset: 2px; font-family: inherit;
}
.chip-toggle-all:hover { color: var(--text-1); }

.chip-counter {
  font-size: 11px; color: var(--text-3); white-space: nowrap; align-self: center;
  padding: 2px 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 20px;
}

/* ── SWEEP BUTTON ──────────────────────────────────────────── */
.btn-sweep {
  background: rgba(34,197,94,.12); color: var(--green);
  border: 1px solid rgba(34,197,94,.3); border-radius: var(--radius);
  padding: 10px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transition: background .2s; white-space: nowrap;
  font-family: inherit;
}
.btn-sweep:hover { background: rgba(34,197,94,.22); }
.btn-sweep:disabled { opacity: .4; cursor: not-allowed; }

.badge-no-web { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: rgba(245,158,11,.12); color: var(--orange); border: 1px solid rgba(245,158,11,.3); }
.badge-no-reply { font-size: 10px; padding: 2px 7px; border-radius: 20px; background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.badge-sweep-count { font-size: 11px; color: var(--text-2); }

.sweep-progress {
  padding: 8px 16px; background: var(--bg3); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--text-2);
}
.sweep-progress-bar { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.sweep-progress-fill { height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s; }

.btn-analyze {
  background: rgba(124,92,252,.15); color: var(--purple);
  border: 1px solid rgba(124,92,252,.35); border-radius: var(--radius);
  padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: background .2s; white-space: nowrap;
  font-family: inherit;
}
.btn-analyze:hover { background: rgba(124,92,252,.28); }
.btn-analyze:disabled { opacity: .4; cursor: not-allowed; }

.toggle-comm {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.toggle-comm input { accent-color: var(--gold); cursor: pointer; }
.comm-count {
  background: rgba(124,92,252,.2); color: var(--purple); border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-weight: 700;
}

.analyze-progress-bar {
  height: 28px; background: var(--bg3); border-bottom: 1px solid var(--border);
  position: relative; display: flex; align-items: center; padding: 0 12px;
  font-size: 11px; color: var(--text-2); gap: 10px; flex-shrink: 0;
}
.analyze-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: rgba(124,92,252,.2); transition: width .3s;
}

.comm-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  background: rgba(124,92,252,.15); color: var(--purple);
  border: 1px solid rgba(124,92,252,.3); display: flex; align-items: center; gap: 4px;
}
.comm-issues { font-size: 11px; color: var(--purple); margin-top: 2px; }

/* ── BULK BAR ──────────────────────────────────────────────── */
.bulk-bar {
  padding: 10px 16px; background: var(--gold-lo); border-bottom: 1px solid var(--gold);
  display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--gold);
  font-weight: 700;
}
.bulk-bar.hidden { display: none; }

/* ── SALES REPS GRID ───────────────────────────────────────── */
.reps-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; padding: 20px; overflow-y: auto;
}
.rep-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s; box-shadow: var(--sh-card);
}
.rep-card:hover { border-color: var(--gold); }
.rep-card-header { display: flex; align-items: center; gap: 12px; }
.rep-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-hi));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #07090F; flex-shrink: 0;
}
.rep-name { font-weight: 700; font-size: 14px; font-family: 'Syne', sans-serif; }
.rep-zone { font-size: 11px; color: var(--text-3); }
.rep-contact { display: flex; flex-direction: column; gap: 4px; }
.rep-contact span { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.rep-contact i { width: 14px; color: var(--gold); }
.rep-stats { display: flex; gap: 10px; }
.rep-stat { background: var(--bg3); border-radius: 6px; padding: 6px 10px; text-align: center; flex: 1; }
.rep-stat .val { font-size: 18px; font-weight: 800; color: var(--gold); font-family: 'Syne', sans-serif; }
.rep-stat .lbl { font-size: 10px; color: var(--text-3); }
.rep-actions { display: flex; gap: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.rep-actions button { flex: 1; justify-content: center; font-size: 12px; }

/* ── BRIEF MODAL ───────────────────────────────────────────── */
.btn-brief-channel {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg3); color: var(--text-2); font-size: 13px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-brief-channel:hover { border-color: var(--gold); color: var(--text-1); }
.btn-brief-channel.active { border-color: var(--gold); color: var(--gold); background: var(--gold-lo); font-weight: 700; }

/* ── SCROLLBAR GLOBAL ──────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: 3px; }

/* ── MULTI-CITY ────────────────────────────────────────────── */
.multicity-row {
  display: flex; align-items: center; gap: 8px; padding: 4px 0;
}
.multicity-row input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 8px 12px; border-radius: var(--radius); font-size: 13px; outline: none;
  font-family: inherit;
}
.multicity-row input:focus { border-color: var(--gold); }
.btn-multicity {
  background: var(--accent2); color: #fff; border: none; border-radius: var(--radius);
  padding: 8px 14px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: opacity .2s; font-family: inherit;
}
.btn-multicity:hover { opacity: .85; }
.btn-multicity:disabled { opacity: .4; cursor: not-allowed; }

/* ── CODE BLOCK ────────────────────────────────────────────── */
.code-block {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; font-size: 12px; line-height: 1.5; color: var(--text-2);
  overflow-x: auto; white-space: pre; font-family: 'Consolas', 'Fira Code', monospace;
  max-height: 260px;
}
.btn-copy-code {
  position: absolute; top: 8px; right: 8px; background: var(--bg3);
  color: var(--text-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  transition: color .2s, background .2s; font-family: inherit;
}
.btn-copy-code:hover { color: var(--gold); background: var(--raised); }

/* ── SEARCH HISTORY ────────────────────────────────────────── */
.search-history-section { padding: 6px 4px; border-top: 1px solid var(--border); }
.history-header {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.history-item {
  display: flex; align-items: center; gap: 7px; width: 100%;
  background: none; border: none; color: var(--text-2); font-size: 11px;
  padding: 5px 6px; border-radius: 6px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s; overflow: hidden; font-family: inherit;
}
.history-item:hover { background: var(--bg3); color: var(--text-1); }
.history-item i { font-size: 10px; flex-shrink: 0; }
.history-item span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-date { font-size: 10px; color: var(--text-3); flex-shrink: 0; }
.history-empty { font-size: 11px; color: var(--text-3); padding: 4px 6px; }

/* ── CRM FILTERS ───────────────────────────────────────────── */
.crm-filters {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.crm-search-wrap {
  display: flex; align-items: center; gap: 8px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 12px; flex: 1; min-width: 180px;
}
.crm-search-wrap i { color: var(--text-3); font-size: 13px; }
.crm-search-wrap input {
  background: none; border: none; color: var(--text-1);
  font-size: 13px; outline: none; width: 100%; font-family: inherit;
}
.crm-search-wrap input::placeholder { color: var(--text-3); }
.crm-filters select {
  background: var(--bg3); border: 1px solid var(--border); color: var(--text-1);
  padding: 6px 10px; border-radius: var(--radius); font-size: 12px;
  outline: none; cursor: pointer; font-family: inherit;
}

/* ── CRM VIEW TOGGLE ───────────────────────────────────────── */
.crm-view-toggle {
  display: flex; gap: 2px; background: var(--bg3);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 3px;
}
.btn-crm-view {
  background: none; border: none; color: var(--text-3); padding: 5px 10px;
  border-radius: 7px; cursor: pointer; font-size: 13px;
  transition: background .15s, color .15s; font-family: inherit;
}
.btn-crm-view.active { background: var(--gold); color: #07090F; }
.btn-crm-view:hover:not(.active) { background: var(--raised); color: var(--text-1); }

/* ── KANBAN BOARD ──────────────────────────────────────────── */
.crm-kanban {
  display: flex; gap: 12px; padding: 16px; overflow-x: auto;
  flex: 1; min-height: 0; align-items: flex-start;
}
.kanban-col {
  flex: 1; min-width: 240px; max-width: 300px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; max-height: calc(100vh - 200px);
  transition: border-color .2s, background .2s;
}
.kanban-col.drag-over {
  border-color: var(--gold); background: rgba(201,153,58,.06);
}
.kanban-col-header {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border); font-family: 'Syne', sans-serif;
}
.kanban-count {
  margin-left: auto; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; font-size: 11px; font-weight: 800; padding: 1px 8px; color: var(--text-2);
}
.kanban-cards {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; overflow-y: auto; flex: 1;
}
.kanban-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; cursor: pointer; transition: border-color .15s, transform .1s; user-select: none;
}
.kanban-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.kanban-card[draggable]:active { opacity: .7; }
.kanban-card-name { font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; line-height: 1.3; font-family: 'Syne', sans-serif; }
.kanban-card-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; flex-wrap: wrap; }
.kanban-card-rep { font-size: 11px; color: var(--text-3); margin-bottom: 6px; }
.kanban-card-actions {
  display: flex; gap: 6px; margin-top: 6px;
  border-top: 1px solid var(--border); padding-top: 6px;
}
.kanban-card-actions button {
  background: none; border: 1px solid var(--border); color: var(--text-3);
  border-radius: 5px; padding: 3px 7px; cursor: pointer; font-size: 11px;
  transition: background .15s, color .15s; font-family: inherit;
}
.kanban-card-actions button:hover { background: var(--bg2); color: var(--gold); }

/* ── CONTACT HISTORY ───────────────────────────────────────── */
.btn-add-contact {
  background: var(--gold-lo); color: var(--gold);
  border: 1px solid rgba(201,153,58,.25); border-radius: 6px;
  padding: 4px 10px; font-size: 11px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; transition: background .15s; font-family: inherit;
}
.btn-add-contact:hover { background: rgba(201,153,58,.2); }
.contacts-list { display: flex; flex-direction: column; gap: 6px; }
.contact-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
}
.contact-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.contact-type-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: rgba(201,153,58,.12); color: var(--gold); border: 1px solid rgba(201,153,58,.25);
}
.result-positive {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: rgba(34,197,94,.1); color: var(--green); border: 1px solid rgba(34,197,94,.25);
}
.result-negative {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: rgba(239,68,68,.1); color: var(--red); border: 1px solid rgba(239,68,68,.25);
}
.result-neutral {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px;
  background: var(--bg2); color: var(--text-3); border: 1px solid var(--border);
}
.contact-date { font-size: 10px; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.contact-note { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 2px; }

/* ── DASHBOARD ─────────────────────────────────────────────── */
.dashboard-grid {
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px; overflow-y: auto; flex: 1;
}
.dash-kpi-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
}
.dash-kpi {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.dash-kpi-val {
  font-size: 28px; font-weight: 800; color: var(--gold);
  line-height: 1.1; font-family: 'Syne', sans-serif;
}
.dash-kpi-label {
  font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; font-weight: 700;
}
.dash-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; flex: 1; min-width: 0;
}
.dash-card h3 {
  font-size: 12px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; font-family: 'Syne', sans-serif;
}
.dash-card h3 i { color: var(--gold); }
.dash-card-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
.dash-card-wide { grid-column: 1 / -1; }
.dash-bar-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.dash-bar-label {
  font-size: 12px; color: var(--text-2); min-width: 110px; max-width: 110px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-bar-track {
  flex: 1; height: 8px; background: var(--bg3); border-radius: 4px; overflow: hidden;
}
.dash-bar-fill { height: 100%; border-radius: 4px; transition: width .4s ease; background: var(--gold); }
.dash-bar-count { font-size: 12px; font-weight: 700; min-width: 24px; text-align: right; color: var(--text-1); }
.dash-rep-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.dash-rep-row:last-child { border-bottom: none; }
.dash-recent-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid var(--border);
  cursor: pointer; border-radius: 6px; transition: background .15s;
}
.dash-recent-row:last-child { border-bottom: none; }
.dash-recent-row:hover { background: var(--bg3); }
.dash-sectors, .dash-pipeline, .dash-reps-stats { display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .dash-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .dash-card-row { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .dash-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── PORTALES ──────────────────────────────────────────────── */
.portales-portales-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--sh-card);
}
.portales-header {
  display: flex; align-items: flex-start; gap: 12px;
}
.portales-header strong { font-family: 'Syne', sans-serif; font-size: 15px; color: var(--text-1); display: block; margin-bottom: 4px; }
.portales-header p { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.portales-header i { font-size: 20px; margin-top: 2px; }
.portales-actions { display: flex; flex-direction: column; gap: 10px; }
.portal-zone-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 12px;
}
.portal-zone-input i { color: var(--text-3); }
.portal-zone-input input {
  flex: 1; background: none; border: none; color: var(--text-1);
  font-size: 13px; outline: none; font-family: inherit;
}
.portales-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-portal {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text-1); border-radius: var(--radius); padding: 8px 14px;
  font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 7px;
  transition: border-color .15s, background .15s; font-family: inherit;
}
.btn-portal:hover { border-color: var(--gold); background: var(--raised); }
.portales-hint { font-size: 11px; color: var(--text-3); line-height: 1.5; }

/* ── PORTAL BADGE (particulares) ───────────────────────────── */
.portal-badge {
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  background: var(--gold-lo); color: var(--gold); border: 1px solid rgba(201,153,58,.3);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  text-transform: uppercase; letter-spacing: .03em;
}

/* ── PORTAL SUBMENU (dropdown de búsquedas por portal) ─────── */
#portal-submenu {
  position: fixed; z-index: 9000;
  background: var(--bg2); border: 1px solid var(--border-md); border-radius: 10px;
  padding: 6px; min-width: 360px; max-width: 480px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  font-family: 'Plus Jakarta Sans', sans-serif;
}
#portal-submenu .submenu-header {
  padding: 6px 10px 8px; font-size: 11px; color: var(--text-3);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
#portal-submenu a.submenu-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
  text-decoration: none; color: var(--text-1); font-size: 12px; cursor: pointer;
  transition: background .12s;
}
#portal-submenu a.submenu-row:hover { background: var(--gold-lo); }
#portal-submenu .trust-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
#portal-submenu .trust-label { flex: 1; }
#portal-submenu .external-icon { color: var(--text-3); font-size: 10px; flex-shrink: 0; }

.portal-zone-input select {
  background: var(--bg); border: 1px solid var(--border-md); color: var(--text-1);
  padding: 7px 10px; border-radius: 8px; font-size: 13px; outline: none; cursor: pointer;
  font-family: inherit;
}
.portal-zone-input select:focus { border-color: var(--gold); }

.btn-portal.particular {
  border: 1px solid rgba(201,153,58,.3);
}
.btn-portal.particular:hover { background: var(--gold-lo); border-color: var(--gold); }

/* ── MAP MARKERS ───────────────────────────────────────────── */
.gm-style .gm-style-iw-c {
  background: var(--bg2) !important; border: 1px solid var(--border-md) !important;
  border-radius: 10px !important; padding: 0 !important; max-width: 260px !important;
}
.gm-style .gm-style-iw-d { overflow: hidden !important; }
.gm-style .gm-style-iw-t::after { background: var(--bg2) !important; }
.iw-content { padding: 12px 14px; }
.iw-name { font-weight: 700; font-size: 13px; color: var(--text-1); margin-bottom: 4px; font-family: 'Syne', sans-serif; }
.iw-meta { font-size: 11px; color: var(--text-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.iw-stars { color: var(--gold); }
.iw-score { font-weight: 700; }

/* ── MOBILE RESPONSIVE ─────────────────────────────────────── */
.btn-mobile-sectors { display: none; }

@media (max-width: 768px) {
  .app-container { flex-direction: column; }
  .sidebar {
    width: 100%; min-width: unset; height: 56px; flex-direction: row;
    border-right: none; border-top: 1px solid var(--border);
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  }
  .sidebar-brand { display: none; }
  .sidebar-footer { display: none; }
  .sidebar-nav {
    flex-direction: row; flex: 1; padding: 0; gap: 0;
    justify-content: space-around; align-items: stretch;
  }
  .nav-item {
    flex: 1; flex-direction: column; padding: 4px 2px; gap: 1px;
    align-items: center; justify-content: center;
    border-radius: 0; font-size: 9px; position: relative;
  }
  .nav-item i { font-size: 16px; }
  .nav-item .badge { position: absolute; top: 4px; right: calc(50% - 20px); font-size: 9px; padding: 0 4px; }
  .main-content { flex: 1; height: calc(100vh - 56px); overflow: hidden; }
  .view { height: 100%; overflow: hidden; }
  .top-bar { padding: 6px 8px; gap: 4px; }
  .sector-row { display: none; }
  .sector-row.mobile-open { display: flex; }
  .btn-mobile-sectors {
    display: flex; align-items: center; gap: 5px;
    background: var(--bg3); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 7px 10px;
    color: var(--text-1); font-size: 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    font-family: inherit;
  }
  .btn-mobile-sectors.open { border-color: var(--gold); color: var(--gold); }
  .search-controls { gap: 5px; flex-wrap: nowrap; overflow-x: auto; }
  .select-wrapper { padding: 6px 8px; flex-shrink: 0; }
  .select-wrapper select { font-size: 12px; }
  .btn-sweep { font-size: 11px; padding: 7px 8px; }
  .results-summary { font-size: 11px; flex-wrap: wrap; gap: 6px; }
  .btn-analyze { font-size: 11px; padding: 4px 8px; }
  .content-split { flex-direction: column; flex: 1; overflow: hidden; }
  .map-wrapper { flex: 5; min-width: 0; min-height: 0; }
  .lead-panel {
    flex: 4; width: 100%; min-width: 0; min-height: 0;
    border-left: none; border-top: 1px solid var(--border); max-height: none;
  }
  .drawer {
    width: 100%; left: 0; right: 0; bottom: 56px; top: 0;
    border-left: none; transform: translateX(100%);
  }
  .drawer:not(.hidden) { transform: translateX(0); }
  .crm-table-wrapper { padding: 6px; }
  .page-header { padding: 10px 12px; }
  .page-header h1 { font-size: 14px; }
  .crm-actions { gap: 4px; }
  .crm-table th:nth-child(4), .crm-table td:nth-child(4),
  .crm-table th:nth-child(5), .crm-table td:nth-child(5),
  .crm-table th:nth-child(6), .crm-table td:nth-child(6) { display: none; }
  .reps-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 20px 16px; }
}
