:root {
    color-scheme: light;
    font-family: Inter, Aptos, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --bega-primary: #2f78b7;
    --bega-primary-rgb: 47, 120, 183;
    --bega-secondary: #6a2c91;
    --bega-purple: #6a2c91;
    --bega-blue: #2f78b7;
    --bega-red: #e51b23;
    --bega-orange: #f7941d;
    --bega-lime: #7ac943;
    --bega-green: #009b4a;
    --bega-accent: #f15a29;
    --bega-success: #009b4a;
    --bega-error: #e51b23;
    --bega-background: #f5f7fa;
    --bega-surface: #ffffff;
    --bega-surface-soft: #f3f6f9;
    --bega-text: #262231;
    --bega-text-muted: #686273;
    --bega-border: #e3e0e7;
    --bega-border-strong: #c9c5ce;
    --bega-shadow: rgba(38, 34, 49, .11);
    --bega-auth-background: #f4f7fb;
    --bega-auth-start: #fbfcff;
    --bega-auth-end: #edf3fa;
    --bega-auth-text: #262231;
    --bega-auth-muted: #625d6c;
    --bega-auth-toggle: rgba(255, 255, 255, .72);
    --bega-auth-border: rgba(47, 120, 183, .28);
    --bega-heading-start: #ffffff;
    --bega-heading-end: #f2f6fa;
    --bega-overlay: rgba(17, 19, 26, .55);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bega-primary: #64a7d8;
    --bega-primary-rgb: 100, 167, 216;
    --bega-secondary: #b58ad0;
    --bega-purple: #b58ad0;
    --bega-blue: #64a7d8;
    --bega-red: #ff6b70;
    --bega-orange: #ffb04a;
    --bega-lime: #9bd55b;
    --bega-green: #45cb7b;
    --bega-accent: #ff865e;
    --bega-success: #45cb7b;
    --bega-error: #ff6b70;
    --bega-background: #11131a;
    --bega-surface: #1b1e28;
    --bega-surface-soft: #242832;
    --bega-text: #f4f2f7;
    --bega-text-muted: #c3bec9;
    --bega-border: #363a46;
    --bega-border-strong: #505562;
    --bega-shadow: rgba(0, 0, 0, .36);
    --bega-auth-background: #11131a;
    --bega-auth-start: #171a23;
    --bega-auth-end: #142333;
    --bega-auth-text: #f4f2f7;
    --bega-auth-muted: #cbc6d0;
    --bega-auth-toggle: rgba(27, 30, 40, .8);
    --bega-auth-border: rgba(100, 167, 216, .4);
    --bega-heading-start: #1b1e28;
    --bega-heading-end: #222a34;
    --bega-overlay: rgba(0, 0, 0, .7);
}

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bega-background);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    color: var(--bega-text);
    transition: background-color .2s ease, color .2s ease;
}

h1:focus {
    outline: none;
}

.validation-message {
    color: var(--bega-error);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 2000;
    padding: 1rem 3rem 1rem 1rem;
    border-radius: .75rem;
    background: var(--bega-error);
    color: white;
    box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .24);
}

#blazor-error-ui a {
    margin-left: .5rem;
    color: white;
    font-weight: 700;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .75rem;
    right: 1rem;
    cursor: pointer;
}

/* Padding on MudPaper itself (scoped page CSS cannot reach child component roots).
   Do not put margins on .mud-paper * — that breaks MudSwitch thumbs and icons. */
.mud-paper.sale-form-card,
.mud-paper.summary-card,
.mud-paper.detail-card {
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid var(--bega-border);
    border-radius: 1rem;
}

.mud-paper.summary-card {
    position: sticky;
    top: 5.5rem;
}

.mud-paper.state-panel {
    min-height: 18rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    border: 1px dashed var(--bega-border-strong);
    border-radius: 1rem;
    text-align: center;
}

.mud-paper.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--bega-border);
    border-radius: 1rem;
}

.mud-paper.sale-card,
.mud-paper.reservation-card {
    padding: 1.25rem;
    margin: 1rem;
    border: 1px solid var(--bega-border);
    border-radius: 1rem;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mud-paper.sale-card:hover,
.mud-paper.reservation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--bega-shadow);
}

.mud-paper.ticket-option {
    padding: 1rem;
    border: 1px solid var(--bega-border);
    border-radius: .9rem;
    background: var(--bega-surface-soft);
}

.mud-paper.feature-card {
    height: 100%;
    padding: 1.5rem;
    border: 1px solid var(--bega-border);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mud-paper.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--bega-primary-rgb), .48);
    box-shadow: 0 1rem 2rem var(--bega-shadow);
}

.mud-paper.settings-section-body {
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 1rem;
    background: var(--mud-palette-surface);
}

@media (max-width: 960px) {
    .mud-paper.summary-card {
        position: static;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mud-paper.feature-card,
    .mud-paper.sale-card,
    .mud-paper.reservation-card {
        transition: none;
    }
}

.sinpe-receipt-image {
    display: block;
    width: 100%;
    max-height: 640px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.02);
}

.sinpe-receipt-pdf {
    display: block;
    width: 100%;
    min-height: 520px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
}

