
:root { --fg:#1a202c; --muted:#718096; --line:#e2e8f0;
  --accent:#2BB3B8; --accent-hover:#1E9296; --accent-deep:#157A7E; --accent-soft:#E4F6F7;
  --err:#c53030; --bg:#f7fafc; --panel:#fff; }
* { box-sizing: border-box; }
html { overflow-x: clip; }
body { margin:0; font:16px/1.5 system-ui,-apple-system,sans-serif; color:var(--fg); background:var(--bg);
  overflow-x:clip; }
h1 { font-size:1.6rem; margin:0 0 4px; }
h2 { font-size:1.15rem; margin:24px 0 12px; }
h3 { font-size:1rem; margin:0 0 8px; }
form { display:flex; flex-direction:column; gap:14px; max-width:520px; }
.checkbox-row { display:flex; align-items:flex-start; gap:10px; font-weight:500; margin:4px 0; }
.checkbox-row input { width:auto; margin:3px 0 0; flex-shrink:0; }
.subscribe-total { margin:8px 0 4px; font-size:1.05rem; }
label { display:flex; flex-direction:column; gap:4px; font-weight:600; font-size:.9rem; }
input, select, textarea { font:inherit; padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:#fff; }
input:focus, select:focus, textarea:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(43,179,184,0.15); }
.field-hint { display:block; font-size:.85rem; font-weight:400; color:var(--muted); margin:2px 0 4px; }
.pms-connection-help { margin:8px 0 12px; }
.secret-field input { width:100%; padding-right:42px; }
.secret-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%);
  background:transparent; color:var(--muted); border:0; padding:6px 8px; cursor:pointer;
  font-size:1rem; line-height:1; box-shadow:none; }
.secret-toggle:hover { background:transparent; color:var(--fg); }
button, .button { display:inline-block; background:var(--accent); color:#fff; border:0;
  padding:9px 18px; border-radius:6px; text-decoration:none; cursor:pointer; font:inherit; font-weight:600; }
button:hover, .button:hover { background:var(--accent-hover); }
.list { list-style:none; padding:0; } .list li { padding:8px 0; border-bottom:1px solid var(--line); }
.muted { color:var(--muted); } .badge { font-size:.75rem; background:#edf2f7; color:#444;
  padding:2px 8px; border-radius:999px; }
