/* 
    DESIGN SYSTEM: Explorador PRO (Prosegur)
    Estilo Premium Dark / Steel Blue
    OPTIMIZACIÓN: Alineación y Responsividad
*/

:root {
    --primary-blue: #003399; /* Prosegur Blue */
    --primary-yellow: #FED000; /* Prosegur Gold */
    --bg-dark: #0f172a; /* Deep Navy */
    --bg-card: rgba(30, 41, 59, 0.7); /* Glass Card */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #22c55e;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; -webkit-tap-highlight-color: transparent; }
button, a, select, input, .tab-link, .nav-btn-text, .ai-chip-btn, .map-chip-btn, .lead-card, .lead-card-premium { touch-action: manipulation; cursor: pointer; }
html, body { overflow-x: hidden; width: 100%; }
body { 
    background-color: var(--bg-dark); 
    color: var(--text-main); 
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

.hidden { display: none !important; }

/* --- Auth Screen --- */
.auth-container {
    display: none; height: 100vh; width: 100%;
    background: radial-gradient(circle at top right, var(--primary-blue), var(--bg-dark));
    justify-content: center; align-items: center; padding: 1.5rem;
}
.auth-container.active { display: flex; }

.auth-card {
    background: var(--bg-card); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px);
    padding: 3rem 2rem; border-radius: 2.5rem; width: 100%; max-width: 420px;
    border: 1px solid var(--border); box-shadow: var(--shadow-premium);
    text-align: center;
}
.brand-logo-main { width: 180px; margin-bottom: 3rem; }

/* Login Minimalista */
.login-minimal-group {
    display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem;
}
.login-minimal-group input {
    background: rgba(255,255,255,0.05); border: 2px solid var(--border);
    border-radius: 1.5rem; padding: 1.5rem; color: white; font-size: 1.3rem;
    text-align: center; font-weight: 600; width: 100%;
}
.login-minimal-group input:focus {
    border-color: var(--primary-yellow); outline: none; background: rgba(255,255,255,0.1);
}

.btn-giant {
    height: 75px; width: 100%; font-size: 1.2rem; letter-spacing: 2px;
    box-shadow: 0 10px 20px rgba(254, 208, 0, 0.3);
}

.auth-footer-links {
    margin-top: 3rem; display: flex; flex-direction: column; gap: 1.5rem;
}
.link-btn {
    background: none; border: none; color: var(--primary-yellow);
    font-weight: 800; font-size: 1rem; cursor: pointer; text-transform: uppercase;
}
.link-btn-dim {
    background: none; border: none; color: white; opacity: 0.4;
    font-weight: 600; font-size: 0.8rem; cursor: pointer;
}

/* --- Navbar --- */
.navbar {
    background: rgba(15, 23, 42, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    padding: 0 1.5rem; height: 75px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 3px solid var(--primary-yellow); position: sticky; top: 0; z-index: 1001;
}
.nav-left { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-logo-img { height: 32px; width: auto; }
.nav-titles { display: flex; flex-direction: column; overflow: hidden; }
.brand-name { font-weight: 800; color: white; font-size: 1.1rem; white-space: nowrap; }
.app-tag { font-size: 0.6rem; color: var(--primary-yellow); font-weight: 800; letter-spacing: 1px; white-space: nowrap; }

.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-icon { 
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; color: white; transition: 0.2s;
}
.btn-excel { background: #22c55e; }
.btn-airtable { background: #00AEEF; }
.btn-delete { background: var(--danger); }

.profile-badge { 
    padding: 0.5rem 1rem; background: rgba(255,255,255,0.05); border-radius: 2rem; 
    color: white; font-weight: 800; cursor: pointer; position: relative;
    border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    max-width: 200px;
}
#display-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-content {
    display: none; position: absolute; top: 120%; right: 0; min-width: 180px;
    background: var(--bg-dark); border: 2px solid var(--primary-yellow); border-radius: 1.2rem;
    padding: 0.6rem; box-shadow: var(--shadow-premium); z-index: 1002;
}
.dropdown-content.active { display: block; animation: slideIn 0.2s ease-out; }
.dropdown-content button {
    width: 100%; text-align: left; background: none; border: none; padding: 1rem;
    color: white; font-weight: 700; border-radius: 0.8rem; display: flex; align-items: center; gap: 0.8rem;
    cursor: pointer;
}
.dropdown-content button:hover { background: rgba(255,255,255,0.1); }

/* --- Tabs --- */
.main-tabs { 
    display: flex; background: #1e293b; padding: 0.5rem; gap: 0.4rem; 
    position: sticky; top: 75px; z-index: 1000; overflow-x: auto;
}
.tab-link {
    flex: 1; padding: 0.8rem 0.5rem; border: none; background: rgba(255,255,255,0.03);
    color: var(--text-muted); font-weight: 800; font-size: 0.75rem; border-radius: 0.8rem;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    white-space: nowrap; min-width: max-content;
}
.tab-link i { width: 16px; height: 16px; pointer-events: none; }
.tab-link.active { background: var(--primary-yellow); color: var(--bg-dark); box-shadow: 0 8px 15px rgba(254, 208, 0, 0.2); }

/* --- Content Area --- */
.main-content { padding: 1.5rem; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 160px); }
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 0.3s ease-out; }

/* Control Cards */
.glass-card {
    background: var(--bg-card); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--border);
    padding: 1.8rem; border-radius: 2.2rem; box-shadow: var(--shadow-premium); margin-bottom: 2rem;
}
.controls-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.controls-row h2 { color: white; font-weight: 800; font-size: 1.4rem; }

.btn {
    border: none; border-radius: 1.2rem; padding: 0.9rem 1.8rem; font-weight: 900;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.8rem;
    color: white; /* Default para legibilidad */
}
.btn-primary { background: var(--primary-yellow); color: var(--bg-dark); }
.btn-outline { background: none; border: 2px solid var(--primary-yellow); color: var(--primary-yellow); padding: 0.9rem; border-radius: 1.2rem; font-weight: 800; cursor: pointer; }
.btn-pulse { animation: pulseAnim 2s infinite; }

.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

.grid-inputs-2col, .grid-inputs-split-70, .grid-inputs-split-30, .grid-inputs-3col {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}
.grid-inputs-2col { grid-template-columns: 1fr 1fr; }
.grid-inputs-3col { grid-template-columns: 1fr 1fr 1fr; }
.grid-inputs-split-70 { grid-template-columns: 2fr 1fr; }
.grid-inputs-split-30 { grid-template-columns: 1fr 2fr; }

.modal-layout-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
}
.field label { display: block; font-size: 0.65rem; font-weight: 900; color: var(--primary-yellow); margin-bottom: 0.5rem; text-transform: uppercase; }
select { 
    width: 100%; padding: 0.8rem 2.5rem 0.8rem 1.1rem; border-radius: 1rem; border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.6) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fed000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 1rem center;
    background-size: 16px;
    color: white; font-weight: 700; -webkit-appearance: none; appearance: none;
}
select.u-bg-glass-button-02 {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fed000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px !important;
    padding-right: 2.5rem !important;
}
select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
}
select optgroup {
    background-color: #0f172a !important;
    color: #fed000 !important;
    font-weight: 700;
    font-style: normal;
}


