/* Bases tipograficas y layout accesible */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap');

:root {
    --color-bg: #f5f6fa;
    --color-surface: #ffffff;
    --color-surface-muted: #f0f4ff;
    --color-border: #e2e8f0;
    --color-primary: #1d4ed8;
    --color-primary-dark: #1e3a8a;
    --color-text: #1f2933;
    --color-text-muted: #566270;
    --radius-lg: 1.25rem;
    --radius-md: 0.85rem;
    --transition-base: 180ms ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[x-cloak] {
    display: none !important;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
    /* Evita el rebote elastico en moviles */
}


.auth-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    /* Soporte para moviles modernos */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 5vw, 2rem);
    /* Padding un poco mas relajado */
    background: radial-gradient(circle at top left, rgba(34, 72, 172, 0.45), transparent 55%),
        radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.35), transparent 55%),
        #0b1226;
    overflow-x: hidden;
    width: 100%;
    color: #e2e8f0;
    font-family: 'Sora', 'Inter', system-ui, -apple-system, sans-serif;
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    width: clamp(260px, 45vw, 520px);
    height: clamp(260px, 45vw, 520px);
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.55;
    z-index: 0;
}

.auth-page::before {
    background: rgba(59, 130, 246, 0.6);
    top: -180px;
    left: -160px;
}

.auth-page::after {
    background: rgba(168, 85, 247, 0.55);
    bottom: -200px;
    right: -160px;
}

.auth-stage {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    display: grid;
    gap: clamp(1.8rem, 3.5vw, 3.2rem);
    justify-items: center;
    text-align: center;
}

.auth-brand {
    display: grid;
    gap: 0.75rem;
}

.auth-brand__logo {
    width: clamp(56px, 8vw, 84px);
    height: clamp(56px, 8vw, 84px);
    border-radius: 18px;
    object-fit: contain;
    margin: 0 auto;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45));
}

.auth-brand__title {
    font-size: clamp(1.9rem, 1.6vw + 1.2rem, 2.6rem);
    font-weight: 700;
    color: #f8fafc;
}

.auth-brand__subtitle {
    font-size: 1rem;
    color: rgba(226, 232, 240, 0.7);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    margin: auto;
    /* Centrado extra seguro */
    background: rgba(13, 18, 36, 0.78);
    border-radius: 1.6rem;
    padding: clamp(1.2rem, 3.2vw + 0.5rem, 2.4rem);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(12px);
    display: grid;
    gap: 1.4rem;
}

.auth-card__title {
    font-size: clamp(1.35rem, 1.2vw + 1rem, 1.6rem);
    font-weight: 700;
    color: #f8fafc;
}

.auth-card__subtitle {
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    color: rgba(226, 232, 240, 0.72);
    line-height: 1.6;
}

.auth-form {
    display: grid;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    text-align: left;
}

.auth-field {
    display: grid;
    gap: clamp(0.45rem, 0.8vw, 0.6rem);
}

.auth-field label {
    font-weight: 600;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    color: rgba(226, 232, 240, 0.9);
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.75);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: clamp(0.55rem, 0.8vw, 0.7rem) clamp(0.9rem, 2vw, 1.1rem);
    min-height: clamp(2.75rem, 3vw, 3.3rem);
    gap: 0.6rem;
}

.auth-input__icon {
    width: 18px;
    height: 18px;
    color: rgba(226, 232, 240, 0.65);
}

.auth-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #f8fafc;
    font-size: clamp(1rem, 0.4vw + 0.85rem, 1.05rem);
    line-height: 1.3;
    outline: none;
}

.auth-input::placeholder {
    color: rgba(226, 232, 240, 0.45);
}

/* Fix para evitar zoom en iOS al hacer focus */
@media screen and (-webkit-min-device-pixel-ratio:0) {

    select,
    textarea,
    input {
        font-size: 16px !important;
    }
}

.auth-input:focus-visible {
    outline: none;
}

.auth-input-wrap:focus-within {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.auth-helper {
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.6);
}

.auth-helper--error {
    color: #f87171;
    font-weight: 500;
}

.auth-feedback {
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    border: 1px solid transparent;
}

.auth-feedback ul {
    margin-left: 1rem;
}

.auth-submit {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: clamp(0.85rem, 1.2vw, 1rem) clamp(0.9rem, 2vw, 1.15rem);
    min-height: clamp(2.9rem, 3.2vw, 3.4rem);
    font-weight: 600;
    font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.35);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(37, 99, 235, 0.5);
    outline: none;
}

.auth-footnote {
    text-align: center;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    color: rgba(226, 232, 240, 0.7);
}

.auth-footnote a {
    color: #7dd3fc;
    font-weight: 600;
    text-decoration: none;
}

.auth-footnote a:hover,
.auth-footnote a:focus-visible {
    color: #bae6fd;
    text-decoration: underline;
}

/* --- Layout Responsive General --- */
.main-shell {
    display: grid;
    gap: clamp(1.4rem, 1.2vw + 1rem, 2.2rem);
}

.page-container {
    display: grid;
    gap: clamp(1.25rem, 1vw + 1rem, 2rem);
    padding-block: clamp(1.2rem, 1.5vw + 0.5rem, 2.2rem);
}

.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.page-title {
    font-size: clamp(1.5rem, 1.1vw + 1.25rem, 2.2rem);
    font-weight: 700;
    color: #0f172a;
}

.page-subtitle {
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    color: #64748b;
    max-width: 720px;
}

.section-card {
    background: var(--color-surface);
    border-radius: 1.5rem;
    padding: clamp(1.4rem, 1.2vw + 1rem, 2rem);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.section-card__stats {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: stretch;
}

@media (max-width: 640px) {
    .section-card__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .section-card__stats .stat-card {
        padding: 0.85rem 0.65rem;
        font-size: 0.85rem;
    }

    .section-card__stats .stat-card span {
        font-size: 1.1rem;
    }
}

.section-card--flush {
    padding: clamp(1rem, 0.8vw + 0.8rem, 1.6rem);
}

.section-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.section-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.responsive-grid {
    display: grid;
    gap: clamp(1rem, 1.2vw + 0.6rem, 1.75rem);
}

.responsive-grid--cards {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 1.1rem;
    border: 1px solid rgba(226, 232, 240, 0.7);
    background: var(--color-surface);
    box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.4);
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 999px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    min-width: 640px;
}

