/* ================================================================
   JVO OPEN DAG — DESIGN SYSTEM
   Ember on midnight, inspired by "Klaar voor de Start!" poster
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=Geist:wght@300;400;500;600&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --midnight:#0A1628; --midnight-2:#122544; --midnight-3:#1A3158;
  --ember:#FF6B1A; --ember-2:#FF8A3D; --gold:#FFB347; --gold-2:#FFCD7A;
  --ice:#E8F4FF; --ice-muted:rgba(232,244,255,0.6); --ice-faint:rgba(232,244,255,0.4);
  --line:rgba(232,244,255,0.1); --line-strong:rgba(232,244,255,0.2);
  --danger:#FF6464; --success:#6CE3A0;
  --display:'Big Shoulders Display','Impact',sans-serif;
  --body:'Geist',system-ui,sans-serif;
  --mono:'Geist Mono',ui-monospace,monospace;
  --maxw:1280px;
  --r-sm:4px; --r-md:8px; --r-lg:16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--midnight); color: var(--ice); font-family: var(--body);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 50% 100%, rgba(255,107,26,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 10% 0%, rgba(26,49,88,0.6) 0%, transparent 50%);
  background-attachment: fixed;
}
a { color: inherit; }

/* TYPOGRAPHY */
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-2); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; display: inline-block; width: 24px; height: 1px; background: var(--ember); }
.h-display { font-family: var(--display); font-weight: 900; line-height: .82; letter-spacing: -.01em; text-transform: uppercase; }
h1.h-display { font-size: clamp(56px, 9vw, 132px); }
.gold-text { background: linear-gradient(180deg, var(--gold-2) 0%, var(--ember) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 12px rgba(255,107,26,0.3)); }
.ice-text { color: var(--ice); filter: drop-shadow(0 2px 12px rgba(232,244,255,0.15)); }
.exclaim { color: var(--ember); }
.lead { font-size: 17px; color: var(--ice); opacity: .85; max-width: 50ch; font-weight: 300; }
.small { font-size: 13px; }
.muted { color: var(--ice-muted); }
.mono  { font-family: var(--mono); }

/* SHELLS */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 28px 28px 60px; position: relative; z-index: 1; }
.admin-shell { max-width: var(--maxw); margin: 0 auto; padding: 24px 28px 60px; }

/* TOPBAR */
.topbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line); gap: 16px; flex-wrap: wrap; }
.brand-badge { display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ice-muted); }
.badge-circle { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 14px; font-weight: 900; color: var(--midnight); }
.brand-badge b { color: var(--ice); font-weight: 600; }
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; text-decoration: none; padding: 8px 14px; color: var(--ice-muted); border: 1px solid var(--line-strong); border-radius: 6px; transition: all .15s; }
.topbar nav a:hover { color: var(--midnight); background: var(--ember); border-color: var(--ember); }
.who { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ice-muted); margin: 18px 0 4px; }
.who b { color: var(--gold); margin-left: 8px; font-weight: 500; }

/* HERO — uses named grid areas for clean desktop/mobile reorder */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas:
    "intro   action"
    "details action";
  gap: 52px;
  padding: 48px 0 32px;
  align-items: start;
}
.hero-intro { grid-area: intro; }
.hero-details { grid-area: details; }
.hero-action { grid-area: action; }
.hero h1 { margin-top: 24px; }
.brand-text-short { display: none; }
.meta-address {
  margin-top: 14px; color: var(--ice-faint);
  letter-spacing: .12em; text-transform: uppercase;
  font-size: 12px;
}
.activity-icons { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.activity-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 99px; background: rgba(255,107,26,0.1); border: 1px solid rgba(255,107,26,0.3); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.activity-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 6px var(--ember); }
.event-meta { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.event-meta .cell { padding: 18px; border-right: 1px solid var(--line); }
.event-meta .cell:last-child { border-right: none; }
.event-meta .cell .label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ice-faint); }
.event-meta .cell .value { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.05; margin-top: 6px; text-transform: uppercase; color: var(--ice); }
.event-meta .cell .value .accent { color: var(--gold); }