.search-panel { background: rgba(0,0,0,0.2); padding: 1.2rem; border-radius: 1.5rem; margin-top: 1rem; }
.search-input-wrapper { background: rgba(255,255,255,0.05); border-radius: 1rem; padding: 0 1rem; height: 48px; display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.search-input-wrapper input { border: none; background: none; width: 100%; color: white; font-weight: 600; font-size: 1rem; }

.interest-slider-wrapper { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.interest-slider-wrapper label { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); min-width: 120px; }
.interest-slider-wrapper input { flex: 1; min-width: 150px; accent-color: var(--primary-yellow); }

.extra-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tag-select { 
    flex: 1; font-size: 0.8rem; padding: 0.75rem 2.4rem 0.75rem 1.2rem; min-width: 140px;
    background: rgba(15, 23, 42, 0.7) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fed000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 0.8rem center;
    background-size: 14px;
    color: white; font-weight: 700; -webkit-appearance: none; appearance: none;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 1.2rem;
    transition: border-color 0.3s ease, background 0.3s ease;
    line-height: 1.4;
}
.tag-select:focus {
    border-color: var(--primary-yellow);
    background-color: rgba(15, 23, 42, 0.85);
    outline: none;
}

.version-badge { background: rgba(255,193,7,0.2); color: var(--primary-yellow); padding: 0.1rem 0.4rem; border-radius: 0.5rem; font-size: 0.65rem; font-weight: 800; border: 1px solid var(--primary-yellow); margin-left: 0.4rem; vertical-align: middle; }

/* Leads Grid */
.leads-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.lead-card { 
    background: var(--bg-card); padding: 1.5rem; border-radius: 2rem; border: 1px solid var(--border); 
    position: relative; transition: 0.3s; cursor: pointer;
}
.lead-card:hover { transform: translateY(-5px); border-color: var(--primary-yellow); }
.badge-interest { padding: 0.4rem 0.8rem; border-radius: 2rem; font-size: 0.8rem; font-weight: 900; background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.1); }
.lead-name-text { font-weight: 800; color: var(--primary-yellow); font-size: 1.2rem; margin-bottom: 0.3rem; margin-right: 40px; }
.lead-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; }



/* --- Map --- */
.map-frame { height: 500px; border-radius: 2rem; overflow: hidden; border: 3px solid var(--primary-yellow); position: relative; margin-bottom: 1.5rem; }
#map { width: 100%; height: 100%; z-index: 1; background: #0f172a; }

.map-overlay-controls {
    position: absolute; bottom: 1.5rem; right: 1rem; z-index: 1000;
    display: flex; flex-direction: column; gap: 0.8rem;
}
.btn-map-control {
    background: var(--bg-dark); border: 2px solid var(--primary-yellow); color: white;
    padding: 0.8rem 1.2rem; border-radius: 1.5rem; font-weight: 800; font-size: 0.7rem;
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer; box-shadow: var(--shadow-premium);
}
.btn-map-control.active { background: var(--primary-yellow); color: var(--bg-dark); }

.map-controls-top { display: flex; gap: 0.6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.btn-glass { flex: 1; background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--border); padding: 0.8rem; border-radius: 1rem; font-weight: 800; font-size: 0.75rem; cursor: pointer; min-width: 140px; }

/* User Marker */
.user-marker-container {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    height: 20px !important;
    background: transparent !important;
    border: none !important;
}
.user-marker {
    width: 14px; height: 14px; background: #3b82f6; border: 3px solid white;
    border-radius: 50%; box-shadow: 0 0 15px rgba(59, 130, 246, 1), 0 0 0 3px rgba(59, 130, 246, 0.4);
    animation: markerPulse 2s infinite;
}

/* Modals */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 2000; align-items: center; justify-content: center; padding: 1rem; }
.modal.active { display: flex; animation: fadeIn 0.3s; }
.modal-card {
    background: var(--bg-dark);
    border-radius: 2rem;
    padding: 2.2rem 2rem 2rem 2rem;
    width: 100%;
    border: 2px solid var(--primary-yellow);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}
.modal-card.mini { max-width: 420px; }
.modal-card.full { max-width: 900px; }

/* Custom scrollbar for modal cards */
.modal-card::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.modal-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.modal-card::-webkit-scrollbar-thumb {
    background: rgba(254, 208, 0, 0.25);
    border-radius: 10px;
}
.modal-card::-webkit-scrollbar-thumb:hover {
    background: var(--primary-yellow);
}
.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
.modal-close i {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}
.modal-close:hover {
    background: rgba(254, 208, 0, 0.15);
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
    box-shadow: 0 0 12px rgba(254, 208, 0, 0.3);
}
.modal-close:hover i {
    transform: rotate(90deg);
}
.modal-close:active {
    transform: scale(0.92);
}


.status-picker h4 { color: var(--primary-yellow); font-size: 0.75rem; font-weight: 900; margin-bottom: 1rem; text-align: center; }
.grid-2-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.status-btn-pick { padding: 0.8rem; border-radius: 1rem; border: 2px solid var(--border); background: none; color: white; font-weight: 800; font-size: 0.7rem; cursor: pointer; transition: all 0.2s; }
.status-btn-pick.visita.active { border-color: var(--primary-yellow); color: var(--primary-yellow); background: rgba(254, 208, 0, 0.1); }
.status-btn-pick.seguimiento.active { border-color: #f97316; color: #f97316; background: rgba(249, 115, 22, 0.1); }
.status-btn-pick.firmado.active { border-color: #22c55e; color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.status-btn-pick.descartado.active { border-color: #e2e8f0; color: #e2e8f0; background: rgba(226, 232, 240, 0.1); }

/* Profile Modal Enhanced */
.profile-modal-card { max-width: 500px !important; }
.profile-header { text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 2rem; }
.profile-avatar-large {
    width: 80px; height: 80px; background: rgba(254, 208, 0, 0.1); color: var(--primary-yellow);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto;
    border: 2px solid rgba(254, 208, 0, 0.2); transition: all 0.3s;
}
.profile-avatar-large:hover { border-color: var(--primary-yellow); transform: scale(1.05); }
.avatar-edit-badge {
    position: absolute; bottom: 0; right: 0; background: var(--primary-yellow);
    color: var(--bg-dark); width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-dark);
}
.profile-avatar-large i { width: 40px; height: 40px; }
.profile-section { background: rgba(255,255,255,0.02); padding: 1.5rem; border-radius: 1.5rem; border: 1px solid rgba(255,255,255,0.05); }
.section-title { font-size: 0.7rem; font-weight: 900; color: var(--primary-yellow); margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.5rem; letter-spacing: 1px; }

/* Estilos de Input en Modales/Perfil */
.input-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--primary-yellow);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.8rem 1rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-yellow);
    background: rgba(255, 255, 255, 0.08);
}

.input-group select {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border) !important;
    border-radius: 1rem !important;
    padding: 0.8rem 2.5rem 0.8rem 1rem !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fed000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px !important;
    cursor: pointer;
}

.input-group select:focus {
    border-color: var(--primary-yellow) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

input[readonly] {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05) !important;
}