.table thead {
    background: #f8fafc;
    color: #1e293b;
    text-align: left;
    font-weight: 600;
}

.table th,
.table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.table tbody tr:hover {
    background: rgba(241, 245, 249, 0.65);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pill--success {
    background: #dcfce7;
    color: #166534;
}

.status-pill--warning {
    background: #fef3c7;
    color: #92400e;
}

.status-pill--danger {
    background: #fee2e2;
    color: #b91c1c;
}

.stack-list {
    display: grid;
    gap: 0.75rem;
}

.text-muted {
    color: #64748b;
}

.btn-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #fff;
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
    transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.btn-inline:hover,
.btn-inline:focus-visible {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    transform: translateY(-1px);
    outline: none;
}

.floating-action {
    position: fixed;
    right: clamp(16px, 4vw, 28px);
    bottom: clamp(16px, 4vw, 28px);
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.floating-action:hover,
.floating-action:focus-visible {
    transform: translateY(-4px) scale(1.05);
    outline: none;
}

.floating-action img,
.floating-action button {
    width: 132px;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table {
        min-width: 520px;
    }

    .floating-action {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        width: min(92vw, 360px);
        border-radius: 1.6rem;
        padding: 1.9rem;
    }

    .table {
        min-width: 480px;
    }
}




.auth-feedback--error {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #fee2e2;
}

.auth-feedback--success {
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #dcfce7;
}


body.nav-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: -200px;
    left: 1.5rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.25);
    z-index: 2000;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 1.25rem;
    outline: none;
}

.layout-shell {
    flex: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.nav-drawer {
    background: var(--color-surface);
    width: 280px;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
}

.nav-drawer__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.nav-drawer__items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0;
}

.nav-drawer__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
    font-weight: 500;
}

.nav-drawer__link:hover,
.nav-drawer__link:focus-visible {
    background: var(--color-surface-muted);
    color: var(--color-primary);
    transform: translateX(4px);
    outline: none;
}

.nav-drawer__link[aria-current="page"] {
    background: rgba(29, 78, 216, 0.12);
    color: var(--color-primary);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-drawer__section {
    display: grid;
    gap: 0.35rem;
}

.nav-drawer__caption {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
}

.nav-drawer__user {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 0.5rem;
}

.nav-drawer__user-card {
    display: grid;
    gap: 0.15rem;
    color: var(--color-text);
}

.nav-drawer__user-name {
    font-weight: 600;
}

.nav-drawer__user-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: capitalize;
}

.nav-drawer__user-actions {
    display: grid;
    gap: 0.5rem;
}

.nav-drawer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.nav-drawer__button:hover,
.nav-drawer__button:focus-visible {
    background: rgba(29, 78, 216, 0.1);
    color: var(--color-primary);
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.15);
}

.nav-drawer__button--outline {
    background: var(--color-surface);
}

.nav-drawer__button--inverted {
    background: var(--color-primary);
    color: #fff;
    border-color: transparent;
}

.nav-drawer__button--inverted:hover,
.nav-drawer__button--inverted:focus-visible {
    background: var(--color-primary-dark);
    color: #fff;
}

.top-bar__logo {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

.top-bar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar__welcome {
    color: var(--color-text-muted);
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
}

.top-bar__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.top-bar__cta:hover,
.top-bar__cta:focus-visible {
    background: var(--color-primary-dark);
    border-color: transparent;
    outline: none;
    box-shadow: 0 12px 22px rgba(29, 78, 216, 0.2);
}

.top-bar__cta--link {
    background: transparent;
    color: var(--color-primary);
    border-color: transparent;
}

.top-bar__cta--link:hover,
.top-bar__cta--link:focus-visible {
    color: var(--color-primary-dark);
    box-shadow: none;
}

@media (max-width: 639px) {
    .top-bar__welcome {
        display: none;
    }
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.5rem;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.top-bar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
    text-decoration: none;
}

.top-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    color: var(--color-text-muted);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(29, 78, 216, 0.18);
    outline: none;
}

.main-content {
    flex: 1;
    width: 100%;
    padding: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
}

.main-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: clamp(1.4rem, 0.8vw + 1.1rem, 2rem);
    font-weight: 700;
    color: var(--color-text);
}

.nav-overlay {
    display: none;
}

body.nav-open .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1000;
}


.skip-link {
    position: fixed;
    top: -200px;
    left: 1.5rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(29, 78, 216, 0.25);
    z-index: 2000;
    transition: top var(--transition-base);
}

.skip-link:focus {
    top: 1.25rem;
    outline: none;
}

.layout-shell {
    flex: 1;
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.nav-drawer {
    background: var(--color-surface);
    width: 280px;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    overflow-y: auto;
}

.nav-drawer__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.nav-drawer__items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0;
}

.nav-drawer__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 0.75rem;
    transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
    font-weight: 500;
}

.nav-drawer__link:hover,
.nav-drawer__link:focus-visible {
    background: var(--color-surface-muted);
    color: var(--color-primary);
    transform: translateX(4px);
    outline: none;
}

.nav-drawer__link[aria-current="page"] {
    background: rgba(29, 78, 216, 0.12);
    color: var(--color-primary);
    box-shadow: inset 3px 0 0 var(--color-primary);
}

.nav-drawer__section {
    display: grid;
    gap: 0.35rem;
}

.nav-drawer__caption {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
}

.nav-drawer__user {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 0.5rem;
}

.nav-drawer__user-card {
    display: grid;
    gap: 0.15rem;
    color: var(--color-text);
}

.nav-drawer__user-name {
    font-weight: 600;
}

