/* Welcome-Board · CD Community Day 2026
   Abgeleitet aus 00_Grundlagen/Design/cd-anweisung.md; Muster übernimmt den
   bewährten Look aus FSC-Präsentation/service/public/assets/style.css. */

:root {
  --yellow: #FAB510;
  --navy: #17263C;
  --ink: #243247;
  --muted: #6b7484;
  --line: #e3e5e9;
  --bg: #ffffff;
  --ok: #1c7c54;
  --err: #b3261e;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(23, 38, 60, .12);
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Inter Tight", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fff url("/assets/triangles.svg") center / cover fixed no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .raleway {
  font-family: Raleway, "Inter Tight", system-ui, sans-serif;
  color: var(--navy);
  letter-spacing: -.01em;
}

a { color: var(--navy); }

.wrap {
  width: min(100% - 32px, 520px);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.brand {
  display: flex;
  justify-content: center;
  margin: 8px 0 26px;
}

.brand img {
  width: min(260px, 70vw);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.card {
  background: rgba(255, 255, 255, .93);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
  backdrop-filter: blur(6px);
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--yellow);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(28px, 6vw, 36px);
  line-height: 1.1;
  margin: 0 0 10px;
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 6px;
}

label .optional { font-weight: 400; color: var(--muted); }

.field { margin-bottom: 14px; }

input[type=text], input[type=tel], input[type=email], input[type=url], input[inputmode] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(23, 38, 60, .1);
}

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.consent input { margin-top: 2px; accent-color: var(--navy); width: 18px; height: 18px; flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font: 700 16px/1 "Inter Tight", system-ui, sans-serif;
  color: var(--navy);
  background: var(--yellow);
  cursor: pointer;
  text-decoration: none;
  transition: transform .12s, box-shadow .12s, background .12s;
}

.btn:hover { background: #ffc22e; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }

.btn.secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  font-weight: 600;
}

.btn.secondary:hover { background: #f7f7f8; }

.hint {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.error {
  display: none;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf0ef;
  color: var(--err);
  font-size: 14px;
  line-height: 1.45;
}

.error.show { display: block; }

/* Danke-Screen */
#thanks { display: none; text-align: center; padding: 8vh 8px 0; }

.badge-ok {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  animation: badge-pop .5s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes badge-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#thanks h2 { font-size: clamp(24px, 6vw, 30px); margin: 0 0 8px; }
#thanks p { color: var(--muted); font-size: 15px; line-height: 1.55; margin: 0; }
#thanks .thanks-lead { font-size: 16px; color: var(--ink); margin-bottom: 4px; }
#thanks .thanks-lead b { color: var(--navy); font-family: Raleway, "Inter Tight", sans-serif; font-weight: 800; }
#thanks .photo {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 26px auto 0;
  max-width: 360px;
  text-align: left;
  background: var(--yellow);
  color: var(--navy);
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
}
#thanks .photo img { width: 96px; flex: none; align-self: flex-end; margin-bottom: -15px; }

#thanks .save-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 26px auto 0;
  max-width: 360px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
#thanks .save-card b { color: var(--navy); }
#thanks .save-head { display: flex; gap: 12px; align-items: center; }
#thanks .save-head .phoneicon { width: 46px; height: 46px; flex: none; }
#thanks .save-head span { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.55; margin-top: 3px; }
/* Beide Kacheln: gleiche Überschrift (Raleway 700, 15.5 px) und gleicher Fließtext (13.5 px) */
#thanks .save-head b,
#thanks .photo b {
  display: block;
  font-family: Raleway, "Inter Tight", system-ui, sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 3px;
}
#thanks .save-steps { display: none; margin: 0; padding: 0 0 0 4px; list-style: none; counter-reset: step; }
#thanks .save-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 8px 30px;
  font-size: 13.5px;
  line-height: 1.5;
}
#thanks .save-steps li:last-child { padding-bottom: 0; }
#thanks .save-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -1px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font: 700 12px/21px "Inter Tight", system-ui, sans-serif;
  text-align: center;
}

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11.5px;
  color: #98a0ad;
  line-height: 1.6;
}