/* CARD */
.card { background: linear-gradient(180deg, var(--midnight-2) 0%, var(--midnight) 100%); color: var(--ice); padding: 36px 32px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px rgba(255,107,26,0.1), 12px 12px 0 rgba(255,107,26,0.85), 0 30px 60px -20px rgba(0,0,0,0.5); position: relative; }
.card::before { content: ''; position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 100%); border-radius: 50%; box-shadow: 0 0 24px rgba(255,107,26,0.6); }
.card-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ember-2); }
.card h2 { font-family: var(--display); font-size: 44px; font-weight: 900; line-height: .9; text-transform: uppercase; margin: 6px 0 24px; color: var(--ice); }

.path-toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--r-md); overflow: hidden; margin-bottom: 24px; background: rgba(0,0,0,0.2); }
.path-toggle button { background: transparent; color: var(--ice); border: none; padding: 14px 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.path-toggle button:hover { background: rgba(255,107,26,0.08); }
.path-toggle button.active { background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); font-weight: 600; }

/* FORM */
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ice-muted); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line-strong); color: var(--ice); font-family: var(--body); font-size: 16px; padding: 10px 0; outline: none; transition: border-color .15s; }
.field input::placeholder, .field textarea::placeholder { color: var(--ice-faint); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--ember); }
.field textarea { resize: vertical; min-height: 70px; }

.checkbox { display: grid; grid-template-columns: 18px 1fr; gap: 12px; align-items: start; margin-bottom: 12px; cursor: pointer; font-size: 13px; line-height: 1.45; color: var(--ice); opacity: .85; }
.checkbox input { appearance: none; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 3px; background: transparent; cursor: pointer; position: relative; margin-top: 1px; }
.checkbox input:checked { background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); border-color: var(--ember); }
.checkbox input:checked::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border-right: 2px solid var(--midnight); border-bottom: 2px solid var(--midnight); transform: rotate(45deg); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); border: none; padding: 16px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; cursor: pointer; border-radius: var(--r-md); transition: all .15s; text-decoration: none; box-shadow: 0 8px 24px rgba(255,107,26,0.3); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255,107,26,0.45); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; color: var(--ice); border: 1px solid var(--line-strong); box-shadow: none; }
.btn.ghost:hover { background: rgba(255,107,26,0.1); border-color: var(--ember); box-shadow: none; transform: none; }

.btn-sm { padding: 7px 12px; font-size: 10px; letter-spacing: .12em; border-radius: var(--r-sm); text-transform: uppercase; font-family: var(--mono); border: 1px solid var(--line-strong); background: transparent; color: var(--ice-muted); cursor: pointer; margin-right: 4px; margin-bottom: 4px; transition: all .15s; white-space: nowrap; }
.btn-sm:hover { background: var(--midnight-3); color: var(--ice); border-color: var(--ice-muted); }
.btn-sm.primary { background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); border-color: transparent; font-weight: 600; }
.btn-sm.primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,26,0.35); }
.btn-sm.danger:hover { background: rgba(255,100,100,0.15); color: #FF8484; border-color: rgba(255,100,100,0.4); }
.btn-sm.qr { background: var(--midnight); color: var(--gold); border-color: rgba(255,179,71,0.3); font-weight: 600; }
.btn-sm.qr:hover { background: var(--midnight-3); color: var(--gold-2); border-color: var(--gold); }
.btn-sm:disabled { opacity: .5; cursor: not-allowed; }

.csv-btn { padding: 10px 16px; font-size: 11px; letter-spacing: .14em; border-radius: 6px; text-transform: uppercase; font-family: var(--mono); background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); border: none; cursor: pointer; font-weight: 600; box-shadow: 0 4px 12px rgba(255,107,26,0.25); }
.csv-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,107,26,0.4); }

/* ALERTS */
.alert { padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; margin-top: 14px; }
.alert.error { background: rgba(255,100,100,0.15); color: #FFB7B7; border: 1px solid rgba(255,100,100,0.4); }
.alert.success { background: rgba(108,227,160,0.15); color: var(--success); border: 1px solid rgba(108,227,160,0.3); }

/* SUCCESS SCREEN */
.success-screen { text-align: center; padding: 40px 16px; }
.success-screen .checkmark { width: 72px; height: 72px; background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 32px rgba(255,107,26,0.4); }
.success-screen .checkmark svg { width: 36px; height: 36px; stroke: var(--midnight); stroke-width: 3; fill: none; }
.success-screen h2 { font-family: var(--display); font-size: 40px; font-weight: 900; text-transform: uppercase; }

/* LOGIN */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; }
.login-card { width: 100%; max-width: 420px; }

