/* ============================================================
   DIRECTORIO DE DISTRIBUIDORES - ESTILOS COMPLETOS Y RESPONSIVOS
   ============================================================ */
:root {
    --bg-page: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --whatsapp: #25d366;
    --whatsapp-dark: #128c7e;
    --danger: #ef4444;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   HEADER & NAVBAR
   ============================================================ */
.app-header {
    background: #0f172a;
    color: #ffffff;
    padding: 14px 24px;
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

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

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Country switch tabs */
.country-switch {
    display: flex;
    background: #1e293b;
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid #334155;
    gap: 4px;
}

.country-btn {
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.country-btn:hover {
    color: #ffffff;
}

.country-btn.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.country-btn .flag {
    font-size: 1.1rem;
}

/* Header button */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ============================================================
   TOOLBAR & FILTERS BAR
   ============================================================ */
.toolbar-section {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 24px;
    box-shadow: var(--shadow-sm);
}

.toolbar-container {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-group {
    flex: 1;
    min-width: 260px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-group .search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 1.05rem;
    pointer-events: none;
}

.search-input-group input {
    width: 100%;
    padding: 10px 14px 10px 42px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.search-input-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.select-wrapper {
    position: relative;
    min-width: 190px;
}

.select-wrapper select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: var(--bg-surface);
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.select-wrapper select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-clear {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.btn-clear:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* ============================================================
   MAIN SPLIT LAYOUT (SIDEBAR + MAP)
   ============================================================ */
.main-layout {
    max-width: 1560px;
    margin: 0 auto;
    width: 100%;
    padding: 16px 24px;
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 20px;
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
}

/* Left Sidebar */
.sidebar-pane {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

.pane-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.count-badge {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid #bfdbfe;
}

.pane-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.cards-list-container {
    padding: 16px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

/* Right Map Pane */
.map-pane {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: relative;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: flex;
}

#mapView {
    width: 100%;
    height: 100% !important;
    min-height: 100%;
    z-index: 1;
}

/* ============================================================
   DISTRIBUTOR CARD STYLES
   ============================================================ */
.distribuidor-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.distribuidor-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.distribuidor-card.active-card {
    border-color: var(--primary);
    background: #f8fbff;
    box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.card-company {
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-actions {
    display: flex;
    gap: 4px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface-alt);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-icon:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-icon.delete-btn:hover {
    background: #fee2e2;
    color: var(--danger);
    border-color: #fca5a5;
}

.card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.meta-tag {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 5px;
}

.state-tag {
    background: #e2e8f0;
    color: #334155;
}

.email-tag {
    background: #f1f5f9;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Multi-city coverage section */
.card-cities-section {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-sm);
    padding: 9px 12px;
}

.cities-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cities-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.city-chip {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.city-chip.empty {
    background: #f1f5f9;
    color: var(--text-muted);
    border: none;
    font-style: italic;
}

/* Card footer buttons */
.card-footer-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.btn-card {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-tel {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.btn-tel:hover {
    background: var(--primary);
    color: #ffffff;
}

.btn-wa {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.btn-wa:hover {
    background: var(--whatsapp);
    color: #ffffff;
}

.btn-locate {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-locate:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* ============================================================
   MAP PINS & POPUPS
   ============================================================ */
.custom-map-pin .pin-marker {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: 3px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.custom-map-pin .pin-marker i {
    transform: rotate(45deg);
    color: #ffffff;
    font-size: 1rem;
}

.map-popup-card {
    padding: 4px;
    min-width: 220px;
}

.map-popup-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.map-popup-card .popup-empresa {
    font-size: 0.82rem;
    color: #475569;
    margin-bottom: 4px;
}

.map-popup-card .popup-state {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 8px;
}

.popup-cities {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

.popup-cities strong {
    display: block;
    font-size: 0.74rem;
    color: #475569;
    margin-bottom: 4px;
}

.popup-cities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.popup-city-tag {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
}

.popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.popup-btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.76rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   EMPTY & LOADING STATES
   ============================================================ */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 12px;
}

.empty-state i {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   MODAL DIALOG & MULTI-CITY TAGS
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes modalSlide {
    from { transform: translateY(20px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

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

.form-row {
    display: flex;
    gap: 14px;
}

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

.col-6 {
    flex: 1;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Multi-city inputs */
.city-input-wrap {
    display: flex;
    gap: 8px;
}

.btn-add-tag {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0 16px;
    border-radius: var(--radius-md);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-add-tag:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.cities-tags-box {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    min-height: 42px;
    padding: 8px 10px;
    background: var(--bg-surface-alt);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
}

.city-tag-editable {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.city-tag-editable button {
    background: transparent;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fafafa;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================================
   RESPONSIVE DESIGN (TABLETS & PHONES)
   ============================================================ */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    .map-pane {
        height: 420px;
        order: 1;
    }
    .sidebar-pane {
        height: 540px;
        order: 2;
    }
}

@media (max-width: 680px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
    }
    .header-actions {
        justify-content: space-between;
    }
    .country-switch {
        flex: 1;
    }
    .country-btn {
        flex: 1;
        justify-content: center;
    }
    .toolbar-container {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .select-wrapper {
        min-width: 100%;
    }
    .form-row {
        flex-direction: column;
    }
}

/* ============================================================
   CITIES CHECKLIST STYLES (MODAL)
   ============================================================ */
.cities-checklist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.cities-checklist-header label {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.checklist-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn-link-action {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.btn-link-action:hover {
    color: var(--primary-hover);
}

.cities-checkbox-list {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    max-height: 180px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.cities-placeholder-msg {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.city-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--text-secondary);
    user-select: none;
    transition: var(--transition);
}

.city-checkbox-item:hover {
    border-color: var(--primary);
    background: #f0f7ff;
}

.city-checkbox-item.checked {
    background: #eff6ff;
    border-color: #93c5fd;
    color: var(--primary);
    font-weight: 600;
}

.city-checkbox-item input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.custom-city-adder {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.custom-city-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================================
   AUTOCOMPLETE RECOMMENDATIONS DROPDOWN
   ============================================================ */
.search-input-group {
    position: relative;
}

.search-autocomplete-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1050;
    padding: 6px 0;
}

.search-autocomplete-dropdown.open {
    display: block;
}

.autocomplete-section-title {
    padding: 6px 14px 4px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}

.autocomplete-item {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: background 0.15s ease;
}

.autocomplete-item:hover, .autocomplete-item.active {
    background: #eff6ff;
    color: var(--primary);
}

.autocomplete-item .item-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.item-icon.icon-distribuidor {
    background: #dbeafe;
    color: #1d4ed8;
}

.item-icon.icon-negocio {
    background: #fef3c7;
    color: #b45309;
}

.item-icon.icon-estado {
    background: #e0e7ff;
    color: #4338ca;
}

.item-icon.icon-ciudad {
    background: #dcfce7;
    color: #15803d;
}

.item-icon.icon-telefono {
    background: #fce7f3;
    color: #be185d;
}

.autocomplete-item .item-texts {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.autocomplete-item .item-primary {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.autocomplete-item .item-secondary {
    font-size: 0.74rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-highlight {
    background: #fef08a;
    font-weight: 700;
    color: #854d0e;
    border-radius: 2px;
    padding: 0 2px;
}
