:root {
  --accent: #8c1d40;
  --accent-hover: #74152f;
  --accent-ink: #ffffff;
  --accent-soft: #f8eaef;
  --ring: rgba(140, 29, 64, 0.22);
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --topbar: #8c1d40;
  --topbar-ink: #ffffff;
  --topbar-muted: rgba(255, 255, 255, 0.8);
  --hero: transparent; /* the campus drawing shows through (see body::before) */
  --hero-ink: #1f1a1d;
  --hero-muted: #5f585c;
  --eyebrow: #8c1d40;
  --error: #b42318;
  --error-soft: #fef3f2;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
}
:root { color-scheme: light; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* The campus sketch behind every page, faded in its own paper colour so text stays easy to read. A fixed layer rather than
   background-attachment: fixed, which phones ignore or render slowly. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(246, 243, 236, 0.72), rgba(246, 243, 236, 0.72)), url("/homebg.webp") center bottom / cover no-repeat, #f3efe6;
}
h1, h2, h3 { letter-spacing: -0.01em; }
a { color: var(--accent); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* Top bar and hero */
.topbar { background: var(--topbar); color: var(--topbar-ink); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.brand-mark { width: 26px; height: 26px; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--topbar-muted); }
.secure svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.hero { background: var(--hero); color: var(--hero-ink); padding: 28px 0 88px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--eyebrow); }
.hero h1 { margin: 0 0 14px; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; max-width: 820px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; color: var(--hero-muted); font-size: 14px; }
.meta li { display: inline-flex; align-items: center; gap: 7px; }
.meta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meta strong { color: var(--hero-ink); font-weight: 500; }

/* Layout */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; margin-top: -64px; padding-bottom: 56px; align-items: start; }
.layout.single { grid-template-columns: minmax(0, 760px); justify-content: center; }
.rail { position: sticky; top: 20px; display: grid; gap: 16px; }
.content { min-width: 0; }

/* Stepper */
.stepper {
  list-style: none; margin: 0; padding: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.stepper li + li { margin-top: 2px; }
.stepper button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer;
}
.stepper button:disabled { cursor: default; }
.stepper button:not(:disabled):hover { background: var(--surface-2); color: var(--ink); }
.stepper .dot {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface);
}
.stepper .dot svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.stepper .done { color: var(--ink-2); }
.stepper .done .dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stepper .current { color: var(--ink); font-weight: 600; background: var(--accent-soft); }
.stepper .current .dot { border-color: var(--accent); color: var(--accent); }
.stepper .has-error .dot { border-color: var(--error); color: var(--error); }

.aside-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); font-size: 14px; }
.aside-card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.aside-card dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.aside-card dl > div { grid-column: 1 / -1; }
.aside-card dl > .glance-half { grid-column: auto; }
.aside-card .glance-half dd { font-size: 18px; font-weight: 600; color: var(--ink); }
.aside-card dt { font-size: 12px; color: var(--muted); }
.aside-card dd { margin: 0; color: var(--ink-2); }