.nav-drawer__user-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: capitalize;
}

.nav-drawer__user-actions {
    display: grid;
    gap: 0.5rem;
}

.nav-drawer__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.nav-drawer__button:hover,
.nav-drawer__button:focus-visible {
    background: rgba(29, 78, 216, 0.1);
    color: var(--color-primary);
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.15);
}

.nav-drawer__button--outline {
    background: var(--color-surface);
}

.nav-drawer__button--inverted {
    background: var(--color-primary);
    color: #fff;
    border-color: transparent;
}

.nav-drawer__button--inverted:hover,
.nav-drawer__button--inverted:focus-visible {
    background: var(--color-primary-dark);
    color: #fff;
}

.top-bar__logo {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
}

.top-bar__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar__welcome {
    color: var(--color-text-muted);
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
}

.top-bar__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.top-bar__cta:hover,
.top-bar__cta:focus-visible {
    background: var(--color-primary-dark);
    border-color: transparent;
    outline: none;
    box-shadow: 0 12px 22px rgba(29, 78, 216, 0.2);
}

.top-bar__cta--link {
    background: transparent;
    color: var(--color-primary);
    border-color: transparent;
}

.top-bar__cta--link:hover,
.top-bar__cta--link:focus-visible {
    color: var(--color-primary-dark);
    box-shadow: none;
}

@media (max-width: 639px) {
    .top-bar__welcome {
        display: none;
    }
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 1200;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.65);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1.5rem;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.top-bar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
    text-decoration: none;
}

.top-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    color: var(--color-text-muted);
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-primary);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(29, 78, 216, 0.18);
    outline: none;
}

.main-content {
    flex: 1;
    width: 100%;
    padding: clamp(1.5rem, 1.5vw + 1rem, 2.5rem);
}

.main-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: clamp(1.4rem, 0.8vw + 1.1rem, 2rem);
    font-weight: 700;
    color: var(--color-text);
}

.nav-overlay {
    display: none;
}

body.nav-open .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1000;
}


@media (max-width: 1023px) {
    .layout-shell {
        flex: 1;
        min-height: auto;
    }

    .nav-drawer {
        position: fixed;
        inset: 0 auto 0 0;
        max-width: 320px;
        transform: translateX(-120%);
        box-shadow: 20px 0 40px rgba(15, 23, 42, 0.18);
        transition: transform var(--transition-base);
        z-index: 1100;
    }

    .nav-drawer.nav-drawer--open {
        transform: translateX(0);
    }

    .main-content {
        padding: clamp(1.25rem, 5vw, 2rem);
    }
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    .top-bar {
        position: sticky;
    }
}

/* ====== ESPACIADOS ENTRE SECCIONES ====== */
section,
hr,
h2,
h3 {
    margin-bottom: 30px;
}

.resumen,
.usuarios,
.cartones-admin {
    margin-bottom: 40px;
}

/* ====== MENÚ LATERAL ====== */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    color: #202123;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-right: 1px solid #e0e0e0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    z-index: 1300;
    transform: translateX(-100%);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar ul li a {
    color: #202123;
    text-decoration: none;
    display: block;
    padding: 14px 18px;
    border-radius: 12px;
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 10px;
}

.sidebar ul li a:hover {
    background-color: #f1f1f1;
    transform: scale(1.02);
}

.sidebar h2 {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    color: #10a37f;
}

/* ====== BOTÓN MENÚ RESPONSIVE ====== */
.toggle-menu {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    background-color: #10a37f;
    color: white;
    border: none;
    padding: 12px 18px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1100;
    border-radius: 12px;
    transition: background-color 0.3s, transform 0.2s;
}

.toggle-menu:hover {
    background-color: #0e8c6e;
    transform: scale(1.05);
}

/* ====== FONDO OSCURO CUANDO MENÚ ESTÁ ABIERTO ====== */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1200;
}

.menu-overlay.active {
    display: block;
}

/* ====== CONTENIDO PRINCIPAL ====== */
h1,
h2,
h3 {
    color: #202123;
    margin-bottom: 20px;
}

