/* ==========================================================================
   Prospecta — estilos
   ========================================================================== */

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --surface-3: #e8ecf3;
  --border: #e4e8f0;
  --border-strong: #cdd3dc;
  --text: #0f172a;
  --text-2: #475163;
  --text-3: #7b8597;
  --accent: #1d5fe0;
  --accent-hover: #1650c4;
  --accent-soft: #e9f0fd;
  --accent-text: #1a52c8;
  --on-accent: #ffffff;
  --danger: #c13a28;
  --danger-soft: #fcebe8;
  --success: #12804c;
  --success-soft: #e4f5eb;
  --info: #2a5bd7;
  --info-soft: #e9effd;
  --warn-bg: #ffe98a;
  --warn-text: #4d3a00;
  --warn-soft: #fff6d6;
  --warn-border: #e9c84a;
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --banner-h: 0px;
  --topbar-h: 60px;
  --skel: #e9ecf1;
  --skel-hi: #f5f6f8;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b24;
    --surface-2: #1b222d;
    --surface-3: #232b38;
    --border: #262f3c;
    --border-strong: #354152;
    --text: #e7ebf1;
    --text-2: #a8b2c1;
    --text-3: #7c8799;
    --accent: #5b8dff;
    --accent-hover: #7aa3ff;
    --accent-soft: rgba(91, 141, 255, .15);
    --accent-text: #8fb1ff;
    --on-accent: #ffffff;
    --danger: #f07563;
    --danger-soft: rgba(240, 117, 99, .14);
    --success: #4fcf8c;
    --success-soft: rgba(79, 207, 140, .14);
    --info: #7ea3ff;
    --info-soft: rgba(126, 163, 255, .14);
    --warn-bg: #f2cf4b;
    --warn-text: #2e2300;
    --warn-soft: rgba(242, 207, 75, .12);
    --warn-border: #8a7425;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 4px 12px rgba(0, 0, 0, .2);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
    --skel: #1f2733;
    --skel-hi: #29323f;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; border: 1px solid var(--border); }