/* Panel (the step card) */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step { padding: 32px 36px 8px; }
.step-head { margin-bottom: 22px; }
.step-count { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--accent); }
.step-head h2 { margin: 0; font-size: 22px; }
.step-head p { margin: 6px 0 0; color: var(--muted); max-width: 640px; }
.group + .group { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.group-head { margin-bottom: 14px; }
.group-head h3 { margin: 0; font-size: 16px; }
.group-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 16px; }
.field { grid-column: span 6; min-width: 0; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.field-label { display: flex; align-items: baseline; gap: 4px; margin: 0 0 6px; padding: 0; font-weight: 500; font-size: 14px; color: var(--ink-2); }
.optional { font-weight: 400; font-size: 13px; color: var(--muted); }
.req-mark { color: var(--error); font-weight: 600; margin-left: 2px; }
.choice-title .req-mark, .choice-title .optional { margin-left: 4px; }
.required-note { margin: 0; padding: 16px 36px 0; font-size: 13px; color: var(--muted); }
@media (max-width: 600px) { .required-note { padding: 14px 18px 0; } }
.field .help { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px; transition: border-color 0.15s, box-shadow 0.15s;
}
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7280' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
select:disabled { background-color: var(--surface-2); color: var(--muted); }
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.btn:focus-visible, .stepper button:focus-visible, .choice input:focus-visible + .choice-body, .file-button:focus-within {
  outline: none; box-shadow: 0 0 0 3px var(--ring);
}

/* Choices: pills for short lists, cards for longer ones */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.choices.stack { display: grid; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice-body {
  display: flex; align-items: flex-start; gap: 10px; height: 100%; padding: 9px 14px; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.choices:not(.cards):not(.stack) .choice-body { min-height: 42px; align-items: center; }
.choice:hover .choice-body { border-color: var(--muted); }
.choice input:checked + .choice-body { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice.disabled { cursor: not-allowed; opacity: 0.55; }
.tick {
  flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 50%;
  display: grid; place-items: center; background: var(--surface);
}
.check .tick { border-radius: 5px; }
.tick svg { width: 11px; height: 11px; fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.choice input:checked + .choice-body .tick { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .choice-body .tick svg { opacity: 1; }
.choice-text { display: grid; gap: 2px; }
.choice-title { font-weight: 500; color: var(--ink); }
.choice-desc { font-size: 13px; color: var(--muted); }
/* A link in a choice (the terms) sits above the invisible checkbox that covers the choice, so it can be clicked. */
.choice-desc a { position: relative; z-index: 1; }
.review-image { display: block; max-width: 140px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line); object-fit: contain; background: var(--surface-2); }
.choices.stack .choice-title { font-weight: 400; }

/* File upload */
.file { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.file-thumb { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--line); }
.file-info { min-width: 0; flex: 1; }
.file-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-note { font-size: 13px; color: var(--muted); }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Errors */
.error { display: flex; gap: 6px; margin: 6px 0 0; color: var(--error); font-size: 13px; }
.field.invalid input:not([type=radio]):not([type=checkbox]):not([type=file]), .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid input:focus, .field.invalid select:focus, .field.invalid textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.18); }
.banner { margin: 8px 36px 0; padding: 12px 14px; border-radius: 8px; background: var(--error-soft); color: var(--error); font-size: 14px; }

/* Footer bar with buttons */
.panel-footer { display: flex; align-items: center; gap: 12px; padding: 18px 36px; margin-top: 28px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
/* Says that the answers are saved automatically, between Back and Continue. */
.save-status { margin-left: auto; min-width: 0; color: var(--muted); text-align: right; }
.save-status.error-text { color: var(--error); }
.save-status[hidden] + .btn { margin-left: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px;
  border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.65; cursor: progress; }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 500; }

/* Review */
.review-block { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review-block + .review-block { margin-top: 14px; }
.review-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.review-head h3 { margin: 0; font-size: 14px; }
.review-list { margin: 0; padding: 6px 16px; }
.review-list div { display: grid; grid-template-columns: minmax(140px, 40%) 1fr; gap: 12px; padding: 7px 0; font-size: 14px; }
.review-list div + div { border-top: 1px solid var(--line); }
.review-list dt { color: var(--muted); }
.review-list dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.consent { margin-top: 22px; }

/* Messages and confirmation */
.panel-message { padding: 40px 36px; text-align: center; }
.panel-message h2 { margin: 12px 0 6px; font-size: 22px; }
.panel-message p { max-width: 520px; margin: 0 auto 10px; }
.message-icon { width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); font-size: 24px; font-weight: 700; }
.message-icon.ok { background: var(--ok-soft); color: var(--ok); }
.message-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.badge { display: inline-block; margin-top: 14px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ok-soft); color: var(--ok); }
.badge.pending, .badge.waitlisted { background: var(--warn-soft); color: var(--warn); }
.badge.rejected { background: var(--error-soft); color: var(--error); }
.receipt { display: grid; gap: 0; max-width: 460px; margin: 20px auto 12px; text-align: left; border: 1px solid var(--line); border-radius: 10px; }
.receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; font-size: 14px; }
.receipt div + div { border-top: 1px solid var(--line); }
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
#again { margin-top: 10px; }

/* Mobile progress */
.mobile-progress { margin-bottom: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mobile-progress-text { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; margin-bottom: 8px; }
.mobile-progress-text span:first-child { color: var(--accent); font-weight: 600; }
.mobile-progress-text span:last-child { font-weight: 500; }
.bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); transition: width 0.25s; }