/* FOOTER */
.foot { margin-top: 80px; padding: 28px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ice-faint); flex-wrap: wrap; gap: 12px; }
.foot a { color: var(--gold); text-decoration: none; }
.foot a:hover { color: var(--ember); }

/* ================================================================
   ADMIN DASHBOARD — TABS, STATS, MODAL
   ================================================================ */

.tabs { display: flex; gap: 4px; margin: 22px 0 26px; border-bottom: 1px solid var(--line-strong); flex-wrap: wrap; }
.tab-btn { background: transparent; color: var(--ice-muted); border: none; padding: 14px 22px; font-family: var(--mono); font-size: 12px; letter-spacing: .15em; text-transform: uppercase; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
.tab-btn:hover { color: var(--ice); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--ember); }
.tab-btn .badge { display: inline-block; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ember); color: var(--midnight); font-size: 10px; font-weight: 700; margin-left: 6px; line-height: 18px; text-align: center; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.section { background: var(--midnight-2); padding: 24px; border-radius: 12px; margin-bottom: 18px; border: 1px solid var(--line); }
.section h3 { font-family: var(--display); font-size: 26px; font-weight: 900; text-transform: uppercase; line-height: 1; margin-bottom: 4px; color: var(--ice); }
.section .section-sub { font-size: 13px; color: var(--ice-muted); margin-bottom: 18px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }

.attention { background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); padding: 22px 26px; border-radius: 12px; margin-bottom: 18px; display: flex; align-items: center; gap: 18px; box-shadow: 0 12px 36px rgba(255,107,26,0.3); }
.attention .attention-icon { width: 52px; height: 52px; border-radius: 50%; background: var(--midnight); color: var(--ember); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 32px; font-weight: 900; flex-shrink: 0; }
.attention .attention-text { flex: 1; }
.attention h3 { font-family: var(--display); font-size: 26px; font-weight: 900; text-transform: uppercase; line-height: 1; margin-bottom: 4px; color: var(--midnight); }
.attention p { font-size: 14px; color: rgba(10,22,40,0.8); }
.attention button { background: var(--midnight); color: var(--ice); border: none; padding: 12px 18px; border-radius: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; cursor: pointer; flex-shrink: 0; transition: all .15s; }
.attention button:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--midnight-2); padding: 20px; border-radius: 10px; border: 1px solid var(--line); }
.stat .label { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ice-faint); }
.stat .value { font-family: var(--display); font-size: 56px; font-weight: 900; line-height: 1; margin-top: 8px; color: var(--ice); }
.stat .sub { margin-top: 8px; font-size: 12px; color: var(--ice-muted); }
.stat .frac { font-size: 26px; opacity: .55; font-weight: 800; }

.how-card { background: linear-gradient(180deg, var(--midnight-3) 0%, var(--midnight-2) 100%); border: 1px solid rgba(255,179,71,0.2); padding: 24px 26px; border-radius: 12px; margin-bottom: 18px; }
.how-card h3 { font-family: var(--display); font-size: 24px; font-weight: 900; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%); color: var(--midnight); font-family: var(--display); font-size: 16px; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.step-text { font-size: 14px; line-height: 1.55; color: var(--ice); }
.step-text b { color: var(--gold-2); }
.mono-inline { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,0.3); padding: 1px 6px; border-radius: 3px; color: var(--gold); }
.how-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ice-muted); line-height: 1.55; }
.how-note b { color: var(--ember-2); }

.filters { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-pill { background: transparent; color: var(--ice-muted); border: 1px solid var(--line-strong); padding: 8px 14px; border-radius: 99px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: all .15s; }
.filter-pill:hover { color: var(--ice); border-color: var(--ice-muted); }
.filter-pill.active { background: var(--ember); color: var(--midnight); border-color: var(--ember); font-weight: 600; }
.filter-pill .count { display: inline-block; margin-left: 6px; background: rgba(0,0,0,0.2); padding: 1px 7px; border-radius: 99px; font-size: 10px; }
.filter-pill.active .count { background: rgba(10,22,40,0.25); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ice-faint); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ice); }
tr:last-child td { border-bottom: none; }
td .muted { color: var(--ice-muted); font-size: 11px; }
table td a { color: var(--gold); }

