:root {
    --dark-bg: #0f172a;
    --card-bg: rgb(0 0 0 / 70%);
    --glass-effect: rgba(255, 255, 255, 0.1);
    --primary-color: #0072ff;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --secondary-color: #6c757d;
}

/* Reset y configuración base */
html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #181e25 0%, #1e293b 100%);
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Sección de header */
.header-section {
    margin: 0;
    height: auto;
    width: 100%;
    align-items: center;
}

.project-title {
    background: linear-gradient(-90deg, #006633, #09914d 33%, #b9a917 66%, #fdce00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    padding: 0;
}

.share-btn {
    font-size: 12px !important;
    background: linear-gradient(135deg, #006633, #09914d);
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.visit-btn {
    font-size: 12px !important;
}

/* Sección principal */
.main-section {
    margin: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.content-column {
    padding: 0;
    min-height: 80vh;
}

.content-card {
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-body {
    padding: 0;
}

.tabs-container {
    padding: 5px;
    background: transparent;
    border: none;
}

.tabs-header {
    /* Estilos para el header de tabs */
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 100px);
    background: transparent;
    border: none;
}

.dynamic-content {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: auto;
}

.content-section {
    height: 100%;
}

.content-iframe {
    border: none;
    height: 100%;
    width: 100%;
    display: block;
}

/* Sidebar */
.sidebar-column {
    /* Estilo para la columna del sidebar */
}

.sidebar-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.module-title {
    padding: 5px;
}

.sidebar-content {
    /* Contenido del sidebar */
}

/* Estilos para las carpetas de reservas */
.reserva-section {
    /* Sección de reservas */
}

.reserva-card {
    padding: 5px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.reserva-btn {
    text-align: left;
    font-size: 12px !important;
    padding: 6px;
    margin: 2px 0;
}

/* Carpetas normales */
.carpeta-normal {
    /* Estilos para carpetas normales */
}

.carpeta-btn {
    text-align: left;
}

.carpeta-card {
    padding: 5px;
}

.recurso-btn {
   text-align: left;
   font-weight: normal;
}

.recurso-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.recurso-btn.active {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.restricted-icon {
    color: #ffc107;
    margin-left: 8px;
}

/* Estilos base para elementos form-login */
.form-login, .form-login1 {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--glass-effect);
    box-shadow: 0 8px 32px 0 rgba(0, 115, 255, 0.1);
    margin: 0;
    padding: 0;
    width: 100%;
    transition: all 0.3s ease;
}

/* Estilos para navegación */
.nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid rgba(0, 198, 255, 0.2);
    font-size: 0.7rem;
}

.nav-link:hover, 
.nav-link:active,
.nav-link:focus {
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.3) 0%, rgba(0, 114, 255, 0.3) 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 198, 255, 0.2);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(0, 198, 255, 0.5) 0%, rgba(0, 114, 255, 0.5) 100%);
    font-weight: bold;
    color: white;
}

/* Animación para el botón de reservas */
@keyframes pulse-reserva {
    0% { 
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); 
    }
    70% { 
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); 
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); 
    }
}

.carpeta-reserva-btn {
    animation: pulse-reserva 2s infinite;
    text-align: left;
    font-size: 15px;
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    border: 1px solid var(--success-color);
    color: white;
}

.carpeta-reserva-btn:hover {
    background: linear-gradient(135deg, #20c997 0%, var(--info-color) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(32, 201, 151, 0.4);
}

/* Estilos específicos para el calendario */
.calendario-reservas-container {
    height: 100%;
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
}

.lab-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 15px;
    padding: 15px;
    height: calc(100% - 100px);
}

.calendar-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--light-color);
    border-bottom: 1px solid #e9ecef;
}

