:root {
  --bg:        #0C0C0E;
  --s1:        #141416;
  --s2:        #1C1C20;
  --border:    rgba(255,255,255,0.07);
  --accent:    #00E5A0;
  --accent-bg: rgba(0,229,160,0.10);
  --accent-bd: rgba(0,229,160,0.28);
  --text:      #F0F0F0;
  --text2:     #888;
  --text3:     #50505A;
  --sidebar-w: 220px;
  --topbar-h:  56px;
  --r:         8px;
  --r-sm:      5px;
}

/* ─── Tema claro ─────────────────────────────── */
.theme-light {
  --bg:        #F5F5F7;
  --s1:        #FFFFFF;
  --s2:        #EBEBED;
  --border:    rgba(0,0,0,0.08);
  --accent:    #00A876;
  --accent-bg: rgba(0,168,118,0.10);
  --accent-bd: rgba(0,168,118,0.28);
  --text:      #1A1A1E;
  --text2:     #4A4A55;
  --text3:     #8A8A95;
}

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

body {
  font-family: 'Lato', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.55;
}

/* ─── Layout ─────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--s1);
  border-right: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
}

.sidebar-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--accent);
  padding: 0 24px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  letter-spacing: -0.4px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.sidebar-nav { padding: 10px 0; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px;
  transition: color 0.14s, background 0.14s;
  position: relative;
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }

.nav-link.active {
  color: var(--accent);
  background: var(--accent-bg);
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  height: var(--topbar-h);
  background: var(--s1);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
}

.topbar-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text2);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.topbar-btn:hover {
  background: var(--s2);
  border-color: var(--accent-bd);
  color: var(--text);
}

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.content { padding: 28px; flex: 1; }

/* ─── Cards ──────────────────────────────── */
.card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 16px;
}

/* ─── Dashboard ──────────────────────────── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
}

.metric-value {
  font-family: 'Syne', sans-serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -1px;
  color: var(--text);
}

.metric-label {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.follow-list { display: flex; flex-direction: column; gap: 6px; }

.follow-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--s2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.13s;
  border: 0.5px solid transparent;
}
.follow-item:hover { border-color: var(--border); }

.follow-info { display: flex; flex-direction: column; gap: 2px; }
.follow-name { font-size: 13px; font-weight: 500; }
.follow-biz  { font-size: 11px; color: var(--text2); }
.follow-right { display: flex; align-items: center; gap: 10px; }
.follow-date  { font-family: 'IBM Plex Mono', monospace; font-size: 10px; color: var(--text3); }

.estatus-breakdown { display: flex; flex-direction: column; gap: 10px; }
.estatus-row { display: flex; align-items: center; gap: 10px; }
.estatus-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.estatus-name { flex: 1; font-size: 13px; }
.estatus-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
}

/* ─── Status Pills ───────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--pill-color) 14%, transparent);
  color: var(--pill-color);
  border: 0.5px solid color-mix(in srgb, var(--pill-color) 32%, transparent);
}

/* ─── Listado ─────────────────────────────── */
.listado-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-tabs { display: flex; gap: 4px; flex-wrap: wrap; }

.filter-tab {
  padding: 5px 13px;
  border-radius: 20px;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 12px;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  transition: all 0.13s;
}
.filter-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.18); }
.filter-tab.active {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: var(--accent-bd);
}

.search-input {
  padding: 7px 13px;
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  width: 230px;
  transition: border-color 0.13s;
}
.search-input:focus { outline: none; border-color: var(--accent-bd); }
.search-input::placeholder { color: var(--text3); }

.table-wrap { overflow-x: auto; }

.prospectos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.prospectos-table th {
  text-align: left;
  font-family: 'Syne', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text2);
  padding: 9px 14px;
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
}

.prospectos-table td {
  padding: 11px 14px;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}

.table-row { cursor: pointer; transition: background 0.1s; }
.table-row:hover { background: var(--s2); }
.table-row:last-child td { border-bottom: none; }

/* ─── Prospectos mobile cards ─────────────── */
.prospectos-mobile-cards { display: none; flex-direction: column; gap: 8px; }
.prospect-mobile-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.prospect-mobile-card:hover { border-color: var(--accent-bd); }
.prospect-mobile-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.prospect-mobile-card-info { flex: 1; min-width: 0; }
.prospect-mobile-card-nombre { font-weight: 600; font-size: 14px; }
.prospect-mobile-card-negocio { font-size: 12px; color: var(--text2); }
.prospect-mobile-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text2);
}
.prospect-mobile-card-btn {
  align-self: flex-end;
  min-height: 44px;
}

.cell-name { font-weight: 500; font-size: 13px; }
.cell-biz  { font-size: 11px; color: var(--text2); margin-top: 2px; }
.cell-trunc {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text2);
}
.cell-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
}

.tool-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.no-data { color: var(--text3); font-style: italic; }

/* ─── Forms ──────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

.form-stack { display: flex; flex-direction: column; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  padding: 9px 12px;
  transition: border-color 0.13s;
  appearance: none;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-bd);
}
input::placeholder, textarea::placeholder { color: var(--text3); }
select option { background: var(--s2); }
textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

/* ─── Buttons ─────────────────────────────── */
.btn-primary {
  padding: 10px 22px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--r-sm);
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.13s;
  letter-spacing: 0.1px;
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
  padding: 10px 20px;
  background: transparent;
  color: var(--text2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.13s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 4px 0;
  text-align: center;
  text-decoration: underline;
  opacity: 0.75;
  width: 100%;
}
.btn-link:hover { opacity: 1; }

.btn-copy {
  display: inline-block;
  padding: 5px 14px;
  background: transparent;
  color: var(--accent);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r-sm);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.13s;
  margin-top: 8px;
}
.btn-copy:hover { background: var(--accent-bg); }

