/* PLANBAR Lizenzserver — CI: Dark Cocoa #171511, Blood Orange #f3562e, Vanilla #fef7ec */
@font-face {
  font-family: 'Zalando Sans';
  src: url('/assets/ZalandoSans-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Zalando Sans', 'Segoe UI', system-ui, sans-serif;
  background: #fef7ec;
  color: #171511;
  min-height: 100vh;
}
.hidden { display: none !important; }

/* Login */
.login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: #171511;
}
.login-box {
  background: #fef7ec; padding: 40px; width: 420px;
  max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 12px;
}
/* Headline bleibt einzeilig (CI). Damit sie in den Kasten passt, wird sie mit der
   Breite kleiner statt aus dem Kasten zu laufen. */
.login-box h1 {
  font-size: clamp(12px, 3.6vw, 16px); letter-spacing: 0.1em; font-stretch: expanded;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .login-box { padding: 24px; }
  .login-box h1 { font-size: 12.5px; letter-spacing: 0.08em; }
}
.login-box input {
  padding: 10px 12px; border: 1px solid #171511; background: #fff;
  font: inherit;
}
.login-box button {
  padding: 12px; background: #f3562e; color: #fef7ec; border: 0;
  font: inherit; font-weight: 700; letter-spacing: 0.1em; cursor: pointer;
}
.fehler { color: #f3562e; font-size: 13px; min-height: 1em; }
.hinweis { font-size: 13px; opacity: 0.75; }

/* Kopf */
header {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; row-gap: 10px;
  background: #171511; color: #fef7ec; padding: 14px 24px;
}
.marke { font-weight: 700; letter-spacing: 0.12em; font-stretch: expanded; white-space: nowrap; }
/* Als Verwalter kommen zwei Reiter dazu; ohne Umbruch schiebt die Leiste sonst
   die Seite quer (gemessen 20.08.2026). */
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
@media (max-width: 900px) {
  header { gap: 14px; padding: 12px 16px; }
  .marke { font-size: 14px; letter-spacing: 0.08em; }
  nav .tab { padding: 8px 10px; }
}
nav .tab {
  background: transparent; color: #fef7ec; border: 0; padding: 8px 14px;
  font: inherit; cursor: pointer; opacity: 0.7;
}
nav .tab.aktiv { opacity: 1; border-bottom: 2px solid #f3562e; }
.kopf-rechts { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.kopf-rechts button {
  background: transparent; color: #fef7ec; border: 1px solid #fef7ec55;
  padding: 6px 12px; font: inherit; cursor: pointer;
}

/* Inhalt */
main { padding: 28px; max-width: 1200px; margin: 0 auto; }
h2 {
  font-size: 16px; letter-spacing: 0.12em; font-stretch: expanded;
  margin-bottom: 16px; white-space: nowrap;
}
h3 { font-size: 14px; margin-bottom: 8px; }
.zeile { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.zeile input, .zeile select {
  padding: 8px 10px; border: 1px solid #17151155; background: #fff; font: inherit;
  min-width: 160px;
}
.zeile button {
  padding: 8px 16px; background: #f3562e; color: #fef7ec; border: 0;
  font: inherit; font-weight: 600; cursor: pointer;
}
.karte { background: #fff; border: 1px solid #17151122; padding: 18px; margin-bottom: 16px; }
pre {
  background: #171511; color: #fef7ec; padding: 12px; font-size: 12px;
  overflow-x: auto;
}
code { font-size: 13px; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
th {
  text-align: left; padding: 10px 12px; background: #171511; color: #fef7ec;
  font-weight: 600; font-size: 12px; letter-spacing: 0.06em;
}
td { padding: 10px 12px; border-bottom: 1px solid #17151118; }
.leer { text-align: center; opacity: 0.6; padding: 24px; }
.aktionen { white-space: nowrap; }
.aktionen button {
  background: transparent; border: 1px solid #17151144; padding: 4px 10px;
  font: inherit; font-size: 12px; cursor: pointer; margin-left: 4px;
}
.aktionen button:hover { border-color: #f3562e; color: #f3562e; }

/* Status */
.badge {
  display: inline-block; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.badge.ok { background: #1a7f3c22; color: #1a7f3c; }
.badge.warn { background: #f3562e22; color: #b23c1a; }
.badge.stopp { background: #171511; color: #fef7ec; }

/* Kontaktpunkte */
.punkt { display: inline-block; width: 9px; height: 9px; margin-right: 6px; }
.punkt.gruen { background: #1a7f3c; }
.punkt.gelb { background: #d99a1b; }
.punkt.rot { background: #f3562e; }

/* Übersicht: Ampelzeile */
.ampel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.ampel-kachel {
  border: 1px solid #17151122; background: #fff; padding: 18px;
  font: inherit; text-align: left; cursor: pointer;
}
.ampel-kachel .zahl { font-size: 34px; font-weight: 800; line-height: 1; }
.ampel-kachel .text {
  font-size: 11px; letter-spacing: 0.1em; font-stretch: expanded;
  margin-top: 8px; white-space: nowrap;
}
.ampel-kachel.gut .zahl { color: #1a7f3c; }
.ampel-kachel.warn-gelb .zahl { color: #d99a1b; }
.ampel-kachel.warn-orange { border-color: #f3562e; }
.ampel-kachel.warn-orange .zahl { color: #f3562e; }
.ampel-kachel:hover { border-color: #f3562e; }

/* Vorgänge und Meldungen */
h3 {
  font-size: 12px; letter-spacing: 0.1em; font-stretch: expanded;
  margin: 18px 0 10px; white-space: nowrap;
}
.vorgang {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff; border: 1px solid #17151122; padding: 10px 14px;
  margin-bottom: 6px; font-size: 14px;
}

/* Kundenseite */
.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: #f3562e0d; }
button.leise {
  background: transparent; border: 1px solid #17151144; padding: 2px 8px;
  font: inherit; font-size: 12px; cursor: pointer;
}
.lizenz-kopf { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.schluessel { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.laufzeit {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 12px 0; padding: 10px 12px; background: #fef7ec; border: 1px solid #17151122;
}
.laufzeit input[type=date] { padding: 4px 6px; border: 1px solid #17151144; font: inherit; font-size: 12px; }

/* Modulraster mit Schaltern */
.modul-raster {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px; margin-bottom: 14px;
}
.modul-schalter {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border: 1px solid #17151133; background: #fef7ec; cursor: pointer; font-size: 14px;
}
.modul-schalter.an { border-color: #171511; background: #fff; }
.modul-schalter input { accent-color: #f3562e; width: 16px; height: 16px; }
.modul-schalter .modul-name { font-weight: 600; flex: 1; }
.modul-live { font-size: 11px; opacity: 0.7; }
.modul-live.gruen { color: #1a7f3c; opacity: 1; font-weight: 700; }

.lizenz-regeln {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  margin-bottom: 14px; font-size: 14px;
}
.lizenz-regeln label { display: flex; align-items: center; gap: 8px; }
.lizenz-regeln input[type=number] { width: 70px; padding: 4px 6px; border: 1px solid #17151144; font: inherit; }
.schalter-zeile { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.schalter-zeile input { accent-color: #f3562e; width: 16px; height: 16px; }

/* Demo-Links */
.link-zelle { max-width: 260px; }
.link-zelle input.link {
  width: 100%; padding: 4px 6px; border: 1px solid #17151133; font-size: 12px;
  font-family: monospace; background: #fef7ec;
}
.link-zelle button { margin-top: 4px; }