/* ====== BOTONES GENERALES ====== */
button,
.btn,
.btn-logout {
    background-color: #10a37f;
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-decoration: none;
    font-size: 16px;
    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover,
.btn:hover,
.btn-logout:hover {
    background-color: #0e8c6e;
    transform: scale(1.05);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* ====== EFECTO RESPONSIVE ====== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

/* ====== TABLAS ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    padding: 18px 14px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

th {
    background-color: #10a37f;
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

table td img {
    margin: 5px 0;
}

/* ====== FORMULARIOS LOGIN Y REGISTRO ====== */
.form-container {
    background-color: #4a4a4a;
    padding: 40px 50px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    margin: 100px auto;
    color: white;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.form-container input[type="text"],
.form-container input[type="password"],
.form-container input[type="tel"],
select,
input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.form-container input[type="checkbox"] {
    margin-right: 10px;
}

.form-container button {
    background-color: #3498db;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

.form-container button:hover {
    background-color: #2980b9;
}

.form-container a {
    color: #3498db;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 15px;
}

.form-container a:hover {
    text-decoration: underline;
}

/* ====== MENSAJE FLOTANTE DE ÉXITO ====== */
.success-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeInOut 4s ease forwards;
    z-index: 2000;
    font-size: 16px;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* ====== NOTIFICACIONES GLOBALES ====== */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 2000;
    font-size: 16px;
}

.toast-notification.error {
    background-color: #e74c3c;
}

.toast-notification.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ====== CARTONES ====== */
.cartones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.carton {
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    width: 150px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.carton:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.carton img {
    max-width: 100%;
    border-radius: 5px;
}

.carton.selected {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    border: 2px solid #4CAF50;
    background-color: #e8f5e9;
}

/* RESPONSIVE CARTONES */
@media (max-width: 768px) {
    .carton {
        width: 120px;
    }
}

.btn-reservar-multiple:hover {
    background-color: #2980b9;
    transform: scale(1.05);
    transition: all 0.2s;
}

.filtros a {
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    margin-right: 15px;
    background: #eee;
    color: #333;
}

.filtros a.active {
    background: #10a37f;
    color: #fff;
}

.btn-download {
    display: inline-block;
    padding: 12px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-download:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-download:active {
    transform: translateY(0);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* ====== ESTILO CUPÓN FLOTANTE ====== */
/* ====== TIPOGRAFÍA ====== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f7f7f8;
    color: #202123;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ====== DEMÁS ESTILOS EXISTENTES ====== */
/* ... conserva TODO tu CSS previo sin cambios ... */

/* ====== ESTILO CUPÓN FLOTANTE ====== */
#cupon-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#cupon-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
}

#cupon-flotante {
    display: block;
    /* ya no oculto */
    width: 100px;
    height: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#cupon-flotante:hover {
    transform: scale(1.1);
}

.header-admin {
    background: #3498db;
    color: #fff;
    padding: 22px 0 10px 0;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 16px #0001;
    margin-bottom: 18px;
    text-align: center;
    letter-spacing: 1px;
}

.panel-search {
    max-width: 520px;
    margin: 0 auto 10px auto;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.panel-search input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d0d7e2;
    border-radius: 10px;
    font-size: 1rem;
}

.panel-search .estado-label {
    margin-left: 15px;
    font-size: 1.02rem;
    font-weight: 600;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 14px;
}

.panel-actions button,
.panel-actions a {
    padding: 11px 18px;
    border-radius: 11px;
    border: none;
    font-size: 1.01rem;
    font-weight: 500;
    box-shadow: 0 2px 10px #0001;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .14s;
}

.panel-actions .btn-insert {
    background: #2ecc71;
    color: #fff;
}

.panel-actions .btn-gift {
    background: #6c5ce7;
    color: #fff;
}

.panel-actions .btn-danger {
    background: #e74c3c;
    color: #fff;
}

.panel-actions .btn-insert:hover,
.panel-actions .btn-gift:hover,
.panel-actions .btn-danger:hover {
    filter: brightness(0.95);
}

.panel-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    font-size: 1.06rem;
    font-weight: 500;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    color: #333;
    text-align: center;
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    min-width: 0;
}

.stat-card span {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2563eb;
}



@media (max-width: 600px) {
    .panel-stats {
        flex-direction: column;
        align-items: center;
    }

    .stat-card {
        width: 100%;
        margin-bottom: 10px;
    }
}

.panel-filtros {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-bottom: 13px;
    flex-wrap: wrap;
}

.panel-filtros button {
    border: none;
    background: #f1f4f8;
    color: #2c3e50;
    font-weight: 500;
    border-radius: 9px;
    padding: 7px 15px;
    cursor: pointer;
    transition: background .15s;
}

.panel-filtros button.selected,
.panel-filtros button:active {
    background: #1976d2;
    color: #fff;
}

.table-admin {
    width: 98%;
    margin: 0 auto 40px auto;
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 2px 14px #0001;
    overflow-x: auto;
}

.table-admin table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.02rem;
}

.table-admin th,
.table-admin td {
    padding: 12px 7px;
    border-bottom: 1px solid #ebedf1;
    text-align: center;
}

.table-admin th {
    background: #f1f4f8;
    font-weight: 600;
    color: #1976d2;
}

.table-admin tr:hover {
    background: #f8fafc;
}

.table-admin img {
    max-width: 58px;
    border-radius: 6px;
    box-shadow: 0 1px 8px #0001;
}

.table-admin select,
.table-admin input,
.table-admin button {
    border-radius: 7px;
    border: 1px solid #d0d7e2;
    padding: 7px;
}

.table-admin button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 7px 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background .13s;
}

.table-admin button:hover {
    background: #217dbb;
}

@media (max-width: 900px) {

    .table-admin th:nth-child(5),
    .table-admin td:nth-child(5),
    .table-admin th:nth-child(6),
    .table-admin td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 700px) {
    .header-admin {
        font-size: 1.35rem;
        padding: 13px 0 6px 0;
    }

    .panel-search input {
        font-size: 0.92rem;
    }

    .table-admin th,
    .table-admin td {
        font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
        padding: 8px 3px;
    }
}

@media (max-width: 540px) {
    .table-admin {
        font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
    }

    .panel-actions button,
    .panel-actions a {
        padding: 8px 6px;
        font-size: 0.92rem;
    }

    .panel-search input {
        padding: 7px 5px;
    }
}

html,
body {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 0;
}



.site-footer {
    margin-top: auto;
    padding: 2rem 0 2.5rem;
    color: var(--color-text-muted);
}

.site-footer__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
}


.ticket-grid {
    display: grid;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.ticket-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.6);
    display: grid;
    gap: 0.75rem;
    text-align: center;
}

.ticket-card__image {
    width: 100%;
    border-radius: 0.95rem;
}

.ticket-card__number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.ticket-card__label {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.ticket-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.ticket-card__cta:hover,
.ticket-card__cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    outline: none;
}

.ticket-card__badge {
    color: #15803d;
    font-weight: 700;
    font-size: 0.85rem;
}

.float-icon {
    background: transparent;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    box-shadow: none;
}

.float-icon img {
    display: block;
    width: 132px;
    height: auto;
    filter: drop-shadow(0 16px 22px rgba(15, 23, 42, 0.25));
    animation: coupon-pulse 2.4s ease-in-out infinite;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1200;
}

.modal-backdrop[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .ticket-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

.form-grid {
    display: grid;
    gap: 0.85rem;
}

.form-row {
    display: grid;
    gap: 0.5rem;
}

.form-label {
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    font-weight: 600;
    color: #1e293b;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border-radius: 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(248, 250, 252, 0.95);
    padding: 0.7rem 0.9rem;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    transition: border 160ms ease, box-shadow 160ms ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 0.9rem;
    padding: 0.75rem 1.1rem;
    font-weight: 600;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f3ad3);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.28);
    outline: none;
}