/* ─── Dropzone ───────────────────────────── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 16px;
  background: var(--s2);
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
}
.dropzone:hover,
.dropzone.dz-over {
  border-color: var(--accent-bd);
  background: var(--accent-bg);
}

.dz-icon { font-size: 22px; line-height: 1; }
.dz-text { font-size: 13px; color: var(--text2); }
.dz-hint { font-size: 11px; color: var(--text3); }

.img-preview-wrap {
  position: relative;
  display: inline-flex;
  border-radius: var(--r-sm);
  overflow: visible;
}

.img-thumb {
  max-height: 120px;
  max-width: 100%;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--border);
  display: block;
  object-fit: cover;
}

.img-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EF4444;
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.img-remove:hover { background: #DC2626; }

.dz-extracting {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text2);
}

.spinner-sm {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.dz-done {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r-sm);
}

.img-thumb-sm {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 0.5px solid var(--border);
  flex-shrink: 0;
}

.dz-done-label {
  flex: 1;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.dz-reset {
  padding: 4px 10px;
  background: transparent;
  color: var(--text2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 11px;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: color 0.13s;
}
.dz-reset:hover { color: var(--text); }

.ctx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}

/* ─── Conversation tabs (paso 2) ────────── */
.conv-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 0.5px solid var(--border);
  padding-bottom: 0;
}

.conv-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}

.conv-tab:hover { color: var(--text); }

.conv-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.conv-tab-content { margin-bottom: 8px; }

.conv-textarea {
  width: 100%;
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color .15s;
}

.conv-textarea:focus {
  outline: none;
  border-color: var(--accent-bd);
}

/* ─── Funnel progress bar ────────────────── */
.embudo-bar {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
  padding: 8px 0 4px;
}

.embudo-bar::before {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 1px;
  background: var(--border);
}

.embudo-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}

.embudo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--s2);
  border: 1.5px solid var(--border);
  transition: background .2s, border-color .2s;
}

.embudo-step.done .embudo-dot {
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  border-color: var(--accent);
}

.embudo-step.active .embudo-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.embudo-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
  max-width: 60px;
}

.embudo-step.active .embudo-label {
  color: var(--accent);
  font-weight: 700;
}

.embudo-step.done .embudo-label { color: var(--text); }

/* ─── Step 4 sections ────────────────────── */
.step4-section {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 16px;
}

.step4-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.prompt-textarea {
  width: 100%;
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  padding: 14px;
  resize: vertical;
  min-height: 220px;
  box-sizing: border-box;
}

.prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn-prompt-copy {
  padding: 8px 16px;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--accent-bd);
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.btn-prompt-copy:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  border-color: var(--accent);
}

