:root {
    --bg: #f7f5fb;
    --panel: #ffffff;
    --text: #201635;
    --muted: #6c6582;
    --violet: #5c2fa7;
    --violet-dark: #2f1e57;
    --orange: #ff8a32;
    --green: #16a34a;
    --red: #dc2626;
    --border: rgba(31,21,56,0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --shadow: 0 16px 45px rgba(20, 11, 37, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: linear-gradient(180deg, #120b23 0%, #171129 100%);
    color: #fff;
    box-shadow: 0 8px 30px rgba(17,11,34,.18);
}

.admin-topbar__inner,
.admin-nav,
.admin-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 0 auto;
}

.admin-topbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 0 14px;
}

.admin-topbar__inner h1 {
    margin: 4px 0 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -.04em;
}

.admin-topbar__eyebrow {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .7;
    font-weight: 700;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user {
    color: rgba(255,255,255,.75);
    font-weight: 600;
}

.admin-nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 0 18px;
}

.admin-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    white-space: nowrap;
    font-weight: 700;
    font-size: 14px;
}

.admin-shell {
    padding: 28px 0 48px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--solid {
    background: linear-gradient(135deg, var(--orange), #ffb54d);
    color: #1b112f;
    box-shadow: 0 14px 28px rgba(255,138,50,.18);
}

.btn--ghost {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn--ghost-light {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
}

.btn--danger {
    background: #fff0f1;
    color: #b43243;
    border: 1px solid rgba(180,50,67,.14);
}

.btn--success {
    background: #ecfdf3;
    color: #0d7a44;
    border: 1px solid rgba(13,122,68,.14);
}

.btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.admin-grid {
    display: grid;
    gap: 18px;
}

.admin-grid--stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.admin-card,
.admin-panel {
    background: var(--panel);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.admin-card {
    padding: 22px;
}

.admin-card span {
    display: block;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.admin-card strong {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
    letter-spacing: -.04em;
}

.admin-panel {
    padding: 24px;
}

.admin-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-panel__head h2,
.admin-panel__head h3 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -.03em;
}

.admin-panel__head p {
    margin: 6px 0 0;
    color: var(--muted);
}

.filters,
.form-grid {
    display: grid;
    gap: 16px;
}

.filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }

.field label {
    font-size: 14px;
    font-weight: 700;
    color: #23183b;
}

.field input,
.field select,
.field textarea {
    min-height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(31,21,56,.12);
    background: #fbfbfe;
    padding: 14px 16px;
    outline: none;
}

.field textarea {
    min-height: 130px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(92,47,167,.36);
    box-shadow: 0 0 0 4px rgba(92,47,167,.1);
    background: #fff;
}

.field small {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    border-radius: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid rgba(31,21,56,.06);
    vertical-align: top;
}

tbody tr:hover {
    background: #fbfbfe;
}

.group-title {
    margin: 0 0 12px;
    font-size: 1.1rem;
    color: var(--violet-dark);
}

.group-title span {
    color: var(--muted);
    font-size: .95rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}
.status-pending { background: rgba(255,183,77,0.16); color: #9a6700; }
.status-approved { background: rgba(22,163,74,0.14); color: #0d7c44; }
.status-rejected { background: rgba(220,38,38,0.14); color: #a12626; }
.status-default { background: rgba(92,47,167,0.1); color: var(--violet); }

.flash {
    width: min(1220px, calc(100% - 28px));
    margin: 18px auto 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}
.flash--success { background: #ecfdf3; color: #0d7c44; border: 1px solid rgba(13,122,68,.12); }
.flash--error { background: #fff0f1; color: #b43243; border: 1px solid rgba(180,50,67,.12); }

.kpi-list {
    display: grid;
    gap: 12px;
}

.kpi-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(31,21,56,.06);
    font-weight: 700;
}

.kpi-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    gap: 18px;
}

.detail-list {
    display: grid;
    gap: 12px;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(31,21,56,.06);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.image-frame {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(31,21,56,.08);
    background: linear-gradient(135deg, rgba(92,47,167,.07), rgba(16,196,200,.06));
}

.image-frame img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.stacked-actions {
    display: grid;
    gap: 12px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.login-screen {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(16,196,200,.14), transparent 28%),
        radial-gradient(circle at top right, rgba(255,138,50,.14), transparent 22%),
        linear-gradient(180deg, #120b23 0%, #171129 100%);
}

.login-card {
    width: min(480px, 100%);
    padding: 30px;
    background: rgba(255,255,255,.96);
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(17,11,34,.24);
}

.login-card h1 {
    margin: 10px 0 12px;
    font-size: 2.2rem;
    letter-spacing: -.05em;
}

.login-card p {
    color: var(--muted);
    margin-top: 0;
}

.helper-box {
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(92,47,167,.07), rgba(16,196,200,.06));
    color: #4a4561;
    border: 1px solid rgba(92,47,167,.1);
}

.media-preview {
    width: 100%;
    max-width: 340px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(31,21,56,.08);
    background: #faf9fd;
}

.admin-note {
    color: var(--muted);
    font-size: .95rem;
}

@media (max-width: 980px) {
    .admin-grid--stats,
    .filters,
    .form-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .admin-topbar__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .admin-shell {
        padding-top: 20px;
    }
}


/* ===== Patch abril 2026: zoom y limpieza de reservas ===== */
.btn--danger-outline {
    background: #fff;
    color: #b43243;
    border: 1px solid rgba(180,50,67,.22);
}

.btn--danger-outline:hover {
    background: #fff5f6;
}

.image-frame--button {
    width: 100%;
    padding: 0;
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    background: #f7f5fb;
}

.image-frame--button img {
    width: 100%;
}

.image-frame__hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(20, 11, 37, 0.75);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.lightbox-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 120;
}

.lightbox-modal.is-open {
    display: flex;
}

.lightbox-modal__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(10, 8, 17, 0.82);
    cursor: pointer;
}

.lightbox-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-modal__dialog img {
    max-width: 100%;
    max-height: calc(100vh - 40px);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    background: #fff;
}

.lightbox-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(20, 11, 37, 0.82);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}
