/* Whoosh360 Events — same structure and footer as vouchers.whoosh360.com,
   violet accent. Light + dark themes (system default, toggle overrides). */
:root {
  --font-stack: "Avenir Next", "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-muted: #efeff7;
  --border: #e2e1ee;
  --text: #16142b;
  --text-muted: #5c5a78;
  --text-faint: #8a88a3;
  --accent: #6d28d9;          /* text/links/borders */
  --accent-btn: #6d28d9;      /* button background (white text 7:1) */
  --accent-btn-hover: #5b21b6;
  --accent-soft: #efe8fd;
  --on-accent: #ffffff;
  --success: #15803d;
  --success-soft: #e3f6e9;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --warning: #92400e;
  --warning-soft: #fef3c7;
  --shadow-card: 0 1px 2px rgba(22, 20, 43, 0.06), 0 8px 24px rgba(22, 20, 43, 0.06);
  --shadow-hover: 0 2px 6px rgba(22, 20, 43, 0.08), 0 16px 32px rgba(22, 20, 43, 0.1);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0b16;
    --surface: #15132a;
    --surface-muted: #1d1a36;
    --border: #2b2848;
    --text: #efedf9;
    --text-muted: #aba7c8;
    --text-faint: #75719a;
    --accent: #c4b5fd;
    --accent-btn: #7c3aed;
    --accent-btn-hover: #6d28d9;
    --accent-soft: rgba(167, 139, 250, 0.16);
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0b16;
  --surface: #15132a;
  --surface-muted: #1d1a36;
  --border: #2b2848;
  --text: #efedf9;
  --text-muted: #aba7c8;
  --text-faint: #75719a;
  --accent: #c4b5fd;
  --accent-btn: #7c3aed;
  --accent-btn-hover: #6d28d9;
  --accent-soft: rgba(167, 139, 250, 0.16);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 2px 6px rgba(0, 0, 0, 0.35), 0 16px 32px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-stack); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); }
img { max-width: 100%; }
button { font: inherit; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header__row { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand__logo { height: 26px; width: auto; display: block; }
.brand__sublabel { font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border-left: 1px solid var(--border); padding-left: 10px; }
.search-bar { flex: 1; display: flex; gap: 8px; min-width: 0; }
.search-bar input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-muted); color: var(--text); font: inherit; }
.search-bar input:focus { outline: none; border-color: var(--accent); }
.header-link, .account-slot { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; white-space: nowrap; }
.header-link:hover, .account-slot:hover { color: var(--accent); }
.theme-toggle { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex-shrink: 0; }

/* ── Buttons & fields ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; font-weight: 700; cursor: pointer; text-decoration: none; font-size: 0.95rem; }
.btn-primary { background: var(--accent-btn); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-btn-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-mini { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.field input, .field textarea { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 10px 12px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 12px; }
.form-note { background: var(--accent-soft); color: var(--text); padding: 10px 12px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 12px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 0.8rem; margin: 16px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

/* ── Pills / chips ──────────────────────────────────────────────────── */
.chip-rail { max-width: 1180px; margin: 0 auto; padding: 0 16px 12px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chip-rail::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent-btn); border-color: var(--accent-btn); color: var(--on-accent); }
.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--surface-muted); color: var(--text-muted); }
.pill--accent { background: var(--accent-soft); color: var(--accent); }
.pill--success { background: var(--success-soft); color: var(--success); }
.pill--danger { background: var(--danger-soft); color: var(--danger); }
.pill--warning { background: var(--warning-soft); color: var(--warning); }

/* ── Toolbar + grid of event cards ──────────────────────────────────── */
.toolbar { max-width: 1180px; margin: 18px auto 0; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--text-muted); font-size: 0.9rem; }
.grid { max-width: 1180px; margin: 16px auto 40px; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow-card); display: flex; flex-direction: column; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--surface-muted); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__date { position: absolute; top: 12px; left: 12px; background: var(--surface); color: var(--text); border-radius: 10px; padding: 6px 10px; text-align: center; box-shadow: var(--shadow-card); line-height: 1.1; }
.card__date strong { display: block; font-size: 1.15rem; }
.card__date span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--accent); }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__category { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.card__name { font-weight: 800; font-size: 1.05rem; }
.card__where { color: var(--text-muted); font-size: 0.86rem; }
.card__meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.card__price { font-weight: 800; }
.empty-state, .loading-state { max-width: 640px; margin: 40px auto; padding: 0 16px; text-align: center; color: var(--text-muted); }

/* ── Panels / pages ─────────────────────────────────────────────────── */
.page { max-width: 1180px; margin: 24px auto 48px; padding: 0 16px; }
.page--narrow { max-width: 460px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-card); }
.panel + .panel { margin-top: 16px; }
.panel h1, .panel h2, .panel h3 { margin-top: 0; }
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.breadcrumb { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }
.breadcrumb a { font-weight: 600; text-decoration: none; }