/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes markerPulse { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }
@keyframes pulseAnim { 0% { box-shadow: 0 0 0 0 rgba(254, 208, 0, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(254, 208, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(254, 208, 0, 0); } }

/* Exploration Tab Premium */
.exploration-header { background: rgba(255,255,255,0.02); border-radius: 2rem; padding: 2rem; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 2rem; }
.header-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; gap: 2rem; flex-wrap: wrap; }
.exploration-actions-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.exploration-actions-group button { flex: 1 1 auto; white-space: nowrap; }

.btn-radar {
    position: relative; overflow: hidden; padding: 1rem 2rem; border-radius: 2rem;
    display: flex; align-items: center; gap: 0.8rem; font-weight: 900;
}
.radar-ping {
    position: absolute; width: 100%; height: 100%; background: rgba(254, 208, 0, 0.3);
    border-radius: 50%; left: 0; top: 0; animation: radarPing 2s infinite; pointer-events: none;
}
@keyframes radarPing { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(2.5); opacity: 0; } }

.exploration-filters-bar { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.search-box-premium {
    flex: 1; background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 1.5rem;
    display: flex; align-items: center; padding: 0.4rem 1.2rem; gap: 0.8rem; min-width: 300px;
}
.search-box-premium input { background: none; border: none; color: white; width: 100%; font-size: 0.9rem; padding: 0.6rem 0; }
.search-box-premium i { opacity: 0.4; }

.premium-filters-container {
    display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2); padding: 1rem; border-radius: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05); width: 100%;
}

.premium-filter-pill {
    flex: 1; min-width: 130px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 1.2rem;
    padding: 0.5rem 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 2px !important;
    position: relative;
    height: 54px !important;
    box-sizing: border-box !important;
}

.premium-filter-pill:hover,
.premium-filter-pill:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-yellow);
}

.premium-filter-pill label {
    font-size: 0.6rem; font-weight: 900; color: var(--primary-yellow);
    text-transform: uppercase; letter-spacing: 1px;
    margin: 0 !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.pill-select-area {
    display: flex !important;
    align-items: center !important;
    gap: 0.8rem;
    height: 18px !important;
}

.pill-select-area > svg:first-child,
.pill-select-area > i:first-child {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    opacity: 0.8;
}

.pill-select-area .arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    color: var(--primary-yellow);
    pointer-events: none;
}

.premium-filter-pill select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.select-value {
    font-weight: 800;
    font-size: 0.8rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    padding-right: 1.5rem; /* Evita solapamiento con la flecha */
    pointer-events: none;
    line-height: 18px !important;
}

.premium-filter-pill select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
    font-weight: 600;
}

.time-range-inputs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}
.time-range-inputs.hidden {
    display: none !important;
}
.premium-filter-pill input[type="date"] {
    background: transparent;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 0.8rem !important;
    width: 100%;
    outline: none;
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    height: 18px !important;
    line-height: 18px !important;
}
.premium-filter-pill input[type="text"] {
    background: transparent;
    border: none;
    color: white;
    font-weight: 800;
    font-size: 0.8rem !important;
    width: 100%;
    outline: none;
    padding: 0 !important;
    margin: 0 !important;
    height: 18px !important;
    line-height: 18px !important;
}

/* Empty Exploration State - Radar Pro */
.empty-exploration-state { text-align: center; padding: 4rem 2rem; }
.radar-container {
    width: 160px; height: 160px; margin: 0 auto 2.5rem auto; position: relative;
    border: 1px solid rgba(254, 208, 0, 0.15); border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 208, 0, 0.05) 0%, transparent 70%);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
