/* YTTP Versandautomatisierung, Oberflaeche.
   Designsprache: Klarheit, Reduktion, geometrische Boxen, viel Weissraum.
   Schrift Brut Grotesque mit Fallback. Keine runden Ecken, keine Emojis. */

:root {
  --off-white: #F3F2EE;
  --hellgrau: #DBDBDB;
  --taupe: #827B6D;
  --anthrazit: #1C1C1C;
  --sage: #9CA095;
  --weiss: #FFFFFF;
  --signal-rot: #A6473C;   /* nur als Funktionsfarbe fuer Stoerungen */
  --raster: 8px;
  --schrift: "Brut Grotesque", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: hidden;
  padding: 0;
  background: var(--off-white);
  color: var(--anthrazit);
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--anthrazit); text-decoration: none; border-bottom: 1px solid var(--hellgrau); }
a:hover { border-bottom-color: var(--anthrazit); }

.rahmen { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }

/* --- Seitenleiste --- */
.seitenleiste {
  background: var(--anthrazit);
  color: var(--off-white);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.wortmarke {
  font-size: 13px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.9;
}
.wortmarke span { display: block; color: var(--taupe); font-weight: 400; }
.navigation { display: flex; flex-direction: column; gap: 2px; }
.navigation a {
  color: var(--hellgrau);
  border: 0;
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.navigation a:hover { background: rgba(243,242,238,0.08); color: var(--weiss); }
.navigation a.aktiv { background: var(--off-white); color: var(--anthrazit); font-weight: 600; }
.seitenleiste form { margin-top: auto; }
.seitenleiste .fuss { font-size: 11px; color: var(--taupe); letter-spacing: 0.08em; }

/* --- Inhalt --- */
.inhalt { padding: 40px 48px 72px; max-width: 1180px; min-width: 0; }
.kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
h2 {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--taupe);
  margin: 40px 0 12px;
  font-weight: 600;
}
h3 { font-size: 17px; margin: 0; font-weight: 600; }
p.hinweis { color: var(--taupe); margin: 4px 0 0; font-size: 13px; }

/* --- Statusleiste --- */
.statusleiste { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(188px, 100%), 1fr)); gap: 1px; background: var(--hellgrau); border: 1px solid var(--hellgrau); }
.statuskarte { background: var(--weiss); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.statuskarte .detail { overflow-wrap: anywhere; }
.statuskarte .etikett { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--taupe); }
.statuskarte .wert { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.statuskarte .detail { font-size: 12px; color: var(--taupe); word-break: break-word; }

.punkt { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; }
.punkt.gruen { background: var(--sage); }
.punkt.gelb { background: var(--taupe); }
.punkt.rot { background: var(--signal-rot); }

/* --- Bestellkarten --- */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.karte { background: var(--weiss); border: 1px solid var(--hellgrau); padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.karte.wartet { border-left: 3px solid var(--anthrazit); }
.kartenkopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nummer { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.zeitstempel { font-size: 12px; color: var(--taupe); }
.empfaenger { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--taupe); }

.posten { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hellgrau); }
.posten li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hellgrau); align-items: baseline; }
.posten .menge { font-weight: 600; min-width: 34px; }
.posten .bezeichnung { flex: 1; }
.posten .regal { font-size: 12px; color: var(--taupe); letter-spacing: 0.06em; text-transform: uppercase; }
.posten li.unbekannt .bezeichnung { color: var(--signal-rot); }

.gewichtszeile { display: flex; align-items: baseline; justify-content: space-between; }
.gewicht { font-size: 22px; font-weight: 600; }

.adressblock { border: 1px solid var(--hellgrau); background: var(--off-white); padding: 16px; }
.adressblock .etikett { display: block; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--taupe); margin-bottom: 8px; }
.adressblock address { font-style: normal; line-height: 1.6; margin: 0 0 8px; }

.gewichtsfeld { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.gewichtsfeld .eingabe { display: flex; align-items: baseline; gap: 8px; }
.gewichtsfeld input {
  width: 110px;
  font-size: 22px;
  font-weight: 600;
  text-align: right;
  padding: 6px 10px;
  background: var(--weiss);
  border: 1px solid var(--hellgrau);
  font-variant-numeric: tabular-nums;
}
.gewichtsfeld input:invalid { border-color: var(--signal-rot); background: #fdf6f5; }
.gewichtsfeld .einheit { font-size: 15px; color: var(--taupe); }
.warnzeile {
  border-left: 3px solid var(--taupe);
  background: var(--off-white);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--anthrazit);
}

.wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wahl label {
  position: relative;
  background: var(--weiss);
  border: 1px solid var(--anthrazit);
  color: var(--anthrazit);
  padding: 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.12s ease, color 0.12s ease;
}
/* Der Knopf zum Auswaehlen ist die ganze Flaeche, nicht ein kleiner Kreis. */
.wahl label input { position: absolute; opacity: 0; pointer-events: none; }
.wahl label .titel { font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }
.wahl label .zusatz { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--taupe); }
.wahl label:hover { background: var(--off-white); }
.wahl label.empfohlen { background: var(--anthrazit); color: var(--off-white); }
.wahl label.empfohlen .zusatz { color: var(--sage); }
.wahl label:has(input:checked) { background: var(--anthrazit); color: var(--off-white); }
.wahl label:has(input:checked) .zusatz { color: var(--sage); }
.wahl label:has(input:focus-visible) { outline: 2px solid var(--sage); outline-offset: 2px; }
.wahl label.nicht-moeglich,
.wahl label:has(input:disabled) {
  border-color: var(--hellgrau);
  color: var(--hellgrau);
  background: var(--weiss);
  cursor: not-allowed;
}
.wahl label.nicht-moeglich .zusatz { color: var(--hellgrau); }

.kartenfuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--taupe); }
.schalterzeile { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--taupe); }

/* --- Tabellen --- */
table { width: 100%; border-collapse: collapse; background: var(--weiss); border: 1px solid var(--hellgrau); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--hellgrau); vertical-align: top; }
th { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--taupe); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
td.zahl { font-variant-numeric: tabular-nums; }
.tabellenrahmen { overflow-x: auto; }

.marke { display: inline-block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--hellgrau); color: var(--taupe); }
.marke.gut { border-color: var(--sage); color: #6c7266; }
.marke.warnung { border-color: var(--taupe); color: var(--taupe); }
.marke.stoerung { border-color: var(--signal-rot); color: var(--signal-rot); }

/* --- Knoepfe und Formulare --- */
.knopf, button.knopf {
  font-family: var(--schrift);
  display: inline-block;
  background: var(--anthrazit);
  color: var(--off-white);
  border: 1px solid var(--anthrazit);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.knopf:hover { background: #000; border-bottom-color: #000; }
.knopf.leer { background: transparent; color: var(--anthrazit); }
.knopf.leer:hover { background: var(--anthrazit); color: var(--off-white); }
.knopf.klein { padding: 6px 12px; font-size: 11px; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

form.einstellungen { display: flex; flex-direction: column; gap: 36px; }
fieldset { border: 1px solid var(--hellgrau); background: var(--weiss); padding: 24px; margin: 0; }
legend { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--anthrazit); font-weight: 600; padding: 0 8px; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
label.feld { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
label.feld .name { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--taupe); }
label.feld .fuss { font-size: 12px; color: var(--taupe); }
input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font-family: var(--schrift);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--hellgrau);
  background: var(--off-white);
  color: var(--anthrazit);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: -2px; }
label.schalter { flex-direction: row; align-items: center; gap: 10px; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--anthrazit); }

/* --- Meldungen --- */
.meldungen { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.meldung { padding: 12px 16px; border: 1px solid var(--hellgrau); background: var(--weiss); font-size: 14px; }
.meldung.erfolg { border-left: 3px solid var(--sage); }
.meldung.fehler { border-left: 3px solid var(--signal-rot); }
.meldung.info { border-left: 3px solid var(--taupe); }
.meldung.still { color: var(--taupe); }

.warnzeile.stoerzeile { border-left-color: var(--signal-rot); }

.neuhinweis {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--anthrazit);
  color: var(--off-white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  box-shadow: 0 2px 12px rgba(28,28,28,0.18);
  z-index: 20;
}
.neuhinweis .knopf { background: var(--off-white); color: var(--anthrazit); border-color: var(--off-white); }
.neuhinweis .knopf:hover { background: var(--weiss); }

.leer-hinweis { background: var(--weiss); border: 1px solid var(--hellgrau); padding: 48px; text-align: center; color: var(--taupe); }
.leer-hinweis .gross { font-size: 17px; color: var(--anthrazit); margin-bottom: 6px; }

.zeilen { display: flex; flex-direction: column; gap: 8px; }
.trenner { height: 1px; background: var(--hellgrau); margin: 32px 0; }
.klein { font-size: 12px; color: var(--taupe); }
.mono { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; }

@media (max-width: 900px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste {
    position: sticky;
    top: 0;
    z-index: 10;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 12px 16px;
  }
  .seitenleiste form { margin: 0; }
  .seitenleiste .fuss { width: 100%; order: 3; }
  .wortmarke { letter-spacing: 0.2em; font-size: 12px; line-height: 1.2; }
  .wortmarke span { display: inline; }
  .navigation { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .navigation a { padding: 8px 10px; font-size: 12px; }
  .inhalt { padding: 20px 16px 56px; }
  .karten { grid-template-columns: minmax(0, 1fr); }
  .kopf { flex-direction: column; align-items: flex-start; gap: 12px; }
  h1 { font-size: 26px; }
}

/* Handy: alles einspaltig, groessere Ziele fuer den Finger */
@media (max-width: 620px) {
  .statusleiste { grid-template-columns: minmax(0, 1fr); }
  .felder { grid-template-columns: minmax(0, 1fr); }
  .karte { padding: 18px 16px; }
  .nummer { font-size: 28px; }
  .wahl { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wahl button { padding: 18px 16px; }
  .posten li { flex-wrap: wrap; gap: 4px 12px; }
  .posten .regal { width: 100%; }
  .gewichtsfeld { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gewichtsfeld input { width: 140px; font-size: 26px; padding: 10px 12px; }
  .knopf, button.knopf { padding: 12px 18px; }
  .knopfzeile { width: 100%; }
  .knopfzeile form { flex: 1 1 auto; }
  .knopfzeile form .knopf { width: 100%; }
  .neuhinweis { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  table { font-size: 13px; }
  th, td { padding: 10px 12px; }

  /* Tabelle als Stapel, seitliches Scrollen ist am Telefon unbrauchbar */
  table.stapelbar, table.stapelbar tbody, table.stapelbar tr, table.stapelbar td { display: block; width: 100%; }
  table.stapelbar thead { display: none; }
  table.stapelbar tr { border-bottom: 1px solid var(--hellgrau); padding: 12px 4px; }
  table.stapelbar tr:last-child { border-bottom: 0; }
  table.stapelbar td { border: 0; padding: 3px 12px; display: flex; gap: 12px; align-items: baseline; }
  table.stapelbar td:empty { display: none; }
  table.stapelbar td::before {
    content: attr(data-spalte);
    flex: 0 0 40%;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--taupe);
  }
  table.stapelbar td[data-spalte=""]::before { content: none; }
  table.stapelbar td[data-spalte=""] { padding-top: 10px; }
}