.modal-card {
    background: #fff;
    border-radius: 1.15rem;
    padding: clamp(0.85rem, 0.8vw + 0.7rem, 1.2rem);
    width: 90%;
    max-width: 340px;
    position: relative;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.modal-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.modal-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.modal-card__close {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    color: #64748b;
}

.info-bubble {
    position: absolute;
    top: 60px;
    right: 1.2rem;
    background: #fff;
    border-radius: 1.1rem;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.18);
    padding: 1rem;
    max-width: 260px;
    font-size: 0.85rem;
    color: #1f2933;
    display: none;
}

.info-bubble__title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.info-bubble__action {
    margin-top: 0.75rem;
}

.floating-action--gift {
    bottom: calc(clamp(16px, 4vw, 28px) + clamp(120px, 32vw, 132px));
}

.floating-action--payment {
    bottom: clamp(16px, 4vw, 28px);
}

@media (max-width: 640px) {
    .top-bar {
        padding: 0.55rem 1rem;
        gap: 0.5rem;
    }

    .top-bar__brand {
        font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
        gap: 0.5rem;
    }

    .top-bar__logo {
        width: 28px;
        height: 28px;
    }

    .top-bar__actions,
    .top-bar__user {
        gap: 0.45rem;
    }

    .top-bar__welcome {
        display: none;
    }

    .top-bar__cta {
        padding: 0.45rem 0.8rem;
        font-size: 0.85rem;
    }

    .nav-drawer {
        max-width: 88vw;
        padding: 1.8rem 1.25rem;
    }

    .nav-drawer__button,
    .nav-drawer__button--inverted {
        padding: 0.6rem 0.85rem;
        font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    }

    .nav-drawer__link {
        padding: 0.6rem 0.75rem;
        gap: clamp(0.45rem, 0.8vw, 0.6rem);
    }

    .nav-drawer__link i {
        min-width: 1.1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 0.5rem 0.75rem;
    }

    .nav-toggle {
        width: 2.4rem;
        height: 2.4rem;
    }

    .nav-drawer {
        max-width: 90vw;
        padding: 1.6rem 1.1rem;
    }

    .nav-drawer__button,
    .nav-drawer__button--inverted {
        padding: 0.55rem 0.75rem;
        border-radius: 0.85rem;
    }

    .nav-drawer__link {
        padding: 0.55rem 0.7rem;
    }
}

body.nav-open .top-bar {
    visibility: hidden;
}


@media (max-width: 480px) {
    .section-card__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.25rem;
        padding: 0.3rem;
    }

    .section-card__stats .stat-card {
        padding: 0.45rem 0.3rem;
        font-size: 0.65rem;
    }

    .section-card__stats .stat-card span {
        font-size: 0.82rem;
    }
}

.section-header__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

}


.section-header__actions {
    margin-left: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.header-pay-button {
    border: none;
    background: transparent;
    padding: 0.25rem;
    border-radius: 24px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.header-pay-button img {
    display: block;
    width: 86px;
    height: 86px;
    border-radius: 22px;
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.18);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.header-pay-button:hover,
.header-pay-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 28px 44px rgba(15, 23, 42, 0.24);
    outline: none;
}

@media (max-width: 768px) {
    .header-pay-button img {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

@media (max-width: 520px) {
    .section-header__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .header-pay-button {
        background: #22c55e;
        padding: 0.35rem;
        box-shadow: 0 16px 26px rgba(34, 197, 94, 0.3);
    }

    .header-pay-button img {
        width: 48px;
        height: 48px;
        border-radius: 15px;
        box-shadow: none;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}



.modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 340px;
    width: 92%;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', sans-serif;
    animation: fadeIn 0.3s ease;
}


.modal-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.modal-card__title {
    flex: 1;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 600;
    color: #0f172a;
}

.modal-info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.28);
    cursor: pointer;
}

.modal-info-button span {
    line-height: 1;
}

.modal-info-button--secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-size: 0.85rem;
    border-radius: 0.75rem;
    padding: 0.45rem 0.9rem;
    box-shadow: none;
    width: auto;
    height: auto;
}

.modal-form {
    margin-top: 0.6rem;
    gap: 0.6rem;
}

.modal-form .form-row {
    gap: 0.25rem;
}

.modal-form .form-row--inline {
    display: grid;
    grid-template-columns: minmax(70px, 85px) 1fr;
    gap: 0.45rem;
    align-items: center;
}

.modal-form .form-input,
.modal-form .form-select,
.modal-form .form-textarea {
    background: #f5f8ff;
    border: 1px solid #cddcff;
    border-radius: 0.9rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.93rem;
    color: #0f172a;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.modal-form .form-input::placeholder {
    color: #92a4c7;
}

.modal-form .form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2rem;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233463ff' d='M6 8L0 0h12L6 8z'/%3E%3C/svg%3E");
    cursor: pointer;
}

.modal-form .form-select--prefix {
    max-width: 92px;
    padding-left: 0.7rem;
    padding-right: 1.75rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-form .form-input:focus,
.modal-form .form-select:focus,
.modal-form .form-textarea:focus {
    outline: none;
    border-color: #3968ff;
    box-shadow: 0 0 0 3px rgba(57, 104, 255, 0.2);
    background: #fff;
}

.modal-form .form-input--file {
    padding: 0.45rem 0.85rem;
    cursor: pointer;
}

.modal-form .form-input--file::file-selector-button {
    margin-right: 0.65rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.7rem;
    border: 1px solid #cddcff;
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
}

.modal-form .form-input--date::-webkit-calendar-picker-indicator {
    filter: hue-rotate(200deg) saturate(1.2);
}

.modal-submit {
    width: 100%;
    border: none;
    border-radius: 0.85rem;
    padding: 0.65rem 0.9rem;
    font-weight: 600;
    font-size: 0.93rem;
    color: #fff;
    background: linear-gradient(135deg, #2f7bff, #1652ff);
    box-shadow: 0 12px 22px rgba(45, 108, 255, 0.24);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.modal-submit:hover,
.modal-submit:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(45, 108, 255, 0.26);
    outline: none;
}












@keyframes coupon-pulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    20% {
        transform: scale(1.05) rotate(-2.5deg);
    }

    40% {
        transform: scale(1.1) rotate(2deg);
    }

    60% {
        transform: scale(1.05) rotate(-1.5deg);
    }

    80% {
        transform: scale(1.08) rotate(1.5deg);
    }
}

@media (max-width: 640px) {

    .floating-action img,
    .floating-action button,
    .float-icon img {
        width: 120px;
    }
}

/* Cartones de regalo */
.gift-page .section-card {
    margin-bottom: clamp(1.2rem, 1.5vw, 2rem);
}

.gift-counter {
    display: grid;
    place-items: center;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.35));
    border-radius: 1rem;
    color: #0f172a;
    min-width: 120px;
    text-align: center;
}