:focus-visible { outline: none; box-shadow: var(--ring); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.muted-dash { color: var(--text-3); }
.icon { width: 18px; height: 18px; flex: none; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.noscript { padding: 24px; text-align: center; }
.boot { min-height: 60vh; display: grid; place-items: center; }

/* ---------- Banner demo ---------- */
.demo-banner {
  position: sticky; top: 0; z-index: 60;
  background: var(--warn-bg); color: var(--warn-text);
  border-bottom: 1px solid var(--warn-border);
  font-size: 13.5px; text-align: center; padding: 8px 16px; line-height: 1.4;
}
.demo-banner[hidden] { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: none; cursor: pointer;
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none !important;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled):not(.is-disabled) { background: var(--surface-2); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-light { background: #fff; color: #0f1d3d; }
.btn-light:hover { background: #eef3ff; }
.btn.danger, .linklike.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn-confirm { background: var(--danger) !important; color: #fff !important; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn.is-busy { opacity: .85; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 0; background: none; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.linklike:hover { text-decoration: underline; }
.linklike .icon { width: 16px; height: 16px; }

/* ---------- Spinner / skeleton ---------- */
.spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2.5px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.btn-primary .spinner { border-color: color-mix(in srgb, var(--on-accent) 35%, transparent); border-top-color: var(--on-accent); }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-xs { width: 12px; height: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel {
  display: block; border-radius: 6px;
  background: linear-gradient(90deg, var(--skel) 0%, var(--skel-hi) 50%, var(--skel) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite;
}
.skel-line { height: 12px; width: 100%; margin: 4px 0; }
.skel-line.short { width: 55%; }
.skel-block { height: 160px; width: 100%; margin-top: 12px; }
.skel-input { height: 40px; margin-bottom: 14px; }
.skel-stack { display: grid; gap: 6px; }
.w14 { width: 14%; } .w16 { width: 52%; } .w20 { width: 60%; } .w24 { width: 70%; } .w30 { width: 30%; }
.w36 { width: 80%; } .w40 { width: 40%; } .w60 { width: 60%; }
.leads-skel td .skel-line.w40 { width: 85%; }
.leads-skel td .skel-line.w14 { width: 50%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.skeleton-card { min-height: 360px; background: linear-gradient(90deg, var(--skel) 0%, var(--skel-hi) 50%, var(--skel) 100%) !important; background-size: 200% 100% !important; animation: shimmer 1.3s infinite; border-color: transparent !important; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .presets legend { font-size: 13.5px; font-weight: 600; color: var(--text); }
.opt { font-weight: 400; color: var(--text-3); }
.field-help { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=date], input[type=time], input[type=tel], select, textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%237b8597' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; }
.form-error[hidden] { display: none; }
.fine { font-size: 12.5px; color: var(--text-3); text-align: center; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; font-style: normal;
}
.badge-type { --c: #64748b; background: color-mix(in srgb, var(--c) 13%, transparent); color: color-mix(in srgb, var(--c) 78%, var(--text)); }
.t-persona { --c: #7c4ddb; }
.t-empresa { --c: #2b62d9; }
.t-pyme { --c: #0e8a74; }
.t-restaurante { --c: #d9622b; }
.t-profesor { --c: #c23d84; }
.t-proveedor { --c: #b7860b; }
.t-otro { --c: #64748b; }
.badge-status { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); height: 24px; }
.badge-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); }
.s-borrador { color: var(--info); background: var(--info-soft); border-color: transparent; }
.s-borrador .dot { background: var(--info); }
.s-enviado { color: var(--success); background: var(--success-soft); border-color: transparent; }
.s-enviado .dot { background: var(--success); }
.s-error { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.s-error .dot { background: var(--danger); }
.badge-running { background: var(--accent-soft); color: var(--accent-text); }
.badge-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.card-head h2 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.card-head h2 .icon { width: 16px; height: 16px; }
.pad { padding: 16px 18px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: var(--banner-h); z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { max-width: 1440px; margin: 0 auto; height: var(--topbar-h); padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 17px; letter-spacing: -0.02em; text-decoration: none !important; }
.logo-mark { color: var(--accent); width: 28px; height: 28px; }
.logo-mark svg { width: 28px; height: 28px; }
.logo-sm { font-size: 15px; }
.logo-sm .logo-mark, .logo-sm .logo-mark svg { width: 24px; height: 24px; }
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 550; font-size: 14px; text-decoration: none;
}
.mainnav a .icon { width: 17px; height: 17px; }
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active { background: var(--accent-soft); color: var(--accent-text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.credit-pill {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 12px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13.5px; text-decoration: none !important;
}
.credit-pill strong { color: var(--text); margin-left: 4px; }
.credit-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.credit-pill.is-low .credit-dot { background: #e0a100; }
.credit-pill.is-empty .credit-dot { background: var(--danger); }
.usermenu { position: relative; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.usermenu-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 250px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
}
.usermenu-pop[hidden] { display: none; }
.usermenu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; display: grid; }
.usermenu-head span { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.usermenu-pop a, .usermenu-pop button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: var(--text); font-size: 14px; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none;
}
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--surface-2); }
.usermenu-pop .icon { width: 17px; height: 17px; color: var(--text-2); }

/* ---------- Page ---------- */
.main { min-height: calc(100vh - var(--topbar-h)); }
.page { max-width: 1440px; margin: 0 auto; padding: 24px; }
.page.narrow { max-width: 640px; }
.center-page { min-height: 70vh; display: grid; place-items: center; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; margin-bottom: 6px; }

/* ---------- Panel ---------- */
.credits { display: flex; align-items: center; gap: 28px; padding: 16px 20px; margin-bottom: 20px; }
.credits-info { display: grid; gap: 2px; min-width: 160px; }
.credits-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.credits-num { display: flex; align-items: baseline; gap: 8px; }
.credits-num strong { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.credits-num span { color: var(--text-3); font-size: 14px; }
.credits-bar-wrap { flex: 1; display: grid; gap: 8px; min-width: 0; }
.credits-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.credits-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .5s ease; }
.credits-bar.is-low span { background: #e0a100; }
.credits-bar.is-empty span { background: var(--danger); }
.credits-sub { font-size: 13px; color: var(--text-3); }

.panel-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.panel-main { display: grid; gap: 20px; min-width: 0; }

.history { position: sticky; top: calc(var(--banner-h) + var(--topbar-h) + 20px); max-height: calc(100vh - var(--banner-h) - var(--topbar-h) - 40px); display: flex; flex-direction: column; }
.history-list { overflow-y: auto; padding: 0 8px 10px; }
.history-row { position: relative; border-radius: 10px; }
.history-row:hover, .history-row.active { background: var(--surface-2); }
.history-row.active::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.history-item {
  display: grid; gap: 3px; width: 100%; padding: 10px 40px 10px 12px; background: none; border: 0; text-align: left;
  cursor: pointer; border-radius: 10px; color: var(--text);
}
.history-all { padding-right: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; }
.history-all.active, .history-all:hover { background: var(--surface-2); border-radius: 10px; }
.history-q { font-size: 14px; font-weight: 550; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.history-all .history-q { display: flex; align-items: center; gap: 8px; }
.history-all .icon { width: 16px; height: 16px; color: var(--text-2); }
.history-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.hstatus { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.hstatus.running { color: var(--accent-text); }
.hstatus.error { color: var(--danger); }
.history-del { position: absolute; right: 4px; top: 8px; width: 30px; height: 30px; opacity: 0; transition: opacity .15s; }
.history-del .icon { width: 16px; height: 16px; }
.history-row:hover .history-del, .history-del:focus-visible { opacity: 1; }
.history-del:hover { color: var(--danger); background: var(--danger-soft); }
.history-empty { padding: 8px 12px 14px; color: var(--text-3); font-size: 14px; }
.history-skel { padding: 10px 12px; }

.search-card { padding: 20px; display: grid; gap: 14px; }
.search-label { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.search-card textarea { font-size: 16px; min-height: 64px; padding: 12px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips-label { font-size: 13px; color: var(--text-3); margin-right: 2px; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.search-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(160px, 1.2fr) 100px auto; gap: 12px; align-items: end; }
.btn-search { height: 40px; padding: 0 20px; }
.search-hint { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.search-hint .icon { width: 16px; height: 16px; }
.search-hint.is-warn { color: var(--danger); }

.results { min-width: 0; overflow: hidden; }
.results-head { padding: 18px 20px 12px; display: flex; justify-content: space-between; gap: 16px; }
.results-head h2 { font-size: 18px; }
.results-title { min-width: 0; display: grid; gap: 8px; }
.results-title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13.5px; }
.meta-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; text-transform: capitalize; }
.meta-chip .icon { width: 13px; height: 13px; }
.results-toolbar { display: flex; gap: 10px; padding: 0 20px 14px; flex-wrap: wrap; }
.results-toolbar[hidden] { display: none; }
.results-toolbar select { width: 180px; }
.results-toolbar .btn { margin-left: auto; }
.input-icon { position: relative; flex: 1; min-width: 200px; max-width: 380px; }
.input-icon .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 17px; height: 17px; pointer-events: none; }
.input-icon input { padding-left: 36px; }
.results-foot { padding: 12px 20px 16px; font-size: 13px; color: var(--text-3); border-top: 1px solid var(--border); }

/* Tabla de leads */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
table.leads, table.simple-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.leads th, .simple-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em;
  padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.leads td, .simple-table td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.leads th:first-child, .leads td:first-child, .simple-table th:first-child, .simple-table td:first-child { padding-left: 20px; }
.leads tbody tr { cursor: pointer; transition: background .12s; }
.leads tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.leads tbody tr.is-selected { background: var(--accent-soft); }
.leads tbody tr:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.leads tbody tr:last-child td { border-bottom: 0; }
.leads-skel tbody tr { cursor: default; }
.c-name { min-width: 180px; max-width: 260px; }
.lead-name { display: block; font-weight: 600; color: var(--text); line-height: 1.35; }
.lead-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.lead-sub:empty { display: none; }
.lead-sub .badge { height: 20px; font-size: 11.5px; padding: 0 7px; }
.lead-loc { display: block; font-size: 12.5px; color: var(--text-3); }
.c-email a, .c-web a, .c-src a { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.c-phone { white-space: nowrap; }
.c-src a { color: var(--text-2); max-width: 140px; }
.c-li a { white-space: nowrap; }
.ext { position: relative; }
td .ext { color: var(--accent-text); }

/* Estado corriendo */
.running-box { padding: 4px 20px 18px; display: grid; gap: 14px; }
.running-head { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--accent-soft); border-radius: 12px; }
.running-head .spinner { margin-top: 2px; }
.running-head strong { font-size: 15px; }
.running-head p { font-size: 13.5px; margin-top: 2px; }
.running-steps { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--text-3); }
.running-steps li { display: inline-flex; align-items: center; gap: 8px; }
.running-steps li.done { color: var(--success); }
.running-steps li.now { color: var(--text); font-weight: 600; }
.running-steps .icon { width: 16px; height: 16px; }
.step-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-strong); }

/* Estados vacíos */
.empty { text-align: center; padding: 48px 24px 56px; display: grid; justify-items: center; gap: 10px; max-width: 560px; margin: 0 auto; }
.empty h2, .empty h3 { font-size: 17px; }
.empty p { color: var(--text-2); font-size: 14.5px; }
.empty .btn { margin-top: 8px; }
.empty > .icon { width: 28px; height: 28px; color: var(--text-3); }
.empty-sm { padding: 28px 20px 32px; }
.empty-illus { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 6px; }
.empty-illus .icon { width: 28px; height: 28px; }
.empty-illus.is-error { background: var(--danger-soft); color: var(--danger); }
.empty-icon { font-size: 44px; font-weight: 800; color: var(--accent); letter-spacing: -0.03em; }

/* ---------- Drawer ---------- */
.drawer-root { position: fixed; inset: 0; z-index: 80; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 25, .38); opacity: 0; transition: opacity .2s; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%);
  background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); outline: none;
}
.drawer-root.open .drawer-backdrop { opacity: 1; }
.drawer-root.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px 24px; border-bottom: 1px solid var(--border); }
.drawer-title-wrap { flex: 1; min-width: 0; display: grid; gap: 10px; }
.drawer-head h2 { font-size: 20px; overflow-wrap: anywhere; }
.drawer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px 24px; }
.drawer-section { padding: 18px 0; }
.drawer-section + .drawer-section { border-top: 1px solid var(--border); }
.section-label { font-size: 12.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-label .icon { width: 16px; height: 16px; color: var(--accent); }
.kv { margin: 0; display: grid; gap: 2px; }
.kv-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 8px 0; align-items: center; }
.kv-row dt { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13.5px; }
.kv-row dt .icon { width: 16px; height: 16px; color: var(--text-3); }
.kv-row dd { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.kv-desc { margin-top: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.kv-desc dd { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.composer { display: grid; gap: 14px; }
.composer .section-label { margin-bottom: 0; }
.composer-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.draft { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.draft[hidden], .draft-skel[hidden], .draft-note[hidden] { display: none; }
.draft input, .draft textarea { background: var(--surface); }
.draft textarea { min-height: 240px; font-size: 14.5px; }
.draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-actions .btn-primary { flex: 1 1 100%; }
.draft-actions .btn-secondary { flex: 1 1 auto; }
.draft-note { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; line-height: 1.45; }
.draft-note .icon { width: 17px; height: 17px; margin-top: 1px; }
.draft-note.is-info { background: var(--info-soft); color: var(--text); }
.draft-note.is-info .icon { color: var(--info); }
.draft-note.is-warn { background: var(--warn-soft); color: var(--text); }
.draft-note.is-warn .icon { color: #b88a00; }
.draft-note.is-success { background: var(--success-soft); color: var(--text); }
.draft-note.is-success .icon { color: var(--success); }
.draft-skel { padding: 16px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
.drawer-foot .linklike { font-size: 13.5px; }

/* ---------- Settings ---------- */
.conn-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.conn-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.conn-pill.is-on { background: var(--success-soft); color: var(--success); border-color: transparent; }
.conn-pill.is-on .dot { background: var(--success); }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-form { padding: 24px; gap: 22px; }
.presets { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg-item { position: relative; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg-item span {
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface); transition: all .15s; line-height: 1.25;
}
.seg-item:hover span { border-color: var(--accent); }
.seg-item input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.seg-item input:focus-visible + span { box-shadow: var(--ring); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: span 2; }
.check-field { align-content: end; padding-bottom: 2px; }
.settings-form:not(.is-custom) .server-field input { background: var(--surface-2); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); padding-top: 20px; }
.form-actions [hidden] { display: none; }
.push-right { margin-left: auto; }
.help { padding: 24px; position: sticky; top: calc(var(--banner-h) + var(--topbar-h) + 20px); }
.help h2 { font-size: 16px; display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.help h2 .icon { color: var(--accent); width: 20px; height: 20px; }
.help > p { font-size: 14px; }
.howto { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.howto li { counter-increment: s; position: relative; padding-left: 38px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.howto li strong { color: var(--text); }
.howto li::before {
  content: counter(s); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-text);
}
.help-note { display: flex; gap: 10px; margin-top: 18px; padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.help-note .icon { width: 17px; height: 17px; flex: none; color: var(--text-3); }

/* ---------- Billing / planes ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 14.5px; }
.alert .icon { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-success { background: var(--success-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--success) 30%, transparent); }
.alert-success .icon { color: var(--success); }
.alert-info { background: var(--info-soft); }
.balance { padding: 14px 20px; display: grid; justify-items: start; gap: 0; min-width: 200px; box-shadow: none; }
.balance strong { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.plans { display: grid; gap: 20px; align-items: stretch; }
.plans-2 { grid-template-columns: repeat(2, minmax(0, 380px)); justify-content: center; }
.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; margin: 0 auto; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow);
}
.plan h3 { font-size: 18px; }
.plan-desc { color: var(--text-2); font-size: 14px; margin-top: -8px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; }
.plan-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.plan-once { color: var(--text-3); font-size: 13.5px; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; flex: 1; }
.plan-feats li { display: flex; gap: 10px; align-items: center; font-size: 14.5px; color: var(--text-2); }
.plan-feats li strong { color: var(--text); }
.plan-feats .icon { width: 17px; height: 17px; color: var(--accent); }
.plan-featured { border: 2px solid var(--accent); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 16%, transparent); }
.plan-ribbon {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.billing [data-pay-note] { margin: 18px 0 28px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.billing [data-pay-note] .icon { width: 15px; height: 15px; }
.payments { overflow: hidden; }
.simple-table td { font-size: 14px; }
.simple-table tr:last-child td { border-bottom: 0; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  font-size: 14px; line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.toast.in { opacity: 1; transform: none; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast-icon svg { width: 16px; height: 16px; }
.toast-success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast-error .toast-icon { background: var(--danger-soft); color: var(--danger); }
.toast-info .toast-icon { background: var(--info-soft); color: var(--info); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-success { border-left: 3px solid var(--success); }
.toast-text { flex: 1; padding-top: 1px; }
.toast-action { font-weight: 600; white-space: nowrap; padding-top: 1px; }
.toast-close { border: 0; background: none; color: var(--text-3); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; }
.toast-close:hover { color: var(--text); }

/* ---------- Auth ---------- */
.auth { min-height: calc(100vh - var(--banner-h)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side {
  background: radial-gradient(1200px 500px at -10% -10%, #2a5bd7 0%, transparent 60%), linear-gradient(160deg, #13234a, #0b1530);
  color: #e6ecfa; padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.logo-light { color: #fff; }
.logo-light .logo-mark { color: #7aa5ff; }
.auth-side-copy h2 { font-size: 30px; letter-spacing: -0.025em; max-width: 420px; color: #fff; }
.auth-side-copy ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-side-copy li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: #c9d5f2; }
.auth-side-copy .icon { color: #7aa5ff; }
.auth-side-foot { font-size: 13px; color: #9fb0d6; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; align-content: center; gap: 24px; }
.auth-logo-mobile { display: none; }
.auth-card { width: 100%; max-width: 400px; display: grid; gap: 8px; }
.auth-card h1 { font-size: 26px; }
.auth-card .form { margin-top: 20px; }
.auth-foot { text-align: center; color: var(--text-2); font-size: 14px; margin-top: 16px; }

/* ---------- Landing ---------- */
.landing { background: var(--bg); }
.lp-header { position: sticky; top: var(--banner-h); z-index: 40; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.lp-header-inner { height: 68px; display: flex; align-items: center; gap: 32px; }
.lp-nav { display: flex; gap: 24px; }
.lp-nav .linklike { color: var(--text-2); font-weight: 500; font-size: 14.5px; }
.lp-nav .linklike:hover { color: var(--text); text-decoration: none; }
.lp-actions { margin-left: auto; display: flex; gap: 8px; }
.hero { padding: 64px 0 80px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -200px -100px auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; }
.eyebrow .icon { width: 15px; height: 15px; }
.hero h1 { font-size: clamp(32px, 4.4vw, 50px); letter-spacing: -0.035em; line-height: 1.08; margin: 20px 0 18px; font-weight: 800; }
.accent-text { color: var(--accent-text); }
.lead { font-size: 18px; color: var(--text-2); max-width: 560px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 14px; }
.hero-points li { display: inline-flex; align-items: center; gap: 7px; }
.hero-points .icon { width: 16px; height: 16px; color: var(--accent); }
.hero-visual { position: relative; padding-bottom: 60px; }
.mock-window { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-query { display: flex; align-items: center; gap: 10px; margin: 16px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 10px; font-size: 14px; box-shadow: var(--ring); }
.mock-query .icon { color: var(--accent); }
.mock-table { margin: 0 16px 18px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.mock-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 10px; padding: 10px 14px; font-size: 13.5px; border-bottom: 1px solid var(--border); align-items: center; }
.mock-row:last-child { border-bottom: 0; }
.mock-row span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-head { background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.mock-head span:first-child { font-weight: 600; }
.mock-mail { color: var(--accent-text); }
.mock-draft {
  position: absolute; right: -14px; bottom: 0; width: 300px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 16px; display: grid; gap: 8px;
}
.mock-draft-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent-text); }
.mock-draft-head .icon { width: 16px; height: 16px; }
.mock-subject { font-weight: 650; font-size: 14px; }
.mock-body { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.mock-draft-actions { display: flex; gap: 8px; margin-top: 4px; }
.mock-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 12.5px; font-weight: 600; }
.mock-btn .icon { width: 14px; height: 14px; }
.mock-btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

.lp-section { padding: 88px 0; }
.lp-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; display: grid; gap: 12px; }
.section-head h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.03em; }
.eyebrow-plain { font-size: 13px; font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }
.section-sub { color: var(--text-2); font-size: 16.5px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.step-num { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 750; margin-bottom: 18px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 15px; }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case { padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); transition: border-color .15s, transform .15s; }
.case:hover { border-color: var(--accent); transform: translateY(-2px); }
.case-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 14px; }
.case h3 { font-size: 16px; margin-bottom: 6px; }
.case p { color: var(--text-2); font-size: 14.5px; font-style: italic; }
.responsible { display: flex; gap: 24px; max-width: 860px; margin: 0 auto; padding: 32px; border-radius: 18px; border: 1px solid var(--border); background: var(--bg); }
.responsible-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.responsible-icon .icon { width: 26px; height: 26px; }
.responsible h2 { font-size: 22px; margin-bottom: 10px; }
.responsible p { color: var(--text-2); font-size: 15px; }
.responsible p + p { margin-top: 10px; }
.lp-cta { padding: 80px 0; background: linear-gradient(140deg, #13234a, #0b1530); color: #fff; }
.lp-cta-inner { text-align: center; display: grid; justify-items: center; gap: 14px; }
.lp-cta h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.03em; max-width: 720px; }
.lp-cta p { color: #b9c6e6; font-size: 17px; margin-bottom: 12px; }
.lp-footer { padding: 28px 0; border-top: 1px solid var(--border); }
.lp-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lp-footer p { color: var(--text-3); font-size: 13.5px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .search-row { grid-template-columns: 1fr 1fr 100px; }
  .btn-search { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; }
  .steps, .cases { grid-template-columns: 1fr 1fr; }
  .plans-3 { grid-template-columns: 1fr; max-width: 440px; }
  .settings-grid { grid-template-columns: 1fr; }
  .help { position: static; }
}

@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; }
  .panel-main { display: contents; }
  .results { order: 2; }
  .history { order: 3; position: static; max-height: none; }
  .history-del { opacity: 1; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .page { padding: 16px; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
  .hide-sm { display: none; }
  .mainnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; justify-content: space-around; gap: 0;
    background: var(--surface); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .mainnav a { flex-direction: column; gap: 2px; height: auto; padding: 6px 16px; font-size: 11.5px; }
  .mainnav a .icon { width: 20px; height: 20px; }
  .main { padding-bottom: 72px; }
  .toasts { bottom: 84px; right: 16px; left: 16px; width: auto; }
  .page-head h1 { font-size: 22px; }

  .credits { flex-wrap: wrap; gap: 12px 16px; padding: 14px 16px; }
  .credits-bar-wrap { order: 3; flex-basis: 100%; }
  .credits .btn { margin-left: auto; }
  .search-card { padding: 16px; }
  .search-row { grid-template-columns: 1fr 96px; }
  .search-row .field:first-child { grid-column: 1 / -1; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .results-head { padding: 16px 16px 10px; }
  .results-title h2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .results-toolbar { padding: 0 16px 14px; }
  .input-icon { max-width: none; min-width: 100%; }
  .results-toolbar select { flex: 1; width: auto; }
  .results-toolbar .btn { margin-left: 0; }
  .running-box { padding: 4px 16px 16px; }

  /* Tabla → tarjetas */
  .table-wrap { border-top: 0; overflow: visible; padding: 0 12px 12px; }
  table.leads, .leads tbody, .leads tr, .leads td { display: block; width: 100%; }
  .leads thead { display: none; }
  .leads tbody { display: grid; gap: 10px; }
  .leads tbody tr {
    display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px; border: 1px solid var(--border);
    border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm);
  }
  .leads td { padding: 0; border: 0 !important; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: none; font-size: 14px; }
  .leads th:first-child, .leads td:first-child { padding-left: 0; }
  .leads td.c-name { grid-column: 1; display: block; }
  .leads td.c-type { grid-column: 2; grid-row: 1; align-self: start; justify-content: flex-end; }
  .leads td.c-email, .leads td.c-phone, .leads td.c-web, .leads td.c-li, .leads td.c-src { grid-column: 1 / -1; }
  .leads td.c-email { margin-top: 8px; }
  .leads td[data-label]:not(.c-name):not(.c-type)::before {
    content: attr(data-label); flex: none; width: 76px; font-size: 12px; color: var(--text-3); font-weight: 500;
  }
  .leads td.c-email a, .leads td.c-web a, .leads td.c-src a { max-width: calc(100vw - 150px); }
  .leads-skel tbody tr td:nth-child(n+5) { display: none; }
  .leads-skel td::before { display: none !important; }
  .results-foot { padding: 12px 16px 16px; }

  .simple-table thead { display: none; }
  .simple-table, .simple-table tbody, .simple-table tr, .simple-table td { display: block; width: 100%; }
  .simple-table tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .simple-table td { border: 0; padding: 3px 0 !important; display: flex; justify-content: space-between; gap: 12px; }
  .simple-table td::before { content: attr(data-label); color: var(--text-3); font-size: 13px; }

  /* Drawer pantalla completa */
  .drawer { width: 100%; }
  .drawer-head { padding: 16px 12px 14px 16px; }
  .drawer-body { padding: 4px 16px 20px; }
  .drawer-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .kv-row { grid-template-columns: 104px minmax(0, 1fr); }
  .composer-row { grid-template-columns: 1fr; }
  .draft { padding: 12px; }

  .settings-form, .help { padding: 18px; }
  .seg { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .form-actions .btn { flex: 1 1 auto; }
  .push-right { margin-left: 0; }

  .plans-2 { grid-template-columns: 1fr; }
  .balance { width: 100%; }

  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-logo-mobile { display: inline-flex; }
  .auth-main { align-content: start; padding-top: 32px; place-items: start center; }

  .lp-nav { display: none; }
  .lp-header-inner { height: 60px; }
  .hero { padding: 36px 0 56px; }
  .lead { font-size: 16.5px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-visual { padding-bottom: 0; }
  .mock-draft { position: relative; right: auto; width: auto; margin: -24px 16px 0; }
  .mock-row { grid-template-columns: 1.5fr 1fr; }
  .mock-row span:last-child { display: none; }
  .lp-section { padding: 60px 0; }
  .section-head { margin-bottom: 32px; }
  .steps, .cases { grid-template-columns: 1fr; }
  .responsible { flex-direction: column; padding: 22px; gap: 16px; }
  .lp-cta { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ==========================================================================
   v2: chat, búsqueda avanzada, login en un paso, Mercado Pago
   ========================================================================== */
.chat { display: flex; flex-direction: column; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.chat-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-title h2 { font-size: 16px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.chat-avatar .icon { width: 19px; height: 19px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 180px; max-height: 420px; overflow-y: auto; background: var(--surface-2); }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { max-width: min(78%, 620px); padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-assistant .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; color: var(--text); box-shadow: var(--shadow-sm); }
.msg-user .bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.typing { display: inline-flex; align-items: center; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
.typing em { font-style: normal; color: var(--text-3); font-size: 13px; margin-left: 6px; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 2px; }
.chat-suggest .chip { background: var(--surface); }
.search-card-chat {
  display: flex; align-items: center; gap: 12px; width: min(78%, 620px); padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm);
}
.scc-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.scc-icon .icon { width: 18px; height: 18px; }
.scc-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.scc-body strong { font-size: 14px; }
.scc-sub { font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-card-chat.is-running { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.search-card-chat.is-running .scc-icon { background: var(--accent-soft); }
.search-card-chat.is-done .scc-icon { background: var(--success-soft); color: var(--success); }
.search-card-chat.is-error .scc-icon { background: var(--danger-soft); color: var(--danger); }
.search-card-chat.is-muted { opacity: .7; }
.chat-input { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px 6px; }
.chat-input textarea { min-height: 44px; max-height: 180px; resize: none; font-size: 15px; padding: 11px 14px; border-radius: 12px; overflow-y: auto; }
.chat-send { width: 44px; height: 44px; padding: 0; border-radius: 12px; flex: none; }
.chat-send .icon { width: 19px; height: 19px; }
.chat-hint { font-size: 12px; color: var(--text-3); padding: 0 18px 12px; }

.advanced { overflow: hidden; }
.advanced > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  font-weight: 600; font-size: 14.5px; user-select: none;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary > .icon:first-child { width: 17px; height: 17px; color: var(--text-2); }
.advanced > summary > .icon:last-child { margin-left: auto; width: 17px; height: 17px; color: var(--text-3); transition: transform .15s; }
.advanced[open] > summary > .icon:last-child { transform: rotate(90deg); }
.advanced > summary:hover { background: var(--surface-2); }
.adv-sub { font-weight: 400; }
.advanced .search-card { padding: 4px 18px 18px; border-top: 1px solid var(--border); padding-top: 16px; }
.advanced .search-label { font-size: 15px; }

.email-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.email-chip .icon { width: 17px; height: 17px; color: var(--text-3); }
.email-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.email-chip .linklike { font-size: 13.5px; }
.strength { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 132px; flex: none; }
.strength-bar span { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.strength-label { font-size: 12.5px; color: var(--text-3); }
.strength[data-score="0"] .strength-bar span.on, .strength[data-score="1"] .strength-bar span.on { background: var(--danger); }
.strength[data-score="2"] .strength-bar span.on { background: #e0a100; }
.strength[data-score="3"] .strength-bar span.on { background: #3aa76d; }
.strength[data-score="4"] .strength-bar span.on { background: var(--success); }
.strength[data-score="0"] .strength-label, .strength[data-score="1"] .strength-label { color: var(--danger); }

.plan-local { font-size: 13px; color: var(--text-2); margin-top: -10px; }
.alert-error { background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-error .icon { color: var(--danger); }
.alert-info .icon { color: var(--info); }

@media (max-width: 900px) {
  .chat { order: 0; }
  .advanced { order: 1; }
}
@media (max-width: 760px) {
  .chat-head { padding: 12px 14px; }
  .chat-head .btn span { display: none; }
  .chat-head .muted { display: none; }
  .chat-log { padding: 14px; max-height: 55vh; }
  .bubble, .search-card-chat { max-width: 88%; width: auto; }
  .search-card-chat { width: 88%; flex-wrap: wrap; }
  .search-card-chat .btn { margin-left: 46px; }
  .chat-input { padding: 12px 14px 6px; }
  .chat-hint { display: none; }
  .adv-sub { display: none; }
  .advanced .search-card { padding: 14px 16px 16px; }
}
.billing .page-head { align-items: center; }
@media (max-width: 760px) {
  /* backdrop-filter crearía un containing block para la nav fija inferior */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
  .scc-body { flex: 1 1 calc(100% - 46px); }
  .search-card-chat .btn { margin-left: 46px; }
  .drawer-foot .linklike { white-space: nowrap; }
  .drawer-root ~ .toasts, body.no-scroll .toasts { bottom: 16px; }
}
@media (max-width: 760px) {
  .credits-info { min-width: 0; }
}

/* ==========================================================================
   v3: objetivo, plantillas, perfil, datos extra del lead
   ========================================================================== */
.purpose-chip {
  --c: #64748b; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap; letter-spacing: .01em;
  background: color-mix(in srgb, var(--c) 12%, transparent); color: color-mix(in srgb, var(--c) 80%, var(--text));
}
.p-vender { --c: #0e8a74; }
.p-trabajo { --c: #c2410c; }
.p-proveedor { --c: #b7860b; }
.p-contratar { --c: #2b62d9; }
.p-colaborar { --c: #7c4ddb; }
.p-otro { --c: #64748b; }
.drawer-badges .purpose-chip, .results-meta .purpose-chip { height: 24px; border-radius: 999px; padding: 0 9px; font-size: 12.5px; }
.history-meta .purpose-chip { margin-right: 2px; }
.history-meta { flex-wrap: wrap; }

.email-cell { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; max-width: 100%; }
.email-status { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.es-ok { background: var(--success-soft); color: var(--success); }
.es-bad { background: var(--danger-soft); color: var(--danger); }
.es-unk { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.kv-row .email-cell { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }

.score { display: inline-flex; align-items: center; gap: 8px; }
.score-bar { width: 56px; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; flex: none; }
.score-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.score-mid .score-bar span { background: #e0a100; }
.score-lo .score-bar span { background: var(--text-3); }
.score-num { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 20px; }
.lead-role { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 0 6px; border-radius: 5px; line-height: 18px; }
.c-price { max-width: 170px; }
.price-info { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; color: var(--text); }
.c-score { white-space: nowrap; }

.templates { padding: 4px 18px 16px; border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 10px; }
.templates-label { font-size: 12.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.templates-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.template-card {
  flex: 0 0 220px; display: grid; gap: 6px; align-content: start; text-align: left; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s;
}
.template-card:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.template-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.template-top strong { font-size: 14px; line-height: 1.3; }
.template-ex { font-size: 12.5px; color: var(--text-3); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.purpose-field { max-width: 420px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 14px; scroll-margin-top: calc(var(--banner-h) + var(--topbar-h) + 16px); }
.section-title h2 { font-size: 18px; margin-bottom: 4px; }
.section-title p { font-size: 14px; max-width: 720px; }
.settings-grid + .section-title { margin-top: 36px; }
.profile-form { padding: 24px; max-width: 860px; }
.profile-note a { font-weight: 600; }

@media (max-width: 760px) {
  .templates { padding: 12px 14px 14px; }
  .template-card { flex-basis: 200px; }
  .purpose-field { max-width: none; }
  .profile-form { padding: 18px; }
  .section-title { flex-wrap: wrap; align-items: flex-start; }
  .leads td.c-email .email-cell { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; }
  .leads td.c-price, .leads td.c-score { grid-column: 1 / -1; max-width: none; }
}
.results, .chat, .advanced { scroll-margin-top: calc(var(--banner-h) + var(--topbar-h) + 12px); }
@media (min-width: 761px) {
  /* Nombre fijo al desplazar la tabla en horizontal */
  .leads th:first-child, .leads td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .leads th:first-child { background: var(--surface-2); }
  .leads tbody tr:hover td:first-child { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
  .leads tbody tr.is-selected td:first-child { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
}
.lead-role { background: none; border: 0; padding: 0; font-size: 12.5px; line-height: 1.35; color: var(--text-2); }
.lead-role + .lead-loc::before { content: '·'; margin-right: 8px; color: var(--text-3); }
.c-price { min-width: 150px; }

/* ==========================================================================
   Cumplimiento legal: pie legal, páginas públicas, términos, cuenta, avisos
   ========================================================================== */
.legal-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.shell .legal-footer, .auth-main .legal-footer { margin-top: 32px; }
.legal-footer-inner { max-width: 1160px; margin: 0 auto; padding: 24px; display: grid; gap: 14px; }
.legal-footer.is-compact .legal-footer-inner { max-width: 1440px; padding: 18px 24px; gap: 10px; }
.lf-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.lf-provider { font-size: 13.5px; color: var(--text-2); }
.lf-consumer { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-btn {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); text-decoration: none !important;
}
.lf-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.lf-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.lf-links a { color: var(--text-2); }
.lf-links a:hover { color: var(--accent-text); }
.lf-note { font-size: 12.5px; color: var(--text-3); }
.auth-main { align-content: center; }
.auth-main .legal-footer { width: 100%; max-width: 560px; background: none; border-top: 1px solid var(--border); }
.auth-main .legal-footer .lf-top .logo { display: none; }

.usermenu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

.public-page { min-height: 100vh; display: flex; flex-direction: column; }
.public-page .legal-footer { margin-top: auto; }
.pub-header { border-bottom: 1px solid var(--border); }
.pub-main { padding-top: 32px; padding-bottom: 48px; max-width: 880px; }
.pub-main.is-wide { max-width: 1160px; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.legal-nav { position: sticky; top: calc(var(--banner-h) + 84px); display: grid; gap: 2px; }
.legal-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text-2); font-size: 14px; text-decoration: none; }
.legal-nav a:hover { background: var(--surface-2); color: var(--text); }
.legal-nav a.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.legal-doc { padding: 36px 40px; line-height: 1.7; font-size: 15px; }
.legal-doc h1 { font-size: 28px; margin-bottom: 18px; letter-spacing: -0.02em; }
.legal-doc h2 { font-size: 19px; margin: 28px 0 10px; }
.legal-doc h3 { font-size: 16px; margin: 22px 0 8px; }
.legal-doc h4, .legal-doc h5, .legal-doc h6 { font-size: 15px; margin: 18px 0 6px; }
.legal-doc p { margin: 10px 0; color: var(--text); }
.legal-doc ul, .legal-doc ol { margin: 10px 0; padding-left: 22px; }
.legal-doc li { margin: 4px 0; }
.legal-doc blockquote { margin: 14px 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text-2); }
.legal-doc blockquote p { color: var(--text-2); margin: 6px 0; }
.legal-doc hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.legal-doc pre { white-space: pre-wrap; background: var(--surface-2); padding: 12px; border-radius: 8px; font-size: 13px; }
.md-table { overflow-x: auto; margin: 14px 0; border: 1px solid var(--border); border-radius: 10px; }
.md-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.md-table th { text-align: left; background: var(--surface-2); padding: 9px 12px; font-size: 13px; }
.md-table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.narrow-doc { max-width: 760px; margin: 0 auto; }
.notice-actions, .consumer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 10px; }
.consumer-card { padding: 32px; display: grid; gap: 12px; }
.consumer-card h1 { font-size: 26px; }
.consumer-card .sub-h { font-size: 16px; margin-top: 10px; }
.plain-list { margin: 6px 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }

.rights-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.rights-card { padding: 28px; display: grid; gap: 14px; }
.rights-card h1 { font-size: 26px; }
.rights-aside { padding: 24px; font-size: 14px; line-height: 1.6; }
.rights-aside h2 { font-size: 16px; display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rights-aside h2 .icon { color: var(--accent); }
.rights-aside p { margin: 8px 0; color: var(--text-2); }
.radio-list { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.radio-list legend { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }
.radio-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; cursor: pointer; }
.radio-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-item input { margin-top: 3px; accent-color: var(--accent); width: 17px; height: 17px; flex: none; }
.radio-item span { display: grid; gap: 2px; font-size: 14px; }
.radio-item small { color: var(--text-3); font-size: 12.5px; }

.terms-checks { border: 0; padding: 12px 14px; margin: 0; display: grid; gap: 10px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--border); }
.check-top { align-items: flex-start; font-weight: 400; font-size: 13.5px; line-height: 1.45; }
.check-top input { margin-top: 2px; flex: none; }
.terms-checks.is-invalid { border-color: var(--danger); }
.terms-checks.is-invalid input:not(:checked) { outline: 2px solid var(--danger); outline-offset: 1px; }

.modal-root { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 25, .45); }
.modal { position: relative; width: min(520px, 100%); padding: 24px; display: grid; gap: 14px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { font-size: 19px; }
.summary { margin: 0; display: grid; gap: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--text-2); }
.summary dd { margin: 0; text-align: right; }
.refund-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin: -16px 0 28px; flex-wrap: wrap; }
.refund-note .icon { width: 15px; height: 15px; }
.c-actions { text-align: right; white-space: nowrap; }

.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1100px; }
.account-card { padding: 22px; display: grid; gap: 12px; align-content: start; }
.account-card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.account-card h3 .icon { color: var(--text-2); }
.account-card p { font-size: 14px; }
.account-card > .btn { justify-self: start; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.delete-confirm { display: grid; gap: 12px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(.95); }

.chat-privacy { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-3); padding: 0 18px 14px; line-height: 1.45; }
.chat-privacy .icon { width: 14px; height: 14px; margin-top: 1px; flex: none; }

.footer-preview { border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface); padding: 10px 12px; display: grid; gap: 6px; }
.footer-preview-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.footer-preview-label .icon { width: 14px; height: 14px; color: var(--accent); }
.footer-preview pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--text-2); }
.field-label-static { font-size: 13.5px; font-weight: 600; }
.ai-hint { display: inline-flex; align-items: center; gap: 6px; }
.ai-hint .icon { width: 13px; height: 13px; color: var(--accent); }
.nollame-inline { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.nollame-note { display: flex; align-items: center; gap: 10px; margin: 0 20px 12px; padding: 8px 8px 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.nollame-note .icon { width: 16px; height: 16px; flex: none; }
.nollame-note span { flex: 1; }
.nollame-note .icon-btn { width: 28px; height: 28px; }
.demo-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 0 5px; line-height: 17px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-text); }
.s-baja { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.s-baja .dot { background: var(--danger); }
tr.is-baja .lead-name { color: var(--text-3); text-decoration: line-through; }
.foot-actions { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.drawer-foot .linklike { white-space: nowrap; }
.baja-note { margin-top: 16px; }

@media (max-width: 900px) {
  .legal-layout, .rights-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .legal-nav a { border: 1px solid var(--border); font-size: 13px; padding: 6px 10px; }
}
@media (max-width: 760px) {
  .legal-footer-inner, .legal-footer.is-compact .legal-footer-inner { padding: 18px 16px; }
  .shell .legal-footer { margin-bottom: 0; }
  .lf-btn { flex: 1 1 auto; justify-content: center; }
  .legal-doc { padding: 22px 18px; font-size: 14.5px; }
  .legal-doc h1 { font-size: 22px; }
  .consumer-card, .rights-card, .rights-aside { padding: 20px; }
  .account-grid { grid-template-columns: 1fr; }
  .nollame-note { margin: 0 12px 10px; }
  .c-actions { text-align: left; }
  .modal { padding: 18px; }
}
.quota { font-size: 12.5px; color: var(--text-2); margin: -4px 0 0; }
.quota.is-empty { color: var(--danger); font-weight: 600; }
.consumer-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }

/* ==========================================================================
   v5 — Rediseño: sidebar azul marino, contenido blanco, acento azul
   ========================================================================== */
:root {
  --navy: #0f1d3d; --navy-2: #182a55; --navy-3: #22376a; --navy-text: #c3cee9; --navy-muted: #8394bd;
  --app-bg: #ffffff; --side-w: 236px; --star: #f5a524;
}
@media (prefers-color-scheme: dark) {
  :root { --navy: #0a1430; --navy-2: #132350; --navy-3: #1c3166; --app-bg: #0d1117; }
}
.icon-star { width: 14px; height: 14px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--banner-h)); background: var(--app-bg); }
.sidebar {
  position: sticky; top: var(--banner-h); height: calc(100vh - var(--banner-h)); background: var(--navy); color: var(--navy-text);
  display: flex; flex-direction: column; padding: 22px 14px 16px; gap: 18px; overflow-y: auto;
}
.logo-side { color: #fff; padding: 2px 10px 6px; font-size: 21px; gap: 10px; }
.logo-side .logo-mark { color: #6c9bff; width: 30px; height: 30px; }
.logo-side .logo-mark svg { width: 30px; height: 30px; }
.side-nav { display: grid; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--navy-text);
  font-size: 14.5px; font-weight: 500; text-decoration: none !important; transition: background .15s, color .15s;
}
.nav-item .icon { width: 19px; height: 19px; color: var(--navy-muted); }
.nav-item:hover { background: var(--navy-2); color: #fff; }
.nav-item:hover .icon { color: #fff; }
.nav-item.active { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 #6c9bff; }
.nav-item.active .icon { color: #8fb3ff; }
.beta { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: rgba(108, 155, 255, .2); color: #a9c3ff; margin-left: auto; letter-spacing: .02em; }
h1 .beta, .toggle .beta { margin-left: 8px; background: var(--accent-soft); color: var(--accent-text); vertical-align: middle; font-size: 11px; }
.side-bottom { margin-top: auto; display: grid; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.side-credits { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: rgba(255,255,255,.06); color: var(--navy-text); font-size: 13px; text-decoration: none !important; }
.side-credits strong { color: #fff; }
.side-credits:hover { background: rgba(255,255,255,.1); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.side-avatar { width: 34px; height: 34px; border-radius: 50%; background: #2a4a8f; color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.side-user-text { display: grid; min-width: 0; }
.side-user-text strong { color: #fff; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text small { color: var(--navy-muted); font-size: 12px; }
.side-logout { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; color: var(--navy-text); font-size: 13.5px; cursor: pointer; border-radius: 8px; }
.side-logout:hover { background: var(--navy-2); color: #fff; }
.side-logout .icon { width: 17px; height: 17px; }
.side-legal { display: grid; gap: 2px; padding: 0 10px; }
.side-legal a { color: var(--navy-muted); font-size: 11.5px; }
.side-legal a:hover { color: #fff; }
.mobile-top, .bottom-nav, .more-sheet { display: none; }
.content { min-width: 0; display: flex; flex-direction: column; }
.content .main { flex: 1; min-height: 0; }
.shell .page { max-width: 1240px; padding: 28px 36px 24px; }
.shell .legal-footer { margin-top: 24px; background: var(--app-bg); }

/* Encabezados */
.page-top { margin-bottom: 20px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13.5px; font-weight: 500; margin-bottom: 10px; }
.back-link .icon { width: 16px; height: 16px; }
.shell .page-head { align-items: center; margin-bottom: 20px; }
.page-head-text h1 { font-size: 25px; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-head-text p { font-size: 14.5px; max-width: 760px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-xs { height: 30px; padding: 0 14px; font-size: 13px; border-radius: 7px; }
.section-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-row h2 { font-size: 16px; }

/* Inicio */
.home { max-width: 980px !important; position: relative; }
.home-status { position: absolute; right: 36px; top: 24px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 600; color: var(--text); box-shadow: var(--shadow-sm); text-decoration: none !important; }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.status-pill.is-warn .dot { background: #e0a100; box-shadow: 0 0 0 3px var(--warn-soft); }
.home-hero { text-align: center; padding: 44px 0 26px; }
.brand-title { font-size: clamp(40px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; color: var(--accent); background: linear-gradient(90deg, #1a3fa8, #1d5fe0 60%, #3b7bff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.home-sub { font-size: clamp(19px, 2.2vw, 24px); font-weight: 600; margin-top: 6px; letter-spacing: -0.01em; }
.home-lead { color: var(--text-2); font-size: 15.5px; margin-top: 8px; }
.home-prompt { max-width: 760px; margin: 0 auto; }
.chat.chat-hero { overflow: visible; }
.prompt-box { border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 6px 24px rgba(29, 95, 224, .08), var(--shadow-sm); padding: 16px 16px 12px 18px; transition: border-color .15s, box-shadow .15s; }
.prompt-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 6px 24px rgba(29, 95, 224, .1); }
.prompt-box textarea { border: 0 !important; box-shadow: none !important; padding: 0; resize: none; font-size: 16px; line-height: 1.55; background: transparent; min-height: 56px; }
.chat-assistant .prompt-box textarea { min-height: 24px; }
.prompt-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.prompt-hint { font-size: 12px; color: var(--text-3); }
.prompt-send { width: 42px; height: 42px; padding: 0; border-radius: 11px; }
.prompt-send .icon { width: 19px; height: 19px; }
.chat-hero .chat-privacy { padding: 10px 4px 0; justify-content: center; text-align: center; }
.examples { margin-top: 18px; display: grid; gap: 10px; }
.examples-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.examples-row { display: flex; flex-wrap: wrap; gap: 8px; }
.examples .chip { height: auto; min-height: 32px; padding: 6px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; text-align: left; }
.examples .chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.examples .chip .purpose-chip { height: 18px; font-size: 10.5px; }
.convo { margin-top: 18px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.convo-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); }
.convo .chat-log { max-height: 420px; min-height: 0; }
.home-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 860px; margin: 34px auto 0; }
.home-card { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 22px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.home-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.home-card-icon { color: var(--accent); margin-bottom: 6px; }
.home-card-icon .icon { width: 26px; height: 26px; }
.home-card strong { font-size: 15px; }
.home-card span:last-child { font-size: 13px; color: var(--text-2); }
.home-recent { max-width: 860px; margin: 36px auto 0; }
.recent-list { display: grid; gap: 8px; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none !important; background: var(--surface); }
.recent-item:hover { border-color: var(--accent); }
.recent-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.recent-text { flex: 1; display: grid; min-width: 0; }
.recent-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text small { color: var(--text-3); font-size: 12.5px; }
.recent-item > .icon:last-child { color: var(--text-3); }

/* Tablas de datos */
.results-card, .list-card, .review-card { overflow: hidden; box-shadow: none; }
.lt-toolbar { display: flex; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.lt-toolbar .input-icon { max-width: 340px; }
.lt-toolbar select { width: auto; min-width: 160px; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--accent-soft); border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--accent-text); flex-wrap: wrap; }
.bulk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-2); padding: 12px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr[data-lead], .data-table tbody tr[data-open] { cursor: pointer; }
.data-table tbody tr[data-lead]:hover, .data-table tbody tr[data-open]:hover { background: color-mix(in srgb, var(--accent) 4%, var(--surface)); }
.data-table tbody tr.is-selected { background: var(--accent-soft); }
.data-table tbody tr:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
.data-table.is-loading tbody { opacity: .55; }
.data-table .c-check { width: 44px; padding-right: 0; }
.data-table .c-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.data-table .c-name { min-width: 170px; }
.data-table .lead-name { font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.data-table .lead-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.data-table .lead-sub .badge { height: 20px; font-size: 11.5px; padding: 0 7px; }
.data-table .lead-loc { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.data-table .lead-loc .icon { width: 13px; height: 13px; }
.data-table .c-email a { color: var(--accent-text); display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.data-table .c-phone, .data-table .c-rating { white-space: nowrap; }
.data-table .c-phone a { color: var(--text); }
.data-table .c-addr { color: var(--text-2); max-width: 220px; }
.data-table .c-action { text-align: right; white-space: nowrap; width: 1%; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--text); }
.rating .icon-star { color: var(--star); }
.in-base { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--success); }
.in-base .icon { width: 15px; height: 15px; }
.saved-star .icon-star { color: var(--star); width: 15px; height: 15px; }
.lt-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13.5px; flex-wrap: wrap; }
.lt-foot:empty { display: none; }
.pager { display: flex; gap: 6px; align-items: center; }
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; display: inline-grid; place-items: center; }
.pg .icon { width: 16px; height: 16px; }
.pg:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); }
.pg.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { color: var(--text-3); padding: 0 2px; }
.results-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-3); margin: 12px 2px 0; }
.results-note .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.results-head h1 { font-size: 23px; }
.results-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; }
.btn.is-saved { color: var(--accent-text); border-color: var(--accent); }
.btn.is-saved .icon { fill: currentColor; }
.running-head.card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 16px; background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.running-head p { font-size: 13.5px; margin-top: 2px; }
.list-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.seg-tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); gap: 2px; }
.seg-tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg-tabs button .icon { width: 15px; height: 15px; }
.seg-tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.advanced-card { margin-bottom: 20px; box-shadow: none; }
.advanced-card .search-card { padding: 20px; }
.adv-head h2 { font-size: 17px; }
.advanced-card .search-row { grid-template-columns: 1.2fr 1fr 1fr 110px; }
.adv-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Campañas */
.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: flex; align-items: center; gap: 0; }
.stepper li { display: flex; align-items: center; }
.stepper .step-line { flex: 1; height: 1px; background: var(--border-strong); margin: 0 12px; min-width: 24px; }
.stepper li:not(.step-line) { flex: none; }
.stepper button { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--text-3); cursor: pointer; padding: 4px 0; }
.stepper button:disabled { cursor: default; }
.step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--surface-3); color: var(--text-2); }
.step-n .icon { width: 14px; height: 14px; }
.stepper li.current button { color: var(--accent-text); }
.stepper li.current .step-n { background: var(--accent); color: #fff; }
.stepper li.done button { color: var(--text); }
.stepper li.done .step-n { background: var(--success-soft); color: var(--success); }
.wizard-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.wizard-main { display: grid; gap: 16px; }
.recipients-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.counter { justify-self: end; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.editor { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.editor:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.editor-bar { display: flex; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.editor-bar button { height: 30px; min-width: 30px; padding: 0 6px; border: 0; background: none; border-radius: 6px; color: var(--text-2); cursor: pointer; display: inline-grid; place-items: center; font-size: 12.5px; }
.editor-bar button:hover { background: var(--surface-3); color: var(--text); }
.editor-bar .icon { width: 16px; height: 16px; }
.editor-bar .var-btn { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.editor-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 6px; }
.editor textarea { border: 0 !important; box-shadow: none !important; border-radius: 0; min-height: 240px; font-size: 14.5px; }
.editor-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; justify-self: start; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { width: 36px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex: none; }
.toggle-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-track { box-shadow: var(--ring); }
.ai-help { margin-top: -8px; }
.gmail-preview { position: sticky; top: calc(var(--banner-h) + 20px); padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.gp-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.gp-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.gp-brand .icon { width: 15px; height: 15px; color: #ea4335; }
.gp-from { display: flex; gap: 12px; padding: 16px 18px 6px; font-size: 13.5px; }
.gp-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.gp-to { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.gp-to select { height: 26px; width: auto; max-width: 220px; padding: 0 26px 0 6px; font-size: 12.5px; border-color: transparent; background-color: transparent; color: var(--text-2); }
.gp-subject { padding: 6px 18px 4px; font-size: 16px; font-weight: 600; }
.gp-body { padding: 8px 18px 4px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.gp-footer { margin: 10px 18px 16px; padding: 10px 12px; border-top: 1px dashed var(--border-strong); white-space: pre-wrap; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; color: var(--text-3); overflow-wrap: anywhere; }
.gmail-preview [data-ai-preview] { margin: 0 12px 14px; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.review-grid, .kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 2px; background: var(--surface); }
.kpi span { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.kpi strong { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.kpi small { font-size: 12px; color: var(--text-3); }
.kpi-pos strong, .pos { color: var(--success); }
.kpi-card { position: relative; padding-top: 16px; }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 8px; }
.kpi-icon .icon { width: 17px; height: 17px; }
.quota-line { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; }
.quota-line .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.chk .icon { width: 15px; height: 15px; }
.chk.ok { color: var(--success); } .chk.warn { color: #b88a00; } .chk.off { color: var(--text-3); } .chk.bad { color: var(--danger); }
.legal-confirm { margin-top: 16px; }
.track-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.reply-snippet { font-style: italic; color: var(--text); font-size: 13.5px; }
.c-reply { max-width: 380px; }
.modal-wide { width: min(680px, 100%); }
.pick-list { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px; }
.pick-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pick-item:hover { background: var(--surface-2); }
.pick-item input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.pick-item span { display: grid; flex: 1; min-width: 0; }
.pick-item small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-item.is-off { opacity: .55; cursor: not-allowed; }

/* Calendario */
.cal-card { overflow: hidden; box-shadow: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { font-size: 17px; text-transform: capitalize; min-width: 170px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.cal-day { min-height: 104px; padding: 6px 6px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.is-out { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cal-day.is-out .cal-num { color: var(--text-3); }
.cal-num { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.is-today .cal-num { background: var(--accent); color: #fff; }
.cal-ev { border: 0; text-align: left; font-size: 11.5px; font-weight: 600; padding: 3px 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-text); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.is-prop { background: var(--warn-soft); color: #8a6a00; border: 1px dashed #d9b84a; }
.cal-more { font-size: 11px; color: var(--text-3); padding-left: 4px; }
.cal-agenda { display: none; }
.proposals { margin-bottom: 16px; box-shadow: none; }
.prop-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.prop-item > div:first-child { display: grid; gap: 2px; }
.prop-item small { font-size: 13px; color: var(--text-2); }
.prop-actions { display: flex; gap: 8px; }
.ag-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; cursor: pointer; color: var(--text); }
.ag-date { width: 44px; display: grid; justify-items: center; background: var(--accent-soft); color: var(--accent-text); border-radius: 9px; padding: 4px 0; flex: none; }
.ag-date strong { font-size: 17px; line-height: 1.1; }
.ag-date small { font-size: 11px; text-transform: uppercase; }
.ag-text { flex: 1; display: grid; }
.ag-text small { color: var(--text-3); font-size: 12.5px; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }

/* Analíticas */
.chart-card { box-shadow: none; overflow: hidden; }
.chart-card .card-head { flex-wrap: wrap; gap: 10px; }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.lg { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.lg-sent, .chart .bar-sent { background: var(--accent); fill: var(--accent); }
.lg-replied, .chart .bar-replied { background: #22b07d; fill: #22b07d; }
.chart-box { padding: 6px 16px 16px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .ax { fill: var(--text-3); font-size: 11px; text-anchor: middle; }
.chart .ax-y { text-anchor: end; }

/* Asistente */
.assistant-page { max-width: 1000px !important; display: flex; flex-direction: column; min-height: calc(100vh - var(--banner-h) - 40px); }
.assistant-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.assistant-mark { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.assistant-mark .icon { width: 24px; height: 24px; fill: currentColor; }
.assistant-head h1 { font-size: 23px; }
.assistant-chat { flex: 1; display: flex; flex-direction: column; border: 0; }
.chat-assistant { flex: 1; display: flex; flex-direction: column; overflow: visible !important; }
.chat-log-tall { flex: 1; min-height: 340px; max-height: none !important; background: transparent !important; padding: 8px 0 18px !important; gap: 16px !important; }
.assistant-bottom { position: sticky; bottom: 0; background: var(--app-bg); padding-top: 10px; display: grid; gap: 10px; }
.assistant-bottom .examples { margin-top: 0; }
.assistant-foot { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.assistant-foot .chat-privacy { padding: 0; flex: 1; min-width: 240px; }
.msg-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; }
.msg-avatar.assistant { background: var(--accent-soft); color: var(--accent); }
.msg-avatar.assistant .icon { width: 18px; height: 18px; fill: currentColor; }
.msg-avatar.user { background: var(--navy-3); color: #fff; }
.chat-assistant .msg { gap: 10px; align-items: flex-start; }
.chat-assistant .msg-assistant .bubble { background: var(--surface-2); border: 1px solid var(--border); box-shadow: none; padding: 14px 16px; max-width: min(80%, 640px); }
.chat-assistant .msg-user .bubble { background: var(--accent-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.bubble-text { white-space: pre-wrap; }
.bubble-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bubble-links .btn { color: var(--accent-text); }
.bubble-links .icon { width: 15px; height: 15px; }

/* Configuración */
.subnav { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-2); margin-bottom: 8px; position: sticky; top: calc(var(--banner-h) + 8px); z-index: 5; overflow-x: auto; scrollbar-width: none; }
.subnav button { border: 0; background: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.subnav button:hover { background: var(--surface); color: var(--text); }
.mail-card { padding: 22px; display: grid; gap: 16px; box-shadow: none; }
.connected-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--success) 35%, var(--border)); background: var(--success-soft); border-radius: 12px; }
.connected-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; flex: none; }
.connected-text { flex: 1; display: grid; min-width: 0; }
.connected-text strong { overflow-wrap: anywhere; }
.connected-text small { color: var(--text-2); }
.brand-ico { width: 22px; height: 22px; }
.oauth-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 12px; height: 54px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 15.5px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.oauth-btn:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.oauth-note { display: flex; gap: 8px; align-items: flex-start; margin-top: -4px; }
.oauth-note .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.mail-form { gap: 16px; }
.mail-form .sub-h { font-size: 15px; margin-top: 4px; }
.advanced-box { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.advanced-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 600; font-size: 14px; }
.advanced-box > summary::-webkit-details-marker { display: none; }
.advanced-box > summary > .icon:last-child { margin-left: auto; transition: transform .15s; color: var(--text-3); }
.advanced-box[open] > summary > .icon:last-child { transform: rotate(90deg); }
.advanced-box > summary:hover { background: var(--surface-2); }
.adv-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; padding: 16px; border-top: 1px solid var(--border); }
.adv-fields { display: grid; gap: 14px; }
.adv-grid .help { position: static; padding: 16px; border-radius: 10px; background: var(--surface-2); }
.mail-form:not(.is-custom) .server-field input { background: var(--surface-2); }
.plan-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; flex-wrap: wrap; box-shadow: none; }
.plan-sum { display: grid; }
.plan-sum strong { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.plan-sum-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.legal-links { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; box-shadow: none; }
.legal-links a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 14px; }
.legal-links a:hover { background: var(--surface-2); text-decoration: none; }
.legal-links .icon { width: 15px; height: 15px; color: var(--text-3); }
.settings .profile-form, .settings .account-grid { max-width: none; }

/* Responsive v5 */
@media (max-width: 1100px) {
  .wizard-grid { grid-template-columns: 1fr; }
  .gmail-preview { position: static; }
  .review-grid, .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adv-grid { grid-template-columns: 1fr; }
  .advanced-card .search-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-top { display: flex; position: sticky; top: var(--banner-h); z-index: 40; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; background: var(--navy); }
  .mobile-top .logo { color: #fff; font-size: 18px; margin-right: auto; }
  .mobile-top .logo-mark { color: #6c9bff; }
  .more-sheet { display: block; position: fixed; inset: 0; z-index: 70; }
  .more-sheet[hidden] { display: none !important; }
  .more-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 25, .4); }
  .more-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(300px, 86vw); background: var(--surface); padding: 10px 10px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-lg); overflow-y: auto; }
  .more-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
  .more-head .logo { font-size: 18px; }
  .menu-close { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; border-radius: 10px; color: var(--text-2); cursor: pointer; }
  .menu-close:hover { background: var(--surface-2); }
  .more-panel .active { background: var(--accent-soft); color: var(--accent-text); }
  .more-panel .active .icon { color: var(--accent-text); }
  .more-panel .nav-count { margin-left: auto; }
  .more-panel [data-logout] { margin-top: auto; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0 9px; margin-left: -9px; border: 0; background: none; border-radius: 10px; cursor: pointer; }
  .menu-btn span { display: block; height: 2.5px; border-radius: 2px; background: #fff; }
  .menu-btn:focus-visible, .menu-close:focus-visible { outline: 2px solid #6c9bff; outline-offset: 2px; }
  body.menu-open { overflow: hidden; }
  .more-panel a, .more-panel button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--text); font-size: 15px; border: 0; background: none; text-align: left; cursor: pointer; text-decoration: none !important; }
  .more-panel a:hover, .more-panel button:hover { background: var(--surface-2); }
  .more-panel .icon { color: var(--text-2); }
  .shell .page { padding: 18px 16px 16px; }
  .shell .legal-footer { margin-bottom: 0; }
  .home-status { position: static; display: flex; justify-content: flex-end; }
  .home-hero { padding: 18px 0 18px; }
  .home-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .home-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; column-gap: 14px; padding: 14px 16px; }
  .home-card-icon { grid-row: span 2; margin: 0; align-self: center; }
  .page-head-text h1 { font-size: 21px; }
  .shell .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .stepper button { font-size: 12.5px; gap: 6px; }
  .stepper .step-line { margin: 0 6px; min-width: 10px; }
  .oauth-buttons, .legal-links { grid-template-columns: 1fr; }
  .cal-grid { display: none; }
  .cal-agenda { display: block; }
  .cal-nav h2 { min-width: 0; font-size: 15px; }
  .form-grid.three { grid-template-columns: 1fr 1fr; }
  .lt-toolbar .input-icon { max-width: none; min-width: 100%; }
  .lt-toolbar select { flex: 1; min-width: 0; }
  .assistant-page { min-height: calc(100vh - var(--banner-h) - 140px); }
  .chat-assistant .msg-assistant .bubble { max-width: calc(100% - 44px); }
  .subnav { top: calc(var(--banner-h) + 60px); }
  /* Tablas → tarjetas */
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tbody { display: grid; gap: 10px; padding: 10px; }
  .data-table tbody tr { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px 12px 44px; background: var(--surface); }
  .data-table tbody tr:not(:has(.c-check)) { padding-left: 14px; }
  .data-table td { padding: 3px 0; border: 0 !important; display: flex; gap: 10px; align-items: center; min-width: 0; max-width: none !important; }
  .data-table td[data-label]:not(.c-name)::before { content: attr(data-label); flex: none; width: 82px; font-size: 12px; color: var(--text-3); }
  .data-table td.c-check { position: absolute; left: 14px; top: 14px; width: auto; padding: 0; }
  .data-table td.c-name { display: block; padding-bottom: 6px; }
  .data-table td.c-action { justify-content: flex-start; padding-top: 8px; text-align: left; width: 100%; }
  .data-table td.c-action:empty { display: none; }
  .data-table .c-email a { max-width: calc(100vw - 190px); }
  .data-table tr.skel-row td:nth-child(n+4) { display: none; }
  .searches-table td.c-action { position: absolute; right: 8px; top: 8px; width: auto; padding: 0; }
}
.replies-card { margin-top: 16px; box-shadow: none; overflow: hidden; }
.reply-list { list-style: none; margin: 0; padding: 0; }
.reply-list li a { display: grid; gap: 4px; padding: 12px 18px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.reply-list li a:hover { background: var(--surface-2); }
.reply-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reply-top small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.reply-top .badge { height: 20px; font-size: 11.5px; }
.shell .page-head { flex-wrap: wrap; }
.shell .page-head .page-head-text { flex: 1 1 420px; min-width: 0; }
.shell .page-head .page-actions { flex: 0 0 auto; margin-left: auto; }
.results-head h1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo-tag { opacity: .85; }

/* ==========================================================================
   v7 — Port de la demo (demo/prospecta-demo.html): Inicio, Historial, Base, Campañas, Calendario,
   Google Meet, Analíticas, Asistente, Planes. Reutiliza los tokens de arriba.
   ========================================================================== */
:root { --ok: var(--success); --ok-soft: var(--success-soft); --wait: #a8700b; --wait-soft: var(--warn-soft); --bad: var(--danger); --bad-soft: var(--danger-soft); }
@media (prefers-color-scheme: dark) { :root { --wait: #e2a93c; } }

/* Barra lateral: contadores y pastilla de plan */
.nav-count { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.16); color: #fff; padding: 1px 8px; border-radius: 999px; }
.top-row { display: flex; justify-content: flex-end; padding: 16px 36px 0; }
.plan-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow-sm); }
.plan-pill:hover { border-color: var(--accent); }
.plan-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.plan-pill.is-warn i { background: #e0a100; }
.mobile-top .plan-pill { height: 30px; padding: 0 10px; font-size: 12px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; max-width: 70vw; }
.mobile-top .plan-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-panel .nav-count { background: var(--accent-soft); color: var(--accent-text); }

/* Auth: Google */
.btn-google { gap: 10px; }
.gmark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: 13px; }
.or-sep { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12.5px; margin: 14px 0 2px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.center-pad { display: grid; justify-items: center; gap: 12px; padding: 40px 0; }

/* Inicio */
.home-hero { padding: 26px 0 8px; }
.home-hero .home-lead { max-width: 56ch; margin: 8px auto 0; }
.home-status { display: flex; justify-content: center; margin-top: 6px; }
.home-status:empty { display: none; }
.askbox { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 6px 24px rgba(29, 95, 224, .08), var(--shadow-sm); padding: 14px; margin: 18px auto 10px; max-width: 780px; }
.askbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent), 0 6px 24px rgba(29, 95, 224, .1); }
.askbox textarea { width: 100%; border: 0 !important; box-shadow: none !important; resize: none; background: transparent; font-size: 16px; min-height: 56px; padding: 2px 4px; }
.askrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.askrow .note { font-size: 12.5px; color: var(--text-3); }
.send { width: 42px; height: 42px; border-radius: 11px; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; cursor: pointer; }
.send:hover:not(:disabled) { background: var(--accent-hover); }
.send:disabled { opacity: .5; cursor: default; }
.send.is-blocked, .send.is-blocked:disabled { background: #9aa0a6; color: #fff; opacity: 1; cursor: not-allowed; }
.plan-warn { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff4e5; border: 1px solid #f5c26b; color: #6b4200; font-size: 13.5px; }
.plan-warn b { margin-right: 2px; }
.plan-warn[hidden] { display: none; }
@media (max-width: 560px) { .plan-warn { flex-direction: column; align-items: stretch; } }
.send .icon { width: 20px; height: 20px; }
.home .chat-privacy { max-width: 780px; margin: 0 auto; justify-content: center; text-align: center; }
.thread { max-width: 780px; margin: 10px auto 0; display: flex; flex-direction: column; gap: 10px; }
.bub { max-width: 86%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.bub.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.bub.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bub .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.bub .acts .btn { color: var(--on-accent); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: bl 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bl { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 780px; margin: 22px auto 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; display: grid; justify-items: center; gap: 4px; box-shadow: var(--shadow-sm); }
.tile .icon { width: 26px; height: 26px; color: var(--accent); }
.tile span { color: var(--text-2); font-size: 12.5px; }
.tiles[hidden] { display: none; }

/* Resultados y secciones */
.sect { margin-top: 26px; scroll-margin-top: 12px; }
.sect-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.sect-h-text h1, .sect-h-text h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.sect-h-text p { margin: 2px 0 0; font-size: 13.5px; }
.sect-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actionbar { position: sticky; top: calc(var(--banner-h) + 10px); z-index: 6; background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; box-shadow: var(--shadow-lg); margin-bottom: 14px; font-weight: 600; }
.btn-light { background: #fff; color: var(--accent-hover); border-color: transparent; }
.btn-light:hover { background: #eef3ff; }
.actionbar-soft { font-weight: 500; opacity: .95; }
.results-card .c-src { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.data-table .c-score { white-space: nowrap; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* Historial */
.grp { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; }
.hist { display: grid; gap: 12px; }
.hcard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.hcard-text { min-width: 0; flex: 1 1 320px; }
.hcard h3 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.hcard p { margin: 3px 0 0; font-size: 12.5px; }
.hcard-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Modales */
.modal-wide { width: min(940px, 100%); }
.mdl-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.mdl-head h2 { font-size: 20px; letter-spacing: -.02em; }
.mdl-head p { margin-top: 2px; }
.mdl-head .icon-btn { font-size: 26px; line-height: 1; }
.mdl-body { display: grid; gap: 14px; }
.mdl-body > p { margin: 0; }
.mdl-body .form-actions { justify-content: flex-end; border-top: 0; padding-top: 4px; }
.mdl-body .field { display: grid; gap: 6px; margin-bottom: 12px; }
.mdl-body .form-grid.two { grid-template-columns: 1fr 1fr; }

/* Badges de la demo */
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: var(--wait-soft); color: var(--wait); }
.badge-acc { background: var(--accent-soft); color: var(--accent-text); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge:not([class*="badge-"]) { background: var(--surface-2); color: var(--text-2); }
.infobox { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; color: var(--text); margin-bottom: 14px; }
.infobox .icon { width: 15px; height: 15px; vertical-align: -2px; color: var(--accent-text); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }
.ex { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); }
.ex:hover { border-color: var(--accent); color: var(--accent-text); }
.ex.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.meet-table td { vertical-align: middle; }

/* Calendario */
.cal2-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.cal-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.cal2-nav { display: flex; gap: 8px; align-items: center; }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.cal-grid2 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal2-dow { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; text-align: center; padding: 4px 0; }
.cday { min-height: 92px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 6px; display: flex; flex-direction: column; gap: 3px; text-align: left; overflow: hidden; position: relative; cursor: pointer; color: var(--text); font: inherit; }
.cday:hover { border-color: var(--accent); }
.cday.out { visibility: hidden; pointer-events: none; }
.cday.wk { background: var(--surface-2); }
.cday.sel { outline: 2px solid var(--accent); outline-offset: -1px; background: var(--accent-soft); }
.cday .dnum { font-weight: 700; font-size: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cday.today .dnum { background: var(--accent); color: var(--on-accent); }
.cchip { font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent-text); border-radius: 6px; padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cday.sel .cchip { background: var(--surface); }
.cmore { font-size: 11px; color: var(--text-3); font-weight: 600; }
.dcount { display: none; position: absolute; right: 6px; top: 6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; place-items: center; padding: 0 6px; }
.agenda { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; position: sticky; top: calc(var(--banner-h) + 12px); }
.agenda h2 { margin: 0 0 2px; font-size: 17px; }
.agenda .acts { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.call { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.call .t { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.call .who2 { font-weight: 700; overflow-wrap: anywhere; }
.call .meta { font-size: 12.5px; color: var(--text-3); overflow-wrap: anywhere; }
.call .badges { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.call .badges .badge { height: 22px; font-size: 11.5px; }
.cal2-nav .btn:disabled { opacity: .4; }
@media (max-width: 980px) { .cal-wrap { grid-template-columns: 1fr; } .agenda { position: static; } }
@media (max-width: 640px) {
  .cday { min-height: 46px; padding: 4px; } .cday .cchip, .cday .cmore { display: none; } .dcount { display: grid; }
  .cal-grid2 { gap: 4px; } .cal { padding: 8px; } .cal-title { font-size: 21px; }
}

/* Analíticas */
.kpis, .kpis5 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 4px; }
.kpis5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis .kpi b, .kpis5 .kpi b, .stats .kpi b { display: block; font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpis .kpi span, .kpis5 .kpi span { font-size: 12.5px; color: var(--text-2); }
.donut { width: 150px; height: 150px; flex: none; }
.donut svg { width: 100%; height: 100%; display: block; }
.dg { fill: none; stroke-width: 5.2; }
.dg.track { stroke: var(--border); }
.dg.ok { stroke: var(--ok); } .dg.wait { stroke: var(--wait); } .dg.bad { stroke: var(--bad); } .dg.mut { stroke: var(--text-3); opacity: .4; }
.dg.seg { animation: ddraw .9s ease both; }
@keyframes ddraw { from { stroke-dasharray: 0 100; } }
.dtxt { font: 800 8.6px var(--font); fill: var(--text); }
.dsub { font: 600 2.9px var(--font); fill: var(--text-3); }
.mrow { display: flex; flex-wrap: wrap; gap: 24px 36px; align-items: center; }
.mcol { display: flex; gap: 16px; align-items: center; min-width: 0; flex-wrap: wrap; }
.legend { display: grid; gap: 7px; font-size: 13px; }
.legend > div { display: flex; align-items: center; gap: 8px; }
.legend .lt { color: var(--text-3); font-size: 12px; font-weight: 600; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend i.ok { background: var(--ok); } .legend i.wait { background: var(--wait); } .legend i.bad { background: var(--bad); } .legend i.mut { background: var(--text-3); opacity: .45; }
.acards { display: grid; gap: 14px; margin-top: 14px; }
.acard { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; display: grid; gap: 14px; }
.acard .ah { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.acard h3 { margin: 0; font-size: 16px; }
.acard p { margin: 2px 0 0; color: var(--text-3); font-size: 12.5px; }
@media (max-width: 980px) { .kpis5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .donut { width: 130px; height: 130px; } }

/* Asistente */
.assistant-page .kpis { max-width: none; }

/* Planes */
.billing .sect-h { margin-bottom: 8px; }
.plans-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; margin: 18px 0 0; gap: 16px; }
.plan { position: relative; }
.plan-cur { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.plan-tag { position: absolute; top: -11px; left: 20px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.plan-amount { font-size: 32px; }
.plan-feats li::before { content: "✓"; color: var(--ok); font-weight: 800; flex: none; }
.plan .soon { display: grid; gap: 8px; justify-items: stretch; }
.plan .soon .badge { justify-self: start; }
.sub-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin: 10px 0 6px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.usage-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 14px 28px; margin-top: 8px; }
.usage-grid strong { display: block; font-size: 15px; }
.usage-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 4px; }
.usage-bar span { display: block; height: 100%; background: var(--accent); }
.plans-note { margin: 16px 0 0; }
.plans-note .icon { width: 14px; height: 14px; vertical-align: -2px; }
.dev-btns { display: flex; gap: 8px; margin-top: 8px; }
@media (max-width: 980px) { .plans-3 { grid-template-columns: 1fr; } }

/* Móvil */
@media (max-width: 860px) {
  .top-row { display: none; }
  .tiles { grid-template-columns: 1fr; }
  .bub { max-width: 94%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actionbar { top: calc(var(--banner-h) + 62px); }
  .mdl-body .form-grid.two { grid-template-columns: 1fr; }
  .modal-root { padding: 0; align-items: end; }
  .modal-root .modal { width: 100%; border-radius: 16px 16px 0 0; max-height: 94vh; }
  .meet-table .c-actions { display: flex; gap: 8px; flex-wrap: wrap; }
}
.home-status { position: static; right: auto; top: auto; }
.auth-card .btn-google { margin-top: 18px; }
.home { padding-top: 8px !important; }
.home { max-width: 1240px !important; }
.home .home-hero, .home .askbox, .home .thread, .home .tiles, .home .chat-privacy { margin-left: auto; margin-right: auto; }
.results-card .table-wrap { overflow-x: auto; }
.results-card .data-table td { padding: 10px 12px; }
.results-card .c-addr { min-width: 120px; max-width: 170px; }
.results-card .c-src { max-width: 120px; }
.results-card .c-email a { max-width: 200px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.infobox .icon { display: inline-block; }
.plan-feats { align-content: start; }
.billing .plan-featured { border: 1px solid var(--border); box-shadow: none; }
.billing .plan-cur { border: 2px solid var(--accent); }
.meet-table .c-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 190px; }
.meet-table td.mono { word-break: break-all; max-width: 220px; }
.table-wrap { overflow-x: auto; }
.card .table-wrap { overflow-x: auto; }
.usage-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chat-assistant .chip, .chat-assistant .examples-row .chip { white-space: normal; text-align: left; height: auto; max-width: 100%; flex: 0 1 auto; padding-top: 6px; padding-bottom: 6px; }
@media (max-width: 860px) { .chat-assistant .examples-row { flex-wrap: wrap; overflow: visible; } }
@media (max-width: 860px) {
  .shell .page-head .page-head-text { flex: 0 0 auto; }
  .shell .page-head .page-actions { margin-left: 0; }
}

/* Asistente: campo arriba + charlas debajo */
.chat-assistant .prompt-box { margin-bottom: 0; }
.chat-assistant .chat-log-tall { flex: none; min-height: 0; margin-top: 16px; }
.chat-assistant .chat-log-tall[hidden] { display: none; }
.charlas { margin-top: 22px; display: grid; gap: 10px; }
.charlas-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.charla { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.charla strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.charla small { color: var(--text-3); font-size: 12.5px; }
.charla:hover { border-color: var(--accent); }
.charla.is-active { border-color: var(--accent); background: var(--accent-soft); }
.assistant-page .kpis-after { margin-top: 24px; }

/* Enlace flotante al asistente IA (abajo a la izquierda, en todas las secciones menos el asistente) */
.ask-ai-wrap { position: sticky; bottom: 16px; height: 0; z-index: 30; pointer-events: none; }
.ask-ai { position: absolute; left: 16px; bottom: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface, #fff); color: var(--accent, #1d4ed8); border: 1px solid var(--border, #d9dee7); box-shadow: 0 4px 14px rgba(15, 30, 60, .16); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ask-ai:hover { box-shadow: 0 6px 18px rgba(15, 30, 60, .24); }
.ask-ai:focus-visible { outline: 2px solid var(--accent, #1d4ed8); outline-offset: 2px; }
.ask-ai svg { width: 18px; height: 18px; }
@media (max-width: 860px) { .ask-ai { left: 12px; } }
