/* ---- ESTRUCTURA GENERAL ---- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
}

.main-content {
    flex-grow: 1;
    /* Hace que el contenido principal ocupe el espacio disponible */
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* ---- HEADER ---- */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: #0056b3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo i {
    font-size: 28px;
}

.sistema-nombre {
    display: inline-block;
    vertical-align: middle;
}

/* ---- NAVEGACIÓN ---- */
.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    height: 100%;
}

.main-nav li {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px 5px;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
}

.main-nav a:hover,
.dropdown:hover>a {
    color: #007bff;
}

.user-info {
    color: #555;
    font-style: italic;
}

.user-info i {
    margin-right: 5px;
}

a.btn-logout {
    background-color: #dc3545;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
}

a.btn-logout:hover {
    background-color: #c82333;
    color: white;
}

/* ---- MENÚ DESPLEGABLE (Dropdown) ---- */
.dropdown {
    position: relative;
}


.dropdown-content {
    display: none !important;
    position: absolute;
    background-color: #ffffff !important;
    /* Fondo blanco opaco */
    opacity: 1 !important;
    /* Opacidad completa */
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    /* Sombra más pronunciada */
    z-index: 1000;
    /* Z-index más alto */
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    border-radius: 5px;
    flex-direction: column;
    left: 0;
    top: 100%;
    border: 1px solid #e0e0e0;
    /* Borde sutil */
}

.dropdown-content li {
    margin: 0;
    background-color: transparent;
    /* Los li no necesitan fondo, solo los enlaces */
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff !important;
    /* Fondo blanco opaco para cada enlace */
    opacity: 1 !important;
    /* Opacidad completa */
}

.dropdown-content a:hover {
    background-color: #f1f1f1 !important;
    /* Fondo gris claro al pasar el mouse */
    opacity: 1 !important;
}

.dropdown:hover>.dropdown-content,
.dropdown:focus-within>.dropdown-content {
    display: block !important;
}

