:root {
    --navy: #0b1f33;
    --navy-2: #16324f;
    --coral: #f05b3d;
    --coral-dark: #d9472b;
    --orange: #f59e42;
    --ivory: #f7f2e8;
    --paper: #fffdf9;
    --white: #ffffff;
    --ink: #122033;
    --muted: #667085;
    --line: #e4ded4;
    --success: #13795b;
    --success-bg: #e7f7f1;
    --warning: #a15c00;
    --warning-bg: #fff3d6;
    --danger: #b42318;
    --danger-bg: #feeceb;
    --info-bg: #eaf2fb;
    --shadow: 0 18px 42px rgba(11, 31, 51, .10);
    --shadow-sm: 0 8px 20px rgba(11, 31, 51, .08);
    --radius: 18px;
    --radius-sm: 12px;
    --display: Georgia, "Times New Roman", serif;
    --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid rgba(240, 91, 61, .5); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--navy); font-family: var(--display); line-height: 1.12; }
h1 { font-size: clamp(2.35rem, 5vw, 4.6rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -.025em; }
h3 { font-size: 1.4rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
small, .hint { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mobile-only { display: none; }
.eyebrow { color: var(--coral); display: block; font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.brand { color: var(--navy); font-family: var(--display); font-size: 1.8rem; font-weight: 700; letter-spacing: -.035em; }
.brand-light { color: var(--white); }
.brand small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .15em; text-transform: uppercase; opacity: .65; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }

.button { align-items: center; border: 1px solid transparent; border-radius: 11px; display: inline-flex; font-weight: 750; gap: 14px; justify-content: center; min-height: 48px; padding: 11px 22px; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: linear-gradient(135deg, var(--coral), #f36c42); color: var(--white); box-shadow: 0 10px 24px rgba(240, 91, 61, .25); }
.button-primary:hover { background: linear-gradient(135deg, var(--coral-dark), var(--coral)); }
.button-outline { background: transparent; border-color: #b9c0c8; color: var(--navy); }
.button-outline:hover { border-color: var(--navy); background: rgba(11,31,51,.04); }
.button-muted { background: #e9e9e7; color: var(--muted); }
.button-small { min-height: 38px; padding: 7px 15px; font-size: .88rem; }
.button-block { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.text-button, .text-link { background: none; border: 0; color: var(--navy); font-size: .9rem; font-weight: 700; padding: 0; }
.danger-text { color: var(--danger) !important; }
.back-link { color: var(--muted); display: inline-block; font-weight: 700; margin-bottom: 10px; }

.site-header { align-items: center; background: var(--navy); color: var(--white); display: flex; height: 76px; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); position: relative; z-index: 20; }
.site-header .brand { color: var(--white); }
.site-nav { align-items: center; display: flex; gap: 42px; }
.site-nav > a:not(.button) { font-size: .93rem; font-weight: 650; opacity: .9; }
.site-nav .button-outline { border-color: rgba(255,255,255,.7); color: var(--white); min-width: 130px; }

.hero { background: var(--ivory); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 590px; }
.hero-copy { align-self: center; max-width: 650px; padding: 70px clamp(28px, 6vw, 90px); }
.hero-copy h1 { margin: 15px 0 24px; }
.hero-copy p { color: #4d5966; font-size: 1.18rem; max-width: 540px; }
.hero-copy .button { margin-top: 18px; }
.hero-media { min-height: 590px; overflow: hidden; position: relative; border-bottom-left-radius: 70px; }
.hero-media > img { height: 100%; object-fit: cover; position: absolute; width: 100%; }
.hero-media::after { background: linear-gradient(0deg, rgba(5,17,30,.58), transparent 50%); content: ""; inset: 0; position: absolute; }
.hero-event-chip { backdrop-filter: blur(12px); background: rgba(11,31,51,.75); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; bottom: 28px; color: var(--white); left: 28px; padding: 14px 18px; position: absolute; z-index: 2; }
.hero-event-chip span { display: block; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
.hero-event-chip strong { display: block; font-family: var(--display); font-size: 1.2rem; }

.events-section { margin: 0 auto; max-width: 1480px; padding: 88px clamp(24px, 4vw, 58px); }
.section-heading { align-items: end; display: flex; justify-content: space-between; margin-bottom: 34px; }
.section-heading h2 { margin: 4px 0 0; }
.section-heading > p { color: var(--muted); max-width: 380px; }
.event-grid { display: grid; gap: 28px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.event-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.event-card:hover { box-shadow: var(--shadow); transform: translateY(-6px); }
.event-card-image { display: block; height: 250px; overflow: hidden; position: relative; }
.event-card-image img { height: 100%; object-fit: cover; transition: transform .3s ease; width: 100%; }
.event-card:hover .event-card-image img { transform: scale(1.035); }
.date-badge { background: rgba(11,31,51,.88); border: 1px solid rgba(255,255,255,.28); border-radius: 10px; color: var(--white); font-family: var(--display); font-weight: 700; left: 18px; padding: 9px 12px; position: absolute; top: 18px; }
.event-card-body { padding: 22px; }
.event-card-body h3 { font-size: 1.65rem; margin-bottom: 8px; }
.event-location { color: var(--muted); font-size: .9rem; min-height: 28px; }
.event-card-footer { align-items: end; border-top: 1px solid var(--line); display: grid; gap: 12px; grid-template-columns: 1fr auto 42px; margin-top: 18px; padding-top: 18px; }
.event-card-footer > span { color: var(--muted); font-size: .8rem; }
.event-card-footer > strong { color: var(--coral); font-size: 1.16rem; line-height: 1.1; text-align: right; }
.event-card-footer > strong small { display: block; font-size: .68rem; font-weight: 500; }
.circle-link { align-items: center; border: 1px solid var(--line); border-radius: 50%; display: flex; font-size: 1.2rem; height: 40px; justify-content: center; width: 40px; }
.trust-strip { background: var(--navy); color: var(--white); display: grid; grid-template-columns: repeat(3, 1fr); padding: 35px clamp(24px, 8vw, 140px); }
.trust-strip div { border-right: 1px solid rgba(255,255,255,.18); padding: 6px 36px; text-align: center; }
.trust-strip div:last-child { border: 0; }
.trust-strip strong, .trust-strip span { display: block; }
.trust-strip span { font-size: .85rem; opacity: .7; }
.site-footer { background: #071522; color: rgba(255,255,255,.72); display: grid; gap: 35px; grid-template-columns: 2fr 1fr; padding: 60px clamp(28px, 7vw, 110px) 28px; }
.site-footer div { display: flex; flex-direction: column; gap: 8px; }
.site-footer p { max-width: 460px; }
.site-footer strong { color: var(--white); }
.site-footer small { border-top: 1px solid rgba(255,255,255,.12); grid-column: 1 / -1; padding-top: 20px; }

.event-hero { background: var(--navy); height: 480px; overflow: hidden; }
.event-hero img { height: 100%; object-fit: cover; width: 100%; }
.event-layout { display: grid; gap: 70px; grid-template-columns: minmax(0, 1fr) 390px; margin: 0 auto; max-width: 1260px; padding: 70px 30px 100px; }
.event-content h1 { margin: 10px 0 20px; }
.lead { color: var(--muted); font-size: 1.25rem; max-width: 780px; }
.event-facts { display: grid; gap: 28px; grid-template-columns: repeat(3, 1fr); margin: 45px 0; }
.event-facts div { display: flex; flex-direction: column; }
.event-facts span { color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.event-facts strong { color: var(--navy); margin-top: 5px; }
.rich-copy { color: #3f4b59; font-size: 1.06rem; line-height: 1.82; }
.terms-box { background: var(--ivory); border-radius: var(--radius-sm); margin-top: 36px; padding: 20px 24px; }
.terms-box summary { color: var(--navy); cursor: pointer; font-weight: 750; }
.terms-box div { color: var(--muted); margin-top: 15px; }
.purchase-card { align-self: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; position: sticky; top: 24px; }
.purchase-card h2 { margin: 6px 0 5px; }
.purchase-card p { color: var(--muted); }
.purchase-card > small { display: block; margin-top: 15px; text-align: center; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px; }
label { color: var(--navy); display: flex; flex-direction: column; font-size: .86rem; font-weight: 700; gap: 7px; }
input, textarea, select { background: var(--white); border: 1px solid #cfd3d8; border-radius: 9px; color: var(--ink); min-height: 46px; padding: 10px 13px; width: 100%; }
textarea { line-height: 1.55; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240,91,61,.12); outline: 0; }
input[readonly] { background: #f4f5f6; color: #4a5564; cursor: copy; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: 2fr 1fr 1fr 1fr; }
.check-row { align-items: flex-start; flex-direction: row; font-weight: 600; gap: 10px; line-height: 1.45; }
.check-row input { flex: 0 0 auto; height: 18px; min-height: 18px; margin: 2px 0 0; width: 18px; }
.form-section { position: relative; }
.form-section > label, .form-section > .form-grid, .form-section > .check-row { margin-top: 20px; }
.step-number { align-items: center; background: var(--navy); border-radius: 50%; color: var(--white); display: inline-flex; font-size: .8rem; font-weight: 800; height: 27px; justify-content: center; margin-bottom: 8px; width: 27px; }
.cover-preview { border-radius: 12px; height: 220px; margin-top: 20px; object-fit: cover; width: 100%; }
.card-heading { align-items: flex-start; display: flex; gap: 20px; justify-content: space-between; }
.card-heading h2 { margin-bottom: 4px; }
.card-heading p { color: var(--muted); margin: 0; }

.checkout-shell { margin: 0 auto; max-width: 1280px; padding: 55px 28px 90px; }
.checkout-heading { margin-bottom: 28px; }
.checkout-heading > a { color: var(--muted); display: inline-block; margin-bottom: 20px; }
.checkout-heading h1 { font-size: clamp(2rem, 4vw, 3.5rem); margin: 7px 0; }
.checkout-heading p { color: var(--muted); }
.checkout-form { align-items: start; display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr) 370px; }
.checkout-main { display: grid; gap: 24px; }
.ticket-options { display: grid; gap: 14px; margin-top: 20px; }
.ticket-option { align-items: center; background: #fbfaf7; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 15px; grid-template-columns: minmax(0, 1fr) 110px 75px; padding: 18px; }
.ticket-option p { color: var(--muted); font-size: .87rem; margin: 2px 0; }
.ticket-option > div > span { color: var(--success); font-size: .78rem; font-weight: 700; }
.ticket-price { color: var(--navy); font-weight: 800; text-align: right; }
.quantity-select select { min-height: 40px; }
.attendee-fields { display: grid; gap: 12px; grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
.checkout-summary { position: sticky; top: 22px; }
.checkout-summary > * + * { margin-top: 18px; }
.summary-row { align-items: center; display: flex; gap: 20px; justify-content: space-between; padding: 8px 0; }
.summary-row span { color: var(--muted); }
.summary-total { border-top: 1px solid var(--line); font-size: 1.12rem; margin-top: 10px; padding-top: 18px; }

.order-page { margin: 0 auto; max-width: 1120px; padding: 60px 28px 90px; }
.order-status-card { border-radius: 22px; margin-bottom: 28px; overflow: hidden; padding: 45px; text-align: center; }
.order-status-card.status-success { background: var(--success-bg); }
.order-status-card.status-warning { background: var(--warning-bg); }
.order-status-card.status-danger { background: var(--danger-bg); }
.order-status-card.status-muted { background: #eceeef; }
.status-icon { align-items: center; background: var(--white); border-radius: 50%; display: inline-flex; font-size: 2rem; font-weight: 900; height: 68px; justify-content: center; margin-bottom: 15px; width: 68px; }
.order-status-card h1 { font-size: clamp(2rem, 5vw, 3.6rem); margin: 6px 0 10px; }
.order-status-card p { color: #485564; }
.order-columns { display: grid; gap: 25px; grid-template-columns: 1.05fr .95fr; }
.attendee-row { align-items: center; border-bottom: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; padding: 16px 0; }
.attendee-row:last-child { border: 0; }
.attendee-row div { display: flex; flex-direction: column; }
.attendee-row span { color: var(--muted); font-size: .82rem; }

.ticket-page { background: #eef0f2; min-height: calc(100vh - 76px); padding: 45px 28px; }
.ticket-actions { align-items: center; display: flex; justify-content: space-between; margin: 0 auto 20px; max-width: 1180px; }
.ticket { background: var(--white); border-radius: 22px; box-shadow: var(--shadow); display: grid; grid-template-columns: 310px minmax(0,1fr) 270px; margin: 0 auto; max-width: 1180px; min-height: 530px; overflow: hidden; }
.ticket-visual { overflow: hidden; position: relative; }
.ticket-visual::after { background: linear-gradient(0deg, rgba(7,21,34,.85), transparent); content: ""; inset: 0; position: absolute; }
.ticket-visual img { height: 100%; object-fit: cover; position: absolute; width: 100%; }
.ticket-visual .brand { bottom: 25px; left: 25px; position: absolute; z-index: 1; }
.ticket-main { align-self: center; padding: 45px; }
.ticket-main h1 { font-size: 2.6rem; }
.ticket-details { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); margin-top: 35px; }
.ticket-details div { display: flex; flex-direction: column; }
.ticket-details span { color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.ticket-details small { margin-top: 3px; }
.ticket-code { color: var(--muted); font-family: ui-monospace, monospace; font-size: .8rem; letter-spacing: .08em; margin-top: 35px; }
.ticket-qr { align-items: center; border-left: 2px dashed var(--line); display: flex; flex-direction: column; justify-content: center; padding: 35px; text-align: center; }
.ticket-qr #qrcode { background: var(--white); padding: 10px; }
.ticket-qr strong { color: var(--navy); margin-top: 18px; }
.ticket-qr span { color: var(--muted); font-size: .78rem; }

.lookup-page, .install-shell, .login-page { display: grid; min-height: calc(100vh - 76px); }
.lookup-page { align-items: center; background: var(--ivory); gap: 60px; grid-template-columns: 1fr 430px; padding: 60px max(28px, calc((100vw - 1120px) / 2)); }
.lookup-copy p { color: var(--muted); font-size: 1.12rem; max-width: 560px; }
.lookup-form > * + * { margin-top: 18px; }
.validation-page { align-items: center; background: var(--ivory); display: flex; justify-content: center; min-height: calc(100vh - 76px); padding: 40px 20px; }
.validation-card { border-radius: 24px; max-width: 610px; padding: 52px; text-align: center; width: 100%; }
.validation-card.valid { background: var(--success-bg); }
.validation-card.used { background: var(--warning-bg); }
.validation-card.invalid { background: var(--danger-bg); }
.validation-card dl { background: rgba(255,255,255,.65); border-radius: 14px; margin: 25px 0; padding: 12px 20px; text-align: left; }
.validation-card dl div { display: flex; justify-content: space-between; padding: 9px 0; }
.validation-card dt { color: var(--muted); }
.validation-card dd { font-weight: 750; margin: 0; }
.simple-page { min-height: 70vh; padding: 80px 24px; }
.legal-page article { margin: 0 auto; max-width: 820px; }
.legal-page article > p { color: #4f5b68; font-size: 1.03rem; }
.legal-page h2 { font-size: 1.65rem; margin: 38px 0 10px; }
.empty-state { border: 1px dashed #c9c4bb; border-radius: var(--radius); padding: 60px 25px; text-align: center; }
.empty-state p { color: var(--muted); }
.empty-icon { color: var(--coral); display: block; font-size: 3rem; }

.install-shell { background: var(--ivory); gap: 70px; grid-template-columns: .85fr 1.15fr; padding: 55px max(28px, calc((100vw - 1260px) / 2)); }
.install-intro { align-self: start; padding-top: 60px; position: sticky; top: 20px; }
.install-intro p { color: var(--muted); font-size: 1.1rem; }
.requirement-list { display: flex; flex-direction: column; gap: 8px; margin-top: 30px; }
.requirement-list .ok { color: var(--success); }
.requirement-list .fail { color: var(--danger); }
.install-form > * + * { margin-top: 18px; }

.login-page { background: var(--ivory); grid-template-columns: 1.1fr .9fr; }
.login-visual { min-height: 680px; overflow: hidden; position: relative; }
.login-visual::after { background: linear-gradient(0deg, rgba(7,21,34,.8), transparent 70%); content: ""; inset: 0; position: absolute; }
.login-visual img { height: 100%; object-fit: cover; position: absolute; width: 100%; }
.login-visual > div { bottom: 55px; color: var(--white); left: 55px; max-width: 600px; position: absolute; z-index: 1; }
.login-visual h1 { color: var(--white); font-size: 3.6rem; }
.login-form { align-self: center; box-shadow: var(--shadow); justify-self: center; max-width: 430px; width: calc(100% - 50px); }
.login-form > * + * { margin-top: 18px; }
.login-form .text-link { display: block; margin-top: 22px; text-align: center; }

.flash, .alert { border-radius: 11px; margin: 18px auto; max-width: 1180px; padding: 14px 18px; }
.flash { left: 50%; position: fixed; top: 78px; transform: translateX(-50%); width: calc(100% - 40px); z-index: 100; }
.flash-success, .alert-success { background: var(--success-bg); color: var(--success); }
.flash-warning, .alert-warning { background: var(--warning-bg); color: var(--warning); }
.flash-danger, .alert-danger { background: var(--danger-bg); color: var(--danger); }
.flash-info, .alert-info { background: var(--info-bg); color: var(--navy); }
.alert ul { margin-bottom: 0; }
.alert a { text-decoration: underline; }
.badge { border-radius: 999px; display: inline-flex; font-size: .72rem; font-weight: 800; line-height: 1.2; padding: 6px 10px; white-space: nowrap; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: #edf0f2; color: #5e6977; }
.badge-info { background: var(--info-bg); color: var(--navy); }
.badge-large { font-size: .85rem; padding: 9px 14px; }

.admin-body { background: #f3f4f5; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-sidebar { background: var(--navy); color: rgba(255,255,255,.78); display: flex; flex-direction: column; min-height: 100vh; padding: 30px 22px; position: sticky; top: 0; }
.admin-sidebar .brand { padding: 0 12px 30px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.admin-sidebar nav a { border-radius: 9px; font-size: .92rem; font-weight: 600; padding: 11px 12px; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.09); color: var(--white); }
.sidebar-logout { border-top: 1px solid rgba(255,255,255,.12); margin-top: auto; padding: 18px 12px 0; }
.admin-main { min-width: 0; }
.admin-topbar { align-items: center; background: var(--white); border-bottom: 1px solid var(--line); display: flex; height: 76px; justify-content: space-between; padding: 0 34px; }
.admin-topbar strong { color: var(--navy); display: block; line-height: 1.1; }
.admin-topbar .eyebrow { font-size: .6rem; }
.admin-user { color: var(--muted); font-size: .88rem; }
.admin-content { padding: 34px; }
.admin-content > .flash { position: static; transform: none; width: 100%; }
.page-heading { align-items: center; display: flex; gap: 25px; justify-content: space-between; margin-bottom: 28px; }
.page-heading h1 { font-size: 2.5rem; margin: 2px 0; }
.page-heading p { color: var(--muted); margin: 0; }
.metric-grid { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); margin: 24px 0; }
.metric-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.metric-card span { color: var(--muted); display: block; font-size: .78rem; font-weight: 750; text-transform: uppercase; }
.metric-card strong { color: var(--navy); display: block; font-family: var(--display); font-size: 2rem; margin: 8px 0 2px; }
.dashboard-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .7fr); }
.data-list { margin: 10px -10px -10px; }
.data-list-row { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 16px; grid-template-columns: minmax(0,1fr) auto 100px; padding: 15px 10px; }
.data-list-row div { display: flex; flex-direction: column; }
.data-list-row span:not(.badge) { color: var(--muted); font-size: .8rem; }
.data-list-row > strong { text-align: right; }
.quick-actions > a { align-items: center; border-top: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: 38px 1fr auto; padding: 17px 0; }
.quick-actions > a > span { align-items: center; background: var(--ivory); border-radius: 9px; color: var(--coral); display: flex; height: 38px; justify-content: center; }
.quick-actions > a div { display: flex; flex-direction: column; }
.quick-actions > a small { font-size: .75rem; }
.table-card { padding: 0; overflow: visible; }
.responsive-table { overflow: auto; }
table { border-collapse: collapse; min-width: 800px; width: 100%; }
th { background: #f9f9f7; color: var(--muted); font-size: .7rem; letter-spacing: .07em; padding: 13px 18px; text-align: left; text-transform: uppercase; }
td { border-top: 1px solid var(--line); padding: 15px 18px; vertical-align: middle; }
td > span, td div > span { color: var(--muted); display: block; font-size: .78rem; }
.table-event { align-items: center; display: flex; gap: 13px; }
.table-event img { border-radius: 8px; height: 52px; object-fit: cover; width: 78px; }
.table-event div { min-width: 180px; }
.table-actions { align-items: center; display: flex; gap: 15px; }
.table-actions > a { color: var(--navy); font-size: .85rem; font-weight: 750; }
.action-menu { position: relative; }
.action-menu summary { cursor: pointer; list-style: none; }
.action-menu form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 160px; padding: 6px; position: absolute; right: 0; z-index: 10; }
.action-menu button { background: none; border: 0; border-radius: 6px; display: block; padding: 8px 10px; text-align: left; width: 100%; }
.action-menu button:hover { background: #f4f5f6; }
.clickable-row { cursor: pointer; }
.clickable-row:hover td { background: #fcfcfa; }
.empty-inline { color: var(--muted); padding: 35px 10px; text-align: center; }

.editor-layout { align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr) 330px; }
.editor-main { display: grid; gap: 22px; }
.editor-sidebar { min-width: 0; }
.sticky-card { position: sticky; top: 20px; }
.repeater { display: grid; gap: 14px; margin-top: 18px; }
.repeater-item { background: #fbfaf7; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.repeater-heading { align-items: center; display: flex; justify-content: space-between; margin-bottom: 14px; }
.repeater-item.compact { position: relative; }
.repeater-item.compact > .text-button { margin-top: 10px; }
.filter-bar { align-items: end; display: grid; gap: 15px; grid-template-columns: minmax(260px, 1fr) 220px auto; margin-bottom: 20px; padding: 16px; }
.search-field { position: relative; }
.order-admin-grid { display: grid; gap: 22px; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); }
.order-admin-grid > div, .order-admin-grid > aside { display: grid; gap: 22px; }
.detail-card h2 { margin-bottom: 15px; }
.detail-list { margin: 0; }
.detail-list div { border-bottom: 1px solid var(--line); display: grid; gap: 15px; grid-template-columns: 110px minmax(0, 1fr); padding: 10px 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.code-text { font-family: ui-monospace, monospace; font-size: .75rem; }
.action-stack { display: grid; gap: 10px; }

.checkin-layout { align-items: start; display: grid; gap: 25px; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr); }
.scanner-card { text-align: center; }
#qr-reader { border: 0 !important; overflow: hidden; }
#qr-reader video { border-radius: 14px; }
.scanner-placeholder { align-items: center; background: var(--navy); border-radius: 14px; color: var(--white); display: flex; flex-direction: column; justify-content: center; min-height: 430px; padding: 40px; }
.scanner-placeholder > span { color: var(--coral); font-size: 5rem; line-height: 1; }
.scanner-placeholder p { color: rgba(255,255,255,.65); }
.scanner-card .button { margin-top: 16px; }
.manual-checkin > * + * { margin-top: 18px; }
.checkin-result { border-radius: var(--radius); margin-top: 20px; padding: 28px; text-align: center; }
.checkin-result.result-success { background: var(--success-bg); color: var(--success); }
.checkin-result.result-used { background: var(--warning-bg); color: var(--warning); }
.checkin-result.result-unpaid, .checkin-result.result-invalid { background: var(--danger-bg); color: var(--danger); }
.checkin-result .status-icon { margin-right: 12px; }
.checkin-result strong { display: block; font-size: 1.1rem; }
.checkin-result p { margin: 8px 0 0; }
.checkin-help { margin-top: 20px; }
.checkin-help ul { color: var(--muted); padding-left: 20px; }
.settings-grid { align-items: start; display: grid; gap: 22px; grid-template-columns: minmax(0,1fr) 360px; }
.settings-grid > div, .settings-grid > aside { display: grid; gap: 22px; }
.integration-status { align-items: center; border-radius: 9px; display: flex; gap: 9px; margin-top: 15px; padding: 10px 12px; }
.integration-status span { border-radius: 50%; height: 9px; width: 9px; }
.integration-status.connected { background: var(--success-bg); color: var(--success); }
.integration-status.connected span { background: var(--success); }
.integration-status.disconnected { background: var(--warning-bg); color: var(--warning); }
.integration-status.disconnected span { background: var(--warning); }
.webhook-box { background: var(--ivory); border-radius: 12px; margin-top: 22px; padding: 18px; }
.webhook-box label { margin-top: 13px; }

@media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr 1fr; }
    .hero-copy { padding-left: 42px; padding-right: 42px; }
    .event-grid { grid-template-columns: repeat(2, 1fr); }
    .event-layout { gap: 35px; grid-template-columns: minmax(0,1fr) 330px; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid, .order-admin-grid { grid-template-columns: 1fr; }
    .editor-layout, .settings-grid { grid-template-columns: 1fr; }
    .sticky-card { position: static; }
    .ticket { grid-template-columns: 240px 1fr; }
    .ticket-qr { border-left: 0; border-top: 2px dashed var(--line); grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .mobile-only { display: inline-flex; }
    .site-header { height: 68px; padding: 0 20px; }
    .site-nav { background: var(--navy); display: none; flex-direction: column; gap: 18px; left: 0; padding: 24px; position: absolute; right: 0; top: 68px; }
    .site-nav.is-open { display: flex; }
    .hero { display: flex; flex-direction: column; }
    .hero-copy { padding: 55px 25px; }
    .hero-media { border-radius: 0; min-height: 380px; order: -1; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .event-grid { grid-template-columns: 1fr; }
    .event-card-image { height: 230px; }
    .trust-strip { grid-template-columns: 1fr; }
    .trust-strip div { border-bottom: 1px solid rgba(255,255,255,.18); border-right: 0; padding: 20px; }
    .site-footer { grid-template-columns: 1fr; }
    .site-footer small { grid-column: auto; }
    .event-hero { height: 320px; }
    .event-layout { grid-template-columns: 1fr; padding-top: 40px; }
    .event-facts { grid-template-columns: 1fr; }
    .purchase-card { position: static; }
    .checkout-form { grid-template-columns: 1fr; }
    .checkout-summary { position: static; }
    .order-columns { grid-template-columns: 1fr; }
    .ticket { grid-template-columns: 1fr; }
    .ticket-visual { min-height: 230px; }
    .ticket-main { padding: 30px; }
    .ticket-details { grid-template-columns: 1fr; }
    .ticket-qr { grid-column: auto; }
    .lookup-page, .install-shell, .login-page { grid-template-columns: 1fr; }
    .lookup-page { padding: 55px 25px; }
    .install-intro { padding-top: 0; position: static; }
    .login-visual { display: none; }
    .login-page { min-height: calc(100vh - 68px); padding: 35px 0; }
    .admin-shell { display: block; }
    .admin-sidebar { bottom: 0; left: -270px; position: fixed; top: 0; transition: left .2s ease; width: 250px; z-index: 100; }
    .admin-sidebar.is-open { left: 0; }
    .admin-topbar { padding: 0 20px; }
    .admin-content { padding: 24px 16px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading .button { width: 100%; }
    .metric-grid { grid-template-columns: 1fr 1fr; }
    .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .checkin-layout { grid-template-columns: 1fr; }
    .scanner-placeholder { min-height: 330px; }
}

@media (max-width: 520px) {
    h1 { font-size: 2.45rem; }
    .hero-media { min-height: 300px; }
    .events-section { padding-top: 60px; }
    .event-card-footer { grid-template-columns: 1fr auto; }
    .event-card-footer .circle-link { display: none; }
    .ticket-option { grid-template-columns: 1fr auto; }
    .quantity-select { grid-column: 1 / -1; }
    .attendee-fields { grid-template-columns: 1fr; }
    .form-grid.two { grid-template-columns: 1fr; }
    .order-status-card { padding: 35px 20px; }
    .metric-grid { grid-template-columns: 1fr; }
    .card { padding: 21px; }
    .table-card { padding: 0; }
}

@media print {
    .site-header, .site-footer, .no-print { display: none !important; }
    .ticket-page { background: var(--white); min-height: 0; padding: 0; }
    .ticket { border: 1px solid #ccc; box-shadow: none; grid-template-columns: 27% 48% 25%; min-height: 470px; }
    .ticket-qr { border-left: 2px dashed #ccc; border-top: 0; grid-column: auto; }
    .ticket-main { padding: 28px; }
    .ticket-main h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
