/* assets/css/estilos.css - UNIVERSO SERVICEMOTORS (PANEL + LANDING) */

/* --- VARIABLES GLOBALES --- */
:root {
    /* --- PALETA DE COLORES MAESTRA (WHITE LABEL) --- */
    /* Cambiando estos 2 colores, cambia todo el sistema */
    --brand-primary: #2A61A8;  /* Azul Principal (Botones, enlaces, acentos) */
    --brand-header: #17355C;   /* Azul Oscuro (Barra superior, encabezados) */
    
    /* Variables de apoyo */
    --brand-secondary: #6c757d;
    --brand-success: #198754;
    --brand-danger: #dc3545;
    --brand-warning: #ffc107;
    --brand-light: #f8f9fa;
    --brand-dark: #212529;
}

/* --- BASE --- */
body { 
    background-color: #f4f6f9; 
    font-family: 'Open Sans', sans-serif; 
    padding-bottom: 80px; /* Espacio para que el botón flotante no tape contenido */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transición suave al cambiar tema */
}

.navbar { 
    background-color: var(--brand-header); 
    transition: background-color 0.3s ease;
}

/* --- COMPONENTE: TARJETAS ESTÁNDAR (Contenedores) --- */
.card-body { 
    padding: 25px; 
}

/* --- COMPONENTE: TARJETAS INTERACTIVAS (NUEVO) --- */
/* Úsalo para elementos clicables como Proveedores, Vehículos, etc. */
.card-interactive {
    background: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card-interactive:hover { 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
    transform: translateY(-2px);
}

.card-interactive:active { 
    transform: scale(0.98); 
}

/* --- INPUTS Y FORMULARIOS --- */
.form-label { 
    font-size: 0.75rem; 
    font-weight: 700; 
    color: #6c757d; 
    text-transform: uppercase; 
    margin-bottom: 0.3rem; 
}

.table-input { 
    border: 1px solid #eee; 
    padding: 8px 10px; 
    width: 100%; 
    border-radius: 6px; 
}

.table-input:focus { 
    border-color: var(--brand-primary); 
    outline: none; 
    background-color: #f8faff; 
}

/* --- ESTADOS FINANCIEROS (NUEVO) --- */
/* Semáforo visual para deudas y saldos */
.saldo-deuda { 
    color: #dc3545; 
    font-weight: 800; 
}

.saldo-ok { 
    color: #198754; 
    font-weight: 800; 
}

/* --- NAVEGACIÓN PESTAÑAS (NUEVO) --- */
/* Overrides de Bootstrap para unificar estilo */
.nav-pills .nav-link { 
    color: #666; 
    font-weight: 600; 
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-pills .nav-link.active { 
    background-color: var(--brand-header); 
    color: white; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* --- BOTÓN FLOTANTE (REFACTORIZADO) --- */
/* Mobile First: Grande y fácil de tocar */
.btn-float { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    z-index: 1050; /* Por encima de todo, incluso algunos modales */
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 24px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
    transition: transform 0.2s;
    border: none;
    color: white; /* Asegura ícono blanco */
}

.btn-float:active { 
    transform: scale(0.90); 
}

/* --- NAVBAR & MENU (Migrado de menu.php) --- */

/* 1. COLOR ACTIVO - DEFINICIÓN GLOBAL */
.active-link {
    color: #4093FF !important; /* Azul Claro Service */
    font-weight: 600;
}

/* Estilos Base (PC) */
.brand-logo-img { height: 24px; width: auto; transition: all 0.2s; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.dropdown-header-mobile { display: none; height: 24px !important; }

/* ESTILOS MÓVIL (Menor a 768px) */
@media (max-width: 768px) {
    
    /* LAYOUT DE 2 PISOS */
    .navbar-container {
        flex-direction: column;
        gap: 10px;
    }

    /* PISO 1: LOGO CENTRADO */
    .brand-logo-container {
        width: 100%;
        display: flex;
        justify-content: center; /* Centrado */
        align-items: center;     /* Alineación vertical */
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        position: relative; /* Para poder posicionar la flecha absoluta si fuera necesario */
    }
    
    /* AJUSTE TAMAÑO LOGO MÓVIL (Más chico) */
    .brand-logo-img { height: 24px !important; }

    /* PISO 2: CONTROLES */
    .nav-controls {
        width: 100%;
        justify-content: space-between;
    }

    /* MENÚ FULL SCREEN (Overlay) */
    .dropdown-menu.show {
        position: fixed;
        top: 0; 
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(23, 53, 92, 0.99) !important; /* Azul Sólido */
        border: none;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        z-index: 99999;
    }

    /* Enlaces del menú móvil (BLANCOS por defecto) */
    .dropdown-item {
        color: white !important;
        font-size: 1.4rem;
        padding: 15px 0;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        width: 80%;
    }
    
    /* CORRECCIÓN: SI ES EL ACTIVO, FORZAMOS AMARILLO EN MÓVIL TAMBIÉN */
    .dropdown-item.active-link {
        color: #ffde00 !important;
        background: transparent !important;
    }
    
    /* Logo dentro del menú desplegable */
    .dropdown-header-mobile { 
        display: block !important; 
        margin-bottom: 40px; 
        height: 24px !important; 
    }
}
/* --- BOTÓN VOLVER --- */
.btn-back-nav {
    color: white !important; /* Siempre blanco sobre la barra oscura */
    font-size: 1.1rem;
    text-decoration: none;
    margin-right: 10px; /* Espacio antes del Logo/Nombre */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

/* Efecto al tocar/pasar mouse (círculo semitransparente) */
.btn-back-nav:hover, 
.btn-back-nav:active {
    background-color: rgba(255, 255, 255, 0.15); 
    color: white;
}

/* --- MEJORAS PWA & WHITE LABEL MENU.php --- */

/* 1. SOPORTE NOTCH IPHONE (Safe Area) */
/* Esto baja el navbar para que no quede debajo de la cámara en iPhones */
.safe-area-padding {
    padding-top: env(safe-area-inset-top); 
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Aumentamos un poco la altura base para compensar */
    min-height: 60px; 
}

/* En móvil, ajustamos el contenedor del logo para que respete el notch */
@media (max-width: 768px) {
    .brand-logo-container {
        padding-top: 5px; /* Ajuste fino */
    }
}

/* 2. ESPACIADOR (Para compensar el navbar fixed-top) */
body {
    padding-top: 10px; /* Un poco de aire extra */
}

/* 3. LOGO TEXTO (Fallback cuando no hay imagen) */
.tracking-wide {
    letter-spacing: 1.5px;
}

/* === MODAL TÉRMINOS Y CONDICIONES (TyC) === */
.modal-bloqueo-equipo { 
    display: block !important; 
    background-color: rgba(0,0,0,0.95) !important; 
    z-index: 99999 !important; 
}
.caja-legal-equipo { 
    height: 300px; 
    overflow-y: scroll; 
    background: #f8f9fa; 
    border: 1px solid #dee2e6; 
    padding: 15px; 
    border-radius: 5px; 
    margin-bottom: 15px; 
    font-size: 0.9rem; 
    color: #333; 
}

/* === WIDGET DE CHAT FLOTANTE === */
/* 1. Contenedor Principal */
#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999; /* Z-Index altísimo para tapar todo */
    font-family: 'Open Sans', sans-serif;
}

/* 2. Botón Flotante */
#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
#chat-toggle-btn:active { transform: scale(0.95); }

/* 3. Ventana de Chat (Diseño PC) */
#chat-window {
    display: none;
    width: 360px;
    height: 500px;
    background: #efe7dd; /* Fondo clásico WhatsApp */
    border-radius: 12px;
    position: absolute;
    bottom: 80px;
    right: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ddd;
}

.chat-header { background-color: #008069; color: white; padding: 10px 15px; height: 60px; flex-shrink: 0; }
.chat-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.chat-footer { background: #f0f2f5; padding: 8px 10px; height: 60px; flex-shrink: 0; display: flex; align-items: center; }

/* 4. Burbujas de Mensaje */
.msg-bubble { 
    max-width: 85%; 
    padding: 6px 10px; 
    border-radius: 7px; 
    position: relative; 
    font-size: 0.9rem; 
    line-height: 1.3; 
    box-shadow: 0 1px 1px rgba(0,0,0,0.1); 
    word-wrap: break-word;
}

.msg-propio { align-self: flex-end; background-color: #d9fdd3; border-top-right-radius: 0; }
.msg-otro { align-self: flex-start; background-color: white; border-top-left-radius: 0; }

.msg-user { font-size: 0.75rem; font-weight: bold; color: #d66c04; display: block; margin-bottom: 2px; }
.msg-time { font-size: 0.65rem; color: #999; text-align: right; display: block; margin-top: 2px; float: right; margin-left: 8px;}

/* 5. Modo Móvil (Pantalla Completa Real) */
@media (max-width: 576px) {
    #chat-widget-container.full-mode {
        top: 0; left: 0; right: 0; bottom: 0;
        width: 100%; height: 100%;
    }
    
    #chat-window {
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100000;
    }

    #chat-toggle-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }
    
    /* Ajuste para evitar zoom en iPhone al escribir */
    #input-mensaje { font-size: 16px; } 
}

/* --- VISTA: CLIENTES Y LISTADOS --- */

/* 1. Logos de Marcas de Autos (Efecto sutil) */
.marca-logo { 
    width: 25px; 
    height: 25px; 
    object-fit: contain; 
    filter: grayscale(100%); 
    opacity: 0.6; 
}

/* 2. Barra de Filtrado Alfabético (A-Z) */
.az-bar { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 4px; 
    padding: 10px; 
    background: white; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

.btn-letter { 
    width: 32px; 
    height: 32px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    color: var(--brand-primary); 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
    text-decoration: none; 
    font-size: 0.85rem; 
    transition: all 0.2s; 
}

.btn-letter:hover, 
.btn-letter.active { 
    background-color: var(--brand-primary); 
    color: white; 
    border-color: var(--brand-primary); 
    transform: translateY(-2px); 
}

/* 3. Badge de Deudores (Rojo Alerta) */
.badge-deuda { 
    background-color: #fee2e2; 
    color: #dc2626; 
    border: 1px solid #fca5a5; 
    font-size: 0.7rem; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: 700; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
}

/* 4. Mini Estadísticas (Tarjetas superiores) */
.mini-stat { 
    border-left: 4px solid var(--brand-primary); 
    transition: transform 0.2s; 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.mini-stat:hover { 
    transform: translateY(-2px); 
    background-color: #f8faff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Estado ACTIVO (Cuando el filtro está seleccionado) */
.mini-stat.active-filter {
    background-color: #e3efff; /* Azul muy suave */
    border-color: var(--brand-primary);
    box-shadow: inset 0 0 0 1px var(--brand-primary);
}

/* Estado ACTIVO para Deudores (Rojo suave) */
.mini-stat.active-filter-danger {
    background-color: #fff5f5;
    border-color: #dc3545;
    box-shadow: inset 0 0 0 1px #dc3545;
}

/* Estado ACTIVO para Nuevos (Verde suave) */
.mini-stat.active-filter-success {
    background-color: #f0fdf4;
    border-color: #198754;
    box-shadow: inset 0 0 0 1px #198754;
}

/* --- KANBAN & PANEL.php --- */
.card-active { 
    background: white; border: none; border-radius: 12px; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); transition: transform 0.2s; 
    height: 100%; display: flex; flex-direction: column;
    border-top: 5px solid #ccc; position: relative;
}
.card-active:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card-body-custom { padding: 15px; flex: 1; }
.card-footer-custom { background: #f8f9fa; padding: 10px 15px; border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 12px 12px; }

/* Bordes de estado */
.border-presu { border-top-color: #6c757d; }
.border-espera { border-top-color: #ffc107; }
.border-taller { border-top-color: #0d6efd; }

/* LOGOS Y PATENTES */
.patente-link { text-decoration: none; display: inline-block; transition: transform 0.2s; }
.patente-link:hover { transform: scale(1.05); }

/* --- PATENTES ARGENTINAS REALISTAS (Final) --- */

.patente-old, .patente-mercosur {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: 42px;               /* Altura Realista Unificada */
    min-width: 130px;           /* Ancho estándar */
    border-radius: 6px;
    font-weight: bold;
    position: relative;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.25); /* Sombra realista 3D */
    text-transform: uppercase;
    cursor: default;
    user-select: none;
    box-sizing: border-box;
    line-height: 1;
    transition: transform 0.2s;
}
.patente-old:hover, .patente-mercosur:hover {
    transform: scale(1.02); /* Efecto sutil al pasar el mouse */
}

/* =========================================
   1. MODELO VIEJO (1995-2016)
   ========================================= */
.patente-old {
    /* DEGRADADO DE 3 FRANJAS:
       1. 0% a 30%: Blanco (Cabecera)
       2. 30% a 92%: Negro (Cuerpo)
       3. 92% a 100%: Blanco (Pie fino) */
    background: linear-gradient(to bottom, 
        #f4f4f4 0%, #f4f4f4 30%, 
        #111 30%, #111 92%, 
        #f4f4f4 92%, #f4f4f4 100%
    );
    
    color: #fff;                 /* Letras Blancas */
    border: 1px solid #bbb;      /* Borde gris metálico */
    font-family: 'Courier New', Courier, monospace; /* Tipografía Monoespaciada */
    font-size: 1.6rem;           /* Texto Grande */
    letter-spacing: 2px;
    padding-top: 10px;           /* Bajamos el texto para centrarlo en la parte negra */
    text-shadow: 0 0 3px rgba(255,255,255,0.6); /* Efecto relieve/brillo en letras */
}

/* Palabra "ARGENTINA" en la franja superior */
.patente-old::before {
    content: 'ARGENTINA';
    position: absolute;
    top: 3px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #5ea9dd; /* Celeste suave */
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: none;
}

/* =========================================
   2. MODELO MERCOSUR (2016-Presente)
   ========================================= */
.patente-mercosur {
    background: #fff;            /* Fondo Blanco */
    color: #111;                 /* Letras Negras */
    border: 1px solid #111;      /* Borde Negro fino */
    font-family: 'Arial', sans-serif; /* Tipografía Moderna (FE-Schrift simil) */
    font-size: 1.6rem;
    letter-spacing: 1.5px;
    padding-top: 14px;           /* Bajamos el texto para dejar lugar a la franja azul */
}

/* Franja Azul Superior */
.patente-mercosur::before {
    content: 'REPÚBLICA ARGENTINA';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 14px;                /* Altura franja azul */
    background: #003399;         /* Azul Oficial Mercosur */
    color: #fff;
    font-size: 6px;
    display: flex;
    align-items: center;
    justify-content: center;     /* Centrado */
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 5px 5px 0 0;  /* Redondeado solo arriba */
    z-index: 1;
}

/* Bandera Argentina (Derecha Superior) */
.patente-mercosur::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 4px;
    width: 14px;
    height: 9px;
    /* Dibujamos la bandera con gradientes */
    background: linear-gradient(to bottom, #75AADB 33%, #fff 33%, #fff 66%, #75AADB 66%);
    border: 0.5px solid rgba(255,255,255,0.3);
    z-index: 2;
}

.marca-logo-img { 
    width: 30px;       /* Tamaño fijo chico */
    height: 30px;      /* Tamaño fijo chico */
    object-fit: contain; 
    filter: grayscale(100%); 
    opacity: 0.7; 
    transition: all 0.2s; 
    cursor: pointer; 
}

/* Efecto al pasar el mouse */
.marca-logo:hover, 
.marca-logo-img:hover { 
    filter: grayscale(0%); 
    opacity: 1; 
    transform: scale(1.1); 
}

/* TAGS INTELIGENTES (Km, Nafta, Daños) */
.smart-tag { font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; background: #f0f2f5; color: #555; display: inline-flex; align-items: center; gap: 4px; border: 1px solid #e1e4e8; font-weight: 600; }

/* ACORDEÓN MENSUAL */
.mes-card { border: none; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); margin-bottom: 20px; background: white; overflow: hidden; }
.mes-header { background: var(--brand-header); color: white; padding: 12px 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }

/* BUSCADOR PRO */
.search-pro-container { background: white; padding: 12px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* MOBILE RESPONSIVE CARDS (Para tablas) */
@media (max-width: 768px) {
    .table-mobile-cards thead { display: none; }
    .table-mobile-cards tr { 
        display: flex; flex-direction: column; 
        background: white; margin-bottom: 15px; 
        border-radius: 15px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); 
        border: 1px solid #eef0f3; overflow: hidden;
    }
    .table-mobile-cards td { display: block; padding: 15px; border: none; }
    .td-header-mobile { background: #f8f9fa; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
    .td-body-mobile { padding: 15px; }
    .td-footer-mobile { background: white; padding: 12px 15px; border-top: 1px dashed #e0e0e0; display: flex; justify-content: space-between; align-items: center; }
}

/* --- CALENDARIO PREMIUM --- */

/* 1. Botón Flotante con Animación */
.hover-scale { transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.hover-scale:hover { transform: scale(1.1); }

/* 2. FullCalendar Limpio */
.fc { font-family: 'Open Sans', sans-serif; }
.fc-toolbar-title { font-size: 1.2rem !important; font-weight: 800; color: var(--brand-header); text-transform: capitalize; }
.fc-button { border-radius: 8px !important; font-weight: 600 !important; text-transform: capitalize; font-size: 0.85rem !important; }
.fc-button-primary { background-color: white !important; color: #555 !important; border: 1px solid #eee !important; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.fc-button-active, .fc-button-primary:hover { background-color: #f8f9fa !important; color: var(--brand-primary) !important; border-color: var(--brand-primary) !important; }

/* 3. Grilla y Días */
.fc-theme-standard td, .fc-theme-standard th { border-color: #f1f3f5 !important; }
.fc-col-header-cell-cushion { color: #888; text-decoration: none; font-size: 0.75rem; text-transform: uppercase; padding: 10px 0 !important; }
.fc-daygrid-day-number { color: #444; font-weight: 600; text-decoration: none; }
.fc-day-today { background-color: #f0f7ff !important; /* Azul muy muy suave */ }

/* 4. Eventos (Turnos) - Estilo "Pill" */
.fc-event {
    border: none !important;
    background-color: var(--brand-primary);
    border-radius: 6px !important;
    padding: 3px 8px !important;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.15);
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.1s;
}
.fc-event:hover { transform: scale(1.02); filter: brightness(1.1); }
.fc-event-time { font-weight: 400; opacity: 0.8; margin-right: 5px; }
.fc-event-title { font-weight: 700; }

/* 5. Ajuste Móvil */
@media (max-width: 768px) {
    .fc-header-toolbar { flex-direction: column; gap: 10px; }
    .fc-toolbar-chunk { display: flex; justify-content: space-between; width: 100%; }
}

/* 1. DÍAS GRANDES (Recuperado) */
.dia-grande { 
    font-size: 1.6rem; 
    font-weight: 800; 
    color: var(--brand-header); 
    line-height: 1; 
    text-align: center;
    width: 100%;
}

/* 2. ESTILO OPORTUNIDADES IA (Mejorado) */
.ia-item {
    border-left: 4px solid #ffc107; /* Borde amarillo warning */
    margin-bottom: 8px;
    background: white;
    transition: all 0.2s;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ia-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* --- NUEVA ORDEN & FORMULARIOS --- */

/* 1. Tarjetas de Formulario */
.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}
.form-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-header);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f5f5f5;
    padding-bottom: 10px;
}

/* 2. Slider de Combustible (Visual) */
.fuel-range {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #dc3545 0%, #ffc107 50%, #198754 100%);
    outline: none;
    margin: 15px 0;
}
.fuel-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    border: 4px solid var(--brand-primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 3. Autocomplete (Resultados de búsqueda) */
.search-results-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    display: none; /* Oculto por defecto */
}
.search-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.2s;
}
.search-item:hover { background-color: #f0f7ff; }
.search-item strong { color: var(--brand-primary); }

/* 4. Switch Checkbox Grande (PWA friendly) */
.form-check-input-lg {
    transform: scale(1.3);
    margin-right: 10px;
    margin-top: 5px;
}
/* --- SERVICIOS RÁPIDOS --- */
.tag-servicio {
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e0e0e0;
    background: white;
    color: #555;
}

.tag-servicio:hover {
    transform: translateY(-2px);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: white;
}

/* Estado activo (cuando lo clickeas via JS o :active) */
.tag-servicio.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: white !important;
}

/* --- PACKS DE TRABAJO (White Label) --- */
.pack-option {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 5px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pack-option:hover {
    border-color: var(--brand-primary);
    background-color: var(--brand-light);
    transform: translateY(-2px);
}

.pack-option.selected {
    border: 2px solid var(--brand-primary);
    background-color: #f0f7ff; /* Azul muy suave */
    color: var(--brand-header);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.pack-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
    color: var(--brand-secondary);
}

.pack-option.selected .pack-icon {
    color: var(--brand-primary);
}

/* CHECKBOXES SUGERIDOS */
.smart-check {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
    transition: background 0.2s;
}
.smart-check:hover { background-color: #f9f9f9; }

/* El input nativo se agranda para dedos */
.smart-check .form-check-input {
    transform: scale(1.3);
    margin-right: 15px;
    cursor: pointer;
}

.smart-check label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

/* --- ESTANDARIZACIÓN & TABLAS --- */
.table-responsive.scroll-lg {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
}

/* Fix para modales en móvil */
.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 1rem);
}

/* Badges más legibles */
.badge-clean {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

/* =========================================================
   NUEVOS ESTILOS PARA ESTANDARIZAR Y MEJORAS GLOBALES
   ========================================================= */

/* 1. Contenedores Generales (Tablas, Buscadores) */
.card-box { 
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* Sombra suave y moderna */
    border: none; 
    overflow: hidden; 
    margin-bottom: 20px; 
    transition: transform 0.2s;
}

/* 2. Cabeceras Profesionales (Barras azules oscuras con título) */
.card-header-pro { 
    background: var(--brand-header); 
    color: white; 
    padding: 15px 20px; 
    font-weight: 700; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* 3. Pestañas estilo iPhone (Para Estandarizar) */
.nav-pills .nav-link { 
    color: #555; 
    font-weight: 700; 
    background: white; 
    border: 1px solid #eee; 
    margin-right: 6px; 
    border-radius: 50px; 
    padding: 8px 20px; 
    font-size: 0.9rem; 
    margin-bottom: 5px; 
    transition: all 0.3s;
}

.nav-pills .nav-link.active { 
    background-color: var(--brand-primary); 
    color: white; 
    border-color: var(--brand-primary); 
    box-shadow: 0 4px 10px rgba(42, 97, 168, 0.3); 
    transform: translateY(-1px);
}

/* 4. Buscador Móvil Inteligente (Para el Modal Vincular) */
.mobile-search-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 0 0 10px 10px; /* Redondeado abajo */
    background: white;
    display: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.mobile-search-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-search-item:hover, .mobile-search-item.active {
    background-color: #f0f7ff;
    color: var(--brand-primary);
    padding-left: 20px; /* Efecto de movimiento al elegir */
    transition: padding 0.2s;
}

.mobile-search-item small {
    font-size: 0.75rem;
    color: #888;
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- 5. COMPONENTES BI DASHBOARD (Estructura Base) --- */
/* En modo claro se verán blancos, en modo oscuro tomarán el color dark */
.card-bi {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.card-bi:hover { transform: translateY(-3px); }

.bi-icon {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 1.5rem;
}
.bg-income { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.bg-profit { background-color: rgba(34, 197, 94, 0.1); color: #10b981; }

.alert-bi-card {
    border-left: 5px solid;
    background: #fff;
    color: #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.alert-bi-card.danger { border-left-color: #ef4444; }
.alert-bi-card.warning { border-left-color: #f59e0b; }
.alert-icon-box {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0;
}
.cursor-help { cursor: help; transition: transform 0.2s; }
.cursor-help:hover { transform: scale(1.02); }

/* Gradiente de texto Intelligence */
.brand-text-gradient {
    font-weight: 800; letter-spacing: 1px;
    background: linear-gradient(90deg, #2A61A8, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- FOOTER SIEMPRE ABAJO (Sticky Footer) --- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ocupa al menos el 100% de la altura de la pantalla */
}

.container {
    flex: 1; /* Empuja el footer hacia abajo si hay poco contenido */
}

/* Opcional: Ajuste visual para el footer */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e9ecef;
}

/* =========================================================
   6. DARK MODE (MODO OSCURO) - CONTROL TOTAL
   Este bloque se activa SOLO cuando el body tiene la clase .dark-mode
   ========================================================= */

body.dark-mode {
    background-color: #0f172a !important; /* Azul Noche Profundo */
    color: #cbd5e1 !important;
}

/* --- NAVBARS --- */
body.dark-mode .navbar,
body.dark-mode .navbar-intelligence {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}
body.dark-mode .navbar-brand, 
body.dark-mode .nav-link {
    color: #e2e8f0 !important;
}

/* --- TARJETAS Y CONTENEDORES --- */
body.dark-mode .card, 
body.dark-mode .card-body,
body.dark-mode .card-header,
body.dark-mode .form-card, 
body.dark-mode .modal-content,
body.dark-mode .list-group-item,
body.dark-mode .dropdown-menu,
body.dark-mode .search-results-list,
body.dark-mode .card-box {  /* Tu caja personalizada */
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* --- BI DASHBOARD ESPECÍFICOS EN DARK --- */
body.dark-mode .card-bi {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #fff !important;
}
body.dark-mode .alert-bi-card {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
    border: 1px solid #334155 !important;
}
body.dark-mode .brand-text-gradient {
    background: linear-gradient(90deg, #38bdf8, #818cf8); /* Gradiente neón para oscuro */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- TEXTOS --- */
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode .text-dark,
body.dark-mode strong,
body.dark-mode .fw-bold {
    color: #fff !important;
}
body.dark-mode .text-muted,
body.dark-mode .small,
body.dark-mode .text-secondary {
    color: #94a3b8 !important;
}
body.dark-mode .form-title {
    color: #60a5fa !important;
    border-bottom-color: #334155;
}
body.dark-mode .bg-light, 
body.dark-mode .bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

/* --- INPUTS --- */
body.dark-mode .form-control, 
body.dark-mode .form-select,
body.dark-mode .input-group-text {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #fff !important;
}
body.dark-mode .form-control:focus {
    background-color: #0f172a !important;
    border-color: #60a5fa !important;
}

/* --- TABLAS --- */
body.dark-mode .table,
body.dark-mode .table-dark-custom {
    --bs-table-color: #e2e8f0;
    --bs-table-bg: #1e293b;
    --bs-table-border-color: #334155;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}
body.dark-mode .table thead th {
    background-color: #0f172a !important;
    color: #fff !important;
    border-bottom: 1px solid #334155 !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #e2e8f0 !important;
}

/* --- PACKS NUEVA ORDEN --- */
body.dark-mode .pack-option {
    background-color: #1e293b;
    border-color: #334155;
}
body.dark-mode .pack-option:hover { background-color: #334155; }
body.dark-mode .pack-option.selected {
    background-color: #1e3a8a !important;
    border-color: #60a5fa !important;
    color: #fff !important;
}
body.dark-mode .pack-option .pack-icon { color: #94a3b8; }
body.dark-mode .pack-option.selected .pack-icon { color: #60a5fa !important; }

/* --- MODAL CLOSE --- */
body.dark-mode .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* =========================================================
   7. ESTILOS EXCLUSIVOS LANDING PAGE PÚBLICA (servicemotors.com.ar)
   ========================================================= */

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(33, 37, 41, 0.85), rgba(33, 37, 41, 0.85)), url('../img/bg-inicio.jpg') center/cover;
    color: white;
    padding: 120px 0 80px 0;
    text-align: center;
}

/* Navbar Front-End */
.navbar-custom { background-color: var(--brand-header) !important; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.nav-link { font-weight: 600; color: #ffffff !important; opacity: 0.85; transition: 0.2s; }
.nav-link:hover { opacity: 1; transform: translateY(-1px); }
.card-box-top-blue { border-top: 4px solid var(--brand-primary); }

/* Nueva clase para reemplazar los textos negros por el Azul Institucional */
.text-brand-header { color: var(--brand-header) !important; }

/* Estilos del Turnero Público (Pills) */
.time-slot { border: 2px solid #e9ecef; border-radius: 12px; cursor: pointer; transition: 0.2s; text-align: center; padding: 12px 5px; font-weight: bold; color: #6c757d; display: block; font-size: 0.9rem;}
.time-slot:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: #f8fbff; }
.time-slot input { display: none; }
.time-slot:has(input:checked) { border-color: var(--brand-primary); background-color: var(--brand-primary); color: white; }

/* Botón Flotante WhatsApp Público */
.float-wa { position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px; background-color: #25d366; color: white; border-radius: 50%; text-align: center; font-size: 30px; box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.float-wa:hover { background-color: #128c7e; color: white; transform: scale(1.1); }

/* --- TIPOGRAFÍA CORPORATIVA (ServiceMotors) --- */
.sm-title, 
.nav-link,
.btn-nav-clientes {
    font-family: 'Open Sans', sans-serif !important;
    font-stretch: 75% !important; /* SemiCondensed */
    font-style: italic !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
}

/* --- PERSONALIZACIÓN DE BOTONES BLANCOS (HOVER) --- */
.btn-outline-light:hover, 
.btn-outline-light:active {
    background-color: #ffffff !important;
    color: var(--brand-header) !important; /* Las letras se ponen Azul Oscuro Institucional */
    border-color: #ffffff !important;
    transform: translateY(-2px); /* Pequeño saltito de interacción */
}

/* Si preferís que las letras del hover sean del azul más claro, 
   cambiá var(--brand-header) por var(--brand-primary) en la línea de arriba */