/* ---- ESTILO ESPECIAL PARA MENÚ DE OPCIONES ---- */
.nav-options {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
    border-radius: 6px;
    padding: 8px 15px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-options:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ---- ESTILO ESPECIAL PARA MENÚ DE ADMINISTRACIÓN ---- */
.nav-admin {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
    color: white !important;
    border-radius: 6px;
    padding: 8px 15px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-admin:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.nav-options i,
.nav-admin i {
    margin-right: 8px;
}

/* Mejoras para dropdown de opciones */
.dropdown-content {
    min-width: 220px;
}

.dropdown-header {
    font-weight: bold;
    color: #6c757d;
    padding: 8px 16px 4px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.dropdown-divider {
    height: 0;
    margin: 5px 0;
    overflow: hidden;
    border-top: 1px solid #e9ecef;
}

/* Iconos en el menú dropdown */
.dropdown-content a i {
    width: 16px;
    margin-right: 10px;
    color: #6c757d;
    font-size: 14px;
}

.dropdown-content a:hover i {
    color: #007bff;
    transform: scale(1.1);
}

/* ---- ESTILOS ADICIONALES PARA TARJETAS DEL PANEL DE CONTROL ---- */
.card-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.card-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.card-primary .card-icon,
.card-secondary .card-icon {
    background-color: rgba(255, 255, 255, 0.2);
}

.card-primary .card-content,
.card-secondary .card-content {
    color: white;
}

.card-primary .card-footer,
.card-secondary .card-footer {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.card-primary .card-footer:hover,
.card-secondary .card-footer:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* ---- FOOTER ---- */
.main-footer {
    background-color: #343a40;
    color: #f8f9fa;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

.footer-container p {
    margin: 5px 0;
}

/* ---- FORMULARIOS CRUD ---- */
.form-crud {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.form-crud .form-group {
    margin-bottom: 15px;
}

.form-crud label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-crud input[type="text"],
.form-crud input[type="number"],
.form-crud input[type="date"],
.form-crud select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* ---- BOTONES ---- */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    cursor: pointer;
    border: none;
    font-size: 16px;
    margin-right: 10px;
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* ---- ALERTAS ---- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* ---- Estilos para las páginas CRUD ---- */
.page-header {
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.action-buttons {
    margin-bottom: 20px;
}

/* ---- TABLAS CRUD ---- */
.table-crud {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table-crud th,
.table-crud td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.table-crud thead {
    background-color: #f2f2f2;
    color: #333;
    font-weight: bold;
}

.table-crud tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.table-crud tbody tr:hover {
    background-color: #e9ecef;
}

/* ---- Botones de acciones en la tabla ---- */
.table-crud td a.btn-icon,
.table-crud td button.btn-icon {
    display: inline-block;
    margin-right: 5px;
    padding: 5px 8px;
    color: white;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}

.btn-edit {
    background-color: #ffc107;
    color: #212529;
}

.btn-edit:hover {
    background-color: #e0a800;
    color: #212529;
}

.btn-delete {
    background-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
}

.btn-view {
    background-color: #17a2b8;
}

.btn-view:hover {
    background-color: #138496;
}

.btn-disabled {
    background-color: #6c757d;
    /* Gris */
    color: #fff;
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-disabled:hover {
    background-color: #6c757d;
    opacity: 0.5;
}


/* ---- Insignias de Estado (Badges) ---- */
.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-transform: capitalize;
}

.status-disponible {
    background-color: #28a745;
    /* Verde */
}

.status-en-ruta {
    background-color: #17a2b8;
    /* Azul claro */
}

.status-mantenimiento {
    background-color: #fd7e14;
    /* Naranja */
}

.status-inactivo {
    background-color: #6c757d;
    /* Gris */
}

/* ---- Alertas Genéricas (ya definidas, pero por si acaso) ---- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.form-crud fieldset {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-crud legend {
    padding: 0 10px;
    font-weight: bold;
    color: #0056b3;
}

.text-muted {
    color: #6c757d;
    font-style: italic;
}

.form-crud small.text-muted {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}


.form-crud .form-check {
    display: flex;
    align-items: center;
    padding-top: 10px;
}

.form-crud .form-check-input {
    width: auto;
    margin-right: 10px;
}

.form-crud .form-check-label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-crud textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
}

/* ---- ESTILOS PARA FORMULARIOS EXTENDIDOS ---- */
.form-section {
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #ffffff;
}

.form-section legend {
    background-color: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 8px 15px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 250px;
}

.form-group-wide {
    flex: 2 !important;
    min-width: 300px;
}

.form-crud input[type="tel"],
.form-crud input[type="email"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding: 20px 0;
    border-top: 1px solid #e1e5e9;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ---- BADGES PARA MODALIDAD DE VEHÍCULOS ---- */
.badge-modalidad {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.modalidad-vinculado {
    background-color: #17a2b8;
}

.modalidad-propio {
    background-color: #28a745;
}

.modalidad-contratista {
    background-color: #ffc107;
    color: #333;
}

/* ---- BOTONES DE ACCIÓN EN TABLAS ---- */
.actions-cell {
    min-width: 120px;
}

.action-buttons-group {
    display: flex;
    gap: 5px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.btn-docs {
    background-color: #17a2b8 !important;
    color: white !important;
}

.btn-docs:hover {
    background-color: #138496 !important;
    transform: scale(1.1);
}

/* ---- SECCIÓN DE ACCESO A DOCUMENTACIÓN ---- */
.documentation-access-section {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 2px solid #e1e5e9;
}

.doc-access-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.doc-access-header h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 600;
}

.doc-access-header h3 i {
    color: #17a2b8;
    margin-right: 10px;
}

.doc-access-description {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.doc-access-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.btn-docs-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-docs-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: white;
    text-decoration: none;
}

.doc-access-info {
    max-width: 500px;
}

.doc-access-info small {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .doc-access-card {
        padding: 20px 15px;
    }

    .btn-docs-large {
        padding: 12px 20px;
        font-size: 14px;
    }
}


.status-solicitada {
    background-color: #ffc107;
    color: #333;
}

.status-programada {
    background-color: #007bff;
}

.status-en-curso {
    background-color: #17a2b8;
}

.status-completada {
    background-color: #28a745;
}

.status-cancelada {
    background-color: #dc3545;
}


/* ---- ESTILOS DEL DASHBOARD ---- */
.dashboard .lead {
    color: #666;
    margin-top: -10px;
}

.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 30px -15px;
}

/* Tarjetas de Estadísticas */
.dashboard-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    margin: 15px;
    padding: 20px;
    position: relative;
    color: #fff;
    overflow: hidden;

    /* --- LÍNEA CORREGIDA Y MEJORADA --- */
    /* Le decimos que crezca un poco (1), que se encoja si es necesario (1),
       y que su tamaño base sea calculado para que quepan aproximadamente 5 por fila.
       calc(20% - 30px) significa: 20% del ancho del contenedor (100% / 5 tarjetas)
       menos 30px para compensar los márgenes (15px a cada lado). */
    flex: 1 1 calc(20% - 30px);

    /* Añadimos un ancho mínimo para que en pantallas más pequeñas no se aplasten demasiado */
    min-width: 120px;
}

.dashboard-card .card-icon {
    font-size: 48px;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.card-content {
    z-index: 2;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.card-number {
    font-size: 36px;
    font-weight: 300;
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.15);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 5px 0;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
}

.card-footer:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Colores de las tarjetas */
.card-blue {
    background-color: #007bff;
}

.card-green {
    background-color: #28a745;
}

.card-orange {
    background-color: #fd7e14;
}

.card-purple {
    background-color: #6f42c1;
}

.card-red {
    background-color: #dc3545;
}

.card-teal {
    background-color: #20c997;
}

.card-indigo {
    background-color: #6610f2;
}

.card-pink {
    background-color: #e83e8c;
}

.card-cyan {
    background-color: #17a2b8;
}

/* Paneles (para listas y contenido más denso) */
.dashboard-panel {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin: 15px;
    flex: 1 1 300px;
}

.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
}

.panel-body {
    padding: 20px;
    flex-grow: 1;
}

/* Lista de estados de órdenes */
.status-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.status-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-list li:last-child {
    border-bottom: none;
}

.status-count {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Lista de próximos servicios */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-date {
    background-color: #f2f2f2;
    border-radius: 5px;
    padding: 5px;
    text-align: center;
    margin-right: 15px;
    width: 50px;
}

.service-date .day {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.service-date .month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

.service-details {
    flex-grow: 1;
}

.service-details .service-route {
    display: block;
    font-weight: bold;
    color: #333;
}

.service-details .service-client {
    display: block;
    font-size: 14px;
    color: #777;
}

.service-link {
    font-size: 20px;
    color: #007bff;
    text-decoration: none;
}

.service-link:hover {
    color: #0056b3;
}

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



/* ---- Menú de Informes ---- */
.report-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.report-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.3s, transform 0.3s;
}

.report-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.report-card.disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.report-card.disabled:hover {
    box-shadow: none;
    transform: none;
}

.report-icon {
    font-size: 40px;
    color: #007bff;
    margin-bottom: 15px;
}

.report-card.disabled .report-icon {
    color: #adb5bd;
}

.report-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.report-description {
    font-size: 14px;
    line-height: 1.5;
}

/* ---- Formularios de Filtros ---- */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.filter-form .form-group {
    margin-bottom: 0;
}

/* ---- Filtros Horizontales ---- */
.filter-form-horizontal {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    min-width: 120px;
    flex: 1;
}

.filter-field label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.filter-field input,
.filter-field select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.filter-field input:focus,
.filter-field select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-buttons .btn-primary,
.filter-buttons .btn-secondary {
    padding: 8px 16px;
    font-size: 14px;
    white-space: nowrap;
}

/* Responsivo para filtros */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
    }

    .filter-field {
        width: 100%;
        min-width: auto;
    }

    .filter-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* ---- Resultados de Informes ---- */
.report-results {
    margin-top: 30px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
}

.report-results h3 {
    margin-top: 0;
}

.text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}


/*
========================================
ESTILOS PARA LA LANDING PAGE (index.php)
========================================
*/

/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #005a9c;
    /* Un azul corporativo */
    --secondary-color: #ffc107;
    /* Un acento amarillo/dorado */
    --dark-color: #333;
    --light-color: #f4f4f4;
}

html {
    scroll-behavior: smooth;
}

body.landing-page {
    /* Podríamos añadir una clase al body en index.php si fuera necesario para evitar conflictos */
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.landing-section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 60px;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.lead {
    font-size: 1.2rem;
    color: #666;
}

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

/* --- Header y Navegación de la Landing --- */
.landing-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.landing-header .logo {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.main-nav-landing ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav-landing li {
    margin-left: 30px;
}

.main-nav-landing a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s;
}

.main-nav-landing a:hover {
    color: var(--primary-color);
}

.btn-login {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
    background-color: #004b82;
    transform: translateY(-2px);
}

/* --- Sección Hero --- */
#hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1570125909517-52651c0936f9?q=80&w=2070&auto=format&fit=crop');
    /* Imagen genérica de bus */
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.btn-hero {
    background-color: var(--secondary-color);
    color: var(--dark-color);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s;
}

.btn-hero:hover {
    background-color: #e0a800;
    transform: scale(1.05);
}

/* --- Sección Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 20px;
}

/* --- Sección Flota --- */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.fleet-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.fleet-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.fleet-card h3 {
    margin: 20px 20px 10px 20px;
}

.fleet-card p {
    padding: 0 20px 20px 20px;
}

/* --- Sección Compromiso --- */
.commitment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.commitment-item i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.commitment-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* --- Sección Contacto --- */
#contact .contact-info {
    margin-top: 30px;
    font-size: 18px;
}

#contact .contact-info p {
    margin-bottom: 10px;
}

#contact .contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

#contact .contact-info a {
    color: var(--dark-color);
    text-decoration: none;
}

#contact .contact-info a:hover {
    color: var(--primary-color);
}

/* --- Footer --- */
.landing-footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 20px 0;
    text-align: center;
}

.landing-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: #fff;
    margin-left: 15px;
    font-size: 20px;
    text-decoration: none;
}


/*
========================================
ESTILOS PARA LA PÁGINA DE LOGIN (login.php)
========================================
*/
.login-page-body {
    font-family: 'Poppins', sans-serif;
    background-image: linear-gradient(rgba(0, 90, 156, 0.8), rgba(0, 90, 156, 0.8)), url('https://images.unsplash.com/photo-1544620347-c4fd4a3d5957?q=80&w=1887&auto=format&fit=crop');
    /* Imagen genérica de bus en carretera */
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-logo a {
    color: var(--primary-color, #005a9c);
    font-size: 32px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 10px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.login-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.login-form .input-group {
    position: relative;
    margin-bottom: 20px;
}

.login-form .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.login-form input[type="email"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 12px 12px 45px;
    /* Padding izquierdo para dejar espacio al icono */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color, #005a9c);
    box-shadow: 0 0 0 2px rgba(0, 90, 156, 0.2);
}

.btn-login-submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color, #005a9c);
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login-submit:hover {
    background-color: #004b82;
}

.login-footer {
    margin-top: 30px;
}

.login-footer a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--primary-color, #005a9c);
}

.login-footer i {
    margin-right: 5px;
}

/* Reutilizamos la alerta de error que ya teníamos, pero aseguramos que funcione bien aquí */
.login-box .alert.alert-danger {
    text-align: left;
    margin-bottom: 20px;
}


/* --- Estilos para la Paginación --- */
.pagination-nav {
    text-align: center;
    margin-top: 30px;
}

.pagination {
    display: inline-block;
    padding-left: 0;
    list-style: none;
    border-radius: 4px;
}

.pagination li {
    display: inline;
}

.pagination li a {
    position: relative;
    float: left;
    padding: 8px 16px;
    margin-left: -1px;
    line-height: 1.42857143;
    color: #007bff;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #ddd;
}

.pagination li:first-child a {
    margin-left: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.pagination li:last-child a {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.pagination li a:hover {
    z-index: 2;
    color: #0056b3;
    background-color: #eee;
    border-color: #ddd;
}

.pagination .active a,
.pagination .active a:hover {
    z-index: 3;
    color: #fff;
    cursor: default;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-generate-fuec {
    background-color: #17a2b8;
}

/* Cian */
.btn-view-fuec {
    background-color: #6f42c1;
}

/* Púrpura */

/* ---- Estilos para Informes y Estadísticas ---- */
.report-results {
    margin-top: 30px;
}

.report-header {
    margin-bottom: 25px;
}

.stats-summary {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    min-width: 140px;
    flex: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.report-actions {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Responsive para estadísticas */
@media (max-width: 768px) {
    .stats-summary {
        flex-direction: column;
    }

    .stat-card {
        min-width: 100%;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-field {
        min-width: 100%;
        margin-bottom: 15px;
    }
}

/* Estilos para estados en reportes */
.status-badge.status-solicitada {
    background-color: #6c757d;
}

.status-badge.status-programada {
    background-color: #007bff;
}

.status-badge.status-en_curso {
    background-color: #fd7e14;
}

.status-badge.status-completada {
    background-color: #28a745;
}

.status-badge.status-cancelada {
    background-color: #dc3545;
}

/* ---- Sistema de Documentación ---- */
.alert-summary {
    margin-bottom: 30px;
}

.documentation-menu,
.documentation-reports {
    margin: 40px 0;
}

.documentation-menu h2,
.documentation-reports h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.critical-documents {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.critical-section {
    margin-bottom: 30px;
}

.critical-section h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-success {
    color: #28a745 !important;
}

.table-danger td {
    background-color: #f5c6cb;
    border-color: #f1b0b7;
}

.table-warning td {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

/* Variaciones de tarjetas de estadísticas */
.stat-card.stat-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.stat-card.stat-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.stat-card.stat-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.stat-card.stat-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

/* Documentación específica */
.doc-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-status-vigente {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.doc-status-vencido {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.doc-status-por-vencer {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.doc-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.doc-upload-area:hover {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
}

.doc-upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
    transform: scale(1.02);
}

.compliance-meter {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.compliance-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.compliance-fill.high {
    background-color: #28a745;
}

.compliance-fill.medium {
    background-color: #ffc107;
}

.compliance-fill.low {
    background-color: #dc3545;
}

/* Estilos adicionales para documentación */
.vehicle-info,
.documentation-summary,
.documents-list,
.missing-documents {
    margin: 30px 0;
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-card {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    flex: 1;
}

.compliance-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.document-checklist {
    display: grid;
    gap: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
}

.checklist-content h4 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
}

.checklist-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

.checklist-action {
    margin-left: 20px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875em;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #dee2e6;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background: #e9ecef;
    border-left-color: var(--primary-color);
    transform: translateX(2px);
}

@media (max-width: 768px) {
    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .checklist-action {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ---- MODAL STYLES ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.25rem;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #000;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* ---- FILE UPLOAD STYLES ---- */
.file-upload-area {
    margin-top: 10px;
}

.drag-drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.drag-drop-zone:hover,
.drag-drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(0, 86, 179, 0.05);
}

.drag-drop-content {
    color: #6c757d;
}

.drag-drop-content i {
    color: #dee2e6;
    margin-bottom: 15px;
}

.drag-drop-content h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.drag-drop-content p {
    margin: 5px 0;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

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

.file-requirements {
    margin-top: 15px;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    border-left: 4px solid #2196f3;
}

.file-requirements small {
    color: #1976d2;
}

/* File Preview Styles */
.file-preview {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background-color: #fff;
}

.preview-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-info i {
    font-size: 2rem;
    margin-right: 15px;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2px;
}

.file-size {
    font-size: 0.875rem;
    color: #6c757d;
}

.btn-remove {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.btn-remove:hover {
    background-color: #c82333;
}

/* Upload Progress Styles */
.upload-progress {
    margin-top: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Form Styles for Modal */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
}

/* Alert Styles for Modal */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Modo edición del modal */
.modal-content.edit-mode .modal-header {
    background-color: #fff3cd;
    border-bottom: 1px solid #ffeaa7;
}

.modal-content.edit-mode .modal-header h3 {
    color: #856404;
}

.file-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    margin-top: 5px;
    padding: 4px 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.file-link:hover {
    background-color: var(--primary-color);
    color: white;
}

.file-link i {
    margin-right: 5px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .drag-drop-zone {
        padding: 30px 15px;
    }

    .preview-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-remove {
        align-self: flex-end;
    }
}

/* ========================================
   SISTEMA DE DOCUMENTACIÓN FLEXIBLE
   Estilos para el nuevo sistema de documentos
   ======================================== */

/* Estados de documentos */
.doc-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-status-vigente {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.doc-status-por_vencer,
.doc-status-por-vencer {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.doc-status-vencido {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.doc-status-sin_vencimiento,
.doc-status-sin-vencimiento {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #ced4da;
}

/* Lista de documentos requeridos */
.document-checklist {
    display: grid;
    gap: 15px;
    margin-top: 15px;
}

.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.checklist-content {
    flex: 1;
}

.checklist-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.checklist-content p {
    margin: 0 0 8px 0;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
}

.checklist-action {
    margin-left: 15px;
}

/* Badges para documentos */
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

/* Información del vehículo/entidad */
.vehicle-info {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
}

.vehicle-info h2 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-card {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.info-card strong {
    display: block;
    color: #495057;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

/* Resumen de documentación */
.documentation-summary {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
}

.documentation-summary h2 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid;
}

.stat-card.stat-info {
    background-color: #e3f2fd;
    border-color: #2196f3;
    color: #1565c0;
}

.stat-card.stat-success {
    background-color: #e8f5e8;
    border-color: #4caf50;
    color: #2e7d32;
}

.stat-card.stat-warning {
    background-color: #fff8e1;
    border-color: #ff9800;
    color: #ef6c00;
}

.stat-card.stat-danger {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Medidor de cumplimiento */
.compliance-section h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.compliance-meter {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.compliance-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.compliance-fill.high {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.compliance-fill.medium {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.compliance-fill.low {
    background: linear-gradient(90deg, #dc3545, #e74c3c);
}

/* Lista de documentos */
.documents-list {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e6ed;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e6ed;
}

.section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

/* Documentos faltantes */
.missing-documents {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e6ed;
}

.missing-documents h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.missing-documents p {
    margin: 0 0 15px 0;
    color: #6c757d;
}

/* Mejorar filas de tabla con color */
.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Botones específicos para documentos */
.btn-delete {
    background-color: #dc3545;
    color: white;
}

.btn-delete:hover {
    background-color: #c82333;
}

.btn-view {
    background-color: #17a2b8;
    color: white;
}

.btn-view:hover {
    background-color: #138496;
}

/* ===== ESTILOS PARA MINIATURAS DE IMÁGENES ===== */
.image-thumbnail {
    position: relative;
    display: inline-block;
    margin: 5px 0;
}

/* Estilos para miniaturas - Especificidad alta */
.table-crud .document-cell .thumbnail-image,
.thumbnail-image {
    width: 80px !important;
    height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
}

/* FORZAR VISIBILIDAD DE BOTONES - ALTA PRIORIDAD */
.table-crud td a.btn-icon,
.table-crud td button.btn-icon,
button.btn-icon,
a.btn-icon {
    display: inline-block !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    border: none !important;
    margin: 2px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    text-align: center !important;
    line-height: 32px !important;
    font-size: 14px !important;
    background-color: #6c757d !important;
    color: white !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10 !important;
}

/* COLORES ESPECÍFICOS PARA BOTONES */
.table-crud td .btn-edit,
.btn-edit {
    background-color: #007bff !important;
}

.table-crud td .btn-edit:hover,
.btn-edit:hover {
    background-color: #0056b3 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.table-crud td .btn-delete,
.btn-delete {
    background-color: #dc3545 !important;
}

.table-crud td .btn-delete:hover,
.btn-delete:hover {
    background-color: #a71e2a !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.table-crud td .btn-view,
.btn-view {
    background-color: #28a745 !important;
}

.table-crud td .btn-view:hover,
.btn-view:hover {
    background-color: #1e7e34 !important;
    transform: scale(1.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.table-crud .document-cell .thumbnail-image:hover,
.thumbnail-image:hover {
    border-color: var(--primary-color) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.image-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay i {
    font-size: 1.5rem;
}

/* Estilos para la presentación mejorada de documentos */
.document-cell {
    padding: 8px 0;
}

.document-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.document-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.document-details {
    flex: 1;
}

.document-description {
    margin-left: 32px;
    /* Alineado con el texto del encabezado */
}

.document-thumbnail-section {
    margin-left: 32px;
    /* Alineado con el texto del encabezado */
    margin-top: 8px;
}

/* Modal para vista de imagen ampliada */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s ease;
}

.image-modal-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.image-modal-close:hover,
.image-modal-close:focus {
    color: #bbb;
}

.image-modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* Indicador de imagen válida/inválida */
.image-status-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-valid {
    background: #28a745;
}

.status-warning {
    background: #ffc107;
}

.status-expired {
    background: #dc3545;
}

/* Grupo de miniaturas */
.thumbnails-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.thumbnail-container {
    position: relative;
}

.thumbnail-actions {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-container:hover .thumbnail-actions {
    opacity: 1;
}

.thumbnail-btn {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.thumbnail-btn:hover {
    background: rgba(0, 0, 0, 1);
}

.thumbnail-btn.btn-replace {
    background: #ffc107;
}

.thumbnail-btn.btn-replace:hover {
    background: #e0a800;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: translateY(-50%) scale(0.7);
        opacity: 0;
    }

    to {
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
}

/* Responsivo para documentación */
@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .checklist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .checklist-action {
        margin-left: 0;
        align-self: stretch;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Responsive para miniaturas */
    .thumbnail-image {
        width: 60px;
        height: 60px;
    }

    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }

    .image-modal-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    .image-modal-info {
        bottom: 10px;
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .thumbnails-group {
        gap: 8px;
    }
}

/* Estilos para vista de documento */
.documento-vista {
    padding: 15px;
}

.documento-vista h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

.documento-info {
    margin-bottom: 20px;
}

.info-row {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
}

.info-row strong {
    display: inline-block;
    min-width: 140px;
    color: #34495e;
}

.documento-acciones {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
}

.documento-acciones button {
    margin: 0 5px;
}

/* Estilos mejorados para modal de imagen */
.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.image-modal-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.image-modal-actions {
    display: flex;
    gap: 8px;
}

.btn-modal {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-modal:hover {
    background: #0056b3;
}

.image-modal-details {
    margin-top: 10px;
}

.document-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.info-label {
    font-weight: bold;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    color: #2c3e50;
}

.image-modal-image {
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

/* Responsive para modal */
@media (max-width: 768px) {
    .document-info-grid {
        grid-template-columns: 1fr;
    }

    .image-modal-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

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

/* Estilos para miniaturas en tabla de documentos */
.miniatura-column {
    width: 80px;
    text-align: center;
    padding: 8px !important;
}

.thumbnail-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.document-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.document-thumbnail:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.file-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid #e9ecef;
    width: 60px;
    height: 60px;
    justify-content: center;
}

.file-icon {
    font-size: 24px;
    color: #dc3545;
    margin-bottom: 2px;
}

.file-type {
    font-size: 10px;
    font-weight: bold;
    color: #6c757d;
    text-transform: uppercase;
}

.no-file-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px dashed #dee2e6;
}

.no-file-container i {
    font-size: 20px;
    color: #adb5bd;
}

/* Asegurar que la tabla se vea bien con miniaturas */
.table-crud {
    table-layout: auto;
}

.table-crud td {
    vertical-align: middle;
}

/* Responsive para miniaturas */
@media (max-width: 768px) {
    .miniatura-column {
        width: 50px;
    }

    .document-thumbnail,
    .file-icon-container,
    .no-file-container {
        width: 40px;
        height: 40px;
    }

    .file-icon {
        font-size: 18px;
    }

    .file-type {
        font-size: 8px;
    }
}

/* ======================================================== */
/* NUEVOS ESTILOS PARA SISTEMA DE DOCUMENTACIÓN EN DASHBOARD */
/* ======================================================== */

/* Alertas de documentación */
.alert-section {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Mejoras para las tarjetas del dashboard */
.dashboard-card {
    position: relative;
    overflow: visible;
}

.card-alert {
    font-size: 11px;
    color: #dc3545;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-subtitle {
    font-size: 11px;
    color: #6c757d;
    margin-top: 2px;
}

/* Estilos para las nuevas tarjetas de documentación */
.dashboard-card.card-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.dashboard-card.card-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.dashboard-card.card-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.dashboard-card.card-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

/* Panel de documentos críticos */
.panel-full-width {
    grid-column: 1 / -1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.critical-docs-section {
    margin-bottom: 25px;
}

.critical-docs-title {
    font-size: 16px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.critical-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.critical-doc-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #ffc107;
    transition: transform 0.2s, box-shadow 0.2s;
}

.critical-doc-card.expired {
    border-left-color: #dc3545;
    background: #fef8f8;
}

.critical-doc-card.expiring {
    border-left-color: #ffc107;
    background: #fffcf0;
}

.critical-doc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.doc-entity {
    font-weight: bold;
    color: #495057;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-type {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.doc-status {
    margin-bottom: 10px;
}

.doc-actions {
    text-align: right;
}

.critical-doc-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Badges y elementos de estado */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

/* Alertas en el header de navegación */
.nav-docs {
    position: relative;
}

.alert-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-alerts {
    position: relative;
}

.alert-count {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 6px;
    min-width: 16px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 6px 0;
}

.dropdown-content li a {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Botones mejorados */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline-dark {
    color: #495057;
    border-color: #495057;
}

.btn-outline-dark:hover {
    background: #495057;
    color: white;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
}

.btn-outline-success:hover {
    background: #28a745;
    color: white;
}

.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info:hover {
    background: #17a2b8;
    color: white;
}

.btn-link {
    color: #007bff;
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
}

.btn-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Utilidades de texto */
.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-primary {
    color: #007bff !important;
}

.text-info {
    color: #17a2b8 !important;
}

.ml-2 {
    margin-left: 8px;
}

/* Estilos para widgets de cumplimiento */
.compliance-stats {
    margin-bottom: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f3f4;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 13px;
    color: #495057;
}

.stat-value {
    font-weight: bold;
    font-size: 14px;
}

/* Menú de accesos rápidos */
.quick-access-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-access-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s;
    border-left: 3px solid #007bff;
}

.quick-access-item:hover {
    background: #e9ecef;
    color: #007bff;
    transform: translateX(3px);
}

.quick-access-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.quick-access-item span {
    font-size: 13px;
    font-weight: 500;
}

/* Mejoras para los botones de acción en tablas */
.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 120px;
}

.action-buttons-sm {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 80px;
}

.btn-icon {
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
}

.btn-duplicate {
    background: #6c757d;
    color: white;
}

.btn-duplicate:hover {
    background: #545b62;
}

.btn-deactivate {
    background: #ffc107;
    color: #212529;
}

.btn-deactivate:hover {
    background: #e0a800;
}

.btn-activate {
    background: #28a745;
    color: white;
}

.btn-activate:hover {
    background: #1e7e34;
}

/* Estilo para códigos de tipos de documentos */
.codigo-tipo {
    font-weight: bold;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
}

.codigo-tipo i {
    width: 16px;
    text-align: center;
}

/* Responsive para tablets */
@media (max-width: 992px) {
    .critical-docs-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .dashboard-row {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .critical-docs-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .critical-docs-title {
        font-size: 14px;
    }

    .critical-doc-card {
        padding: 12px;
    }

    .alert-badge {
        position: static;
        margin-left: 6px;
    }
}

/* ========================================
   ESTILOS PARA FORMULARIOS DE CONDUCTORES
   ======================================== */

/* Contenedor principal del formulario */
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Título principal con icono */
.container-fluid h1 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #007bff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.container-fluid h1 i {
    color: #007bff;
    font-size: 1.2em;
}

/* Alertas personalizadas */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
}

/* Botones mejorados */
.btn {
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Tarjetas del formulario */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 20px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary-dark, #0056b3) 100%);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.card-header.bg-dark {
    background: linear-gradient(135deg, #343a40 0%, #212529 100%) !important;
}

.card-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    padding: 25px;
    background: #fff;
}

/* Inputs y controles de formulario */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fff;
    transform: translateY(-1px);
}

.form-control:hover,
.form-select:hover {
    border-color: #007bff;
    background-color: #fff;
}

/* Textarea especial */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Inputs numéricos */
input[type="number"].form-control {
    text-align: center;
    font-weight: 600;
}

/* Validación visual */
.was-validated .form-control:valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.18-.18L4.5 4.5l2.02 2.05.18.18.35-.35L6.87 6.2l.18-.18L4.5 3.48 1.95 6.03l.18.18.35.35z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6h.4L6 6.6z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Mensajes de validación */
.invalid-feedback {
    display: block;
    font-size: 0.875em;
    font-weight: 500;
    color: #dc3545;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #f8d7da;
    border-radius: 5px;
    border-left: 3px solid #dc3545;
}

.valid-feedback {
    display: block;
    font-size: 0.875em;
    font-weight: 500;
    color: #28a745;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #d4edda;
    border-radius: 5px;
    border-left: 3px solid #28a745;
}

/* Información adicional */
.form-text {
    color: #6c757d;
    font-size: 0.825em;
    margin-top: 5px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Alertas informativas en las tarjetas */
.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
    border-radius: 0 10px 10px 0;
    padding: 15px;
    margin-top: 20px;
}

.alert-info small {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* Grid responsive mejorado */
.row {
    margin-left: -10px;
    margin-right: -10px;
}

.col-md-6,
.col-md-4 {
    padding-left: 10px;
    padding-right: 10px;
}

/* Botones de acción del formulario */
.d-grid.gap-2.d-md-flex.justify-content-md-end {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
}

/* Animaciones suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.5s ease-out;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .container-fluid {
        padding: 15px;
    }

    .container-fluid h1 {
        font-size: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .card-body {
        padding: 20px 15px;
    }

    .card-header {
        padding: 15px;
    }

    .card-header h5 {
        font-size: 0.9rem;
        text-align: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .d-grid.gap-2.d-md-flex.justify-content-md-end {
        flex-direction: column;
    }
}

/* Estados de hover para las tarjetas */
.card-header.bg-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%) !important;
}

.card-header.bg-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%) !important;
}

.card-header.bg-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%) !important;
}

.card-header.bg-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%) !important;
}

.card-header.bg-dark:hover {
    background: linear-gradient(135deg, #212529 0%, #16181b 100%) !important;
}

/* Efectos de focus mejorados para selects */
.form-select option {
    padding: 10px;
    background-color: #fff;
    color: #333;
}

.form-select option:hover {
    background-color: #f8f9fa;
}

/* Mejoras para campos requeridos */
.form-label::after {
    content: "";
}

.form-label:has(+ .form-control[required])::after,
.form-label:has(+ .form-select[required])::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

/* Indicador visual para campos opcionales */
.form-label.optional::after {
    content: " (opcional)";
    color: #6c757d;
    font-weight: normal;
    font-style: italic;
    font-size: 0.85em;
}

/* ========================================
   ESTILOS PARA SUBIDA DE FOTO DE CONDUCTOR
   ======================================== */

/* Contenedor principal de la foto */
.photo-upload-container {
    padding: 20px;
}

/* Vista previa de la foto */
.photo-preview {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #e9ecef;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.photo-preview:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.photo-preview:hover img {
    transform: scale(1.1);
}

/* Controles de subida */
.upload-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.upload-controls .btn {
    font-size: 0.875rem;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.3);
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(220, 53, 69, 0.3);
}

/* Información de la foto */
.photo-info {
    text-align: center;
}

.photo-info small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

/* Animación de carga para la vista previa */
.photo-preview.loading {
    position: relative;
}

.photo-preview.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    margin-left: -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Placeholder para cuando no hay foto */
.photo-preview img[src*="placeholder"] {
    opacity: 0.6;
    filter: grayscale(20%);
}

.photo-preview:hover img[src*="placeholder"] {
    opacity: 0.8;
    filter: grayscale(0%);
}

/* Efectos especiales para la tarjeta de foto */
.card-header.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
}

.card-header.bg-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #343a40 100%) !important;
}

/* Drag and drop zone para subida de archivos */
.photo-upload-container.drag-over {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 86, 179, 0.1) 100%);
    border-radius: 15px;
}

.photo-upload-container.drag-over .photo-preview {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .photo-preview {
        width: 120px;
        height: 120px;
    }

    .upload-controls {
        flex-direction: column;
        align-items: center;
    }

    .upload-controls .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .photo-info small {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}

/* Estados de error para la foto */
.photo-upload-container.error .photo-preview {
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.photo-upload-container.error .photo-info small {
    color: #dc3545;
    background: #f8d7da;
    border-color: #f5c6cb;
}

/* Efecto de éxito */
.photo-upload-container.success .photo-preview {
    border-color: #28a745;
    animation: pulse-success 0.6s ease-in-out;
}

@keyframes pulse-success {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.photo-upload-container.success .photo-info small {
    color: #28a745;
    background: #d4edda;
    border-color: #c3e6cb;
}

/* ---- ESTILOS PARA TARJETAS DE GOOGLE DRIVE ---- */
.dashboard-card.card-google {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
}

.dashboard-card.card-teal {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    color: white;
}

.dashboard-card.card-purple {
    background: linear-gradient(135deg, #6f42c1, #5a2d91);
    color: white;
}

.dashboard-card.card-orange {
    background: linear-gradient(135deg, #fd7e14, #e55100);
    color: white;
}