.nav-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.calendar-header {
    background: var(--success-color);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.week-view {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
    padding: 1px;
    max-height: 400px;
    overflow-y: auto;
}

.week-view .time-slot,
.week-view .day-header {
    background: var(--secondary-color);
    color: white;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    font-size: 10px;
}

.week-view .hour-cell {
    background: white;
    padding: 3px;
    min-height: 30px;
    border: 1px solid #e9ecef;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    text-align: center;
}

.week-view .hour-cell:hover {
    background: var(--light-color);
}

.week-view .hour-cell.weekend {
    background: var(--light-color);
    cursor: not-allowed;
}

.week-view .hour-cell.today {
    background: #e8f5e8;
}

.event-slot {
    color: white;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 2px;
    font-size: 8px;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.event-slot.available {
    background: var(--success-color);
    cursor: pointer;
}

.event-slot.available:hover {
    background: #218838;
    transform: scale(1.05);
}

.event-slot.reserved {
    background: var(--danger-color);
    cursor: not-allowed;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 8px;
    background: var(--light-color);
    border-top: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Estilos para los equipos */
.equipment-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.equipment-card {
    background: white;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.equipment-card.selected {
    border: 2px solid var(--success-color);
    background: #f8fff8;
}

.equipment-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.equipment-card .equipment-name {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.equipment-card .equipment-code {
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
}

.equipment-card .equipment-description {
    font-size: 9px;
    color: #555;
    line-height: 1.3;
}

.equipment-status {
    display: inline-block;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    margin-top: 5px;
}

.equipment-status.available {
    background: var(--success-color);
}

.equipment-status.unavailable {
    background: var(--danger-color);
}

/* Estilos para el formulario */
.form-container {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 15px;
}

.evento-seleccionado {
    background: #e8f5e8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 4px solid var(--success-color);
}

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

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12px;
}

.form-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    transition: border-color 0.3s ease;
}

.form-input:focuss {
    outline: none;
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.form-input[readonly] {
    background: var(--light-color);
}

.form-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    resize: vertical;
    min-height: 60px;
}

.btn-submit {
    margin-top: 15px;
    background-color: var(--success-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
    transform: none;
}

/* Estilos para spinners de carga */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: white;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.spinner-border.text-success {
    color: var(--success-color);
}

.spinner-border.text-info {
    color: var(--info-color);
}

.spinner-border.text-warning {
    color: var(--warning-color);
}

.spinner-border.text-primary {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .col-lg-9, .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
        height: auto !important;
    }
    
    .content-column {
        min-height: 60vh;
    }
    
    .sidebar-column {
        padding: 15px;
    }
    
    .dynamic-content {
        height: calc(100% - 60px) !important;
    }
    
    #modulo-tabs .nav-item {
        flex: 0 0 calc(50% - 4px);
        max-width: calc(50% - 4px);
        margin-bottom: 4px;
    }
    
    .main-section {
        border-radius: 0;
        margin: 0;
        padding: 0;
        height: auto !important;
        width: 100%;
        max-width: 100%;
        backdrop-filter: none;
    }
    
    body {
        padding: 0 !important;
        margin: 0 !important;
        background: var(--dark-bg);
    }
    
    .dynamic-content {
        height: 50vh !important;
        min-height: 300px;
        border-radius: 0 !important;
    }
    
    .content-column, .sidebar-column {
        padding: 0;
        margin: 0;
        width: 100%;
        height: auto !important;
        max-width: 100%;
    }
    
    #modulo-tabs .nav-item {
        flex: 1 0 100%;
        max-width: 100%;
        height: 60px;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 0.2rem !important;
        font-size: 0.7rem !important;
        white-space: normal;
        word-break: break-word;
        text-align: center;
        height: 100%;
        display: flex;
        justify-content: left;
        align-items: center;
    }
    
    
    #modulo-tabs {
        display: flex;
        flex-wrap: wrap;
        margin: 0;
        padding: 8px;
        width: 100%;
        gap: 4px;
    }
    
    #modulo-tabs .nav-item {
        flex: 1 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        margin: 0;
        padding: 0;
        height: 70px;
    }
    
    .sidebar-column {
        height: auto !important;
        overflow-y: visible;
    }
    
    .sidebar-card {
        margin-bottom: 0 !important;
    }
    
    /* Responsive para el calendario */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .equipment-sidebar {
        max-height: 300px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .week-view {
        font-size: 8px;
    }
    
    .week-view .hour-cell {
        min-height: 25px;
        padding: 2px;
    }
    
    .equipment-card {
        padding: 8px;
    }
    
    .equipment-card img {
        height: 60px;
    }
    
    .form-container {
        padding: 10px;
        margin: 10px;
    }
    
    .reserva-btn {
        font-size: 10px !important;
        padding: 4px !important;
    }
    
    .carpeta-reserva-btn {
        font-size: 13px !important;
    }
}

/* Estilos específicos para elementos de reservas */
.reserva-section .nav-link.recurso-btn {
    color: #2c3e50 !important; /* Texto oscuro como los recursos normales */
    background: #f8f9fa !important; /* Fondo claro como btn-light */
    border: 1px solid #dee2e6 !important;
    text-align: left !important;
    font-size: 12px !important;
    padding: 8px 10px !important;
    transition: all 0.3s ease;
    margin-bottom: 2px;
}

.reserva-section .nav-link.recurso-btn:hover {
    background: #e9ecef !important;
    color: #1a252f !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Iconos específicos con colores temáticos */
.reserva-section .nav-link.recurso-btn:nth-child(1) i {
    color: #28a745 !important; /* Verde para sistema de reservas */
}

.reserva-section .nav-link.recurso-btn:nth-child(2) i {
    color: #17a2b8 !important; /* Azul para mis reservas */
}

.reserva-section .nav-link.recurso-btn:nth-child(3) i {
    color: #ffc107 !important; /* Amarillo para reglamento */
}

/* Mantener el botón principal de reservas con estilo especial */
.carpeta-reserva-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
}

.carpeta-reserva-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1c9d85 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Asegurar que el contenedor de reservas tenga el mismo estilo */
.reserva-section .carpeta-card {
    background: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Lista de reservas sin márgenes */
.reserva-section ul.nav {
    margin: 0 !important;
    padding: 0 !important;
}

.reserva-section ul.nav li {
    margin: 0 !important;
    padding: 1px 0 !important;
    list-style: none !important;
}

/* Responsive para reservas */
@media (max-width: 992px) {
    .reserva-section .nav-link.recurso-btn {
        padding: 8px !important;
        font-size: 14px !important;
        margin-bottom: 4px;
    }
    
    .reserva-section .nav-link.recurso-btn i {
        margin-right: 8px;
    }
}

/* Utilidades adicionales */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.p-3 {
    padding: 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;

}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

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

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

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

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-pill {
    padding-right: 0.6em;
    padding-left: 0.6em;
    border-radius: 10rem;
}

.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

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

.alert-heading {
    color: inherit;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-4, .col-md-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 768px) {
    .col-md-4, .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Estilos para contenido restringido */
.restricted-content {
    height: 630px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.restricted-content .card {
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.restricted-content .fa-lock {
    opacity: 0.7;
}

.restricted-content .alert {
    border-left: 4px solid #ffc107;
}

ul li {
    margin-bottom: 0 !important;
    margin: 0;
    list-style: none;
    
}
ul li {
    margin-bottom: 0 !important;
    margin: 0;
    list-style: none;
    
}

/* Estilos para equipos */
.equipo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.estado-badge {
    white-space: nowrap;
}

.equipos-servicios-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
