/* Mitarbeiter-App, mobile-first. Systemschrift, keine externen Ressourcen. */
/* --primaer und --primaer-dunkel sind neutrale Vorgaben. Eine Instanz kann sie
   ueber APP_MARKEN_FARBE / APP_MARKEN_FARBE_DUNKEL setzen; der Seitenkopf ueberschreibt
   die Werte dann als CSS-Variablen. */
:root {
  --grund: #0f172a;
  --flaeche: #ffffff;
  --hintergrund: #f1f5f9;
  --rand: #d8dee9;
  --text: #1e293b;
  --gedaempft: #64748b;
  --primaer: #1d4ed8;
  --primaer-dunkel: #1e40af;
  --fehler: #b91c1c;
  --fehler-flaeche: #fee2e2;
  --ok: #15803d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--hintergrund);
  line-height: 1.5;
}
a { color: var(--primaer); }

.kopf { background: var(--grund); color: #fff; }
.kopf-innen {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.marke { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; margin-right: auto; }
.menue-schalter {
  background: transparent; color: #fff; border: 1px solid #334155;
  border-radius: 6px; font-size: 1.2rem; padding: 0.1rem 0.6rem; cursor: pointer;
}
.haupt-nav { display: none; width: 100%; flex-direction: column; gap: 0.25rem; padding-top: 0.5rem; }
.haupt-nav.offen { display: flex; }
.haupt-nav a { color: #e2e8f0; text-decoration: none; padding: 0.5rem 0; }
.haupt-nav a:hover { color: #fff; }
.abmelden { margin: 0; }
.abmelden button {
  background: transparent; color: #e2e8f0; border: 1px solid #334155;
  border-radius: 6px; padding: 0.4rem 0.8rem; cursor: pointer;
}

@media (min-width: 640px) {
  .menue-schalter { display: none; }
  .haupt-nav { display: flex; flex-direction: row; align-items: center; width: auto; gap: 1rem; padding-top: 0; }
}

.inhalt { max-width: 960px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
h1 { font-size: 1.5rem; margin: 0.2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 0.6rem; }

.karte {
  background: var(--flaeche); border: 1px solid var(--rand);
  border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.karte-schmal { max-width: 420px; margin: 2rem auto; }

label { display: block; font-weight: 600; margin: 0.8rem 0 0.3rem; }
input, select {
  width: 100%; padding: 0.7rem 0.75rem; font-size: 1rem;
  border: 1px solid var(--rand); border-radius: 8px; background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--primaer); border-color: var(--primaer); }

.knopf-primaer, .knopf-sekundaer {
  display: inline-block; margin-top: 1rem; padding: 0.7rem 1.1rem;
  font-size: 1rem; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.knopf-primaer { background: var(--primaer); color: #fff; }
.knopf-primaer:hover { background: var(--primaer-dunkel); }
.knopf-sekundaer { background: #fff; color: var(--primaer); border-color: var(--primaer); }

.hinweis-fehler {
  background: var(--fehler-flaeche); color: var(--fehler);
  border: 1px solid #fca5a5; border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0.5rem 0;
}
.feinschrift { color: var(--gedaempft); font-size: 0.85rem; margin-top: 1rem; }
.begruessung { color: var(--gedaempft); }
.leer { color: var(--gedaempft); font-style: italic; }

.kacheln { display: grid; grid-template-columns: 1fr; gap: 0.8rem; margin: 1rem 0; }
@media (min-width: 560px) { .kacheln { grid-template-columns: repeat(3, 1fr); } }
.kachel {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  padding: 1rem; text-decoration: none; color: var(--text); text-align: center;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.kachel:hover { border-color: var(--primaer); }
.kachel-zahl { font-size: 2rem; font-weight: 700; color: var(--primaer); }
.kachel-text { color: var(--gedaempft); font-size: 0.9rem; }

.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 0.6rem 0; border-bottom: 1px solid var(--rand); }
.liste-detail { color: var(--gedaempft); display: block; font-size: 0.9rem; }
.verlauf .zeit { color: var(--gedaempft); font-size: 0.85rem; }

.tabelle-huelle { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; background: var(--flaeche); }
.tabelle th, .tabelle td { text-align: left; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle thead th { background: #e2e8f0; font-size: 0.85rem; }

.status {
  display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; background: #e2e8f0; color: #334155;
}
.status-Lead { background: #dbeafe; color: #1e40af; }
.status-Ausgefuehrt { background: #fef3c7; color: #92400e; }
.status-Abgeschlossen { background: #dcfce7; color: var(--ok); }

.platzhalter-hinweis {
  margin-top: 1.5rem; padding: 0.8rem 1rem; border: 1px dashed var(--rand);
  border-radius: 8px; color: var(--gedaempft);
}
/* Beleg-Editor und Abrechnen-Strecke */
textarea {
  width: 100%; padding: 0.7rem 0.75rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--rand); border-radius: 8px; background: #fff;
}
textarea:focus { outline: 2px solid var(--primaer); border-color: var(--primaer); }

.position {
  border: 1px solid var(--rand); border-radius: 8px;
  padding: 0.6rem 0.9rem 1rem; margin: 0 0 1rem;
}
.position legend { font-weight: 600; padding: 0 0.3rem; }
.feldreihe { display: grid; grid-template-columns: 1fr; gap: 0 0.8rem; }
@media (min-width: 640px) { .feldreihe { grid-template-columns: repeat(3, 1fr); } }

.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.knopfreihe form { margin: 0; }
.knopfreihe .knopf-primaer, .knopfreihe .knopf-sekundaer { margin-top: 0.6rem; text-decoration: none; }
.knopf-sekundaer.klein, .knopf-primaer.klein {
  padding: 0.3rem 0.6rem; font-size: 0.85rem; margin-top: 0.3rem;
}
.inline-form { display: inline-block; margin: 0 0.4rem 0 0; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.summen th { width: 12rem; }
.summen td { font-variant-numeric: tabular-nums; }

.pruefkasten { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; }
.pruefkasten input { width: auto; margin-top: 0.25rem; }

.meldung { border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0.5rem 0 1rem; border: 1px solid; }
.meldung-erfolg { background: #dcfce7; color: #14532d; border-color: #86efac; }
.meldung-hinweis { background: #fef3c7; color: #78350f; border-color: #fcd34d; }
.meldung-fehler { background: var(--fehler-flaeche); color: var(--fehler); border-color: #fca5a5; }

.status-AngebotErzeugt { background: #e0e7ff; color: #3730a3; }
.status-AngebotGesendet { background: #e0f2fe; color: #075985; }
.status-Beauftragt { background: #ede9fe; color: #5b21b6; }
.status-RechnungErzeugt { background: #fae8ff; color: #86198f; }

.zurueck { margin: 0 0 1rem; }
.fuss { text-align: center; color: var(--gedaempft); padding: 1.5rem 1rem; font-size: 0.85rem; }