/* ── Event detail ───────────────────────────────────────────────────── */
.detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.detail__art { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.detail__art img { display: block; width: 100%; }
.detail__art-tabs { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.detail__title { font-size: 1.7rem; line-height: 1.2; margin: 6px 0 10px; }
.facts { display: grid; gap: 10px; margin: 14px 0; }
.fact { display: flex; gap: 10px; align-items: flex-start; }
.fact__icon { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.fact__label { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row__name { font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty button { width: 36px; height: 36px; border: 0; background: var(--surface-muted); color: var(--text); cursor: pointer; font-size: 1.1rem; }
.qty button[disabled] { opacity: 0.4; cursor: not-allowed; }
.qty span { min-width: 36px; text-align: center; font-weight: 800; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-weight: 700; }
.private-banner { background: var(--accent-soft); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 0.88rem; margin-bottom: 12px; }

/* ── Checkout ───────────────────────────────────────────────────────── */
.checkout { text-align: center; }
.checkout__qr { width: 240px; height: 240px; margin: 14px auto; background: #fff; border-radius: 12px; padding: 10px; border: 1px solid var(--border); }
.checkout__qr img { width: 100%; height: 100%; display: block; }
.countdown { font-weight: 800; font-variant-numeric: tabular-nums; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--warning); margin-right: 6px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Tickets (buyer) ────────────────────────────────────────────────── */
.ticket-card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-card); }
.ticket-card + .ticket-card { margin-top: 12px; }
.ticket-card__qr { width: 120px; height: 120px; background: #fff; border-radius: 10px; padding: 6px; }
.ticket-card__qr img { width: 100%; height: 100%; display: block; }
.ticket-card__no { font-weight: 800; letter-spacing: 0.06em; color: var(--accent); }

/* ── Dashboard ──────────────────────────────────────────────────────── */
.dash-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.dash-tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font-weight: 700; cursor: pointer; white-space: nowrap; }
.dash-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat__label { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.stat__value { font-size: 1.5rem; font-weight: 800; margin-top: 2px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th, table.data td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--surface-muted); color: var(--text-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
table.data tr:last-child td { border-bottom: 0; }
.list-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.list-toolbar input[type="search"] { flex: 1; min-width: 180px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }

/* ── Custom dropdown (no native <select>) ───────────────────────────── */
.custom-select { position: relative; display: inline-block; min-width: 180px; }
.custom-select__trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 600; font-size: 0.88rem; }
.custom-select--open .custom-select__trigger, .custom-select__trigger:hover { border-color: var(--accent); }
.custom-select__list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 6px; }
.custom-select__option { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 0.88rem; }
.custom-select__option:hover { background: var(--surface-muted); }
.custom-select__option[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* ── Check-in ───────────────────────────────────────────────────────── */
.scanner { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #000; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner__frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 18px; pointer-events: none; }
.checkin-result { margin-top: 16px; border-radius: 14px; padding: 18px; text-align: center; font-weight: 700; }
.checkin-result--ok { background: var(--success-soft); color: var(--success); }
.checkin-result--bad { background: var(--danger-soft); color: var(--danger); }
.checkin-result__big { font-size: 1.4rem; font-weight: 900; }

/* ── Modal ──────────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(8, 6, 20, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 440px; padding: 22px; box-shadow: var(--shadow-hover); }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-hover); }

/* ── Footer (same as whoosh360.com / vouchers) ──────────────────────── */
.footer { background: #0b0a16; color: rgba(255, 255, 255, 0.72); padding: 48px 0 24px; margin-top: 32px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer__logo img { height: 28px; width: auto; }
.footer__tagline { margin: 12px 0 0; font-size: 0.9rem; }
.footer__col-title { color: #fff; font-weight: 800; margin-bottom: 10px; font-size: 0.9rem; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__links a { color: rgba(255, 255, 255, 0.72); text-decoration: none; font-size: 0.88rem; }
.footer__links a:hover { color: #fff; }
.footer__bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; }
.footer__legal { display: flex; gap: 16px; }
.footer__legal a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .site-header__row { flex-wrap: wrap; gap: 10px; }
  .search-bar { order: 3; flex-basis: 100%; }
  .brand__sublabel { display: none; }
  .ticket-card { grid-template-columns: 1fr; text-align: center; }
  .ticket-card__qr { margin: 0 auto; }
  .detail__title { font-size: 1.4rem; }
  .footer__top { grid-template-columns: 1fr; }
}
