/* ==============================================================================
   F2 AIA - DESIGN SYSTEM (PROFESSIONAL LIGHT EDITORIAL & WHATSAPP CHAT)
   Paleta: Blanco Porcelana, Negro Editorial, Grises Neutros, Acentos Rojo y Verde
   ============================================================================== */

:root {
    /* Fondos y Superficies */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #f1f5f9;
    --bg-sidebar: #ffffff;
    --border-color: #e2e8f0;
    --border-focus: #0f172a;

    /* Tipografía */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Colores de Marca y Acentos */
    --accent-black: #0f172a;
    --accent-black-hover: #1e293b;
    --accent-red: #e11d48;
    --accent-red-subtle: #ffe4e6;
    --accent-green: #10b981;
    --accent-green-subtle: #dcfce7;
    --accent-pine: #3f5540;
    --accent-cream: #f4ece1;

    /* WhatsApp Design Tokens */
    --wa-header-bg: #f0f2f5;
    --wa-chat-bg: #efeae2;
    --wa-bubble-bot: #ffffff;
    --wa-bubble-user: #d9fdd3;
    --wa-green: #00a884;
    --wa-green-hover: #02906f;
    --wa-blue-check: #53bdeb;
    --wa-time-color: #667781;

    /* Bordes y Sombras */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-pill: 9999px;

    --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --shadow-elevated: 0 12px 30px -4px rgba(15, 23, 42, 0.08);
}

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

body.light-theme {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Layout Principal */
.dashboard-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Sidebar Limpio y Elegante */
.sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.brand-badge {
    width: 40px;
    height: 40px;
    background-color: var(--accent-red-subtle);
    color: var(--accent-red);
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-subtle);
}

.brand-info h2 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.brand-sub {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 24px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-surface-subtle);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: var(--bg-surface-subtle);
    color: var(--text-primary);
    border-left: 3px solid var(--accent-red);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


.nav-icon {
    font-size: 16px;
}

.sidebar-footer {
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.system-status-pill {
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--accent-green);
    flex-shrink: 0;
}

.status-dot.pulsing {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-copy strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.status-copy span {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 32px 40px;
    overflow-y: auto;
    max-width: 1600px;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 20px;
}

.agency-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--accent-red);
    margin-bottom: 4px;
}

.topbar h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.6px;
}

.topbar .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-dark, .btn-primary {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-dark:hover, .btn-primary:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 6px 20px rgba(225, 29, 72, 0.35);
    transform: translateY(-1px);
}

.btn-dark:disabled, .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.pill-red {
    background-color: var(--accent-red-subtle);
    color: var(--accent-red);
}

.pill-green {
    background-color: var(--accent-green-subtle);
    color: var(--accent-green);
}

