/* Nuvik Leads: papel gris verdoso, tinta casi negra para las acciones y un ámbar
   que marca lo que pide atención (vio la maqueta, pendientes de hoy). */
:root {
  /* Paleta de Wapai: barra lateral verde muy oscura, superficies claras y verde Wapai para acciones */
  --ink: #1b2420;
  --ink-soft: #3c4843;
  --brand: #13795b;
  --brand-dark: #0f654b;
  --link: #13795b;
  --accent: #e8590c;
  --accent-bg: #fff1e6;
  --bg: #f3f4f1;
  --card: #ffffff;
  --line: #e1e5df;
  --muted: #66736d;
  --side: #17201c;
  --good: #157347;
  --good-bg: #e2f3e8;
  --warn: #946200;
  --warn-bg: #fcf1d9;
  --bad: #b42318;
  --bad-bg: #fde9e7;
  --shadow: 0 1px 2px rgba(23, 32, 28, 0.06);
  --radius: 12px;
  --sidebar: 248px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Figtree Variable", "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--brand-dark); }

button, input, select, textarea { font: inherit; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  background: var(--ink);
  color: #f4f7fb;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 22px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--brand); color: white;
  display: grid; place-items: center; font-weight: 700;
}
.brand small { display: block; color: #b7c3d1; letter-spacing: 0.14em; font-size: 11px; }
.brand strong { font-size: 18px; letter-spacing: 0.04em; }

.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  color: #d5deea; text-decoration: none;
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: white; }
.side-nav a.is-active { background: #ffffff; color: white; }
.side-sub { margin: 0 8px 8px 34px; }
.side-sub summary { color: #c5d0dc; cursor: pointer; font-size: 13px; padding: 4px 0 6px; }
.side-nav .side-sub a { display: block; gap: 0; padding: 5px 0; background: transparent; font-size: 12px; line-height: 1.35; }
.side-sub a:hover { color: white; }
.side-empty { display: block; color: #9aabbd; font-size: 12px; padding: 4px 0; }

.side-foot { margin-top: auto; padding: 16px 8px 0; color: #b7c3d1; font-size: 12px; }

.workspace { flex: 1; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 22px 28px 0;
}
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.eyebrow { margin: 0 0 4px; color: var(--brand); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.menu-btn, .user-chip, .btn, .icon-btn {
  border: 0; border-radius: 10px; cursor: pointer;
}
.menu-btn { display: none; background: white; border: 1px solid var(--line); padding: 8px 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip form { margin: 0; }
.content { padding: 18px 28px 40px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card, .grid-2 + .card, .card + .grid-2, .grid-2 + .grid-2 { margin-top: 16px; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.card h2 { margin: 0 0 8px; font-size: 18px; }

.metrics { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 16px; }
.metric { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px 14px 12px; border-top: 3px solid var(--brand); }
.metric span { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin-top: 6px; font-size: 26px; letter-spacing: -0.04em; }
.metric.good { border-top-color: var(--good); }
.metric.warn { border-top-color: #d08a2a; }

.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.grid-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint, .muted { color: var(--muted); font-size: 13px; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; background: white; border: 1px solid #cfd6e0; border-radius: 10px;
  padding: 10px 12px; color: var(--ink);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(230, 161, 27, 0.35); border-color: var(--brand); }
.field-error { color: var(--bad); font-size: 13px; margin: 6px 0 0; }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.check {
  display: flex; gap: 8px; align-items: flex-start;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  font-weight: 500;
}
.check input { margin-top: 3px; }
.check small { display: block; font-weight: 400; }

.btn {
  background: var(--brand); color: white; padding: 10px 16px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--brand-dark); color: white; }
.btn.secondary { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.good { background: var(--good); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
tr:hover td { background: #f8fbfd; }

.badge {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 2px 8px; font-size: 12px; background: #eef2f6; color: var(--ink);
}
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.muted { background: #eef2f6; color: var(--muted); }

.flashes { display: grid; gap: 8px; margin-bottom: 14px; }
.flash { padding: 10px 12px; border-radius: 10px; background: #e7f2f8; }
.flash.success { background: var(--good-bg); }
.flash.warning { background: var(--warn-bg); }
.flash.error { background: var(--bad-bg); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select { width: auto; min-width: 160px; }

.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 34px; text-align: center; padding: 6px 8px; border-radius: 8px;
  background: white; border: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.pager a.is-current { background: var(--ink); color: white; }

.attribution {
  display: flex; gap: 12px; align-items: center;
  margin-top: 16px; color: var(--muted); font-size: 12px;
}
.attribution img { height: 18px; }
.definition { display: grid; grid-template-columns: 180px 1fr; gap: 8px 12px; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); }
.auth-card h1 { margin: 8px 0 6px; }

.note {
  background: #f3f7fb; border-radius: 12px; padding: 12px 14px; color: var(--ink);
}

.module-list { margin: 0; padding-left: 18px; }
.more-options { margin: 8px 0 16px; }
.more-options summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
.lead-map { height: 440px; border-radius: 16px; border: 1px solid var(--line); }
.light { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.light i { width: 12px; height: 12px; border-radius: 50%; background: #9aa7b2; }
.light.verde i { background: #1F8A4C; }
.light.amarillo i { background: #D08A2A; }
.light.rojo i { background: #C0392B; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 12px 0 20px; }
.offer { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.offer.is-main { border-color: #1F8A4C; }
.offer-price { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 4px 0; }
.offer ul { margin: 8px 0 0; padding-left: 18px; }
.map-pin { background: transparent; border: none; }
.map-pin span { display: block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(37, 36, 58, .35); background: #9aa7b2; }
.map-pin.verde span { background: #1F8A4C; }
.map-pin.amarillo span { background: #D08A2A; }
.map-pin.rojo span { background: #C0392B; }
.map-pin span { transition: transform .15s ease; }
.map-pin.is-hot span { transform: scale(1.7); box-shadow: 0 0 0 3px rgba(37, 36, 58, .55), 0 0 0 9px rgba(37, 36, 58, .18); }
.map-popup { display: grid; gap: 4px; min-width: 180px; }
.map-popup a { color: var(--brand); }
.module-list li { margin: 8px 0; }

@media (max-width: 1100px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-charts, .form-grid, .checks { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .sidebar {
    position: fixed; z-index: 20; transform: translateX(-105%);
    transition: transform 0.2s ease;
  }
  .sidebar.is-open { transform: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .definition { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 24px; }
}

.template-grid, .proposal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.template-card { border: 1px solid #E1E6EE; border-radius: 12px; overflow: hidden; background: #fff; }
.template-card .swatch { height: 84px; }
.template-card div, .template-card p { padding: 0 14px; }
.template-card h3 { margin: 12px 0 4px; }
.device { margin: 0 auto 16px; border: 1px solid #E1E6EE; background: #fff; overflow: auto; }
.device.escritorio { width: 100%; }
.device.tablet { width: 768px; }
.device.movil { width: 390px; }
.device-switch { display: flex; gap: 8px; margin-bottom: 10px; }
.palette-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.gen-form { display: grid; gap: 10px; }
.gen-form label { display: grid; gap: 4px; font-size: 14px; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.preview-crop { height: 280px; overflow: hidden; border-bottom: 1px solid #E1E6EE; }

/* Hallazgos de la búsqueda web (no vienen de Google Maps) */
.badge.web { background: #E6F0FB; color: var(--link); }
.web-found { border: 1px solid #C9DCF2; background: #F4F8FD; border-radius: 12px; padding: 10px 14px; margin-top: 8px; }
.web-found ul { margin: 6px 0 0; padding-left: 18px; }

/* Ficha de servicio: planes, tickets y presupuesto */
.step { margin: 18px 0 8px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 4px; border: 2px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.plan-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20, 40, 70, .08); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card.is-rec { border-color: #9FD4B4; }
.plan-card.on { border-color: #1F8A4C; box-shadow: 0 0 0 3px rgba(31, 138, 76, .15); background: #F6FBF8; }
.plan-card ul { margin: 6px 0 0; padding-left: 18px; font-size: .92rem; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-tier { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.plan-name { font-size: 1.05rem; }
.plan-reason { margin-top: 6px; font-size: .86rem; color: #1F6B3E; }
.plan-none { justify-content: center; border-style: dashed; }
.tickets { display: flex; flex-wrap: wrap; gap: 8px; }
.ticket { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px dashed #B8C4D0; border-radius: 999px; background: #fff; cursor: pointer; user-select: none; font-size: .92rem; transition: background .15s, border-color .15s; }
.ticket input { position: absolute; opacity: 0; pointer-events: none; }
.ticket:hover { border-color: var(--link); }
.ticket-price { font-weight: 700; color: var(--muted); }
.ticket-star { color: #D08A2A; }
.ticket.is-rec { border-color: #E2B36B; }
.ticket.on { border-style: solid; border-color: var(--link); background: var(--link); color: #fff; }
.ticket.on .ticket-price, .ticket.on .ticket-star { color: #fff; }
.ticket-included { display: none; font-size: .78rem; }
.ticket.included { border-style: solid; border-color: #9FD4B4; background: #F0F8F3; color: #1F6B3E; cursor: default; }
.ticket.included .ticket-price { text-decoration: line-through; color: #7FA58F; }
.ticket.included .ticket-included { display: inline; }
.budget { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #FAFBFD; }
.budget-lines { list-style: none; margin: 0; padding: 0; }
.budget-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.budget-totals { margin-top: 10px; }
.budget-totals p { display: flex; justify-content: space-between; margin: 4px 0; }
.budget-totals strong { font-size: 1.15rem; }
#budget-once { font-size: 1.4rem; color: var(--ink); }
.budget-actions { margin-top: 12px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.budget-totals p[hidden] { display: none; }

/* Avance de una búsqueda en curso */
.live-progress { margin: 12px 0 4px; display: grid; gap: 6px; }
.progress-row { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.progress-track { height: 10px; border-radius: 999px; background: #EAEFF4; overflow: hidden; }
.progress-track i { display: block; height: 100%; width: 0; background: var(--link); border-radius: inherit; transition: width .6s ease; }
.progress-track.is-second i { background: #1F8A4C; }
.live-message { margin: 6px 0 0; font-weight: 600; }
.live-feed { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.live-feed li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; animation: feed-in .35s ease; }
.live-feed .dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa7b2; flex: none; }
.live-feed .dot.verde { background: #1F8A4C; } .live-feed .dot.amarillo { background: #D08A2A; } .live-feed .dot.rojo { background: #C0392B; }
@keyframes feed-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-feed li { animation: none; } .progress-track i { transition: none; } }

/* Enlace único para el cliente */
.share-card { border: 2px solid #1F8A4C; }
.share-link { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.share-link input { flex: 1 1 320px; font-size: 1.05rem; font-weight: 600; }

/* Páginas publicadas en nuvik.cl */
.hosted-list { display: grid; gap: 12px; margin-top: 12px; }
.hosted-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.hosted-group header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.hosted-group ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hosted-group li { display: grid; grid-template-columns: 9rem 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); }
.hosted-label { font-weight: 600; font-size: .92rem; }
.hosted-group a { overflow-wrap: anywhere; font-size: .92rem; }
.btn.small { padding: 6px 12px; min-height: 0; font-size: .88rem; }
.is-removing { opacity: .55; }
.btn.is-busy { cursor: progress; }
.btn.is-busy::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note.is-ok { background: #E8F5EE; color: #1F6B3E; border-radius: 10px; padding: 10px 12px; }
.note.is-error { background: #FBECEA; color: #A0352A; border-radius: 10px; padding: 10px 12px; }
@media (max-width: 700px) { .hosted-group li { grid-template-columns: 1fr; } }

/* =====================================================================
   Buscador y listas de negocios
   ===================================================================== */

[hidden] { display: none !important; }
.push { margin-left: auto; }
.empty { padding: 24px 0; color: var(--muted); }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.danger-ghost { background: transparent; color: var(--bad); border: 1px solid #f0c9c9; }
.btn.danger-ghost:hover { background: var(--bad-bg); }

/* Formulario */
.search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; }
.search-grid p { margin: 0; }
.search-grid label { display: block; font-weight: 600; margin-bottom: 6px; }
.check.slim { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; padding: 0; background: none; border: 0; font-weight: 500; font-size: 14px; }
.check.slim input { margin: 0; }
.search-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 16px 0 6px; }
.count-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border: 0; padding: 0; margin: 0; }
.count-chips legend { font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; }
.count-chips label { position: relative; }
.count-chips label input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.count-chips label span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; }
.count-chips label input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.count-chips label input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.count-chips input[type=number] { width: 120px; }
.search-form .more-options { margin-top: 10px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.recent-name { font-weight: 600; }
.recent-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }

/* Cabecera de una búsqueda */
.search-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.search-summary .actions { gap: 8px; }
.search-summary form { margin: 0; }
.notes { margin-top: 10px; font-size: 14px; }
.notes summary { cursor: pointer; color: var(--muted); }

/* Semáforo como filtro */
.light-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.chip b { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: #9aa7b2; }
.chip.verde i { background: #1F8A4C; } .chip.amarillo i { background: #D08A2A; } .chip.rojo i { background: #C0392B; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on b { color: rgba(255, 255, 255, .75); }
.filters label.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.filters .grow { flex: 1 1 220px; }
.results-filters { align-items: center; }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.more-filters { position: relative; }
.more-filters summary { cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; list-style: none; }
.more-filters[open] summary { border-color: var(--ink); }
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.more-grid .wide { grid-column: 1 / -1; }
.more-grid select, .more-grid input { width: 100%; }

/* Lista + mapa */
.lead-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 1280px) {
  .lead-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .map-col { position: sticky; top: 16px; }
  .map-col .lead-map { height: calc(100vh - 140px); min-height: 420px; }
}
.map-panel summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.map-panel .lead-map { height: 360px; }

.lead-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 8px 12px 4px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  transition: background-color .15s ease;
}
.lead:hover, .lead.is-focus { background: #f8fafc; }
.lead.is-focus { border-left-color: var(--brand); }
.lead.is-picked { background: #eef6fb; }
.lead-pick { display: grid; place-items: center; width: 36px; height: 36px; cursor: pointer; }
.lead-pick input { width: 18px; height: 18px; cursor: pointer; }
.lead-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.lead-dot { width: 10px; height: 10px; border-radius: 50%; background: #9aa7b2; flex: none; }
.lead-dot.verde { background: #1F8A4C; } .lead-dot.amarillo { background: #D08A2A; } .lead-dot.rojo { background: #C0392B; }
.lead-name { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.lead-name:hover { color: var(--brand-dark); text-decoration: underline; }
.lead-light { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lead-light.verde { color: #1F6B3E; } .lead-light.amarillo { color: #9a6412; } .lead-light.rojo { color: #A0352A; }
.lead-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.lead-advice { margin: 4px 0 0; font-size: 13.5px; color: #3f4b5a; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.lead:hover .lead-advice { -webkit-line-clamp: 3; }
.lead-signals { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sig { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef2f6; color: #8693a2; cursor: help; }
.sig::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sig.si { background: var(--good-bg); color: var(--good); }
.sig.web { background: #E6F0FB; color: var(--link); }
.sig.no { background: var(--warn-bg); color: var(--warn); }
.lead-actions { display: flex; gap: 6px; align-items: center; }
.lead-actions .btn { white-space: nowrap; }
.lead-actions form { margin: 0; }
.lead-actions .badge { white-space: nowrap; }
.bulk-bar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 30px rgba(37, 36, 58, .25);
}
.bulk-bar .btn { background: #fff; color: var(--ink); }

@media (max-width: 1100px) {
  .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .search-grid { grid-template-columns: 1fr; }
  .search-row { flex-direction: column; align-items: stretch; }
  .search-row .btn.big { width: 100%; }
  .recent-list li { grid-template-columns: 1fr auto; }
  .recent-list li .muted, .recent-list li .recent-count { display: none; }
  .lead { grid-template-columns: auto minmax(0, 1fr); padding-right: 4px; }
  .lead-actions { grid-column: 2; flex-wrap: wrap; }
  .lead-advice { -webkit-line-clamp: 2; }
  .more-grid { grid-template-columns: 1fr; }
  .filters select, .filters input { min-width: 0; flex: 1 1 140px; }
  .map-panel:not([open]) .hint { display: none; }
}

@media (max-width: 1279px) {
  .map-col { order: -1; }
}
@media (max-width: 800px) { .bulk-note { display: none; } }

/* =====================================================================
   Seguimiento (CRM)
   ===================================================================== */

.crm-head .actions { align-items: center; }
.crm-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; margin-top: 16px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.crm-col { background: #eef2f6; border-radius: 16px; padding: 10px; min-height: 240px; }
.crm-col header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; padding: 4px 4px 8px; }
.crm-col header .hint { width: 100%; margin: 0; }
.crm-count { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.crm-sum { margin-left: auto; font-weight: 700; font-size: 13px; color: var(--good); font-variant-numeric: tabular-nums; }
.stage-ganado { background: #e7f4ec; }
.stage-perdido { background: #f4eeee; }
.crm-cards { display: grid; gap: 8px; min-height: 120px; border-radius: 12px; transition: background-color .15s; }
.crm-cards.is-over { background: rgba(50, 125, 165, .12); outline: 2px dashed var(--brand); outline-offset: 2px; }
.crm-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(37, 36, 58, .05); cursor: grab; }
.crm-card.is-dragging { opacity: .5; }
.crm-card-top { display: flex; align-items: center; gap: 8px; }
.crm-card-top a { font-weight: 700; color: var(--ink); text-decoration: none; }
.crm-card-top a:hover { text-decoration: underline; }
.crm-card p { margin: 4px 0 0; font-size: 13px; }
.crm-place { color: var(--muted); }
.crm-seen { color: var(--link); font-weight: 600; }
.crm-unseen { color: var(--muted); }
.crm-task { font-weight: 600; }
.crm-task.late { color: var(--bad); }
.crm-task.today { color: var(--warn); }
.crm-task.soon, .crm-task.later { color: var(--muted); }
.crm-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.crm-card-foot form { margin: 0; margin-left: auto; }
.crm-card-foot select { padding: 4px 8px; font-size: 13px; min-width: 0; width: auto; }
.crm-value { font-weight: 700; font-size: 13px; color: var(--good); font-variant-numeric: tabular-nums; }
.crm-wapai { font-size: 12.5px; font-weight: 600; color: var(--brand); }
.wapai-go { margin-top: 8px; }
.crm-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* Ficha: seguimiento */
.follow-card { border-left: 4px solid var(--brand); }
.follow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.follow-label { font-weight: 700; font-size: 13px; color: var(--muted); margin: 6px 0 6px; }
.stage-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.pill:hover { border-color: var(--ink); }
.pill.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.seen-yes { color: var(--link); font-weight: 600; }
.task-list { list-style: none; margin: 0 0 10px; padding: 0; }
.task-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.task-list li form { margin: 0; }
.task-list em { font-style: normal; font-weight: 600; font-size: 13px; margin-left: 6px; color: var(--muted); }
.task-list .due-late em { color: var(--bad); }
.task-list .due-today em { color: var(--warn); }
.task-add { display: grid; gap: 8px; }
.task-when { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-when input[type=date] { width: auto; padding: 6px 8px; }
.today { margin-bottom: 16px; }
.view-list { list-style: none; margin: 0; padding: 0; }
.view-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }

/* Mensajes redactados */
.msg-list { list-style: none; margin: 0; padding: 0; }
.msg-list > li { border-top: 1px solid var(--line); }
.msg-list summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 0; cursor: pointer; }
.msg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.msg-label { font-weight: 700; margin: 0 0 6px; }
.msg-grid textarea { width: 100%; font-size: 13px; }

@media (max-width: 800px) {
  .follow-grid, .msg-grid { grid-template-columns: 1fr; }
  .crm-board { grid-auto-columns: 82%; scroll-snap-type: x mandatory; }
  .crm-col { scroll-snap-align: start; }
}

/* Escritorio: las 4 etapas activas arriba; Ganado y Perdido, más bajas, en una segunda fila. */
@media (min-width: 1000px) {
  .crm-board { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .crm-board .stage-ganado, .crm-board .stage-perdido { grid-column: span 2; min-height: 0; }
  .crm-board .stage-ganado .crm-cards, .crm-board .stage-perdido .crm-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); min-height: 64px; align-items: start; }
}

.grid-2 > .card { margin-top: 0; }

/* Avance del generador */
.job-card { max-width: 720px; }
.job-bar { height: 12px; border-radius: 999px; background: #E6EAF0; overflow: hidden; margin: 18px 0 10px; }
.job-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #4FA3C7); transition: width .5s ease; }
.job-card.is-failed .job-bar span { background: var(--bad); }
.job-now { display: flex; gap: 10px; align-items: baseline; margin: 0 0 14px; }
.job-now strong { font-size: 22px; font-variant-numeric: tabular-nums; min-width: 3.2em; }
.job-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.job-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.job-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.job-steps li.is-now { color: var(--ink); border-color: var(--brand); }
.job-steps li.is-now::before { background: var(--brand); animation: job-pulse 1.2s ease-in-out infinite; }
.job-steps li.is-done { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--line)); }
.job-steps li.is-done::before { background: var(--good); }
@keyframes job-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .job-steps li.is-now::before { animation: none; } .job-bar span { transition: none; } }

/* Entregar el sitio al cliente */
.deliver-card { margin-top: 16px; }
.deliver-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px 12px; align-items: end; }
.deliver-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
@media (max-width: 1000px) { .deliver-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .deliver-form { grid-template-columns: 1fr; } }

/* Modo ahorro: contacto por completar */
.pending-contact { padding: 12px 14px; margin: 10px 0 14px; border-radius: 12px; background: #FFF6E5; border: 1px solid #F3D9A4; }
.pending-contact p { margin: 0 0 8px; }
.pending-contact form { margin: 0; }
.check-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* Buscador: rubros de «Todos los rubros» */
.all-rubros { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 4px; margin: 0 0 12px; }
.all-rubros[hidden] { display: none; }
.all-rubros legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; }
.chip-check input { margin: 0; accent-color: var(--brand); }
.chip-check:has(input:checked) { border-color: var(--brand); background: #EAF3F7; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; }
.all-rubros { grid-column: 1 / -1; width: 100%; }

/* Generador: lo que ofreces */
.offer-card .section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 12px 0 18px; }
.plan { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.plan-pro { border: 2px solid var(--brand); }
.plan-tier { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--brand); }
.plan h3 { margin: 0; font-size: 18px; }
.plan-price { margin: 4px 0 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.plan-pitch { margin: 0 0 6px; color: var(--muted); }
.plan ul { margin: 4px 0 10px; padding-left: 18px; font-size: 14px; }
.plan li { margin: 3px 0; }
.plan-ideal { margin: auto 0 10px; font-size: 13px; color: var(--muted); }
.plan .btn { align-self: flex-start; }
.pitch-title { margin: 6px 0 8px; }
#pitch-text { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 1000px) { .plan-grid { grid-template-columns: 1fr; } }

/* Miniaturas del generador: sin barras flotantes de las maquetas sobre la app */
.preview-crop .mobile-bar, .preview-crop .float-contact, .preview-crop .float-stack, .preview-crop .chat-panel, .preview-crop .trip-bar { display: none !important; }


/* SEO local */
.seo-steps { margin: 6px 0 10px; padding-left: 20px; }
.seo-steps li { margin: 4px 0; }
.seo-bar { display: inline-block; width: 120px; height: 8px; border-radius: 999px; background: #E6EAF0; overflow: hidden; vertical-align: middle; }
.seo-bar.big { display: block; width: 100%; height: 10px; margin-top: 8px; }
.seo-bar span { display: block; height: 100%; background: var(--good); border-radius: inherit; }
.seo-bar .w0 { width: 0%; }
.seo-bar .w5 { width: 5%; }
.seo-bar .w10 { width: 10%; }
.seo-bar .w15 { width: 15%; }
.seo-bar .w20 { width: 20%; }
.seo-bar .w25 { width: 25%; }
.seo-bar .w30 { width: 30%; }
.seo-bar .w35 { width: 35%; }
.seo-bar .w40 { width: 40%; }
.seo-bar .w45 { width: 45%; }
.seo-bar .w50 { width: 50%; }
.seo-bar .w55 { width: 55%; }
.seo-bar .w60 { width: 60%; }
.seo-bar .w65 { width: 65%; }
.seo-bar .w70 { width: 70%; }
.seo-bar .w75 { width: 75%; }
.seo-bar .w80 { width: 80%; }
.seo-bar .w85 { width: 85%; }
.seo-bar .w90 { width: 90%; }
.seo-bar .w95 { width: 95%; }
.seo-bar .w100 { width: 100%; }
.seo-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.seo-head > div { flex: 1; }
.seo-score b { font-size: 30px; }
.seo-tools { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; }
.tool-label { font-weight: 700; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 6px; }
.seo-list { list-style: none; margin: 0; padding: 0; }
.seo-list > li { border-top: 1px solid var(--line); padding: 10px 0; }
.seo-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; margin: 0; }
.seo-check { width: 30px; height: 30px; border: 2px solid var(--line); border-radius: 8px; background: #fff; color: #fff; font-weight: 800; cursor: pointer; }
.seo-check:hover { border-color: var(--good); }
.is-done .seo-check { background: var(--good); border-color: var(--good); }
.is-done .seo-title { color: var(--muted); }
.seo-title { margin: 3px 0 2px; font-weight: 700; }
.seo-body details summary { cursor: pointer; color: var(--brand); font-size: 14px; }
.seo-body details p { margin: 6px 0; font-size: 14px; }
.seo-note { display: flex; gap: 8px; margin-top: 6px; }
.seo-note input { flex: 1; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.seo-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; margin-bottom: 14px; }
.seo-month label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.seo-month input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font: inherit; min-width: 0; }
.seo-month .wide { grid-column: 1 / -2; }
.seo-history { font-size: 13px; }
@media (max-width: 900px) {
  .seo-tools { grid-template-columns: 1fr; }
  .seo-month { grid-template-columns: 1fr 1fr; }
  .seo-month .wide { grid-column: 1 / -1; }
  .seo-head { flex-direction: column; align-items: stretch; }
}

/* SEO local: guía, mensajes y explicación */
.seo-lead { margin: 0 0 14px; }
.guide-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.guide-step { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.guide-step.who-cliente { background: #F6FAFD; border-color: #CFE2EE; }
.guide-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.guide-head h3 { margin: 0; font-size: 16px; flex: 1; }
.guide-num { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-grid; place-items: center; font-weight: 800; font-size: 14px; }
.guide-who { font-size: 12px; font-weight: 700; color: var(--muted); }
.who-cliente .guide-who { color: var(--brand); }
.guide-step ul { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }
.guide-step li + li { margin-top: 5px; }
.guide-more { margin: 8px 0 0; font-size: 14px; }
.guide-app { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--good-bg); }
.guide-app h3 { margin: 0 0 6px; font-size: 16px; }
.guide-app ul { margin: 0 0 8px; padding-left: 18px; font-size: 14px; }
.guide-app li + li { margin-top: 4px; }
.guide-app .hint { margin: 0; }
.seo-msgs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.seo-msgs textarea { width: 100%; font-size: 13px; }
.seo-qr { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.seo-qr img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.seo-qr p { margin: 0 0 8px; font-size: 14px; }
.seo-explain p { max-width: 78ch; }
.seo-explain textarea { width: 100%; max-width: 78ch; }
@media (max-width: 900px) {
  .guide-steps, .seo-msgs { grid-template-columns: 1fr; }
}

/* Seguimiento con pestañas por etapa */
.crm-head .hint { margin: 10px 0 0; }
.crm-tabs-wrap { margin-top: 16px; }
.crm-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 2px solid var(--line); padding: 0 2px; scrollbar-width: thin; }
.crm-tab { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px 12px; margin-bottom: -2px; border: 2px solid transparent; border-bottom: 0; border-radius: 12px 12px 0 0; color: var(--muted); font-weight: 700; text-decoration: none; white-space: nowrap; }
.crm-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.crm-tab.is-active { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: inset 0 3px 0 var(--brand); }
.crm-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.crm-tab-count { min-width: 30px; padding: 2px 9px; border-radius: 999px; background: #E3E8EF; color: var(--ink); font-size: 15px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.crm-tab.is-active .crm-tab-count { background: var(--brand); color: #fff; }
.crm-tab.stage-ganado .crm-tab-count { background: var(--good-bg); color: var(--good); }
.crm-tab.stage-ganado.is-active .crm-tab-count { background: var(--good); color: #fff; }
.crm-tab.stage-perdido .crm-tab-count { background: var(--bad-bg); color: var(--bad); }
.crm-tab.stage-perdido.is-active .crm-tab-count { background: var(--bad); color: #fff; }
.crm-tabs-wrap.is-dragging .crm-tab:not(.is-active) { border-color: var(--line); border-style: dashed; }
.crm-tab.is-over { background: rgba(50, 125, 165, .12); border-color: var(--brand) !important; border-style: dashed; color: var(--ink); }
.crm-tab.is-flash .crm-tab-count { animation: crm-pop .9s ease; }
@keyframes crm-pop { 30% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .crm-tab.is-flash .crm-tab-count { animation: none; } }
.crm-panel { background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; padding: 18px 20px 22px; }
.crm-panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.crm-panel-head h2 { margin: 0 0 2px; font-size: 20px; }
.crm-panel-head .hint { margin: 0; }
.crm-panel .crm-sum { margin: 0; }
.crm-filter { width: 280px; max-width: 100%; }
.crm-panel .crm-cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; min-height: 0; }
.crm-panel .crm-card { padding: 12px 14px; }
.crm-card[hidden] { display: none; }
.crm-panel .crm-empty { padding: 26px 4px; text-align: center; }
@media (max-width: 700px) {
  .crm-panel { padding: 14px; }
  .crm-panel-head { flex-direction: column; align-items: stretch; }
  .crm-filter { width: 100%; }
  .crm-tab { padding: 10px 12px; gap: 8px; }
}
.crm-tab.stage-ganado, .crm-tab.stage-perdido { background: transparent; }
.crm-tab.stage-ganado:hover, .crm-tab.stage-perdido:hover { background: rgba(255, 255, 255, .6); }
.crm-tab.stage-ganado.is-active, .crm-tab.stage-perdido.is-active, .crm-panel.stage-ganado, .crm-panel.stage-perdido { background: #fff; }

/* Búsqueda traída en modo ahorro */
.pending-contacts { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); }
.pending-contacts p { margin: 4px 0 0; font-size: 14px; }
.pending-contacts form { margin: 0; flex-shrink: 0; }
@media (max-width: 700px) { .pending-contacts { flex-direction: column; align-items: stretch; } }

/* Seguimiento › Clientes con sitios */
.crm-tabs { gap: 2px; }
.crm-tab { padding: 10px 12px 11px; gap: 8px; font-size: 15px; }
.crm-tab-count { min-width: 26px; padding: 2px 7px; font-size: 14px; }
.crm-tab.stage-sitios { margin-left: auto; }
.offer-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; background: #FAFBFD; }
.offer-box > summary { cursor: pointer; font-weight: 700; }
.offer-box .plan-grid { margin-top: 12px; }
.offer-box .plan { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.offer-box .plan h3 { margin: 2px 0; font-size: 16px; }
.offer-box .plan-price { font-size: 20px; font-weight: 800; margin: 4px 0; }
.offer-box .plan-price .muted { font-size: 13px; font-weight: 600; }
.offer-box .plan-pitch { color: var(--muted); font-size: 14px; margin: 0 0 6px; }
.offer-box .plan ul { margin: 0; padding-left: 18px; font-size: 13px; }
.site-list { display: grid; gap: 12px; }
.site-row { cursor: default; }
.site-row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.site-name { margin: 0; font-weight: 700; }
.site-name a { color: var(--ink); text-decoration: none; }
.site-name a:hover { text-decoration: underline; }
.site-row .actions { margin-top: 10px; gap: 8px; }
.site-row .actions form { margin: 0; }
.site-row.state-eliminada { border-color: #F0C9C9; background: #FFFBFB; }
.site-message { margin-top: 10px; }
.site-message > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; }
.site-message textarea { width: 100%; margin-top: 8px; font-size: 14px; }
@media (max-width: 700px) { .crm-tab.stage-sitios { margin-left: 0; } .site-row-head { flex-direction: column; } }
/* Ficha: estado del negocio al lado del nombre */
.topbar h1:has(.title-meta) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.title-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; font-weight: 400; letter-spacing: normal; line-height: 1.4; }
.title-meta .light { font-size: 14px; }
.title-advice { color: var(--muted, #5b6472); max-width: 46ch; }
.title-marks { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.share-card h3 { margin: 16px 0 6px; font-size: 16px; }
.share-pitch { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d5d9e0; border-radius: 10px; font: inherit; line-height: 1.5; resize: vertical; }


/* =====================================================================
   Estilo 2026-11: menú claro, tipografía firme y menos ruido
   ===================================================================== */
body { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif; font-size: 15px; }
h1, h2, h3, .brand strong { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.sidebar { background: var(--side); color: var(--ink); border-right: 1px solid var(--line); padding: 20px 14px; }
.brand { padding: 0 8px 24px; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 18px; }
.brand strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.brand small { display: block; color: var(--muted); letter-spacing: 0; font-size: 12px; }
.side-nav { gap: 2px; }
.side-nav a { color: var(--ink-soft); font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.side-nav a i { font-size: 17px; color: var(--muted); }
.side-nav a:hover { background: rgba(29, 36, 32, 0.06); color: var(--ink); }
.side-nav a.is-active { background: #fff; color: var(--ink); box-shadow: inset 3px 0 0 var(--accent), 0 1px 2px rgba(29, 36, 32, 0.08); }
.side-nav a.is-active i { color: var(--ink); }
.side-foot { color: var(--muted); }

.topbar { padding: 24px 32px 4px; align-items: flex-start; }
.topbar h1 { font-size: 26px; letter-spacing: -0.02em; line-height: 1.2; }
.user-chip { color: var(--muted); font-size: 14px; }
.content { padding: 16px 32px 48px; max-width: 1360px; }

.card { border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border-color: var(--line); }
.card h2 { font-size: 17px; letter-spacing: -0.01em; }
.card + .card, .grid-2 + .card, .card + .grid-2, .grid-2 + .grid-2 { margin-top: 14px; }

.btn { background: var(--brand); color: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 600; min-height: 40px; }
.btn:hover { background: var(--ink-soft); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #cfd5cd; }
.btn.secondary:hover { background: #f5f6f2; color: var(--ink); border-color: #b9c1b7; }
.btn.good { background: var(--good); }
.btn.good:hover { background: #155c35; }
.btn.accent { background: var(--accent); color: var(--ink); }
.btn.accent:hover { background: #cf8f12; color: var(--ink); }
.btn i { font-size: 16px; }

input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea { border-color: #c9d0c7; border-radius: 10px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(230, 161, 27, 0.35); border-color: var(--ink-soft); }

.metric { border-top: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.metric strong { font-size: 28px; }
.pager a.is-current { background: var(--ink); }
th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; }
tr:hover td { background: #f7f8f5; }
.note { background: #f4f6f2; }
.flash { border-radius: 12px; border: 1px solid transparent; }
.flash.success { border-color: #c3e3cf; }
.flash.warning { border-color: #f0d9ad; }
.flash.error { border-color: #efc8c3; }
details > summary { cursor: pointer; }

/* Bloque plegable «Más detalles» */
.more { margin-top: 14px; }
.more > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px dashed #c3cbc1; border-radius: 10px; color: var(--ink-soft); font-weight: 600; background: #fff; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "+"; font-weight: 700; }
.more[open] > summary::before { content: "−"; }
.more[open] > summary { margin-bottom: 14px; }

/* Ficha del negocio */
.biz-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 14px; align-items: start; }
.biz-main { display: grid; gap: 14px; min-width: 0; }
.biz-main .card + .card { margin-top: 0; }
.biz-side { position: sticky; top: 16px; }
.lead-step h2 { display: flex; align-items: center; gap: 10px; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; }
.mini-label { display: block; margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.seen-yes { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--accent-bg); color: var(--warn); font-weight: 600; }
.stage-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.pill { border: 1px solid #cfd5cd; background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.pill:hover { border-color: var(--ink-soft); }
.pill.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.log-form { margin-top: 6px; padding: 12px 14px; border-radius: 12px; background: #f6f7f3; }
.log-form .mini-label { margin-top: 0; }
.log-row { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto; gap: 8px; }
.log-form .hint { margin: 8px 0 0; }
.follow-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; margin-top: 16px; }
.mini-title { margin: 0 0 8px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.timeline li { position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-soft); box-shadow: 0 0 0 3px #fff; }
.timeline li.kind-respondio::before { background: var(--good); }
.timeline li.kind-nota::before { background: #b5bdb3; }
.timeline p { margin: 3px 0 0; color: var(--ink-soft); white-space: pre-line; }
.lead-phone { margin: 0 0 8px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.facts { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 6px 10px; margin: 14px 0 10px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.side-links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
@media (max-width: 1100px) {
  .biz-layout { grid-template-columns: minmax(0, 1fr); }
  .biz-side { position: static; order: -1; }
}
@media (max-width: 700px) {
  .log-row, .follow-cols { grid-template-columns: minmax(0, 1fr); }
}

/* Inicio: clientes por etapa */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pipe { display: grid; gap: 2px; padding: 14px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.pipe strong { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pipe span { color: var(--muted); font-size: 13px; font-weight: 600; }
.pipe:hover { border-color: #b9c1b7; }
.pipe-por_contactar { box-shadow: inset 0 3px 0 var(--accent), var(--shadow); }
.pipe-ganado strong { color: var(--good); }
.pipe-total { background: transparent; box-shadow: none; border-style: dashed; }
.quick-search { margin-top: 14px; }
@media (max-width: 1100px) { .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* SEO local más amable */
.seo-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; background: linear-gradient(180deg, #fff 0%, #fbfaf4 100%); }
.seo-hero h2 { font-size: 21px; margin-bottom: 10px; }
.seo-hero p { max-width: 62ch; }
.seo-hero-copy { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: #f4f6f1; }
.seo-hero-copy textarea { min-height: 120px; }
.seo-hero-copy .mini-label { margin: 0; }
.seo-hero-copy .btn { justify-self: start; }
.empty-state { padding: 18px; border: 1px dashed #c9d0c7; border-radius: 12px; color: var(--muted); text-align: center; }
.guide-accordion { display: grid; gap: 8px; margin-top: 10px; }
.guide-phase { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.guide-phase > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; list-style: none; }
.guide-phase > summary::-webkit-details-marker { display: none; }
.guide-phase > summary::after { content: "+"; margin-left: 8px; font-weight: 700; color: var(--muted); }
.guide-phase[open] > summary::after { content: "−"; }
.guide-phase[open] { box-shadow: var(--shadow); }
.guide-phase .guide-num { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.guide-phase.who-cliente .guide-num { background: var(--accent); color: var(--ink); }
.guide-app .guide-num { background: var(--good); }
.guide-title { flex: 1; font-weight: 700; }
.guide-phase .guide-who { font-size: 12px; font-weight: 600; color: var(--muted); }
.guide-list { margin: 0; padding: 0 18px 14px 56px; display: grid; gap: 6px; }
.guide-phase .guide-more, .guide-phase > .hint { margin: 0; padding: 0 18px 14px 56px; }
@media (max-width: 900px) { .seo-hero { grid-template-columns: minmax(0, 1fr); } }

/* Configuración: herramientas */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 10px; margin-top: 10px; }
.tool { display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; background: #fff; }
.tool:hover { border-color: #b9c1b7; box-shadow: var(--shadow); }
.tool span { color: var(--muted); font-size: 13px; }
.prepare-card h2 { font-size: 20px; }
.prepare-family { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.prepare-family label { margin: 0; }
.prepare-family select { width: auto; min-width: 14rem; }
.group-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.group-bar form { margin: 0; }
.group-bar .hint { flex: 1 1 20rem; margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; padding: 0 14px 14px; }
.card-actions form { margin: 0; }
.card-more summary { list-style: none; padding: 6px 10px; border-radius: 10px; border: 1px solid #cfd5cd; font-size: .88rem; font-weight: 600; }
.card-more[open] { display: flex; flex-wrap: wrap; gap: 6px; }
.card-more[open] summary { display: none; }
.btn.danger-text { color: var(--bad); }
.btn.danger-text:hover { color: var(--bad); border-color: #e2b5b0; background: var(--bad-bg); }
.tool-main { border-color: var(--accent); background: var(--accent-bg); }

/* Chance de cerrar y mapa grande */
.results-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chance-chip, .map-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14px; text-decoration: none; }
.chance-chip { background: var(--accent); color: var(--ink); }
.chance-chip:hover { background: #cf8f12; color: var(--ink); }
.chance-chip.is-on { background: var(--ink); color: #fff; }
.map-chip { border: 1px solid #cfd5cd; background: #fff; color: var(--ink); }
.lead-chance { margin: 4px 0 6px; font-size: 14px; }
.lead-chance b { margin-right: 2px; }
.chance-alta b, .bm-chance.chance-alta { color: var(--good); }
.chance-media b, .bm-chance.chance-media { color: var(--warn); }
.chance-baja b, .bm-chance.chance-baja { color: var(--muted); }
.bigmap-wrap { display: grid; gap: 10px; }
.bigmap-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; }
.bigmap-tools input[type=search] { flex: 1 1 14rem; width: auto; }
.bigmap-tools select { width: auto; min-width: 12rem; }
.bm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bm-chip { border: 1px solid #cfd5cd; background: #fff; color: var(--ink-soft); border-radius: 999px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.bm-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.bm-count { margin: 0 0 0 auto; }
.bigmap { height: calc(100vh - 220px); min-height: 480px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.map-pin.is-big span { width: 22px; height: 22px; box-shadow: 0 0 0 3px rgba(230, 161, 27, 0.55); }
.bm-popup { gap: 5px; }
.bm-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bm-actions .btn { color: #fff; }
.bm-actions .btn.secondary { color: var(--ink); }
@media (max-width: 860px) { .bigmap { height: 70vh; } .bm-count { margin-left: 0; } }
.results-bar > .muted { margin-left: auto; }
.home-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin: -2px 0 14px; }
.filters input[type="checkbox"], .filters input[type="radio"] { width: auto; min-width: 0; }
.more-grid .check { justify-content: flex-start; text-align: left; }

/* Seguimiento en filas: un negocio por fila, con fechas y acciones en lote */
.crm-view-toggle { display: inline-flex; gap: 4px; }
.crm-sort { gap: 6px; }
.crm-sort select { width: auto; min-width: 0; padding: 6px 8px; font-size: 14px; }
.crm-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; padding: 8px 10px; background: var(--side, #eef0ec); border-radius: 10px; }
.crm-bulk .check { display: inline-flex; gap: 6px; align-items: center; padding: 0; margin: 0; background: none; border: 0; font-weight: 600; font-size: 14px; }
.crm-bulk .check input { margin: 0; }
.crm-bulk select { width: auto; min-width: 0; padding: 6px 8px; font-size: 14px; }
.crm-table-wrap { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.crm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.crm-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.crm-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.crm-table tbody tr:last-child td { border-bottom: 0; }
.crm-panel .crm-table tbody.crm-cards { display: table-row-group; min-height: 0; }
.crm-panel .crm-table .crm-card { display: table-row; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.crm-table .crm-row:hover { background: #f8f9f6; }
.crm-table .crm-row.is-dragging { opacity: .5; }
.crm-table .col-check { width: 32px; }
.crm-table select { width: auto; min-width: 0; padding: 4px 6px; font-size: 13px; }
.crm-table .crm-place, .crm-table .crm-value { font-size: 13px; }
.crm-table .lead-dot { display: inline-block; vertical-align: middle; margin-right: 4px; }
.nowrap { white-space: nowrap; }
.btn-icon { border: 1px solid transparent; background: none; color: var(--muted); border-radius: 8px; padding: 4px 7px; cursor: pointer; }
.btn-icon:hover { color: #b42318; border-color: var(--line); background: #fff; }
.crm-card-top input[type=checkbox] { margin: 0 2px 0 0; }
.crm-dates { color: var(--muted); }

/* Versiones del primer mensaje */
.pitch-picker { display: grid; gap: 10px; }
.pitch-tabs { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.pitch-tabs legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 6px; width: 100%; }
.pitch-tab { position: relative; display: inline-block; }
.pitch-tab input { position: absolute; opacity: 0; }
.pitch-tab span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; }
.pitch-tab input:checked + span { background: var(--ink, #1d2420); border-color: var(--ink, #1d2420); color: #fff; }
.pitch-tab input:focus-visible + span { outline: 2px solid var(--brand, #1f5f7a); outline-offset: 2px; }
.pitch-variant .hint { margin: 0; }
.pitch-second textarea { margin: 8px 0; }
.pitch-image { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.pitch-image p { margin: 0 0 6px; font-size: 14px; }
.pitch-image .actions { margin: 0; }
.crm-sort label { display: inline; margin: 0; font-weight: 500; font-size: 14px; }
.crm-row-actions { display: flex; align-items: center; gap: 4px; }
.btn-icon { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.btn-icon-text { font-size: 12px; }
.crm-table td:first-child + td { min-width: 220px; }
.pitch-guide { border-top: 1px solid var(--line); padding-top: 8px; }
.pitch-guide summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.pitch-guide ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.offer-pay { margin: 10px 0 0; font-size: 14px; font-weight: 600; }

/* Seguimiento › Vio su maqueta */
.crm-tab.stage-vio_maqueta .crm-tab-count { background: #E4ECFF; color: var(--link); }
.crm-tab.stage-vio_maqueta.is-active .crm-tab-count { background: var(--link); color: #fff; }
.text-btn { background: none; border: 0; padding: 0 2px; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.text-btn:hover { color: var(--ink); }
.text-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.own-device { margin-top: 4px; }
.own-device .bi { color: var(--muted); }

/* Seguimiento › Clientes con sitios: los quitados de nuvik.cl, plegados */
.removed-sites { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: #FAFBFD; }
.removed-sites > summary { cursor: pointer; padding: 12px 14px; font-weight: 700; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.removed-sites > summary::-webkit-details-marker { display: none; }
.removed-sites > summary::before { content: "\F285"; font-family: "bootstrap-icons"; font-weight: 400; transition: transform .15s; }
.removed-sites[open] > summary::before { transform: rotate(90deg); }
.removed-sites > summary .muted { font-weight: 400; font-size: 14px; }
.removed-sites > .site-list { padding: 0 14px 14px; }
@media (prefers-reduced-motion: reduce) { .removed-sites > summary::before { transition: none; } }

/* Negocios › países y ciudades */
.geo-card { padding-bottom: 16px; }
.geo-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.geo-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; }
.geo-tab:hover { border-color: var(--ink); }
.geo-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.geo-tab:focus-visible, .geo-city:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.geo-count { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: #E3E8EF; color: var(--ink); }
.geo-tab.is-active .geo-count { background: rgba(255, 255, 255, .2); color: #fff; }
.geo-cities-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 14px 0 10px; }
.geo-cities-head h2 { margin: 0; font-size: 17px; }
.geo-cities-head p { margin: 0; font-size: 14px; }
.geo-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.geo-city { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.geo-city:hover { border-color: var(--ink); }
.geo-city.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #F7FAFF; }
.geo-city-name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.geo-city-where { color: var(--muted); font-size: 12px; }
.geo-city-total { font-size: 14px; margin-top: 4px; }
.geo-city-total b { font-variant-numeric: tabular-nums; }
.geo-city-todo { font-size: 13px; color: var(--muted); }
.geo-more { margin-top: 8px; }
.geo-more > summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: 14px; padding: 4px 0; }
.geo-more[open] > summary { margin-bottom: 8px; }
.geo-nocity { margin: 10px 0 0; }
@media (max-width: 700px) {
  .geo-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 12px; }
  .geo-tab { flex: 0 0 auto; }
  .geo-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Con «Vio su maqueta» son 9 pestañas: un poco más compactas para que quepan en una pantalla normal */
.crm-tab { padding: 10px 10px 11px; gap: 6px; font-size: 14px; }
.crm-tab-count { min-width: 24px; padding: 1px 7px; font-size: 13px; }

/* Generar maquetas: botón de WhatsApp y asistente IA de muestra */
.prepare-extras { margin: 14px 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.prepare-extras legend { padding: 0 6px; font-weight: 700; font-size: 14px; }
.prepare-extras .hint { flex-basis: 100%; margin: 0; }
.prepare-ai { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.prepare-ai select { width: auto; }
.offer-sub { margin: 14px 0 6px; font-size: 15px; }
.offer-addons { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 6px; }
.addon-prices input { width: 140px; max-width: 100%; }
.addon-prices td { vertical-align: top; }

/* Ficha › Contacto: Google Maps primero y accesos directos */
.btn.maps-main { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 48px; margin: 4px 0 12px; font-size: 16px; background: #1a73e8; border-color: #1a73e8; color: #fff; }
.btn.maps-main:hover { background: #1765cc; border-color: #1765cc; color: #fff; }
.quick-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.quick-link { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.quick-link:hover { border-color: var(--ink); }
.quick-link .bi-instagram { color: #c13584; }
.quick-link .bi-facebook { color: #1877f2; }
.quick-link.is-search { color: var(--muted); border-style: dashed; font-weight: 500; }
.quick-link.is-search .bi { color: var(--muted); }


/* ---------- Estilo Wapai (Nuvik Leads dentro de Wapai) ---------- */
a { color: var(--link); text-underline-offset: 2px; }
.sidebar { background: var(--side); color: #d9e2dd; padding: 1.2rem 0.85rem; }
.brand { padding: 0 0.4rem 1.1rem; gap: 0.65rem; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: transparent; padding: 0; overflow: hidden; }
.brand-mark img { width: 36px; height: 36px; display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: 0; color: #fff; }
.brand small { color: #8c9b94; letter-spacing: 0; font-size: 0.76rem; }
.side-nav a { color: #d9e2dd; padding: 0.5rem 0.65rem; border-radius: 8px; font-size: 0.95rem; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav a.is-active { background: rgba(255, 255, 255, 0.11); color: #fff; font-weight: 600; }
.side-nav a i { color: #9fd8c2; }
.side-sub summary, .side-foot, .side-empty { color: #8c9b94; }
.side-back { display: flex; gap: 0.5rem; align-items: center; color: #9fd8c2 !important; text-decoration: none; font-size: 0.9rem; padding: 0.5rem 0.65rem; border-radius: 8px; margin-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.side-back:hover { background: rgba(255, 255, 255, 0.06); }
.topbar h1 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); letter-spacing: -0.01em; font-weight: 700; }
.eyebrow { color: var(--brand); }
.btn { background: var(--brand); color: #fff; border-radius: 8px; font-weight: 600; }
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid #c9d0c8; }
.btn.secondary:hover { background: #f3f4f1; color: var(--ink); }
.card, .metric { border-radius: var(--radius); box-shadow: var(--shadow); }
.metric { border-top: 3px solid var(--brand); }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(19, 121, 91, 0.25); border-color: var(--brand); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], select, textarea { border-color: #c9d0c8; border-radius: 8px; }
.check { background: #f7f8f5; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.auth-body { background: var(--bg); }
.auth-brand { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-bottom: 1rem; }
.auth-brand img { width: 40px; height: 40px; }
.auth-brand strong { font-size: 1.2rem; }
.auth-brand small { display: block; color: var(--muted); font-size: 0.78rem; }
.btn.accent, .chance-chip, .guide-phase.who-cliente .guide-num { color: #fff; }
.btn.accent:hover { background: #c94d0a; color: #fff; }
@media (max-width: 720px) {
  .content table { display: block; overflow-x: auto; max-width: 100%; }
}
.addon-prices .price-group th { background: #f3f4f1; text-align: left; font-size: 0.85rem; color: var(--brand); padding: 0.55rem 0.6rem; }

/* Asistente IA */
.as-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.as-chat { position: sticky; top: 16px; display: flex; flex-direction: column; }
.as-log { height: 26rem; overflow-y: auto; display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #f7f8f6; }
.as-msg { max-width: 92%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.as-msg p { margin: 0 0 4px; } .as-msg ul { margin: 4px 0; padding-left: 18px; }
.as-bot { background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.as-me { justify-self: end; background: var(--brand); color: white; border-bottom-right-radius: 4px; }
.as-act { margin-top: 6px; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.as-form { display: flex; gap: 8px; } .as-form input { flex: 1; }
.as-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.as-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.as-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 12px; background: white; }
.as-item.band-alta { border-left-color: var(--good); } .as-item.band-media { border-left-color: #e8590c; }
.as-main { display: grid; gap: 2px; min-width: 0; }
.as-why { display: flex; flex-wrap: wrap; gap: 4px; }
.as-why em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #eef3f0; color: #2b4a3f; }
.as-side { display: grid; justify-items: end; align-content: start; gap: 6px; white-space: nowrap; }
.as-form-cfg { display: grid; gap: 10px; }
.as-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.as-reg { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.as-auto { margin-top: 16px; }
@media (max-width: 960px) { .as-grid { grid-template-columns: minmax(0, 1fr); } .as-chat { position: static; } .as-log { height: 20rem; } .as-item { flex-direction: column; } .as-side { justify-items: start; } }

/* ---------- Ventas IA ---------- */
.vs-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin-bottom: 14px; }
.vs-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.vs-kpi b { font-size: 22px; line-height: 1.1; }
.vs-kpi span { font-size: 12px; color: var(--muted); }
.vs-kpi.good b { color: var(--good); } .vs-kpi.hot b { color: var(--accent); } .vs-kpi.warn b { color: var(--warn); }
.vs-tabs { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.vs-tabs a { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.vs-tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.badge.hot { background: var(--accent); color: #fff; }
.vs-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.vs-head input[type=number] { width: 4.5rem; }
.vs-queue { display: grid; gap: 12px; }
.vs-q { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; display: grid; gap: 8px; background: #fbfcfa; }
.vs-q header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vs-q textarea, .vs-subject { width: 100%; font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.vs-q.vs-done { opacity: .6; }
.vs-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid transparent; }
.vs-ch { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1ed; color: var(--ink-soft); }
.vs-ch.ch-whatsapp { background: #e2f6e9; color: #127a3f; } .vs-ch.ch-instagram { background: #fde8f1; color: #b0256b; }
.vs-ch.ch-facebook { background: #e7effd; color: #1d4fb8; } .vs-ch.ch-correo { background: #fff1e6; color: #a24a06; }
.vs-st { font-size: 11px; color: var(--muted); }
.vs-st.st-interesado { color: var(--good); font-weight: 600; } .vs-st.st-cierre { color: var(--accent); font-weight: 700; } .vs-st.st-humano { color: var(--warn); font-weight: 700; }
.vs-grid { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.vs-list { padding: 0; overflow: hidden; }
.vs-list ul { list-style: none; margin: 0; padding: 0; max-height: 68vh; overflow-y: auto; }
.vs-list li a { display: grid; gap: 3px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.vs-list li a.on, .vs-list li a:hover { background: #f1f6f3; }
.vs-li-top { display: flex; justify-content: space-between; gap: 6px; }
.vs-empty { padding: 14px; }
.vs-chat { display: flex; flex-direction: column; gap: 8px; }
.vs-chat-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.vs-ctrls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vs-alert { margin: 6px 0 0; padding: 6px 10px; border-radius: 10px; background: var(--accent-bg); font-size: 13px; }
.vs-msgs { height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: #f4f6f2; border-radius: 12px; }
.vs-m { max-width: 80%; display: flex; flex-direction: column; }
.vs-m .vs-b { padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.vs-m small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.vs-m.vs-out { align-self: flex-end; } .vs-m.vs-out small { text-align: right; }
.vs-m.vs-out .vs-b { background: #dff3e7; border-color: #cbe8d6; }
.vs-m.by-ia .vs-b { background: #eaf0fb; border-color: #d6e1f6; }
.vs-m.vs-note { align-self: center; max-width: 90%; } .vs-m.vs-note .vs-b { background: transparent; border: 0; color: var(--muted); font-size: 12px; text-align: center; }
.vs-m.err .vs-b { border-color: var(--bad); }
.vs-reply { display: flex; gap: 8px; }
.vs-reply textarea { flex: 1; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.vs-chat-empty { padding: 40px; text-align: center; }
.vs-back { display: none; }
@media (max-width: 820px) {
  .vs-kpis { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 108px; overflow-x: auto; padding-bottom: 4px; }
  .vs-kpi { padding: 10px 12px; } .vs-kpi b { font-size: 19px; }
  .vs-grid { grid-template-columns: 1fr; }
  .vs-grid.has-chat .vs-list { display: none; }
  .vs-back { display: block; margin-bottom: 4px; }
  .vs-list ul { max-height: 34vh; }
  .vs-msgs { height: 46vh; }
  .vs-m { max-width: 92%; }
}
.as-form-cfg input:not([type]), .as-form-cfg input[type=text] { display: block; width: 100%; max-width: 360px; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.vs-head .inline-form { display: flex; gap: 8px; align-items: center; }
.vs-head .inline-form input { width: 4.5rem; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
/* Asistente IA: filtros y listado con casillas */
.as-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: end; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.as-filters label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.as-filters select, .as-filters input { font: inherit; font-size: 14px; color: var(--ink); padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; width: 100%; }
.as-filters .btn { grid-column: 1 / -1; justify-self: start; }
.as-item { position: relative; }
.as-pick { display: flex; align-items: flex-start; padding-top: 3px; }
.as-pick input { width: 18px; height: 18px; accent-color: var(--brand); }
.as-list .as-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
.as-item.as-working { opacity: .55; }
.as-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 10px; background: #13221c; color: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
@media (max-width: 900px) { .as-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) { .as-list .as-item { grid-template-columns: auto minmax(0, 1fr); } .as-list .as-side { grid-column: 2; } }
.as-form { display: flex; gap: 8px; }
.as-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
@media (max-width: 960px) { .as-log { height: 14rem; } }
/* Inicio: resumen de Ventas IA */
.sales-summary { margin-bottom: 14px; }
.sales-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.sales-pill { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fbfcfa; color: var(--ink); text-decoration: none; font-size: 14px; }
.sales-pill b { font-size: 16px; margin-right: 3px; }
.sales-pill.hot { background: var(--accent-bg); border-color: var(--accent); }
.sales-card .btn { margin: 4px 4px 0 0; }

/* Submenú del menú lateral */
.side-children { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 38px; border-left: 2px solid var(--line); padding-left: 8px; }
.side-nav .side-children a { padding: 6px 10px; font-size: 13px; font-weight: 500; color: var(--muted); border-radius: 8px; box-shadow: none; background: transparent; }
.side-nav .side-children a:hover { color: var(--ink); background: rgba(29, 36, 32, 0.06); }
.side-nav .side-children a.is-current { color: var(--ink); font-weight: 700; background: #fff; }
/* Trabajo automático */
.as-auto-link { margin-top: 14px; }
.at-status .at-state { display: flex; gap: 12px; align-items: flex-start; }
.at-status h2 { margin: 0; }
.at-dot { width: 12px; height: 12px; border-radius: 50%; background: #c4ccc8; margin-top: 6px; flex: none; }
.at-dot.is-on { background: #1f9d63; box-shadow: 0 0 0 4px rgba(31, 157, 99, .15); }
.at-today { list-style: none; padding: 0; margin: 14px 0 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.at-today li { background: var(--bg, #f6f7f5); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.at-today b { display: block; font-size: 22px; }
.at-today span { font-size: 12px; color: var(--muted); }
.at-form { margin-top: 14px; display: grid; gap: 14px; }
.at-form .card + .card { margin-top: 0; }
.at-form .card { display: grid; gap: 10px; }
.at-form h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.at-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; }
.at-switch { font-weight: 600; }
.at-row { display: flex; gap: 14px; flex-wrap: wrap; }
.at-row select { margin-left: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.at-save { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 12px 16px; margin: 0 -4px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(4px); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 -4px 16px rgba(29, 36, 32, .08); }
.at-form input[type=number] { display: block; max-width: 140px; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }

/* Ventas IA: estilo del primer mensaje */
.vs-style { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.vs-style select { margin-left: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
