/* Estilos generales */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Contenedor principal */
.login-container, .dashboard-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #2980b9;
}

/* Alertas */
.alert {
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Dashboard */
.dashboard-menu h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.menu-item:hover {
    background: #e9ecef;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.menu-item .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Header y footer */
.header, .footer {
    text-align: center;
    padding: 1rem;
    background: #2c3e50;
    color: white;
}

.footer {
    margin-top: 2rem;
}

/* Añade estas reglas al final de tu archivo estilo.css */

/* Estilos específicos para el dashboard */
.dashboard-title {
    color: #2c3e50 !important; /* Color oscuro para mejor contraste */
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #3498db;
}

.header h1 {
    color: #ffffff !important; /* Color blanco para el título en el header */
    background-color: #2c3e50;
    padding: 1rem;
    margin: 0;
}

/* Asegurar contraste en el menú */
.dashboard-menu h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

/* Mejorar visibilidad de los ítems del menú */
.menu-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #2c3e50;
}

.menu-item:hover {
    background: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

/* Estilos para el formulario de importación */
.import-form {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.import-form .form-group {
    margin-bottom: 1.5rem;
}

.import-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.import-form input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-submit, .btn-cancel {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit {
    background-color: #28a745;
    color: white;
    margin-right: 1rem;
}

.btn-submit:hover {
    background-color: #218838;
}

.btn-cancel {
    background-color: #6c757d;
    color: white;
    text-decoration: none;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

.import-instructions {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #17a2b8;
}

.import-instructions h3 {
    margin-bottom: 1rem;
    color: #17a2b8;
}

.import-instructions ol {
    padding-left: 1.5rem;
}

/* ==================== ESTILOS PARA EL INFORME ==================== */

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px 8px 0 0 !important;
}

.card-header.bg-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.card-header.bg-danger {
    background-color: #dc3545 !important;
    color: white !important;
}

.card-body {
    padding: 0;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table td, .table th {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.badge {
    font-size: 0.85em;
    font-weight: 600;
    padding: 0.35em 0.65em;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Estilos para el formulario de filtros */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.form-group {
    margin-bottom: 1rem;
    padding-right: 15px;
    padding-left: 15px;
    flex: 1 0 0%;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: calc(2.25rem + 2px);
    margin-bottom: 0;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: calc(2.25rem + 2px);
    margin: 0;
    opacity: 0;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(2.25rem + 2px);
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    height: calc(calc(2.25rem + 2px) - 1px * 2);
    padding: 0.375rem 0.75rem;
    line-height: 1.5;
    color: #495057;
    content: "Buscar";
    background-color: #e9ecef;
    border-left: inherit;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Botones */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, 
                border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    background-image: none;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

/* Responsive */
@media (max-width: 768px) {
    .form-group {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Estilos para la impresión */
@media print {
    body * {
        visibility: hidden;
    }
    .container, .container * {
        visibility: visible;
    }
    .container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    .no-print, .form-row {
        display: none !important;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    .table {
        font-size: 12px;
    }
}

/* ========== ESTILOS PARA USAR ANCHO COMPLETO ========== */
.container, 
.login-container, 
.dashboard-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 1rem;
}

body {
    margin: 0;
    padding: 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
}

.form-inline {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive para móviles */
@media (max-width: 992px) {
    .container, 
    .login-container, 
    .dashboard-container {
        padding: 0.5rem !important;
    }
    
    .form-inline {
        flex-direction: column;
    }
    
    .filter-buttons {
        flex-direction: column;
    }
    
    .filter-buttons .btn {
        margin-bottom: 5px;
        width: 100%;
    }
    
    .compact-table {
        font-size: 0.7rem;
    }
}

/* Para dispositivos muy pequeños */
@media (max-width: 576px) {
    .acciones-secuencia {
        flex-direction: column;
        gap: 2px;
    }
    
    .btn-action {
        width: 25px;
        height: 25px;
    }
}