/* Corporate Identity der Glas- und Gebäudereinigung Philipp Lange GmbH.
   Farben und Schrift nach dem CI-Skill, Stand 23.08.2026. */

:root {
  --blau: #103878;
  --blau-70: #4a6aa0;
  --blau-40: #a0afc9;
  --blau-15: #e3e8f1;
  --anthrazit: #231f20;
  --hellgrau: #f2f4f7;
  --mittelgrau: #8a9099;
  --weiss: #ffffff;
  --rot: #a3242b;
  --gruen: #1f6b47;
  --gelb: #8a6100;

  --schrift: "Lato", Arial, "Helvetica Neue", Helvetica, sans-serif;
  --radius: 10px;
  --seitenleiste: 268px;
}

* {
  box-sizing: border-box;
}

/* Muss vor allen display-Regeln stehen: sonst gewinnt display gegen hidden. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--schrift);
  color: var(--anthrazit);
  background: var(--hellgrau);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

/* --- Anmeldung ---------------------------------------------------------- */

.anmelde-schirm {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--blau) 0%, #0b2954 100%);
}

.anmelde-karte {
  width: min(420px, 100%);
  background: var(--weiss);
  border-radius: 14px;
  padding: 36px 32px 32px;
  box-shadow: 0 18px 48px rgba(16, 56, 120, 0.28);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.anmelde-logo {
  width: 220px;
  max-width: 100%;
  align-self: center;
  margin-bottom: 2px;
}

.claim {
  margin: 0;
  text-align: center;
  color: var(--mittelgrau);
  font-size: 0.86rem;
  letter-spacing: 0.01em;
}

.anmelde-karte h1 {
  margin: 10px 0 6px;
  font-size: 1.12rem;
  font-weight: 900;
  text-align: center;
  color: var(--blau);
}

.anmelde-karte label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--anthrazit);
}

.anmelde-karte input {
  padding: 11px 13px;
  border: 1px solid var(--blau-40);
  border-radius: var(--radius);
  font-weight: 400;
  background: var(--weiss);
}

.anmelde-karte input:focus,
textarea:focus {
  outline: 2px solid var(--blau-70);
  outline-offset: 1px;
  border-color: transparent;
}

.anmelde-karte button[type="submit"] {
  margin-top: 8px;
  padding: 12px;
  background: var(--blau);
  color: var(--weiss);
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}

.anmelde-karte button[type="submit"]:hover {
  background: #0d2f66;
}

.fehler {
  margin: 0;
  color: var(--rot);
  font-size: 0.86rem;
  text-align: center;
}

.einleitung {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: var(--anthrazit);
  background: var(--hellgrau);
  border-left: 3px solid var(--blau);
  border-radius: 0 8px 8px 0;
  padding: 10px 13px;
}

.anmelde-karte select {
  padding: 11px 13px;
  border: 1px solid var(--blau-40);
  border-radius: var(--radius);
  background: var(--weiss);
  font-weight: 400;
}

/* --- Grundgerüst -------------------------------------------------------- */

.programm {
  display: grid;
  grid-template-columns: var(--seitenleiste) 1fr;
  height: 100%;
  overflow: hidden;
}

.seitenleiste {
  background: var(--blau);
  color: var(--weiss);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 14px;
  overflow: hidden;
}

.marke img {
  width: 176px;
  max-width: 100%;
}

.knopf-neu {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  color: var(--weiss);
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.knopf-neu:hover {
  background: rgba(255, 255, 255, 0.22);
}

.bereiche {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bereich-knopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
}

.bereich-knopf:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--weiss);
}

.bereich-knopf.aktiv {
  background: rgba(255, 255, 255, 0.18);
  color: var(--weiss);
  font-weight: 700;
}

.zaehler {
  min-width: 21px;
  padding: 1px 6px;
  border-radius: 11px;
  background: var(--weiss);
  color: var(--blau);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.verlauf-liste {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.verlauf-eintrag {
  padding: 7px 10px;
  border-radius: 7px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verlauf-eintrag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--weiss);
}

.verlauf-eintrag.aktiv {
  background: rgba(255, 255, 255, 0.16);
  color: var(--weiss);
}

.fusszeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
}

.wer {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  overflow: hidden;
}

.wer span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
}

.knopf-schlicht {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  color: var(--weiss);
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}

.knopf-schlicht:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* --- Hauptbereich ------------------------------------------------------- */

.haupt {
  display: flex;
  flex-direction: column;
  /* Beides noetig: ohne min-height waechst der Bereich ueber die Gitterzeile
     hinaus und die ganze Seite scrollt statt nur der Nachrichtenliste. */
  min-width: 0;
  min-height: 0;
  background: var(--hellgrau);
}

.kopf {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  background: var(--weiss);
  border-bottom: 1px solid var(--blau-15);
}

.kopf h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--blau);
  flex: 1;
}

.menue-knopf {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--blau);
}