.pill-neutral {
    background-color: var(--bg-surface-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.metric-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.metric-value-row h3 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.metric-icon-box {
    width: 38px;
    height: 38px;
    background-color: var(--bg-surface-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

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

/* Content Grid Split */
.content-split-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

@media (max-width: 1180px) {
    .content-split-grid {
        grid-template-columns: 1fr;
    }
}

/* Tarjetas Generales */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card-header {
    padding: 22px 24px;
    border-bottom: 1px solid var(--border-color);
}

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

.section-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--accent-red);
    display: block;
    margin-bottom: 4px;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.sandbox-badge {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==============================================================================
   SIMULADOR DE WHATSAPP (FIDELIDAD DE INTERFAZ WHATSAPP WEB)
   ============================================================================== */

.whatsapp-simulator-card {
    display: flex;
    flex-direction: column;
    height: 640px;
}

/* Header de WhatsApp */
.whatsapp-header {
    background-color: var(--wa-header-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wa-contact-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wa-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 168, 132, 0.25);
}

.wa-badge-verified {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 16px;
    height: 16px;
    background-color: var(--wa-green);
    color: #ffffff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wa-header-bg);
}

.wa-details .wa-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wa-name h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.verified-tag {
    font-size: 10px;
    font-weight: 700;
    background-color: var(--accent-green-subtle);
    color: var(--wa-green);
    padding: 2px 6px;
    border-radius: 4px;
}

.wa-status {
    font-size: 12px;
    color: var(--wa-green);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.wa-dot {
    width: 7px;
    height: 7px;
    background-color: var(--wa-green);
    border-radius: 50%;
    animation: wa-pulse 1.8s infinite;
}

@keyframes wa-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.wa-action-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 7px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.wa-action-btn:hover {
    background-color: var(--bg-surface-subtle);
    color: var(--text-primary);
}

/* Quick clinic hints bar */
.quick-hints-bar {
    background-color: #fafbfc;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
}

.hints-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.hint-chip {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.hint-chip:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background-color: var(--accent-red-subtle);
}


/* Fondo de Mensajes WhatsApp */
.whatsapp-chat-box {
    flex-grow: 1;
    background-color: var(--wa-chat-bg);
    background-image: radial-gradient(#d1d7db 1px, transparent 1px);
    background-size: 16px 16px;
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-date-pill {
    text-align: center;
    margin: 4px 0 10px 0;
}

.chat-date-pill span {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    color: var(--wa-time-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Burbujas de Chat WhatsApp */
.wa-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    position: relative;
    box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.13);
    word-wrap: break-word;
}

.wa-bubble.bot {
    align-self: flex-start;
    background-color: var(--wa-bubble-bot);
    color: #111b21;
    border-top-left-radius: 0;
}

.wa-bubble.user {
    align-self: flex-end;
    background-color: var(--wa-bubble-user);
    color: #111b21;
    border-top-right-radius: 0;
}

.wa-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--wa-time-color);
}

.wa-double-check {
    color: var(--wa-blue-check);
    font-weight: bold;
    font-size: 12px;
}

/* Indicador de tipeo */
.wa-typing-indicator {
    align-self: flex-start;
    background-color: var(--wa-bubble-bot);
    padding: 8px 14px;
    border-radius: 8px;
    border-top-left-radius: 0;
    box-shadow: 0 1px 1.5px rgba(11, 20, 26, 0.13);
    display: flex;
    align-items: center;
    gap: 4px;
}

.wa-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: wa-bounce 1.4s infinite ease-in-out both;
}

.wa-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wa-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes wa-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Barra inferior de envío WhatsApp */
.whatsapp-input-bar {
    background-color: var(--wa-header-bg);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--border-color);
}

.wa-input-container {
    flex-grow: 1;
}

.wa-input-container input {
    width: 100%;
    padding: 11px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid #ffffff;
    background-color: #ffffff;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: box-shadow 0.2s ease;
}

.wa-input-container input:focus {
    box-shadow: 0 0 0 2px rgba(0, 168, 132, 0.3);
}

.wa-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--wa-green);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.wa-send-btn:hover {
    background-color: var(--wa-green-hover);
    transform: scale(1.05);
}

.wa-send-btn:active {
    transform: scale(0.95);
}

/* ==============================================================================
   TABLAS LIMPIAS Y PROFESIONALES
   ============================================================================== */

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

.clean-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.clean-table th {
    background-color: #fafbfc;
    color: var(--text-secondary);
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.clean-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.clean-table tr:hover td {
    background-color: #fafafa;
}

.clean-table tr:last-child td {
    border-bottom: none;
}

/* Badges y Etiquetas */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.badge-green {
    background-color: var(--accent-green-subtle);
    color: #065f46;
}

.badge-simulated {
    background-color: #e2e8f0;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.badge-red {
    background-color: var(--accent-red-subtle);
    color: #9f1239;
}

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

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Header actions */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-secondary-light {
    background-color: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.btn-secondary-light:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

.btn-export {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-export:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 600;
    gap: 6px;
    border-radius: var(--radius-md);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.btn-outline:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

/* Uploader Panel */
.uploader-panel {
    background-color: #fafbfc;
    border-bottom: 1px solid var(--border-color);
    padding: 22px 24px;
    animation: fadeIn 0.25s ease;
}

.uploader-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.uploader-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    margin-bottom: 16px;
}

.uploader-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 13px;
    background-color: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent-red);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* Botones en tabla de acciones */
.table-actions {
    display: flex;
    gap: 6px;
}

.btn-sm-action {
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #334155;
    white-space: nowrap;
}

.btn-sm-action:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background-color: #fff1f2;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Modal Overlay & Card */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background-color: #ffffff;
    width: 90%;
    max-width: 680px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px -5px rgba(15, 23, 42, 0.2);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #fafbfc;
}

.modal-tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: var(--accent-red);
    text-transform: uppercase;
}

.modal-header h3 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 2px;
}

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