.prompt-note {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* ─── Conversation result card ──────────── */
.conv-result {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conv-result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.conv-result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.conv-estatus-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: color-mix(in srgb, var(--pill-color) 15%, transparent);
  color: var(--pill-color);
  border: 0.5px solid color-mix(in srgb, var(--pill-color) 40%, transparent);
  width: fit-content;
}

.conv-intencion {
  font-size: 12px;
  color: var(--text-muted);
}

.conv-intencion strong {
  color: var(--text);
  text-transform: capitalize;
}

.conv-resumen {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

.conv-nota {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  border-left: 2px solid var(--accent-bd);
  padding-left: 10px;
}

.conv-fecha {
  font-size: 12px;
  color: var(--accent);
}

.conv-ultimo {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.conv-ultimo span {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

/* ─── Wizard ─────────────────────────────── */
.wizard-wrap { max-width: 700px; margin: 0 auto; }

.wizard-steps {
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
  position: relative;
}
.wizard-steps::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 8%;
  right: 8%;
  height: 0.5px;
  background: var(--border);
}

.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
  z-index: 1;
}

.step-dot {
  width: 27px; height: 27px;
  border-radius: 50%;
  border: 0.5px solid var(--border);
  background: var(--s1);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text3);
  transition: all 0.18s;
}
.wizard-step.active .step-dot  { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.wizard-step.done   .step-dot  { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }

.step-label {
  font-size: 10.5px;
  color: var(--text3);
  text-align: center;
  white-space: nowrap;
}
.wizard-step.active .step-label { color: var(--accent); }
.wizard-step.done   .step-label { color: var(--text2); }

.wizard-body {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 28px;
}

.wizard-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 22px;
  letter-spacing: -0.3px;
}

.wizard-desc {
  font-size: 13px;
  color: var(--text3);
  margin-top: -14px;
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Reconocimiento result ── */
.recon-result {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 16px;
}
.recon-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.recon-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'IBM Plex Mono', monospace;
}
.recon-badge-bot    { background: rgba(239,68,68,0.15); color: #EF4444; }
.recon-badge-auto   { background: rgba(245,158,11,0.15); color: #F59E0B; }
.recon-badge-humano { background: rgba(16,185,129,0.15); color: #10B981; }
.recon-badge-fuera  { background: rgba(245,158,11,0.15); color: #F59E0B; }
.recon-grid { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.recon-row  { display: flex; justify-content: space-between; font-size: 12.5px; }
.recon-key  { color: var(--text3); }
.recon-section-title { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin: 10px 0 6px; }
.recon-info-list { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--text2); }
.recon-info-list li { margin-bottom: 3px; }
.recon-empty { font-size: 12.5px; color: var(--text3); margin: 0; }
.recon-obs   { font-size: 12.5px; color: var(--text2); line-height: 1.5; margin: 0; }
.recon-ventaja {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(0,229,160,0.08);
  border-left: 2px solid var(--accent);
  border-radius: 4px;
  font-size: 12.5px;
  color: var(--text2);
}
.recon-gancho {
  background: rgba(0,229,160,0.06);
  border: 1px solid rgba(0,229,160,0.25);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.recon-gancho-texto {
  font-size: 13px;
  color: var(--text1);
  line-height: 1.55;
  margin: 0;
}
.recon-gancho-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.recon-usar-gancho { font-size: 12px; padding: 5px 12px; }

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 0.5px solid var(--border);
}

/* ─── Spinner ─────────────────────────────── */
.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 52px 0;
  gap: 18px;
}
.spinner {
  width: 34px; height: 34px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-text { color: var(--text2); font-size: 13px; }

/* ─── Diagnóstico ─────────────────────────── */
.diag-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}

.diag-card {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
}
.diag-card.full { grid-column: 1 / -1; }

.diag-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text2);
  margin-bottom: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}
.diag-val { font-size: 13px; line-height: 1.55; }
.diag-val.gancho { color: var(--accent); }

.nivel-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.nivel-alta   { background: rgba(239,68,68,0.13);   color: #EF4444; }
.nivel-media  { background: rgba(245,158,11,0.13);  color: #F59E0B; }
.nivel-baja   { background: rgba(16,185,129,0.13);  color: #10B981; }

.herramienta-badge {
  padding: 12px 16px;
  background: var(--accent-bg);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r-sm);
  color: var(--accent);
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.mensaje-preview {
  padding: 12px 14px;
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.65;
  min-height: 58px;
}

/* ─── Wizard Resumen (paso 5) ─────────────── */
.resumen-wrap {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 20px;
  margin-bottom: 4px;
}
.resumen-header { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 0.5px solid var(--border); }
.resumen-giro { font-size: 12px; color: var(--text2); margin-top: 4px; }
.resumen-diag { display: flex; flex-direction: column; gap: 10px; }
.resumen-row { display: flex; gap: 12px; align-items: center; }
.resumen-row span:first-child {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  width: 78px;
  flex-shrink: 0;
}

/* ─── Ficha ──────────────────────────────── */
.ficha-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.ficha-contact { display: flex; flex-direction: column; gap: 2px; }
.contact-name {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin-bottom: 2px;
}
.contact-biz  { color: var(--accent); font-size: 13px; margin-bottom: 12px; }

.contact-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--border);
  gap: 12px;
}
.contact-detail span:first-child {
  color: var(--text2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.contact-detail span:last-child { text-align: right; }
.url-link { color: var(--accent); text-decoration: none; font-size: 12px; }
.url-link:hover { text-decoration: underline; }

.diag-section { display: flex; flex-direction: column; gap: 12px; }
.diag-row { display: flex; gap: 12px; align-items: flex-start; }
.diag-key {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  width: 76px;
  flex-shrink: 0;
  padding-top: 2px;
}
.diag-full-val { font-size: 13px; line-height: 1.55; flex: 1; }

.gancho-text { font-size: 13px; line-height: 1.7; color: var(--text2); font-style: italic; }

.estatus-current { margin-bottom: 8px; }

/* ─── Timeline ───────────────────────────── */
.timeline { display: flex; flex-direction: column; }

.timeline-item {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }

.timeline-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.timeline-action { font-size: 13px; font-weight: 500; }
.timeline-nota   { font-size: 12px; color: var(--text2); margin-top: 3px; }
.timeline-fecha  {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--text3);
  margin-top: 4px;
}

/* ─── Misc ───────────────────────────────── */
.loading {
  color: var(--text2);
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  color: var(--text3);
  font-size: 13px;
  padding: 24px 0;
  text-align: center;
  font-style: italic;
}

.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }

/* ─── Toast ──────────────────────────────── */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  z-index: 99999;
  opacity: 0;
  white-space: nowrap;
  box-shadow: 0 8px 28px rgba(0,0,0,.28), 0 2px 8px rgba(0,0,0,.18);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.ok          { background: #1B2A4A; color: #fff; }
.toast.error       { background: #C53030; color: #fff; }
.toast.toast-red   { background: #C53030; color: #fff; }
.toast.toast-yellow{ background: #B7791F; color: #fff; }

/* ─── Responsive — 960px ─────────────────── */
@media (max-width: 960px) {
  .metrics-grid    { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid  { grid-template-columns: 1fr; }
  .ficha-grid      { grid-template-columns: 1fr; }
  .form-grid       { grid-template-columns: 1fr; }
}

/* ─── Sidebar overlay (móvil) ────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 99;
}
.sidebar-overlay.sidebar-overlay-visible { display: block; }

/* ─── Hamburger (sólo móvil) ─────────────── */
.hamburger-btn { display: none; }

/* ─── Responsive — 768px (tablet/móvil) ─── */
@media (max-width: 768px) {

  /* Sidebar se oculta y desliza */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    transition: transform 0.25s ease;
    z-index: 200;
  }
  .sidebar.sidebar-open { transform: translateX(0); }

  /* Contenido ocupa todo el ancho */
  .main { margin-left: 0; }

  /* Hamburguesa visible */
  .hamburger-btn { display: flex; }

  /* Topbar en móvil */
  .topbar { padding: 0 14px; gap: 6px; }
  .topbar-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .topbar-search-wrap {
    margin-left: 0;
    width: 32px;
    transition: width 0.25s ease;
    overflow: hidden;
  }
  .topbar-search-wrap:focus-within {
    width: 180px;
  }
  .topbar-search { width: 100%; font-size: 16px; }
  .topbar-btn { width: 28px; height: 28px; font-size: 14px; }

  /* Touch targets */
  .btn-primary, .btn-ghost, .btn-outline, .nav-link,
  .hoy-btn, .btn-sm, .btn-primary-sm {
    min-height: 44px;
  }
  .nav-link { padding: 12px 24px; }

  /* Inputs */
  input, textarea, select { font-size: 16px !important; }

  /* Contenido */
  .content { padding: 14px; }

  /* Dashboard */
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .semana-grid  { grid-template-columns: repeat(2, 1fr); }

  /* Vista Hoy: cards ocupan todo el ancho */
  .hoy-btns {
    flex-direction: column;
    gap: 6px;
  }
  .hoy-btn { min-width: unset; width: 100%; min-height: 44px; }

  /* Vista Prospectos: tabla → cards apiladas */
  .prospectos-table { display: none; }
  .prospectos-mobile-cards { display: flex; flex-direction: column; gap: 8px; }

  /* Embudo: columnas apiladas verticalmente */
  .embudo-wrap { overflow-x: unset; }
  .embudo-cols { flex-direction: column; min-width: unset; }
  .embudo-col  { width: 100%; max-height: unset; }

  /* Wizard: ocultar pasos, mostrar indicador simple */
  .wizard-steps { display: none; }
  .wizard-step-mobile {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    margin-bottom: 18px;
    padding: 8px 16px;
    background: var(--accent-bg);
    border: 1px solid var(--accent-bd);
    border-radius: var(--r-sm);
  }
  .wizard-body { padding: 18px; }
  .form-grid   { grid-template-columns: 1fr; }
  .diag-grid   { grid-template-columns: 1fr; }

  /* Ficha modal: pantalla completa */
  .modal-ficha-overlay { padding: 0; }
  .modal-ficha {
    width: 100%;
    height: 100%;
    max-width: 100%;
    border-radius: 0;
  }
  .ficha-grid { grid-template-columns: 1fr; }

  /* Modal genérico */
  .modal-overlay { align-items: flex-end; }
  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--r) var(--r) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Calendario */
  .cal-wrap { grid-template-columns: 1fr; }
  .cal-panel { position: static; }
  .cal-day   { min-height: 60px; }

  /* Demos grid */
  .demos-grid { grid-template-columns: 1fr; }

  /* Seguimientos */
  .seg-card-top { flex-wrap: wrap; }
}

/* ─── Responsive — 480px (sólo móvil) ────── */
@media (max-width: 480px) {
  .metrics-grid  { grid-template-columns: 1fr; }
  .semana-grid   { grid-template-columns: repeat(2, 1fr); }
  .content       { padding: 10px; }
  .topbar-search-wrap:focus-within { width: 150px; }
  .cal-grid { gap: 1px; }
  .cal-day-num { font-size: 11px; }
  .cal-chip    { font-size: 9px; padding: 1px 3px; }
}

/* Ocultar indicador simple en escritorio */
.wizard-step-mobile { display: none; }

/* ─── Topbar search ─────────────────────── */
.topbar-search-wrap { position: relative; margin-left: auto; }
.topbar-search {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  padding: 6px 12px;
  width: 210px;
  outline: none;
  transition: border-color 0.14s;
}
.topbar-search::placeholder { color: var(--text3); }
.topbar-search:focus { border-color: var(--accent); }
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  z-index: 200;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 0.5px solid var(--border);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.04); }
.search-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-info {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.search-nombre {
  font-size: 13px; color: var(--text); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-negocio {
  font-size: 11px; color: var(--text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Vista de Hoy ───────────────────────── */
.hoy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}
.hoy-saludo {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.hoy-fecha-str {
  font-size: 12px;
  color: var(--text3);
  margin-top: 3px;
  text-transform: capitalize;
}
.hoy-metricas { display: flex; gap: 24px; }
.hoy-metrica { display: flex; flex-direction: column; align-items: center; }
.hoy-metrica-val {
  font-family: 'Syne', sans-serif;
  font-size: 26px; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.hoy-metrica-val.dim  { color: var(--text2); }
.hoy-metrica-val.warn { color: #EF4444; }
.hoy-metrica-label {
  font-size: 10px; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px;
}
.hoy-section-title {
  font-family: 'Syne', sans-serif;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text2);
  margin: 24px 0 12px;
}
.hoy-card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 10px;
}
.hoy-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.hoy-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.hoy-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.hoy-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.hoy-nombre { font-size: 14px; font-weight: 600; color: var(--text); }
.hoy-negocio { font-size: 12px; color: var(--text3); }
.hoy-score {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  line-height: 1; flex-shrink: 0;
}
.hoy-score.sm { font-size: 16px; }
.hoy-herramienta {
  font-size: 11px; color: var(--text3);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px; border-radius: 999px;
  border: 0.5px solid var(--border);
}
.hoy-msg-wrap {
  background: rgba(255,255,255,0.03);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.hoy-msg-prev { font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.hoy-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.hoy-btn {
  flex: 1; min-width: 110px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px; font-weight: 500;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: center;
}
.hoy-btn:hover { background: rgba(255,255,255,0.09); color: var(--text); }
.hoy-btn.hoy-btn-contact {
  background: var(--accent-bg); color: var(--accent); border-color: var(--accent-bd);
}
.hoy-btn.hoy-btn-contact:hover { background: rgba(0,229,160,0.15); }
.hoy-card-sm {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.hoy-fecha { font-size: 11px; color: var(--text3); margin-left: auto; flex-shrink: 0; }
.hoy-badge-warn {
  font-size: 11px; color: #F59E0B;
  background: rgba(245,158,11,0.1);
  padding: 2px 8px; border-radius: 999px;
  border: 0.5px solid rgba(245,158,11,0.3);
  margin-left: auto; flex-shrink: 0;
}

/* ─── Alertas de atención requerida ─────────────────── */
.alertas-section {
  border-left: 3px solid #EF4444;
  padding-left: 14px;
  margin-bottom: 20px;
}
.alerta-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(239,68,68,0.06);
  border: 0.5px solid rgba(239,68,68,0.25);
  border-radius: var(--r);
  padding: 10px 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.alerta-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.alerta-info {
  flex: 1;
  min-width: 0;
}
.alerta-nombre {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.alerta-negocio {
  font-size: 11px;
  color: var(--text2);
  font-weight: 400;
  margin-left: 4px;
}
.alerta-detalle {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}
.alerta-badge-red {
  background: #EF4444 !important;
  color: #fff !important;
}
.dup-info-card {
  background: rgba(255,255,255,0.04);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  color: var(--text);
}

/* ─── Análisis de anuncio ────────────────── */
.anuncio-result {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 14px;
}
.anuncio-result-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.anuncio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(249,115,22,0.15);
  color: #F97316;
  border: 0.5px solid rgba(249,115,22,0.4);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.2px;
}
.anuncio-heridas {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.anuncio-heridas li {
  font-size: 12.5px;
  color: #F59E0B;
  background: rgba(245,158,11,0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 0.5px solid rgba(245,158,11,0.2);
}
.anuncio-oportunidad {
  background: rgba(16,185,129,0.08);
  border: 0.5px solid rgba(16,185,129,0.25);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin: 10px 0;
}
.anuncio-oportunidad p {
  font-size: 13px;
  color: #10B981;
  margin: 4px 0 0;
}
.anuncio-gancho {
  background: rgba(0,229,160,0.06);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r-sm);
  padding: 12px;
}

/* ─── Notas rápidas (ficha) ─────────────── */
.notas-rapidas {}
.notas-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.notas-input-wrap textarea {
  flex: 1;
  resize: vertical;
  min-height: 60px;
}
.nota-item {
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--s2);
  transition: opacity 0.2s;
}
.nota-item.nota-tachada .nota-texto {
  text-decoration: line-through;
  color: var(--text3);
}
.nota-item.nota-tachada {
  opacity: 0.5;
}
.nota-texto {
  font-size: 13px;
  margin: 0 0 4px;
  color: var(--text);
  white-space: pre-wrap;
}
.nota-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nota-fecha {
  font-size: 11px;
  color: var(--text3);
}
.nota-tachar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.nota-tachar-btn:hover { color: #EF4444; }

/* ─── Plantillas ─────────────────────────── */
.plantillas-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.plantillas-header {}
.plantilla-filtros {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plantilla-filtros-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plantilla-filtro-btn {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  color: var(--text2);
  font-size: 12px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.plantilla-filtro-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.plantilla-filtro-btn.active {
  background: var(--accent-bg);
  border-color: var(--accent-bd);
  color: var(--accent);
  font-weight: 600;
}
.plantilla-industria {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plantilla-industria-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text3);
  padding: 4px 0;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 2px;
}
.plantilla-card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s;
}
.plantilla-card:hover { border-color: rgba(255,255,255,0.15); }
.plantilla-texto {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}
.plantilla-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Selector de prospecto (modal) ──────── */
.selector-lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
}
.selector-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.selector-item:hover { background: var(--s2); border-color: rgba(255,255,255,0.15); }
.selector-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.selector-info { display: flex; flex-direction: column; gap: 2px; }
.selector-nombre { font-size: 13px; font-weight: 600; color: var(--text); }
.selector-negocio { font-size: 11px; color: var(--text3); }

/* ─── Sitio web result ─────────────────── */
.sitio-result {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 14px;
}
.sitio-result-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sitio-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  letter-spacing: 0.2px;
}
.sitio-badge-ok {
  background: rgba(16,185,129,0.12);
  color: #10B981;
  border: 0.5px solid rgba(16,185,129,0.35);
}
.sitio-badge-no {
  background: rgba(239,68,68,0.12);
  color: #EF4444;
  border: 0.5px solid rgba(239,68,68,0.35);
}
.sitio-badge-vel {
  background: rgba(99,102,241,0.12);
  color: #818CF8;
  border: 0.5px solid rgba(99,102,241,0.3);
}
.sitio-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.sitio-features span {
  font-size: 12px;
  color: var(--text2);
  background: var(--s2);
  padding: 3px 10px;
  border-radius: 6px;
  border: 0.5px solid var(--border);
}

/* ─── Perfil social result ──────────────── */
.perfil-result {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-top: 14px;
}
.perfil-badge-ig {
  background: rgba(225,48,108,0.13);
  color: #E1306C;
  border: 0.5px solid rgba(225,48,108,0.35);
}
.perfil-badge-fb {
  background: rgba(24,119,242,0.13);
  color: #4293f5;
  border: 0.5px solid rgba(24,119,242,0.35);
}
.perfil-badge-tt {
  background: rgba(0,0,0,0.3);
  color: #E0E0E0;
  border: 0.5px solid rgba(255,255,255,0.18);
}
.perfil-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}
.perfil-stat {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}
.perfil-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.perfil-stat-lbl {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.perfil-heridas {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.perfil-heridas li {
  font-size: 12.5px;
  color: #F59E0B;
  background: rgba(245,158,11,0.08);
  padding: 4px 10px;
  border-radius: 6px;
  border: 0.5px solid rgba(245,158,11,0.2);
}

/* ─── Exportar ───────────────────────────── */
.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.export-btn:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: var(--s1);
}

/* ─── Semana en números ───────────────────── */
.semana-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.semana-stat {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.semana-stat-accent {
  background: var(--accent-bg);
  border-color: var(--accent-bd);
}
.semana-val {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.semana-stat-accent .semana-val { color: var(--accent); }
.semana-lbl {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1.3;
}

/* ─── Dashboard agenda ───────────────────── */
.card-header { display: flex; align-items: center; justify-content: space-between; }
.card-header-link { font-size: 11px; color: var(--accent); text-decoration: none; font-weight: 600; }
.card-header-link:hover { text-decoration: underline; }

/* ── Conversaciones guardadas (ficha) ── */
.conv-hist-list { display: flex; flex-direction: column; gap: 10px; }
.conv-hist-item {
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  background: var(--surface2);
}
.conv-hist-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.conv-hist-fuente { font-size: 0.78rem; color: var(--text2); }
.conv-hist-fecha  { font-size: 0.75rem; color: var(--text3); margin-left: auto; }
.conv-hist-resumen { font-size: 0.82rem; color: var(--text); margin: 0 0 4px; line-height: 1.45; }
.conv-hist-seg    { font-size: 0.78rem; color: var(--accent); }

.agenda-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  background: var(--s2);
  transition: background .15s;
}
.agenda-item:hover { background: rgba(255,255,255,0.04); }
.agenda-info { flex: 1; min-width: 0; }
.agenda-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.agenda-btns { display: flex; gap: 4px; }
.seg-btn-sm {
  padding: 3px 7px;
  border-radius: var(--r-sm);
  border: 0.5px solid var(--border);
  background: var(--s1);
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.seg-btn-sm:hover { background: var(--s2); color: var(--text); }

/* ─── Seguimiento suggestion card (step 5) ── */
.sug-card {
  background: var(--s1);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r);
  padding: 20px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.sug-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.sug-prob {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: color-mix(in srgb, var(--pill-color) 18%, transparent);
  color: var(--pill-color);
  border: 0.5px solid color-mix(in srgb, var(--pill-color) 35%, transparent);
}
.sug-accion {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.sug-fecha {
  font-size: 13px;
  color: var(--accent);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sug-razon {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}
.sug-msg-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sug-msg {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  font-family: 'IBM Plex Mono', monospace;
  white-space: pre-wrap;
}

/* ─── Seguimientos view ──────────────────── */
.seg-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.seg-count { font-size: 12px; color: var(--text2); }
.seg-date-input {
  padding: 6px 10px;
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--s1);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.seg-lista { display: flex; flex-direction: column; gap: 12px; }

.seg-card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .15s;
}
.seg-card:hover { border-color: rgba(255,255,255,0.14); }

.seg-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.seg-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bd);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.seg-avatar.sm { width: 30px; height: 30px; font-size: 11px; }

.seg-info { flex: 1; min-width: 0; }
.seg-nombre { font-size: 14px; font-weight: 600; color: var(--text); }
.seg-negocio { font-size: 12px; color: var(--text2); }
.seg-giro { color: var(--text3); }

.seg-time-block { text-align: right; }
.seg-hora { font-size: 18px; font-weight: 700; color: var(--text); font-family: 'Syne', sans-serif; }
.seg-fecha-mini { font-size: 11px; color: var(--text2); }

.seg-pills { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

.seg-msg-wrap {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.seg-msg-preview, .seg-msg-full {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}
.seg-msg-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  text-align: left;
  width: fit-content;
}

.seg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.seg-btn {
  font-size: 12px;
  padding: 5px 12px;
}

/* ─── Modal (Reagendar) ──────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  width: 360px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--border);
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close {
  background: none; border: none;
  color: var(--text2); font-size: 20px;
  cursor: pointer; padding: 0; line-height: 1;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 0.5px solid var(--border);
}

/* ── Modal Ficha ── */
.modal-ficha-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-ficha {
  background: var(--surface);
  border-radius: var(--r);
  width: 90vw; max-width: 1100px;
  height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-ficha-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.modal-ficha-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-ficha-close {
  background: none; border: none;
  color: var(--text2); font-size: 22px;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.modal-ficha-close:hover { color: var(--text); }
.modal-ficha-body {
  flex: 1; overflow-y: auto;
  padding: 20px;
}

/* ── Resumen inteligente ── */
.resumen-card {
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.resumen-row { display: flex; flex-direction: column; gap: 3px; }
.resumen-key { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); }
.resumen-val { font-size: 0.85rem; color: var(--text); line-height: 1.5; margin: 0; }

/* ── Embudo (Kanban) ── */
.embudo-wrap { overflow-x: auto; padding-bottom: 12px; }
.embudo-cols {
  display: flex; gap: 12px;
  min-width: fit-content;
  align-items: flex-start;
}
.embudo-col {
  width: 220px; flex-shrink: 0;
  background: var(--surface2);
  border-radius: var(--r);
  border: 0.5px solid var(--border);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 160px);
}
.embudo-col-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: 0;
  background: var(--surface2);
  border-radius: var(--r) var(--r) 0 0;
  font-size: 13px; font-weight: 600;
}
.embudo-col-count {
  background: var(--surface3);
  color: var(--text2);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}
.embudo-col-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.embudo-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.13s, transform 0.1s;
  display: flex; flex-direction: column; gap: 5px;
}
.embudo-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.embudo-card-nombre { font-size: 13px; font-weight: 600; color: var(--text); }
.embudo-card-biz { font-size: 11px; color: var(--text2); }
.embudo-card-seg { font-size: 11px; color: var(--text3); }
.embudo-card-tool { margin-top: 2px; }
.embudo-empty { font-size: 12px; color: var(--text3); text-align: center; padding: 16px 0; }

/* ─── Modo selector ──────────────────────── */
.modo-selector {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 0;
}

.modo-selector-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  text-align: center;
}

.modo-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modo-card {
  background: var(--s1);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 28px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}

.modo-card:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: translateY(-2px);
}

.modo-card-icon {
  font-size: 32px;
  line-height: 1;
}

.modo-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.modo-card-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
  flex: 1;
}

.modo-card-btn {
  margin-top: 6px;
  pointer-events: none;
}

.modo-card-btn-secondary {
  background: var(--s2);
  color: var(--text);
  border: 0.5px solid var(--border);
}

.modo-card:hover .modo-card-btn-secondary {
  background: var(--accent);
  color: #000;
  border-color: transparent;
}

/* ─── Registro manual ────────────────────── */
.registro-manual {
  max-width: 700px;
  margin: 0 auto;
}

.rm-grid {
  margin-top: 20px;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .modo-cards { grid-template-columns: 1fr; }
}

/* ─── Modal wide ────────────────────────── */
.modal-box-wide {
  width: 680px;
  max-width: 96vw;
  max-height: 90vh;
  overflow-y: auto;
}

.card-desc {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ─── Registro manual fases ─────────────── */
.rm-saltar {
  display: block;
  margin: 4px 0 0;
  text-align: left;
  font-size: 12px;
}

.rm-fase2-sep {
  height: 1px;
  background: var(--border);
  margin: 20px 0 18px;
}

/* ─── Gemini integration ─────────────────── */
.gemini-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 8px;
}

.gemini-btn-analizar {
  align-self: flex-start;
  color: var(--accent);
  border-color: var(--accent-bd);
}
.gemini-btn-analizar:hover { background: var(--accent-bg); color: var(--accent); }

.gemini-prompt-box {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gemini-import-box {
  border: 1.5px dashed var(--accent-bd);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--accent-bg);
}

.gemini-box-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.gemini-box-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
}

.gemini-prompt-textarea {
  width: 100%;
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text2);
  font-family: 'Lato', monospace;
  font-size: 12px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.55;
}

.gemini-resumen {
  background: var(--s1);
  border: 0.5px solid var(--accent-bd);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gemini-resumen-title {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.gemini-resumen-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
}
.gemini-resumen-field:last-of-type { border-bottom: none; }

.gemini-resumen-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gemini-resumen-val {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ─── Calendario ─────────────────────────────────────── */
.cal-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.cal-main { display: flex; flex-direction: column; gap: 12px; }

.cal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--border);
}

.cal-titulo {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.cal-nav {
  font-size: 22px;
  line-height: 1;
  padding: 4px 10px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0;
}

.cal-day {
  min-height: 90px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cal-day:hover { border-color: var(--accent-bd); background: var(--s2); }

.cal-day-other {
  opacity: 0.35;
  pointer-events: none;
}

.cal-day-today .cal-day-num {
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.cal-day-selected {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day-chips {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.cal-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  max-width: 100%;
}

.cal-chip-nuevo       { background: rgba(59,130,246,0.25);  color: #93c5fd; }
.cal-chip-demo        { background: rgba(245,158,11,0.25);  color: #fcd34d; }
.cal-chip-respondio   { background: rgba(16,185,129,0.25);  color: #6ee7b7; }
.cal-chip-negociacion { background: rgba(139,92,246,0.25);  color: #c4b5fd; }
.cal-chip-cerrado     { background: rgba(22,163,74,0.25);   color: #86efac; }
.cal-chip-frio        { background: rgba(107,114,128,0.25); color: #9ca3af; }
.cal-chip-more        { background: var(--s2); color: var(--text2); font-style: italic; }

/* ─── Panel lateral ──────────────────────────────────── */
.cal-panel {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  position: sticky;
  top: 16px;
}

.cal-panel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.cal-panel-hint {
  text-align: center;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.7;
}

.cal-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--s2);
}

.cal-panel-fecha {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: capitalize;
}

.cal-panel-list {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.cal-panel-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.cal-panel-item:last-child { border-bottom: none; }

.cal-panel-avatar {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  align-self: start;
}

.cal-panel-info { display: flex; flex-direction: column; gap: 3px; }
.cal-panel-nombre { font-weight: 600; font-size: 13px; }
.cal-panel-negocio { font-size: 11px; color: var(--text2); }

.cal-panel-btns {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-primary-sm {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary-sm:hover { opacity: 0.85; }

/* ─── Biblioteca de Demos ───────────────────────────── */
.demos-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.demos-filtros {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
}

.demos-filtros-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
  margin-bottom: 6px;
}

.demos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) { .demos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .demos-grid { grid-template-columns: 1fr; } }

.demo-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}

.demo-card:hover {
  border-color: var(--accent-bd);
  transform: translateY(-2px);
}

.demo-thumb {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--s2);
}

.demo-thumb-placeholder {
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: var(--s2);
  border-bottom: 1px solid var(--border);
}

.demo-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.demo-nombre {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}

.demo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.demo-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.demo-badge-ind  { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-bd); }
.demo-badge-herr { background: var(--s2); color: var(--text2); border: 1px solid var(--border); }

.demo-desc {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}

.demo-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--s2);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  margin-top: 2px;
}

.demo-url-text {
  flex: 1;
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-usado {
  font-size: 11px;
  color: var(--text2);
  font-style: italic;
}

.demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

/* ─── Atajos de teclado ─────────────────────── */
.shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.shortcuts-modal {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  width: 320px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.shortcuts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--s2);
}

.shortcuts-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.shortcuts-list {
  padding: 10px 0;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 18px;
  transition: background 0.1s;
}

.shortcut-item:hover { background: var(--s2); }

.shortcut-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.shortcut-desc {
  font-size: 13px;
  color: var(--text2);
}

/* ─── Notas: fila de botones ─────────────── */
.notas-input-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Widget de nota de voz ──────────────── */
.voz-widget {
  margin-top: 8px;
  padding: 12px;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.voz-options {
  display: flex;
  gap: 10px;
}

.voz-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  color: var(--text);
  font-size: 13px;
}

.voz-btn:hover { border-color: var(--accent-bd); background: var(--accent-bg); }

.voz-btn-icon { font-size: 22px; line-height: 1; }
.voz-btn-label { font-size: 12px; color: var(--text2); }

.voz-recording {
  border-color: #EF4444 !important;
  background: rgba(239,68,68,0.08) !important;
}

.voz-recording .voz-btn-label { color: #EF4444; }

.voz-recording-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #EF4444;
  margin-top: 8px;
}

.voz-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  animation: voz-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes voz-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

.voz-transcribiendo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text2);
  padding: 8px 0;
}

.voz-status { margin-top: 8px; }

.voz-tab-wrap { display: flex; flex-direction: column; gap: 10px; }

.voz-texto-resultado {
  background: var(--s2);
  border: 1px solid var(--accent-bd);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}

.voz-texto-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.voz-texto-content {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Patrones de contacto / heatmap ── */
.patrones-section { margin-bottom: 20px; }

.patrones-nota {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
  font-style: italic;
}

.patrones-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .patrones-cards { grid-template-columns: repeat(2, 1fr); }
}

.patron-card {
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
  text-align: center;
}

.patron-card-best { border-color: var(--green); background: color-mix(in srgb, var(--green) 10%, var(--s2)); }
.patron-card-worst { border-color: var(--red, #e74c3c); background: color-mix(in srgb, var(--red, #e74c3c) 10%, var(--s2)); }

.patron-icon { font-size: 20px; margin-bottom: 4px; }
.patron-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.patron-val { font-size: 16px; font-weight: 700; color: var(--text); }

/* Heatmap grid */
.heatmap-wrap { overflow-x: auto; }

.heatmap-dias-header,
.heatmap-row {
  display: grid;
  grid-template-columns: 44px repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 3px;
}

.heatmap-hora-label {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.heatmap-dia-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  padding-bottom: 4px;
}

.heatmap-cell {
  height: 32px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) calc(var(--intensity, 0%) * 0.9 + 10%), var(--s2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 80%, var(--text));
  cursor: default;
  transition: transform 0.1s;
}

.heatmap-cell:hover { transform: scale(1.15); z-index: 1; position: relative; }
.heatmap-cell-empty { background: var(--s2); opacity: 0.4; }

/* ── Prospector de anunciantes ── */
.prospector-wrap { display: flex; flex-direction: column; gap: 20px; }

.prospector-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.prospector-instrucciones {
  margin-top: 14px;
  background: color-mix(in srgb, var(--accent) 8%, var(--s2));
  border: 1px solid var(--accent-bd);
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.prospector-instrucciones ol { margin: 6px 0 0 16px; padding: 0; }
.prospector-instrucciones a  { color: var(--accent); }

.prospector-resumen {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.prospector-nota {
  font-style: italic;
  font-size: 12px;
}

.prospector-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  .prospector-cards-grid { grid-template-columns: 1fr; }
}

.prospector-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
}

.prospector-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.15); }

.prospector-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.prospector-nombre {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.prospector-giro-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--s2));
  border: 1px solid var(--accent-bd);
  border-radius: 20px;
  padding: 2px 8px;
  margin-top: 4px;
}

.prospector-fuente {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.prospector-fuente:hover { color: var(--accent); }

.prospector-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.prospector-heridas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prospector-herida {
  font-size: 11px;
  background: color-mix(in srgb, #f59e0b 12%, var(--s2));
  border: 1px solid color-mix(in srgb, #f59e0b 30%, transparent);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--text);
}

.prospector-oportunidad {
  font-size: 12px;
  font-weight: 600;
  color: var(--green, #10b981);
  background: color-mix(in srgb, var(--green, #10b981) 10%, var(--s2));
  border-radius: 4px;
  padding: 4px 8px;
}

.prospector-contacto-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prospector-contacto-item {
  font-size: 12px;
  color: var(--text);
}

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

.prospector-redes {
  font-size: 12px;
  color: var(--text-muted);
}

.prospector-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* ─── Prospector tabs ─────────────────────────── */
.prospector-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.prospector-tab {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.prospector-tab:hover { color: var(--text); }
.prospector-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.prospector-tab-content { width: 100%; }

/* ─── Google Maps card ────────────────────────── */
.maps-card {
  background: var(--s1);
  border: 1px solid var(--border);
  border-left: 3px solid #4285F4;
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.15s;
}
.maps-card:hover { box-shadow: 0 2px 12px rgba(66,133,244,.12); }

.maps-direccion {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
}

.maps-rating {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}
.maps-resenas {
  font-size: 11px;
  font-weight: 400;
  color: var(--text2);
}

.maps-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.maps-badge {
  font-size: 11px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  border-radius: 4px;
  padding: 2px 7px;
  color: #EF4444;
}

/* ─── Panel de confirmación de seguimiento Gemini ─── */
.seguimiento-confirmacion {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.seguimiento-card {
  background: var(--s2);
  border: 0.5px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
}
.seg-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.seg-mensaje-box {
  background: var(--s0, #0a0a0a);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.seg-detalles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seg-detalle-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.seg-detalle-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.seg-detalle-val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.seg-accion-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  width: fit-content;
}
.seg-aviso {
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
}
.seg-aviso-red {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: #EF4444;
}
.seg-aviso-pasos {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
  padding-left: 4px;
}
.seg-aviso-green {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  color: #10B981;
}
.seg-notas {
  font-size: 11.5px;
  color: var(--text3);
  line-height: 1.5;
  margin: 0;
  padding: 0 2px;
}

/* ── Toggle switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 24px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: #10B981;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}
.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.45;
  cursor: not-allowed;
}


@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.shake { animation: shake 0.4s ease; }

/* ═══════════════════════════════════════════════════════
   NUEVA NAVEGACIÓN — secciones colapsables
   ═══════════════════════════════════════════════════════ */

.sidebar-nav { padding: 8px 0 80px; overflow-y: auto; flex: 1; }

.nav-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: color .14s, background .14s;
  position: relative;
}
.nav-main:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-main.active {
  color: #1B2A4A;
  background: rgba(27,42,74,.12);
}
.theme-light .nav-main.active { color: #1B2A4A; background: rgba(27,42,74,.08); }
.nav-main.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #1B2A4A;
  border-radius: 0 2px 2px 0;
}

/* Section header button */
.nav-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 20px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  cursor: pointer;
  text-align: left;
  transition: color .14s, background .14s;
}
.nav-section-header:hover { color: var(--text); background: rgba(255,255,255,.03); }

.nav-section-label { flex: 1; }

.nav-chevron {
  font-size: 10px;
  transition: transform .2s;
  color: var(--text3);
}
.nav-section.open .nav-chevron { transform: rotate(180deg); }

/* Section body — hidden by default */
.nav-section-body {
  display: none;
  padding-bottom: 4px;
}
.nav-section.open .nav-section-body { display: block; }

/* Subitems */
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px 8px 36px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13px;
  transition: color .14s, background .14s;
  position: relative;
}
.nav-subitem:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav-subitem.active {
  color: #1B2A4A;
  background: rgba(27,42,74,.10);
  font-weight: 600;
}
.theme-light .nav-subitem.active { color: #1B2A4A; background: rgba(27,42,74,.07); }
.nav-subitem.active::before {
  content: '';
  position: absolute;
  left: 20px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 4px;
  background: #1B2A4A;
  border-radius: 50%;
}

.nav-soon {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(27,42,74,.15);
  color: #1B2A4A;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.theme-light .nav-soon { background: rgba(27,42,74,.1); }

/* ═══════════════════════════════════════════════════════
   FAB — botón flotante "+"
   ═══════════════════════════════════════════════════════ */
.fab-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
}

.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1B2A4A;
  color: #fff;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(0,0,0,.5); }

.fab-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.fab-menu.open { display: flex; }

.fab-option {
  background: var(--s1);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  white-space: nowrap;
  transition: background .14s, transform .12s;
}
.fab-option:hover { background: var(--s2); transform: translateX(-2px); }

/* ═══════════════════════════════════════════════════════
   FICHA / CLIENTE — página completa
   ═══════════════════════════════════════════════════════ */
.ficha-page {
  display: flex;
  gap: 0;
  min-height: calc(100vh - var(--topbar-h));
  align-items: flex-start;
}

.ficha-page-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  position: sticky;
  top: var(--topbar-h);
  max-height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}

.ficha-page-main {
  flex: 1;
  padding: 20px 24px;
  min-width: 0;
}

.ficha-back {
  display: inline-block;
  font-size: 13px;
  color: var(--text2);
  text-decoration: none;
  margin-bottom: 16px;
  transition: color .14s;
}
.ficha-back:hover { color: var(--text); }

.ficha-contact-panel { display: flex; flex-direction: column; gap: 4px; }

.ficha-contact-rows { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.ficha-cr {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}
.ficha-cr span:first-child { color: var(--text2); flex-shrink: 0; }
.ficha-cr span:last-child  { color: var(--text); text-align: right; word-break: break-word; }

.ficha-wa-btn {
  display: inline-block;
  margin-top: 14px;
  background: #25D366;
  color: #fff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: opacity .15s;
}
.ficha-wa-btn:hover { opacity: .85; }

.ficha-tab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) { .ficha-tab-grid { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════════════
   PAGE TABS — sistema de pestañas reutilizable
   ═══════════════════════════════════════════════════════ */
.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding-bottom: 0;
  flex-wrap: nowrap;
}

.page-tab {
  padding: 10px 18px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .14s, border-color .14s;
}
.page-tab:hover { color: var(--text); }
.page-tab.active { color: #1B2A4A; border-bottom-color: #1B2A4A; }
.theme-light .page-tab.active { color: #1B2A4A; }

/* ═══════════════════════════════════════════════════════
   SKELETON MODULES
   ═══════════════════════════════════════════════════════ */
.skeleton-module {
  max-width: 560px;
  margin: 48px auto;
  text-align: center;
  padding: 0 16px;
}
.skeleton-badge {
  display: inline-block;
  background: rgba(27,42,74,.15);
  color: #1B2A4A;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.skeleton-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.skeleton-desc {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.skeleton-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
  text-align: left;
}
.skeleton-features li {
  padding: 10px 16px;
  background: var(--s2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  border-left: 3px solid rgba(27,42,74,.3);
}
.skeleton-features li::before { content: '→ '; color: #1B2A4A; font-weight: 700; }
.skeleton-placeholder {
  height: 160px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--s2);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — ficha page en móvil
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .ficha-page { flex-direction: column; }
  .ficha-page-sidebar {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .fab-wrap { bottom: 16px; right: 16px; }
}
