/* ACCON · Asistente de ventas — v9 (rediseño 2026-10)
   Sistema visual: superficies claras, tipografía del sistema, un solo color de
   acento por modo (azul = ERP, verde = IA) y modo oscuro automático. */

:root {
    color-scheme: light dark;
    --bg: #f5f5f7;
    --surface: #ffffff;
    --surface-2: #fbfbfd;
    --fill: rgba(120, 120, 128, 0.12);
    --fill-strong: rgba(120, 120, 128, 0.2);
    --text: #1d1d1f;
    --text-2: #515154;
    --text-3: #86868b;
    --separator: rgba(0, 0, 0, 0.1);
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-soft: rgba(0, 113, 227, 0.1);
    --on-accent: #ffffff;
    --success: #248a3d;
    --success-soft: rgba(36, 138, 61, 0.12);
    --warning: #b25000;
    --warning-soft: rgba(255, 149, 0, 0.14);
    --danger: #d70015;
    --danger-soft: rgba(215, 0, 21, 0.1);
    --glass: rgba(255, 255, 255, 0.72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
    --radius-lg: 20px;
    --radius: 14px;
    --radius-sm: 10px;
    --pill: 980px;
    --header-h: 52px;
    --dock-h: 76px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

body.ai-mode {
    --accent: #248a3d;
    --accent-hover: #2a9a45;
    --accent-soft: rgba(36, 138, 61, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --surface: #1c1c1e;
        --surface-2: #2c2c2e;
        --fill: rgba(120, 120, 128, 0.24);
        --fill-strong: rgba(120, 120, 128, 0.36);
        --text: #f5f5f7;
        --text-2: #c7c7cc;
        --text-3: #98989d;
        --separator: rgba(255, 255, 255, 0.14);
        --accent: #0a84ff;
        --accent-hover: #339cff;
        --accent-soft: rgba(10, 132, 255, 0.18);
        --success: #30d158;
        --success-soft: rgba(48, 209, 88, 0.16);
        --warning: #ff9f0a;
        --warning-soft: rgba(255, 159, 10, 0.16);
        --danger: #ff453a;
        --danger-soft: rgba(255, 69, 58, 0.16);
        --glass: rgba(28, 28, 30, 0.72);
        --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.06);
        --shadow-md: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 8px 24px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 56px rgba(0, 0, 0, 0.7);
    }
    body.ai-mode {
        --accent: #30d158;
        --accent-hover: #4cd96d;
        --accent-soft: rgba(48, 209, 88, 0.16);
        --on-accent: #00210b;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.47;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.in-call { overflow: hidden; }
button, select, textarea, input { font-family: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* ===== HEADER ===== */
.header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--separator);
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-mark {
    width: 26px; height: 26px; border-radius: 8px;
    background: var(--accent); color: var(--on-accent);
    display: grid; place-items: center;
    font-size: 13px; font-weight: 700; letter-spacing: 0;
    transition: background 0.3s var(--ease);
}
.header h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
.header .badge {
    background: var(--fill); color: var(--text-2);
    padding: 3px 10px; border-radius: var(--pill);
    font-size: 12px; font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.header .badge:empty { display: none; }
.header .badge-vertical { background: var(--accent-soft); color: var(--accent); }
.header .lead-info { font-size: 13px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Botones base */
.btn-ai-generate, .btn-start-call, .btn-schedule, .btn-calculadora, .btn-primary {
    background: var(--accent); color: var(--on-accent);
    border: none; border-radius: var(--pill);
    font-weight: 500;
    transition: background 0.2s var(--ease), transform 0.1s var(--ease), opacity 0.2s;
}
.btn-ai-generate:hover, .btn-start-call:hover, .btn-schedule:hover, .btn-calculadora:hover, .btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ai-generate:active, .btn-start-call:active, .btn-schedule:active, .btn-primary:active { transform: scale(0.98); }
.btn-ai-generate:disabled, .btn-start-call:disabled, .btn-primary:disabled { opacity: 0.5; transform: none; }

.btn-ai-generate {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 15px; font-size: 13px; white-space: nowrap;
}
.btn-ai-generate svg { flex-shrink: 0; }
.btn-ai-generate .spin { animation: spin 1s linear infinite; }
.btn-ai-generate .ok { color: inherit; }
.btn-close-session, .btn-end-call {
    background: var(--danger-soft); color: var(--danger);
    border: none; border-radius: var(--pill);
    padding: 7px 15px; font-size: 13px; font-weight: 500; white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s;
}
.btn-close-session:hover, .btn-end-call:hover { background: var(--danger); color: #fff; }
.btn-close-session { display: none !important; } /* el cierre vive en la barra inferior */

/* ===== LOADING / BIENVENIDA ===== */
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 78vh; gap: 16px; padding: 24px; }
.loading-screen p { color: var(--text-3); font-size: 15px; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--fill-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.spinner-small { width: 16px; height: 16px; border: 2px solid var(--fill-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.welcome { max-width: 560px; text-align: center; }
.welcome h2 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.welcome p { font-size: 17px; color: var(--text-2); margin-bottom: 28px; }
.welcome-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.welcome-actions .btn-start-call { width: auto; padding: 12px 26px; }
.btn-ghost {
    background: var(--fill); color: var(--text); border: none; border-radius: var(--pill);
    padding: 12px 26px; font-size: 17px; font-weight: 500; transition: background 0.2s var(--ease);
}
.btn-ghost:hover { background: var(--fill-strong); }
.error-text { color: var(--danger); }

/* ===== PRE-LLAMADA ===== */
.pre-call { max-width: 760px; margin: 0 auto; padding: 36px 20px 64px; }
.pre-call > * { animation: rise 0.45s var(--ease) both; }
.pre-call > *:nth-child(2) { animation-delay: 0.04s; }
.pre-call > *:nth-child(3) { animation-delay: 0.08s; }
.pre-call > *:nth-child(4) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.lead-card, .cleverals-box, .briefing-box, .setup-card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 24px 26px; margin-bottom: 14px;
}
.eyebrow, .cleverals-box h3, .briefing-box h3 {
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-3); margin-bottom: 10px;
}
.lead-card .eyebrow { color: var(--accent); margin-bottom: 6px; }
.lead-card h2 { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 18px; }
.lead-card .meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 24px; }
.lead-card .meta div { display: flex; flex-direction: column; font-size: 12px; color: var(--text-3); }
.lead-card .meta strong { font-size: 15px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }

.cleverals-box ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.cleverals-box li { background: var(--fill); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; color: var(--text); }
.cleverals-box li strong { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }

.briefing-box h3 { color: var(--accent); display: flex; align-items: center; gap: 6px; }
.briefing-section { margin-bottom: 18px; }
.briefing-section:last-child { margin-bottom: 0; }
.briefing-section h4 { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 5px; letter-spacing: 0; }
.briefing-section p { font-size: 15px; color: var(--text); }
.briefing-section.lead p { font-size: 19px; line-height: 1.4; letter-spacing: -0.015em; font-weight: 500; }
.briefing-section.focus { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 16px; }
.briefing-section.focus h4 { color: var(--accent); }
.briefing-section ul { list-style: none; }
.briefing-section li { padding: 4px 0 4px 18px; font-size: 15px; position: relative; }
.briefing-section li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.explore-list li::before { background: var(--accent); }
.alert-list li::before { background: var(--warning); }
.known-list li::before { background: var(--success); }
.briefing-loading { display: flex; flex-direction: column; gap: 10px; }
.briefing-loading .status { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 14px; margin-bottom: 4px; }
.skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--fill) 25%, var(--fill-strong) 37%, var(--fill) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.skeleton.w90 { width: 90%; } .skeleton.w75 { width: 75%; } .skeleton.w60 { width: 60%; } .skeleton.w40 { width: 40%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.setup-card { display: grid; gap: 16px; }
.lead-type-selector, .sector-selector { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.lead-type-selector label, .sector-selector label { width: 96px; font-weight: 500; }
.lead-type-toggle { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 2px; }
.lt-btn { border: none; background: transparent; padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text); transition: background 0.2s var(--ease), box-shadow 0.2s; }
.lt-btn.active { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); }
@media (prefers-color-scheme: dark) { .lt-btn.active { background: #636366; } }
.sector-selector select {
    flex: 1; min-width: 220px; max-width: 380px;
    padding: 9px 34px 9px 12px; font-size: 15px;
    border: 1px solid var(--separator); border-radius: var(--radius-sm);
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none; appearance: none;
}
.sector-auto-badge { background: var(--success-soft); color: var(--success); padding: 3px 10px; border-radius: var(--pill); font-size: 12px; font-weight: 500; }
.verticals-mix { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--text-3); flex-basis: 100%; padding-left: 108px; }
.verticals-mix .mix-chip { background: var(--accent-soft); color: var(--accent); padding: 3px 10px; border-radius: var(--pill); font-weight: 500; cursor: help; }

.btn-start-call { display: block; width: 100%; padding: 15px; font-size: 17px; margin-top: 6px; }

/* ===== PANTALLA DE LLAMADA ===== */
.call-screen {
    display: grid;
    grid-template-columns: 232px 1fr;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    position: relative;
}

.timeline-sidebar { display: flex; flex-direction: column; overflow: hidden; padding: 16px 12px calc(var(--dock-h) + 12px); border-right: 1px solid var(--separator); }
.timeline { flex: 1; overflow-y: auto; }
.tl-step {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    margin-bottom: 2px; cursor: pointer; position: relative;
    transition: background 0.15s var(--ease);
}
.tl-step:hover { background: var(--fill); }
.tl-step.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.tl-dot {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--fill); color: var(--text-3);
    display: grid; place-items: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
    transition: background 0.2s var(--ease), color 0.2s;
}
.tl-step.done .tl-dot { background: var(--accent-soft); color: var(--accent); }
.tl-step.active .tl-dot { background: var(--accent); color: var(--on-accent); }
.tl-label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.tl-step.active .tl-label { color: var(--text); font-weight: 600; }
.tl-key { margin-left: auto; font-size: 11px; color: var(--text-3); border: 1px solid var(--separator); border-radius: 5px; padding: 0 5px; opacity: 0; transition: opacity 0.15s; }
.tl-step:hover .tl-key { opacity: 1; }
.tl-line { display: none; }

.notes-section { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px; flex-shrink: 0; }
.notes-section h4 { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.notes-area { width: 100%; min-height: 76px; max-height: 160px; border: none; background: var(--fill); border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14px; line-height: 1.4; resize: vertical; }
.notes-area::placeholder { color: var(--text-3); }
.notes-area:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.btn-manual-profundizar { display: block; width: 100%; margin-top: 8px; padding: 8px; background: var(--accent-soft); color: var(--accent); border: none; border-radius: var(--pill); font-size: 13px; font-weight: 500; transition: background 0.2s var(--ease), color 0.2s; }
.btn-manual-profundizar:hover { background: var(--accent); color: var(--on-accent); }
.btn-manual-profundizar:disabled { opacity: 0.5; }

.main-content { overflow-y: auto; padding-bottom: calc(var(--dock-h) + 16px); scroll-behavior: smooth; }

/* Fases de ancho completo (Intro, Precio, Cierre) */
.phase-full { max-width: 760px; margin: 0 auto; padding: 32px 28px; animation: rise 0.35s var(--ease) both; }
.phase-full h3, .q-header h3, .v-header h3 { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 18px; }

.phase-script {
    background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    padding: 24px 26px; margin-bottom: 14px;
    font-size: 19px; line-height: 1.5; letter-spacing: -0.015em; color: var(--text);
    position: relative;
}
.phase-script::before { content: 'Guion'; display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 8px; }
.phase-script strong { font-weight: 600; }
.closing-script { font-size: 17px; }

.tips-box { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 22px; margin-bottom: 14px; }
.tips-box.focus-box { background: var(--accent-soft); box-shadow: none; }
.tips-box p { font-size: 15px; }
.tip-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text-3); letter-spacing: 0.06em; margin-bottom: 8px; }
.focus-box .tip-title { color: var(--accent); }
.tips-list { list-style: none; }
.tips-list li { padding: 7px 0 7px 18px; font-size: 15px; color: var(--text-2); position: relative; border-bottom: 1px solid var(--separator); }
.tips-list li:last-child { border-bottom: none; }
.tips-list li::before { content: ''; position: absolute; left: 2px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.tips-list.known-list li::before { background: var(--success); }
.tips-list strong { color: var(--text); font-weight: 600; }

/* ===== FASE: PREGUNTAS ===== */
.phase-questions, .phase-valor { display: flex; flex-direction: column; min-height: 100%; max-width: 880px; width: 100%; margin: 0 auto; animation: rise 0.35s var(--ease) both; }
.q-header, .v-header {
    padding: 28px 28px 12px; flex-shrink: 0;
    position: sticky; top: 0; z-index: 5;
    background: var(--bg);
}
.q-header h3, .v-header h3 { margin-bottom: 14px; }
.q-tabs, .v-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.q-tabs::-webkit-scrollbar, .v-tabs::-webkit-scrollbar { display: none; }
.q-tab, .v-tab {
    padding: 6px 14px; border: none; border-radius: var(--pill);
    background: var(--fill); color: var(--text);
    font-size: 13px; font-weight: 500; white-space: nowrap;
    transition: background 0.2s var(--ease), color 0.2s;
}
.q-tab:hover, .v-tab:hover { background: var(--fill-strong); }
.q-tab.active, .v-tab.active { background: var(--text); color: var(--bg); }
.q-tab-ai, .q-tab-commercial { background: var(--accent-soft); color: var(--accent); }
.q-tab-ai.active, .q-tab-commercial.active { background: var(--accent); color: var(--on-accent); }
.tab-count { display: inline-block; margin-left: 4px; font-size: 12px; opacity: 0.6; font-variant-numeric: tabular-nums; }

.questions-list, .valor-list { flex: 1; padding: 8px 28px 28px; width: 100%; }

.q-card {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: 16px 18px; margin-bottom: 10px;
    animation: rise 0.3s var(--ease) both;
    transition: box-shadow 0.2s var(--ease);
}
.q-card:hover { box-shadow: var(--shadow-md); }
.q-card-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.q-card-cat, .valor-cat, .ai-bot-category, .ai-bot-row-cat {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap;
}
.q-card-cat::before, .ai-bot-category::before, .ai-module-label::before, .ai-chip::before, .valor-section h4.dotted::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    background: var(--dot, var(--text-3));
}
.q-card-text { font-size: 17px; line-height: 1.4; font-weight: 500; letter-spacing: -0.015em; color: var(--text); }
.q-card-example { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.q-card-example strong { color: var(--text-3); font-weight: 500; }
.q-card-purpose, .sub-q-purpose { display: none; }

.btn-profundizar { padding: 5px 13px; border: none; border-radius: var(--pill); background: var(--fill); color: var(--accent); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s; }
.btn-profundizar:hover { background: var(--accent); color: var(--on-accent); }
.btn-profundizar:disabled { opacity: 0.6; }
.btn-profundizar.loading { animation: breathe 1.4s ease-in-out infinite; }
.btn-profundizar.done { background: var(--accent-soft); }
@keyframes breathe { 50% { opacity: 0.45; } }

.follow-ups { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--separator); }
.follow-up { font-size: 14px; color: var(--text-2); padding: 2px 0; }
.fu-trigger { font-weight: 600; color: var(--accent); }

.sub-questions { margin-top: 12px; padding: 4px 14px; background: var(--fill); border-radius: var(--radius-sm); }
.sub-q { padding: 10px 0; border-bottom: 1px solid var(--separator); }
.sub-q:last-child { border-bottom: none; }
.sub-q-text { font-size: 15px; color: var(--text); font-weight: 500; }
.sub-q-example { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.sub-q-example::before { content: 'Ej: '; color: var(--text-3); }
.sub-q-loading { display: flex; align-items: center; gap: 8px; padding: 10px; color: var(--text-3); font-size: 14px; }
.sub-q-empty { padding: 8px; color: var(--text-3); font-size: 13px; }
.sub-q-error { padding: 10px 0; color: var(--danger); font-size: 14px; }
.sub-q-appear { animation: rise 0.3s var(--ease) both; }

.q-empty { text-align: center; padding: 56px 24px; color: var(--text-3); font-size: 15px; }
.q-empty strong { color: var(--text-2); }
.q-empty .hint { margin-top: 8px; font-size: 13px; }

.briefing-questions { margin-top: 20px; }
.briefing-questions h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); font-weight: 600; margin-bottom: 10px; }
.briefing-q-list { display: flex; flex-direction: column; gap: 8px; }
.briefing-q-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; }
.briefing-q-card .q-card-text { font-size: 16px; }

.ai-module-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ai-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: none; border-radius: var(--pill); background: var(--fill); color: var(--text); font-size: 13px; font-weight: 500; }
.ai-chip.active { background: var(--text); color: var(--bg); }
.ai-module-group { margin-bottom: 20px; }
.ai-module-header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px; margin-bottom: 8px; }
.ai-module-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ai-module-count { font-size: 12px; color: var(--text-3); }

