/* css/style.css */

/* --- Colores y Fuentes --- */
:root {
    --color-primario: #002366; /* Azul Rey */
    --color-secundario: #FFBF00; /* Amarillo Oscuro / Dorado */
    --color-fondo: #f0f2f5;
    --color-texto: #333;
    --font-principal: 'Inter', sans-serif;
    --navbar-height: 80px;
}

body {
    background-color: var(--color-fondo);
    font-family: var(--font-principal);
    color: var(--color-texto);
    position: relative;
}

/* --- Fondo con Logo Transparente --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('https://www.transparentpng.com/thumb/fire/flames-fire-png-image-4.png');
    background-size: cover;
    background-position: center center;
    opacity: 0.1;
    z-index: -1;
}

/* --- NAVBAR MEJORADO --- */
.navbar-custom {
    background: linear-gradient(135deg, var(--color-primario) 0%, #0033a0 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    min-height: var(--navbar-height);
    border-bottom: 3px solid var(--color-secundario);
}

.navbar-custom .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.navbar-custom .navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-custom .navbar-brand .logo-icon {
    color: var(--color-secundario);
    font-size: 2rem;
    margin-right: 10px;
    animation: pulse 3s infinite;
    filter: drop-shadow(0 0 8px rgba(255, 191, 0, 0.3));
}

/* --- DASHBOARD CLOCK --- */
.dashboard-clock {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 0.8rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clock-container {
    text-align: center;
}

.time-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-secundario);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
    letter-spacing: 2px;
}

.date-display {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: capitalize;
    margin-top: 2px;
}

/* Mobile Clock */
.mobile-clock {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.time-display-mobile {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-secundario);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 191, 0, 0.3);
    letter-spacing: 2px;
}

.date-display-mobile {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: capitalize;
    margin-top: 5px;
}

/* --- CUSTOM MOBILE MENU TOGGLE --- */
.custom-toggler {
    border: none;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.custom-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 191, 0, 0.25);
}

.toggler-icon {
    position: relative;
    width: 24px;
    height: 18px;
    display: block;
}

.toggler-icon span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.toggler-icon span:nth-child(1) { top: 0; }
.toggler-icon span:nth-child(2) { top: 7px; }
.toggler-icon span:nth-child(3) { top: 14px; }

.custom-toggler[aria-expanded="true"] .toggler-icon span:nth-child(1) {
    transform: rotate(45deg);
    top: 7px;
}

.custom-toggler[aria-expanded="true"] .toggler-icon span:nth-child(2) {
    opacity: 0;
}

.custom-toggler[aria-expanded="true"] .toggler-icon span:nth-child(3) {
    transform: rotate(-45deg);
    top: 7px;
}

/* --- NAVIGATION LINKS MEJORADOS --- */
.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-custom .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.navbar-custom .nav-link:hover::before {
    left: 100%;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: #fff;
    background: rgba(255, 191, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 191, 0, 0.3);
}

.navbar-custom .nav-link.active {
    background: var(--color-secundario);
    color: var(--color-primario);
    font-weight: 700;
}

/* --- USER DROPDOWN MEJORADO --- */
.user-dropdown .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.user-dropdown .nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: none;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-secundario);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    color: var(--color-primario);
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(255, 191, 0, 0.3);
}

.user-details {
    text-align: left;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1;
}

.user-dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
    min-width: 250px;
}

.user-dropdown-menu .dropdown-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primario), #0033a0);
    color: white;
    border-radius: 12px;
    margin: 0.5rem;
}

.user-dropdown-menu .dropdown-item {
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0.2rem 0.5rem;
}

