/* Verwaltung -- Artikel pflegen, Kassen ausgeben, auswerten.
   Wird am Schreibtisch benutzt, nicht am Stand: normale Groessen, aber die
   gleiche Farbwelt wie die Verkaufsansicht. */

:root {
  --gruen: #1f4466;
  --gruen-hell: #2b5c88;
  --grund: #f4f3ef;
  --flaeche: #ffffff;
  --linie: #d9d6cd;
  --text: #1b1a17;
  --leise: #5f5c54;
  --rot: #9b2c1f;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--gruen); }
.leise { color: var(--leise); font-size: 15px; }
.rechts { text-align: right; }
.zurueck { text-decoration: none; font-size: 15px; }

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--gruen);
  color: #fff;
}
.kopf a { color: #fff; }
.kopf a.marke { text-decoration: none; font-weight: 700; }
.kopf .leise { color: #cfe0d9; }
.kopf-rechts { display: flex; align-items: center; gap: 14px; }
.kopf form { margin: 0; }

.huelle { max-width: 900px; margin: 0 auto; padding: 24px 20px 64px; }
.schmal { max-width: 420px; margin: 40px auto; }

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 32px 0 12px; }

button, .knopf-verweis {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
button.gross, .knopf-verweis {
  background: var(--gruen);
  border-color: var(--gruen);
  color: #fff;
}
@media (hover: hover) {
  button.gross:hover, .knopf-verweis:hover { background: var(--gruen-hell); }
  button.flach:hover { background: #ebe9e3; }
}

input {
  font: inherit;
  min-height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
}

.formular { display: grid; gap: 8px; margin: 12px 0; }
.formular label { font-size: 15px; color: var(--leise); }
.formular.reihe {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.formular.reihe button { grid-column: auto; }

.meldung {
  background: #e7efe9;
  border-left: 4px solid var(--gruen);
  padding: 10px 14px;
  border-radius: 6px;
}
.meldung-fehler { background: #f7e7e4; border-left-color: var(--rot); }

.liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.liste a {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}

/* Artikelzeilen: je Zeile ein eigenes Formular. */
.zeilen { display: grid; gap: 8px; }
.zeile {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 100px auto auto;
  gap: 8px;
  align-items: center;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 10px;
  margin: 0;
}
.zeile.inaktiv { opacity: .55; }
.preisfeld { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .zeile .preisfeld { grid-column: 1 / -1; }
}

/* Breite Tabellen scrollen in sich, nicht die ganze Seite. */
.tabellenrahmen { overflow-x: auto; }
.tabelle {
  width: 100%;
  border-collapse: collapse;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
}
.tabelle th, .tabelle td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--linie);
  text-align: left;
}
.tabelle th { font-size: 14px; color: var(--leise); font-weight: 600; }
.tabelle tr:last-child td { border-bottom: none; }
.code {
  font: 600 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  background: #eef2f0;
  padding: 4px 8px;
  border-radius: 6px;
}

.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.kachel {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 16px;
  display: grid;
  gap: 4px;
  min-width: 0;
}
.kachel strong { font-size: 28px; font-variant-numeric: tabular-nums; }
