/* Gemeinsamer Stil aller Office-Seiten und aller Module.
   Ein Modul bringt keine eigenen Farben mit, es benutzt diese hier.
   Wer eine eigene Anmutung braucht, ändert nur die Variablen. */

:root {
  --paper: #f7f6f3;
  --card: #fff;
  --ink: #16150f;
  --muted: #6d6a5f;
  --line: #e2dfd6;
  --ton: #16150f;          /* Akzent, pro Betrieb austauschbar */
  --warn: #a8710f;
  --weich: rgba(22, 21, 15, .05);
}
/* Dunkel: entweder weil das Gerät es so will, oder weil man es gewählt hat. */
@media (prefers-color-scheme: dark) {
  :root:not([data-ton="hell"]) {
    --paper: #131311; --card: #1c1c19; --ink: #f0efe9; --muted: #9a978c;
    --line: #33322d; --ton: #f0efe9; --warn: #d8a24a; --weich: rgba(240, 239, 233, .06);
  }
}
:root[data-ton="dunkel"] {
  --paper: #131311; --card: #1c1c19; --ink: #f0efe9; --muted: #9a978c;
  --line: #33322d; --ton: #f0efe9; --warn: #d8a24a; --weich: rgba(240, 239, 233, .06);
}
:root[data-ton="hell"] { color-scheme: light }
:root[data-ton="dunkel"] { color-scheme: dark }

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0; padding: 0 24px 60px;
  background: var(--paper); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.55;
}
.wrap { max-width: 840px; margin: 0 auto; }
.wrap.breit { max-width: 1120px; }

header { display: flex; align-items: baseline; justify-content: space-between;
         padding: 36px 0 8px; gap: 16px; flex-wrap: wrap; }
h1 { font-size: 26px; margin: 0; letter-spacing: -.4px; }
h2 { font-size: 17px; margin: 34px 0 12px; letter-spacing: -.2px; }
.ich { font-size: 14px; color: var(--muted); }
.ich a { color: var(--muted); margin-left: 12px; }
p.lead { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 30px; max-width: 56ch; }
a { color: var(--ink); }

/* Kacheln der Übersicht */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
a.kachel { display: block; text-decoration: none; color: inherit; background: var(--card);
           border: 1px solid var(--line); border-radius: 13px; padding: 22px;
           transition: border-color .15s, transform .15s; }
a.kachel:hover { border-color: var(--ink); transform: translateY(-1px); }
.icon { font-size: 22px; margin-bottom: 14px; display: block; opacity: .75; }
.kt { font-size: 16px; font-weight: 650; margin-bottom: 5px; }
.ku { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.marke { display: inline-block; margin-top: 14px; font-size: 11px; text-transform: uppercase;
         letter-spacing: .6px; color: var(--muted); border: 1px solid var(--line);
         border-radius: 20px; padding: 3px 9px; }

/* Karten und Formulare */
.karte { background: var(--card); border: 1px solid var(--line); border-radius: 13px;
         padding: 20px 22px; margin-bottom: 14px; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; }
.feld { display: flex; flex-direction: column; gap: 4px; }
.feld.breit { grid-column: 1 / -1; }
label { font-size: 13px; color: var(--muted); }
input, select, textarea {
  font-family: inherit; font-size: 15px; padding: 8px 10px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ton); outline-offset: -1px; }
.hilfe { font-size: 12.5px; color: var(--muted); }

button, .knopf {
  font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  background: var(--ton); color: var(--paper); border: 1px solid var(--ton);
  border-radius: 9px; padding: 9px 18px; text-decoration: none; display: inline-block;
}
button:hover, .knopf:hover { opacity: .88; }
button:disabled { opacity: .45; cursor: default; }
button.leise, .knopf.leise { background: transparent; color: var(--muted); border-color: var(--line); font-weight: 500; }
.aktionen { display: flex; gap: 10px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

/* Meldungen */
.meldung { border: 1px solid var(--line); border-left: 3px solid var(--ton); background: var(--card);
           border-radius: 9px; padding: 12px 15px; margin: 0 0 18px; font-size: 14px; white-space: pre-line; }
.meldung.fehler { border-left-color: #b3402c; }
.leer { color: var(--muted); background: var(--card); border: 1px solid var(--line);
        border-radius: 13px; padding: 22px; }

/* Tabellen */
table { width: 100%; border-collapse: collapse; background: var(--card);
        border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
th, td { padding: 9px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 13px; color: var(--muted); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.matt { color: var(--muted); }

@media (max-width: 620px) {
  body { padding: 0 14px 50px; }
  header { padding-top: 24px; }
}