.user-dropdown-menu .dropdown-item:hover {
    background: rgba(0, 35, 102, 0.1);
    transform: translateX(5px);
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* --- RESPONSIVE NAVBAR --- */
@media (max-width: 991.98px) {
    .navbar-custom {
        padding: 0.8rem 1rem;
    }
    
    .navbar-collapse {
        background: rgba(0, 35, 102, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 15px;
        margin-top: 1rem;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav {
        gap: 0.5rem;
    }
    
    .navbar-custom .nav-link {
        text-align: center;
        margin: 0.2rem 0;
        padding: 1rem;
        border-radius: 12px;
    }
    
    .user-dropdown .nav-link {
        justify-content: center;
        background: rgba(255, 191, 0, 0.2);
        padding: 1rem;
    }
    
    .user-dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .time-display {
        font-size: 1.5rem;
    }
    
    .date-display {
        font-size: 0.8rem;
    }
    
    .time-display-mobile {
        font-size: 1.8rem;
    }
    
    .navbar-custom .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-custom .navbar-brand .logo-icon {
        font-size: 1.5rem;
    }
}

/* --- Resto de estilos existentes --- */

/* --- Títulos y Contenido General --- */
.main-title {
    color: var(--color-primario);
    font-weight: 700;
}

.card {
    border: none;
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: var(--color-primario);
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
    border-bottom: 3px solid var(--color-secundario);
}

.card-header-alt {
    background: linear-gradient(135deg, var(--color-primario) 0%, #0033a0 100%);
}

/* --- Mejoras para las camas --- */
.bed {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.bed.occupied {
    background: linear-gradient(135deg, #ffe8e8 0%, #ffcccc 100%);
    border-color: #dc3545;
    color: #721c24;
}

.bed.available {
    background: linear-gradient(135deg, #e8f5e8 0%, #ccffcc 100%);
    border-color: #198754;
    color: #0f5132;
}

.bed:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.bed-number {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.bed small {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.1;
}

/* --- Login --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-card .logo-icon {
    font-size: 4rem;
    color: var(--color-primario);
    text-shadow: 0 0 10px var(--color-secundario);
}

/* --- Estilos para reemplazos --- */
.list-group-item-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.text-warning {
    color: #f57c00 !important;
}

/* --- Mejoras para botones --- */
.btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* --- Alertas mejoradas --- */
.alert {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

/* Animaciones */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

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

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

.card, .navbar-custom {
    animation: fadeIn 0.5s ease-in-out;
}

.list-group-item {
    animation: slideInUp 0.4s ease-out;
}

.list-group-item:nth-child(2) { animation-delay: 0.1s; }
.list-group-item:nth-child(3) { animation-delay: 0.2s; }
.list-group-item:nth-child(4) { animation-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .container-fluid {
        padding: 1rem !important;
    }
    .card-body {
        padding: 1rem;
    }
    .main-title {
        font-size: 1.5rem;
    }
    
    .bed {
        min-height: 70px;
        padding: 8px 4px;
    }
    
    .bed-number {
        font-size: 1.2rem;
    }
    
    .bed small {
        font-size: 0.7rem;
    }
    
    .btn-outline-primary {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
}
/* Agregar al final de css/style.css */

/* --- Mejoras para asignaciones de vehículos --- */
.btn-group-vertical .btn {
    border-radius: 6px !important;
    margin-bottom: 0;
}

.btn-group-vertical .btn:not(:last-child) {
    margin-bottom: 0.25rem;
}

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 1rem;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Estilos para las funciones */
.text-primary {
    color: #0d6efd !important;
}

.text-info {
    color: #0dcaf0 !important;
}

/* Mejoras para el modal más grande */
.modal-lg {
    max-width: 800px;
}

/* Responsive para botones de acción */
@media (max-width: 768px) {
    .btn-group-vertical {
        flex-direction: row !important;
    }
    
    .btn-group-vertical .btn:not(:last-child) {
        margin-bottom: 0;
        margin-right: 0.25rem;
    }
}

/* Agregar al final de css/style.css */

/* --- COLORES PROFESIONALES PARA FUNCIONES --- */
.text-primary-professional {
    color: #1e40af !important; /* Azul profesional más suave */
    font-weight: 600;
}

.text-secondary-professional {
    color: #6366f1 !important; /* Índigo profesional */
    font-weight: 600;
}

.text-dark-professional {
    color: #374151 !important; /* Gris oscuro profesional */
    font-weight: 600;
}

/* --- MEJORAS PARA EL MODAL EXPANDIDO --- */
.modal-xl {
    max-width: 1140px;
}

/* --- MEJORAS PARA CARDS DENTRO DEL MODAL --- */
.modal .card {
    border: 1px solid #e5e7eb;
    box-shadow: none;
    margin-bottom: 0;
}

.modal .card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
}

.modal .card-header h6 {
    color: var(--color-primario);
    margin: 0;
    font-weight: 600;
}

.modal .card-body {
    padding: 1rem;
}

/* --- MEJORAS PARA SELECTS Y TEXTAREAS --- */
.form-select, .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-select:focus, .form-control:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(0, 35, 102, 0.15);
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-label .fa-solid {
    margin-right: 0.25rem;
}

/* --- MEJORAS PARA BOTONES --- */
.btn-group .btn {
    border-radius: 6px !important;
    margin-left: 0;
    border-width: 1.5px;
    font-weight: 600;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

.btn-outline-primary {
    color: #1e40af;
    border-color: #1e40af;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #1e40af;
    border-color: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-outline-danger {
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* --- MEJORAS PARA LISTA DE ASIGNACIONES --- */
.list-group-item {
    border-left: none;
    border-right: none;
    padding: 1.25rem 1rem;
    transition: background-color 0.3s ease;
}

.list-group-item:hover {
    background-color: #f8fafc;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* --- MEJORAS PARA ALERTAS --- */
.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
    border: 1px solid #81d4fa;
    color: #0277bd;
    border-radius: 10px;
}

/* --- ESPACIADO MEJORADO --- */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

/* --- RESPONSIVE PARA BOTONES EN MÓVIL --- */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column !important;
    }
    
    .btn-group .btn:not(:last-child) {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .modal-xl {
        max-width: 95%;
    }
    
    .modal .card-body {
        padding: 0.75rem;
    }
}

/* --- ICONOS CON MEJOR ESPACIADO --- */
.fa-star, .fa-star-half-stroke, .fa-radio, .fa-tasks {
    margin-right: 0.3rem;
}

/* --- MEJORAS PARA PEQUEÑOS TEXTOS --- */
.form-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.text-muted {
    color: #6b7280 !important;
}

/* --- EFECTOS HOVER PARA CARDS --- */
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* --- ESTILOS PARA ETIQUETAS REQUERIDAS --- */
.text-danger {
    color: #dc2626 !important;
}

/* --- MEJORAS PARA EL HEADER DE CARDS --- */
.bg-light {
    background-color: #f8fafc !important;
}