/* Grid lines for radar */
.radar-container::before {
    content: ''; position: absolute; inset: 0;
    background-image: 
        linear-gradient(rgba(254, 208, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(254, 208, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px; background-position: center;
    border-radius: 50%;
}
.radar-line {
    position: absolute; width: 50%; height: 4px; 
    background: linear-gradient(to right, transparent, var(--primary-yellow));
    top: 50%; left: 50%; transform-origin: left; 
    animation: radarRotate 3s linear infinite;
    filter: blur(1px); z-index: 2;
}
.radar-circle {
    position: absolute; inset: 0; border: 1px solid rgba(254, 208, 0, 0.1); border-radius: 50%;
    animation: radarRipple 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
}
.radar-point {
    position: absolute; width: 6px; height: 6px; background: var(--primary-yellow);
    border-radius: 50%; box-shadow: 0 0 10px var(--primary-yellow);
    animation: pointFlicker 2s infinite; opacity: 0;
}

@keyframes radarRotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes radarRipple { 0% { transform: scale(0.6); opacity: 0; } 50% { opacity: 0.5; } 100% { transform: scale(1.4); opacity: 0; } }
@keyframes pointFlicker { 0%, 100% { opacity: 0; } 50% { opacity: 0.8; } }

/* Cards Premium Plus */
.lead-card-premium {
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 1.5rem;
    padding: 1.5rem; 
    position: relative; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden; 
    animation: cardSlideUp 0.5s ease-out backwards;
    display: flex; 
    flex-direction: column; 
    gap: 1rem;
}
@keyframes cardSlideUp { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

.lead-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-yellow);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(254, 208, 0, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.interest-progress-wrapper { margin: 1.2rem 0; }
.interest-label-flex { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.7rem; font-weight: 900; }
.progress-track { height: 6px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 1.5s ease-out; }

.card-header-flex { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.2rem; }
.badge-status-premium { padding: 0.4rem 0.8rem; border-radius: 2rem; font-size: 0.6rem; font-weight: 900; letter-spacing: 1px; }
.badge-status-premium.visita { background: rgba(254, 208, 0, 0.1); color: var(--primary-yellow); border: 1px solid rgba(254, 208, 0, 0.2); }
.badge-status-premium.seguimiento { background: rgba(249, 115, 22, 0.1); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.2); }
.badge-status-premium.firmado { background: rgba(34, 197, 94, 0.1); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-status-premium.descartado { background: rgba(226, 232, 240, 0.1); color: #e2e8f0; border: 1px solid rgba(226, 232, 240, 0.3); }


/* Leads Grid Premium */
.leads-grid-premium {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem;
}

/* Nav Actions Fix */
.nav-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.3rem 0.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 800;
}

.nav-btn-text i {
    width: 16px;
    height: 16px;
}

.nav-btn-text.btn-excel { color: #22c55e; }
.nav-btn-text.btn-airtable { color: #3b82f6; }
.nav-btn-text.btn-delete { color: #ef4444; }

.nav-btn-text:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn-text.btn-excel:hover { background: rgba(34, 197, 94, 0.1); }
.nav-btn-text.btn-airtable:hover { background: rgba(59, 130, 246, 0.1); }
.nav-btn-text.btn-delete:hover { background: rgba(239, 68, 68, 0.1); }

/* Stats Colors */
#stat-total { color: white; }
#stat-high { color: var(--primary-yellow); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-val { display: block; font-size: 1.8rem; font-weight: 800; color: var(--primary-yellow); }
.stat-label { font-size: 0.6rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn-label { display: none; }
    .nav-btn-text { padding: 0.6rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .main-content { padding: 1rem; }
    .modal-layout-grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
    .grid-inputs-2col, .grid-inputs-split-70, .grid-inputs-split-30, .grid-inputs-3col { grid-template-columns: 1fr !important; }
    .leads-layout { grid-template-columns: 1fr; }
    .modal-card { padding: 1.2rem !important; border-radius: 1.5rem !important; }
}

@media (max-width: 600px) {
    .navbar { height: 70px; padding: 0 1rem; }
    .dropdown-content { right: 5px; min-width: 200px; }
    .nav-titles { display: none; }
    .brand-name { font-size: 1rem; }
    .profile-badge { padding: 0.4rem 0.8rem; }
    #display-name { display: none; }
    
    .main-tabs { top: 70px; padding: 0.4rem; overflow-x: auto; }
    .tab-link { font-size: 0.65rem; padding: 0.6rem 1rem; flex: 0 0 auto; }
    
    .glass-card { padding: 1.2rem; border-radius: 1.5rem; }
    .controls-row h2 { font-size: 1.2rem; }
    .btn { padding: 0.8rem 1.2rem; font-size: 0.75rem; border-radius: 1rem; }
    
    .map-frame { height: 400px; border-radius: 1.5rem; }
    .exploration-actions-group {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 0.5rem;
    }
    .exploration-actions-group #global-create-lead-btn {
        grid-column: 1 / 2;
    }
    .exploration-actions-group #search-city-btn {
        grid-column: 2 / 3;
    }
    .exploration-actions-group #geo-btn {
        grid-column: 1 / -1;
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .nav-actions { display: flex; transform: scale(0.9); }
    .dropdown-content { right: 2px; min-width: 180px; }
    .tab-link { padding: 0.6rem 0.8rem; font-size: 0.6rem; }
    .exploration-actions-group {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: stretch;
    }
    .exploration-actions-group button {
        width: 100%;
        justify-content: center;
    }
}

/* Loader for simulation */
.loader-ring {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(254, 208, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-yellow);
    animation: spin 1s ease-in-out infinite;
}





/* Lead Cards Content Layout */



.badge-interest-premium {
    padding: 0.3rem 0.8rem; border-radius: 2rem; font-weight: 900; font-size: 0.8rem;
    border: 1px solid transparent; display: flex; align-items: center; gap: 0.4rem;
}
.badge-interest-premium small { font-size: 0.5rem; opacity: 0.7; }



.lead-name-premium { font-size: 1.1rem; font-weight: 900; color: white; margin: 0.5rem 0; }
.lead-sector-premium, .lead-address-premium {
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; opacity: 0.5; font-weight: 600; margin: 0.2rem 0;
}
.lead-sector-premium i, .lead-address-premium i { width: 14px; color: var(--primary-yellow); opacity: 0.8; }

.card-actions-premium { display: flex; gap: 0.5rem; margin-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1rem; }
.btn-card-action {
    flex: 1; padding: 0.6rem; border-radius: 1rem; border: none; font-weight: 800; font-size: 0.65rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.4rem;
    transition: all 0.2s; background: rgba(255,255,255,0.05); color: white;
}
.btn-card-action:hover { background: rgba(255,255,255,0.1); }
.btn-card-action.detail { border: 1px solid rgba(255,255,255,0.1); }
.btn-card-action.maps { background: #4285F4; color: white; }
.btn-card-action.maps:hover { background: #3367d6; }

/* --- Cloud Sync Indicator & Feedback --- */
.cloud-sync-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.cloud-sync-indicator:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.cloud-sync-indicator.syncing {
    color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    animation: syncPulse 1.5s infinite;
}

.cloud-sync-indicator.pending {
    color: #f97316; /* Naranja fuerte */
    border-color: rgba(249, 115, 22, 0.4);
}

.cloud-sync-indicator.success {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
}

.cloud-sync-indicator.error {
    color: #94a3b8; /* Slate grey/blue neutral */
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.04);
}

.cloud-sync-indicator.localhost-blocked {
    color: #ef4444; /* Rojo */
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
}

.cloud-sync-indicator.localhost-blocked:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.6);
}

.cloud-sync-indicator i {
    width: 14px;
    height: 14px;
}

@keyframes syncPulse {
    0% { box-shadow: 0 0 0 0 rgba(254, 208, 0, 0.2); }
    70% { box-shadow: 0 0 0 8px rgba(254, 208, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(254, 208, 0, 0); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Enhanced Sync Button in Profile */
.btn-sync-now {
    background: rgba(254, 208, 0, 0.1);
    color: var(--primary-yellow);
    border: 1px solid rgba(254, 208, 0, 0.2);
    padding: 1rem;
    border-radius: 1.2rem;
    font-weight: 800;
    font-size: 0.8rem;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.2s;
}

.btn-sync-now:hover {
    background: var(--primary-yellow);
    color: var(--bg-dark);
}

.sync-status-text {
    font-size: 0.6rem;
    opacity: 0.5;
    margin-top: 0.5rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}
/* --- Utility Classes for Zero Warning Status --- */
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; }
.u-flex-between { display: flex; justify-content: space-between; align-items: center; }
.u-flex-column { display: flex; flex-direction: column; }
.u-gap-05 { gap: 0.5rem; }
.u-gap-1 { gap: 1rem; }
.u-gap-15 { gap: 1.5rem; }
.u-mt-05 { margin-top: 0.5rem; }
.u-mt-1 { margin-top: 1rem; }
.u-mt-15 { margin-top: 1.5rem; }
.u-mt-2 { margin-top: 2rem; }
.u-mb-05 { margin-bottom: 0.5rem; }
.u-mb-1 { margin-bottom: 1rem; }
.u-mb-15 { margin-bottom: 1.5rem; }
.u-mb-2 { margin-bottom: 2rem; }
.u-text-center { text-align: center; }
.u-text-uppercase { text-transform: uppercase; }
.u-w-full { width: 100%; }
.u-opacity-05 { opacity: 0.5; }
.u-opacity-06 { opacity: 0.6; }
.u-font-small { font-size: 0.8rem; }
.u-font-tiny { font-size: 0.6rem; }
.u-bold { font-weight: 800; }
.u-tracking-wide { letter-spacing: 1px; }
.u-tracking-wider { letter-spacing: 2px; }

.u-color-yellow { color: var(--primary-yellow) !important; }
.u-color-white { color: white !important; }
.u-color-danger { color: var(--danger) !important; }
.u-color-blue { color: #60a5fa !important; }
.u-color-success { color: var(--success) !important; }
.u-color-muted { color: var(--text-muted) !important; }
.u-ml-10 { margin-left: 10px; }
.u-border-none { border: none !important; }
.u-bg-none { background: none !important; }
.u-hidden { display: none !important; }
.u-icon-14 { width: 14px !important; height: 14px !important; }
.u-icon-12 { width: 12px !important; height: 12px !important; }
.u-icon-18 { width: 18px !important; height: 18px !important; }
.u-w-full { width: 100% !important; }
.u-no-decoration { text-decoration: none !important; }
.u-cursor-pointer { cursor: pointer !important; }
.u-p-1 { padding: 1rem !important; }
.u-p-12 { padding: 1.2rem !important; }
.u-p-2 { padding: 2rem !important; }
.u-rounded-1 { border-radius: 1rem !important; }
.u-rounded-15 { border-radius: 1.5rem !important; }
.u-rounded-2 { border-radius: 2rem !important; }
.u-bg-glass { background: rgba(255,255,255,0.03) !important; border: 1px solid var(--border); }
.u-bg-dark { background: var(--bg-dark) !important; }
.u-lh-16 { line-height: 1.6 !important; }
.u-lh-14 { line-height: 1.4 !important; }

/* Specific fixes for remaining 118 */
.modal-header-flex { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 1rem; padding-right: 2.5rem; padding-top: 0.5rem; flex-wrap: wrap; gap: 0.5rem; }
.modal-title-input-fix { font-size: 1.4rem; width: 75%; min-width: 150px; }
.stats-badge-static { position: static; font-size: 1rem; }
.map-dot-1 { top: 20%; left: 30%; animation-delay: 0.5s; }
.map-dot-2 { top: 40%; left: 80%; animation-delay: 2.1s; }
.map-dot-3 { top: 60%; left: 70%; animation-delay: 1.2s; }

/* Final App.js Cleanup Utilities */
.u-grid-full { grid-column: 1 / -1 !important; }
.u-p-5-2 { padding: 5rem 2rem !important; }
.u-p-4-2 { padding: 4rem 2rem !important; }
.u-anim-1-5 { animation-duration: 1.5s !important; }
.u-anim-delay-1 { animation-delay: 1s !important; }
.u-ls-3 { letter-spacing: 3px !important; }
.u-fw-800 { font-weight: 800 !important; }
.u-fs-0-65 { font-size: 0.65rem !important; }
.u-fs-0-7 { font-size: 0.7rem !important; }
.u-fs-0-75 { font-size: 0.75rem !important; }
.u-fs-0-8 { font-size: 0.8rem !important; }
.u-icon-12 { width: 12px !important; height: 12px !important; }
.u-icon-14 { width: 14px !important; height: 14px !important; }
.u-w-100-h-100 { width: 100px !important; height: 100px !important; }
.u-mb-0-2 { margin-bottom: 0.2rem !important; }
.u-mb-1-5 { margin-bottom: 1.5rem !important; }
.u-mt-10px { margin-top: 10px !important; }
.u-gap-0-5 { gap: 0.5rem !important; }
.u-gap-0-8, .u-gap-08 { gap: 0.8rem !important; }
.action-buttons { display: flex !important; flex-direction: column !important; gap: 0.8rem !important; }
.u-grid-2col-08 { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 0.8rem !important; }
.u-flex-center-gap-05 { display: flex !important; align-items: center !important; gap: 0.5rem !important; }
.u-btn-google-maps { background: #003399 !important; color: white !important; border: none !important; padding: 8px 12px !important; border-radius: 2rem !important; font-weight: 800 !important; cursor: pointer !important; width: 100% !important; }
.u-point-flicker { top: 30% !important; left: 40% !important; animation: pointFlicker 0.5s infinite !important; }

/* Interest Level Classes for Dynamic Cards */
.interest-level-muted { color: #94a3b8 !important; border-color: rgba(148, 163, 184, 0.2) !important; }
.interest-level-green { color: #22c55e !important; border-color: rgba(34, 197, 94, 0.2) !important; }
.interest-level-gold { color: var(--primary-yellow) !important; border-color: rgba(254, 208, 0, 0.2) !important; }
.interest-level-red { color: #ef4444 !important; border-color: rgba(239, 68, 68, 0.2) !important; }

.progress-fill.muted { background: #94a3b8 !important; box-shadow: 0 0 10px rgba(148, 163, 184, 0.3) !important; }
.progress-fill.green { background: #22c55e !important; box-shadow: 0 0 10px rgba(34, 197, 94, 0.3) !important; }
.progress-fill.gold { background: var(--primary-yellow) !important; box-shadow: 0 0 10px rgba(254, 208, 0, 0.3) !important; }
.progress-fill.red { background: #ef4444 !important; box-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important; }

/* Final cleanup classes */
.u-bg-google { background: #4285F4 !important; color: white !important; }
.u-bg-red-dim { background: rgba(239, 68, 68, 0.1) !important; color: #ef4444 !important; border: 1px solid rgba(239, 68, 68, 0.2) !important; }
.u-bg-green-dim { background: rgba(34, 197, 94, 0.1) !important; color: #22c55e !important; border: 1px solid rgba(34, 197, 94, 0.2) !important; }
.u-bg-glass-card { background: rgba(255,255,255,0.02) !important; padding: 1.5rem !important; border-radius: 2rem !important; }
.u-bg-glass-card-border { background: rgba(255,255,255,0.03) !important; padding: 1rem !important; border-radius: 1.5rem !important; border: 1px solid var(--border) !important; }
.u-bg-glass-button { background: rgba(255,255,255,0.05) !important; padding: 0.8rem !important; border: 1px solid var(--border) !important; }
.u-avatar-wrap { height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; }
.u-img-cover { height: 100%; object-fit: cover; }
.u-backdrop-dim { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0.2) !important; }

/* --- AI Assistant Tab Styles --- */
.ai-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    max-height: 800px;
}

.ai-avatar-pulse {
    width: 50px;
    height: 50px;
    background: rgba(254, 208, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-yellow);
    box-shadow: 0 0 15px rgba(254, 208, 0, 0.2);
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 208, 0, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(254, 208, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(254, 208, 0, 0); }
}

.ai-chat-log {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Custom scrollbar for chat */
.ai-chat-log::-webkit-scrollbar { width: 4px; }
.ai-chat-log::-webkit-scrollbar-track { background: transparent; }
.ai-chat-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.chat-message {
    max-width: 85%;
    padding: 1rem 1.2rem;
    border-radius: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    animation: messageSlideIn 0.3s ease-out;
}

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

.chat-message.ai {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-message.user {
    background: var(--primary-blue);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.3rem;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3);
}

.ai-chips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: 0.8rem;
    transition: background 0.2s ease, border-color 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid transparent;
}

.ai-chips-header:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.ai-chips-header i {
    transition: transform 0.3s ease;
}

.ai-chips-header.expanded i {
    transform: rotate(180deg);
}

.ai-chips {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.ai-chip-btn, .map-chip-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.5rem 0.9rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ai-chip-btn i, .map-chip-btn i { width: 14px; height: 14px; color: var(--primary-yellow); }

.ai-chip-btn:hover, .map-chip-btn:hover {
    background: rgba(254, 208, 0, 0.1);
    border-color: var(--primary-yellow);
    transform: translateY(-2px);
}

.ai-input-area {
    display: flex;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.6rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    align-items: center;
}

.mic-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mic-btn:hover {
    background: rgba(254, 208, 0, 0.1);
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.mic-btn.listening {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    animation: micPulse 1.5s infinite;
}

@keyframes micPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.ai-input-area input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    outline: none;
    font-weight: 600;
    min-width: 0;
}

#ai-send-btn {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 50%;
}
.u-relative { position: relative !important; }
.u-static { position: static !important; }
.u-max-w-200 { max-width: 200px !important; }
.u-max-w-300 { max-width: 300px !important; margin: 1rem auto; line-height: 1.6; }
.u-text-orange { color: #fb923c !important; }

.u-m-05-0 { margin: 0.5rem 0 !important; }
.u-m-1-02 { margin: 1rem 0 0.2rem 0 !important; }
.u-p-08-1 { padding: 0.8rem 1rem !important; }
.u-border-yellow-p-1 { border-color: var(--primary-yellow) !important; padding: 0 1rem !important; }
.u-border-yellow { border-color: var(--primary-yellow) !important; }
.u-wrap { flex-wrap: wrap !important; }
.u-bg-glass-button-02 { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid var(--border) !important; }
.u-bg-dark-glass { background: rgba(0,0,0,0.3) !important; border: 1px solid var(--border) !important; }
.u-bg-dark-05 { background: rgba(15, 23, 42, 0.5) !important; border: 1px solid var(--border) !important; }
.u-bg-glass-card-02 { background: rgba(255,255,255,0.03) !important; border-radius: 1.2rem !important; }
.u-font-tiny-02 { font-size: 0.5rem !important; }
.u-font-giant { font-size: 2.5rem !important; }
.u-block { display: block !important; }
.u-text-left { text-align: left !important; }
.u-opacity-02 { opacity: 0.2 !important; }
.u-mt-04 { margin-top: 0.4rem !important; }
.u-icon-18 { width: 18px !important; height: 18px !important; }
.u-tracking-widest { letter-spacing: 4px !important; }
.u-anim-pulse { animation: pulseAnim 2s infinite !important; }
.u-opacity-07 { opacity: 0.7 !important; }
.u-opacity-08 { opacity: 0.8 !important; }
.u-lh-16 { line-height: 1.6 !important; }
/* --- AI Report Premium --- */
.ai-report-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 0.5rem;
    width: 100%;
}
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}
.report-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}
.report-badge.alto { background: #10b981; color: white; }
.report-badge.medio { background: #f59e0b; color: white; }
.report-badge.bajo { background: #ef4444; color: white; }

.report-prob { font-weight: 800; color: var(--primary-yellow); font-size: 0.9rem; }
.report-body p { font-size: 0.8rem; margin-bottom: 0.5rem; line-height: 1.4; }
.report-body i { width: 14px; height: 14px; margin-right: 0.3rem; vertical-align: middle; color: var(--primary-yellow); }
.report-footer { margin-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 0.4rem; text-align: right; }
.report-footer small { color: var(--text-muted); font-size: 0.6rem; font-style: italic; }

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 85px; /* Just below navbar */
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 350px;
    width: calc(100% - 40px);
}
.toast-notification {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary-yellow);
    padding: 12px 18px;
    border-radius: 1rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: var(--shadow-premium);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
}
.toast-notification.active {
    transform: translateX(0);
    opacity: 1;
}
.toast-notification.success {
    border-left-color: var(--success);
}
.toast-notification.error {
    border-left-color: var(--danger);
}
.toast-notification.warning {
    border-left-color: #f97316;
}
.toast-notification.info {
    border-left-color: #3b82f6;
}

/* --- ROUTE PLANNER WIDGET --- */
.route-planner-card {
    border-color: rgba(254, 208, 0, 0.25) !important;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.85) 100%) !important;
    transition: all 0.3s ease;
}
.route-stops-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}
.route-stops-list::-webkit-scrollbar {
    width: 4px;
}
.route-stops-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
.route-stop-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 0.8rem;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}
.route-stop-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(254, 208, 0, 0.2);
}
.route-stop-index {
    background: var(--primary-yellow);
    color: var(--bg-dark);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.route-stop-name {
    font-weight: 800;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin: 0 10px;
    text-align: left;
}
.route-stop-meta {
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}
.route-stop-prob {
    color: var(--primary-yellow);
    background: rgba(254, 208, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}
.route-stop-dist {
    opacity: 0.6;
}

/* Mic active status on Observations */
#modal-services-mic-btn.listening {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    animation: micPulse 1.5s infinite;
}

/* Route Map Path */
.leaflet-interactive.route-path-glowing {
    stroke: var(--primary-yellow);
    stroke-width: 4;
    stroke-dasharray: 8, 8;
    animation: routeDashOffset 20s linear infinite;
    filter: drop-shadow(0 0 4px var(--primary-yellow));
}
@keyframes routeDashOffset {
    to {
        stroke-dashoffset: -1000;
    }
}

/* --- Custom Utility & Hygiene Classes for MS Edge Tools Linter --- */
.u-gap-8px { gap: 8px !important; }
.u-mt-15px { margin-top: 15px !important; }
.u-mb-15px { margin-bottom: 15px !important; }
.u-mb-20px { margin-bottom: 20px !important; }
.u-w-half { width: 50% !important; }
.u-flex-center-gap-4 { display: flex !important; align-items: center !important; gap: 4px !important; }
.prompt-title-margin { margin: 10px 0 5px 0 !important; }
.btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--primary-yellow) !important;
    border: 1px solid rgba(254, 208, 0, 0.2) !important;
}
.btn-secondary:hover {
    background: rgba(254, 208, 0, 0.1) !important;
    border-color: var(--primary-yellow) !important;
}
.btn-mic-dictation { padding: 4px 8px !important; font-size: 10px !important; display: flex !important; align-items: center !important; gap: 4px !important; border-radius: 4px !important; }

/* --- Map AI Integrated Assistant styling --- */
.map-ai-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 4px 12px;
}
.map-ai-mic-btn {
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--primary-yellow) !important;
}
.map-ai-mic-btn.listening {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5) !important;
}
.map-ai-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.85rem !important;
    outline: none !important;
    padding: 8px 4px !important;
}
.map-ai-send-btn {
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.map-route-filter-select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 0 28px 0 12px !important;
    border-radius: 8px !important;
    outline: none !important;
    cursor: pointer !important;
    height: 34px !important;
    box-sizing: border-box !important;
    font-size: 0.75rem !important;
}
#optimize-route-btn {
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
.map-route-option {
    background: #121824 !important;
}
.u-icon-16 {
    width: 16px !important;
    height: 16px !important;
}

/* --- Diagnostic Logger --- */
.diagnostic-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    padding: 15px;
    z-index: 99999;
    font-family: monospace;
    font-size: 12px;
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diagnostic-close-btn {
    background: white;
    color: #ef4444;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    flex-shrink: 0;
}

/* --- iOS Safari: prevent zoom on input focus (no need for user-scalable=no) --- */
@supports (-webkit-touch-callout: none) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* --- Favoritos y Marcador Táctico ⭐ --- */
.modal-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888888;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.modal-star-btn:hover {
    transform: scale(1.15);
}
.modal-star-btn:active {
    transform: scale(0.95);
}
.modal-star-btn.active {
    color: #ffc107;
    filter: drop-shadow(0 0 6px rgba(255, 193, 7, 0.5));
}
.modal-star-btn.active svg {
    fill: currentColor;
}
.modal-star-btn svg {
    width: 26px;
    height: 26px;
    pointer-events: none;
}
.lead-card-star-active {
    display: inline-block;
    color: #ffc107;
    fill: #ffc107;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 4px;
    filter: drop-shadow(0 0 2px rgba(255,193,7,0.6));
}
.custom-star-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
    animation: marker-bounce 0.3s ease-out;
}
.custom-star-marker.collaborator-glow {
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 6px rgba(168, 85, 247, 0.6));
}
@keyframes marker-bounce {
    0% { transform: scale(0.5); }
    100% { transform: scale(1); }
}

/* --- Premium Table for Customer Portfolio (Bloque 16) --- */
.premium-table {
    margin-top: 1rem;
    width: 100%;
}
.premium-table th {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border);
    padding: 12px 10px;
}
.premium-table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    vertical-align: middle;
    color: var(--text-main);
}
.premium-table tr:hover td {
    background: rgba(255,255,255,0.01);
}
.client-badge-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    display: inline-block;
}
.client-badge-status.activo {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.client-badge-status.baja {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.client-badge-status.pendiente {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

/* --- B8GPS Add Lead Location Box --- */
.gps-status-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.8rem;
}
.gps-badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 2rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}
.gps-badge-status.no_location {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}
.gps-badge-status.gps_active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.2);
}
.gps-badge-status.map_center_active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}
.gps-badge-status.manual_active {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border-color: rgba(249, 115, 22, 0.2);
}

