body {
    background: #f3f4f6;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #111827;
    flex-shrink: 0;
}

.sidebar-brand .brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.sidebar .nav-link {
    color: #d1d5db;
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.sidebar .nav-link.active {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.stats-card .stats-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.quick-action:hover {
    background: #f9fafb;
    color: inherit;
}

.qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.bg-purple-soft {
    background: #f3e8ff;
    color: #7c3aed;
}

.login-body {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 55%, #2563eb 100%);
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.role-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.role-pill.role-admin {
    background: #f3e8ff;
    color: #7c3aed;
}

.role-pill.role-staff {
    background: #dbeafe;
    color: #1d4ed8;
}

.role-pill.role-vendedor {
    background: #dcfce7;
    color: #15803d;
}

.ticket-type-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ticket-type-btn:hover {
    background: #f9fafb;
}

.ticket-type-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.ticket-type-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.qty-btn {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    padding: 0;
}

.zone-info {
    padding: 1rem;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: #1e3a8a;
}

.success-check {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
}

.ticket-code-chip {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    padding: 0.75rem;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: #2563eb;
}

.btn-purple {
    background: #7c3aed;
    border-color: #7c3aed;
}

.btn-purple:hover {
    background: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}

.status-pill {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pill.status-sold {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.status-used {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-pill.status-cancelled {
    background: #fee2e2;
    color: #b91c1c;
}

.status-pill.status-available {
    background: #f3f4f6;
    color: #374151;
}

.status-pill.status-featured {
    background: #fef9c3;
    color: #a16207;
}

.concert-thumb {
    width: 80px;
    height: 80px;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #e5e7eb;
}

.concert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.concert-thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 1.5rem;
}

.concert-row:hover {
    background: #f9fafb;
}

.sidebar-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #fff;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0;
    flex-shrink: 0;
}

.sidebar-toggle span {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: #111827;
    border-radius: 2px;
}

.sidebar-close-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    #wrapper {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        width: min(280px, 86vw);
        height: 100vh;
        min-height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        box-shadow: 8px 0 24px rgba(0, 0, 0, 0.2);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .admin-main {
        width: 100%;
        min-width: 0;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
    }
}

@media (min-width: 992px) {
    .sidebar-backdrop {
        display: none !important;
    }
}

/* —— Venta Rápida (POS) —— */
.vr-page {
    max-width: 1200px;
}

.vr-zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.vr-zone-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 1rem 0.85rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    text-align: left;
    min-height: 6.5rem;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    cursor: pointer;
}

.vr-zone-btn:hover:not(:disabled) {
    border-color: #93c5fd;
    background: #f8fbff;
}

.vr-zone-btn.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}

.vr-zone-btn.soldout,
.vr-zone-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.vr-zone-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
}

.vr-zone-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: #15803d;
}

.vr-zone-avail {
    font-size: 0.8rem;
    color: #6b7280;
}

.vr-checkout {
    top: 1rem;
}

.vr-total {
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #f0fdf4;
}

.vr-sell-btn {
    min-height: 3.5rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.vr-toast {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1080;
    min-width: 220px;
    max-width: 320px;
    padding: 0.85rem 1.1rem;
    border-radius: 0.75rem;
    background: #166534;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.vr-session-bar {
    background: #111827;
    color: #fff;
}

.vr-session-bar .text-muted {
    color: #9ca3af !important;
}

.vr-session-bar .btn-outline-secondary {
    border-color: #4b5563;
    color: #e5e7eb;
}

.vr-session-bar .btn-outline-secondary:hover {
    background: #374151;
    border-color: #6b7280;
    color: #fff;
}

/* Diálogos propios (alert / confirm) */
.site-dialog {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}
.site-dialog[hidden] { display: none !important; }
.site-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    backdrop-filter: blur(3px);
}
.site-dialog-panel {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.35rem 1.3rem 1.2rem;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.25);
    animation: siteDialogIn .18s ease-out;
}
@keyframes siteDialogIn {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.site-dialog-title {
    margin: 0 0 0.45rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
}
.site-dialog-msg {
    margin: 0 0 1.2rem;
    color: #6b7280;
    font-size: 0.98rem;
    line-height: 1.45;
}
.site-dialog-actions {
    display: flex;
    gap: 0.6rem;
}
.site-dialog-btn {
    flex: 1;
    min-height: 46px;
    border: 0;
    border-radius: 0.7rem;
    background: #2563eb;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}
.site-dialog-btn:hover { filter: brightness(0.96); }
.site-dialog-btn--ghost {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}
.site-dialog-btn--danger {
    background: #dc2626;
    color: #fff;
}
body.site-dialog-open { overflow: hidden; }


