/* =============================================
   CSS PARA PORTAL DEL CLIENTE
   ============================================= */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* Estilos Generales */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Login Page */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-info {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(108, 117, 125, 0.9) 100%);
    position: relative;
    overflow: hidden;
}

.login-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.login-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-img {
    max-width: 150px;
    height: auto;
    filter: brightness(0) invert(1);
}

.features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    min-width: 2rem;
}

.feature-item h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.feature-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.login-form-container {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    font-weight: 600;
}

/* Resumen Cards */
.card.bg-primary,
.card.bg-success,
.card.bg-warning {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%) !important;
}

.card.bg-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%) !important;
}

.card.bg-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%) !important;
}

.card-body i {
    opacity: 0.8;
}

/* Tablas */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
}

.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Botones */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Formularios */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 600;
    color: var(--dark-color);
}

/* Alertas */
.alert {
    border: none;
    border-radius: 10px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #a3cfbb 100%);
    color: #0a3622;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f1aeb5 100%);
    color: #58151c;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Login Mobile */
    .login-form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .login-content {
        padding: 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .feature-item i {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    /* Dashboard Mobile */
    .container-fluid {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Tabla responsive */
    .table-responsive {
        border-radius: 10px;
    }
    
    .table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .table th {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    /* Botones móviles */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Modal móvil */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 10px;
    }
    
    /* Cards de resumen móviles */
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .card-body h3 {
        font-size: 1.5rem;
    }
    
    .card-body i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .login-form-container {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .table td {
        padding: 0.25rem;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Ocultar columnas menos importantes en móvil */
    .table .d-none-mobile {
        display: none !important;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    #alertContainer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        border: 1px solid #dee2e6;
    }
}
