/* Estilos principales del portal */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
    font-weight: bold;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus {
    box-shadow: none;
}

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

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.card-header h4,
.card-header h5 {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn {
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

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

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Alertas personalizadas */
.alert {
    border-radius: 0.5rem;
    border: none;
}

/* Tablas responsivas */
.table-responsive {
    border-radius: 0.5rem;
}

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

/* Cards de estadísticas */
.card.text-white {
    transition: transform 0.3s ease;
}

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

.card.text-white .card-subtitle {
    opacity: 0.9;
}

/* Progress bars */
.progress {
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Modales */
.modal-content {
    border-radius: 0.5rem;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
}

/* Formularios */
.form-control,
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    padding: 2rem 0;
    border-top: 1px solid #dee2e6;
    color: var(--secondary-color);
}

/* Navbar collapse animation */
.navbar-collapse {
    transition: all 0.3s ease;
}

/* Badges personalizados */
.badge {
    font-size: 0.875em;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Utilidades personalizadas */
.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Botones de acción rápida */
.btn-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
}

.btn-icon i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Cards de dashboard */
.dashboard-card {
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

/* Listas de acciones */
.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

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

/* Estilos para el login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .card-header .btn {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navbar personalizada */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

/* Cards de solicitudes */
.request-card {
    transition: all 0.3s ease;
}

.request-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Indicadores de estado */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Tooltips personalizados */
.tooltip-custom {
    position: relative;
    cursor: help;
}

/* Filtros */
.filter-section {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Botones de grupo */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 0.375rem 0 0 0.375rem;
}

.btn-group .btn:last-child {
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Calendar styles */
.calendar-day {
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    min-height: 60px;
    transition: background-color 0.3s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.today {
    background-color: #e3f2fd;
    border-color: var(--primary-color);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: white;
}

.calendar-day.unavailable {
    background-color: #ffebee;
    color: #c62828;
    cursor: not-allowed;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    min-width: 300px;
}

/* Cards flexibles */
.card-flex {
    display: flex;
    flex-direction: column;
}

.card-flex .card-body {
    flex: 1;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .card-header h4,
    .card-header h5 {
        font-size: 1rem;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
}

/* Mejoras de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Cards de estadísticas mejoradas */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.stat-card .card-body {
    position: relative;
    z-index: 1;
}