.gift-counter__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gift-counter__value {
    font-size: 1.6rem;
    font-weight: 700;
}

.gift-toolbar {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: space-between;
}

.gift-toolbar__info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
}

.gift-toolbar__toggle {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 999px;
    padding: 0.35rem;
    gap: 0.35rem;
}

.gift-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    background: transparent;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.gift-toggle[aria-pressed="true"] {
    background: #1d4ed8;
    color: #fff;
    box-shadow: 0 10px 24px rgba(29, 78, 216, 0.26);
}

.gift-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.gift-form {
    display: grid;
    gap: 1.5rem;
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.1rem;
}

@media (max-width: 600px) {
    .gift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gift-grid[data-view="numeros"] {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.gift-card {
    position: relative;
    display: grid;
    gap: 0.65rem;
    padding: 0.85rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.gift-card__media {
    position: relative;
    border-radius: 0.85rem;
    overflow: hidden;
}

.gift-card__media img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 16px rgba(15, 23, 42, 0.16));
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.gift-card__number {
    font-weight: 600;
    color: #0f172a;
    text-align: center;
}

.gift-card__number-only {
    display: none;
    font-weight: 700;
    font-size: 2rem;
    color: #1d4ed8;
    text-align: center;
}

.gift-card__badge {
    justify-self: center;
    margin-top: 0.2rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
    text-transform: uppercase;
    transition: background 160ms ease, color 160ms ease;
}


.gift-card--selected {
    border-color: #2563eb;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.22);
    transform: translateY(-4px);
}

.gift-card--selected .gift-card__badge {
    background: #2563eb;
    color: #fff;
}

.gift-card--shake {
    animation: gift-shake 0.4s ease;
}

@keyframes gift-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    50% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }
}

.gift-grid[data-view="numeros"] .gift-card__media {
    display: none;
}

.gift-grid[data-view="numeros"] .gift-card__number {
    display: none;
}

.gift-grid[data-view="numeros"] .gift-card__number-only {
    display: block;
}

.gift-submit {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .gift-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .gift-counter {
        width: 100%;
    }

    .gift-submit {
        position: sticky;
        bottom: 0.5rem;
        z-index: 10;
    }

    .gift-submit .btn-primary {
        width: 100%;
    }
}

.empty-state {
    display: grid;
    gap: 0.65rem;
    text-align: center;
    padding: 1.5rem;
    color: #475569;
}

.empty-state__icon {
    font-size: 2.5rem;
    color: #2563eb;
}

.empty-state__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.empty-state__message {
    margin-bottom: 0.5rem;
}

/* Admin dashboard redesign */
.admin-dashboard {
    padding: clamp(1.5rem, 3vw, 3rem);
    display: grid;
    gap: clamp(1.5rem, 2.5vw, 2.5rem);
}

.dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.04));
    border-radius: 1.5rem;
    padding: clamp(1.5rem, 2.5vw, 2.5rem);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.dashboard-hero__eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: #1d4ed8;
    margin: 0 0 0.35rem 0;
}

.dashboard-hero__title {
    margin: 0;
    font-size: clamp(1.75rem, 2.2vw + 1rem, 2.5rem);
    font-weight: 700;
}

.dashboard-hero__subtitle {
    margin: 0.4rem 0 1rem;
    max-width: 42ch;
    color: #475569;
}

.dashboard-hero__meta {
    font-size: 0.85rem;
    color: #64748b;
}

.dashboard-hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.site-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.6rem 0.35rem 1rem;
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.18);
}

.site-toggle__label {
    font-weight: 600;
    color: #0f172a;
}

.site-toggle__button {
    inline-size: 54px;
    block-size: 28px;
    border-radius: 999px;
    border: none;
    background: #e2e8f0;
    position: relative;
    cursor: pointer;
    transition: background 200ms ease;
}

.site-toggle__button.is-on {
    background: #22c55e;
}

.site-toggle__thumb {
    position: absolute;
    inset-block-start: 4px;
    inset-inline-start: 4px;
    block-size: 20px;
    inline-size: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.18);
    transition: transform 200ms ease;
}

.site-toggle__button.is-on .site-toggle__thumb {
    transform: translateX(26px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 0.9rem;
    border: none;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.24);
}

.btn-primary--ghost {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    box-shadow: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #fff;
    color: #1f2937;
    font-weight: 600;
    cursor: pointer;
    transition: background 160ms ease, border 160ms ease, color 160ms ease;
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.18);
}

.btn-primary--ghost:hover {
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.18);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.kpi-card {
    background: #fff;
    border-radius: 1.2rem;
    padding: 1.2rem;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 0.45rem;
}

.kpi-card__label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.kpi-card__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
}

.kpi-card__meta {
    font-size: 0.85rem;
    color: #475569;
}

.kpi-card--action {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card--action:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(37, 99, 235, 0.18);
}

.kpi-card--action:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 3px;
}