.footer p { margin: 0 0 6px; }
.footer-credit { font-weight: 500; color: var(--ink-2); }
.footer { padding: 8px 0 36px; font-size: 13px; color: var(--muted); text-align: center; }
/* Text that sits straight on the campus sketch gets a soft frosted patch behind it, so the lines of the
   drawing do not run through the letters. */
.hero-text, .footer .wrap, .toolbar > .muted {
  background: rgba(246, 243, 236, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 0 18px 6px rgba(246, 243, 236, 0.6);
}
.hero-text { width: fit-content; max-width: calc(100% + 28px); margin-left: -14px; padding: 10px 14px; border-radius: 14px; }
.hero-text > :last-child { margin-bottom: 0; }
.footer .wrap { width: fit-content; max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 12px; }
.toolbar > .muted { padding: 2px 10px; border-radius: 999px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Admin page */
.admin { max-width: 560px; margin: 0 auto; }
.admin .step { padding-bottom: 28px; }
.admin .field + .field { margin-top: 18px; }
#msg { margin: 14px 0 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: -56px; }
  .rail { display: none !important; }
}
@media (min-width: 901px) {
  .mobile-progress { display: none !important; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .secure { display: none; }
  .hero { padding: 22px 0 72px; }
  .step { padding: 24px 18px 4px; }
  .banner { margin: 8px 18px 0; }
  .panel-footer { padding: 14px 18px; }
  .panel-footer { gap: 8px; }
  .panel-footer .btn { padding: 0 14px; }
  .grid { gap: 16px 12px; }
  .span-2, .span-3, .span-4 { grid-column: span 6; }
  .span-2.keep, .span-3.keep { grid-column: span 3; }
  .review-list div { grid-template-columns: 1fr; gap: 2px; }
  .panel-message { padding: 32px 18px; }
}

/* Logo, back link */
.brand { color: inherit; text-decoration: none; }
.brand-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #fff; }
.brand-logo img { width: 34px; height: 34px; display: block; }
.topbar-inner { height: 64px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 14px; color: var(--hero-muted); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--hero-ink); }
.back-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-sub { margin: 0; color: var(--hero-muted); max-width: 640px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Event catalogue */
.catalogue { margin-top: -64px; padding-bottom: 40px; }
/* Leave room for the fixed Register bar so the footer stays visible. */
.catalogue + .footer { padding-bottom: 110px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.filters { display: inline-flex; padding: 4px; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.filter { border: 0; background: none; padding: 7px 14px; border-radius: 7px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.filter.active { background: var(--accent-soft); color: var(--accent); }
.toolbar .muted { color: var(--hero-muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-body {
  display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tile:hover .tile-body { border-color: var(--line-strong); transform: translateY(-1px); }
.tile input:focus-visible + .tile-body { box-shadow: 0 0 0 3px var(--ring); }
.tile input:checked + .tile-body { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 18px rgba(140, 29, 64, 0.12); }
.tile-disabled { cursor: not-allowed; }
.tile-disabled .tile-body { opacity: 0.62; transform: none !important; }
.tile-top { display: flex; align-items: center; gap: 8px; }
.tile-category { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.tile-tick {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  display: grid; place-items: center; background: var(--surface);
}
.tile-tick svg { width: 13px; height: 13px; fill: none; stroke: var(--accent-ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tile input:checked + .tile-body .tile-tick { background: var(--accent); border-color: var(--accent); }
.tile input:checked + .tile-body .tile-tick svg { opacity: 1; }
.tile-disabled .tile-tick { visibility: hidden; }
.tile-title { font-size: 18px; font-weight: 600; line-height: 1.3; color: var(--ink); letter-spacing: -0.01em; }
.tile-summary { color: var(--muted); font-size: 14px; }
.tile-meta { display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
.tile-meta > span { display: flex; align-items: center; gap: 8px; }
.tile-contact a { position: relative; z-index: 1; color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.tile-contact a:hover { text-decoration: underline; }
.ico { display: inline-grid; }
.ico svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.chip-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.tile-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pill { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
/* Registration closing soon (less than 7 days) and on its last day (less than 1). */
.pill-soon, .chip-soon { background: #fef7c3; border-color: transparent; color: #a15c07; }
.pill-last, .chip-last { background: #fde2e1; border-color: transparent; color: #b42318; }
.pill-muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.skeleton { height: 300px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .tile-body { transition: none; } }
.empty { padding: 28px; text-align: center; color: var(--muted); }

.selection-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.08); padding: 12px 0;
}
.selection-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.selection-text { display: grid; min-width: 0; }
.selection-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-bar:not(.active) .selection-text strong { color: var(--muted); font-weight: 500; }
#register { flex: none; padding: 0 22px; }
#register svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#register:disabled { opacity: 0.45; cursor: not-allowed; }
@media (max-width: 600px) {
  .catalogue { margin-top: -56px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .toolbar .muted { display: none; }
}


/* ---------- Sign in ---------- */
.login-page { min-height: calc(100vh - 64px); display: grid; place-items: center; padding: 40px 16px; background: var(--hero); }
.login-card { width: 100%; max-width: 400px; padding: 32px; display: grid; gap: 18px; }
.login-head { text-align: center; }
.login-logo { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); margin-bottom: 12px; }
.login-head h1 { margin: 0; font-size: 22px; }
.login-head .message-icon { margin-bottom: 14px; }
.login-head p { margin: 4px 0 0; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 64px; }
.show-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; cursor: pointer; }
.login-card .banner { margin: 0; }
.login-card .field, .filter-grid .field { grid-column: auto; }
.login-submit { width: 100%; }
.login-back { justify-self: center; font-size: 14px; color: var(--muted); text-decoration: none; }
.login-back:hover { color: var(--accent); }
@media (max-width: 600px) { .login-card { padding: 24px 18px; } }
input[readonly] { background: var(--surface-2); color: var(--muted); cursor: default; }
.notice {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1px solid var(--line); color: var(--ink);
}
.notice p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.done-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.panel-message .btn-primary { margin-top: 10px; }
.done-actions .btn { margin-top: 0; }

/* ---------- Dashboard ---------- */
.wrap.wide { max-width: 1440px; }
.hero-compact { padding: 22px 0 70px; }
.hero-compact h1 { margin-bottom: 4px; }
.dash-main { margin-top: -54px; padding-bottom: 48px; display: grid; gap: 16px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--topbar-ink); text-decoration: none; }
.user-chip .chip-icon { display: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.user-chip .role { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: rgba(255, 255, 255, 0.16); }
.topbar-button {
  height: 38px; padding: 0 14px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.22); color: var(--topbar-ink);
}
.topbar-button:hover { background: rgba(255, 255, 255, 0.12); }
/* The participant's name (or email) next to the header buttons. */
.user-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--topbar-ink); }
.user-name[hidden] { display: none; }
.topbar-button { display: inline-flex; align-items: center; white-space: nowrap; text-decoration: none; }
.footer a { color: inherit; }

/* Privacy notice and terms pages */
.policy { max-width: 820px; margin: -64px auto 40px; padding: 32px 36px; line-height: 1.65; }
.policy h2 { font-size: 19px; margin: 32px 0 8px; }
.policy h2:first-of-type { margin-top: 8px; }
.policy p, .policy li { color: var(--ink-2); }
.policy ul, .policy ol { padding-left: 22px; margin: 8px 0 12px; }
.policy li { margin: 4px 0; }
.policy a { color: inherit; text-decoration: underline; }
.policy .updated { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
@media (max-width: 640px) { .policy { padding: 22px 18px; margin-top: -56px; } }

.guest-panel details summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; }
.guest-panel details summary::-webkit-details-marker { display: none; }
.guest-panel details[open] summary .btn-link { visibility: hidden; }
.guest-body { padding: 0 20px 18px; border-top: 1px solid var(--line); }
.guest-body > p { margin: 14px 0 12px; }
.guest-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.guest-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stat.bad .stat-value { color: var(--error); }
.stat { display: grid; gap: 2px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.stat.ok .stat-value { color: var(--ok); }
.stat.warn .stat-value { color: var(--warn); }
.stat.muted .stat-value { color: var(--muted); }

.filter-bar { padding: 12px 16px; }
.filter-bar-row { display: flex; gap: 10px; align-items: center; }
.filter-bar .filter-search { flex: 1; min-width: 0; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.filter-open { flex: none; gap: 8px; }
.filter-open svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.filter-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent); color: #fff; }
.filter-count[hidden] { display: none; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.filter-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 999px; font-size: 13px; background: var(--accent-soft); color: var(--ink); overflow-wrap: anywhere; }
.filter-chip > .muted { margin-right: 4px; }
.filter-chip button { display: grid; place-items: center; flex: none; width: 22px; height: 22px; margin-left: 2px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.filter-chip button:hover { background: rgba(0, 0, 0, 0.08); color: var(--ink); }
.filter-chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.filters-sheet .sheet-body { padding-bottom: 18px; }
.filter-event { margin: 4px 0 6px; }
.filter-group { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.filter-group legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.filter-grid .field, .filter-event { margin-bottom: 0; }
.filter-grid .field-label { font-size: 13px; margin-bottom: 4px; }
.filter-grid input, .filter-grid select { min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }

.table-panel { overflow: hidden; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.table-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.table-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-danger:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.danger-text { color: var(--error); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 10px 12px; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tr.is-selected { background: var(--accent-soft) !important; }
.data-table .num { text-align: right; white-space: nowrap; }
.data-table .nowrap { white-space: nowrap; color: var(--ink-2); }
.data-table .sub { font-size: 12px; color: var(--muted); }
.data-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.col-check { width: 36px; }
.col-actions { text-align: right; white-space: nowrap; }
.col-actions .btn + .btn { margin-left: 4px; }
.sort { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort.active { color: var(--ink); }
.sort-arrow { font-size: 9px; }
.link-cell { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.link-cell:hover { color: var(--accent); text-decoration: underline; }
.data-table .badge { margin: 0; }
.badge.confirmed { background: var(--ok-soft); color: var(--ok); }
.file-link { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--muted); }
.file-link:hover { background: var(--accent-soft); color: var(--accent); }
.file-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.pager select { min-height: 32px; padding: 4px 30px 4px 8px; width: auto; margin-left: 6px; font-size: 13px; }
.pager-buttons { display: flex; align-items: center; gap: 10px; }

dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); padding: 0; }
dialog::backdrop { background: rgba(10, 11, 14, 0.5); }
.sheet { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border-radius: 14px; flex-direction: column; }
.sheet[open] { display: flex; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 2px 0 0; font-size: 20px; }
.eyebrow-small { margin: 0; font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.sheet-body { overflow-y: auto; padding: 12px 22px; }
.sheet-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-status { margin-right: auto; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(0.92); }
.btn-ok:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.btn-xs { min-height: 26px; padding: 0 8px; font-size: 12px; font-weight: 600; border-radius: 6px; }
.review-actions { display: flex; gap: 6px; margin-top: 6px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.file-previews { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.file-previews:empty { display: none; }
.file-preview { display: grid; gap: 4px; font-size: 12px; color: var(--muted); text-decoration: none; }
.file-preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); }
.confirm { width: min(440px, calc(100vw - 32px)); border-radius: 14px; padding: 22px; }
.confirm h2 { margin: 0 0 8px; font-size: 19px; }
.confirm p { margin: 0 0 18px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }

@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .filter-grid { grid-template-columns: minmax(0, 1fr); }
  .filter-open .filter-label { display: none; }
  .table-toolbar { align-items: stretch; }
  .table-actions { width: 100%; }
  .table-actions #export { flex: 1; }
  .pager { flex-direction: column; align-items: stretch; }
  .pager-buttons { justify-content: space-between; }
}

/* ---------- Login: participants (Google) and coordinators ---------- */
.login-section { display: grid; gap: 10px; }
.login-section h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 16px; }
.login-section > p { margin: 0; }
.login-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); }
.google-button { display: flex; justify-content: center; min-height: 44px; }
.google-missing { padding: 12px 14px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 14px; text-align: center; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dev-login { margin-top: 4px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.dev-login p { margin: 0; }
.login-form { display: grid; gap: 16px; }
.login-form .field { grid-column: auto; }
.login-form .banner { margin: 0; }
.center { text-align: center; margin: 0; }

/* ---------- My registrations ---------- */
.account-main { margin-top: -64px; padding-bottom: 48px; display: grid; gap: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 18px; }
.reg-list { display: grid; }
.reg-card { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.reg-card + .reg-card { border-top: 1px solid var(--line); }
.reg-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reg-title h3 { margin: 0; font-size: 17px; }
.reg-title .badge { margin: 0; }
.reg-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 18px; margin: 12px 0 8px; }
.reg-facts dt { font-size: 12px; color: var(--muted); }
.reg-facts dd { margin: 0; font-size: 14px; }
.reg-main > p { margin: 0; }
.reg-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; flex: none; }
/* The event's website (for confirmed participants) opens another site. */
.btn-external::after { content: "\2197"; margin-left: 6px; font-weight: 400; }
.deletion-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; border-color: var(--warn); background: var(--warn-soft); }
.deletion-notice[hidden], .danger-zone[hidden] { display: none; }
.deletion-notice p { max-width: 760px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.danger-zone h2 { margin: 0 0 4px; font-size: 16px; }
.danger-zone p { margin: 0; max-width: 560px; }
.confirm .field { margin-bottom: 14px; }
.confirm .banner { margin: 0 0 14px; }
@media (max-width: 600px) {
  .account-main { margin-top: -56px; }
  .reg-card, .danger-zone { flex-direction: column; align-items: stretch; }
  .reg-actions { flex-direction: row; flex-wrap: wrap; }
  .reg-actions .btn { flex: 1; }
  .reg-actions .btn-ok { flex-basis: 100%; }
}

/* Header buttons: words on wider screens; on phones only the Amrita logo and icon buttons
   (the words stay as tooltips and screen-reader labels). */
.topbar-button svg { display: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) {
  .brand-name { display: none; }
  .topbar-actions { gap: 8px; }
  .topbar-button { width: 38px; height: 38px; padding: 0; justify-content: center; flex: none; }
  .topbar-button svg { display: block; }
  .topbar-button .label { display: none; }
  .user-name { max-width: 34vw; font-size: 13px; }
  /* Coordinators: the Admin/Guest badge becomes a dashboard icon (the role stays in its tooltip). */
  .user-chip { justify-content: center; width: 38px; height: 38px; flex: none; border-radius: 9px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.22); }
  .user-chip .chip-icon { display: block; }
  .user-chip .role { display: none; }
}

/* Admin dashboard: events list and the add / edit event form. */
.event-admin-list { display: grid; gap: 8px; }
.event-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.event-admin-text { display: grid; gap: 2px; min-width: 0; }
.event-admin-title { font-weight: 500; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.event-admin-title:hover { color: var(--accent); text-decoration: underline; }
.event-admin-actions { display: flex; gap: 8px; flex: none; }
.event-admin-options { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; color: var(--ink-2); }
.event-admin-invite { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.event-admin-invite code, .ee-link-text { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }
.btn-copy { font-size: 13px; }
.ee-invite { display: flex; gap: 8px; }
.ee-invite input { flex: 1; min-width: 0; }
.ee-invite .btn { flex: none; }
.ee-link { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ee-link[hidden] { display: none; }
.ee-link-text { flex: 1; min-width: 0; padding: 6px 8px; }
.event-admin-actions .event-admin-tag { align-self: center; }
.event-admin-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.ee-sheet { width: min(860px, calc(100vw - 32px)); }
.ee-form { padding: 16px 22px 24px; }
.ee-form .required-note { margin: 0 0 6px; padding: 0; }
.ee-section { padding: 20px 0; border-top: 1px solid var(--line); }
.ee-section:first-of-type { border-top: 0; padding-top: 8px; }
.ee-section > .btn { margin-top: 12px; }
.ee-sub { margin: 10px 0 4px 28px; display: grid; gap: 16px; }
.ee-sub[hidden] { display: none; }
.ee-checks { display: grid; gap: 10px; margin-top: 14px; }
.ee-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ee-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.ee-check-title { display: block; font-weight: 500; color: var(--ink); }
.ee-check-desc { display: block; font-size: 13px; color: var(--muted); }
.ee-inline { align-self: center; padding-top: 22px; }
.ee-rows { display: grid; gap: 12px; }
.ee-option { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 16px; background: var(--surface-2); }
.ee-option-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ee-option input, .ee-option select, .ee-option textarea { background-color: var(--surface); }
.ee-option textarea { min-height: 64px; }
.ee-rules { margin-top: 14px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.ee-rules summary { cursor: pointer; font-weight: 500; color: var(--accent); font-size: 14px; }
.ee-rules > p { margin: 6px 0 12px; }
.ee-skills { margin-top: 14px; }
.ee-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ee-chip { position: relative; cursor: pointer; }
.ee-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ee-chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; background: var(--surface); color: var(--ink-2); }
.ee-chip input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.ee-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.ee-error { color: var(--error); }
.ee-datetime { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; }
.ee-fee-help { margin: 0 0 10px; }
.ee-fees { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ee-fee-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(2, 190px); align-items: center; gap: 12px; padding: 8px 14px; min-height: 52px; background: var(--surface); }
.ee-fees.one-mode .ee-fee-row { grid-template-columns: minmax(0, 1fr) 190px; }
.ee-fee-row + .ee-fee-row { border-top: 1px solid var(--line); }
.ee-fee-row[hidden], .ee-fee-row [hidden] { display: none; }
.ee-fee-head { min-height: 0; padding-top: 8px; padding-bottom: 8px; background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.ee-fee-label { font-weight: 500; color: var(--ink); }
.ee-fee-cell { display: flex; align-items: center; gap: 8px; grid-column: auto; }
.ee-fee-cell > input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.ee-fee-amount { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ee-fee-amount input { width: 120px; padding-top: 7px; padding-bottom: 7px; }
.ee-rupee { color: var(--muted); }
.ee-fee-free { color: var(--muted); font-size: 14px; }
.ee-fee-cell.invalid input[type=number] { border-color: var(--error); }
@media (max-width: 600px) {
  .ee-fee-head { display: none; }
  .ee-fee-row, .ee-fees.one-mode .ee-fee-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; align-items: start; }
  .ee-fee-label { grid-column: 1 / -1; }
  .ee-fee-cell { flex-wrap: wrap; }
  .ee-fee-cell::before { content: attr(data-label); flex-basis: 100%; font-size: 12px; color: var(--muted); }
  .ee-fee-amount input { width: 96px; }
}
@media (max-width: 600px) {
  .ee-form { padding: 12px 16px 20px; }
  .ee-form .span-2, .ee-form .span-3, .ee-form .span-4 { grid-column: span 6; }
  .ee-inline { padding-top: 0; }
  .ee-sub { margin-left: 0; }
  .event-admin-row { flex-direction: column; align-items: stretch; }
  .event-admin-tag { align-self: flex-start; }
}

/* Attendance: the QR popup on the dashboard and the page participants open from it. */
.attendance-sheet { width: min(860px, calc(100vw - 32px)); }
.att-nodays { margin: 6px 0 4px; }
.att-day-field { margin: 0; grid-column: auto; }
.att-state { justify-self: start; margin: 0; }
.att-panel-body { border-top: 0; }
.att-on { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; padding: 6px 0 4px; }
.att-qr svg { display: block; width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 8px; }
.att-share { display: grid; gap: 10px; min-width: 0; }
.att-share p { margin: 0; }
.att-link { display: block; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.att-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.att-scans-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.att-scans-head h3 { margin: 0; font-size: 16px; }
.att-table-wrap { border: 1px solid var(--line); border-radius: 8px; }
.att-table-wrap .data-table th { position: static; }
.att-table-wrap .data-table td { white-space: nowrap; }
#att-export { white-space: nowrap; }
#att-export svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.att-empty { padding: 24px 12px; margin: 0; }
/* Automatic / Manual for the chosen day (admin) */
.att-mode { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.att-tabs { box-shadow: none; }
.att-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 10px; }
.att-bulk { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 8px; min-height: 26px; }
.att-bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.att-bulk-actions[hidden] { display: none; }
.att-mark { min-width: 34px; height: 28px; padding: 0 8px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.att-mark.present { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.att-mark.absent { background: var(--surface); color: var(--muted); border-color: var(--line-strong); }
.att-mark:hover:not(:disabled) { filter: brightness(0.95); box-shadow: 0 0 0 3px var(--ring); }
.att-mark:disabled { opacity: 0.5; cursor: not-allowed; }
.att-note { display: block; margin-top: 2px; }
.att-today { margin: 8px 0 0; font-weight: 600; color: var(--accent); }
.attend-done { display: grid; justify-items: center; gap: 6px; text-align: center; }
.attend-done p { margin: 0; }
.attend-tick { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); }
.attend-tick svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.attend-done-title { font-size: 18px; font-weight: 650; }
@media (max-width: 600px) {
  .att-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .att-on { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .att-share { justify-items: stretch; width: 100%; }
}

/* Certificates (admin): the template editor and the list of participants to issue them to. */
.certs-sheet { width: min(1100px, calc(100vw - 32px)); }
.cert-section + .cert-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.cert-h { margin: 4px 0 10px; font-size: 16px; }
.cert-upload { display: grid; gap: 10px; justify-items: start; padding: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.cert-upload p { margin: 0; max-width: 640px; }
.cert-editor { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; align-items: start; }
.cert-editor[hidden], .cert-upload[hidden] { display: none; }
.cert-stage { display: grid; gap: 6px; min-width: 0; }
.cert-stage p { margin: 0; }
#cert-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; cursor: crosshair; touch-action: none; background: #fff; }
#cert-canvas.dragging { cursor: grabbing; }
#cert-canvas:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.cert-controls { display: grid; gap: 10px; }
.cert-controls .field { margin: 0; grid-column: auto; }
.cert-controls .field-label { font-size: 13px; margin-bottom: 4px; }
.cert-controls select, .cert-controls input[type=number] { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
.cert-controls input[type=range] { width: 100%; accent-color: var(--accent); }
.cert-controls input[type=color] { width: 100%; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer; }
.cert-color { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
.cert-controls .cert-color input[type=text] { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; font-family: ui-monospace, Consolas, monospace; }
.cert-controls .cert-color input.invalid { border-color: var(--error); }
.cert-font-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.cert-font-actions .btn { padding: 0; cursor: pointer; }
.cert-font-actions [hidden], #cert-hex-error[hidden] { display: none; }
.cert-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.check-inline input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.cert-tabs, .cert-align { box-shadow: none; display: flex; }
.cert-tabs .filter, .cert-align .filter { flex: 1; padding: 6px 8px; font-size: 13px; }
.cert-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.cert-buttons label.btn { cursor: pointer; }
.cert-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.cert-att { display: grid; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.cert-att[hidden], .cert-noatt[hidden] { display: none; }
.cert-att p { margin: 0; }
.cert-noatt { margin: 0 0 10px; }
.cert-sessions { display: grid; gap: 6px; }
.cert-day { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.cert-day-label { min-width: 150px; font-size: 14px; font-weight: 600; }
.cert-min { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.cert-min label { font-weight: 600; }
.cert-att .cert-min input[type=number] { width: 80px; min-height: 34px; padding-top: 5px; padding-bottom: 5px; font-size: 14px; }
.cert-table-name { font-weight: 600; }
.cert-issued { color: var(--ok); }
@media (max-width: 800px) {
  .cert-editor { grid-template-columns: minmax(0, 1fr); }
  .cert-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
