/* Estilos personalizados para Sistema de Reservas de Biblioteca */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Navbar */
.navbar-brand {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Cards */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.espacio-card {
    cursor: pointer;
}

.espacio-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Botones */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.2rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
}

/* Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
    border-radius: 6px;
}

/* Formularios */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.input-group-text {
    background-color: #f8f9fa;
    border-radius: 8px 0 0 8px;
}

/* Tablas */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f5f5f5;
    cursor: pointer;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Sidebar */
.list-group-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 0.3rem;
    transition: all 0.2s;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Animaciones */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

/* Responsivo */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .btn-group-sm > .btn {
        padding: 0.2rem 0.5rem;
    }
}

/* Estilos para calendario */
.calendar-day {
    min-height: 100px;
    border: 1px solid #dee2e6;
    padding: 0.5rem;
    background-color: white;
    transition: background-color 0.2s;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    cursor: pointer;
}

.calendar-day.selected {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
}

.calendar-event {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    margin-bottom: 0.2rem;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading spinner */
.spinner-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;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Tooltips personalizados */
.tooltip-inner {
    background-color: #333;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* Dropdowns */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item {
    border-radius: 6px;
    margin: 0.2rem 0.5rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Card header personalizado */
.card-header {
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* Estadísticas cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    border-radius: 15px;
}

/* Estilos para estados de reserva */
.estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.estado-aprobada {
    background-color: #d4edda;
    color: #155724;
}

.estado-rechazada {
    background-color: #f8d7da;
    color: #721c24;
}

.estado-cancelada {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Modal personalizado */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* Iconos */
.bi {
    vertical-align: -0.125em;
}

/* Breadcrumb */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}