.kpi-card__cta {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-card__cta::after {
    content: '>';
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    line-height: 1;
}


.dashboard-actions {
    display: grid;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.action-bar {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: end;
}

.search-stack {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1rem);
    align-items: stretch;
}

.action-bar__smart {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: min(320px, 100%);
}

.action-bar__smart-field {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 0.9rem;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.action-bar__smart-field input {
    border: none;
    outline: none;
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    flex: 1;
    background: transparent;
}

.action-bar__smart-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.action-bar__suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    background: #fff;
    z-index: 25;
    border-radius: 0.85rem;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 0.35rem 0;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    z-index: 40;
}

.action-bar__suggestions.is-visible {
    display: block;
}

.suggestion {
    padding: 0.55rem 0.9rem;
    display: grid;
    gap: 0.25rem;
    cursor: pointer;
}

.suggestion:hover {
    background: rgba(37, 99, 235, 0.08);
}

.suggestion__title {
    font-weight: 600;
    color: #0f172a;
}

.suggestion__meta {
    font-size: 0.85rem;
    color: #475569;
}

.suggestion__detail,
.suggestion__extra {
    font-size: 0.78rem;
    color: #94a3b8;
}

.suggestion--loading,
.suggestion--empty,
.suggestion--error {
    font-size: 0.85rem;
    color: #475569;
}

.suggestion--error {
    color: #b91c1c;
}


.action-bar__search-wrapper {
    position: relative;
    min-width: min(320px, 100%);
}

.action-bar__search-wrapper .action-bar__search {
    width: 100%;
}

.action-bar__search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border-radius: 1rem;
    padding: 0.55rem 0.75rem 0.55rem 1.1rem;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
}

.action-bar__search input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    color: #0f172a;
}

.action-bar__advanced {
    display: grid;
    gap: 0.35rem;
}

.action-bar__advanced label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
    transition: background 160ms ease, color 160ms ease, border 160ms ease;
}

.chip.is-active {
    background: #2563eb;
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
    gap: clamp(1.2rem, 3vw, 2rem);
    align-items: start;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

\.data-surface {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.12);
    padding: 1.25rem;
    display: grid;
    gap: 1.1rem;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 1rem;
}

.table-wrapper table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    background: rgba(148, 163, 184, 0.12);
}

.table-number {
    font-weight: 700;
    color: #0f172a;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge--disponible {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

.status-badge--reservado {
    background: rgba(250, 204, 21, 0.18);
    color: #92400e;
}

.status-badge--vendido {
    background: rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    margin-inline-start: 0.35rem;
}

.pill--gift {
    background: rgba(96, 165, 250, 0.22);
    color: #1d4ed8;
}

.pill--reservado {
    background: rgba(250, 204, 21, 0.18);
    color: #92400e;
}

.pill--vendido {
    background: rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

.text-muted {
    color: #94a3b8;
}

.table-inline-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.table-inline-form select {
    padding: 0.35rem 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.table-thumb {
    display: inline-flex;
    border: none;
    padding: 0;
    background: none;
    cursor: zoom-in;
}

.table-thumb img {
    display: block;
    width: 60px;
    height: auto;
    border-radius: 0.75rem;
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.15);
}

.table-user {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.btn-link {
    border: none;
    background: none;
    color: #2563eb;
    cursor: pointer;
    font-weight: 600;
}

.table-empty {
    text-align: center;
    padding: 1.5rem;
    color: #64748b;
}

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    background: rgba(148, 163, 184, 0.12);
}

.bulk-bar__label {
    font-weight: 600;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.bulk-bar select {
    padding: 0.45rem 0.6rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.pagination__link {
    padding: 0.45rem 0.9rem;
    border-radius: 0.7rem;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.4);
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
}

.pagination__link.is-active {
    background: #2563eb;
    color: #fff;
    border-color: transparent;
}

.panel-card {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
    padding: 1.2rem;
    display: grid;
    gap: 0.9rem;
}

.panel-card h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.panel-card__actions {
    display: grid;
    gap: 0.6rem;
}

.user-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.user-list__item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-list__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.user-list__meta {
    flex: 1;
}

.user-list__name {
    font-weight: 600;
    color: #0f172a;
}

.user-list__phone {
    font-size: 0.8rem;
    color: #64748b;
}

.user-list__count {
    font-weight: 700;
    color: #1d4ed8;
}

.alert-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
    color: #475569;
}

.alert-list i {
    color: #2563eb;
    margin-right: 0.45rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 2000;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay--image {
    background: rgba(15, 23, 42, 0.85);
}

.modal-overlay--image img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.modal-panel {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    width: min(960px, 95vw);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-panel--wide {
    width: min(1100px, 96vw);
}

.modal-panel__header,
.modal-panel__footer {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-panel__header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-panel__body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
    overflow: auto;
}

.modal-panel__body--gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #475569;
}

.modal-loading,
.modal-empty {
    text-align: center;
    color: #475569;
    padding: 1rem;
}

.gallery-card {
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 0.75rem;
}

.gallery-card img {
    width: 120px;
    border-radius: 0.9rem;
    cursor: zoom-in;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
}

.modal-table th,
.modal-table td {
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    text-align: left;
}

.focus-user {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
    background: rgba(37, 99, 235, 0.08);
    padding: 1rem 1.2rem;
    border-radius: 1rem;
}

.focus-user__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Configuracion del sistema */


/* Configuracion del sistema */
.config-page {
    display: grid;
    gap: clamp(1.5rem, 2vw, 2rem);
}

.config-grid {
    display: grid;
    gap: clamp(1.25rem, 2vw, 1.75rem);
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.config-card {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.config-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    padding: clamp(1.15rem, 1vw + 1rem, 1.6rem);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0));
}

.config-card__title {
    margin: 0;
    font-size: clamp(1.1rem, 0.8vw + 1rem, 1.35rem);
    font-weight: 700;
    color: #0f172a;
}

.config-card__subtitle {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
}

.config-card__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #ffffff;
    color: #1d4ed8;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    transition: background 160ms ease, box-shadow 160ms ease;
}

.config-card__toggle:hover,
.config-card__toggle:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
    outline: none;
}