.zustand {
  font-size: 0.78rem;
  color: var(--mittelgrau);
  white-space: nowrap;
}

.bereich {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.bereich-inhalt {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
}

.hinweis {
  margin: 0 0 16px;
  padding: 11px 14px;
  background: var(--blau-15);
  border-left: 3px solid var(--blau);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: var(--anthrazit);
}

/* --- Nachrichten -------------------------------------------------------- */

.nachrichten {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.begruessung {
  background: var(--weiss);
  border-radius: 12px;
  padding: 26px;
  border: 1px solid var(--blau-15);
}

.begruessung h3 {
  margin: 0 0 6px;
  color: var(--blau);
  font-size: 1.16rem;
  font-weight: 900;
}

.begruessung p {
  margin: 0 0 16px;
  color: var(--anthrazit);
}

.vorschlaege {
  display: grid;
  gap: 8px;
}

.vorschlag {
  text-align: left;
  padding: 10px 13px;
  background: var(--hellgrau);
  border: 1px solid var(--blau-15);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--anthrazit);
}

.vorschlag:hover {
  border-color: var(--blau-40);
  background: var(--blau-15);
}

.nachricht {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nachricht .absender {
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mittelgrau);
}

.nachricht.ich {
  align-items: flex-end;
}

.nachricht.ich .blase {
  background: var(--blau);
  color: var(--weiss);
  border-radius: 12px 12px 3px 12px;
  max-width: 82%;
}

.nachricht.meister .blase {
  background: var(--weiss);
  border: 1px solid var(--blau-15);
  border-radius: 12px 12px 12px 3px;
}

.blase {
  padding: 13px 17px;
  overflow-wrap: anywhere;
}

.blase > :first-child {
  margin-top: 0;
}

.blase > :last-child {
  margin-bottom: 0;
}

.blase h1,
.blase h2,
.blase h3,
.blase h4 {
  color: var(--blau);
  margin: 15px 0 7px;
  font-weight: 900;
  line-height: 1.3;
}

.blase h1 {
  font-size: 1.16rem;
}
.blase h2 {
  font-size: 1.06rem;
}
.blase h3,
.blase h4 {
  font-size: 0.97rem;
}

.blase p {
  margin: 0 0 10px;
}

.blase ul,
.blase ol {
  margin: 0 0 10px;
  padding-left: 21px;
}

.blase li {
  margin-bottom: 3px;
}

.blase code {
  background: var(--hellgrau);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.87em;
}

.nachricht.ich .blase code {
  background: rgba(255, 255, 255, 0.2);
}

.blase pre {
  background: var(--hellgrau);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 10px;
}

.blase pre code {
  background: none;
  padding: 0;
}

.blase table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 12px;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.blase th,
.blase td {
  border: 1px solid var(--blau-15);
  padding: 7px 10px;
  text-align: left;
}

.blase th {
  background: var(--blau-15);
  font-weight: 700;
  white-space: nowrap;
}

.blase blockquote {
  margin: 0 0 12px;
  padding: 10px 15px;
  background: var(--blau-15);
  border-left: 3px solid var(--blau);
  border-radius: 0 8px 8px 0;
}

.blase blockquote p:last-child {
  margin-bottom: 0;
}

.blase hr {
  border: 0;
  border-top: 1px solid var(--blau-15);
  margin: 14px 0;
}

.blase a {
  color: var(--blau);
}

/* Denkspur und Werkzeuge */

.denken {
  border: 1px dashed var(--blau-40);
  border-radius: 9px;
  background: rgba(227, 232, 241, 0.5);
  padding: 9px 13px;
  font-size: 0.85rem;
  color: #4a5568;
}

.denken summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--blau-70);
  font-size: 0.8rem;
  list-style: none;
}

.denken summary::before {
  content: "▸ ";
}

.denken[open] summary::before {
  content: "▾ ";
}

.denken .spur {
  margin-top: 7px;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
}

.werkzeuge {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.werkzeug-marke {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: var(--weiss);
  border: 1px solid var(--blau-40);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--blau);
  white-space: nowrap;
}

.werkzeug-marke.laeuft {
  border-style: dashed;
  color: var(--mittelgrau);
}

.werkzeug-marke.fehler {
  border-color: var(--rot);
  color: var(--rot);
}

.werkzeug-marke.freigabe {
  border-color: var(--gelb);
  color: var(--gelb);
  font-weight: 700;
}

.punkte::after {
  content: "";
  animation: punkte 1.4s steps(4, end) infinite;
}

@keyframes punkte {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}

/* --- Eingabe ------------------------------------------------------------ */

.eingabe {
  flex: none;
  display: flex;
  gap: 9px;
  align-items: flex-end;
  padding: 14px 22px 18px;
  background: var(--weiss);
  border-top: 1px solid var(--blau-15);
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
}

.eingabe textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  padding: 11px 14px;
  border: 1px solid var(--blau-40);
  border-radius: var(--radius);
  max-height: 190px;
  min-height: 44px;
  line-height: 1.45;
  font-family: inherit;
}

