:root {
  --navy: #0d2140;
  --navy-2: #163a6b;
  --accent: #2f6fed;
  --accent-dk: #1f54c4;
  --gold: #c9a227;
  --ink: #12233c;
  --muted: #5f7189;
  --line: #e1e8f2;
  --field: #f6f9fd;
  --ok: #12895b;
  --bad: #c0342b;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #fff;
  color: var(--ink);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dk); }

/* ---------- public page ---------- */

/* The banner is a designed image that spans the full viewport width: it fills
   every screen up to 1920 px — the file's own width — and is never enlarged
   past it, because upscaling is exactly what makes its text and logo marks
   look soft. The box keeps the file's own ratio, 1920:518 standing where the
   earlier 1800:666 did: the client found the tall band covering half the
   screen, and the new file is a third shorter at the same width. `aspect-ratio`
   reserves that height before the file lands, so the form below never jumps.
   The background repeats the image's own two bands — the navy it opens with
   down to 80.9%, then the white logo strip — so a monitor wider than 1920 px
   sees the design continue instead of a hard vertical edge. No hairline: the
   white strip and the white page meet on their own. */
.banner {
  line-height: 0;
  background: linear-gradient(to bottom, #041330 0 80.9%, #ffffff 80.9% 100%);
}

.banner img {
  display: block;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  height: auto;
  aspect-ratio: 1920 / 518;
}

.page { max-width: 1180px; margin: 0 auto; padding: 34px 20px 40px; }

.card {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 30px -26px rgba(13, 33, 64, .45);
  overflow: hidden;
}

.card::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) 55%, var(--gold) 100%);
}

.card-body { padding: 30px 34px 34px; }

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--accent-dk);
}

h1 {
  font-size: 25px;
  line-height: 1.25;
  margin: 8px 0 6px;
  color: var(--navy);
  letter-spacing: -.2px;
}

.audience {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #7a5c00;
  background: #fdf6dd;
  border: 1px solid #f0e2a8;
  border-radius: 999px;
  padding: 5px 12px;
}

.sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.when {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--navy);
  background: #eef4ff;
  border: 1px solid #d3e2ff;
  border-radius: 999px;
  padding: 7px 14px;
}

.when .dot { color: var(--gold); }

.place { margin: 0 0 18px; font-size: 13px; color: var(--muted); }

.lead { margin: 14px 0 0; font-size: 14.5px; color: #2b3d57; }

.agenda { margin: 18px 0 0; padding: 14px 16px; background: var(--field); border: 1px solid var(--line); border-radius: 12px; }
.agenda h2 { margin: 0 0 8px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent-dk); }
.agenda ul { margin: 0; padding-left: 18px; font-size: 14px; }
.agenda li { margin: 3px 0; }

.req-note { margin: 22px 0 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.req { color: var(--bad); font-weight: 800; }

fieldset { border: none; margin: 0 0 22px; padding: 0; }

legend {
  padding: 0 0 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-dk);
}

label { display: block; margin-bottom: 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: #43546c; }
label .hint { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--field);
  border: 1px solid #d7e1ee;
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .16);
}