/* --- Badges de pestaña B8FIELD-05E --- */
.badge-tab-count {
    display: inline-block;
    background-color: var(--primary-yellow);
    color: var(--bg-dark);
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(254, 208, 0, 0.2);
    border: 1px solid rgba(254, 208, 0, 0.4);
    transition: all 0.2s ease;
}

.badge-tab-count.hidden {
    display: none !important;
}

.tab-link.active .badge-tab-count {
    background-color: var(--bg-dark);
    color: var(--primary-yellow);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* --- Segmented Toggle for Creation Modal (B8COL-04) --- */
.record-type-toggle-container {
    margin-bottom: 1.5rem;
}
.record-type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    padding: 0.3rem;
    gap: 0.3rem;
}
.type-toggle-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 0.9rem;
    border: none;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-muted);
}
.type-toggle-btn.active.prospect {
    background: var(--primary-yellow);
    color: var(--bg-dark);
    box-shadow: 0 4px 12px rgba(254, 208, 0, 0.15);
}
.type-toggle-btn.active.collaborator {
    background: #a855f7; /* Violet / Purple */
    color: white;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}
.type-toggle-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Color utilities for title */
.u-color-purple {
    color: #a855f7 !important;
}

/* Animations for conditional fields container */
.collaborator-fields-animation {
    animation: slideDownFade 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.map-ai-helper-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.3;
}
.map-ai-helper-desc svg {
    color: #3b82f6;
    flex-shrink: 0;
}

