:root {
    --brand-green-dark: #006655;
    --brand-green-header: #008b7d;
    --brand-green-light: #e8f5e9;
    --brand-form-bg: #d8ebd9;
    --brand-form-border: #a3d9a5;
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), 
                url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background-color: rgba(232, 245, 233, 0.95);
    backdrop-filter: blur(5px);
    border-bottom: 3px solid var(--brand-green-dark);
    padding: 10px 0;
}

.logo-img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
    transition: max-height 0.3s ease;
}

@media (min-width: 576px) { .logo-img { max-height: 60px; } }
@media (min-width: 992px) { .logo-img { max-height: 80px; } }

.main-title {
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.5rem;
}

@media (min-width: 768px) { .main-title { font-size: 2rem; } }

/* Panel Datos Afiliado */
.card-user-info {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: none;
    border-left: 5px solid var(--brand-green-header);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-width: 850px;
    width: 100%;
}

.user-info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 700;
}

.user-info-value {
    font-weight: 600;
    color: #2b2b2b;
}

/* Tarjetas de Secciones */
.card-custom {
    background-color: rgba(232, 245, 233, 0.94);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

/* Tarjetas de la página de solicitud: mismo ancho que el panel de datos del afiliado */
.card-custom.card-ancha {
    max-width: 850px;
}

.max-w-850 {
    max-width: 850px;
}

.card-header-custom {
    background-color: var(--brand-green-header);
    color: #ffffff;
    font-weight: 600;
    font-size: 1.2rem;
    padding: 12px 20px;
    border-bottom: none;
}

/* Caja Carga Acompañante */
.box-carga-familiar {
    background-color: var(--brand-form-bg);
    border: 2px solid var(--brand-form-border);
    border-radius: 10px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.input-group-text {
    background-color: #ffffff;
    border-right: none;
    color: var(--brand-green-header);
}

.form-control-with-icon, .form-select-with-icon {
    border-left: none;
}

.form-control:focus, .form-select:focus {
    border-color: #ced4da;
    box-shadow: none;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control,
.input-group:focus-within .form-select {
    border-color: var(--brand-green-header);
}

/* Tarjetas Individuales de Familiares */
.card-familiar-item {
    background-color: #ffffff;
    border: 1px solid #c8e6c9;
    border-left: 4px solid var(--brand-green-header);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.card-familiar-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Familiares registrados: sin seleccionar se ven atenuados */
.card-familiar-registrado {
    border-left-color: #bdbdbd;
    opacity: 0.8;
}

.card-familiar-registrado.familiar-seleccionado {
    border-left-color: var(--brand-green-header);
    background-color: #e8f5e9;
    opacity: 1;
}

/* Botones */
.btn-custom-primary {
    background-color: var(--brand-green-header);
    color: #fff;
    font-weight: 600;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-custom-primary:hover {
    background-color: var(--brand-green-dark);
    color: #fff;
}

.btn-mis-reservas {
    background-color: #5a6268;
    color: #ffffff;
    font-weight: 600;
}

.btn-mis-reservas:hover {
    background-color: #343a40;
    color: #ffffff;
}

footer {
    margin-top: auto;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    font-size: 0.9rem;
}

/* Detalle de solicitud / reserva (Mis Reservas): cada bloque en su recuadro */
.detalle-seccion {
    border: 1px solid var(--brand-form-border);
    border-radius: 0.5rem;
    background-color: #fff;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
}

.detalle-encabezado {
    background-color: var(--brand-green-light);
}

/* Reserva confirmada: check-in / check-out y QR de ingreso */
.detalle-ingreso {
    font-size: .9rem;
    line-height: 1.6;
    margin: .15rem 0 .2rem 0;
}
.detalle-ingreso-k {
    display: inline-block;
    min-width: 5.2rem;
    color: #5c6f62;
}
.detalle-qr {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .6rem;
    padding-top: .6rem;
    border-top: 1px dashed rgba(0, 0, 0, .15);
}
.btn-qr-ingreso {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 1px solid #d0d7d2;
    border-radius: 6px;
    background-color: #ffffff;
    cursor: zoom-in;
}
.btn-qr-ingreso svg,
.qr-ampliado-caja svg {
    display: block;
    width: 100%;
    height: 100%;
}
.detalle-qr-texto {
    font-size: .8rem;
    color: #495057;
}
/* Botón "Cómo llegar" debajo del QR (link del mapa del alojamiento) */
.detalle-mapa {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .75rem;
    margin-top: .6rem;
}
.detalle-mapa-dir {
    flex: 1 1 12rem;
    line-height: 1.25;
}
.qr-ampliado {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background-color: rgba(0, 0, 0, .75);
    cursor: zoom-out;
}
.qr-ampliado-caja {
    width: min(85vw, 85vh, 420px);
    padding: 12px;
    border-radius: 10px;
    background-color: #ffffff;
    text-align: center;
}
.qr-ampliado-caja svg {
    height: auto;
    aspect-ratio: 1 / 1;
}
.qr-ampliado-texto {
    margin-top: 6px;
    font-size: .85rem;
    color: #495057;
}

.detalle-seccion-titulo {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-green-dark);
    border-bottom: 1px solid var(--brand-form-border);
    padding-bottom: 0.3rem;
    margin-bottom: 0.5rem;
}

.detalle-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 700;
    line-height: 1.2;
}

.detalle-valor {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b2b2b;
}

.detalle-acompanante {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
}

/* Mensajes y confirmaciones en modal: por encima de cualquier otra ventana, con borde de color y fondo más oscuro */
#modalMensaje {
    z-index: 1070;
}

.modal-backdrop.modal-backdrop-mensaje {
    z-index: 1065;
    opacity: 0.65;
}

.modal-mensaje {
    border: 2px solid;
    box-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

/* Documentación pedida en Mis Reservas (js/reserva.js htmlDocumentacion): una tarjeta por persona */
.detalle-docs .doc-persona { border: 1px solid #dfe8e2; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fff; }
.doc-persona-nom { font-weight: 700; font-size: .9rem; margin-bottom: 2px; }
.doc-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px dashed rgba(0, 0, 0, .12); }
.doc-persona-nom + .doc-item { border-top: 0; }
.doc-item-l { min-width: 0; }
.doc-item-d { font-size: .88rem; line-height: 1.3; }
.doc-item .btn { flex: 0 0 auto; white-space: nowrap; }
.doc-archivos { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 2px; }
.doc-archivo { font-size: .78rem; }