.modal-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
}

.modal-close-btn:hover {
    color: #0f172a;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.label-tiny {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.proposal-vulnerability-box {
    background-color: #fff1f2;
    border-left: 3px solid var(--accent-red);
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 13px;
    color: #881337;
}

.proposal-vulnerability-box strong {
    display: block;
    margin-bottom: 2px;
}

.proposal-subject-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 14px;
    border-radius: 6px;
}

.proposal-subject-box h4 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.email-preview-container {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #1e293b;
    max-height: 280px;
    overflow-y: auto;
    white-space: pre-line;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background-color: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   TRABAJO DEL AGENTE: FEED EN TIEMPO REAL & MONITOR DE AUDITORÍA
   ============================================================================== */

.nav-pill-pulse {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    background: #fee2e2;
    color: var(--accent-red);
    margin-left: auto;
    letter-spacing: 0.5px;
    animation: wa-pulse 1.8s infinite;
}

.flex-align-gap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-live-stream {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    color: #065f46;
}

.pulsing-green {
    background-color: #10b981;
}

.filter-chips-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.filter-chip:hover {
    background: var(--bg-surface-subtle);
    color: var(--text-primary);
    border-color: #cbd5e1;
}

.filter-chip.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.agent-logs-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.agent-logs-timeline {
    max-height: 420px;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Scrollbar estilizado para la consola */
.agent-logs-timeline::-webkit-scrollbar {
    width: 6px;
}
.agent-logs-timeline::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.agent-log-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    position: relative;
}

.agent-log-entry:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.log-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.log-icon-CHAT { background: #e0f2fe; color: #0369a1; }
.log-icon-PROSPECT_MATCH { background: #f3e8ff; color: #7e22ce; }
.log-icon-PROSPECT_AUDIT_SENT { background: #e0e7ff; color: #4338ca; }
.log-icon-DEMO_STARTED { background: #fef3c7; color: #b45309; }
.log-icon-LEAD_QUALIFIED { background: #dcfce7; color: #15803d; border: 1px solid #86efac; box-shadow: 0 0 8px rgba(34, 197, 94, 0.3); }
.log-icon-PROSPECTING_CYCLE_START { background: #f1f5f9; color: #334155; }
.log-icon-PROSPECTING_CYCLE_COMPLETED { background: #f1f5f9; color: #334155; }
.log-icon-SYSTEM { background: #f1f5f9; color: #475569; }

.log-content-col {
    flex-grow: 1;
    min-width: 0;
}

.log-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

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

.log-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.log-channel-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}

.log-description {
    font-size: 12px;
    color: #334155;
    line-height: 1.45;
    margin-bottom: 6px;
    word-break: break-word;
}

.log-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-pill {
    font-size: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    color: #64748b;
}

/* ==============================================================================
   TRANSCRIPCIÓN DE SESIONES DE CLIENTES
   ============================================================================== */

.modal-transcript-card {
    max-width: 640px;
    height: 80vh;
}

.transcript-chat-body {
    background-color: var(--wa-chat-bg);
    background-image: radial-gradient(#d1d7db 1px, transparent 1px);
    background-size: 16px 16px;
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transcript-msg {
    max-width: 82%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    position: relative;
    word-wrap: break-word;
}

.transcript-msg.user {
    align-self: flex-end;
    background-color: var(--wa-bubble-user);
    color: #111b21;
    border-top-right-radius: 2px;
    box-shadow: 0 1px 1px rgba(11, 20, 26, 0.1);
}

.transcript-msg.assistant {
    align-self: flex-start;
    background-color: var(--wa-bubble-bot);
    color: #111b21;
    border-top-left-radius: 2px;
    box-shadow: 0 1px 1px rgba(11, 20, 26, 0.1);
}

.transcript-time {
    font-size: 10px;
    color: rgba(17, 27, 33, 0.55);
    margin-top: 4px;
    display: block;
    text-align: right;
}

/* ==============================================================================
   BADGES DE ESTADO DE CORREO Y DIAGNÓSTICO
   ============================================================================== */

.sandbox-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background-color: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sandbox-badge.production-active {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.sandbox-badge.simulation-active {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* ==============================================================================
   LEAD SCORE BADGES & VISUAL INDICATORS
   ============================================================================== */
.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.score-prioritario {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.25);
}

.score-bueno {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.score-medio {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.score-bajo {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

/* ==============================================================================
   TIMELINE MODAL & CHRONOLOGICAL EVENT STREAM
   ============================================================================== */
.modal-timeline-card {
    max-width: 680px;
    height: 82vh;
}

.timeline-note-composer {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.timeline-note-composer input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.timeline-note-composer input:focus {
    border-color: #0f172a;
}

.timeline-events-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 28px;
}

.timeline-events-container::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 11px;
    width: 2px;
    background: #e2e8f0;
}

.timeline-event-item {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.timeline-event-item:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transform: translateX(2px);
}

.timeline-event-icon-circle {
    position: absolute;
    left: -28px;
    top: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 0 0 3px #ffffff;
}

.timeline-event-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.timeline-event-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.timeline-event-time {
    font-size: 11px;
    color: var(--text-muted);
}

.timeline-event-desc {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
}

.timeline-event-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.timeline-meta-chip {
    font-size: 11px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

/* ==============================================================================
   PIPELINE COMERCIAL Y EMBUDO DE CONVERSIÓN
   ============================================================================== */
.pipeline-funnel-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-subtle);
}

.pipeline-funnel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.funnel-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.funnel-title-group h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.funnel-meta-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}

.funnel-meta-stats strong {
    color: var(--accent-black);
}

.funnel-stages-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.funnel-step {
    flex: 1;
    min-width: 90px;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
}

.funnel-step:hover {
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: var(--shadow-subtle);
}

.funnel-step.active-filter {
    border-color: var(--accent-black);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

.funnel-step-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.funnel-step-count {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.funnel-step-rate {
    font-size: 10px;
    color: var(--text-muted);
}

/* Badges de Etapas en la Tabla */
.stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    user-select: none;
    white-space: nowrap;
}

.stage-badge:hover {
    filter: brightness(0.95);
    transform: scale(1.02);
}

.stage-selector-select {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    max-width: 140px;
}

.stage-selector-select:focus {
    border-color: var(--accent-black);
}

/* ==============================================================================
   ESTILOS DE GOBERNANZA, MODOS DE AUTONOMÍA Y KILL SWITCH (PASO 5)
   ============================================================================== */

.autonomy-control-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.autonomy-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.04em;
}

.autonomy-mode-toggle {
    display: inline-flex;
    background: #ffffff;
    padding: 2px;
    border-radius: var(--radius-sm);
    border: 1px solid #cbd5e1;
    gap: 2px;
}

.mode-toggle-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.mode-toggle-btn:hover {
    color: var(--text-primary);
    background: #f8fafc;
}

.mode-toggle-btn.active {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Kill Switch Button */
.btn-killswitch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-killswitch:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-killswitch.active {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #b91c1c !important;
    animation: pulse-border 2s infinite;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25);
}

@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Banner de Alerta Crítica (Kill Switch / Circuit Breaker) */
.autonomy-alert-banner {
    background: #fef2f2;
    border: 1px solid #fecdd3;
    border-left: 5px solid #e11d48;
    color: #9f1239;
    padding: 12px 18px;
    margin: 16px 32px 0 32px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-subtle);
    animation: slide-down 0.25s ease-out;
}

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cola de Aprobación */
.btn-queue-action {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-queue-review {
    background: #0f172a;
    color: #ffffff;
    border: 1px solid #0f172a;
}

.btn-queue-review:hover {
    background: #1e293b;
}

.btn-queue-reject {
    background: #ffffff;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

.btn-queue-reject:hover {
    background: #ffe4e6;
}

/* ==============================================================================
   HUMAN HANDOFF & TAKEOVER CONTROLS
   ============================================================================== */
.badge-handoff {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    animation: handoff-pulse 2s infinite ease-in-out;
}

@keyframes handoff-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.btn-resume-ia {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-resume-ia:hover {
    background-color: #dcfce7;
    color: #14532d;
    border-color: #4ade80;
}

.btn-takeover-ia {
    background-color: #fff1f2;
    color: #9f1239;
    border: 1px solid #fecdd3;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-takeover-ia:hover {
    background-color: #ffe4e6;
    color: #881337;
    border-color: #fb7185;
}

.row-handoff-active {
    background-color: #fff7ed !important;
    border-left: 3px solid #ea580c;
}

/* ==============================================================================
   PASO 8: INTELIGENCIA COMERCIAL, DROP-OFF Y ANÁLISIS DE OBJECIONES
   ============================================================================== */

/* KPI Grid */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.analytics-kpi-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.analytics-kpi-card .kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.analytics-kpi-card .kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-kpi-card .kpi-icon {
    font-size: 20px;
}

.analytics-kpi-card .kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 4px 0;
    font-family: 'Syne', sans-serif;
}

.analytics-kpi-card .kpi-sub {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Analytics Split Grid */
.analytics-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 960px) {
    .analytics-split-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    margin-bottom: 16px;
}

.panel-title-group h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.panel-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Funnel Drop-off Bar Rows */
.funnel-dropoff-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.funnel-dropoff-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.funnel-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.funnel-row-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
}

.funnel-row-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.dropoff-badge-pill {
    padding: 2px 6px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
}

.dropoff-badge-pill.safe {
    background: #ecfdf5;
    color: #166534;
}

.dropoff-badge-pill.warning {
    background: #fffbeb;
    color: #b45309;
}

.dropoff-badge-pill.critical {
    background: #fff1f2;
    color: #be123c;
}

.dropoff-bar-track {
    width: 100%;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.dropoff-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Objections Matrix Bar Rows */
.objections-matrix-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.objection-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.objection-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

.objection-bar-track {
    width: 100%;
    height: 10px;
    background: #f1f5f9;
    border-radius: 5px;
    overflow: hidden;
}

.objection-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Insights Grid & Cards */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.insight-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    border-left: 4px solid #4f46e5;
}

.insight-card.maturity-insufficient {
    border-left-color: #64748b;
}

.insight-card.maturity-early {
    border-left-color: #f59e0b;
}

.insight-card.maturity-confirmed {
    border-left-color: #16a34a;
}

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

.insight-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.maturity-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.maturity-badge.insufficient {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.maturity-badge.early {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.maturity-badge.confirmed {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #a7f3d0;
}

.insight-summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.insight-details {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.insight-action-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 12px;
    color: #1e293b;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: auto;
}

.insight-action-box strong {
    color: #0f172a;
}

/* Badges de Objeción */
.badge-objection-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
}

.badge-objection-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-objection-status.open {
    background: #fff1f2;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.badge-objection-status.resolved {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #a7f3d0;
}





