@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --navy: #12303F;
  --ground: #F6F4EF;
  --amber: #E3902F;
  --amber-dark: #B8671A;
  --ink: #1B2830;
  --ink-2: #3D4A52;
  --muted: #555D66;
  --line: #E4E0D6;
  --line-2: #D6D2C8;
  --card: #FFFFFF;
  --chip-bg: #F2EFE8;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; }
a { color: var(--navy); }
a:hover { color: var(--amber-dark); }
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Kopfzeile */
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Space Grotesk', sans-serif; font-weight: 700; }
.logo-name { display: flex; flex-direction: column; }
.logo-name b { font-family: 'Space Grotesk', sans-serif; font-size: 18px; color: var(--navy); }
.logo-name small { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-dark); }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 14px; }
.pill { font-size: 12px; padding: 6px 12px; border-radius: 999px; background: #FBE9D2; color: #8A4C0C; font-weight: 600; }
.user { font-size: 13px; color: var(--muted); }

/* Buttons */
.btn { font: inherit; font-weight: 600; min-height: 44px; padding: 0 20px; border-radius: 10px; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; }
.btn:hover { background: #0B2230; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-2); min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-ghost:hover { background: var(--chip-bg); }

/* Hero */
.hero { background: var(--navy); color: #fff; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; padding-top: 56px; padding-bottom: 60px; }
.hero-text { flex: 1 1 520px; max-width: 640px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #F2B266; }
.hero h1 { margin: 14px 0; font-size: 44px; line-height: 1.1; }
.hero p { margin: 0; font-size: 16px; line-height: 1.6; color: #C9D6DD; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; }
.stat { min-width: 110px; padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,.08); }
.stat b { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 32px; }
.stat span { font-size: 13px; color: #C9D6DD; }

/* Hauptbereich */
main { padding: 44px 0 64px; }
.section-head h2 { margin: 0 0 6px; font-size: 28px; color: var(--navy); }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.filters { display: flex; flex-direction: column; gap: 12px; margin: 22px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips-label { font-size: 13px; color: var(--muted); margin-right: 4px; }
.chip { font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.tile.is-active:hover { border-color: var(--navy); box-shadow: 0 6px 18px rgba(18,48,63,.08); }
.tile.is-planned { background: #FBFAF7; }
.tile.is-planned h3, .tile.is-planned p { color: #6B7378; }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cat { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cat i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.badge.live { background: #E1F0E6; color: #1E6A3E; }
.badge.vorschau { background: #FBE9D2; color: #8A4C0C; }
.badge.geplant { background: #ECEEF0; color: #555D66; }
.tile h3 { margin: 4px 0 0; font-size: 19px; font-weight: 600; color: var(--navy); }
.tile p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.brand-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.brand-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); padding: 3px 8px; border-radius: 999px; background: var(--chip-bg); }
.brand-tag .dot { width: 8px; height: 8px; }
.start { font-weight: 600; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.empty { padding: 24px; border-radius: 12px; background: #fff; border: 1px dashed var(--line-2); color: var(--muted); }

/* Login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--navy); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.login-card h1 { margin: 0; font-size: 26px; color: var(--navy); }
.login-card p { margin: 0; color: var(--muted); font-size: 14px; }

/* Formulare */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .req { color: var(--amber-dark); }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=password], .field select, .field textarea {
  font: inherit; font-size: 15px; padding: 10px 12px; min-height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--navy); }
.check { flex-direction: row; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; }
.msg { padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.msg.ok { background: #E1F0E6; color: #1E6A3E; }
.msg.err { background: #F8E1E1; color: #8A2323; }
.back { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 14px; }

/* Ergebnisse & Verlauf */
.result-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-top: 18px; max-width: 920px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-head h3 { margin: 0; font-size: 18px; color: var(--navy); }
.result-frame { width: 100%; height: 75vh; min-height: 480px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.badge.fehler { background: #F8E1E1; color: #8A2323; }
.history { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.run-list { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.history .result-card { flex: 999 1 520px; margin-top: 0; }
.run { font: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-height: 44px; color: var(--ink); }
.run:hover { border-color: var(--navy); }
.run[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--amber); }
.run-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.run-sub { font-size: 13px; color: var(--muted); }
.top nav a[aria-current="page"] { font-weight: 600; }

footer { border-top: 1px solid var(--line); background: #fff; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: var(--muted); }

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero .wrap { padding-top: 36px; padding-bottom: 40px; }
}
