/* BBI-Webtool – lokales Stylesheet (keine externen Ressourcen). */
:root {
  --fg: #1c2733;
  --muted: #5b6b7b;
  --bg: #f4f6f8;
  --flaeche: #ffffff;
  --rahmen: #d9e0e7;
  --akzent: #1f5c8c;
  --akzent-dunkel: #16435f;
  --fehler: #b00020;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--akzent); }

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--flaeche);
  border-bottom: 1px solid var(--rahmen);
}
.marke { font-weight: 700; font-size: 1.1rem; text-decoration: none; color: var(--fg); }
.hauptnav { display: flex; gap: 1rem; }
.hauptnav a { text-decoration: none; }
.abmelden { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.abmelden .user { color: var(--muted); font-size: 0.9rem; }

.inhalt { max-width: 880px; margin: 1.5rem auto; padding: 0 1.25rem; }

.kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
h1 { font-size: 1.5rem; margin: 0.2rem 0 1rem; }
h2 { font-size: 1.15rem; margin-top: 1.6rem; }

table.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); border: 1px solid var(--rahmen); }
table.liste th, table.liste td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rahmen); }
table.liste th { background: #eef2f6; font-weight: 600; }
table.liste tr:last-child td { border-bottom: 0; }

dl.stammdaten { display: grid; grid-template-columns: 220px 1fr; gap: 0.4rem 1rem; background: var(--flaeche); border: 1px solid var(--rahmen); padding: 1rem 1.25rem; }
dl.stammdaten dt { color: var(--muted); }
dl.stammdaten dd { margin: 0; }

.btn, button, .btn-sek {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--akzent);
  background: var(--akzent);
  color: #fff;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.btn-sek { background: transparent; color: var(--akzent); }
button:hover, .btn:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }

.formular { display: flex; flex-direction: column; gap: 0.8rem; max-width: 460px; background: var(--flaeche); border: 1px solid var(--rahmen); padding: 1.25rem; }
.formular label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9rem; color: var(--muted); }
.formular input, .formular select { padding: 0.45rem 0.55rem; border: 1px solid var(--rahmen); border-radius: 5px; font: inherit; color: var(--fg); }
.aktionen { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }

.login-box { max-width: 360px; margin: 3rem auto; background: var(--flaeche); border: 1px solid var(--rahmen); padding: 1.5rem; border-radius: 8px; }
.fehlermeldung { color: var(--fehler); font-weight: 600; }
.hinweis { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.meldung { margin-top: 1rem; padding: 0.6rem 0.9rem; border: 1px solid #2e7d32; border-radius: 6px; background: #e8f5e9; color: #1b5e20; font-size: 0.92rem; }
.steuer-box { background: var(--flaeche); border: 1px solid var(--rahmen); border-left: 4px solid var(--akzent); padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 4px; }
table.bwa thead th[colspan] { text-align: center; border-left: 1px solid var(--rahmen); }
table.bwa th.vorjahr-spalte { background: #eef3ee; color: var(--muted); }

/* BWA-Tabelle (breit, horizontal scrollbar) */
.scroll-x { overflow-x: auto; border: 1px solid var(--rahmen); background: var(--flaeche); }
table.bwa { border-collapse: collapse; font-size: 0.82rem; white-space: nowrap; }
table.bwa th, table.bwa td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--rahmen); }
table.bwa thead th { background: #eef2f6; position: sticky; top: 0; }
table.bwa td.num, table.bwa th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.bwa .pos { text-align: left; position: sticky; left: 0; background: var(--flaeche); min-width: 230px; }
table.bwa thead .pos { background: #eef2f6; }
table.bwa tr.summe-zeile { font-weight: 600; background: #f0f4f8; }
table.bwa tr.summe-zeile .pos { background: #f0f4f8; }
table.bwa td.summe { font-weight: 600; border-left: 2px solid var(--rahmen); }

/* Monatsauswahl (Dropdown über den Übersichten) */
.monatsauswahl { margin: 0.5rem 0 0.75rem; }
.monatsauswahl label { font-size: 0.9rem; color: var(--muted); display: inline-flex; gap: 0.4rem; align-items: center; }
.monatsauswahl select { padding: 0.35rem 0.5rem; border: 1px solid var(--rahmen); border-radius: 5px; font: inherit; color: var(--fg); }

/* Editierbares BWA-Raster */
table.eingabe input.num { width: 5.5rem; text-align: right; padding: 0.3rem 0.4rem; border: 1px solid var(--rahmen); border-radius: 4px; font: inherit; color: var(--fg); background: var(--flaeche); }
table.eingabe input.num:focus { outline: 2px solid var(--akzent); border-color: var(--akzent); }
table.eingabe td, table.eingabe th { padding: 0.2rem 0.3rem; }

/* Geschäftsjahr-Blöcke + Anlage-Formular auf der Mandantenseite */
.gj-block { border: 1px solid var(--rahmen); border-radius: 6px; padding: 0.5rem 0.9rem; margin: 0.6rem 0; background: var(--flaeche); }
.gj-block h3 { margin: 0.2rem 0 0.4rem; }
.gj-neu { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; padding: 0.75rem; border: 1px dashed var(--rahmen); border-radius: 6px; }
.gj-neu label { display: inline-flex; gap: 0.3rem; align-items: center; font-size: 0.9rem; color: var(--muted); }
.gj-neu input { padding: 0.35rem 0.5rem; border: 1px solid var(--rahmen); border-radius: 5px; font: inherit; }

/* Warnzeile (Liquiditäts-Unterdeckung) */
tr.warn-zeile td { background: color-mix(in srgb, #c0392b 12%, var(--flaeche)); }
tr.warn-zeile td:last-child { color: #c0392b; font-weight: 600; }
