:root {
    --azul-marino: #0d3b66;
    --azul-claro: #00a8a8;
    --blanco: #ffffff;
    --gris-suave: #f4f8fb;
    --gris-medio: #e0e0e0;
    --texto-oscuro: #1a1a1a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--gris-suave);
    color: var(--texto-oscuro);
}

.top-bar {
    background-color: var(--azul-marino);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
}

.menu-lateral {
    background-color: var(--azul-marino);
    color: white;
    width: 220px;
    padding: 2rem 1rem;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: -240px;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 90;
}

.menu-lateral.visible {
    left: 0;
}

.menu-lateral nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-lateral nav ul li {
    margin-bottom: 1rem;
}

.menu-lateral nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.menu-lateral nav ul li a.activo,
.menu-lateral nav ul li a:hover {
    background-color: var(--azul-claro);
    color: var(--texto-oscuro);
}

.contenido-principal {
    padding: 2rem;
    margin-top: 80px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.menu-lateral.visible~.contenido-principal {
    margin-left: 240px;
}

.bienvenida,
.mision-vision {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

h1,
h2 {
    color: var(--azul-marino);
}

#contenedor-lugares {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tarjeta-lugar {
    background-color: white;
    padding: 1rem;
    border-left: 5px solid var(--azul-marino);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.overlay-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 59, 102, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.overlay-login.visible {
    display: flex;
}

.popup-login {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    width: 320px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.popup-login h3 {
    margin-top: 0;
    color: #0d3b66;
    text-align: center;
}

.popup-login input {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.popup-login button {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    background-color: #0d3b66;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-cerrar {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
}


.grid-reservas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1rem 0;
}

.card-reserva {
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.card-reserva p {
    margin: 4px 0;
    font-size: 0.95rem;
}

.card-reserva button {
    margin-right: 6px;
    margin-top: 10px;
    padding: 5px 10px;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.card-reserva button:first-of-type {
    background-color: #f0ad4e;
    color: white;
}

.card-reserva button:last-of-type {
    background-color: #d9534f;
    color: white;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
}


.modal-formulario {
    background: #fff;
    padding: 20px;
    max-width: 500px;
    margin: 20px auto;
    border-radius: 10px;
    box-shadow: 0 0 10px #aaa;
}

.modal-formulario form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-formulario input,
.modal-formulario select {
    padding: 8px;
    font-size: 14px;
}

.modal-formulario fieldset {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 6px;
}

.modal-formulario legend {
    font-weight: bold;
    color: #333;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.info-usuario {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    max-width: 400px;
}

.detalles-disponibilidad {
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.detalles-disponibilidad h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.detalles-disponibilidad ul {
    margin: 0;
    padding-left: 1.2rem;
}

.detalles-disponibilidad li {
    margin: 0.3rem 0;
    color: #666;
}

.casillas {
    display: flex;
    gap: 4px;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.casilla {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.casilla.ocupada {
    background-color: #ff4444;
}

.casilla.libre {
    background-color: #00C851;
    border: 1px solid #00994D;
}

/* Estilos para la página de Cuenta */
.user-card {
    max-width: 550px;
    margin: 2rem auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #0056b3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.user-details h2 {
    margin: 0 0 0.25rem;
    color: #333;
    font-size: 1.8rem;
}

.user-details p {
    margin: 0.3rem 0;
    color: #666;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-details .role-badge {
    display: inline-block;
    background-color: #e7f3ff;
    color: #0056b3;
    padding: 0.2em 0.6em;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

#cerrarSesion {
    display: block;
    margin: 2rem auto;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, #d32f2f, #e53935);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#cerrarSesion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.5);
}

.error-message {
    text-align: center;
    color: #d32f2f;
    background-color: #ffebee;
    padding: 1rem;
    border-radius: 8px;
    max-width: 550px;
    margin: 2rem auto;
}