/* ===== FASE: VALOR ===== */
.valor-section { margin-bottom: 22px; }
.valor-section h4 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 4px 8px; }
.valor-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 18px; margin-bottom: 8px; }
.valor-pain { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--warning); margin-bottom: 4px; }
.valor-solution { font-size: 15px; color: var(--text); }
.valor-pitch { font-size: 14px; color: var(--success); margin-top: 6px; font-weight: 500; }
.valor-title { font-size: 16px; font-weight: 600; color: var(--text); margin: 2px 0; }
.valor-text { font-size: 15px; color: var(--text-2); }
.valor-card.ai-card { background: var(--accent-soft); box-shadow: none; }

/* ===== FASE: PRECIO ===== */
.pricing-estimate { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px 26px; margin-bottom: 14px; }
.pricing-estimate h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 16px; }
.estimate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.estimate-item { background: var(--fill); border-radius: var(--radius); padding: 14px; }
.estimate-item.highlight { background: var(--accent-soft); }
.est-label { font-size: 12px; color: var(--text-3); font-weight: 500; margin-bottom: 4px; }
.est-value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.est-value.big { font-size: 26px; color: var(--accent); }
.est-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.modules-breakdown { border-top: 1px solid var(--separator); padding-top: 14px; margin-top: 14px; }
.modules-breakdown h5 { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 6px; }
.mod-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--separator); }
.mod-row:last-child { border-bottom: none; }
.mod-row span:first-child { font-weight: 500; color: var(--text); }
.mod-row span:last-child { color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.mod-row small { color: var(--text-3); font-weight: 400; }

.pricing-tiers { display: grid; gap: 10px; margin: 14px 0; }
.tier { display: flex; gap: 14px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 18px 20px; }
.tier-standard { box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.tier-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; flex-shrink: 0; background: var(--fill); color: var(--text-2); }
.tier-standard .tier-num { background: var(--accent); color: var(--on-accent); }
.tier-name { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.tier-price { font-size: 15px; font-weight: 500; color: var(--accent); margin: 2px 0 4px; }
.tier-basic .tier-price, .tier-custom .tier-price { color: var(--text-2); }
.tier-desc { font-size: 14px; color: var(--text-2); }
.speech-intro { font-size: 17px; line-height: 1.45; color: var(--text); }

.plan-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 18px 0 4px; }
.plan-tile { position: relative; border-radius: var(--radius); padding: 16px 10px 14px; text-align: center; background: var(--fill); }
.plan-tile.recommended { background: var(--surface); box-shadow: 0 0 0 2px var(--accent), var(--shadow-md); }
.plan-name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.plan-price { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.plan-max { font-size: 12px; color: var(--text-3); }
.plan-badge { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: var(--pill); white-space: nowrap; }
.setup-note { font-size: 14px; color: var(--text); background: var(--warning-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-top: 14px; }

/* ===== FASE: CIERRE ===== */
.btn-schedule { display: block; width: 100%; padding: 15px; font-size: 17px; margin-bottom: 14px; }

/* ===== AGENTES (catálogo de la calculadora) ===== */
.ai-bot-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 10px; transition: box-shadow 0.2s var(--ease); }
.ai-bot-card:hover { box-shadow: var(--shadow-md); }
.ai-bot-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ai-bot-header .ai-bot-category { margin-left: auto; }
.ai-bot-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--fill); }
.ai-bot-avatar.sm { width: 32px; height: 32px; }
.ai-bot-name { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.ai-bot-persona { font-size: 13px; color: var(--text-3); white-space: nowrap; }
.ai-bot-desc { font-size: 15px; color: var(--text-2); margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ai-bot-desc.expanded { -webkit-line-clamp: unset; overflow: visible; }
.ai-bot-toggle { background: none; border: none; color: var(--accent); font-size: 14px; padding: 0 0 10px; display: block; }
.ai-bot-toggle:hover { text-decoration: underline; }
.ai-bot-features { list-style: none; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.ai-bot-features li { padding: 3px 0 3px 22px; position: relative; }
.ai-bot-features li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 10px; height: 5px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.ai-bot-vol { font-size: 13px; color: var(--text-2); padding: 9px 12px; background: var(--fill); border-radius: var(--radius-sm); margin-bottom: 10px; }
.ai-bot-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-bot-chip { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: var(--pill); background: var(--warning-soft); color: var(--warning); }
.ai-bot-chip.erp { background: var(--accent-soft); color: var(--accent); }
.ai-bot-chip.flav { background: var(--success-soft); color: var(--success); }
.ai-bot-badge { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 4px 12px; border-radius: var(--pill); font-size: 14px; font-weight: 500; margin: 2px 4px 2px 0; }

.ai-catalog { margin: 18px 0; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.ai-catalog summary { cursor: pointer; padding: 16px 20px; font-size: 15px; font-weight: 500; color: var(--accent); list-style: none; }
.ai-catalog summary::-webkit-details-marker { display: none; }
.ai-catalog summary::after { content: '›'; float: right; font-size: 20px; line-height: 1; color: var(--text-3); transition: transform 0.2s var(--ease); }
.ai-catalog[open] summary::after { transform: rotate(90deg); }
.ai-catalog-list { padding: 0 20px 8px; }
.ai-bot-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--separator); }
.ai-bot-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-bot-row-name { font-size: 15px; font-weight: 500; }
.ai-bot-row-desc { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-bot-row-add { border: none; background: var(--fill); color: var(--accent); font-size: 13px; font-weight: 500; padding: 5px 13px; border-radius: var(--pill); white-space: nowrap; transition: background 0.2s var(--ease), color 0.2s; }
.ai-bot-row-add:hover { background: var(--accent); color: var(--on-accent); }

.ai-calc-cta { margin: 18px 0 4px; text-align: center; }
.btn-calculadora { display: inline-block; padding: 11px 24px; font-size: 15px; }

/* ===== BARRA DE VOZ (flotante) ===== */
.speech-bar {
    position: absolute; left: calc(50% + 116px); bottom: 16px; transform: translateX(-50%);
    width: min(760px, calc(100% - 232px - 32px));
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px 8px 8px;
    background: var(--glass);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--separator);
    border-radius: var(--pill);
    box-shadow: var(--shadow-lg);
    z-index: 20;
}
.mic-btn { width: 44px; height: 44px; border-radius: 50%; border: none; display: grid; place-items: center; flex-shrink: 0; transition: background 0.2s var(--ease), color 0.2s; }
.mic-btn.off { background: var(--fill); color: var(--text-2); }
.mic-btn.off:hover { background: var(--fill-strong); }
.mic-btn.on { background: var(--danger); color: #fff; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(255, 69, 58, 0); } }
.speech-info { flex: 1; min-width: 0; }
.speech-transcript { display: block; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transcript-counter { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.speech-bar .btn-ai-generate { padding: 9px 16px; }
.speech-bar .btn-end-call { padding: 9px 16px; }

/* ===== MODALES Y AVISOS ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 200; animation: fade 0.2s var(--ease) both; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 28px; max-width: 480px; width: calc(100% - 32px); max-height: 84vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop 0.25s var(--ease) both; }
.modal h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.modal.centered { text-align: center; }
.modal .modal-sub { font-size: 14px; color: var(--text-3); }
.modal .modal-big { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--accent); margin: 6px 0 10px; }
.summary-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.summary-grid dt { color: var(--text-3); }
.summary-grid dd { color: var(--text); }
.modal .btn-row { display: grid; gap: 8px; margin-top: 22px; }
.modal .btn-row.two { grid-template-columns: 1fr 1fr; }
.btn-primary { padding: 12px 16px; font-size: 15px; width: 100%; }
.btn-secondary { padding: 12px 16px; background: var(--fill); color: var(--text); border: none; border-radius: var(--pill); font-size: 15px; font-weight: 500; width: 100%; transition: background 0.2s var(--ease); }
.btn-secondary:hover { background: var(--fill-strong); }
.btn-text { background: none; border: none; color: var(--text-3); font-size: 14px; padding: 8px; width: 100%; }
.btn-text:hover { color: var(--text); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }

.toast-stack { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 300; pointer-events: none; }
.toast { background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border: 1px solid var(--separator); box-shadow: var(--shadow-lg); border-radius: var(--pill); padding: 10px 18px; font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 8px; animation: toast-in 0.3s var(--ease) both; max-width: min(520px, calc(100vw - 32px)); }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.toast.ok::before { background: var(--success); }
.toast.warn::before { background: var(--warning); }
.toast.error::before { background: var(--danger); }
.toast.out { animation: toast-out 0.25s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px) scale(0.96); } }

.kb-note { font-size: 13px; color: var(--text-3); margin: 0 4px 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .call-screen { grid-template-columns: 188px 1fr; }
    .speech-bar { left: calc(50% + 94px); width: calc(100% - 188px - 24px); }
    .speech-bar .btn-ai-generate { padding: 9px 12px; }
    .header .lead-info { display: none; }
}
@media (max-width: 640px) {
    .call-screen { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .timeline-sidebar { padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--separator); }
    .timeline { display: flex; gap: 4px; overflow-x: auto; }
    .tl-step { margin: 0; padding: 6px 10px; flex-shrink: 0; }
    .tl-key, .notes-section { display: none; }
    .speech-bar { left: 50%; width: calc(100% - 24px); }
    .tl-label { font-size: 13px; }
    .phase-full, .q-header, .v-header { padding-left: 16px; padding-right: 16px; }
    .questions-list, .valor-list { padding-left: 16px; padding-right: 16px; }
    .phase-full h3, .q-header h3, .v-header h3 { font-size: 24px; }
    .lead-card h2 { font-size: 26px; }
    .welcome h2 { font-size: 32px; }
    .transcript-counter { display: none !important; }
    .verticals-mix { padding-left: 0; }
    .lead-type-selector label, .sector-selector label { width: 100%; }
}

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