/* ============================================================
   ESN Gent Events — styles (v2, structured)
   ESN palette used as accents on calm, neutral surfaces:
   Cyan #00AEEF · Magenta #EC008C · Green #7AC143 ·
   Orange #F47B20 · Dark Blue #2E3192
   ============================================================ */

:root {
  --esn-cyan: #00AEEF;
  --esn-magenta: #EC008C;
  --esn-green: #7AC143;
  --esn-orange: #F47B20;
  --esn-dark: #2E3192;
  --ink: #191a2e;
  --muted: #676a80;
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e4e6ee;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(25, 26, 46, 0.05), 0 3px 10px rgba(25, 26, 46, 0.06);
  --shadow-lg: 0 4px 10px rgba(25, 26, 46, 0.07), 0 12px 32px rgba(25, 26, 46, 0.10);
  --surface2: #f2f3f8;
  --hover: #f8fafd;
}

/* Dark mode: same structure, re-tokened */
html[data-theme="dark"] {
  --ink: #e8e9f6;
  --muted: #9b9ec0;
  --bg: #12132a;
  --card: #1b1d3d;
  --border: #2d3057;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.55);
  --surface2: #22244a;
  --hover: #22244a;
}
/* Let the browser render native controls (selects, date pickers, scrollbars)
   in their dark variants instead of white boxes. */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: var(--bg); }
html[data-theme="dark"] a { color: var(--esn-cyan); }
/* Buttons: dark-blue on near-black is unreadable — swap to a lighter indigo,
   and hovers should brighten (not darken) on dark surfaces. */
