:root {
    --navy: #0b1c30;
    --blue: #0058be;
    --paper: #ffffff;
    --surface: #f8f9ff;
    --line: #e6e8ef;
    --muted: #787680;
    --green: #10b981;
    --red: #ef4444;
    --amber: #f59e0b;
    --shadow: 0 14px 40px rgba(11, 28, 48, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--surface); }
body { margin: 0; overflow-x: hidden; color: var(--navy); background: var(--surface); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(0,88,190,.24); outline-offset: 2px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.04em; }
h2 { margin: .25rem 0 0; font-size: 1.05rem; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 0%, #dfeaff, transparent 36%), var(--surface); }
.login-card { display: grid; grid-template-columns: 1.1fr .9fr; width: min(920px, 100%); overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
.login-brand { min-height: 430px; padding: 56px; display: flex; flex-direction: column; justify-content: end; color: white; background: linear-gradient(150deg, #071321, #0b1c30 65%, #0058be); }
.login-brand h1 { margin: 12px 0; font-size: clamp(2.4rem, 7vw, 4.4rem); }
.login-brand p { max-width: 420px; color: #cbd5e1; }
.brand-kicker, .eyebrow { font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); }
.login-brand .brand-kicker { color: #8ebfff; }
.login-form { padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.auth-form { display: grid; gap: 16px; }
.auth-link { color: var(--blue); font-size: .74rem; font-weight: 750; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.password-help { margin: 0; color: var(--muted); font-size: .68rem; line-height: 1.5; }

label { display: grid; gap: 7px; color: #344054; font-size: .76rem; font-weight: 750; }
input, select, textarea { width: 100%; padding: 11px 13px; color: var(--navy); background: white; border: 1px solid #d9dde7; border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 88, 190, .12); }
input:disabled { background: #f1f3f7; color: var(--muted); }
textarea { resize: vertical; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; font-size: .78rem; font-weight: 800; text-decoration: none; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: white; background: var(--blue); }
.button-dark { color: white; background: #000; }
.button-light { color: var(--navy); background: white; border-color: var(--line); }
.button-danger { color: var(--red); background: #fff5f5; border-color: #fee2e2; }
.button-danger-solid { color: white; background: #c81e1e; border-color: #c81e1e; }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; }

.topbar { height: 40px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; color: white; background: #000; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.topbar span { padding: 4px 9px; background: rgba(255,255,255,.15); border-radius: 999px; font-size: .58rem; }
.workspace { min-height: calc(100vh - 40px); display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar { padding: 24px 16px; display: flex; flex-direction: column; color: white; background: var(--navy); }
.organization { margin-bottom: 28px; padding: 0 8px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.organization-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--navy); background: white; border-radius: 11px; font-weight: 900; }
.organization div { min-width: 0; }
.organization strong, .organization small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.organization strong { font-size: .78rem; }
.organization small { margin-top: 3px; color: #91a4bb; font-size: .58rem; text-transform: uppercase; }
.sidebar nav { display: grid; gap: 7px; }
.nav-item { width: 100%; padding: 11px 13px; display: flex; align-items: center; gap: 10px; color: #b9c6d5; background: transparent; border: 0; border-radius: 10px; text-align: left; font-size: .78rem; font-weight: 700; }
.nav-item:hover, .nav-item.is-active { color: white; background: rgba(255,255,255,.1); }
.nav-item.is-active { box-shadow: inset 3px 0 var(--blue); }
.nav-icon { width: 20px; height: 20px; display: none; flex: 0 0 auto; }
.nav-icon svg { width: 100%; height: 100%; display: block; }
.mobile-account, .mobile-logout { display: none; }
.logout { width: 100%; margin-top: auto; padding: 12px 13px; display: flex; align-items: center; border-radius: 10px; color: #aebdcd; text-decoration: none; font-size: .72rem; font-weight: 700; transition: color .15s, background .15s; }
.logout:hover, .logout:focus-visible { color: white; background: rgba(255,255,255,.1); }

.main-content { min-width: 0; padding: 0 28px 40px; overflow: auto; }
.page-header { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { width: 36px; height: 36px; display: grid; place-items: center; color: white; background: var(--navy); border-radius: 50%; font-weight: 900; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: .72rem; }
.user-chip small { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.view { display: none; animation: enter .18s ease-out; }
.view.is-active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card, .panel, .event-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 5px 18px rgba(11, 28, 48, .035); }
.stat-card { padding: 20px; }
.stat-card small { display: block; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.stat-card strong { display: block; margin-top: 12px; font-size: 1.7rem; letter-spacing: -.04em; }
.panel { padding: 20px; }
.panel-header, .view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-header { margin-bottom: 18px; }
.view-toolbar { margin-bottom: 18px; }
.view-toolbar p { margin: 0; color: var(--muted); font-size: .8rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #edf0f5; text-align: left; font-size: .72rem; }
th { color: var(--muted); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.empty { padding: 42px 18px; color: var(--muted); text-align: center; font-size: .78rem; }

.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.event-card { overflow: hidden; }
.event-create-card { display: none; }
.event-cover { height: 132px; position: relative; background: linear-gradient(135deg, var(--navy), var(--blue)); background-size: cover; background-position: center; }
.event-cover img { width: 100%; height: 100%; display: block; object-fit: cover; }
.event-cover .status { position: absolute; top: 12px; right: 12px; }
.event-body { padding: 17px; }
.event-body h3 { margin-bottom: 7px; font-size: .96rem; }
.event-body p { margin-bottom: 13px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.event-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .68rem; }
.event-actions { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.event-actions .button { width: 100%; min-width: 0; white-space: normal; text-align: center; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #036b49; background: #dff8ee; font-size: .56rem; font-weight: 900; text-transform: uppercase; }
.status-draft { color: #7b5b00; background: #fff5ce; }
.status-warning { color: #8a4b00; background: #ffe6b3; }
.status-past, .status-archived { color: #5f6670; background: #e8ebef; }
.status-disabled { color: #5f6670; background: #e8ebef; }
.status-sold_out { color: #a11b1b; background: #fee2e2; }
.status-pending { color: #7b5b00; background: #fff3c4; }
.status-expired { color: #5f6670; background: #e8ebef; }
.status-cancelled { color: #a11b1b; background: #fee2e2; }
.status-refunded { color: #8a3d00; background: #ffead5; }
.status-partially_refunded { color: #8a3d00; background: #ffead5; }
.status-disputed { color: #6b2ca0; background: #f0e2ff; }

.two-columns { display: grid; grid-template-columns: minmax(330px, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.sales-layout, .sales-layout > * { min-width: 0; }
.form-panel { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-2 { grid-column: 1 / -1; }
.checkbox-label { display: flex; align-items: center; align-self: end; min-height: 42px; }
.checkbox-label input { width: auto; }
.payment-selector-field { align-self: start; }
.sale-quantity-field { min-width: 0; display: grid; align-content: start; gap: 7px; color: #344054; }
.sale-field-label { font-size: .76rem; font-weight: 750; }
.sale-quantity-control { min-width: 0; padding: 4px; display: grid; grid-template-columns: 42px minmax(48px, 1fr) 42px; align-items: center; background: white; border: 1px solid #d9dde7; border-radius: 10px; }
.sale-quantity-control button { width: 42px; height: 34px; padding: 0; color: var(--navy); background: #f1f4f8; border: 0; border-radius: 8px; font-size: 1.35rem; font-weight: 750; line-height: 1; }
.sale-quantity-control button:hover:not(:disabled) { color: white; background: var(--blue); }
.sale-quantity-control button:disabled { cursor: not-allowed; opacity: .38; }
.sale-quantity-control output { min-width: 0; color: var(--navy); text-align: center; font-size: .9rem; font-weight: 850; }
.sale-quantity-limit { color: #98a2b3; font-size: .62rem; font-weight: 650; line-height: 1.4; }
.sale-payment-method-field { align-content: start; align-self: start; }
.sale-payment-method-field select { min-height: 44px; }
.sale-summary { padding: 15px; display: flex; align-items: center; justify-content: space-between; color: white; background: var(--navy); border-radius: 12px; }
.sale-summary strong { font-size: 1.25rem; }
.sales-history-panel { min-width: 0; overflow: hidden; }
.sales-history-panel table { min-width: 1050px; }
.payment-resolution-panel { margin-top: 22px; min-width: 0; overflow: hidden; }
.payment-resolution-panel table { min-width: 1080px; }
.payment-resolution-panel > .settings-help { margin: -4px 0 18px; }
.order-history-header { align-items: end; }
.order-status-filter { width: min(190px, 100%); }
.order-environment { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #344054; background: #eef1f5; font-size: .56rem; font-weight: 850; text-transform: uppercase; white-space: nowrap; }
.environment-production { color: #075e46; background: #dff8ee; }
.environment-test { color: #704f00; background: #fff3c4; }
.mobile-scroll-hint { display: none; }
.report-filter-bar { margin-bottom: 18px; display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; align-items: end; gap: 12px; }
.report-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(135px, 1fr)); align-items: end; gap: 13px; }
.date-range-error { grid-column: 1 / -1; margin: 0; padding: 10px 12px; border: 1px solid #f4b4b4; border-radius: 10px; color: #b42318; background: #fff1f1; font-size: .7rem; font-weight: 750; }
.date-range-error[hidden] { display: none; }
.report-filter-bar input[aria-invalid="true"], .report-filter-grid input[aria-invalid="true"] { border-color: #d92d20; background: #fff8f7; }
.report-filters { margin-bottom: 18px; }
.report-export-actions { display: flex; gap: 8px; }
.report-summary { margin-top: 0; }
.sales-category-summary { margin-bottom: 18px; }
.sales-category-summary > p { margin: -6px 0 16px; color: var(--muted); font-size: .72rem; }
.sales-category-summary table { min-width: 640px; }
#sales-report-list .table-wrap { max-width: 100%; }
#sales-report-list table { min-width: 1320px; }
.report-pagination { padding-top: 18px; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); font-size: .72rem; }
.analytics-grid { margin-bottom: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.analytics-panel { min-width: 0; }
.analytics-panel-wide { grid-column: 1 / -1; }
.chart-host { min-height: 220px; }
.line-chart { width: 100%; height: 190px; overflow: visible; }
.line-chart path { fill: none; stroke: #dce3ec; stroke-width: 1; vector-effect: non-scaling-stroke; }
.line-chart polyline { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .62rem; }
.chart-axis strong { color: var(--navy); }
.bar-chart { display: grid; gap: 12px; }
.bar-chart-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(90px, 2fr) auto; align-items: center; gap: 10px; font-size: .66rem; }
.bar-chart-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-chart-row i { height: 9px; overflow: hidden; display: block; background: #edf1f6; border-radius: 999px; }
.bar-chart-row b { height: 100%; display: block; background: linear-gradient(90deg, var(--blue), #4d9cff); border-radius: inherit; }
.bar-chart-row strong { font-size: .62rem; white-space: nowrap; }
.compact-input { width: min(250px, 100%); }
.checkin-console { display: grid; grid-template-columns: minmax(330px, 5fr) minmax(380px, 7fr); overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 34px rgba(11, 28, 48, .07); }
.scanner-lens { min-height: 430px; position: relative; overflow: hidden; display: grid; place-items: center; isolation: isolate; color: white; background: radial-gradient(circle at center, #20242b, #06080b 72%); }
.qr-reader { position: absolute; inset: 0; z-index: 0; background: #090c10; }
.qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.qr-reader > div:not([id]) { display: none !important; }
.scanner-grid { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .2; background-image: linear-gradient(rgba(255,255,255,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.14) 1px, transparent 1px); background-size: 38px 38px; }
.scanner-lens::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at center, transparent 25%, rgba(0,0,0,.48) 100%); }
.scanner-corner { width: 54px; height: 54px; position: absolute; z-index: 3; border-color: white; border-style: solid; pointer-events: none; }
.corner-top-left { top: 35px; left: 35px; border-width: 4px 0 0 4px; border-radius: 8px 0 0; }
.corner-top-right { top: 35px; right: 35px; border-width: 4px 4px 0 0; border-radius: 0 8px 0 0; }
.corner-bottom-left { bottom: 35px; left: 35px; border-width: 0 0 4px 4px; border-radius: 0 0 0 8px; }
.corner-bottom-right { right: 35px; bottom: 35px; border-width: 0 4px 4px 0; border-radius: 0 0 8px; }
.scanner-line { display: none; position: absolute; left: 14%; right: 14%; top: 50%; z-index: 3; height: 2px; background: #ff3040; box-shadow: 0 0 16px #ff3040; animation: scan 2.2s ease-in-out infinite; }
.scanner-lens.is-scanning .scanner-line { display: block; }
@keyframes scan { 0%, 100% { transform: translateY(-112px); } 50% { transform: translateY(112px); } }
.scanner-live-badge { position: absolute; top: 18px; left: 50%; z-index: 4; transform: translateX(-50%); padding: 7px 12px; color: white; background: rgba(5, 8, 12, .72); border: 1px solid rgba(255,255,255,.24); border-radius: 999px; backdrop-filter: blur(8px); font-size: .6rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.scanner-exit { width: 44px; height: 44px; padding: 0; position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); z-index: 7; display: none; place-items: center; color: white; background: rgba(5,8,12,.72); border: 1px solid rgba(255,255,255,.28); border-radius: 50%; backdrop-filter: blur(8px); font: inherit; font-size: 1.55rem; line-height: 1; cursor: pointer; }
.scanner-state { max-width: 310px; padding: 25px; position: relative; z-index: 4; text-align: center; }
.scanner-state .scanner-symbol { width: 58px; height: 58px; margin: 0 auto 15px; display: grid; place-items: center; color: #d9e0e9; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 50%; font-size: 1.8rem; }
.scanner-state strong { display: block; font-size: 1.05rem; }
.scanner-state p { margin: 7px 0 0; color: #9da9b8; font-size: .7rem; line-height: 1.5; }
.scanner-state.is-processing .scanner-symbol { color: white; background: rgba(239,68,68,.75); animation: pulse 1s infinite; }
.scanner-state.is-success, .scanner-state.is-error { width: min(310px, calc(100% - 32px)); max-width: none; padding: 0; }
.scanner-result-card { padding: 22px; border-radius: 16px; box-shadow: 0 16px 45px rgba(0,0,0,.25); }
.scanner-state.is-success { color: #073b2a; }
.scanner-state.is-success .scanner-result-card { background: rgba(236,253,245,.96); border: 1px solid rgba(167,243,208,.9); }
.scanner-state.is-success .scanner-symbol { color: white; background: var(--green); border-color: var(--green); }
.scanner-state.is-success p { color: #356758; }
.scanner-state.is-error { color: #7f1d1d; }
.scanner-state.is-error .scanner-result-card { background: rgba(254,242,242,.97); border: 1px solid #fecaca; }
.scanner-state.is-error .scanner-symbol { color: white; background: var(--red); border-color: var(--red); }
.scanner-state.is-error p { color: #934545; }
.scanner-result-action { width: 100%; margin-top: 16px; }
.scanner-lens.has-result::before { content: ""; position: absolute; inset: 0; z-index: 3; background: rgba(2,6,12,.64); backdrop-filter: blur(2px); }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.checkin-controls { padding: clamp(26px, 4vw, 46px); display: flex; flex-direction: column; justify-content: center; gap: 17px; }
.checkin-controls h2 { margin: 0; max-width: 520px; font-size: clamp(1.5rem, 3vw, 2.15rem); letter-spacing: -.045em; }
.checkin-copy { max-width: 560px; margin: -6px 0 2px; color: var(--muted); font-size: .76rem; line-height: 1.6; }
.checkin-badges { display: flex; align-items: center; gap: 9px; }
.camera-status { display: inline-flex; align-items: center; gap: 6px; color: #087451; font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.camera-status::before { content: ""; width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.camera-status.is-off { color: #737983; }
.camera-status.is-off::before { background: #9ca3af; box-shadow: none; }
.notice-warning { color: #8a5b00; background: #fff9e8; border: 1px solid #f7dfa0; }
.button-wide { width: 100%; }
.manual-checkin { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.manual-checkin-row { margin-top: 9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.secure-caption { margin: 0; color: #8a8f98; text-align: center; font-size: .61rem; }
.attendees-panel { margin-top: 20px; }
.attendee-filters { display: flex; align-items: center; gap: 9px; }
.attendee-filters select { width: min(240px, 100%); }
.result-card { padding: 14px; border-radius: 12px; font-size: .75rem; }
.result-success { color: #075c3f; background: #e7faf3; border: 1px solid #a9ead3; }
.result-error { color: #9b1c1c; background: #fff0f0; border: 1px solid #ffcaca; }
.sr-only { width: 1px; height: 1px; padding: 0; margin: -1px; position: absolute; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.settings-heading { margin-bottom: 20px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.settings-heading h2 { margin-top: 5px; font-size: clamp(1.4rem, 3vw, 2rem); }
.settings-heading p { max-width: 430px; margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.5; text-align: right; }
.account-heading-actions { display: grid; justify-items: end; gap: 10px; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 8fr) minmax(250px, 4fr); gap: 20px; align-items: start; }
.settings-main { display: grid; gap: 18px; }
.settings-section { display: grid; gap: 16px; }
.settings-section-header { min-height: 42px; display: flex; align-items: center; gap: 12px; }
.settings-section-header h3 { margin: 3px 0 0; font-size: 1rem; }
.settings-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: white; background: var(--navy); border-radius: 10px; font-size: .9rem; font-weight: 900; }
.settings-icon svg { width: 23px; height: 23px; display: block; }
.organization-profile-section { gap: 20px; }
.organization-profile-header { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.settings-profile-icon { width: 46px; height: 46px; color: var(--navy); background: #f1f3f7; }
.settings-section-header-copy { min-width: 0; }
.settings-section-header-copy h3 { margin: 0; font-size: 1.08rem; text-transform: none; }
.settings-section-header-copy p { margin: 4px 0 0; color: #98a2b3; font-size: .7rem; font-weight: 500; line-height: 1.4; }
.settings-card-save { width: 44px; height: 44px; margin-left: auto; display: grid; place-items: center; flex: 0 0 auto; color: white; background: #050505; border: 0; border-radius: 11px; box-shadow: 0 6px 14px rgba(0,0,0,.16); }
.settings-card-save:hover { background: #202020; transform: translateY(-1px); }
.settings-card-save svg { width: 22px; height: 22px; }
.organization-profile-grid { row-gap: 18px; }
.organization-profile-grid > label { align-self: start; width: 100%; }
.field-help { color: #98a2b3; font-size: .64rem; font-weight: 500; line-height: 1.45; }
.profile-public-id { padding-top: 2px; }
.banner-field { display: grid; gap: 11px; min-width: 0; }
.banner-upload-row { display: flex; align-items: center; gap: 11px; min-width: 0; }
.banner-file-button { cursor: pointer; flex: 0 0 auto; }
.banner-upload-row > span { min-width: 0; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.banner-guidance { display: block; }
.banner-preview { min-height: 150px; position: relative; overflow: hidden; display: grid; place-items: center; background: #eef2f8; border: 1px solid var(--line); border-radius: 13px; }
.banner-preview[hidden] { display: none; }
.banner-preview img { width: 100%; max-height: 280px; display: block; object-fit: cover; }
.banner-preview .button { position: absolute; right: 10px; bottom: 10px; background: rgba(255,255,255,.94); box-shadow: 0 4px 12px rgba(11,28,48,.12); }
.switch-label { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.switch-label input { width: 34px; height: 18px; accent-color: var(--blue); }
.settings-help { margin: -5px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.timezone-settings-grid { align-items: start; }
.timezone-preview-field { min-width: 0; display: grid; gap: 7px; }
.timezone-preview-label { color: #344054; font-size: .76rem; font-weight: 750; }
.timezone-preview { min-height: 42px; padding: 11px 14px; display: grid; align-content: center; color: var(--navy); background: #f5f7fb; border: 1px solid var(--line); border-radius: 11px; }
.session-policy-note { margin: 0; }
.session-warning-dialog { width: min(520px, calc(100% - 28px)); }
.session-warning-card { display: grid; gap: 14px; }
.session-warning-card > header, .session-warning-card > footer { margin: 0; }
.session-warning-card > p { margin: 0; color: var(--navy); font-size: .82rem; line-height: 1.55; }
.session-warning-card #session-warning-countdown { color: var(--blue); font-size: 1.15rem; }
.session-warning-card .session-warning-help { color: var(--muted); font-size: .7rem; }
.timezone-preview strong { font-size: .78rem; }
.settings-secret { padding: 18px; display: grid; gap: 14px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 13px; }
.settings-secret p { margin: 0; color: var(--muted); font-size: .68rem; }
.payment-configuration-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.payment-configuration-group { min-width: 0; padding: 15px; display: grid; gap: 14px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.payment-configuration-group.environment-test-card { border-top: 3px solid #38bdf8; }
.payment-configuration-group.environment-production-card { border-top: 3px solid #ef4444; }
.payment-configuration-group-title { font-size: .72rem; }
.payment-configuration-group > label { min-width: 0; }
.payment-environment-warning { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 11px; }
.payment-environment-warning strong { font-size: .7rem; letter-spacing: .08em; }
.payment-environment-warning span { color: var(--muted); font-size: .66rem; line-height: 1.4; text-align: right; }
.payment-environment-warning.environment-test { color: #075985; background: #e0f2fe; border-color: #7dd3fc; }
.payment-environment-warning.environment-production { color: #991b1b; background: #fef2f2; border-color: #fca5a5; }
.payment-environment-warning.environment-unknown { color: #854d0e; background: #fffbeb; border-color: #fde68a; }
.payment-credentials-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-credential-card { padding: 14px; display: grid; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.payment-credential-card.environment-test-card { border-top: 3px solid #38bdf8; }
.payment-credential-card.environment-production-card { border-top: 3px solid #ef4444; }
.payment-credential-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payment-credential-heading strong { font-size: .72rem; }
.payment-diagnostics { padding-top: 16px; display: grid; gap: 14px; border-top: 1px solid var(--line); }
.payment-diagnostics-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-diagnostics-heading strong { font-size: .78rem; }
.payment-diagnostics-heading p { margin-top: 3px; }
.payment-diagnostics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.payment-diagnostic-card { min-width: 0; padding: 14px; display: grid; gap: 11px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.payment-diagnostic-card h4 { margin: 0; font-size: .78rem; }
.payment-diagnostic-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payment-diagnostic-row > div { min-width: 0; display: grid; gap: 2px; }
.payment-diagnostic-row strong { font-size: .7rem; }
.payment-diagnostic-row small { color: var(--muted); font-size: .58rem; font-weight: 500; }
.payment-diagnostic-badge { padding: 5px 8px; flex: 0 0 auto; color: #475467; background: #eef2f6; border-radius: 999px; font-size: .55rem; font-weight: 900; text-transform: uppercase; }
.payment-diagnostic-badge.is-ok { color: #047857; background: #dcfce7; }
.payment-diagnostic-badge.is-warning { color: #854d0e; background: #fef3c7; }
.payment-diagnostic-badge.is-error { color: #b42318; background: #fee4e2; }
.payment-diagnostic-card .button { width: 100%; }
.payment-webhook-url { min-width: 0; font-size: .64rem; }
.payment-webhook-url input { min-width: 0; font-size: .6rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.payment-policy { padding: 16px 18px; display: grid; gap: 8px; background: #fff9e8; border: 1px solid #f1df9a; border-radius: 13px; }
.payment-policy .settings-help { margin: 0; }
.smtp-test-row { padding-top: 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.smtp-test-controls { display: flex; align-items: center; gap: 8px; }
.smtp-test-controls input { width: min(260px, 100%); }
.settings-save { justify-self: end; min-width: 210px; }
.settings-aside { position: static; }
.settings-aside h3 { margin: 8px 0; font-size: 1.1rem; }
.settings-aside > p { color: var(--muted); font-size: .7rem; line-height: 1.5; }
.settings-status-item { padding: 13px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); font-size: .7rem; font-weight: 750; }
.account-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.users-panel { margin-top: 20px; }
.factory-reset-panel { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-color: #fecaca; background: #fffafa; }
.factory-reset-panel h2 { margin: 5px 0; }
.factory-reset-panel p { margin: 0; max-width: 700px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.factory-reset-panel .button { flex: 0 0 auto; }
.user-actions { display: flex; gap: 7px; }
.user-actions .button { min-height: 34px; padding: 6px 10px; }

dialog { width: min(760px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 0; border-radius: 20px; box-shadow: 0 24px 80px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(7, 13, 21, .6); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; background: white; }
.dialog-card header, .dialog-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-card header { margin-bottom: 20px; }
.dialog-card footer { margin-top: 20px; justify-content: flex-end; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: #f1f3f6; font-size: 1.3rem; }
.order-email-button { width: 42px; height: 42px; border: 1px solid #d7deea; border-radius: 11px; background: #fff; color: #0b1c30; font-size: 1.25rem; cursor: pointer; }
.order-email-button:hover { border-color: #1265c8; color: #1265c8; background: #f2f7ff; }
.order-email-button:focus-visible { outline: 3px solid rgba(18, 101, 200, .22); outline-offset: 2px; }
.order-email-button:disabled { opacity: .5; cursor: wait; }
.order-action-unavailable { color: #98a2b3; }
.receipt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.receipt-ticket { margin: 12px 0; padding: 14px 0; border-top: 1px dashed #9ca3af; border-bottom: 1px dashed #9ca3af; }
.notice { padding: 12px; border-radius: 10px; font-size: .74rem; }
.notice-error { color: #9b1c1c; background: #fff0f0; border: 1px solid #ffcaca; }
.notice-success { color: #075c3f; background: #e7faf3; border: 1px solid #a9ead3; }
.notice-warning { color: #755600; background: #fff8dc; border: 1px solid #f3dc8c; }
.notice p { margin: 6px 0 0; line-height: 1.55; }
.sale-confirmation-card { display: grid; gap: 18px; }
.sale-confirmation-card > header, .sale-confirmation-card > footer { margin: 0; }
.sale-confirmation-intro { margin: -8px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.55; }
.sale-confirmation-content { display: grid; gap: 14px; }
.sale-confirmation-section { padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.sale-confirmation-section h3 { margin: 5px 0; font-size: 1.2rem; }
.sale-confirmation-section > p { margin: 0; color: var(--muted); font-size: .7rem; }
.sale-confirmation-grid { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.sale-confirmation-grid > div { min-width: 0; }
.sale-confirmation-grid .span-2 { grid-column: 1 / -1; }
.sale-confirmation-grid dt { margin-bottom: 4px; color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.sale-confirmation-grid dd { margin: 0; overflow-wrap: anywhere; font-size: .76rem; font-weight: 750; }
.sale-confirmation-total { padding: 16px 18px; display: grid; gap: 10px; color: white; background: var(--navy); border-radius: 14px; }
.sale-confirmation-total > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.sale-confirmation-total span { font-size: .7rem; }
.sale-confirmation-total strong { font-size: 1rem; }
.maintenance-dialog-card { display: grid; gap: 18px; }
.maintenance-dialog-card > header { margin-bottom: 0; }
.maintenance-summary { display: grid; gap: 14px; }
.maintenance-event-state { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.maintenance-event-state h3 { margin: 5px 0 0; font-size: 1.25rem; }
.maintenance-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.maintenance-stats > div { min-width: 0; padding: 14px; background: #f5f7fb; border: 1px solid var(--line); border-radius: 12px; }
.maintenance-stats span, .maintenance-stats strong { display: block; }
.maintenance-stats span { color: var(--muted); font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.maintenance-stats strong { margin-top: 7px; font-size: 1.3rem; }
.maintenance-detail-counts { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .64rem; }
.maintenance-detail-counts strong { color: var(--navy); }
.factory-reset-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.danger-zone { margin-top: 20px; overflow: hidden; border: 1px solid #fecaca; border-radius: 15px; }
.danger-zone-heading { padding: 18px; background: #fff7f7; border-bottom: 1px solid #fecaca; }
.danger-zone-heading h3 { margin: 5px 0; }
.danger-zone-heading p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.maintenance-action { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #fee2e2; }
.maintenance-action:last-child { border-bottom: 0; }
.maintenance-action h3 { margin-bottom: 5px; font-size: .84rem; }
.maintenance-action p { margin: 0; max-width: 500px; color: var(--muted); font-size: .68rem; line-height: 1.5; }
.maintenance-action .button { flex: 0 0 auto; }
.maintenance-action-critical { background: #fffafa; }
.maintenance-confirm { display: grid; gap: 16px; }
.maintenance-confirm footer { margin-top: 2px; }
.maintenance-back { width: max-content; padding: 0; color: var(--blue); background: transparent; border: 0; font-size: .72rem; font-weight: 800; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: 360px; padding: 13px 16px; color: white; background: #0b1c30; border-radius: 11px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .18s; font-size: .75rem; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (min-width: 768px) {
    html, body { height: 100%; overflow: hidden; }
    .app-shell { height: 100%; min-height: 0; overflow: hidden; }
    .workspace { height: calc(100% - 40px); min-height: 0; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
    .sidebar { min-height: 0; position: sticky; top: 0; align-self: start; height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
    .main-content { height: auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
    #new-event { display: none; }
    .events-empty-state { display: none; }
    .event-create-card { min-height: 360px; padding: 32px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; color: var(--navy); background: rgba(255,255,255,.56); border: 2px dashed #9ba7b7; border-radius: 16px; text-align: center; }
    .event-create-icon { width: 104px; height: 78px; display: grid; place-items: center; color: var(--navy); }
    .event-create-icon svg { width: 100%; height: 100%; display: block; }
    .event-create-card h3 { margin: 2px 0 0; font-size: 1.15rem; }
    .event-create-card p { width: 100%; max-width: 270px; margin: 0; padding-bottom: 20px; color: var(--muted); border-bottom: 1px solid #b7c0cc; font-size: .72rem; line-height: 1.5; }
    .event-create-card .button { min-width: 150px; margin-top: 5px; }
}

@media (max-width: 1000px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .event-grid { grid-template-columns: repeat(2, 1fr); }
    .two-columns { grid-template-columns: minmax(0, 1fr); }
    .checkin-console, .settings-layout, .account-layout { grid-template-columns: 1fr; }
    .scanner-lens { min-height: 380px; }
    .report-filter-bar, .report-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    html { min-width: 0; }
    .login-card { grid-template-columns: 1fr; }
    .login-page { padding: 14px; align-items: start; }
    .login-card { margin-top: max(10px, env(safe-area-inset-top)); border-radius: 22px; }
    .login-brand { min-height: 190px; padding: 28px 24px; }
    .login-brand h1 { font-size: clamp(2.3rem, 14vw, 3.5rem); }
    .login-form { padding: 28px 24px; }
    .topbar { height: 34px; padding: 0 14px; font-size: .65rem; }
    .workspace { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
    .sidebar { min-height: 62px; padding: 8px max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 5px; color: var(--navy); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); box-shadow: 0 8px 24px rgba(11,28,48,.08); backdrop-filter: blur(14px); }
    .organization { margin: 0; padding: 0; display: block; }
    .organization-mark { width: 36px; height: 36px; color: white; background: var(--navy); border-radius: 10px; }
    .organization div, .logout { display: none; }
    .sidebar nav { display: flex; align-items: center; justify-content: center; gap: 2px; overflow: visible; }
    .nav-item { width: 42px; height: 42px; padding: 10px; flex: 0 0 auto; justify-content: center; color: #77808d; border-radius: 10px; white-space: nowrap; }
    .nav-item:hover { color: var(--navy); background: #eef1f5; }
    .nav-item.is-active { color: white; background: var(--navy); box-shadow: none; }
    .nav-item[data-view="account"] { display: none; }
    .nav-icon { display: block; }
    .nav-label { display: none; }
    .mobile-account { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; color: white; background: var(--blue); border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px #d9dde7; font-weight: 900; }
    .mobile-account.is-active { color: white; background: var(--navy); box-shadow: 0 0 0 3px rgba(0,88,190,.18); }
    .main-content { padding: 0 14px calc(30px + env(safe-area-inset-bottom)); overflow: visible; }
    .page-header { min-height: 82px; }
    .page-header .eyebrow { font-size: .6rem; }
    .page-header h1 { font-size: 1.7rem; }
    .user-chip { display: none; }
    .event-grid, .stats-grid, .form-grid { grid-template-columns: 1fr; }
    .report-filter-bar, .report-filter-grid, .analytics-grid { grid-template-columns: 1fr; }
    .analytics-panel-wide { grid-column: auto; }
    .report-export-actions { width: 100%; flex-direction: column; }
    .report-pagination { align-items: stretch; flex-direction: column; text-align: center; }
    .bar-chart-row { grid-template-columns: minmax(80px, 1fr) minmax(70px, 1.5fr) auto; }
    .span-2 { grid-column: auto; }
    .panel { padding: 16px; border-radius: 14px; }
    .stat-card { padding: 17px; }
    .panel-header, .view-toolbar { align-items: stretch; flex-direction: column; }
    .view-toolbar .button, .panel-header .button { width: 100%; }
    .compact-input { width: 100%; }
    .table-wrap { margin-right: -16px; margin-left: -16px; padding: 0 16px; overscroll-behavior-inline: contain; }
    table { min-width: 620px; }
    th, td { padding: 12px 9px; }
    .sales-form-panel { width: 100%; min-width: 0; }
    .sales-form-panel .form-grid { grid-template-columns: minmax(0, 1fr); }
    .sales-form-panel label, .sales-form-panel input, .sales-form-panel select { min-width: 0; }
    .sales-form-panel > .button { width: 100%; }
    .sales-form-panel .sale-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
    .sales-form-panel .sale-summary strong { max-width: 100%; overflow-wrap: anywhere; }
    .sales-history-panel .table-wrap { width: 100%; max-width: 100%; margin-right: 0; margin-left: 0; padding: 0 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
    .sales-history-panel table { min-width: 1050px; }
    .payment-resolution-panel .table-wrap { width: 100%; max-width: 100%; padding: 0 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-inline: contain; }
    .payment-resolution-panel table { min-width: 1080px; }
    .order-history-header { align-items: stretch; }
    .order-status-filter { width: 100%; }
    .mobile-scroll-hint { margin: -8px 0 10px; display: block; color: var(--muted); font-size: .65rem; text-align: right; }
    .receipt, .receipt-ticket { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
    .event-cover { height: 170px; }
    .event-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-actions .button { min-width: 0; }
    .scanner-lens { min-height: 330px; }
    body.scanner-mobile-active { overflow: hidden; overscroll-behavior: none; }
    body.scanner-mobile-active .view.is-active { animation: none; transform: none; }
    .scanner-lens.is-mobile-fullscreen { width: 100vw; width: 100dvw; height: 100vh; height: 100dvh; min-height: 0; position: fixed; inset: 0; z-index: 1000; border-radius: 0; }
    .scanner-lens.is-mobile-fullscreen .scanner-exit { display: grid; }
    .scanner-lens.is-mobile-fullscreen .scanner-live-badge { top: max(18px, calc(env(safe-area-inset-top) + 6px)); }
    .scanner-lens.is-mobile-fullscreen .scanner-state.is-success,
    .scanner-lens.is-mobile-fullscreen .scanner-state.is-error { width: auto; position: absolute; inset: max(70px, calc(env(safe-area-inset-top) + 58px)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); z-index: 6; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
    .scanner-lens.is-mobile-fullscreen .scanner-result-card { width: 100%; }
    .scanner-lens.is-mobile-fullscreen .scanner-result-action { width: min(280px, calc(100vw - 40px)); min-height: 52px; margin: 0; position: fixed; top: 50%; left: 50%; pointer-events: auto; transform: translate(-50%, -50%); }
    .scanner-lens.is-mobile-fullscreen .scanner-result-action:hover { transform: translate(-50%, calc(-50% - 1px)); }
    .scanner-lens.is-mobile-fullscreen.has-result .scanner-corner,
    .scanner-lens.is-mobile-fullscreen.has-result .scanner-line { opacity: 0; }
    .checkin-controls { padding: 24px; }
    .manual-checkin-row { grid-template-columns: 1fr; }
    .manual-checkin-row .button { width: 100%; }
    .attendee-filters, .settings-heading, .smtp-test-row { width: 100%; align-items: stretch; flex-direction: column; }
    .attendee-filters select, .smtp-test-controls input { width: 100%; }
    .smtp-test-controls { align-items: stretch; flex-direction: column; }
    .settings-heading p { text-align: left; }
    .settings-section-header { align-items: flex-start; flex-wrap: wrap; }
    .payment-credentials-grid { grid-template-columns: 1fr; }
    .payment-configuration-groups { grid-template-columns: 1fr; }
    .payment-diagnostics-grid { grid-template-columns: 1fr; }
    .payment-diagnostics-heading { align-items: stretch; flex-direction: column; }
    .payment-environment-warning { align-items: flex-start; flex-direction: column; }
    .payment-environment-warning span { text-align: left; }
    .organization-profile-header { display: grid; grid-template-columns: 46px minmax(0, 1fr) 44px; align-items: center; flex-wrap: nowrap; }
    .switch-label { width: 100%; margin-left: 50px; }
    .settings-save { width: 100%; justify-self: stretch; }
    .banner-upload-row { align-items: stretch; flex-direction: column; }
    .banner-file-button { width: 100%; }
    .banner-upload-row > span { white-space: normal; }
    .account-heading-actions { justify-items: stretch; }
    .mobile-logout { width: 100%; display: inline-flex; }
    .user-actions { flex-direction: column; }
    .maintenance-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .maintenance-action { align-items: stretch; flex-direction: column; }
    .maintenance-action .button { width: 100%; }
    .factory-reset-panel { align-items: stretch; flex-direction: column; }
    .factory-reset-panel .button { width: 100%; }
    .factory-reset-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sale-confirmation-grid { grid-template-columns: 1fr; }
    .sale-confirmation-grid .span-2 { grid-column: auto; }
    .sale-confirmation-total > div { align-items: flex-start; flex-direction: column; gap: 3px; }
    dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 16px; }
    .dialog-card { padding: 20px 16px; }
    .dialog-card footer { align-items: stretch; flex-direction: column-reverse; }
    .dialog-card footer .button { width: 100%; }
    .toast { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); left: 12px; max-width: none; }
}

@media (max-width: 360px) {
    .sidebar { grid-template-columns: 34px minmax(0, 1fr) 34px; padding-right: 7px; padding-left: 7px; }
    .organization-mark, .mobile-account { width: 34px; height: 34px; }
    .sidebar nav { gap: 0; }
    .nav-item { width: 39px; height: 39px; padding: 9px; }
    .main-content { padding-right: 11px; padding-left: 11px; }
    .checkin-controls { padding: 20px 16px; }
}

@media print {
    body * { visibility: hidden; }
    #receipt-dialog, #receipt-dialog * { visibility: visible; }
    #receipt-dialog { position: absolute; inset: 0; width: 80mm; max-height: none; box-shadow: none; }
    #receipt-dialog header button, #receipt-dialog footer { display: none; }
}
/* Categorías de boletos */
.ticket-types-editor{border:1px solid var(--border,#dbe2ec);border-radius:18px;padding:18px;background:#f7f9fc}
.ticket-types-editor summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-weight:800}
.ticket-types-editor summary small{color:#6f7b8c;font-weight:700}
#ticket-types-list{display:grid;gap:14px;margin:18px 0}
.ticket-type-editor-row{display:grid;grid-template-columns:1.5fr 1fr 1fr auto;gap:12px;align-items:end;padding:14px;background:#fff;border:1px solid #dbe2ec;border-radius:14px}
.ticket-type-editor-row .icon-button{margin-bottom:2px}
.ticket-type-remove-label{display:none}
.sale-ticket-types{display:grid;gap:10px;margin:14px 0}
.sale-ticket-type-row{display:grid;grid-template-columns:1fr minmax(170px,280px);align-items:center;gap:16px;padding:14px;border:1px solid #dbe2ec;border-radius:14px}
.sale-ticket-type-row strong,.sale-ticket-type-row small{display:block}
.sale-ticket-type-row small{margin-top:4px;color:#758094}
@media(max-width:760px){
  .ticket-type-editor-row{grid-template-columns:1fr 1fr}
  .ticket-type-editor-row label:first-child{grid-column:1/-1}
  .ticket-type-editor-row .ticket-type-remove{width:auto;height:auto;min-height:0;margin:2px 0 0;padding:7px 10px;grid-column:1/-1;justify-self:start;display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#fff;background:#c81e1e;border:1px solid #c81e1e;border-radius:8px;font-size:.7rem;font-weight:850;line-height:1.15}
  .ticket-type-editor-row .ticket-type-remove:hover{background:#a91515;border-color:#a91515}
  .ticket-type-editor-row .ticket-type-remove:disabled{color:#fff;background:#e8a3a3;border-color:#e8a3a3;opacity:.65;cursor:not-allowed}
  .ticket-type-remove-label{display:inline}
  .sale-ticket-type-row{grid-template-columns:1fr}
}
