/* Torqo ERP – schlichte Büro-Ansicht, sauber auch auf Tablet */
:root {
  --text: #1d2327; --grau: #6b7280; --linie: #d9dde3; --flaeche: #f5f6f8;
  --akzent: #b4231c; --akzent-dunkel: #8e1b16; --ok: #1e7b34; --warnung: #9a6700; --fehler: #b42318;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--flaeche); font-size: 16px; line-height: 1.45; }
a { color: var(--akzent); }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: .6rem 1.2rem; background: #fff; border-bottom: 1px solid var(--linie); }
.kopf .marke { font-weight: 700; color: var(--text); text-decoration: none; }
.kopf nav { display: flex; gap: 1rem; flex: 1; flex-wrap: wrap; }
.kopf nav a { text-decoration: none; padding: .4rem .2rem; }
.kopf .benutzer { display: flex; gap: .6rem; align-items: center; color: var(--grau); }
.inhalt { max-width: 1200px; margin: 0 auto; padding: 1.2rem; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
.karte { background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.zeile { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.kennzahl strong { display: block; font-size: 1.8rem; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .85rem; color: var(--grau); font-weight: 600; }
tr:hover td { background: #fafbfc; }
dl.daten { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
dl.daten dt { color: var(--grau); }
dl.daten dd { margin: 0; white-space: pre-line; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem 1rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; }
.feld.breit { grid-column: 1 / -1; }
.feld.checkbox { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: .5rem; }
.feld small { color: var(--grau); }
.feld .fehlertext, .fehler { color: var(--fehler); }
.hat-fehler input, .hat-fehler select { border-color: var(--fehler); }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--linie); border-radius: 6px; background: #fff; min-height: 2.5rem; width: 100%; }
input[type=checkbox] { width: 1.2rem; min-height: 1.2rem; }
button, .knopf { display: inline-block; font: inherit; padding: .55rem 1rem; border-radius: 6px; border: 1px solid var(--akzent); background: var(--akzent); color: #fff; cursor: pointer; text-decoration: none; min-height: 2.5rem; }
button:hover, .knopf:hover { background: var(--akzent-dunkel); }
.knopf.zweit, button.zweit { background: #fff; color: var(--akzent); }
button.link { background: none; border: none; color: var(--akzent); padding: 0; min-height: 0; text-decoration: underline; }
.aktionen { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.suche { max-width: 420px; margin: 0 0 14px; }
.meldungen { list-style: none; padding: 0; margin: 0 0 1rem; }
.meldung { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .4rem; background: #eef6ff; }
.meldung.success { background: #e8f5ec; color: var(--ok); }
.meldung.warning, .hinweis { background: #fff6dd; color: var(--warnung); }
.meldung.error { background: #fdecea; color: var(--fehler); }
.hinweis { padding: .6rem .9rem; border-radius: 6px; margin-bottom: .6rem; }
.etikett { display: inline-block; font-size: .8rem; padding: .05rem .45rem; border-radius: 99px; background: var(--flaeche); border: 1px solid var(--linie); }
.grau { color: var(--grau); }
.etikett.gesperrt { background: #fdecea; color: var(--fehler); border-color: #f5c2bd; }
.knopfzeile { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.knopfzeile form { margin: 0; }
.knopf.klein, button.klein { padding: .3rem .7rem; min-height: 2.1rem; font-size: .9rem; }
.login { max-width: 380px; margin: 8vh auto; }
@media (max-width: 700px) {
  .inhalt { padding: .8rem; }
  .tabelle-breit th:nth-child(n+4), .tabelle-breit td:nth-child(n+4) { display: none; }
}
/* M1 Marke Torqo: Werkstatt-Logo gross links, „Torqo“ klein in der Fusszeile */
.kopf .marke { display: flex; align-items: center; }
.kopf .werkstatt-logo { display: block; height: 44px; width: auto; max-width: 240px; object-fit: contain; object-position: left center; }
.kopf .werkstatt-name { font-size: 1.15rem; }
.logo-hinweis { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; padding: .45rem 1.2rem; background: #fff6dd; color: var(--warnung); border-bottom: 1px solid #f2dc9b; font-size: .9rem; }
.logo-hinweis form { margin: 0 0 0 auto; }
.logo-hinweis button.link { color: var(--warnung); }
.fuss-torqo { display: flex; justify-content: center; align-items: center; gap: .35rem; padding: 1.2rem; font-size: .78rem; color: var(--grau); }
.fuss-torqo a { color: inherit; }
.torqo-login .torqo-logo { display: block; height: 40px; width: auto; margin: .2rem 0 1rem; }
@media (max-width: 700px) { .kopf .marke { flex-basis: 100%; } .kopf nav { gap: .2rem 1rem; } }
/* Auftrag SI: Hinweis-Band „Sperre angekündigt“, 2-Faktor, Protokoll */
.sperre-hinweis { padding: .55rem 1.2rem; background: #fde8e8; color: #9b1c1c; border-bottom: 1px solid #f5b5b5; font-size: .95rem; }
.qr { background: #fff; display: inline-block; padding: .5rem; border: 1px solid var(--linie); border-radius: 8px; }
.qr svg { display: block; width: 220px; height: 220px; }
.schluessel { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .05em; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 10rem)); gap: .4rem 1.5rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; padding: 0; list-style: none; }
.filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin-bottom: 1rem; }
.filter label { display: flex; flex-direction: column; font-size: .85rem; color: var(--grau); }
.filter input, .filter select { width: auto; min-width: 10rem; }
.seiten { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }
.aenderungen { margin: .3rem 0 0; padding-left: 1rem; font-size: .85rem; color: var(--grau); }
@media print { .logo-hinweis, .sperre-hinweis, .fuss-torqo { display: none !important; } }
/* Auftrag LK: Suchfeld mit Filter (Archivierte zeigen), Archiv-Hinweis, Löschen-Knopf */
.suche.zeile { max-width: none; justify-content: flex-start; gap: .6rem 1rem; }
.suche.zeile input[type=search] { flex: 1 1 260px; max-width: 420px; }
.suche.zeile select { width: auto; }
.filter-haken { display: inline-flex; align-items: center; gap: .4rem; color: var(--grau); white-space: nowrap; }
.archiv-hinweis { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.archiv-hinweis form { margin: 0; }
.suche-breit { margin: 0 0 14px; }