html[data-theme="dark"] .btn-dark { background: #4d54d8; }
html[data-theme="dark"] .btn:hover { filter: brightness(1.12); }
/* Links styled as buttons: the generic dark-mode link color (cyan) must
   never override button text colors — cyan-on-cyan made buttons vanish. */
html[data-theme="dark"] a.btn { color: #fff; }
html[data-theme="dark"] a.btn-ghost, html[data-theme="dark"] a.btn.btn-ink { color: var(--ink); }
html[data-theme="dark"] .btn-ghost { color: var(--ink); border-color: #3a3d6b; }
html[data-theme="dark"] .btn-ghost:hover { background: var(--surface2); filter: none; }
html[data-theme="dark"] .btn:disabled { opacity: .4; }
html[data-theme="dark"] .badge-esn { background: #4d54d8; }
html[data-theme="dark"] .checkbox-row input { accent-color: var(--esn-cyan); }
html[data-theme="dark"] select,
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] textarea { background: var(--card); color: var(--ink); border-color: var(--border); }
html[data-theme="dark"] .price-tag { color: var(--esn-cyan); }
html[data-theme="dark"] .rich h3 { color: var(--esn-cyan); }
html[data-theme="dark"] .chip.active { background: var(--esn-cyan); border-color: var(--esn-cyan); color: #0d0e22; }
html[data-theme="dark"] .admin-tabs button.active { color: var(--esn-cyan); border-bottom-color: var(--esn-cyan); }
html[data-theme="dark"] .cal-cell.other-month { opacity: .3; }
/* Dark-mode calendar legibility: day numbers & weekday headers were too dim */
html[data-theme="dark"] .cal-daynum { color: var(--ink); }
html[data-theme="dark"] .cal-dow { color: #b9bcdc; }
html[data-theme="dark"] .agenda-time { color: #b9bcdc; }
html[data-theme="dark"] .agenda-price { color: var(--esn-cyan); }
/* Ghost buttons/links carrying inline dark-blue text become unreadable on
   dark surfaces — override any inline color that uses --esn-dark. */
html[data-theme="dark"] [style*="--esn-dark"] { color: var(--ink) !important; }
html[data-theme="dark"] .btn-ink { color: var(--ink); }

.btn-ink { color: var(--esn-dark); }

/* ---------- Material Symbols (icons) ---------- */
.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
  font-size: 20px;
  line-height: 1;
  vertical-align: -5px;
  display: inline-block;
  user-select: none;
}
.mi-sm { font-size: 17px; vertical-align: -4px; }
.btn .material-symbols-rounded { font-size: 18px; vertical-align: -4px; }
.btn-sm .material-symbols-rounded { font-size: 16px; vertical-align: -3.5px; }
.bottom-nav .material-symbols-rounded { font-size: 23px; vertical-align: 0; }
.empty-state .big .material-symbols-rounded { font-size: 52px; color: var(--muted); }
.slot-group > .material-symbols-rounded { color: var(--muted); }
.agenda-price .material-symbols-rounded { font-size: 17px; color: var(--esn-green); }
.checkin-status .material-symbols-rounded { font-size: 56px; }

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  /* Sticky footer: content area stretches, footer sits at the bottom */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#app {
  flex: 1 0 auto;
  width: 100%;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

a { color: var(--esn-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; }

/* ---------- Header ---------- */
.site-header {
  background: var(--esn-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--esn-cyan);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 62px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-star { width: 30px; height: 30px; }
.brand-logo {
  height: 38px;
  width: 38px;
  object-fit: contain;
}
.brand-text { font-size: 1.05rem; letter-spacing: .2px; }
.brand-text strong { color: var(--esn-cyan); }

.main-nav { display: flex; gap: 2px; flex: 1; height: 62px; align-items: stretch; }
.main-nav a {
  color: #d6d8f0;
  padding: 0 13px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.main-nav a:hover { color: #fff; text-decoration: none; }
.main-nav a.active { color: #fff; border-bottom-color: var(--esn-cyan); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--esn-cyan); display: block; }
.user-link { display: flex; align-items: center; gap: 8px; color: #fff; }
.user-link:hover { text-decoration: none; opacity: .85; }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* Mobile-only / desktop-only helpers */
.m-only { display: none; }
.mobile-title { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: filter .12s ease, box-shadow .12s ease;
  text-align: center;
}
.btn:hover { filter: brightness(.94); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-cyan { background: var(--esn-cyan); color: #fff; }
.btn-magenta { background: var(--esn-magenta); color: #fff; }
.btn-green { background: var(--esn-green); color: #fff; }
.btn-orange { background: var(--esn-orange); color: #fff; }
.btn-dark { background: var(--esn-dark); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--hover); filter: none; }
.btn-sm { padding: 5px 12px; font-size: .78rem; border-radius: 7px; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero {
  margin: 28px 0 8px;
  border-radius: var(--radius);
  padding: 40px 40px 36px;
  color: #fff;
  background: var(--esn-dark);
  border-bottom: 4px solid var(--esn-cyan);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: 1.75rem; font-weight: 900; margin-bottom: 8px; max-width: 640px; }
.hero p { max-width: 560px; color: #d9dbf2; margin-bottom: 20px; font-size: .95rem; }

/* ---------- Section headings ---------- */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 16px;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: .2px;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 1.15em;
  border-radius: 3px;
  background: var(--esn-cyan);
  flex: none;
}

/* ---------- Search & filter bar ---------- */
.filter-bar { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.filter-bar input[type="search"] {
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: .92rem;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  outline: none;
  max-width: 440px;
}
.filter-bar input[type="search"]:focus { border-color: var(--esn-cyan); }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: .8rem;
  cursor: pointer;
  color: var(--muted);
}
.chip:hover { border-color: #c9ccdc; color: var(--ink); }
.chip.active { background: var(--esn-dark); border-color: var(--esn-dark); color: #fff; }

/* ---------- Event cards ---------- */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
  margin-bottom: 44px;
}
.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--accent, var(--esn-cyan));
  transition: box-shadow .15s ease;
}
.event-card:hover { box-shadow: var(--shadow-lg); }
.card-img { width: 100%; height: 160px; object-fit: cover; display: block; }
.event-card .card-body { padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.event-card h3 { font-size: 1.08rem; font-weight: 900; }
.event-card h3 a { color: var(--ink); }
.event-meta {
  font-size: .82rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.event-desc { font-size: .88rem; color: var(--ink); flex: 1; }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.date-badge {
  align-self: flex-start;
  background: var(--accent, var(--esn-cyan));
  color: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  text-align: center;
  font-weight: 900;
  line-height: 1.15;
  margin: 16px 0 0 20px;
}
.date-badge .d { font-size: 1.25rem; display: block; }
.date-badge .m { font-size: .68rem; text-transform: uppercase; letter-spacing: 1.5px; }

.price-tag { font-weight: 900; color: var(--esn-dark); font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-tag.free { color: var(--esn-green); }
.price-strike { text-decoration: line-through; opacity: .5; font-size: .85em; font-weight: 700; }
.member-note { font-size: .78rem; color: var(--esn-dark); font-weight: 700; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: #fff;
}
.badge-soldout { background: #9a9cb5; }
.badge-paid { background: var(--esn-green); }
.badge-pending { background: var(--esn-orange); }
.badge-free { background: var(--esn-cyan); }
.badge-draft { background: #9a9cb5; }
.badge-published { background: var(--esn-green); }
.badge-esn { background: var(--esn-dark); }
.badge-verified { background: var(--esn-green); }
.badge-requested { background: var(--esn-orange); }
.badge-refunded { background: #9a9cb5; }
.badge-cancelled { background: #9a9cb5; }

/* ---- BETA ---- */
.beta-chip {
  background: var(--esn-orange);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-left: 8px;
  align-self: center;
}
.beta-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff7e8;
  border-bottom: 1px solid #f2d9a8;
  color: #6b4e0e;
  font-size: 0.85rem;
  padding: 8px 14px;
  text-align: center;
}
html[data-theme="dark"] .beta-banner {
  background: #2c2413;
  border-bottom-color: #4d3d18;
  color: #e8c87a;
}
.beta-banner code { font-weight: 700; }
.beta-banner button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
}

/* Small info icon that replaces verbose form hints (hover title / tap toast) */
.hint-i {
  border: none;
  background: none;
  padding: 0 2px;
  cursor: help;
  color: var(--muted);
  vertical-align: middle;
}
.hint-i:hover { color: var(--esn-cyan); }
.hint-i .material-symbols-rounded { font-size: 15px; vertical-align: -3px; }

/* Highlight rows that need action (e.g. paid ESNcard applications to assign) */
.row-hot td { background: rgba(122, 193, 67, 0.10); }
html[data-theme="dark"] .row-hot td { background: rgba(122, 193, 67, 0.12); }

/* ---- Event form v0.83: advanced panel, publish bar, geo results ---- */
.adv-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  margin: 6px 0 18px;
}
.adv-panel > summary {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.adv-panel > summary::-webkit-details-marker { display: none; }
.adv-panel > summary::after {
  content: "expand_more";
  font-family: "Material Symbols Rounded";
  margin-left: auto;
  color: var(--muted);
  transition: transform .15s;
}
.adv-panel[open] > summary::after { transform: rotate(180deg); }
.adv-body { padding: 2px 16px 16px; display: flex; flex-direction: column; }
.adv-heading {
  font-weight: 800;
  font-size: .85rem;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.adv-body .adv-heading:first-child { border-top: none; padding-top: 0; margin-top: 4px; }

.publish-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.geo-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.geo-hit {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  padding: 8px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  color: var(--ink);
}
.geo-hit:hover { border-color: var(--esn-cyan); background: var(--hover); }
.geo-hit small { color: var(--muted); }

/* Home-city autocomplete: suggestions float over the form, not inside it */
.city-suggest { position: relative; z-index: 6; }
.city-suggest .geo-results {
  position: absolute;
  top: 4px; left: 0; right: 0;
  margin-top: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  max-height: 240px;
  overflow-y: auto;
}

/* Ticket policy box in the buy box */
.policy-box {
  margin: 10px 0 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 0.85rem;
}
.policy-box summary {
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  list-style-position: inside;
}
.policy-box ul { margin: 0; padding: 0 14px 10px 26px; }
.policy-box li { margin-bottom: 6px; }
.policy-agree-row { margin: 8px 0 10px; font-size: 0.88rem; }

/* ---------- Calendar ---------- */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 14px;
}
.calendar-header h2 { font-size: 1.35rem; font-weight: 900; }
.cal-nav-buttons { display: flex; gap: 8px; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 44px;
}
.cal-dow {
  text-align: center;
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  padding: 8px 0 4px;
}
.cal-cell {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 104px;
  padding: 7px;
  font-size: .78rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-cell.other-month { background: transparent; border-style: dashed; opacity: .45; }
.cal-cell.today { border: 2px solid var(--esn-cyan); }
.cal-daynum { font-weight: 700; color: var(--muted); font-size: .75rem; }
.cal-cell.today .cal-daynum { color: var(--esn-cyan); }
.cal-event {
  display: block;
  background: var(--accent, var(--esn-cyan));
  color: #fff;
  border-radius: 5px;
  padding: 3px 7px;
  font-weight: 700;
  font-size: .72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-event:hover { text-decoration: none; opacity: .88; }
.cal-dots { display: none; }
.cal-agenda { margin: 4px 0 40px; }
.agenda-date {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 14px 0 8px;
}
.agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--esn-cyan));
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 8px;
  color: var(--ink);
}
.agenda-item:hover { text-decoration: none; }
.agenda-time { flex: none; width: 44px; font-weight: 700; font-size: .76rem; color: var(--muted); }
.agenda-title { flex: 1; font-weight: 700; font-size: .9rem; }
.agenda-price { font-weight: 900; font-size: .8rem; color: var(--esn-dark); }
.agenda-price.free { color: var(--esn-green); }

/* ---------- Event detail ---------- */
.event-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 28px 0 44px;
  overflow: hidden;
}
.event-detail-banner {
  padding: 38px 36px;
  color: #fff;
  background: var(--esn-dark);
  border-bottom: 4px solid var(--accent, var(--esn-cyan));
}
.event-detail-banner.has-img { background-size: cover; background-position: center; }
.event-detail-banner h1 { font-size: 1.7rem; font-weight: 900; }
.event-detail-body {
  padding: 30px 36px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 36px;
}
.event-info-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; }
.event-info-list li { display: flex; gap: 14px; align-items: baseline; }
.event-info-list .ico { width: 22px; text-align: center; }
.info-label {
  flex: none;
  width: 82px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.buy-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: fit-content;
}
.buy-box .price-tag { font-size: 1.45rem; }
.qty-row { display: flex; align-items: center; gap: 10px; }
.qty-row input {
  width: 72px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  text-align: center;
  background: var(--card);
  color: var(--ink);
}
.cal-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- Map embed ---------- */
.map-wrap {
  margin-top: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-embed { width: 100%; height: 260px; border: 0; display: block; }

/* ---------- Nationality map (admin) ---------- */
#nat-map svg { display: block; width: 100%; height: auto; }
#nat-map path.country { stroke: #fff; stroke-width: .5; }
#nat-map path.country:hover { stroke: var(--ink); stroke-width: 1; }
.map-tip {
  position: absolute;
  background: var(--ink);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}
.map-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 700;
}
.map-grad {
  width: 140px;
  height: 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ---------- Stars (event feedback) ---------- */
.star-row { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.star {
  border: none;
  background: none;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--border);
  padding: 2px;
}
.star.on { color: var(--esn-orange); }

/* ---------- Kiosk ---------- */
.kiosk-result {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
  z-index: 5;
}
.kiosk-result h3 { font-size: 1.4rem; margin-bottom: 4px; }
.kiosk-result p { font-size: .95rem; }
.kiosk-ok { background: rgba(58, 148, 34, .93); }
.kiosk-warn { background: rgba(216, 128, 14, .94); }
.kiosk-bad { background: rgba(198, 27, 87, .94); }

/* ---------- Charts (analytics) ---------- */
.chart { display: block; width: 100%; height: auto; margin-top: 4px; }
.chart-axis { stroke: var(--border); stroke-width: 1; }
.chart-lbl { font-size: 11px; fill: var(--muted); font-family: inherit; }
.chart-val { font-size: 11px; font-weight: 700; fill: var(--ink); font-family: inherit; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 760px; margin-bottom: 44px; }
.faq-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  padding: 14px 18px;
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--muted);
  flex: none;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item summary:hover { background: var(--hover); }
.faq-a {
  padding: 0 18px 16px;
  font-size: .89rem;
  color: var(--ink);
}
.faq-a code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .82em;
}

/* ---------- Rich text ---------- */
.rich { font-size: .93rem; }
.rich p { margin: 0 0 12px; }
.rich ul { margin: 0 0 12px 20px; }
.rich li { margin-bottom: 4px; }
.rich h3 { margin: 18px 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--esn-dark); }
.rich a { font-weight: 700; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); }
th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--hover); }

/* ---------- Forms ---------- */
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  margin-bottom: 30px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-weight: 700;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
}
.form-field input, .form-field textarea, .form-field select,
.buy-box select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .92rem;
  background: var(--card);
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none;
  border-color: var(--esn-cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .15);
}
.form-field input:disabled { background: var(--bg); color: var(--muted); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.form-hint { font-size: .78rem; color: var(--muted); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 17px; height: 17px; accent-color: var(--esn-dark); }
.checkbox-row label { text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); }

.inline-input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .82rem;
  width: 150px;
  background: var(--card);
  color: var(--ink);
}

/* ---------- Guided form sections ---------- */
.form-section { border-top: 1px solid var(--border); padding-top: 22px; margin-top: 24px; }
.form-section.first { border-top: none; padding-top: 0; margin-top: 0; }
.form-section-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.form-section-head strong { font-size: .95rem; }
.form-section-head .form-hint { margin-top: 1px; }
.form-step {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--esn-cyan);
  color: #fff;
  font-weight: 900;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.esn-subcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
}
.field-error {
  border-color: var(--esn-magenta) !important;
  box-shadow: 0 0 0 3px rgba(236, 0, 140, .18) !important;
}
.option-head {
  display: grid;
  grid-template-columns: 1fr 90px 90px 70px 40px;
  gap: 8px;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  padding: 0 2px;
  margin-bottom: 4px;
}

/* ---------- Proof-of-exchange preview (admin) ---------- */
.proof-details summary {
  cursor: pointer;
  color: var(--esn-dark);
  font-weight: 700;
  font-size: .8rem;
  list-style: none;
}
.proof-details summary::-webkit-details-marker { display: none; }
.proof-details[open] summary { margin-bottom: 6px; }
.proof-details img {
  max-width: 260px;
  max-height: 340px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}
html[data-theme="dark"] .proof-details summary { color: var(--esn-cyan); }

/* ---------- Back chip on detail banners ---------- */
.back-chip {
  display: inline-block;
  color: #c7cbf2;
  font-weight: 700;
  font-size: .78rem;
  margin-bottom: 10px;
}
.back-chip:hover { color: #fff; text-decoration: none; }

/* ---------- Ticket type rows (admin form) ---------- */
.option-row {
  display: grid;
  grid-template-columns: 1fr 90px 90px 70px 40px;
  gap: 8px;
  margin-bottom: 8px;
}
.option-row input {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .88rem;
  background: var(--card);
  color: var(--ink);
}

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 2.4rem; margin-bottom: 10px; }

/* While the next page's data loads, keep the current content visible but
   dimmed — the spinner only appears if loading takes noticeably long. */
#app.is-loading { opacity: .45; pointer-events: none; transition: opacity .15s ease; }

/* ---------- Board meetings: attendance + to-dos ---------- */
.att-list, .todo-list { list-style: none; margin: 0; padding: 0; }
.att-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.att-row:last-child { border-bottom: none; }
.att-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.att-chip { padding: 3px 9px; font-size: .72rem; }
.todo-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.todo-row:last-child { border-bottom: none; }
.todo-row.done .todo-text { color: var(--muted); }
.todo-row input[type="checkbox"] { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--esn-green); flex-shrink: 0; }
.todo-text { flex: 1; font-size: .9rem; }
.ev-note-row td { padding-top: 0 !important; border-top: none !important; }

/* ---------- Shiftlists ---------- */
.shift-event-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.shift-row { padding: 10px 0; border-top: 1px solid var(--border); }
.form-card > .shift-row:first-of-type { border-top: none; }
.shift-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.shift-time { font-size: .8rem; color: var(--muted); font-weight: 700; }
.shift-slots { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.slot-group { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.slot-chip {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .76rem; font-weight: 700; background: var(--surface2); color: var(--ink);
  border: 1px solid var(--border);
}
.slot-chip.board { border-color: var(--esn-dark); }
html[data-theme="dark"] .slot-chip.board { border-color: #4d54d8; }
.slot-open {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: .76rem; border: 1px dashed var(--muted); color: var(--muted);
  background: transparent; font-family: inherit;
}
button.slot-join {
  border-color: var(--esn-green); color: var(--esn-green);
  font-weight: 700; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
button.slot-join:hover { background: var(--esn-green); color: #fff; }
button.slot-join[data-role="board"] { border-color: var(--esn-cyan); color: var(--esn-cyan); }
button.slot-join[data-role="board"]:hover { background: var(--esn-cyan); color: #fff; }
.shift-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* Account: who am I */
.account-role { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }

/* ---------- Organigram (Team tab) ---------- */
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 6px 0 4px; }
.org-level {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 16px; text-align: center; min-width: 240px; max-width: 100%;
}
.org-level strong { display: block; font-size: .9rem; }
.org-level .org-who { font-size: .8rem; color: var(--muted); }
.org-level .org-perm { font-size: .72rem; color: var(--muted); font-style: italic; }
.org-arrow { color: var(--muted); font-size: .9rem; line-height: 1.6; }

.loading { text-align: center; padding: 90px 0; color: var(--muted); }
.spinner {
  width: 38px; height: 38px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--esn-cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--esn-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: .88rem;
  z-index: 100;
  max-width: 90vw;
}
.toast.error { background: var(--esn-magenta); }
.toast.warn { background: var(--esn-orange, #F47B20); } /* guidance, not logged */
.toast.success { background: var(--esn-green); }

.success-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 50px 30px;
  text-align: center;
  margin: 44px auto;
  max-width: 540px;
}
.success-panel .big { font-size: 2.8rem; }
.success-panel h1 { margin: 10px 0; font-size: 1.5rem; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 0; margin: 0 0 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs button { white-space: nowrap; }
.admin-tabs button {
  border: none;
  background: none;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.admin-tabs button:hover { color: var(--ink); }
.admin-tabs button.active { color: var(--esn-dark); border-bottom-color: var(--esn-dark); }
.admin-tabs button .material-symbols-rounded {
  font-size: 17px;
  vertical-align: -3.5px;
  margin-right: 2px;
  opacity: .85;
}

/* Divider between the student pages and the team pages in the top nav */
.main-nav .nav-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, .3);
  align-self: center;
  margin: 0 6px;
}
.main-nav.open .nav-sep { width: auto; height: 1px; margin: 6px 0; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  border-left: 4px solid var(--accent, var(--esn-cyan));
}
.stat-card .num { font-size: 1.5rem; font-weight: 900; color: var(--ink); line-height: 1.2; }
.stat-card .lbl {
  font-size: .68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
  margin-top: 2px;
}

/* ---------- Profile & ESNcard ---------- */
.profile-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-bottom: 44px; }

/* Replica of the official ESNcard layout */
.esncard {
  display: flex;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  font-size: 10px;                  /* card scales off this */
}
.esncard-grey { filter: grayscale(.8) brightness(.96); }

.esncard-left {
  flex: 0 0 37%;
  background: linear-gradient(160deg, #2aa7e6 0%, #1d63c8 55%, var(--esn-dark) 100%);
  color: #fff;
  padding: 10% 6% 6% 7%;
  display: flex;
  flex-direction: column;
}
.esncard-brand { font-size: 1.5em; font-weight: 900; letter-spacing: .3px; }
.esncard-sub { font-size: .95em; line-height: 1.3; opacity: .9; margin-top: 2px; }
.esncard-photo {
  margin-top: 10%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background: rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.esncard-photo img { width: 100%; height: 100%; object-fit: cover; }
.esncard-photo span { font-weight: 900; letter-spacing: 2px; font-size: 1.2em; opacity: .8; }
.esncard-notvalid {
  font-size: .72em;
  text-align: center;
  margin-top: auto;
  padding-top: 6%;
  opacity: .85;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.esncard-right {
  flex: 1;
  padding: 6% 6% 5% 6%;
  display: flex;
  flex-direction: column;
  /* The card replica is always a LIGHT physical card — its text must stay
     dark in dark mode too (was var(--ink) → unreadable white-on-white). */
  color: #191a2e;
  min-width: 0;
}
.esncard-value { color: #14264a; }
.esncard-logo {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3%;
}
.esncard-logo img { width: 2.2em; height: 2.2em; }
.esncard-logo span { font-weight: 900; font-size: 1.6em; letter-spacing: .5px; }
.esncard-field { margin-bottom: 3.5%; min-width: 0; }
.esncard-frow { display: flex; gap: 4%; }
.esncard-frow .esncard-field { flex: 1; }
/* Dates like 15.08.2026 must never truncate — let that box breathe */
.esncard-frow .esncard-field + .esncard-field { flex: 0 0 auto; min-width: 34%; }
.esncard-label { font-size: .95em; font-weight: 700; color: #45536b; margin-bottom: 2px; }
.esncard-value {
  background: #bfe3f8;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 1.05em;
  font-weight: 700;
  min-height: 1.7em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.esncard-value.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 1px; }
.esncard-bottom { display: flex; align-items: flex-end; gap: 6%; }
.esncard-bottom .esncard-field { flex: 1; margin-bottom: 0; }
.esncard-barcode {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 3.2em;
}
.esncard-barcode-empty { flex: 1; }

.esncard-status { font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* v0.86: interactive card — subtle 3D tilt following the pointer, with a
   glossy sheen that sweeps across. Pure CSS variables driven from JS;
   disabled automatically on touch devices (no hover). */
.esncard-stage { perspective: 900px; }
.esncard-tilt {
  transform: rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg));
  transition: transform .18s ease-out;
  will-change: transform;
  position: relative;
}
.esncard-tilt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 45%);
  opacity: var(--sheen, 0);
  transition: opacity .25s;
  mix-blend-mode: soft-light;
}
@keyframes cardIntro {
  from { transform: translateY(10px) rotateX(6deg); opacity: 0; }
  to { transform: translateY(0) rotateX(0); opacity: 1; }
}
.esncard-tilt { animation: cardIntro .5s ease-out; }

/* v0.86: grouped account menu with icons */
.account-menu .menu-group {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  padding: 12px 16px 4px;
  background: var(--surface2);
}
.account-menu a .material-symbols-rounded,
.account-menu button .material-symbols-rounded {
  font-size: 19px;
  vertical-align: -4.5px;
  margin-right: 10px;
  color: var(--esn-cyan);
  opacity: .9;
}
.account-menu #btn-signout-account .material-symbols-rounded { color: var(--esn-magenta); }
.account-foot-links {
  text-align: center;
  font-size: .8rem;
  color: var(--muted);
}
.account-foot-links a { color: var(--muted); text-decoration: underline; }

/* ---------- Account screen (avatar tap) ---------- */
.account-wrap {
  max-width: 460px;
  margin: 26px auto 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.account-wrap .esncard { max-width: none; }
.account-wrap .esncard-status { margin-top: -4px; }
.account-menu {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.account-menu a, .account-menu button {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.account-menu a:hover, .account-menu button:hover { background: var(--hover); text-decoration: none; }
.account-menu > :last-child { border-bottom: none; }
.account-menu #btn-signout-account { color: var(--esn-magenta); }
.account-menu .chev { color: var(--muted); font-size: 1.1rem; margin-left: auto; }
.account-menu .menu-value {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  font-size: .85rem;
}
.account-menu .menu-value + .chev { margin-left: 8px; }

/* v0.88: compact quick-links grid — every destination reachable from the
   profile page again (the mobile bottom bar only fits five tabs). */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
}
/* Desktop: the top nav already holds every destination — no tiles needed */
@media (min-width: 821px) {
  .quick-grid { display: none; }
}
.quick-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 2px 9px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-size: .7rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s, background .12s;
}
.quick-grid a:hover { background: var(--hover); text-decoration: none; }
.quick-grid a:active { transform: scale(.94); }
.quick-grid a .material-symbols-rounded { font-size: 22px; color: var(--esn-cyan); }

/* Task timestamps, dropdown filters, no-show warning (v0.91) */
.todo-when { display: block; color: var(--muted); font-size: .72rem; font-weight: 400; margin-top: 1px; }
.select-filter { max-width: 220px; margin-bottom: 6px; }
.noshow-warn {
  background: rgba(244, 123, 32, .12);
  border: 1px solid rgba(244, 123, 32, .45);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .85rem;
  margin: 10px 0;
}
.noshow-warn .material-symbols-rounded { color: var(--esn-orange); }

/* Settings page: group headers between the cards */
.settings-group {
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 26px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-group:first-of-type { margin-top: 10px; }
.settings-group .material-symbols-rounded { color: var(--esn-cyan); }
.settings-group::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Footer social icons — only the links the board filled in are rendered */
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 4px 0 14px;
}
.footer-socials a {
  color: rgba(255, 255, 255, .75);
  display: inline-flex;
  transition: color .15s, transform .15s;
}
.footer-socials a:hover { color: #fff; transform: translateY(-2px); }
.footer-socials svg, .footer-socials .material-symbols-rounded { width: 22px; height: 22px; font-size: 22px; }

/* Same icons inside light cards (Office page) */
.socials-row { display: flex; gap: 16px; align-items: center; }
.socials-row a { color: var(--esn-cyan); display: inline-flex; transition: transform .15s; }
.socials-row a:hover { transform: translateY(-2px); }
.socials-row svg, .socials-row .material-symbols-rounded { width: 21px; height: 21px; font-size: 21px; }

/* "Ticket options" — cancel/refund/transfer tucked behind a collapsed row */
.ticket-more summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--muted); list-style: none; }
.ticket-more summary::-webkit-details-marker { display: none; }
.ticket-more summary::after { content: "▾"; margin-left: 6px; font-size: .7rem; }
.ticket-more[open] summary::after { content: "▴"; }
.ticket-more-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; }

/* Google sign-in buttons — per Google's branding the G sits on a white
   button with dark text, in light AND dark mode. */
.btn-google {
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google:hover { background: #f7f8f8; }
.btn-google .g-logo { width: 18px; height: 18px; flex: 0 0 18px; }
[data-theme="dark"] .btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.signin-state .form-hint { max-width: 340px; margin: 6px auto 16px; }
.signin-state p strong { font-size: 1.02rem; }

/* Home: sub-group headers inside the upcoming list ("This week" / "Later") */
.group-title {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 18px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.group-title:first-child { margin-top: 4px; }

/* Desktop: the buy box follows you while reading long event pages */
@media (min-width: 821px) {
  .buy-box { position: sticky; top: 84px; }
}

/* Desktop: two-column account layout (card left, menu right) */
@media (min-width: 821px) {
  .account-wrap {
    max-width: 940px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 0 32px;
    align-items: start;
  }
  .account-left { grid-column: 1; }
  .account-right { grid-column: 2; position: sticky; top: 86px; }
  .account-wrap .esncard { font-size: 11.5px; }   /* card scales up a notch */
}
.account-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.account-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* Mobile: natural app order — card, shortcuts, status card, menu, foot links.
   display:contents lifts the two columns' children into the single flex
   column so they can interleave. */
@media (max-width: 820px) {
  .account-left, .account-right { display: contents; }
  .esncard-stage { order: 0; }
  .quick-grid { order: 1; }
  .account-left > .form-card { order: 2; }
  .account-menu { order: 3; }
  .account-foot-links { order: 4; }
}
.account-menu a:active, .account-menu button:active { background: var(--hover); }

/* ---------- Ticket / QR ---------- */
.ticket-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  margin: 36px auto;
  overflow: hidden;
  text-align: center;
}
.ticket-head {
  background: var(--esn-dark);
  border-bottom: 4px solid var(--esn-cyan);
  color: #fff;
  padding: 22px;
}
.ticket-head h1 { font-size: 1.25rem; font-weight: 900; }
.ticket-head p { font-size: .85rem; color: #d9dbf2; margin-top: 4px; }
.ticket-body { padding: 26px 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-box {
  background: #fff;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-block;
}
.qr-box img, .qr-box canvas, .qr-box table { display: block; }
.ticket-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .75rem; color: var(--muted); word-break: break-all; }
.ticket-divider { width: 100%; border: none; border-top: 2px dashed var(--border); margin: 6px 0; }

.checkin-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  margin: 36px auto;
  padding: 30px;
  text-align: center;
}
.checkin-status { font-size: 2.6rem; margin-bottom: 6px; }
.checkin-panel h1 { font-size: 1.4rem; }
.checkin-details {
  text-align: left;
  margin: 18px 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: .9rem;
}
.checkin-details p { margin: 4px 0; }

/* ---------- QR scanner ---------- */
.scan-panel { max-width: 520px; margin: 0 auto 44px; }
.scan-video-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-lg);
}
.scan-video-wrap video { width: 100%; display: block; }
.scan-frame {
  position: absolute;
  inset: 14%;
  border: 3px solid rgba(255, 255, 255, .9);
  border-radius: 16px;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .28);
}

/* ---------- Image upload ---------- */
.img-preview {
  max-width: 260px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
  display: block;
}
.img-upload-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- Mobile home: greeting + swipe rail ---------- */
.m-greet { padding: 20px 0 2px; }
.m-greet h1 { font-size: 1.4rem; font-weight: 900; }
.m-greet p { color: var(--muted); font-size: .85rem; }

.hscroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 2px 24px 14px;
  margin: 0 -24px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.mini-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent, var(--esn-cyan));
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.mini-card:hover { text-decoration: none; }
.mini-date { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.mini-title {
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.mini-price { font-size: .85rem; font-weight: 900; color: var(--esn-dark); }
.mini-price.free { color: var(--esn-green); }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--esn-dark);
  z-index: 60;
  justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .3);
}
.bottom-nav a {
  color: #cfd2f2;
  font-size: .66rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.bottom-nav a span { font-size: 1.25rem; line-height: 1; }
.bottom-nav a.active { color: #fff; background: rgba(0, 174, 239, .3); }
.bottom-nav a:hover { text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--esn-dark); color: #c9ccec; margin-top: 40px; font-size: .86rem; border-top: 3px solid var(--esn-cyan); }
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
  padding: 36px 24px;
}
.footer-star { width: 38px; height: 38px; margin-bottom: 8px; }
.footer-logo {
  height: 48px;
  width: 48px;
  object-fit: contain;
  margin-bottom: 8px;
}
.site-footer a { color: var(--esn-cyan); }
.footer-about { max-width: 300px; }
.footer-est { margin-top: 10px; font-size: .78rem; color: #a9acd6; line-height: 1.55; }
.footer-est a { color: #c9ccec; text-decoration: underline; }
.footer-bottom {
  text-align: center;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .76rem;
}

/* ---------- Responsive: app-style mobile ---------- */
@media (max-width: 820px) {
  .event-detail-body { grid-template-columns: 1fr; padding: 20px; gap: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }

  /* Helpers */
  .m-only { display: block; }
  .d-only { display: none !important; }

  /* Slim native-style app bar: page title + avatar, no logo, no footer */
  .site-header {
    padding-top: env(safe-area-inset-top);
    border-bottom-width: 2px;
  }
  .header-inner { min-height: 50px; gap: 12px; }
  .brand { display: none; }
  .mobile-title {
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .2px;
  }
  .main-nav, .nav-toggle { display: none !important; }
  #btn-signout { display: none; }        /* sign-out lives on the Profile screen */
  .header-actions { margin-left: auto; }
  #user-name { display: none; }
  .site-footer { display: none; }

  .bottom-nav { display: flex; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* Tap feedback feels native */
  .btn:active, .chip:active, .mini-card:active, .bottom-nav a:active { transform: scale(.97); }

  /* Screen transitions between tabs */
  #app.page-anim { animation: page-in .18s ease-out; }
  @keyframes page-in {
    from { opacity: .4; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }

  /* Calendar on mobile: compact dot grid + tappable agenda below */
  .cal-cell { min-height: 46px; padding: 5px 2px; align-items: center; gap: 2px; }
  .cal-cell.has-ev { cursor: pointer; }
  .cal-event { display: none; }
  .cal-dots { display: flex; gap: 3px; justify-content: center; }
  .cal-dots i { width: 5px; height: 5px; border-radius: 50%; display: block; }
  .calendar-grid { margin-bottom: 10px; gap: 4px; }
  .cal-daynum { font-size: .78rem; }
  .section-title { font-size: 1.05rem; margin: 22px 0 12px; }

  /* Compact event cards */
  .events-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 30px; }
  .card-img { height: 130px; }
  .event-card .card-body { padding: 14px 16px 12px; gap: 6px; }
  .event-card h3 { font-size: 1rem; }
  .event-desc { font-size: .84rem; }
  .date-badge { margin: 12px 0 0 16px; padding: 4px 10px; }
  .date-badge .d { font-size: 1.1rem; }

  .filter-bar input[type="search"] { max-width: none; }
  .filter-chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px 24px 6px; margin: 0 -24px; scrollbar-width: none; }
  .filter-chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }

  th, td { padding: 9px 10px; font-size: .8rem; }

  /* Tables marked .cards become stacked cards on mobile — no sideways scrolling */
  .table-wrap.cards { background: none; border: none; box-shadow: none; overflow: visible; }
  .cards table, .cards tbody { display: block; width: 100%; }
  .cards thead { display: none; }
  .cards tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    padding: 12px 14px;
  }
  .cards td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none;
    padding: 3px 0;
    font-size: .86rem;
    text-align: right;
  }
  .cards td[data-l]::before {
    content: attr(data-l);
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    text-align: left;
    flex: none;
  }
  .cards td.card-main {
    display: block;
    text-align: left;
    font-size: .98rem;
    padding-bottom: 7px;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 5px;
  }
  .cards td.card-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 9px;
    text-align: left;
    white-space: normal !important;
  }
  .cards tr:hover td { background: none; }
  .cards td:empty { display: none; }

  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 12px 14px; }
  .stat-card .num { font-size: 1.25rem; }
  .event-detail { margin-top: 16px; }
  .event-detail-banner { padding: 24px 20px; }
  .event-detail-banner h1 { font-size: 1.3rem; }
  .form-card { padding: 18px; }
  .form-actions .btn { flex: 1 1 calc(50% - 5px); white-space: nowrap; }
  .success-panel { padding: 34px 20px; }
  .map-embed { height: 200px; }
  /* ticket-type / variant rows: name on its own line, numbers below */
  .option-head { display: none; }
  .option-row {
    grid-template-columns: 1fr 1fr 1fr 44px;
    padding: 8px 0 10px;
    border-bottom: 1px dashed var(--border);
  }
  .option-row .opt-name { grid-column: 1 / -1; }
  .info-label { width: 70px; }
}

/* ============================================================
   Premium polish pass (v1.10): consistent focus, calmer motion,
   subtle depth, table hovers.
   ============================================================ */
.btn { border-radius: 9px; transition: filter .12s ease, box-shadow .12s ease, transform .12s ease; }
.btn:hover { filter: brightness(.96); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(25, 26, 46, .12); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-ghost:hover { transform: none; box-shadow: none; }
html[data-theme="dark"] .btn:hover { filter: brightness(1.08); }

.btn:focus-visible, .chip:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--esn-cyan);
  outline-offset: 2px;
  border-radius: 6px;
}
input:focus, select:focus, textarea:focus { outline: none; }
.inline-input:focus, select:focus {
  border-color: var(--esn-cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .15);
}

tbody tr { transition: background .1s ease; }
@media (min-width: 721px) {
  tbody tr:hover { background: var(--hover); }
}

.toast { box-shadow: var(--shadow-lg); border-radius: 12px; }

/* calmer, more deliberate motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   Shift grid — spreadsheet-style layout like the party shiftlist
   ============================================================ */
.shift-grid-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; }
.shift-grid { width: 100%; border-collapse: collapse; font-size: .82rem; }
.shift-grid th {
  background: var(--surface2); color: var(--muted);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .6px;
  padding: 7px 10px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.shift-grid th.col-board { color: var(--esn-dark); }
html[data-theme="dark"] .shift-grid th.col-board { color: #8b90ff; }
.shift-grid td {
  padding: 6px 8px; border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--surface2); vertical-align: middle; min-width: 86px;
}
.shift-grid td:last-child { border-right: none; }
.shift-grid tbody tr:last-child td { border-bottom: none; }
.shift-grid td.col-task { min-width: 120px; }
.shift-grid td.col-time { min-width: 70px; font-weight: 700; font-size: .76rem; color: var(--muted); white-space: nowrap; }
/* first column sticks while scrolling sideways on phones */
.shift-grid th:first-child, .shift-grid td:first-child {
  position: sticky; left: 0; background: var(--card); z-index: 1;
  box-shadow: 1px 0 0 var(--border);
}
.shift-grid th:first-child { background: var(--surface2); }
.cell-note { font-size: .72rem; color: var(--muted); font-weight: 400; line-height: 1.35; margin-top: 1px; }
.cell-filled { background: var(--card); }
.cell-open { background: var(--card); }
.cell-na { background: var(--surface2); }
.cell-hint { color: var(--muted); font-size: .74rem; border: 1px dashed var(--border); border-radius: 999px; padding: 1px 9px; display: inline-block; }
.cell-join {
  display: block; width: 100%; padding: 4px 8px;
  border: 1px dashed var(--esn-green); border-radius: 8px;
  background: transparent; color: var(--esn-green);
  font-family: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
  transition: background .12s ease, color .12s ease;
  white-space: nowrap;
}
.cell-join:hover { background: var(--esn-green); color: #fff; }
.cell-join[data-role="board"] { border-color: var(--esn-cyan); color: var(--esn-cyan); }
.cell-join[data-role="board"]:hover { background: var(--esn-cyan); color: #fff; }
.cell-assign { border-color: var(--muted); color: var(--muted); }
.cell-assign:hover { background: var(--esn-dark); border-color: var(--esn-dark); color: #fff; }
.slot-chip.me { border-color: var(--esn-green); }
.chip-x {
  border: none; background: none; color: var(--esn-magenta);
  font-size: .78rem; font-weight: 700; cursor: pointer; padding: 0 0 0 6px;
  font-family: inherit; line-height: 1;
}
.grid-actions { display: inline-flex; gap: 2px; white-space: nowrap; }
.grid-ib {
  border: none; background: none; cursor: pointer; color: var(--muted);
  padding: 3px 4px; border-radius: 6px; line-height: 1;
}
.grid-ib:hover { background: var(--surface2); color: var(--ink); }
.grid-ib.danger:hover { color: var(--esn-magenta); }

/* compact add/edit shift form */
.shift-form { display: grid; grid-template-columns: 2fr 1fr 72px 72px minmax(130px, auto); gap: 10px 12px; margin-top: 10px; align-items: end; }
.shift-form .shift-form-note { grid-column: 1 / -2; }
.shift-form .shift-form-btn { grid-column: -2 / -1; }
.shift-form .shift-form-btn .btn { white-space: nowrap; width: 100%; }
.shift-form .form-field { margin: 0; min-width: 0; }
.shift-form .form-field input { width: 100%; min-width: 0; }
.shift-form .form-field label { font-size: .68rem; }
.shift-form-card.editing { border-left: 4px solid var(--esn-orange); }
@media (max-width: 720px) {
  .shift-form { grid-template-columns: 1fr 1fr; }
  .shift-form .form-field:first-child { grid-column: 1 / -1; }
  .shift-form .shift-form-note { grid-column: 1 / -1; }
  .shift-form .shift-form-btn { grid-column: 1 / -1; }
  .shift-form .shift-form-btn .btn { width: 100%; }
  .shift-grid td { min-width: 78px; }
}


/* ============================================================
   v1.14 — mobile audit: no horizontal overflow, standalone-app feel
   ============================================================ */
/* Backstop: nothing may ever push the page wider than the screen.
   'clip' (not 'hidden') keeps position:sticky working. */
body { overflow-x: clip; }
html, body { overscroll-behavior-x: none; }
html { background: var(--bg); }

/* Grid/flex children with inputs must be allowed to shrink —
   intrinsic input widths were forcing cards past the viewport. */
.form-grid, .form-grid .form-field { min-width: 0; }
.form-field input, .form-field select, .form-field textarea { max-width: 100%; }

/* Native-app feel */
* { -webkit-tap-highlight-color: transparent; }
.btn, .chip, .bottom-nav a, .main-nav a, .admin-tabs button,
.cell-join, .grid-ib, .att-chip, .agenda-item, .mini-card {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 720px) {
  /* iOS zooms the page when focusing inputs smaller than 16px —
     the single biggest "this is a website" tell. */
  input, select, textarea { font-size: 16px !important; }
  /* app-like: no visible scrollbars on scrollable strips */
  .table-wrap, .shift-grid-wrap, .hscroll { scrollbar-width: none; }
  .table-wrap::-webkit-scrollbar, .shift-grid-wrap::-webkit-scrollbar, .hscroll::-webkit-scrollbar { display: none; }
}

/* Installed app: no browser pull-to-refresh chrome inside the PWA */
@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: contain; }
}

/* ============================================================
   v0.93 — polish pass: in-app dialogs, motion, popovers, toasts
   ============================================================ */

/* ---- In-app dialogs (confirm/prompt replacement) ---- */
body.dialog-open { overflow: hidden; }
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: rgba(15, 16, 40, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dlgFade .18s ease-out;
}
.dialog-card {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(8, 9, 30, .38);
  padding: 22px;
  width: min(420px, 100%);
  animation: dlgPop .24s cubic-bezier(.34, 1.4, .64, 1);
}
.dialog-msg { font-size: .93rem; line-height: 1.6; }
.dialog-msg br + br { display: block; content: ""; margin-top: 6px; }
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.dialog-overlay.closing { animation: dlgFadeOut .16s ease-in forwards; }
.dialog-overlay.closing .dialog-card { animation: dlgDrop .16s ease-in forwards; }
@keyframes dlgFade { from { opacity: 0; } }
@keyframes dlgFadeOut { to { opacity: 0; } }
@keyframes dlgPop { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes dlgDrop { to { transform: translateY(10px) scale(.98); opacity: 0; } }
/* Mobile: dialogs arrive as a bottom sheet, like a native app */
@media (max-width: 820px) {
  .dialog-overlay { align-items: flex-end; padding: 0; }
  .dialog-card {
    width: 100%;
    border-radius: 22px 22px 0 0;
    border-bottom: none;
    padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    animation: dlgSheet .28s cubic-bezier(.32, .72, .33, 1);
  }
  .dialog-card::before {
    content: "";
    display: block;
    width: 42px; height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: -8px auto 14px;
  }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; padding: 12px; }
  .dialog-overlay.closing .dialog-card { animation: dlgSheetOut .18s ease-in forwards; }
  @keyframes dlgSheet { from { transform: translateY(60%); } to { transform: none; } }
  @keyframes dlgSheetOut { to { transform: translateY(30%); opacity: 0; } }
}

/* ---- (i) hint popover — anchored bubble instead of a toast ---- */
.hint-pop {
  position: fixed;
  z-index: 210;
  background: var(--esn-dark);
  color: #fff;
  font-size: .82rem;
  line-height: 1.5;
  font-weight: 500;
  padding: 10px 13px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(8, 9, 30, .35);
  animation: dlgPop .18s ease-out;
}
html[data-theme="dark"] .hint-pop { background: #34366b; }

/* ---- Toasts: icon + springy entrance ---- */
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  max-width: min(440px, calc(100vw - 28px));
  animation: toastIn .32s cubic-bezier(.34, 1.45, .64, 1);
}
.toast.hidden { display: none; }
.toast .material-symbols-rounded { flex: 0 0 auto; }
@keyframes toastIn { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@media (max-width: 820px) {
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } /* above the tab bar */
}

/* ---- Every view glides in (ends transform:none, so sticky keeps working) ---- */
#app > * { animation: viewIn .3s ease both; }
#app > *:nth-child(2) { animation-delay: .04s; }
#app > *:nth-child(3) { animation-delay: .08s; }
#app > *:nth-child(4) { animation-delay: .11s; }
#app > *:nth-child(n+5) { animation-delay: .14s; }
@keyframes viewIn { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* Cards inside grids stagger in a touch later */
.events-grid > * { animation: viewIn .34s ease both; }
.events-grid > *:nth-child(2) { animation-delay: .05s; }
.events-grid > *:nth-child(3) { animation-delay: .1s; }
.events-grid > *:nth-child(4) { animation-delay: .14s; }
.events-grid > *:nth-child(n+5) { animation-delay: .18s; }

/* ---- Event/shop cards: lift + gentle photo zoom on hover ---- */
.card-img-wrap { overflow: hidden; }
.card-img { transition: transform .45s cubic-bezier(.2, .6, .2, 1); }
@media (hover: hover) {
  .event-card { transition: box-shadow .2s ease, transform .2s ease; }
  .event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .event-card:hover .card-img { transform: scale(1.045); }
}

/* ---- Inputs: soft focus glow in brand cyan ---- */
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--esn-cyan);
  box-shadow: 0 0 0 3px rgba(0, 174, 239, .22);
}

/* ---- Sleeker loading spinner ---- */
.spinner {
  border-width: 3px;
  border-color: var(--border);
  border-top-color: var(--esn-cyan);
  border-right-color: var(--esn-magenta);
  animation: spin .7s cubic-bezier(.45, .2, .55, .8) infinite;
}

/* ---- Tables: row hover feedback (desktop) ---- */
@media (hover: hover) {
  .table-wrap tbody tr { transition: background .12s ease; }
  .table-wrap tbody tr:hover { background: var(--hover); }
}

/* ---- Details blocks open smoothly ---- */
details[open] > *:not(summary) { animation: viewIn .22s ease both; }

/* ============================================================
   v0.97 — #/links: the app's own link-in-bio page
   ============================================================ */
.links-page { max-width: 480px; margin: 18px auto 40px; }
.links-hero { text-align: center; margin-bottom: 18px; }
.links-hero img { width: 76px; height: 76px; border-radius: 20px; box-shadow: var(--shadow); }
.links-hero h1 { font-size: 1.45rem; font-weight: 900; margin: 10px 0 2px; }
.links-hero p { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.links-hero .socials-row { justify-content: center; }
.links-sect {
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin: 20px 0 8px;
  text-align: center;
}
.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.link-btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); background: var(--hover); }
.link-btn:active { transform: scale(.98); }
.link-btn .material-symbols-rounded { color: var(--esn-cyan); }
/* event rows inside the links page */
.link-event { justify-content: flex-start; border-left: 4px solid var(--accent, var(--esn-cyan)); text-align: left; }
.link-date {
  display: flex; flex-direction: column; align-items: center;
  min-width: 44px; padding: 4px 6px;
  background: var(--accent, var(--esn-cyan));
  color: #fff; border-radius: 10px; line-height: 1.1;
}
.link-date .d { font-size: 1.1rem; font-weight: 900; }
.link-date .m { font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.link-ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-ev-main strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-ev-main small { color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-ev-price { font-size: .78rem; font-weight: 800; color: var(--esn-cyan); white-space: nowrap; }

/* ============================================================
   v0.98 — Cantus Codex (#/codex)
   ============================================================ */
.codex-page { max-width: 640px; margin: 0 auto; }
.codex-song {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  padding: 0 14px;
}
.codex-song summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
.codex-song summary::-webkit-details-marker { display: none; }
.codex-num {
  min-width: 30px;
  text-align: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--esn-cyan);
  background: var(--hover);
  border-radius: 8px;
  padding: 4px 0;
}
.codex-title { flex: 1; min-width: 0; }
.codex-editbtn {
  border: none; background: none; cursor: pointer;
  color: var(--muted); padding: 4px;
}
.codex-editbtn:hover { color: var(--esn-cyan); }
.codex-lyrics {
  font-family: inherit;
  font-size: .95rem;
  line-height: 1.65;
  white-space: pre-wrap;
  margin: 4px 0 16px;
  color: var(--ink);
}
.codex-song[open] { border-left: 4px solid var(--esn-cyan); }

/* ============================================================
   v0.99 — cash register counting
   ============================================================ */
.cash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 18px; }
.cash-row { display: flex; align-items: center; gap: 10px; }
.cash-val { min-width: 62px; font-weight: 800; font-size: .88rem; text-align: right; color: var(--muted); }
.cash-row input { width: 76px; text-align: center; }
.cash-line { flex: 1; text-align: right; font-size: .85rem; font-weight: 700; color: var(--esn-cyan); font-variant-numeric: tabular-nums; }
.cash-total { text-align: right; font-size: 1.05rem; margin-top: 12px; }
.cash-total strong { color: var(--esn-green); font-size: 1.2rem; }

/* ---- Jacob, the AI mascot (v0.99.2) ---- */
.jacob-sm {
  width: 19px;
  height: 19px;
  vertical-align: -5px;
  margin-right: 2px;
}
.jacob-lg {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}
.jacob-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--hover);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
  font-size: 0.9rem;
  animation: viewIn 0.3s ease;
}
