:root {
    color-scheme: light;
    --ink: #10233f;
    --muted: #52647b;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --surface: #ffffff;
    --background: #f2f6f8;
    --border: #d9e2e8;
    --danger: #b42318;
}

.seat-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; align-items: end; border: 1px solid #dbe4ea; border-radius: .75rem; padding: 1rem; }
.seat-tools legend { float: none; width: auto; padding: 0 .35rem; font-size: 1rem; font-weight: 700; }
.seat-canvas-wrap { overflow: auto; border: 1px solid #dbe4ea; border-radius: .75rem; background: #f8fafc; }
[data-seat-canvas] { display: block; width: 100%; min-width: 650px; min-height: 420px; background: #fff; }
.seat-stage { fill: #dbe4ea; stroke: #64748b; }
.seat-stage-label { font-size: 16px; font-weight: 700; fill: #334155; }
.seat-node { cursor: grab; }
.seat-node circle { stroke: #fff; stroke-width: 3; }
.seat-node text { pointer-events: none; fill: #fff; font-size: 12px; font-weight: 700; }
.seat-node.is-selected circle { stroke: #f59e0b; stroke-width: 6; }
.seat-help { padding: .75rem .75rem 0; color: #475569; }
.public-seat-picker { border: 1px solid #dbe4ea; border-radius: .75rem; padding: .75rem; }
.public-seat-map { overflow: auto; margin-top: .75rem; background: #f8fafc; border-radius: .5rem; }
.public-seat-map svg { display: block; width: 100%; min-width: 520px; min-height: 340px; }
.public-seat { cursor: pointer; }
.public-seat circle { stroke: #fff; stroke-width: 3; }
.public-seat text { fill: #fff; font-size: 11px; font-weight: 700; pointer-events: none; }
.public-seat.unavailable { opacity: .25; cursor: not-allowed; }
.public-seat.selected circle { stroke: #f59e0b; stroke-width: 7; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .5rem; font-size: .875rem; }
.seat-legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .25rem; background: #0f766e; }
.seat-legend .selected { box-shadow: 0 0 0 3px #f59e0b; }
.seat-legend .unavailable { opacity: .25; }

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

.app-header {
    align-items: center;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    min-height: 64px;
    padding: 0 5vw;
}

.brand { color: var(--ink); font-weight: 800; text-decoration: none; }
.app-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.app-nav a { color: var(--muted); font-weight: 700; text-decoration: none; }
.container { margin: 0 auto; max-width: 1120px; padding: 48px 24px; }
.hero { max-width: 760px; padding: 64px 0; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 20px; }
h2 { font-size: 1.15rem; margin-top: 0; }
.lead { color: var(--muted); font-size: 1.25rem; }
.eyebrow { color: var(--primary); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { border: 1px solid transparent; border-radius: 8px; cursor: pointer; display: inline-block; font: inherit; font-weight: 700; padding: 11px 18px; text-decoration: none; }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.secondary { background: #fff; border-color: var(--border); color: var(--ink); }
.button.full { width: 100%; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.auth-card { margin: 24px auto; max-width: 460px; }
label { display: block; font-weight: 700; margin: 18px 0 6px; }
input, select, textarea { border: 1px solid #aebdca; border-radius: 8px; font: inherit; padding: 11px 12px; width: 100%; }
form .button { margin-top: 22px; }
.alert { background: #fef3f2; border: 1px solid #fecdca; border-radius: 8px; color: var(--danger); padding: 12px; }
.dashboard-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 32px; }
.dashboard-heading h1 { font-size: 2.1rem; }
.module-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-grid { display: grid; gap: 4px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .checkbox { align-items: center; display: flex; gap: 9px; }
.form-grid .checkbox input { width: auto; }
.admin-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 20px; }
.permission-grid { display: grid; gap: 4px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 420px; overflow: auto; }
.waiver-text { background: #f8fafc; border: 1px solid var(--border); border-radius: 10px; margin: 24px 0; max-height: 480px; overflow: auto; padding: 20px; white-space: normal; }
.card + .card { margin-top: 20px; }
.table-responsive { overflow-x: auto; }
code { overflow-wrap: anywhere; }
.form-grid.compact label { font-size: .9rem; }
.page-heading, .section-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 24px; }
.page-heading h1 { font-size: 2.5rem; }
.section-heading h2 { margin: 0; }
.metric-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.metric span { color: var(--muted); display: block; font-size: .9rem; }
.metric strong { display: block; font-size: 1.8rem; margin-top: 8px; }
.validation-list { color: var(--danger); margin: 18px 0 0; }
.site-links { display: grid; gap: 10px; }
.site-links a { border: 1px solid var(--border); border-radius: 9px; color: var(--ink); display: flex; justify-content: space-between; padding: 12px 14px; text-decoration: none; }
.site-links span { color: var(--primary); font-weight: 700; }
.settings-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-field { align-items: center; display: flex; gap: 8px; }
.check-field input { width: auto; }
.store-hero { margin-bottom: 32px; }
.store-hero h1 { font-size: 3rem; }
.offer-grid { display: grid; gap: 22px; }
.offer-card { display: grid; gap: 20px; grid-template-columns: 1.1fr .35fr 1.4fr; }
.offer-details { display: grid; gap: 8px; }
.offer-details div { display: grid; grid-template-columns: 90px 1fr; }
.offer-details dt, .order-summary span { color: var(--muted); }
.offer-details dd { margin: 0; }
.price { font-size: 1.7rem; font-weight: 800; }
.price small { color: var(--muted); font-size: .8rem; }
.order-shell { margin: 24px auto; max-width: 820px; }
.order-shell h1 { font-size: 2.5rem; }
.order-summary { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin: 24px 0; }
.order-summary div { border-left: 3px solid var(--primary); padding-left: 12px; }
.order-summary span, .order-summary strong { display: block; }
.payment-actions { display: flex; gap: 12px; }
.payment-actions form .btn { margin-top: 0; }
.ticket-list { display: grid; gap: 10px; }
.ticket-link { align-items: center; border: 1px solid var(--border); border-radius: 10px; color: var(--ink); display: flex; justify-content: space-between; padding: 14px; text-decoration: none; }
.benefit-card { display: grid; gap: 28px; grid-template-columns: .8fr 1.4fr; }
.secure-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.25rem; letter-spacing: .08em; overflow-wrap: anywhere; }
.ticket { margin: 20px auto; max-width: 720px; }
.ticket-brand { border-bottom: 1px solid var(--border); font-weight: 800; margin-bottom: 28px; padding-bottom: 12px; }
.ticket h1 { font-size: 2.5rem; }
.ticket-data { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin: 28px 0; }
.ticket-data div { border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.ticket-data dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; }
.ticket-data dd { font-weight: 700; margin: 2px 0 0; }
.ticket-note { color: var(--muted); font-size: .85rem; }
.ticket-qr { text-align: center; }
.ticket-qr img { height: 260px; max-width: 100%; width: 260px; }
.access-scanner { margin: 20px auto; max-width: 720px; }
.qr-camera { background: #0b1729; border-radius: 12px; display: block; margin-bottom: 16px; max-height: 420px; object-fit: cover; width: 100%; }
.qr-camera[hidden] { display: none; }
.access-result { border-radius: 14px; color: #fff; margin: 0 auto 20px; max-width: 720px; padding: 24px; }
.access-result.approved { background: #067647; }
.access-result.denied { background: #b42318; }
.access-result > strong { display: block; font-size: 1.7rem; }
.access-result dl { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.access-result dt { font-size: .75rem; opacity: .8; text-transform: uppercase; }
.access-result dd { font-weight: 700; margin: 0; }

@media (max-width: 640px) {
    .container { padding: 32px 16px; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .app-header { align-items: flex-start; flex-direction: column; gap: 10px; padding-bottom: 12px; padding-top: 12px; }
    .app-nav { margin-left: 0; }
    .form-grid, .metric-grid, .offer-card, .order-summary, .ticket-data, .settings-grid, .admin-grid, .benefit-card { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: span 1; }
    .payment-actions { align-items: stretch; flex-direction: column; }
}

@media print {
    .app-header, .no-print { display: none !important; }
    body { background: #fff; }
    .container { padding: 0; }
    .ticket { border: 0; }
}