.pill { display: inline-block; padding: 4px 10px; border-radius: 99px; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.pill.pending  { background: rgba(255,179,71,0.15); color: var(--gold-2); border: 1px solid rgba(255,179,71,0.3); }
.pill.approved { background: rgba(108,227,160,0.15); color: var(--success); border: 1px solid rgba(108,227,160,0.3); }
.pill.waitlist { background: rgba(255,107,26,0.15); color: var(--ember-2); border: 1px solid rgba(255,107,26,0.3); }
.pill.rejected { background: rgba(255,100,100,0.15); color: #FF8484; border: 1px solid rgba(255,100,100,0.3); }
.pill.checked-in { background: rgba(108,227,160,0.25); color: var(--success); border: 1px solid var(--success); margin-left: 6px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ice-muted); font-size: 14px; }

.recent-activity { display: grid; gap: 8px; }
.recent-row { display: grid; grid-template-columns: 100px 100px 1fr; gap: 14px; padding: 10px 12px; border-radius: 6px; background: rgba(0,0,0,0.2); font-size: 13px; align-items: center; }
.recent-row .time { font-family: var(--mono); font-size: 11px; color: var(--ice-faint); }
.recent-row .who { font-size: 13px; color: var(--gold); }
.recent-row .action { font-family: var(--mono); font-size: 11px; color: var(--ice); }

/* QR Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,22,40,0.85);
  backdrop-filter: blur(6px);
  display: none;
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.show {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.modal {
  background: linear-gradient(180deg, var(--midnight-2) 0%, var(--midnight) 100%);
  border-radius: 16px; padding: 32px;
  max-width: 460px; width: 100%;
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7), 12px 12px 0 rgba(255,107,26,0.85);
  position: relative;
  margin: auto 0;  /* vertical centering when content fits, scrolls when not */
}
.modal::before { content: ''; position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 100%); border-radius: 50%; box-shadow: 0 0 24px rgba(255,107,26,0.6); }
.modal-close { position: absolute; top: 14px; right: 14px; background: transparent; border: none; color: var(--ice-muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.modal-close:hover { color: var(--ice); background: rgba(255,255,255,0.06); }
.modal h3 { font-family: var(--display); font-size: 32px; font-weight: 900; text-transform: uppercase; line-height: 1; margin-bottom: 6px; color: var(--ice); }
.modal-status { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.qr-display { background: var(--ice); border-radius: 12px; padding: 18px; display: flex; justify-content: center; margin-bottom: 18px; }
.qr-display canvas, .qr-display img { display: block; }
.url-box { background: rgba(0,0,0,0.3); border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px 12px; font-family: var(--mono); font-size: 11px; color: var(--ice-muted); word-break: break-all; margin-bottom: 14px; line-height: 1.5; }
.modal-status-info { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--line); }
.modal-status-info.checked { background: rgba(108,227,160,0.1); border-color: rgba(108,227,160,0.3); color: var(--success); }
.modal-status-info.pending { color: var(--ice-muted); }
.modal-status-info b { display: block; margin-bottom: 2px; color: var(--ice); font-weight: 500; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-actions .btn-sm { flex: 1 1 auto; padding: 10px 14px; font-size: 11px; }

/* CHECK-IN PAGE */
#qr-reader { width: 100%; max-width: 480px; margin: 24px auto; border-radius: var(--r-md); overflow: hidden; background: #000; border: 1px solid var(--line-strong); }
#qr-reader video { width: 100% !important; }
.checkin-result { padding: 18px; border-radius: var(--r-md); font-size: 15px; margin-top: 16px; line-height: 1.5; }
.checkin-result.success { background: rgba(108,227,160,0.15); color: var(--success); border: 1px solid var(--success); }
.checkin-result.warn { background: rgba(255,179,71,0.15); color: var(--gold-2); border: 1px solid var(--gold); }
.checkin-result.error { background: rgba(255,100,100,0.15); color: #FFB7B7; border: 1px solid rgba(255,100,100,0.4); }

/* TOURNIFY SECTION */
.tournify-section { border: 1px solid rgba(108,227,160,0.25); }
.tournify-grid { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.tournify-grid .field { min-width: 240px; }
.tournify-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.tournify-link { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; padding: 8px 14px; border: 1px solid rgba(255,179,71,0.3); border-radius: 6px; transition: all .15s; }
.tournify-link:hover { background: rgba(255,179,71,0.1); border-color: var(--gold); }
.tournify-meta { flex: 1; min-width: 200px; }

/* ================================================================
   RESPONSIVE — mobile-first, focus on signup action
   ================================================================ */

/* TABLET / SMALL DESKTOP — 880px and below
   Stacks the hero into single column, reorders so form is between
   intro (eyebrow + heading) and details (pills, meta) */
@media (max-width: 880px) {
  .shell { padding: 20px 18px 40px; }
  .admin-shell { padding: 18px 16px 40px; }

  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "action"
      "details";
    gap: 24px;
    padding-top: 24px;
  }
  .hero-intro h1 { margin-top: 18px; }
  .hero-details { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 8px; }

  .card { padding: 28px 22px; }
  .card h2 { font-size: 36px; }
  h1.h-display { font-size: clamp(48px, 11vw, 88px); }
}

/* PHONE — 600px and below
   Aggressive compaction: form sits front-and-center, details
   stay legible but small. Topbar shortens, tabs wrap to 2 rows. */
@media (max-width: 600px) {
  .shell { padding: 14px 14px 28px; }
  .admin-shell { padding: 12px 12px 28px; }

  /* Topbar: short brand text, inline nav, no wrap */
  .topbar { padding-bottom: 14px; flex-wrap: nowrap; gap: 10px; }
  .brand-text-long { display: none; }
  .brand-text-short { display: inline; font-size: 11px; letter-spacing: .15em; }
  .brand-badge { font-size: 11px; gap: 10px; flex-wrap: nowrap; min-width: 0; }
  .badge-circle { width: 32px; height: 32px; font-size: 12px; flex-shrink: 0; }
  .topbar nav { width: auto; flex-shrink: 0; }
  .topbar nav a {
    font-size: 10px; padding: 8px 12px; letter-spacing: .12em;
    background: linear-gradient(135deg, rgba(255,107,26,0.15), rgba(255,179,71,0.1));
    border-color: rgba(255,107,26,0.4); color: var(--gold);
    margin-left: 0;
  }
  .topbar nav a:hover { background: var(--ember); color: var(--midnight); }

  /* Hero — compact intro, form gets focus */
  .hero { gap: 18px; padding: 18px 0 24px; }
  .hero-intro { padding-bottom: 0; }
  .hero-intro .eyebrow { font-size: 10px; letter-spacing: .18em; }
  .hero-intro h1 { margin-top: 12px; }
  h1.h-display { font-size: clamp(44px, 13vw, 64px); line-height: .85; }
  .hero-intro .lead { font-size: 14px; margin-top: 14px; line-height: 1.5; }

  .hero-details { padding-top: 18px; }

  /* Activity pills: smaller, compact spacing */
  .activity-icons { gap: 8px; margin-top: 0; }
  .activity-pill { font-size: 9px; padding: 5px 10px; letter-spacing: .1em; }
  .activity-pill .dot { width: 5px; height: 5px; }

  /* Meet callout: tighter */
  .meet-callout { margin-top: 16px; padding: 14px 16px; }
  .meet-eyebrow { font-size: 9px; }
  .meet-callout p { font-size: 13px; }

  /* Event meta: keep horizontal 3-col, smaller text */
  .event-meta { margin-top: 18px; grid-template-columns: 1fr 1fr 1.2fr; }
  .event-meta .cell { padding: 12px 8px; border-right: 1px solid var(--line); border-bottom: none; }
  .event-meta .cell:last-child { border-right: none; }
  .event-meta .cell .label { font-size: 9px; letter-spacing: .14em; }
  .event-meta .cell .value { font-size: 16px; margin-top: 4px; line-height: 1.1; }
  .meta-address { margin-top: 10px; font-size: 10px; letter-spacing: .1em; }

  /* Form card — front and center, prominent on mobile */
  .card { padding: 24px 20px; box-shadow: 0 0 0 1px rgba(255,107,26,0.15), 6px 6px 0 rgba(255,107,26,0.65), 0 20px 40px -15px rgba(0,0,0,0.5); }
  .card h2 { font-size: 28px; margin: 6px 0 18px; }
  .card::before { width: 18px; height: 18px; top: -7px; left: -7px; }
  .card-eyebrow { font-size: 10px; }
  .field input, .field textarea { font-size: 16px; } /* prevent iOS zoom */
  .checkbox { font-size: 12px; line-height: 1.4; }
  .path-toggle button { padding: 12px 8px; font-size: 10px; letter-spacing: .1em; }

  .btn { padding: 16px 20px; font-size: 11px; }
  .btn-sm { padding: 10px 12px; font-size: 11px; min-height: 38px; }

  /* TABS — wrap to 2 rows (3+2) instead of horizontal scroll */
  .tabs {
    display: flex; flex-wrap: wrap;
    gap: 0; padding: 0; margin: 14px 0 18px;
    border-bottom: 1px solid var(--line-strong);
    overflow: visible;
  }
  .tab-btn {
    flex: 1 1 calc(33.333% - 1px);
    min-width: 0;
    padding: 12px 6px;
    font-size: 10px; letter-spacing: .1em;
    text-align: center;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .tab-btn.active { border-bottom-color: var(--ember); }
  .tab-btn .badge {
    margin-left: 4px; font-size: 9px;
    min-width: 16px; height: 16px; line-height: 16px;
  }

  /* Sections */
  .section { padding: 16px 14px; border-radius: 10px; }
  .section h3 { font-size: 22px; }
  .section-head { gap: 10px; }

  /* Stats: 2 cols on phone */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 14px 12px; }
  .stat .value { font-size: 32px; }
  .stat .frac { font-size: 16px; }
  .stat .sub { font-size: 11px; margin-top: 6px; line-height: 1.35; }

  /* Attention banner */
  .attention { flex-direction: column; align-items: flex-start; padding: 16px; gap: 12px; }
  .attention .attention-icon { width: 40px; height: 40px; font-size: 22px; }
  .attention h3 { font-size: 20px; }
  .attention p { font-size: 13px; }
  .attention button { width: 100%; padding: 14px 16px; }

  /* How card */
  .how-card { padding: 18px 16px; }
  .how-card h3 { font-size: 20px; }
  .steps li { grid-template-columns: 28px 1fr; gap: 10px; }
  .step-num { width: 24px; height: 24px; font-size: 13px; }
  .step-text { font-size: 13px; }

  /* Filters */
  .filter-pill { padding: 8px 12px; font-size: 10px; min-height: 36px; }

  /* Tables */
  th, td { padding: 10px 8px; font-size: 12px; }
  td .muted { font-size: 10px; }
  td:last-child { white-space: normal; }
  td .btn-sm { margin-bottom: 6px; }

  /* Recent activity */
  .recent-row { grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
  .recent-row .time { font-size: 10px; }
  .recent-row .who { font-size: 13px; }
  .recent-row .action { font-size: 11px; word-break: break-word; }

  /* Tournify section */
  .tournify-grid { flex-direction: column; align-items: stretch; gap: 10px; }
  .tournify-grid .field { min-width: 0; }
  .tournify-grid > button { width: 100%; align-self: stretch !important; padding: 14px 18px !important; }
  .tournify-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .tournify-actions > * { width: 100%; text-align: center; }

  /* QR modal */
  .modal { padding: 24px 20px 28px; max-width: calc(100vw - 28px); }
  .modal h3 { font-size: 24px; }
  .qr-display { padding: 14px; }
  .qr-display canvas { max-width: 100%; height: auto; }
  .modal-actions .btn-sm { padding: 12px 14px; font-size: 11px; }
  .url-box { font-size: 10px; }

  /* Programma frame */
  .program-frame-wrap { height: calc(100vh - 280px); min-height: 360px; }
  .program-bar { padding: 14px; gap: 10px; }
  .program-bar-actions { width: 100%; }
  .program-bar-actions > * { flex: 1; text-align: center; }

  /* Footer */
  .foot { flex-direction: column; align-items: flex-start; font-size: 10px; padding: 20px 0; }
}

/* TINY PHONE — 380px and below */
@media (max-width: 380px) {
  h1.h-display { font-size: 38px; }
  .stats { grid-template-columns: 1fr; }
  .stat .value { font-size: 40px; }
  .card { padding: 20px 16px; }
  .card h2 { font-size: 24px; }
  .section h3 { font-size: 19px; }
  .modal h3 { font-size: 22px; }
  .topbar nav a { padding: 7px 10px; font-size: 9px; }
  .csv-btn { width: 100%; padding: 12px 14px; }

  /* Activity pills very compact */
  .activity-pill { font-size: 8px; padding: 4px 8px; }

  /* Event meta might overflow at 320px — drop label visibility for tighter fit */
  .event-meta .cell { padding: 10px 4px; }
  .event-meta .cell .value { font-size: 14px; }

  /* Tabs: 2x3 instead of 3x2 if names too long */
  .tab-btn { flex: 1 1 calc(50% - 1px); padding: 11px 4px; font-size: 9.5px; }
}

/* IFRAME container hint — give iframes more vertical room on tall phones */
@media (max-width: 600px) and (min-height: 700px) {
  .program-frame-wrap { height: 70vh; }
}

/* ================================================================
   PROGRAMMA TAB
   ================================================================ */
.program-empty { text-align: center; padding: 56px 24px; }
.program-empty h3 { font-family: var(--display); font-size: 28px; font-weight: 900; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }

.program-wrap { background: var(--midnight-2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.program-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; gap: 16px; flex-wrap: wrap;
  background: var(--midnight-3); border-bottom: 1px solid var(--line);
}
.program-bar-info { flex: 1; min-width: 240px; }
.program-bar-info .program-url { margin-top: 4px; word-break: break-all; }
.program-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.program-frame-wrap {
  position: relative; width: 100%;
  height: calc(100vh - 360px); min-height: 480px;
  background: var(--ice);
}
#program-frame { display: block; width: 100%; height: 100%; border: none; transition: opacity .3s; background: var(--ice); }
.program-fallback {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 32px; height: 100%;
  background: var(--midnight-2); color: var(--ice);
}
.program-fallback h4 { color: var(--ice); }

/* CHECK-IN page specific */
.checkin-wrap { max-width: 720px; margin: 0 auto; padding: 24px 24px 60px; }
.checkin-h1 { font-size: clamp(40px, 8vw, 64px); }
@media (max-width: 600px) {
  .checkin-wrap { padding: 16px 14px 40px; }
  .checkin-h1 { font-size: clamp(36px, 11vw, 56px); }
}

/* INFO CARDS (Aanmeldingen tab) */
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.info-card {
  background: var(--midnight-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px;
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start;
}
.info-card.highlight { border-color: rgba(255,107,26,0.35); box-shadow: 0 0 0 1px rgba(255,107,26,0.1); }
.info-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 28px; font-weight: 900;
}
.info-card-body h4 {
  font-family: var(--display); font-size: 22px; font-weight: 900;
  text-transform: uppercase; color: var(--ice); margin-bottom: 4px; line-height: 1;
}
.info-card-num {
  font-family: var(--display); font-size: 38px; font-weight: 900;
  color: var(--gold); line-height: 1; margin: 6px 0 8px;
}
.info-card.highlight .info-card-num { color: var(--ember); }
.info-card-body p { font-size: 13px; color: var(--ice-muted); line-height: 1.55; margin: 0; }

.csv-btn.ghost-csv { background: transparent; color: var(--ember-2); border: 1px solid rgba(255,107,26,0.3); box-shadow: none; }
.csv-btn.ghost-csv:hover { background: rgba(255,107,26,0.1); transform: none; box-shadow: none; }

/* Reject modal textarea */
#reject-modal textarea {
  width: 100%; background: rgba(0,0,0,0.3);
  border: 1px solid var(--line-strong); border-radius: 6px;
  color: var(--ice); font-family: var(--body); font-size: 14px;
  padding: 12px; outline: none; resize: vertical; min-height: 80px;
  transition: border-color .15s;
}
#reject-modal textarea:focus { border-color: var(--ember); }
#reject-modal input { background: rgba(0,0,0,0.3) !important; border: 1px solid var(--line-strong) !important; border-radius: 6px !important; padding: 12px !important; }
#reject-modal input:focus { border-color: var(--ember) !important; }

@media (max-width: 600px) {
  .info-cards { grid-template-columns: 1fr; }
  .info-card { padding: 18px; gap: 14px; grid-template-columns: 44px 1fr; }
  .info-card-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 11px; }
  .info-card-num { font-size: 32px; }
}

/* MEET THE JVO callout — between activity pills and event-meta */
.meet-callout {
  margin-top: 22px;
  background: linear-gradient(135deg, rgba(255,107,26,0.12) 0%, rgba(255,179,71,0.08) 100%);
  border: 1px solid rgba(255,179,71,0.25);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 10px;
}
.meet-eyebrow {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.meet-callout p {
  font-size: 14px; color: var(--ice); line-height: 1.55; margin: 0;
}
.meet-callout p b { color: var(--gold-2); }
@media (max-width: 600px) {
  .meet-callout { padding: 14px 16px; }
  .meet-callout p { font-size: 13px; }
}

/* ================================================================
   MOBILE TEAM CARDS — team rows become cards on phone
   so QR + action buttons are always visible
   ================================================================ */

@media (max-width: 600px) {
  /* Hide table header, transform tbody into card stack */
  .section table thead { display: none; }
  #teams-tbody { display: block; }
  #teams-tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "name      status"
      "captain   captain"
      "players   players"
      "actions   actions";
    gap: 6px 12px;
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--midnight-3);
  }
  #teams-tbody td {
    border-bottom: none !important;
    padding: 0 !important;
    vertical-align: top;
  }
  /* Column 1: team name */
  #teams-tbody td:nth-of-type(1) {
    grid-area: name;
    font-size: 15px; line-height: 1.3;
    font-weight: 600;
    align-self: center;
  }
  /* Column 2: captain + email */
  #teams-tbody td:nth-of-type(2) { grid-area: captain; font-size: 12px; line-height: 1.4; }
  #teams-tbody td:nth-of-type(2) .muted { font-size: 11px; }
  /* Column 3: player count */
  #teams-tbody td:nth-of-type(3) {
    grid-area: players;
    font-family: var(--mono); font-size: 10px;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--ice-faint);
  }
  #teams-tbody td:nth-of-type(3)::before { content: 'Spelers: '; }
  /* Column 4: status pill */
  #teams-tbody td:nth-of-type(4) {
    grid-area: status;
    text-align: right !important; align-self: start;
  }
  /* Column 5: action buttons */
  #teams-tbody td:nth-of-type(5) {
    grid-area: actions;
    margin-top: 6px;
    padding-top: 10px !important;
    border-top: 1px dashed var(--line);
    display: flex; gap: 6px; flex-wrap: wrap;
    text-align: left !important;
  }
  #teams-tbody td:nth-of-type(5) .btn-sm {
    flex: 1 1 calc(50% - 4px);
    margin: 0;
    min-width: 0;
    padding: 10px 8px;
    font-size: 10px;
  }
  #teams-tbody td:nth-of-type(5) .btn-sm.qr {
    flex: 1 1 100%; /* QR button on its own row, full width */
    background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 100%);
    color: var(--midnight); font-weight: 700;
    border: none;
    padding: 12px;
    font-size: 11px; letter-spacing: .15em;
  }

  /* Empty state in cards mode */
  #teams-tbody tr td.empty-state {
    grid-column: 1 / -1; grid-row: 1;
  }

  /* For non-team tables (signups, audit), keep small but readable */
  .section:not(:has(#teams-tbody)) table { font-size: 11px; }
  .section:not(:has(#teams-tbody)) th,
  .section:not(:has(#teams-tbody)) td { padding: 8px 6px; }
}

/* ================================================================
   TOASTS — bottom-right notifications
   ================================================================ */
.toast-host {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; max-width: calc(100vw - 40px);
}
.toast {
  background: var(--midnight-2); color: var(--ice);
  border: 1px solid var(--line-strong); border-left: 3px solid var(--ember);
  padding: 12px 18px; border-radius: 8px;
  font-size: 13px; line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  pointer-events: auto;
  transform: translateX(120%);
  transition: transform .25s ease-out;
  max-width: 360px;
}
.toast-show { transform: translateX(0); }
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-info { border-left-color: var(--gold); }
.toast.toast-error { border-left-color: var(--danger); }

@media (max-width: 600px) {
  .toast-host { left: 12px; right: 12px; bottom: 12px; }
  .toast { max-width: none; font-size: 13px; }
}

/* ================================================================
   PROFILE / NOTIFICATIONS card
   ================================================================ */
.profile-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.profile-toggles { display: grid; gap: 12px; }
.toggle-row {
  display: grid; grid-template-columns: 24px 1fr;
  align-items: start; gap: 14px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.toggle-row:hover { background: rgba(0,0,0,0.28); border-color: var(--line-strong); }
.toggle-row input[type="checkbox"] {
  appearance: none; width: 18px; height: 18px;
  border: 1px solid var(--line-strong); border-radius: 4px;
  background: transparent; cursor: pointer; position: relative;
  margin-top: 2px;
}
.toggle-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--ember), var(--gold));
  border-color: var(--ember);
}
.toggle-row input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 10px;
  border-right: 2px solid var(--midnight); border-bottom: 2px solid var(--midnight);
  transform: rotate(45deg);
}
.toggle-row b { display: block; font-size: 13px; color: var(--ice); font-weight: 600; }
.toggle-row small { display: block; font-size: 12px; color: var(--ice-muted); margin-top: 2px; }