/* --- Radar de Noticias (B8NEWS-03B) --- */
.news-chip-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.news-chip-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.news-chip-btn.active {
    background: var(--primary-yellow);
    color: var(--bg-dark);
    border-color: var(--primary-yellow);
}

.news-card-premium {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 1.2rem;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.news-card-premium:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Bordes izquierdos temáticos por categoría */
.news-card-premium.seguridad { border-left: 4px solid #ef4444 !important; }
.news-card-premium.comercio { border-left: 4px solid #3b82f6 !important; }
.news-card-premium.movilidad { border-left: 4px solid #06b6d4 !important; }
.news-card-premium.eventos { border-left: 4px solid #f59e0b !important; }
.news-card-premium.industrial { border-left: 4px solid #f97316 !important; }

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.news-badge-cat {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
}
.news-badge-cat.seguridad { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.news-badge-cat.comercio { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.news-badge-cat.movilidad { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.news-badge-cat.eventos { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.news-badge-cat.industrial { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.3); }

.news-badge-relevance {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
}
.news-badge-relevance.alta { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.news-badge-relevance.media { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.news-badge-relevance.baja { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

.news-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.news-meta-row i {
    width: 12px;
    height: 12px;
}

.news-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: white;
    line-height: 1.3;
}

.news-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.news-utility-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 0.8rem;
    padding: 0.8rem;
    font-size: 0.75rem;
}

.news-utility-label {
    font-weight: 800;
    color: var(--primary-yellow);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

.news-phrase-quote {
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--primary-yellow);
    padding: 0.6rem;
    border-radius: 0 0.6rem 0.6rem 0;
    font-style: italic;
    font-size: 0.75rem;
    color: var(--text-main);
    position: relative;
    line-height: 1.4;
}

.news-copy-btn {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 0.4rem;
}

.news-copy-btn:hover {
    background: rgba(254, 208, 0, 0.1);
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Estilos para Candidatos Temporales - B8ZONE-03 */
.badge-status-premium.candidato {
    background: rgba(148, 163, 184, 0.1) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
}
.lead-card-premium.temp-candidate-card {
    border-left: 3px dashed #94a3b8 !important;
    background: rgba(255, 255, 255, 0.01) !important;
}
.lead-card-premium.temp-candidate-card:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Alineación de Badge de Versión en Login - B8SYNC-02A */
.login-version-badge-container {
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

.login-version-badge-container .version-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    margin-left: 0;
}

/* Franja de Resumen Diario - B8FIELD-UX-01B */
.stats-daily-strip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.2rem;
    padding: 1.2rem 1.5rem;
    margin-top: 25px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stats-daily-strip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.stats-daily-strip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stats-daily-strip-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stats-daily-strip-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}
.stats-daily-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Badge de Candidatos Detectados en Mapa/Zona - B8FIELD-UX-01B-R6 */
.stats-candidates-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: 0.8rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fef08a;
    transition: all 0.2s ease;
}
.stats-candidates-badge i {
    color: var(--primary-yellow);
}
.stats-candidates-badge.hidden {
    display: none !important;
}

/* --- Asistente Comercial Pro (B8AI-PRO-14) --- */
#assistant-central-card {
    border: 1px solid rgba(254, 208, 0, 0.15); /* Light yellow tint border */
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
    position: relative;
    z-index: 20; /* Elevate card stacking order so its absolute menu overlaps charts below */
    overflow: visible; /* To allow dropdown to overflow */
}

.assistant-dropdown-container {
    position: relative;
    display: inline-block;
}

.assistant-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000; /* Ensure it is above other elements */
    background: #1e293b;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    min-width: 260px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
}

.assistant-dropdown-menu.hidden {
    display: none !important;
}

.assistant-menu-item {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.2rem;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.assistant-menu-item:hover {
    background: rgba(254, 208, 0, 0.08);
    color: var(--primary-yellow);
}

.assistant-menu-item i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.assistant-menu-item:hover i {
    color: var(--primary-yellow);
}

#assistant-text-input:focus {
    border-color: var(--primary-yellow) !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

/* ==========================================================================
   CARTERA V2 - SCAFFOLD CLIENT PORTFOLIO (B8CARTERA-05A)
   ========================================================================== */

.cartera-v2-search-box-hybrid {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    width: 100%;
}

.cartera-v2-search-field-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cartera-v2-search-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.cartera-v2-search-select {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    min-width: 130px;
}

.cartera-v2-search-select:focus {
    border-color: var(--primary-yellow);
}

.cartera-v2-search-input-wrapper {
    flex: 1;
    min-width: 200px;
}

.cartera-v2-search-buttons-group {
    display: flex;
    gap: 8px;
}

.cartera-v2-btn-search {
    background: var(--primary-yellow) !important;
    color: #000 !important;
    font-weight: 700;
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 6px 12px;
    height: auto;
    border: none;
}

.cartera-v2-btn-search:hover {
    background: #e2c200 !important;
}

.cartera-v2-btn-clear-search {
    background: rgba(255,255,255,0.06) !important;
    color: var(--text-muted) !important;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 6px 12px;
    height: auto;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.cartera-v2-btn-clear-search:hover {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

.cartera-v2-filters-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.cartera-v2-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    width: 100%;
}

.cartera-v2-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.cartera-v2-filter-group label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cartera-v2-filter-group select, .cartera-v2-filter-group input {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 0.75rem;
    outline: none;
    width: 100%;
}

.cartera-v2-filter-group select:focus, .cartera-v2-filter-group input:focus {
    border-color: var(--primary-yellow);
}

.cartera-v2-autocomplete-container {
    position: relative;
    z-index: 1010;
}

.cartera-v2-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #111827;
    border: 1px solid var(--border);
    border-radius: 12px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    margin-top: 4px;
}

.cartera-v2-autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    transition: background 0.2s;
    background: #111827;
    color: #ffffff;
}

.cartera-v2-autocomplete-item:hover {
    background: rgba(254, 208, 0, 0.1);
    color: var(--primary-yellow);
}

.cartera-v2-autocomplete-item span.item-prov {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.cartera-v2-desktop-view {
    display: block;
}

.cartera-v2-mobile-view {
    display: none;
}

@media (max-width: 768px) {
    .cartera-v2-desktop-view {
        display: none;
    }
    .cartera-v2-mobile-view {
        display: block;
    }
}

.cartera-v2-premium-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.cartera-v2-premium-table th {
    padding: 12px 10px;
    border-bottom: 2px solid var(--border);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.cartera-v2-premium-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cartera-v2-premium-table tr {
    transition: background 0.2s ease;
}

.cartera-v2-premium-table tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

.cartera-v2-client-list-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cartera-v2-client-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary-yellow);
    border-radius: 16px;
    padding: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cartera-v2-client-card:hover {
    border-color: var(--primary-yellow);
    background-color: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.cartera-v2-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cartera-v2-card-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cartera-v2-card-title i {
    color: var(--primary-yellow);
    width: 14px;
    height: 14px;
}

.cartera-v2-card-cuenta-code {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.cartera-v2-card-details {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.cartera-v2-card-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cartera-v2-card-details i {
    width: 12px;
    height: 12px;
}

.cartera-v2-card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    margin-top: 4px;
}

.cartera-v2-card-action-text {
    font-size: 0.65rem;
    color: var(--primary-yellow);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.cartera-v2-status-container-desktop {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    padding: 2px 0;
    min-height: 74px; /* Reservar espacio exacto estable para hasta 3 badges apilados */
    box-sizing: border-box;
}

.cartera-v2-badge-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: #ffffff;
    text-align: center;
}

.cartera-v2-badge-status.activo {
    background: #22c55e;
}

.cartera-v2-badge-status.baja {
    background: #ef4444;
}

.cartera-v2-badge-status.otros {
    background: #3b82f6;
}

.cartera-v2-badge-activity {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cartera-v2-badge-activity.vivienda {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.2);
}

.cartera-v2-badge-activity.negocio {
    color: #fb923c;
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.2);
}

.cartera-v2-badge-count {
    background: rgba(254, 208, 0, 0.15);
    color: var(--primary-yellow);
    border: 1px solid rgba(254, 208, 0, 0.25);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
}

.cartera-v2-badge-warning-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
}

.cartera-v2-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cartera-v2-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.cartera-v2-modal-card {
    background: #111827;
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.cartera-v2-modal-overlay.active .cartera-v2-modal-card {
    transform: scale(1);
}

.cartera-v2-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cartera-v2-modal-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ffffff;
}

.cartera-v2-modal-header h3 span.cartera-v2-modal-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.cartera-v2-modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.cartera-v2-modal-close-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #ffffff;
}

.cartera-v2-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.cartera-v2-modal-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: 12px;
    margin: 15px 20px 0 20px;
    border: 1px solid var(--border);
}

.cartera-v2-tab-btn {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s;
}

.cartera-v2-tab-btn.active {
    background: rgba(254, 208, 0, 0.15);
    color: var(--primary-yellow);
}

.cartera-v2-tab-content {
    display: none;
}

.cartera-v2-tab-content.active {
    display: block;
}

.cartera-v2-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .cartera-v2-form-grid {
        grid-template-columns: 1fr;
    }
}

.cartera-v2-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.cartera-v2-form-group.cartera-v2-col-span-2 {
    grid-column: span 2;
}

@media (max-width: 480px) {
    .cartera-v2-form-group.cartera-v2-col-span-2 {
        grid-column: span 1;
    }
}

.cartera-v2-form-group label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cartera-v2-form-group input, .cartera-v2-form-group select, .cartera-v2-form-group textarea {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 0.8rem;
    outline: none;
    width: 100%;
}

.cartera-v2-form-group input:focus, .cartera-v2-form-group select:focus, .cartera-v2-form-group textarea:focus {
    border-color: var(--primary-yellow);
}

.cartera-v2-form-group input[readonly] {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.03);
}

.cartera-v2-alert-banner {
    border-radius: 12px;
    padding: 12px;
    font-size: 0.7rem;
    display: flex;
    gap: 8px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.cartera-v2-alert-banner.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.cartera-v2-alert-banner.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.cartera-v2-alert-banner.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.cartera-v2-alert-banner i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cartera-v2-contracts-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cartera-v2-accordion-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
}

.cartera-v2-accordion-header {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    transition: background 0.2s;
}

.cartera-v2-accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cartera-v2-accordion-title-block {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cartera-v2-accordion-subtitle {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cartera-v2-accordion-arrow {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.cartera-v2-accordion-item.active .cartera-v2-accordion-arrow {
    transform: rotate(180deg);
}

.cartera-v2-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 0 solid var(--border);
}

.cartera-v2-accordion-item.active .cartera-v2-accordion-body {
    max-height: 1000px;
    border-top: 1px solid var(--border);
}

.cartera-v2-accordion-content-inner {
    padding: 15px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cartera-v2-timeline {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}

.cartera-v2-timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: var(--border);
}

.cartera-v2-timeline-item {
    position: relative;
    margin-bottom: 15px;
}

.cartera-v2-timeline-dot {
    position: absolute;
    left: -19px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-yellow);
    border: 2px solid #111827;
}

.cartera-v2-timeline-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 700;
}

.cartera-v2-timeline-content {
    font-size: 0.72rem;
    background: rgba(255,255,255,0.015);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    line-height: 1.4;
    color: #ffffff;
}

.cartera-v2-preview-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0,0,0,0.2);
    margin-top: 10px;
    margin-bottom: 15px;
}

.cartera-v2-preview-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
}

.cartera-v2-preview-item:last-child {
    border-bottom: none;
}

.cartera-v2-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#dedup-warning-banner-v2 {
    display: none;
    animation: carteraV2FadeIn 0.2s ease-out;
}

@keyframes carteraV2FadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}


.mock-drag-drop-area {
    border: 2px dashed rgba(254, 208, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: rgba(255,255,255,0.01);
    transition: all 0.2s;
}

.mock-drag-drop-area.dragover {
    border-color: var(--primary-yellow) !important;
    background: rgba(254, 208, 0, 0.05) !important;
}