.eingabe button {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--blau);
  color: var(--weiss);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.eingabe button:hover:not(:disabled) {
  background: #0d2f66;
}

.eingabe button:disabled {
  background: var(--blau-40);
  cursor: not-allowed;
}

/* --- Karten für Freigaben, Protokoll, Lage ------------------------------ */

.karte {
  background: var(--weiss);
  border: 1px solid var(--blau-15);
  border-radius: 11px;
  padding: 15px 18px;
  margin-bottom: 11px;
}

.karte-kopf {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.karte-titel {
  font-weight: 900;
  color: var(--blau);
}

.karte-zeit {
  font-size: 0.78rem;
  color: var(--mittelgrau);
  margin-left: auto;
}

.marke-stufe {
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--blau-15);
  color: var(--blau);
}

.marke-status {
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.marke-status.ausgefuehrt {
  background: #e4f0ea;
  color: var(--gruen);
}
.marke-status.wartet {
  background: #fbf1d9;
  color: var(--gelb);
}
.marke-status.freigegeben {
  background: #e4f0ea;
  color: var(--gruen);
}
.marke-status.abgelehnt,
.marke-status.fehler {
  background: #f7e3e4;
  color: var(--rot);
}

.karte pre {
  background: var(--hellgrau);
  padding: 10px 13px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  margin: 0 0 10px;
  max-height: 240px;
}

.karte-knoepfe {
  display: flex;
  gap: 8px;
}

.knopf-ja,
.knopf-nein {
  padding: 8px 17px;
  border-radius: 8px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
}

.knopf-ja {
  background: var(--blau);
  color: var(--weiss);
}

.knopf-ja:hover {
  background: #0d2f66;
}

.knopf-nein {
  background: var(--weiss);
  color: var(--rot);
  border: 1px solid var(--rot);
}

.knopf-nein:hover {
  background: #f7e3e4;
}

.leer {
  padding: 34px 20px;
  text-align: center;
  color: var(--mittelgrau);
}

.lage-knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.knopf-lage {
  padding: 9px 17px;
  background: var(--weiss);
  border: 1px solid var(--blau-40);
  border-radius: var(--radius);
  color: var(--blau);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.88rem;
}

.knopf-lage:hover:not(:disabled) {
  background: var(--blau-15);
}

.knopf-lage:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.lage-strom {
  background: var(--weiss);
  border: 1px solid var(--blau-15);
  border-radius: 11px;
  padding: 16px 19px;
  margin-bottom: 16px;
}

/* --- Handy und Tablet --------------------------------------------------- */

@media (max-width: 860px) {
  .programm {
    grid-template-columns: 1fr;
    height: 100dvh;
  }

  .seitenleiste {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  }

  .seitenleiste.offen {
    transform: translateX(0);
  }

  .menue-knopf {
    display: block;
  }

  .nachrichten,
  .bereich-inhalt,
  .eingabe {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nachricht.ich .blase {
    max-width: 92%;
  }
}

/* --- Zwei-Faktor-Anmeldung ---------------------------------------------- */

.code-eingabe {
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.klein {
  margin: 0;
  font-size: 0.8rem;
  color: var(--mittelgrau);
  text-align: center;
}

.knopf-text {
  background: none;
  border: 0;
  color: var(--blau-70);
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}

.knopf-text:hover {
  color: var(--blau);
}

.qr-feld {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin: 14px 0;
}

.qr-feld svg {
  width: 220px;
  height: 220px;
  flex: none;
  border: 1px solid var(--blau-15);
  border-radius: 8px;
  background: var(--weiss);
  padding: 8px;
}

.qr-anleitung {
  flex: 1;
  min-width: 240px;
}

.qr-anleitung ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.qr-anleitung li {
  margin-bottom: 6px;
}

.geheimnis {
  font-family: "Consolas", "Menlo", monospace;
  background: var(--hellgrau);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  word-break: break-all;
  display: inline-block;
}

.codeliste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.codeliste span {
  font-family: "Consolas", "Menlo", monospace;
  background: var(--hellgrau);
  border: 1px solid var(--blau-15);
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

.warnung {
  margin: 0 0 14px;
  padding: 12px 15px;
  background: #fbf1d9;
  border-left: 3px solid var(--gelb);
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.stand-aktiv,
.stand-aus {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.stand-aktiv {
  background: #e4f0ea;
  color: var(--gruen);
}

.stand-aus {
  background: #f7e3e4;
  color: var(--rot);
}

.code-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 260px;
  font-weight: 700;
  font-size: 0.84rem;
}

.code-label .code-eingabe {
  padding: 11px 13px;
  border: 1px solid var(--blau-40);
  border-radius: var(--radius);
  background: var(--weiss);
  font-weight: 400;
}

.code-eingabe.code-klein {
  font-size: 1.25rem !important;
}