input.bad, textarea.bad, select.bad { border-color: var(--bad); background: #fff6f5; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* choices: radio and checkbox rendered as cards */
.choices { display: grid; gap: 8px; }

.choices.two { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--field);
  border: 1px solid #d7e1ee;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.choice:hover { border-color: #b7cbec; background: #f2f7ff; }

.choice input { margin: 3px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }

.choice.sel { border-color: var(--accent); background: #eef4ff; }

.choice.bad { border-color: var(--bad); background: #fff6f5; }

/* A workshop is chosen on substance, not on a time: its card carries the topic
   and hours on one heading line and the organiser's description under it in
   quieter, lighter type. The whole card is the label, so a click anywhere
   selects it. */
.choice.workshop { display: block; padding: 13px 15px; }

.choice.workshop .wt { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }

.choice.workshop .wt input { margin: 3px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }

.choice.workshop .wdesc {
  display: block;
  margin: 7px 0 0 26px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: 0;
}

.sub-block {
  margin: 12px 0 0;
  padding: 14px 16px 2px;
  background: #f9fbff;
  border: 1px dashed #c9d8f0;
  border-radius: 12px;
}

.sub-block p.note { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }

/* consent items */
.consent { margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.consent.done { border-color: #bfe3d2; background: #f7fdfa; }
.consent.bad { border-color: #f0c3bd; background: #fff7f6; }
.consent .choice { background: transparent; border: none; padding: 0; margin: 0; }
.consent details { margin: 10px 0 0 26px; }
.consent summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent-dk); }
.consent .doc {
  max-height: 320px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #35465e;
}
.consent .doc h3 { margin: 14px 0 6px; font-size: 13px; color: var(--navy); }
.consent .doc h3:first-child { margin-top: 0; }
.consent .doc p { margin: 0 0 10px; }

.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }

button { font: inherit; cursor: pointer; border: none; border-radius: 10px; }

.btn-main {
  width: 100%;
  margin-top: 8px;
  padding: 16px 20px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 24px -16px rgba(47, 111, 237, .95);
  transition: background .15s, transform .05s;
}

.btn-main:hover { background: var(--accent-dk); }
.btn-main:active { transform: translateY(1px); }
.btn-main[disabled] { background: #9fb9e6; box-shadow: none; cursor: default; }

.err {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  background: #fdf0ef;
  border: 1px solid #f3cfcb;
  color: var(--bad);
  font-size: 13.5px;
  font-weight: 600;
}

.done { padding: 30px 6px 14px; }

.done .check {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 27px;
  color: #fff;
  background: var(--ok);
}

.done .msg { max-width: 520px; margin: 0 auto 20px; font-size: 16px; color: var(--navy); text-align: center; }

.contact {
  margin: 0 auto;
  max-width: 520px;
  padding: 16px 18px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
  color: #35465e;
  white-space: pre-line;
}

.foot { padding: 26px 20px 40px; text-align: center; font-size: 12px; color: #8d9bb0; white-space: pre-line; }

/* ---------- admin ---------- */

.login-wrap { max-width: 420px; margin: 8vh auto; padding: 0 20px; }

.topbar { background: var(--navy); color: #fff; padding: 14px 0; }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .4px; font-size: 15px; }
.brand span { color: #7fb0ff; }
.topbar .ev { font-size: 12.5px; color: #b9cae4; }
.topbar .spacer { flex: 1; }

.tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.tabs .inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; }
.tab { padding: 14px 16px; font-size: 13.5px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; background: none; border-radius: 0; white-space: nowrap; }
.tab.active { color: var(--navy); border-bottom-color: var(--accent); }

.shell { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat .n { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .l { font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.stat.ok .n { color: var(--ok); }
.stat.warn .n { color: var(--bad); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 22px; margin-bottom: 20px; }
.panel h2 { font-size: 14px; letter-spacing: .4px; text-transform: uppercase; color: var(--navy); margin: 0 0 14px; }
.panel h2 .hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); font-size: 12.5px; margin-left: 8px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.btn { padding: 10px 16px; font-size: 13px; font-weight: 700; color: #fff; background: var(--navy-2); transition: filter .15s; }
.btn:hover { filter: brightness(1.14); }
.btn.cyan { background: var(--accent); }
.btn.ok { background: var(--ok); }
.btn.ghost { background: #eef2f8; color: var(--navy); }
.btn.danger { background: #fbeae8; color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn[disabled] { opacity: .55; cursor: default; }

input.inline, select.inline {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 9px 12px;
  font-size: 13.5px;
  background: #fff;
}

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); background: #f8fafd; white-space: nowrap; }
tbody tr:hover { background: #fbfdff; }
td.num { color: var(--muted); }
td .sub { font-size: 11.5px; color: var(--muted); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.sent { background: #e6f6ee; color: var(--ok); }
.badge.failed { background: #fdeceb; color: var(--bad); }
.badge.none { background: #eef2f8; color: var(--muted); }
.badge.ok { background: #e6f6ee; color: var(--ok); }
.badge.new { background: #eef4ff; color: var(--accent-dk); }

.empty { padding: 26px; text-align: center; color: var(--muted); font-size: 13.5px; }

.settings fieldset { border: none; margin: 0 0 24px; padding: 0; }
.settings label { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: #46586f; font-weight: 700; }
.settings textarea { min-height: 190px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; }
.settings textarea.short { min-height: 76px; }
.settings .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.settings .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.ph { font-size: 12px; color: var(--muted); margin: -6px 0 12px; }
.ph code { background: var(--field); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 11.5px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .6);
  transition: opacity .2s, transform .2s;
}
.toast.ok { background: #0f7a52; }
.toast.bad { background: #a92c24; }
.toast.hide { opacity: 0; transform: translateY(8px); pointer-events: none; }

.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--navy); text-transform: none; letter-spacing: 0; }
.switch input { width: 18px; height: 18px; accent-color: var(--ok); }

.note-box { padding: 12px 14px; border-radius: 10px; background: #fff8e8; border: 1px solid #f0e0b6; font-size: 12.5px; color: #6b5200; margin-bottom: 16px; }
.note-box.info { background: #eef4ff; border-color: #cddffb; color: #1f3f7a; }

@media (max-width: 760px) {
  .card-body { padding: 22px 18px 26px; }
  .grid, .choices.two, .settings .two, .settings .three { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 21px; }
}
