:root {
    --color-texto:      #1a1c2c;
    --color-rojo:       #e31b23;
    --color-rojo-hover: #b3141a;
    --color-verde:      #3b6d11;
    --gris-fondo:       #f6f8fb;
    --gap-lateral:      clamp(1rem, 3vw, 2rem);
}

/* ── Cabecera de sección ─────────────────────────────────── */
.header-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 32px 16px;
}

.header-admin h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-texto);
    margin: 0 0 4px;
}

.subtitulo {
    font-size: 0.88rem;
    color: #595959;
    margin: 0;
}

hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 0 32px 24px;
}

/* ── Cuadrícula de reservas ──────────────────────────────── */
.cuadricula_reservas {
    padding: 0 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ── Bloque por usuario ──────────────────────────────────── */
.usuario-grupo {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.nombre-cliente {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--color-texto);
    padding: 12px 20px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nombre-cliente span {
    opacity: .65;
    font-weight: 400;
    font-size: 0.85rem;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Lista de reservas ───────────────────────────────────── */
.lista-reservas {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Tarjeta individual ──────────────────────────────────── */
.item-reserva {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}

.item-reserva:last-child {
    border-bottom: none;
}

.item-reserva:hover {
    background: #fafafa;
}

/* ── Imagen ──────────────────────────────────────────────── */
.item-reserva img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    background: #ebebeb;
    flex-shrink: 0;
}

/* ── Info del producto ───────────────────────────────────── */
.item-info {
    flex: 1;
    min-width: 0;
}

.item-info .nombre {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-texto);
    margin: 0 0 3px;
}

.item-info .descripcion {
    font-size: 0.88rem;
    color: #666;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.badge-cantidad {
    font-size: 0.82rem;
    font-weight: 600;
    color: #444;
    background: #f0f0f5;
    border: 1px solid #e0e0e8;
    border-radius: 20px;
    padding: 2px 9px;
}

.badge-descuento {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: #e67e22;
    border-radius: 20px;
    padding: 2px 8px;
}

/* ── Bloque precio + botón ───────────────────────────────── */
.item-accion {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.precio-unit {
    font-size: 0.83rem;
    color: #767676;
    white-space: nowrap;
    text-align: right;
    margin: 0;
}

.item-accion .precio {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-texto);
    white-space: nowrap;
    min-width: 72px;
    text-align: right;
    margin: 0;
}

.contador {
    display: flex;
    align-items: center;
}

/* ── Botón eliminar ──────────────────────────────────────── */
.btn-eliminar {
    background: var(--color-rojo);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}

.btn-eliminar:hover {
    background: var(--color-rojo-hover);
    transform: translateY(-1px);
}

.btn-eliminar:active {
    transform: translateY(0);
}

/* ── Fila total por usuario ──────────────────────────────── */
.fila-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f6f8fb;
    border-top: 1px solid #e8e8e8;
    font-size: 0.92rem;
    color: #666;
}

.total-importe {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-texto);
}

/* ── Estado vacío ────────────────────────────────────────── */
.vacio-contenedor {
    text-align: center;
    padding: 60px 0;
}

.vacio {
    font-size: 1rem;
    color: #ccc;
}

/* ── Modal overlay ───────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 28, 44, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
    animation: slideUp .25s ease-out;
}

.modal-header i {
    font-size: 2.8rem;
    color: var(--color-rojo);
    margin-bottom: 12px;
    display: block;
    text-align: center;
}

.modal-content h2 {
    text-align: center;
    color: var(--color-texto);
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.modal-descripcion {
    text-align: center;
    color: #777;
    font-size: 0.88rem;
    margin-bottom: 22px;
    line-height: 1.5;
}

/* ── Textarea ────────────────────────────────────────────── */
.campo-nota {
    margin-bottom: 22px;
}

.campo-nota label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.campo-nota textarea {
    width: 100%;
    min-height: 88px;
    padding: 11px 13px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}

.campo-nota textarea:focus {
    outline: none;
    border-color: var(--color-rojo);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(227, 27, 35, 0.1);
}

/* ── Botones del modal ───────────────────────────────────── */
.modal-actions {
    display: flex;
    gap: 10px;
}

.btn-cancelar, .btn-confirmar-borrar {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s;
}

.btn-cancelar {
    background: #f0f0f0;
    color: #666;
}

.btn-cancelar:hover { background: #e5e5e5; }

.btn-confirmar-borrar {
    background: var(--color-rojo);
    color: #fff;
}

.btn-confirmar-borrar:hover { background: var(--color-rojo-hover); }

/* ── Animación modal ─────────────────────────────────────── */
@keyframes slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Responsive tablet ───────────────────────────────────── */
@media (max-width: 768px) {
    .header-admin { padding: 20px 20px 12px; }
    hr { margin: 0 20px 18px; }
    .cuadricula_reservas { padding: 0 20px 32px; }
    .item-reserva { gap: 12px; padding: 12px 16px; }
    .item-reserva img { width: 56px; height: 56px; }
}

/* ── Responsive móvil ────────────────────────────────────── */
@media (max-width: 480px) {
    .header-admin { padding: 16px 14px 10px; }
    hr { margin: 0 14px 14px; }
    .cuadricula_reservas { padding: 0 14px 24px; gap: 20px; }

    .item-reserva {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 14px;
    }

    .item-accion {
        width: 100%;
        justify-content: space-between;
        padding-left: calc(56px + 10px);
    }

    .item-reserva img { width: 52px; height: 52px; }
}