/* Admin */
.admin { width: min(100% - 32px, 1100px); margin: 0 auto; padding: 24px 0 56px; }
.admin .card { padding: 22px; margin-bottom: 16px; }
.admin h1 { font-size: 22px; margin-bottom: 14px; }
.admin input:not([type=checkbox]), .admin select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.admin input:not([type=checkbox]):focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 38, 60, .1); }
.admin .bar label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--navy); margin: 0; }
.admin .bar label input { accent-color: var(--navy); width: 17px; height: 17px; }
.admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); }
.admin td { padding: 9px 8px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
.admin tr:hover td { background: #fafafb; }
.admin tr.test { background: #fff8e1; }
.admin tr.test:hover td { background: #fff3cd; }
.admin tr.hid { opacity: .45; }

.admin button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 6px 9px;
  font: 600 12px/1 "Inter Tight", sans-serif;
  color: var(--navy);
  cursor: pointer;
}
.admin button:hover { background: #f4f5f7; }
.admin button.red { color: var(--err); border-color: #f2d4d2; }
.admin button.red:hover { background: #fdf0ef; }
.admin button.gray { color: var(--muted); }
.admin .primary { border: 0; background: var(--yellow); color: var(--navy); font-weight: 700; }
.admin .primary:hover { background: #ffc22e; }

.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--yellow);
  color: var(--navy);
}

.muted { color: var(--muted); }

#login { max-width: 380px; margin: 15vh auto 0; }
#login .card { padding: 26px 24px; }
#login input[type=password] { width: 100%; margin-bottom: 12px; }
#app { display: none; }

@media (max-width: 420px) {
  .row { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 22px 18px; }
  .wrap { padding-top: 18px; }
}

/* ---------- App: Gates, Kacheln, Fragen ---------- */
.back {
  display: block;
  border: 0;
  background: transparent;
  padding: 0 0 10px;
  font: 600 13px "Inter Tight", system-ui, sans-serif;
  color: var(--muted);
  cursor: pointer;
}
.back:hover { color: var(--navy); }

.gate { text-align: center; padding: 34px 24px 30px; }
.gate .back { margin-bottom: 6px; }
.gate h1 { margin: 0 0 8px; }

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 28px auto 26px;
  padding: 30px 34px 24px;
  width: fit-content;
  min-width: 234px;
  border-radius: 20px;
  background: radial-gradient(130% 130% at 50% 0%, #22364f 0%, var(--navy) 58%);
  box-shadow: 0 20px 44px rgba(23, 38, 60, .22);
  color: var(--yellow);
}
.countdown b {
  font-family: Raleway, "Inter Tight", system-ui, sans-serif;
  font-size: clamp(60px, 19vw, 84px);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
}
.countdown small {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .64);
}

.tiles-head { margin: 4px 0 14px; }
.tiles-head h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.tiles-head p { margin: 0; font-size: 13.5px; color: var(--muted); }

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

.tile {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 124px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 14px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 38, 60, .07);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-1px); border-color: var(--navy); box-shadow: 0 14px 30px rgba(23, 38, 60, .11); }
.tile:active { transform: translateY(0); }
.tile .glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--yellow);
  color: var(--navy);
  font: 800 17px/1 Raleway, "Inter Tight", sans-serif;
}
.tile b {
  font-family: Raleway, "Inter Tight", system-ui, sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
}
.tile .sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.tile .state {
  margin-top: auto;
  padding-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--navy);
}
.tile.locked { background: #fafafb; }
.tile.locked .glyph { background: var(--line); color: var(--muted); }
.tile.locked .state { color: var(--muted); }

textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 18px) 22px, calc(100% - 13px) 22px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
textarea:focus, select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23, 38, 60, .1); }
#ftof { margin-top: 8px; }
.counter { margin: 6px 0 0; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  max-width: min(100% - 40px, 420px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

#thanks .next { max-width: 360px; margin: 26px auto 0; }
#thanks .next .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .badge-ok { animation: none; }
  html { scroll-behavior: auto; }
}

/* Admin: Tabs */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-head h1 { font-size: 21px; margin: 0; }

.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(23, 38, 60, .06);
}
.tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 9px 13px;
  font: 600 13px "Inter Tight", system-ui, sans-serif;
  color: var(--muted);
  cursor: pointer;
}
.tabs .tab:hover { color: var(--navy); background: #f5f6f8; }
.tabs .tab.on { background: var(--yellow); color: var(--navy); }
.tabs .tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(23, 38, 60, .09);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.admin h2 { font-size: 18px; margin: 0 0 4px; }
.admin #pane-gates label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  margin: 0;
}
.admin .state-line {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* Fragen: wer schon eingecheckt ist, wird nicht nach dem Namen gefragt */
.who {
  margin: 18px 0 4px;
  font-size: 13px;
  color: var(--muted);
}
.who b { color: var(--navy); font-weight: 600; }

/* Hinweis im Check-in */
.notice {
  margin: 0 0 20px;
  padding: 11px 13px;
  border-left: 3px solid var(--yellow);
  border-radius: 8px;
  background: #fff8e4;
  color: var(--navy);
  font-size: 12.5px;
  line-height: 1.5;
}
.notice b { font-weight: 700; }
.hint.center { text-align: center; }

/* Admin: Gerätewechsel-Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(23, 38, 60, .55);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: min(100%, 380px);
  max-height: 100%;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 30px 70px rgba(23, 38, 60, .35);
  text-align: center;
}
.modal-card h2 { font-size: 17px; margin: 0 0 16px; }
.modal-x {
  position: absolute;
  top: 10px; right: 12px;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal-x:hover { color: var(--navy); }
.qr { display: grid; place-items: center; margin: 0 auto 14px; width: min(100%, 260px); }
.qr svg { width: 100%; height: auto; display: block; }
.modal-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.d-code {
  margin: 6px 0 10px;
  font-family: Raleway, "Inter Tight", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