.badge-ok { background:#c6f6d5; color:#22543d; }
.badge-demo { background:#fefcbf; color:#744210; }
.badge-soon { background:#e2e8f0; color:#4a5568; }
.banner { padding:12px 16px; border-radius:8px; margin:0 0 16px; }
.banner-demo { background:#fffbeb; border:1px solid #f6e05e; color:#744210; }
.banner-trial { background:#ebf8ff; border:1px solid #90cdf4; color:#2c5282; }
.banner-block { background:#fff5f5; border:1px solid #fc8181; color:#742a2a; }
.banner-ok { background:#f0fff4; border:1px solid #9ae6b4; color:#22543d; }
.button-danger { background:#c53030; }
.button-danger:hover { background:#9b2c2c; }
.checklist { margin:12px 0; }
.checklist summary { cursor:pointer; font-weight:600; }
  padding:2px 8px; border-radius:10px; } .soon-badge { background:#fefcbf; color:#744210; }

/* Layout pre-login (login / signup) */
.auth-page { background:linear-gradient(135deg,var(--accent-soft) 0%,#c8ecee 100%); min-height:100vh; }
.auth-container { max-width:560px; margin:0 auto; padding:48px 20px; }
.brand-mark { display:inline-block; text-decoration:none; margin-bottom:24px; }
.brand-logo { height:52px; width:auto; max-width:240px; display:block; }
.brand-mark-auth { display:flex; justify-content:center; margin:0 auto 32px; width:100%; }
.brand-logo-auth { height:148px; width:auto; max-width:min(480px, 94%); }
.brand-logo-sidebar { height:72px; width:auto; max-width:210px; filter:none; }
.brand-mark-sidebar { display:flex; align-items:center; gap:10px; text-decoration:none; color:#fff; margin-bottom:18px; }
.sidebar .brand-logo-sidebar { height:70px; max-width:200px; }
.brand-icon { flex-shrink:0; }
.brand-wordmark { font-weight:700; font-size:.95rem; color:#fff; }
.locale-switcher { display:flex; gap:4px; margin-right:12px; }
.locale-switch { padding:4px 8px; font-size:.75rem; font-weight:600; border-radius:4px; text-decoration:none; color:var(--muted); border:1px solid var(--line); }
.locale-switch.active, .locale-switch:hover { background:var(--accent); color:#fff; border-color:var(--accent); }

/* Layout autenticado: shell fijo — el menú no scrollea con el contenido (usuario y superadmin). */
html.app-shell { height:100%; overflow:hidden; }
html.app-shell body.app-page {
  display:flex; height:100%; max-height:100dvh; min-height:0; overflow:hidden; align-items:stretch;
}
.sidebar {
  width:240px; flex-shrink:0; align-self:stretch; background:#1a202c; color:#cbd5e0;
  display:flex; flex-direction:column; padding:18px 14px; height:100%; max-height:100dvh;
  overflow-x:hidden; overflow-y:auto; position:relative; z-index:50;
}
.sidebar .brand-mark { color:#fff; margin-bottom:24px; }
.sidebar-nav { display:flex; flex-direction:column; gap:2px; flex:1; min-height:0; }
.nav-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:6px;
  color:#cbd5e0; text-decoration:none; font-weight:500; font-size:.95rem; }
.nav-item:hover { background:#2d3748; color:#fff; }
.nav-item.active { background:var(--accent); color:#fff; }
.nav-item.disabled { opacity:.45; pointer-events:none; cursor:not-allowed; }
.step-dot .step-link { color:inherit; text-decoration:none; display:flex; align-items:center; justify-content:center; width:100%; height:100%; }
.onboarding-checklist { list-style:none; padding:0; margin:16px 0 24px; }
.onboarding-checklist li { padding:10px 0; border-bottom:1px solid var(--line); }
.nav-icon { font-size:1.1rem; }
.sidebar-footer { border-top:1px solid #2d3748; padding-top:14px; margin-top:14px; }
.user-chip { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.user-avatar { width:36px; height:36px; border-radius:50%; background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:600; flex-shrink:0; }
.user-name { font-size:.9rem; font-weight:600; color:#fff; }
.user-email { font-size:.75rem; color:#a0aec0; word-break:break-all; }
.logout-link { color:#a0aec0; font-size:.85rem; text-decoration:none; }
.logout-link:hover { color:#fff; }
.topbar { display:flex; justify-content:space-between; align-items:center; background:var(--panel);
  border-bottom:1px solid var(--line); padding:12px 28px; z-index:100; }
.topbar-title { font-weight:600; color:var(--fg); }
.topbar-right { display:flex; align-items:center; }
.user-badge { display:flex; align-items:center; gap:10px; padding:6px 12px; background:var(--bg);
  border:1px solid var(--line); border-radius:8px; position:relative; }
.topbar .user-avatar { width:32px; height:32px; font-size:.85rem; }
.topbar .user-name { color:var(--fg); font-size:.9rem; }
.user-menu-toggle { background:transparent; color:var(--muted); border:0; padding:4px 8px; cursor:pointer; font-size:1.1rem; }
.user-menu { position:absolute; top:100%; right:0; background:var(--panel); border:1px solid var(--line);
  border-radius:8px; margin-top:6px; min-width:200px; box-shadow:0 4px 12px rgba(0,0,0,.1); z-index:200; }
.user-menu.hidden { display:none; }
.user-menu a { display:block; padding:10px 14px; text-decoration:none; color:var(--fg); border-bottom:1px solid var(--line); }
.user-menu a:last-child { border-bottom:0; }
.user-menu a:hover { background:var(--accent); color:#fff; }
.app-content:has(.gym-container) { max-width:min(1200px, calc(100vw - 280px)); width:100%; }
.gym-container { max-width:none; width:100%; }
#gym-form { max-width:none; width:100%; gap:0; }
#gym-form input:not([type="radio"]):not([type="checkbox"]),
#gym-form select,
#gym-form textarea { width:100%; box-sizing:border-box; }
#gym-form input[type="radio"],
#gym-form input[type="checkbox"] { width:auto; flex-shrink:0; margin:0; }
.gym-sections { display:flex; flex-direction:column; gap:18px; align-items:stretch; }
.gym-sections fieldset { border:1px solid var(--line); border-radius:10px; padding:18px 22px; margin:0; width:100%; min-width:0; background:#fff; }
.gym-sections legend { font-weight:600; padding:0 8px; font-size:.95rem; }
.gym-sections > fieldset > .muted { margin:0 0 14px; font-size:.9rem; }
.gym-sections label { font-weight:500; margin-bottom:6px; }
.gym-sections textarea { min-height:120px; resize:vertical; }
.gym-sections textarea[name="customSystemPromptAppend"] { min-height:320px; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.82rem; line-height:1.45; }
.gym-ifttt-list { display:flex; flex-direction:column; gap:12px; margin:12px 0; }
.gym-ifttt-row { border:1px solid #e2e8f0; border-radius:8px; padding:12px; background:#f8fafc; display:grid; gap:8px; }
.gym-ifttt-row label { display:flex; flex-direction:column; gap:4px; font-size:.9rem; }
.gym-ifttt-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.gym-prompt-toolbar { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0; }
.gym-modal { position:fixed; inset:0; z-index:1200; display:none; align-items:center; justify-content:center; padding:16px; }
.gym-modal.is-open { display:flex; }
.gym-modal-backdrop { position:absolute; inset:0; background:rgba(15,23,42,.55); }
.gym-modal-dialog { position:relative; background:#fff; border-radius:12px; max-width:480px; width:100%; padding:22px 20px 16px; box-shadow:0 20px 50px rgba(0,0,0,.25); }
.gym-modal-dialog h3 { margin:0 0 10px; font-size:1.05rem; }
.gym-modal-actions { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; flex-wrap:wrap; }
.gym-sections textarea[name="longStayInstruction"] { min-height:160px; }
.gym-improve-prompt { display:flex; flex-direction:column; gap:12px; align-items:flex-start; }
.gym-improve-prompt .button { width:auto; }
.gym-improve-editor.is-hidden { display:none; }
.gym-zonal-hint { margin:8px 0 0; font-size:.85rem; color:#64748b; }
.gym-row-compact { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; width:100%; align-items:start; }
.gym-row-compact fieldset { height:auto; }
.gym-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 20px; width:100%; }
.gym-field-grid label { margin-bottom:0; }
.gym-field-grid .gym-span-full { grid-column:1 / -1; }
.bh-days { display:flex; flex-direction:column; gap:8px; margin-top:6px; }
.bh-day-row { display:grid; grid-template-columns:7.5rem minmax(5.5rem,auto) 1fr 1fr; gap:8px 10px; align-items:center; }
.bh-day-row .bh-day-name { font-weight:600; font-size:.9rem; }
.bh-day-row .bh-closed { display:flex; align-items:center; gap:6px; font-weight:400; font-size:.85rem; margin:0; }
.bh-day-row .bh-closed input { width:auto; margin:0; }
.bh-day-row .bh-time { display:flex; flex-direction:column; gap:2px; font-weight:500; font-size:.75rem; color:var(--muted); margin:0; }
.bh-day-row .bh-time input[type="time"] { font:inherit; font-size:.9rem; color:var(--fg); padding:6px 8px; }
@media (max-width:720px) {
  .bh-day-row { grid-template-columns:1fr 1fr; }
  .bh-day-row .bh-day-name { grid-column:1 / -1; }
}
.gym-identity-readonly { margin:0 0 14px; padding:12px 14px; background:#f8fafc; border-radius:8px; border:1px solid var(--line); }
.gym-identity-title { margin:0 0 8px; font-weight:600; font-size:.9rem; }
.gym-identity-name { display:flex; flex-direction:column; gap:4px; margin:0 0 12px; font-weight:600; font-size:.88rem; }
.gym-identity-name input { font-weight:500; max-width:320px; }
.gym-identity-dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:0; font-size:.88rem; }
.gym-identity-dl dt { margin:0; color:#64748b; font-weight:500; }
.gym-identity-dl dd { margin:2px 0 0; font-weight:600; }
.gym-prompt-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:8px; }
.gym-prompt-card { border:1px solid var(--line); border-radius:8px; padding:14px 16px; background:#fff; min-width:0; }
.gym-prompt-card.is-active { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); }
.gym-prompt-card label { flex-direction:row; align-items:flex-start; gap:10px; font-weight:600; margin-bottom:10px; }
.gym-prompt-card label input { margin-top:3px; flex-shrink:0; width:auto; }
.gym-prompt-card .muted { font-size:.85rem; font-weight:400; margin:0 0 10px 28px; }
.gym-prompt-card textarea { width:100%; min-height:140px; resize:vertical; margin-top:8px; }
.gym-prompt-card input[type="text"] { width:100%; margin-top:8px; }
.gym-select { max-width:360px; }
.gym-radio-group { display:flex; flex-direction:column; gap:10px; max-width:720px; }
.gym-option { display:flex; flex-direction:row; align-items:flex-start; gap:12px; padding:12px 14px;
  border:1px solid var(--line); border-radius:8px; background:#fff; cursor:pointer; font-weight:500;
  margin-bottom:0; transition:border-color .15s, background .15s, box-shadow .15s; }
.gym-option:hover { border-color:#cbd5e0; background:#f8fafc; }
.gym-option:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1px rgba(43,179,184,.25); }
.gym-option input { margin-top:3px; }
.gym-option > span { flex:1; line-height:1.45; }
.gym-sub-field { margin:0 0 4px 0; padding:12px 14px 14px 16px; background:#f8fafc;
  border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:8px; max-width:720px; }
.gym-sub-field.is-hidden { display:none; }
.gym-sub-field label { font-size:.85rem; font-weight:600; margin-bottom:0; }
.gym-sub-field input { margin-top:6px; }
.gym-tooltip { margin-top:12px; border:1px dashed #cbd5e0; border-radius:8px; background:#f8fafc; max-width:720px; }
.gym-span-full .gym-tooltip { margin-top:8px; }
.gym-tooltip summary { cursor:pointer; padding:10px 12px; font-weight:600; color:var(--accent-deep); }
.gym-tooltip[open] summary { border-bottom:1px solid #e2e8f0; }
.gym-tooltip-body { padding:12px; }
.gym-tooltip-body p { margin:0 0 10px; font-size:.9rem; color:#334155; }
.gym-tooltip-body ul { margin:0 0 12px 18px; padding:0; color:#334155; }
.gym-tooltip-body li { margin:0 0 8px; }
.gym-copy-block { margin-bottom:10px; }
.gym-copy-block textarea { min-height:260px; font-size:.84rem; line-height:1.45; background:#fff; }
.gym-inline-days { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:12px; font-weight:500; }
.gym-inline-days input { width:80px !important; display:inline-block; flex:none; }
.gym-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:8px; width:100%; padding-top:4px; }
@media (max-width:900px) {
  .gym-row-compact { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .app-content:has(.gym-container) { max-width:none; }
  .gym-row-compact, .gym-field-grid, .gym-prompt-grid { grid-template-columns:1fr; }
  .gym-identity-dl { grid-template-columns:1fr; }
  .gym-radio-group, .gym-sub-field, .gym-select { max-width:none; }
}
.gym-save-msg { font-size:.9rem; }
.gym-save-msg.ok { color:#155724; }
.gym-save-msg.err { color:var(--err); }
.gym-placeholder { opacity:.6; pointer-events:none; }
.leads-table .agent-actions-cell { white-space:nowrap; }
.leads-table .agent-actions-cell form { display:inline; }
.leads-actions { margin:12px 0 16px; }
.table-wrap { overflow-x:auto; max-width:100%; -webkit-overflow-scrolling:touch; }
.clients-master-table.kv { font-size:.8rem; width:100%; table-layout:auto; }
.clients-master-table.kv th, .clients-master-table.kv td { padding:5px 7px; vertical-align:middle; }
.clients-master-table.kv td:first-child { width:auto; font-weight:400; }
.clients-master-table .col-num { width:1.75rem; max-width:2rem; padding-left:4px; padding-right:4px; text-align:center; white-space:nowrap; }
.clients-master-table .num-eur, .clients-master-table .num-roi { white-space:nowrap; }
.leads-table td.lead-query { max-width:320px; white-space:normal; font-weight:400; font-size:.9rem; color:#4a5568; }
.debug-panel { background:#1a202c; color:#e2e8f0; padding:12px 16px; margin-top:12px; border-radius:8px;
  font-size:.8rem; max-height:200px; overflow:auto; }
.debug-panel h4 { margin:0 0 8px; font-size:.85rem; color:#a0aec0; }
.debug-panel pre { margin:0; white-space:pre-wrap; word-break:break-word; }
.billing-panel section { margin-bottom:32px; }
.billing-section { padding:20px; background:var(--panel); border:1px solid var(--line); border-radius:10px; margin-bottom:20px; }
.billing-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; }
.billing-item label { font-size:.8rem; color:var(--muted); font-weight:600; }
.billing-item .billing-value { font-size:1.1rem; font-weight:600; }
.token-meter { margin:16px 0; }
.progress-bar { height:22px; background:var(--bg); border-radius:11px; overflow:hidden; }
.progress-fill { height:100%; background:linear-gradient(90deg,#4f46e5,#06b6d4); transition:width .3s; }
.token-stats { display:flex; justify-content:space-between; font-size:.85rem; color:var(--muted); margin-top:6px; }
.overage-warning { background:#fef3c7; border-left:4px solid #f59e0b; padding:12px; border-radius:4px; margin-top:12px; color:#92400e; }
.upgrade-suggestion { background:#dbeafe; border-left:4px solid #0284c7; padding:12px; border-radius:4px; margin-top:12px; color:#082f49; }
.app-main {
  flex:1; min-width:0; min-height:0; height:100%; max-height:100dvh;
  overflow-x:clip; overflow-y:auto; display:flex; flex-direction:column;
}
.app-content { max-width:1024px; margin:0 auto; padding:32px 28px; width:100%; flex:1 0 auto; }
.app-content-wide { max-width:none; margin:0; padding:20px 16px 28px; width:100%; }
/* Superadmin: pegado al menú en vez de centrado, para aprovechar la pantalla. */
.app-content-left { margin-left:0; margin-right:auto; max-width:1280px; }
.page-header { margin-bottom:24px; }
.page-header h1 { margin-bottom:6px; }

/* Cards de acción (dashboard home) */
.action-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.action-card { display:block; background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:20px; text-decoration:none; color:inherit; transition:transform .15s, box-shadow .15s, border-color .15s; }
.action-card:hover { transform:translateY(-2px); box-shadow:0 4px 16px rgba(0,0,0,.08); border-color:#cbd5e0; }
.action-card.highlight { border-color:var(--accent); background:linear-gradient(180deg,var(--accent-soft) 0%,#fff 100%); }
.action-card.disabled { opacity:.55; cursor:not-allowed; }
.action-card-icon { font-size:2rem; margin-bottom:10px; }
.action-link { display:inline-block; margin-top:10px; color:var(--accent); font-weight:600; }

/* Mi plan */
.plan-summary { background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:24px; max-width:560px; }
.plan-summary-head { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px; }
.plan-summary-price { font-size:1.3rem; font-weight:700; color:var(--accent); }
.plan-features { list-style:none; padding:0; margin:16px 0; }
.plan-features li { padding:6px 0; border-bottom:1px solid var(--line); }
.plan-features li.included { color:var(--fg); }
.plan-features li.excluded { color:var(--muted); text-decoration:line-through; }
.success { background:#d4edda; border:1px solid #c3e6cb; color:#155724; padding:10px 14px; border-radius:6px; margin-bottom:12px; }
.billing-form { max-width:560px; }
.row-2 { display:grid; grid-template-columns:1fr 2fr; gap:14px; }
.detect-form { display:flex; gap:10px; align-items:flex-end; max-width:560px; }
.detect-form label { flex:1; }
.detect-result { padding:14px; border-radius:8px; margin-top:14px; }
.detect-result.loading { background:#edf2f7; color:var(--muted); }
.detect-result.ok { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.detect-result.warn { background:#fff3cd; color:#856404; border:1px solid #ffeaa7; }
.detect-result.error { background:#fff5f5; color:var(--err); border:1px solid var(--err); }
.install-guide { margin-top:8px; }
.install-options { display:flex; flex-direction:column; gap:14px; margin:16px 0; }
.install-option { border:1px solid var(--line); border-radius:10px; background:#fff; padding:0; }
.install-option > summary { cursor:pointer; list-style:none; padding:14px 16px; display:flex; flex-direction:column; gap:4px; }
.install-option > summary::-webkit-details-marker { display:none; }
.install-option[open] > summary { border-bottom:1px solid var(--line); }
.install-option .install-steps,
.install-option .install-snippet-label,
.install-option .snippet,
.install-option .button,
.install-option h3,
.install-option .gtm-detect { margin-left:16px; margin-right:16px; }
.install-option .install-steps { margin-top:12px; margin-bottom:12px; padding-left:20px; }
.install-option .install-steps li { margin:6px 0; }
.install-option h3 { margin:16px 16px 8px; font-size:.95rem; }
.install-snippet-label { font-weight:600; font-size:.9rem; margin:8px 0 6px; }
.gtm-detect { margin:12px 16px; padding:12px 14px; border-radius:8px; background:#f8fafc; border:1px solid var(--line); }
.gtm-detect.is-ok { background:#f0fff4; border-color:#9ae6b4; }
.gtm-detect.is-warn { background:#fffaf0; border-color:#fbd38d; }
.gtm-detect.is-muted { background:#edf2f7; }
.gtm-detect-status { margin:0 0 10px; }
.gtm-detect .button { margin:0 0 2px; }

/* Onboarding stepper */
.stepper { display:flex; align-items:center; justify-content:center; gap:8px; margin:0 0 32px; }
.step { display:flex; flex-direction:column; align-items:center; gap:4px; }
.step-dot { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-weight:700; background:#edf2f7; color:var(--muted); border:2px solid #cbd5e0; }
.step.current .step-dot { background:var(--accent); color:#fff; border-color:var(--accent); }
.step.done .step-dot { background:#48bb78; color:#fff; border-color:#48bb78; }
.step-label { font-size:.8rem; color:var(--muted); }
.step.current .step-label, .step.done .step-label { color:var(--fg); font-weight:600; }
.step-line { flex:1; max-width:60px; height:2px; background:#cbd5e0; margin:0 4px; align-self:center; margin-bottom:18px; }
.status-section { padding:18px 20px; border-radius:10px; margin:18px 0; border:1px solid var(--line); }
.status-section.status-draft { background:#fff8e1; border-color:#f6e05e; }
.status-section.status-live { background:#f0fff4; border-color:#9ae6b4; }
.status-section h2 { margin-top:0; font-size:1.05rem; }
.status-pill { display:inline-block; padding:2px 10px; border-radius:12px; font-size:.85rem; font-weight:600; }
.status-pill.live { background:#48bb78; color:#fff; }
.status-pill.draft { background:#ecc94b; color:#5c4400; }
.button-secondary { background:#4a5568; }
.button-secondary:hover { background:#2d3748; }
.overage-warn { background:#fff5f5; border:1px solid var(--err); color:var(--err); padding:12px 14px; border-radius:8px; }
.overage-soft { background:#fff8e1; border:1px solid #f6e05e; color:#744210; padding:12px 14px; border-radius:8px; }
.pack-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
.pack-card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:18px; text-align:center; }
.pack-tokens { font-weight:600; font-size:1.05rem; }
.pack-price { font-size:1.6rem; font-weight:800; color:var(--accent); margin:8px 0 12px; }
.invoice-paid { color:#155724; font-weight:600; }
.invoice-pending { color:#856404; font-weight:600; }
.invoice-failed { color:var(--err); font-weight:600; }
.pw-wrap { position:relative; }
.pw-wrap input { width:100%; padding-right:38px; }
.pw-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:transparent;
  border:0; cursor:pointer; padding:4px 8px; color:var(--muted); line-height:0; display:flex;
  align-items:center; justify-content:center; }
.pw-toggle:hover { color:var(--accent); background:transparent; box-shadow:none; }
.pw-toggle svg { display:block; pointer-events:none; }
.error { background:#fff5f5; border:1px solid var(--err); color:var(--err); padding:10px 14px; border-radius:6px; }
.kv { border-collapse:collapse; width:100%; } .kv td { border:1px solid var(--line); padding:6px 10px; }
.kv td:first-child { font-weight:600; width:30%; } .soon { margin-top:24px; opacity:.85; }
.avatar-picker { border:1px solid var(--line); border-radius:8px; padding:14px 14px 10px; }
.avatar-picker legend { font-weight:600; padding:0 6px; }
.avatar-options { display:flex; gap:14px; flex-wrap:wrap; }
.avatar-option { flex:1 1 0; min-width:120px; display:flex; flex-direction:column; align-items:center;
  gap:6px; padding:10px; border:2px solid var(--line); border-radius:10px; cursor:pointer;
  font-weight:500; background:#fff; transition:border-color .15s, background .15s; }
.avatar-option:hover { border-color:#a0aec0; }
.avatar-option input[type=radio] { position:absolute; opacity:0; pointer-events:none; }
.avatar-option:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.avatar-preview { display:inline-block; width:88px; height:88px; }
.avatar-preview svg, .avatar-preview img { width:100%; height:100%; display:block; border-radius:50%; }
.avatar-preview img { object-fit:cover; }
.avatar-preview-wrap { position:relative; display:inline-block; }
.avatar-edit-btn { position:absolute; right:-4px; bottom:-4px; width:28px; height:28px; border-radius:50%;
  border:1px solid var(--line); background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.12); cursor:pointer;
  font-size:14px; line-height:1; padding:0; display:flex; align-items:center; justify-content:center; }
.avatar-edit-btn:hover { border-color:var(--accent); }
.avatar-edit-btn:disabled { opacity:.5; cursor:not-allowed; }
.avatar-edit-section { margin:28px 0; padding:18px; border:1px solid var(--line); border-radius:10px; background:var(--panel); max-width:640px; }
.avatar-edit-section form { max-width:none; }
.avatar-name { font-size:.9rem; font-weight:600; }
.avatar-name-input {
  width:100%; max-width:140px; margin-top:4px; text-align:center; font-size:.9rem; font-weight:600;
  padding:6px 8px; border:1px solid var(--line); border-radius:6px; background:#fff;
}
.avatar-name-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px rgba(43,179,184,0.15); }
.avatar-lg { width:112px; height:112px; }
.agent-head { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.agent-head h1 { margin:0; }
.snippet { background:#1a202c; color:#e2e8f0; padding:14px; border-radius:8px;
  font:13px/1.5 ui-monospace,Menlo,monospace; overflow-x:auto; white-space:pre-wrap; word-break:break-all; }
code { font:inherit; }
.metric-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin:18px 0; }
.metric-card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:16px; }
.metric-card.highlight { background:linear-gradient(135deg,var(--accent-soft) 0%,#fff 100%); border-color:var(--accent); }
.metric-label { font-size:.85rem; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.metric-value { font-size:2rem; font-weight:700; margin:4px 0; }
.metric-sub { font-size:.85rem; color:var(--muted); }
.quota-bar { height:10px; background:#edf2f7; border-radius:5px; overflow:hidden; }
.quota-fill { height:100%; background:linear-gradient(90deg,#48bb78 0%,#ecc94b 70%,#f56565 100%); transition:width .3s; }
.leads-table th { background:#edf2f7; padding:8px 10px; text-align:left; }
.upgrade-card { background:#fff8e1; border:1px solid #f6e05e; border-radius:10px; padding:18px; }
.upgrade-card h2 { margin-top:0; }
.signup-form { max-width:640px; }
.stack-form { display:flex; flex-direction:column; gap:12px; max-width:420px; }
.stack-form label { display:flex; flex-direction:column; gap:4px; font-weight:600; font-size:.9rem; }
.stack-form input, .stack-form select { font:inherit; padding:8px 10px; border:1px solid #d1d5db; border-radius:6px; }
.account-pw-hint { color:var(--err); margin:-4px 0 10px; font-size:.88rem; }
.identity-website-block { margin:0 0 14px; }
.identity-website-block .field-label { display:block; font-weight:600; margin:0 0 6px; }
.identity-website { margin:0; word-break:break-all; }
.signup-trial-cta { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:6px; }
.badge-nocard { display:inline-block; background:var(--accent); color:#fff; font-size:.68rem; font-weight:700;
  padding:4px 10px; border-radius:4px; letter-spacing:.04em; text-transform:uppercase; white-space:nowrap; }
.signup-pricing { border:1px solid var(--line); border-radius:8px; padding:14px; margin-top:8px; }
.signup-pricing legend { font-weight:600; padding:0 6px; }
.signup-trial-badges { display:flex; flex-wrap:wrap; gap:8px; margin:4px 0 10px; }
.badge-trial { display:inline-block; background:#edf2f7; color:#2d3748; font-size:.75rem; font-weight:600;
  padding:4px 10px; border-radius:999px; }
.signup-card-note { margin:0 0 12px; font-size:.9rem; }
.signup-pricing-slider { margin:12px 0; }
.signup-slider-label { display:block; font-weight:600; margin-bottom:8px; }
.signup-slider-row { display:flex; gap:12px; align-items:center; }
.signup-slider-row input[type=range] { flex:1; }
.signup-slider-row input[type=number] { width:88px; }
.signup-pricing-card { background:var(--accent-soft); border:1px solid var(--accent); border-radius:10px; padding:14px; margin-top:12px; }
.signup-price-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.signup-price-after { font-size:.8rem; color:var(--muted); font-weight:500; }
.signup-price-row { display:flex; align-items:baseline; gap:8px; margin-bottom:8px; }
.signup-price-amount { font-size:1.5rem; font-weight:700; color:var(--accent-deep); }
.signup-price-period { font-size:.9rem; color:var(--muted); }
.signup-price-features { margin:0; padding-left:18px; font-size:.88rem; }
.signup-over-cap { margin-top:10px; font-size:.9rem; }
.plan-picker { border:1px solid var(--line); border-radius:8px; padding:14px; }
.plan-picker legend { font-weight:600; padding:0 6px; }
.plan-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; }
.plan-option { cursor:pointer; }
.plan-option input[type=radio] { position:absolute; opacity:0; pointer-events:none; }
.plan-card { background:#fff; border:2px solid var(--line); border-radius:10px; padding:12px;
  transition:border-color .15s, background .15s; }
.plan-option:hover .plan-card { border-color:#a0aec0; }
.plan-option:has(input:checked) .plan-card { border-color:var(--accent); background:var(--accent-soft); }
.plan-name { font-weight:700; font-size:1.05rem; }
.plan-price { color:var(--accent); font-weight:600; margin:4px 0; }
.plan-tagline { font-size:.85rem; color:#444; }
.plan-range { font-size:.8rem; margin-top:6px; }
.plan-ideal-small { font-size:.75rem; color:#4a5568; background:#edf2f7; padding:5px 8px;
  border-radius:5px; margin:4px 0 8px; line-height:1.3; font-weight:500; }
.plan-ideal-banner { background:var(--accent-soft); color:var(--accent-deep); padding:8px 12px; border-radius:6px;
  font-weight:500; margin:8px 0; font-size:.9rem; }
.plan-conv { font-size:.85rem; color:#2d3748; font-weight:600; margin-top:4px; }

/* Soporte flotante en panel admin */
#support-fab { position:fixed; bottom:20px; right:20px; width:64px; height:64px; border-radius:50%;
  border:0; background:var(--accent); color:#fff; font-size:2rem; line-height:1; cursor:pointer; z-index:200;
  display:flex; align-items:center; justify-content:center; padding:0;
  box-shadow:0 4px 16px rgba(0,0,0,.2); transition:transform .15s; }
#support-fab:hover { transform:scale(1.05); }
.support-panel { position:fixed; bottom:96px; right:20px; width:380px; max-width:calc(100vw - 40px);
  max-height:70vh; background:#fff; border:1px solid var(--line); border-radius:12px;
  box-shadow:0 12px 32px rgba(0,0,0,.18); display:none; flex-direction:column; z-index:201; }
.support-panel.open { display:flex; }
.support-head { display:flex; justify-content:space-between; align-items:center; padding:12px 16px;
  border-bottom:1px solid var(--line); background:var(--accent); color:#fff; border-radius:12px 12px 0 0; }
.support-head button { background:transparent; border:0; color:#fff; cursor:pointer; font-size:1.1rem; }
.support-body { padding:14px 16px; overflow-y:auto; }
.support-intro { font-size:.9rem; color:var(--muted); margin:0 0 10px; }
.support-faq { border:1px solid var(--line); border-radius:6px; padding:8px 12px; margin-bottom:6px; }
.support-faq summary { cursor:pointer; font-weight:500; font-size:.9rem; }
.support-faq p { margin:8px 0 0; font-size:.85rem; color:#4a5568; }
.support-faq code { background:#edf2f7; padding:1px 5px; border-radius:3px; font-size:.85em; }
#support-form { display:flex; flex-direction:column; gap:8px; }
#support-form label { font-size:.85rem; font-weight:600; }
#support-form input, #support-form textarea { padding:6px 8px; font-size:.9rem; }
#support-form button { padding:8px; font-size:.9rem; }
.billing-period-toggle { display:flex; gap:14px; margin-bottom:12px; }
.billing-period-toggle label { display:inline-flex; align-items:center; gap:6px; font-weight:500; cursor:pointer; }
