/* kurse.cloud – bewusst ohne Build-Schritt und ohne externe Schriften (DSGVO). */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #16202c;
  --muted: #5b6878;
  --line: #dde3eb;
  --brand: #1d5fa8;
  --brand-ink: #ffffff;
  --brand-soft: #e5eef9;
  --accent: #0f8a6b;
  --warn-bg: #fff6e0;
  --warn-ink: #7a5300;
  --err-bg: #fdecec;
  --err-ink: #9b1c1c;
  --ok-bg: #e7f6ef;
  --ok-ink: #0d6a4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 32, 52, .06), 0 6px 20px rgba(16, 32, 52, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141b;
    --surface: #17202b;
    --surface-2: #1e2935;
    --text: #e8edf3;
    --muted: #9aa8b8;
    --line: #2a3644;
    --brand: #5a9be3;
    --brand-ink: #0b1522;
    --brand-soft: #1b2d44;
    --accent: #3cc49c;
    --warn-bg: #3a2f14;
    --warn-ink: #f3d38a;
    --err-bg: #3d1c1f;
    --err-ink: #f4b4b4;
    --ok-bg: #143328;
    --ok-ink: #9be3c6;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap, .top .wrap-wide { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.logo { font-weight: 700; letter-spacing: -.01em; color: var(--text); text-decoration: none; font-size: 1.1rem; }
.logo span { color: var(--brand); }
.top nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.top nav a.active, .top nav a:hover { color: var(--text); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: .95rem; cursor: pointer; }

main { padding: 24px 0 48px; }
.foot { color: var(--muted); font-size: .85rem; padding: 24px 0 40px; text-align: center; }
.foot a { color: var(--muted); }

/* Karten */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { margin-bottom: .75rem; }

/* Code-Eingabe (Startseite) */
.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -.02em; }
.hero p { color: var(--muted); font-size: 1.05rem; }
.codebox { display: flex; gap: 10px; max-width: 460px; margin: 22px auto 8px; }
.codebox input {
  flex: 1; min-width: 0; font-size: clamp(1.6rem, 7vw, 2.1rem); letter-spacing: .35em; text-align: center;
  padding: 14px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.codebox input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.codebox button { font-size: 1.05rem; padding: 0 22px; }
@media (max-width: 480px) {
  .codebox { flex-direction: column; }
  .codebox button { padding: 14px; }
}

/* Buttons & Formulare */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.small { padding: 6px 12px; font-size: .9rem; }
.btn.danger { background: var(--err-bg); color: var(--err-ink); }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=datetime-local], input[type=file], select {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 200px; }

/* Hinweise */
.flash { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.flash.error { background: var(--err-bg); color: var(--err-ink); }
.flash.status { background: var(--ok-bg); color: var(--ok-ink); }
.flash.warn { background: var(--warn-bg); color: var(--warn-ink); }
.hint { background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }

/* Schulungsraum */
.room-head .kicker { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); margin-top: 8px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; padding-top: 4px; }
.item .ico { flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.item .ico svg { width: 22px; height: 22px; }
.item .body { flex: 1; min-width: 0; }
.item .body strong { display: block; }
.item .body p { margin: 2px 0 0; color: var(--muted); font-size: .93rem; }
.item .actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 520px) {
  .item { flex-wrap: wrap; }
  .item .actions { width: 100%; align-items: stretch; padding-left: 54px; }
}
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list a.entry { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; text-decoration: none; color: var(--text); }
.list a.entry:hover strong { color: var(--brand); }

/* Tabellen (Cockpit) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
td a { text-decoration: none; font-weight: 600; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); background: var(--surface-2); font-size: .9rem; }
.tabs a.active { background: var(--brand); color: var(--brand-ink); }
.code-big { font-size: 2rem; font-weight: 700; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1.4fr 1fr; } }
.qr svg { width: 180px; height: 180px; background: #fff; border-radius: 8px; }
.inline-form { display: inline; }

/* Beamer-Ansicht */
.beamer { min-height: 100vh; display: grid; place-items: center; background: #0e2340; color: #fff; text-align: center; padding: 24px; }
.beamer h1 { font-size: clamp(1.6rem, 3.5vw, 3rem); max-width: 22ch; margin: 0 auto 1.5rem; }
.beamer .step { font-size: clamp(1.1rem, 2vw, 1.7rem); opacity: .85; }
.beamer .url { font-size: clamp(2rem, 5vw, 4.2rem); font-weight: 700; margin: .2rem 0 1.4rem; }
.beamer .code { font-size: clamp(3rem, 11vw, 9rem); font-weight: 800; letter-spacing: .12em; line-height: 1; font-variant-numeric: tabular-nums; }
.beamer-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.beamer .qr svg { width: clamp(150px, 30vh, 340px); height: auto; border-radius: 12px; background: #fff; padding: 6px; display: block; margin: 0 auto .6rem; }
@media (min-width: 900px) and (orientation: landscape) {
  .beamer-inner { flex-direction: row; gap: 5vw; text-align: left; }
  .beamer-inner h1 { margin-left: 0; }
  .beamer .qr { text-align: center; }
  .beamer .qr svg { width: clamp(200px, 42vh, 420px); }
}
.beamer .count { position: fixed; right: 20px; bottom: 16px; opacity: .7; font-size: 1.1rem; }
.beamer .back { position: fixed; left: 20px; bottom: 16px; color: #fff; opacity: .5; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