.config-card__body {
    padding: clamp(1rem, 1vw + 0.8rem, 1.6rem);
    display: grid;
    gap: 1.2rem;
}

.config-form {
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.config-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

.config-inline-message {
    font-size: clamp(0.85rem, 0.35vw + 0.75rem, 0.95rem);
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 0.85rem;
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.config-inline-message--success {
    background: rgba(22, 163, 74, 0.16);
    color: #15803d;
}

.config-inline-message--danger {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.config-search {
    position: relative;
}

.config-search__results {
    position: absolute;
    inset: calc(100% + 0.35rem) 0 auto 0;
    background: #ffffff;
    border-radius: 0.95rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.18);
    padding: 0.45rem;
    display: grid;
    gap: 0.3rem;
    z-index: 30;
    max-height: 280px;
    overflow-y: auto;
}

.config-search__item {
    display: grid;
    gap: 0.25rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: background 140ms ease;
}

.config-search__item:hover,
.config-search__item:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.config-search__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
    font-weight: 700;
}

.config-search__value {
    font-weight: 600;
    color: #0f172a;
}

.config-search__meta {
    font-size: 0.85rem;
    color: #64748b;
}

.config-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.config-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-weight: 600;
}

.config-chip__close {
    border: none;
    background: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.config-chip__close:hover,
.config-chip__close:focus-visible {
    color: #0f172a;
    outline: none;
}

.config-alert-stack {
    display: grid;
    gap: clamp(0.85rem, 1.2vw, 1.1rem);
}

.config-alert {
    border-radius: 1.1rem;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
}

.config-alert__title {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    font-weight: 700;
}

.config-alert__list {
    margin: 0;
    padding-left: 1rem;
    color: inherit;
}

.config-alert--success {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.18);
    color: #166534;
}

.config-alert--danger {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.22);
    color: #b91c1c;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1.15rem;
    border-radius: 0.9rem;
    border: none;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.btn-danger:hover,
.btn-danger:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.28);
    outline: none;
}

.btn-secondary--danger {
    border-color: rgba(220, 38, 38, 0.35);
    color: #b91c1c;
}

.btn-secondary--danger:hover {
    background: rgba(220, 38, 38, 0.12);
}

.btn-secondary--warning {
    border-color: rgba(249, 115, 22, 0.35);
    color: #c2410c;
}

.btn-secondary--warning:hover {
    background: rgba(249, 115, 22, 0.12);
}

.config-table {
    margin-top: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #f8fafc;
}

.config-table table {
    min-width: 100%;
}

.config-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
}

.config-status-badge--danger {
    background: rgba(220, 38, 38, 0.16);
    color: #b91c1c;
}

.config-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

@media (max-width: 768px) {
    .config-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-card__toggle {
        width: 100%;
        justify-content: center;
    }

    .config-inline-form {
        flex-direction: column;
        align-items: stretch;
    }
}


.config-helper {
    font-size: 0.85rem;
    color: #64748b;
}

.config-bulk {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.config-bulk__row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
}

.config-bulk__textarea {
    min-width: min(320px, 100%);
    resize: vertical;
}

.btn-secondary--ghost {
    border-color: rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.12);
}

.btn-secondary--ghost:hover,
.btn-secondary--ghost:focus-visible {
    background: rgba(37, 99, 235, 0.2);
    outline: none;
}


@media (max-width: 640px) {
    .modal-panel--wide {
        width: min(96vw, 540px);
        max-height: 92vh;
    }

    .modal-panel__body--gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
        padding: 1rem;
    }

    .gallery-card {
        padding: 0.65rem;
        gap: 0.35rem;
    }

    .gallery-card img {
        width: 100%;
        max-width: 140px;
    }
}


@media (max-width: 640px) {
    .modal-panel--wide {
        width: 95vw;
        max-height: 94vh;
    }

    .modal-panel__body--gallery {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
        padding: 0.85rem;
    }

    .gallery-card {
        padding: 0.55rem;
        gap: 0.3rem;
    }

    .gallery-card img {
        max-width: 110px;
        margin: 0 auto;
    }
}

/* auth-responsive-block */
@media (max-width: 720px) {
    .auth-stage {
        gap: 1.6rem;
    }

    .auth-card {
        width: min(520px, 100%);
    }
}

@media (max-width: 520px) {
    .auth-page {
        padding: 1.25rem;
    }

    .auth-card {
        border-radius: 1.2rem;
        padding: 1.25rem;
    }

    .auth-input-wrap {
        padding: 0.55rem 0.9rem;
    }

    .auth-submit {
        font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    }
}

@media (min-width: 1024px) {
    .auth-stage {
        gap: 2.6rem;
    }

    .auth-card {
        width: min(520px, 100%);
    }
}

/* --- TOAST NOTIFICATIONS PREMIUM --- */
#toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
    /* Allows click-through */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@media (max-width: 640px) {
    #toast-container {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        align-items: center;
    }
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08),
        0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.8);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease,
        margin-top 0.4s ease;
    opacity: 0;
}

@media (max-width: 640px) {
    .toast {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        transform: translateY(-150%);
    }
}

.toast--visible {
    transform: translateX(0);
    opacity: 1;
}

@media (max-width: 640px) {
    .toast--visible {
        transform: translateY(0);
    }
}

.toast__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast__content {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.5;
}

.toast__close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    margin-top: -2px;
    margin-right: -4px;
}

.toast__close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
}

/* Variantes */
.toast--success {
    border-left: 5px solid #10b981;
}

.toast--success .toast__icon {
    color: #10b981;
}

.toast--error {
    border-left: 5px solid #ef4444;
}

.toast--error .toast__icon {
    color: #ef4444;
}

.toast--warning {
    border-left: 5px solid #f59e0b;
}

.toast--warning .toast__icon {
    color: #f59e0b;
}

.toast--info {
    border-left: 5px solid #3b82f6;
}

.toast--info .toast__icon {
    color: #3b82f6;
}