﻿:root {
    --grund: #ffffff; --flaeche: #fff; --text: #1f2933; --leise: #5f6b7a; --linie: #e3d6d6;
    --akzent: #8b1a1a; --akzent-dunkel: #6b1212; --akzent-hell: #f7eaea; --akzent-mittel: #efd6d6;
    --ok: #1e7b3a; --fehler: #b42318; --warn: #9a6700;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--grund); }
a { color: var(--akzent); }
h1 { font-size: 1.4em; margin: 0 0 .6em; }
h2 { font-size: 1.15em; margin: 1.2em 0 .5em; }
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 1em; padding: .6em 16px; background: var(--akzent); color: #fff; }
.kopf a { color: #fff; text-decoration: none; padding: .3em .55em; border-radius: 4px; }
.kopf a:hover { background: rgba(255,255,255,.15); }
.kopf nav { display: flex; flex-wrap: wrap; gap: .2em; flex: 1; }
.marke { font-weight: 600; font-size: 1.1em; }
/* Untermenü (z. B. Faktura): öffnet bei Maus, Tastatur-Fokus und Antippen */
.menue { position: relative; display: inline-block; }
.menuetitel { display: inline-block; padding: .3em .55em; border-radius: 4px; cursor: pointer; }
.menue:hover .menuetitel, .menue:focus-within .menuetitel { background: rgba(255,255,255,.15); }
.untermenue { display: none; position: absolute; left: 0; top: 100%; z-index: 10; min-width: 180px; padding: 4px 0;
    background: var(--akzent-dunkel); border-radius: 0 0 4px 4px; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.untermenue a { display: block; border-radius: 0; padding: .45em .9em; }
.menue:hover .untermenue, .menue:focus-within .untermenue { display: block; }
.wer { display: flex; align-items: center; gap: .6em; }
.wer select { max-width: 220px; }
.inhalt { padding: 16px; max-width: 1300px; margin: 0 auto; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: 14px 16px; margin-bottom: 14px; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
/* feste vier Spalten (z. B. Stammdaten), schmal zwei bzw. eine */
.raster4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 16px; }
.raster4 .breit2 { grid-column: span 2; }
@media (max-width: 900px) { .raster4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 500px) { .raster4 { grid-template-columns: 1fr; } .raster4 .breit2 { grid-column: auto; } }
.feld label { display: block; font-size: .85em; color: var(--leise); margin-bottom: 2px; }
.feld input[type=text], .feld input[type=password], .feld select, .feld textarea { width: 100%; }
input[type=text], input[type=password], select, textarea { font: inherit; padding: 5px 7px; border: 1px solid var(--linie); border-radius: 4px; background: #fff; }
input[disabled], textarea[disabled], select[disabled], input[readonly] { background: #eef0f3; color: #444; }
textarea { min-height: 70px; }
.knopf, input[type=submit], button { font: inherit; padding: 5px 12px; border: 1px solid var(--akzent); background: var(--akzent); color: #fff; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block; }
.knopf:hover, input[type=submit]:hover { background: var(--akzent-dunkel); }
.knopf.zweit, input.zweit { background: #fff; color: var(--akzent); }
.knopf.gefahr, input.gefahr { background: var(--fehler); border-color: var(--fehler); color: #fff; }
.leiste { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.buchstaben a, .buchstaben input { min-width: 32px; text-align: center; padding: 3px 6px; }
.meldung { display: block; padding: 8px 12px; border-radius: 4px; margin: 8px 0; }
.meldung.ok { background: #e7f5ec; color: var(--ok); }
.meldung.fehler { background: #fdecea; color: var(--fehler); }
.hinweis { color: var(--leise); font-size: .9em; }
.warn { color: var(--warn); }
/* Ablagefeld für Dateien (Ziehen & Ablegen) */
.ablage { display: block; margin: 10px 0; padding: 28px 16px; text-align: center; color: var(--leise); cursor: pointer;
    border: 2px dashed var(--linie); border-radius: 6px; background: #fafafa; }
.ablage:hover, .ablage.ueber { border-color: var(--akzent); background: var(--akzent-hell); color: var(--text); }
.ablage.laeuft { border-style: solid; border-color: var(--akzent); cursor: progress; }
.ablage input[type=file] { display: none; }
table.liste { border-collapse: collapse; width: 100%; background: #fff; }
table.liste th, table.liste td { border-bottom: 1px solid var(--linie); padding: 5px 8px; text-align: left; vertical-align: top; }
table.liste th { background: var(--akzent-hell); font-weight: 600; }
table.liste tr.gewaehlt td { background: var(--akzent-mittel); }
table.liste td.zahl, table.liste th.zahl { text-align: right; white-space: nowrap; }
table.liste tr.summe td { font-weight: 600; border-top: 2px solid var(--text); }
.tabellen { overflow-x: auto; }
.reiter { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--akzent); margin: 12px 0 0; }
.reiter a { padding: 6px 12px; text-decoration: none; background: var(--akzent-hell); border-radius: 4px 4px 0 0; color: var(--text); }
.reiter a:hover { background: var(--akzent-mittel); }
.reiter a.aktiv { background: var(--akzent); color: #fff; }
.reiterinhalt { background: #fff; border: 1px solid var(--linie); border-top: 0; padding: 14px 16px; margin-bottom: 14px; }
.zweispaltig { display: grid; grid-template-columns: minmax(260px, 1fr) 2.2fr; gap: 14px; }
.zweispaltig.gleich { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 900px) { .zweispaltig, .zweispaltig.gleich { grid-template-columns: 1fr; } }
/* kompakte Liste: keine Zeilenumbrüche, Aktionen als kleine Schalter */
table.liste.kompakt td { white-space: nowrap; }
table.liste .status { display: inline-block; padding: 1px 8px; border-radius: 10px; text-decoration: none; font-size: .9em;
    background: #e7f5ec; color: var(--ok); border: 1px solid #b9dfc6; }
table.liste .status.passiv { background: #eef0f3; color: var(--leise); border-color: var(--linie); }
table.liste .entf { text-decoration: none; color: var(--leise); padding: 0 4px; }
table.liste .entf:hover { color: var(--fehler); }
.login { max-width: 380px; margin: 8vh auto; }
.pre { white-space: pre-wrap; }
.druckkopf { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--text); margin-bottom: 10px; }
@media print {
    .noprint, .kopf { display: none !important; }
    body { background: #fff; font-size: 11pt; }
    .inhalt { padding: 0; max-width: none; }
    .karte { border: 0; padding: 0; }
    table.liste th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .seitenumbruch { page-break-after: always; }
}
