/* =====================================================================
   Nerd-IT Offertenwerkzeug — Oberflaeche.
   Ein Akzent (Blau), sonst Graustufen. Zahlen laufen in Monospace,
   damit Betraege untereinander stehen und sich vergleichen lassen.
   Dichte Tabellen, weil hier gerechnet und nicht geblaettert wird.
   ===================================================================== */

:root {
  --akzent: #2f6fed;
  --akzent-dunkel: #1d4fd7;
  --akzent-hell: #e8effe;
  --grund: #f6f7f8;
  --flaeche: #ffffff;
  --rand: #e2e5e9;
  --text: #1b1f23;
  --grau: #6b7280;
  --rot: #c0392b;
  --schatten: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}

* { box-sizing: border-box; }

/* Das eingebaute [hidden] des Browsers ist nur eine Elementregel und verliert
   gegen jede Klasse, die display setzt - der Dialog lag dadurch unsichtbar,
   aber klickfangend ueber der Seite. Deshalb hier ausdruecklich. */
[hidden] { display: none !important; }

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

/* ------------------------------------------------------------- Kopfzeile */

.kopf {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 10px 20px; background: #0d1117; color: #fff;
  position: sticky; top: 0; z-index: 40;
}
.marke { font-size: 18px; font-weight: 700; cursor: pointer; letter-spacing: -.3px; }
.marke span { color: var(--akzent); }
.marke em {
  display: block; font-style: normal; font-size: 10.5px; letter-spacing: .5px;
  color: #7d8896; font-weight: 400;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
/* Eingabeaufforderung vor dem Untertitel - das Werkzeug ist fuer die
   eigene Werkstatt, das darf man sehen. */
.marke em::before { content: "~$ "; color: var(--akzent); }
.kopf nav { display: flex; gap: 8px; }

/* -------------------------------------------------------------- Bausteine */

.knopf {
  font: inherit; font-weight: 600; padding: 7px 14px; border: 1px solid transparent;
  border-radius: 6px; background: var(--akzent); color: #fff; cursor: pointer;
  white-space: nowrap;
}
.knopf:hover { background: var(--akzent-dunkel); }
.knopf.leise { background: transparent; color: inherit; border-color: #ffffff30; }
.kopf .knopf.leise:hover { background: #ffffff18; }
.knopf.rand {
  background: var(--flaeche); color: var(--text); border-color: var(--rand);
}
.knopf.rand:hover { background: #f0f1f3; }
.knopf.gefahr { background: transparent; color: var(--rot); border-color: #e6c9c5; }
.knopf.gefahr:hover { background: #fdf1f0; }
.knopf.klein { padding: 4px 9px; font-size: 12px; font-weight: 500; }

input, select, textarea {
  font: inherit; padding: 7px 9px; border: 1px solid var(--rand);
  border-radius: 6px; background: #fff; color: inherit; width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--akzent); outline-offset: -1px; border-color: var(--akzent);
}
input.num { text-align: right; }
label.feld { display: block; }
label.feld > span {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--grau); margin-bottom: 3px; font-weight: 600;
}

.karte {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  box-shadow: var(--schatten);
}
.karte > h2 {
  margin: 0; padding: 12px 16px; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--grau); border-bottom: 1px solid var(--rand);
}
.karte > .inhalt { padding: 16px; }

.laden { padding: 60px; text-align: center; color: var(--grau); }

.marke-status {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: #eef0f2; color: #4b5563;
}
.marke-status[data-s="Versendet"] { background: #e7f0fd; color: #1f5fbf; }
.marke-status[data-s="In Verhandlung"] { background: #fdf3e0; color: #a2650a; }
.marke-status[data-s="Angenommen"] { background: var(--akzent-hell); color: var(--akzent-dunkel); }
.marke-status[data-s="Abgelehnt"] { background: #fdecea; color: var(--rot); }

/* ------------------------------------------------------------ Offertenliste */

.seite { max-width: 1560px; margin: 0 auto; padding: 22px 20px 60px; }
.seite > h1 { font-size: 20px; margin: 0 0 4px; }
.seite > .unter { color: var(--grau); margin: 0 0 18px; }

.kennzahlen { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.kennzahl {
  background: var(--flaeche); border: 1px solid var(--rand); border-radius: 10px;
  padding: 12px 18px; min-width: 190px; box-shadow: var(--schatten);
}
.kennzahl b { display: block; font-size: 22px; letter-spacing: -.5px;
               font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.kennzahl span { font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
                 color: var(--grau); font-weight: 600; }

table.liste { width: 100%; border-collapse: collapse; background: var(--flaeche); }
table.liste th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--grau); padding: 10px 14px; border-bottom: 1px solid var(--rand);
}
table.liste td { padding: 11px 14px; border-bottom: 1px solid #f0f1f3; }
table.liste tr:hover td { background: #fafbfc; cursor: pointer; }
table.liste td.num, table.liste th.num {
  text-align: right; white-space: nowrap;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px;
}
table.liste th.num { font-family: inherit; font-size: 11px; }
table.liste .nummer { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.leerhinweis { padding: 50px; text-align: center; color: var(--grau); }

/* ------------------------------------------------------------- Konfigurator */

.editor-kopf {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.editor-kopf .nummer {
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
  background: #0d1117; color: #fff; padding: 4px 10px; border-radius: 5px;
}
.editor-kopf .wachsen { flex: 1; }
.sicherstand { font-size: 12px; color: var(--grau); min-width: 110px; }

.gitter { display: grid; grid-template-columns: 290px minmax(0,1fr) 330px; gap: 16px; align-items: start; }
@media (max-width: 1400px) { .gitter { grid-template-columns: 260px minmax(0,1fr); } }
@media (max-width: 1000px) { .gitter { grid-template-columns: 1fr; } }

.spalte-fest { position: sticky; top: 68px; }

/* Katalog */
.kat-gruppe { padding: 10px 12px 4px; font-size: 11px; text-transform: uppercase;
              letter-spacing: 1px; color: var(--grau); font-weight: 700; }
.kat-eintrag {
  display: block; width: 100%; text-align: left; background: none; border: none;
  border-top: 1px solid #f0f1f3; padding: 9px 12px; cursor: pointer; font: inherit;
}
.kat-eintrag:hover { background: var(--akzent-hell); }
.kat-eintrag b { display: block; font-weight: 600; }
.kat-eintrag span { font-size: 11.5px; color: var(--grau); }
.kat-eintrag .preis { float: right; font-weight: 600; color: var(--akzent-dunkel);
                      font-size: 12px; }

/* Positionen, gruppiert nach Rubrik */
.pos-gruppe { margin-bottom: 20px; }
.pos-gruppe-titel {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin: 0 2px 7px; padding-bottom: 5px;
  border-bottom: 2px solid var(--akzent);
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--akzent-dunkel);
}
.pos-gruppe-titel span {
  font-weight: 500; letter-spacing: 0; text-transform: none;
  color: var(--grau); font-size: 11.5px;
}

.position {
  border: 1px solid var(--rand); border-radius: 10px; background: var(--flaeche);
  margin-bottom: 12px; box-shadow: var(--schatten);
}
.position > .zeile-kopf {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-bottom: 1px solid var(--rand);
}
.position > .zeile-kopf .titel { flex: 1; font-weight: 600; }
.position > .zeile-kopf .titel small {
  display: block; font-weight: 400; color: var(--grau);
}
.position > .rumpf { padding: 12px 14px; }
.pos-raster {
  display: grid; grid-template-columns: 150px 120px 130px 1fr; gap: 10px;
  align-items: end;
}
@media (max-width: 760px) { .pos-raster { grid-template-columns: 1fr 1fr; } }
.zeilensumme {
  text-align: right; font-weight: 700; font-size: 15px; white-space: nowrap;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.zeilensumme small { display: block; font-weight: 400; font-size: 11px; color: var(--grau); }

.instanz-tabelle { width: 100%; border-collapse: collapse; margin-top: 10px; }
.instanz-tabelle th {
  text-align: left; font-size: 11px; text-transform: uppercase; color: var(--grau);
  padding: 4px 6px; font-weight: 600;
}
.instanz-tabelle td { padding: 3px 6px; }
.instanz-tabelle td.weg { width: 34px; }

.abweichung { font-size: 11px; color: #a2650a; margin-top: 4px; }

/* Summenpanel */
.summen-zeile {
  display: flex; justify-content: space-between; gap: 12px; padding: 5px 0;
  font-variant-numeric: tabular-nums;
}
.summen-zeile span:last-child {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}
.summen-zeile.trenn { border-top: 1px solid var(--rand); margin-top: 6px; padding-top: 9px; }
.summen-zeile.gross { font-size: 16px; font-weight: 700; }
.summen-zeile .beschriftung { color: var(--grau); }
.vertragskasten {
  margin-top: 12px; background: var(--akzent); color: #fff; border-radius: 8px;
  padding: 12px 14px;
}
.vertragskasten .zahl { font-size: 20px; font-weight: 700; letter-spacing: -.5px;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.vertragskasten .beschriftung { font-size: 11px; text-transform: uppercase;
  letter-spacing: .6px; opacity: .9; }

.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.drei { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 10px; }
.feldstapel { display: grid; gap: 10px; }

/* ------------------------------------------------------------------ Dialog */

.dialog-huelle {
  position: fixed; inset: 0; background: #0b0f1499; display: flex;
  align-items: center; justify-content: center; z-index: 60; padding: 20px;
}
.dialog {
  background: var(--flaeche); border-radius: 12px; padding: 22px;
  width: min(520px, 100%); max-height: 88vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.dialog h2 { margin: 0 0 14px; font-size: 17px; }
.dialog .knopfleiste { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #0d1117; color: #fff; padding: 10px 18px; border-radius: 8px;
  z-index: 80; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.toast.fehler { background: var(--rot); }

/* ------------------------------------------------------------ Bereiche */

.reiter {
  font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: #cfd6dc;
  cursor: pointer; white-space: nowrap;
}
.reiter:hover { background: #ffffff14; color: #fff; }
.reiter[aria-current="true"] { background: var(--akzent); color: #fff; font-weight: 600; }
.kopf nav { flex-wrap: wrap; align-items: center; }

.feldstapel { display: grid; gap: 10px; }
a.knopf { text-decoration: none; display: inline-block; }

/* --------------------------------------------------- Arbeitsvorrat & Co */

.bereichskopf {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px; flex-wrap: wrap;
}
.bereichskopf h1 { margin: 0 0 3px; font-size: 20px; }

/* Eine Zeile im Arbeitsvorrat: links was ansteht, rechts der Weg dorthin. */
.aufgabe {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 16px; border-top: 1px solid #f0f1f3; flex-wrap: wrap;
}
.aufgabe:first-of-type { border-top: none; }
.aufgabe .was { flex: 1; min-width: 260px; }
.aufgabe .was b { display: block; font-size: 14.5px; }
.aufgabe .was span { color: var(--grau); font-size: 13px; }
.aufgabe .womit { display: flex; gap: 8px; flex-wrap: wrap; }
/* Dringendes bekommt eine Kante, nicht die ganze Fläche - sonst schreit
   die Liste, sobald zwei Dinge offen sind. */
.aufgabe.dringend { border-left: 3px solid var(--rot); background: #fffbfb; }

.kennzahl.klickbar { cursor: pointer; transition: border-color .12s, transform .12s; }
.kennzahl.klickbar:hover { border-color: var(--akzent); transform: translateY(-1px); }
.kennzahl.warnung b { color: var(--rot); }

.filterleiste { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.filter {
  font: inherit; font-size: 13px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--rand); background: var(--flaeche); color: var(--grau);
  cursor: pointer;
}
.filter:hover { border-color: var(--akzent); color: var(--akzent-dunkel); }
.filter[aria-current="true"] {
  background: var(--akzent); border-color: var(--akzent); color: #fff; font-weight: 600;
}

.feldtitel {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--grau); font-weight: 600; margin-bottom: 4px;
}

/* ------------------------------------------------- Automatik und Schalter */

/* Ob der automatische Versand läuft, gehört nicht in die Einstellungen
   versteckt - es bestimmt, ob Rechnungen von selbst hinausgehen. */
.automatikleiste {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--akzent-hell); border: 1px solid #c9dbfb;
  border-radius: 10px; padding: 11px 16px; margin-bottom: 16px;
  font-size: 13.5px;
}
.automatikleiste b { color: var(--akzent-dunkel); }
.automatikleiste span:not(.punkt) { color: var(--grau); }
.automatikleiste .punkt {
  width: 9px; height: 9px; border-radius: 50%; background: var(--akzent);
  flex: 0 0 auto;
}
.automatikleiste button { margin-left: auto; }
.automatikleiste.aus { background: #fdf6e9; border-color: #f0dcb8; }
.automatikleiste.aus b { color: #a2650a; }
.automatikleiste.aus .punkt { background: #d9a441; }

.schalter {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--grund); border-radius: 8px; padding: 11px 13px;
  cursor: pointer; font-size: 13.5px;
}
.schalter input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.schalter span { color: var(--grau); }
.schalter span b { display: block; color: var(--text); font-weight: 600; }

/* --------------------------------------------------------- Anmeldung */

body.anmeldeseite {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: #0d1117;
}
.anmeldekarte {
  background: var(--flaeche); border-radius: 14px; padding: 32px;
  width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.anmeldekarte .marke { font-size: 26px; cursor: default; margin-bottom: 2px; }
.anmeldekarte .marke em { color: var(--grau); }
.anmeldekarte .unter { color: var(--grau); font-size: 13.5px; margin: 0 0 22px; }
.anmeldekarte label.feld { margin-bottom: 14px; }
.anmeldekarte .hinweis {
  color: var(--grau); font-size: 12.5px; text-align: center; margin: 16px 0 0;
}
.anmeldekarte .hinweis a { color: var(--akzent); }
.knopf.breit { width: 100%; padding: 11px; margin-top: 4px; }
.fehler {
  background: #fdecea; color: var(--rot); border-radius: 7px; padding: 9px 12px;
  font-size: 13.5px; margin-bottom: 12px;
}

/* ------------------------------------------------------ Aufwände & Team */

.kuerzel {
  display: inline-block; font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase;
  background: var(--akzent-hell); color: var(--akzent-dunkel);
  padding: 2px 7px; border-radius: 4px; letter-spacing: .5px;
}
.kopf .wer {
  font-size: 13px; color: #9aa4ad; margin: 0 4px 0 10px; white-space: nowrap;
}
/* Wer nicht Inhaber ist, sieht die Einstellungen gar nicht erst. */
body[data-rolle="mitarbeiter"] .nur-inhaber { display: none !important; }

/* ------------------------------------------------------ Wissen & Domains */

.hinweiskasten {
  background: var(--akzent-hell); border: 1px solid #c9dbfb; border-radius: 9px;
  padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--grau);
}
.hinweiskasten b { display: block; color: var(--akzent-dunkel); margin-bottom: 2px; }
.hinweiskasten.gut { background: #eefaf4; border-color: #bfe6d4; }
.hinweiskasten.gut b { color: #0b7c56; }

.wiki-bereich { border-top: 1px solid #f0f1f3; }
.wiki-bereich:first-of-type { border-top: none; }
.wiki-bereich-titel {
  padding: 8px 16px 2px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--grau); font-weight: 700;
}
.wiki-eintrag {
  display: block; padding: 7px 16px 9px; text-decoration: none; color: inherit;
  border-top: 1px solid #f7f8f9;
}
.wiki-eintrag:hover { background: var(--akzent-hell); }
.wiki-eintrag b { display: block; font-weight: 600; }
.wiki-eintrag span { font-size: 11.5px; color: var(--grau); }

.wiki-titel {
  font-size: 20px; font-weight: 700; border: none; padding: 0 0 10px;
  border-bottom: 1px solid var(--rand); border-radius: 0; margin-bottom: 14px;
}
.wiki-titel:focus { outline: none; border-bottom-color: var(--akzent); }
.wiki-inhalt {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13.5px; line-height: 1.7; border: none; padding: 0; resize: vertical;
}
.wiki-inhalt:focus { outline: none; }

/* Die Nameserver, die der Kunde eintragen muss - gross genug zum Ablesen. */
.nsliste {
  background: #0d1117; border-radius: 9px; padding: 14px 16px;
  font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: #7fb3ff;
}
.nsliste div { padding: 2px 0; }

/* =====================================================================
   Seitenleiste. Elf Reiter in einer Zeile waren keine Ordnung - jetzt
   stehen die Bereiche in Themengruppen untereinander, und die Kopfzeile
   traegt nur noch den Ort, die Suche und die eine Handlung.
   ===================================================================== */

body.mit-leiste {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}

.leiste {
  grid-row: 1 / -1;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: #0d1117; color: #cfd6dc;
  display: flex; flex-direction: column;
  padding: 16px 12px 12px;
}
.leiste .marke { padding: 0 8px 14px; cursor: pointer; }
.leiste nav { flex: 1; }

.leiste .gruppe {
  padding: 16px 10px 5px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.4px; color: #58636f;
}

.leiste .eintrag {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 7px; margin-bottom: 1px;
  color: #cfd6dc; text-decoration: none; font-size: 13.5px;
  border: 1px solid transparent;
}
.leiste .eintrag:hover { background: #ffffff10; color: #fff; }
.leiste .eintrag[aria-current="true"] {
  background: var(--akzent); color: #fff; font-weight: 600;
}
.leiste .zeichen {
  width: 18px; text-align: center; font-size: 13px; opacity: .75;
  flex: 0 0 auto;
}
.leiste .eintrag[aria-current="true"] .zeichen { opacity: 1; }

/* Zaehler am Eintrag - offene Anfragen, ueberfaellige Rechnungen. */
.leiste .zaehler {
  margin-left: auto; min-width: 20px; text-align: center;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 6px;
  background: #ffffff22; color: #fff;
}
.leiste .zaehler.warn { background: var(--rot); }

.leiste-fuss {
  border-top: 1px solid #ffffff14; padding-top: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.leiste-fuss .wer { font-size: 12px; color: #8b97a5; margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------- Kopfzeile neu */

.kopfzeile {
  grid-column: 2;
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; background: var(--flaeche);
  border-bottom: 1px solid var(--rand);
}
.kopfzeile .wo { font-weight: 700; font-size: 15px; }
.kopfzeile .wachsen { flex: 1; }

.schnellsuche {
  width: min(300px, 34vw); padding: 7px 12px; font-size: 13.5px;
  background: var(--grund); border-color: transparent;
}
.schnellsuche:focus { background: #fff; }

.leiste-knopf {
  display: none; font: inherit; font-size: 18px; background: none;
  border: 1px solid var(--rand); border-radius: 7px; padding: 4px 10px;
  cursor: pointer; color: var(--text);
}

body.mit-leiste > main { grid-column: 2; min-width: 0; }

/* ------------------------------------------------------------- Schmal */

@media (max-width: 900px) {
  body.mit-leiste { grid-template-columns: 1fr; }
  .leiste {
    position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 80;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 8px 0 30px rgba(0,0,0,.3);
  }
  body.leiste-offen .leiste { transform: none; }
  .kopfzeile, body.mit-leiste > main { grid-column: 1; }
  .leiste-knopf { display: block; }
  .schnellsuche { display: none; }
}

/* Der Provisionierungs-Verlauf liest sich wie ein Terminal - dann soll
   er auch so aussehen. */
.verlaufstext {
  margin: 0; font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap;
  background: #0d1117; color: #a5d6ff; border-radius: 8px; padding: 14px 16px;
}

/* Crawl-Schalter: gruen heisst sichtbar fuer Suchmaschinen. */
.crawl {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: #eef0f2; color: #6b7280; white-space: nowrap;
}
.crawl input { width: auto; margin: 0; }
.crawl.an { background: #e6f6ec; color: #1e7c45; }

/* ------------------------------------------------------ Adresse bauen */

/* Subdomain und Domain nebeneinander, mit dem Punkt dazwischen - so
   liest sich die Zeile wie die Adresse, die daraus wird. */
.adresszeile {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--rand); border-radius: 7px; background: #fff;
  overflow: hidden;
}
.adresszeile input, .adresszeile select {
  border: none; border-radius: 0; background: transparent;
}
.adresszeile input { flex: 0 1 160px; text-align: right; font-weight: 600; }
.adresszeile select { flex: 1; border-left: 1px solid var(--rand); }
.adresszeile input:focus, .adresszeile select:focus { outline: none; background: var(--akzent-hell); }
.adresszeile .punkt { padding: 0 2px; color: var(--grau); font-weight: 700; }
.feldhinweis { font-size: 12px; color: var(--grau); margin: 5px 0 0; }

/* Die Vorschau: eine Zeile je Folge, Zeichen vorneweg. */
.vorschau {
  margin: 16px 0 10px; padding: 12px 14px; border-radius: 9px;
  background: var(--grund); font-size: 13.5px; display: grid; gap: 5px;
}
.vorschau .vz { display: flex; gap: 10px; align-items: baseline; }
.vorschau .z { width: 16px; text-align: center; flex: 0 0 auto; color: var(--grau); font-weight: 700; }
.vorschau .gut .z { color: #1e7c45; }
.vorschau .warn { color: #8a5a00; }
.vorschau .warn .z { color: #d9a441; }
.vorschau .rot { color: var(--rot); }
.vorschau .rot .z { color: var(--rot); }
.vorschau code { font-size: 12px; background: #fff; padding: 1px 5px; border-radius: 4px; }

.erweitert summary {
  cursor: pointer; font-size: 12.5px; color: var(--grau); list-style: none;
}
.erweitert summary::before { content: "▸ "; }
.erweitert[open] summary::before { content: "▾ "; }

/* ---- Posteingang */
.mailkopf { display: grid; gap: 8px; font-size: 13.5px; }
.mailkopf-zeile { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: start; }
.mailkopf-zeile > span { color: var(--grau); text-transform: uppercase; font-size: 11px; letter-spacing: .4px; padding-top: 3px; }
.mailkopf-zeile select { font: inherit; padding: 5px 8px; }
.mailtext { font-size: 14px; line-height: 1.55; white-space: normal; word-break: break-word; padding: 4px 2px; }

/* Grosser Dialog (Abo-Editor): fast Seitenbreite, zweispaltig */
.dialog.gross { width: min(1100px, 96vw); max-height: 92vh; }
.abo-editor { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.abo-editor .stamm { display: grid; gap: 10px; }
.abo-positionen-tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.abo-positionen-tabelle th { text-align: left; color: var(--grau); font-size: 11px; letter-spacing: .4px; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--rand); }
.abo-positionen-tabelle td { padding: 8px; border-bottom: 1px solid #eef0f2; vertical-align: top; }
.abo-positionen-tabelle input[type=number] { font: inherit; padding: 4px 6px; border: 1px solid var(--rand); border-radius: 5px; }
.abo-positionen-tabelle input[type=text], .abo-positionen-tabelle textarea { font: inherit; padding: 4px 6px; border: 1px solid var(--rand); border-radius: 5px; width: 100%; font-size: 12.5px; }
.abo-positionen-tabelle .zuord { font-size: 12px; }
.abo-positionen-tabelle .zuord.ohne { color: var(--rot, #c33); }
.abo-positionen-tabelle tfoot td { font-weight: 700; border-bottom: 0; }
@media (max-width: 900px) { .abo-editor { grid-template-columns: 1fr; } }

/* Aufklappmenü für Zeilenaktionen: hält Tabellen schmal. */
details.mehr { display:inline-block; position:relative; }
details.mehr > summary { list-style:none; cursor:pointer; display:inline-block; }
details.mehr > summary::-webkit-details-marker { display:none; }
details.mehr[open] > summary { background:var(--akzent); color:#fff; }
.mehr-liste { position:absolute; right:0; top:calc(100% + 4px); z-index:30; min-width:240px; text-align:left;
  background:var(--flaeche,#fff); border:1px solid var(--rand,#dde3ea); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.12); padding:6px; }
.mehr-liste button, .mehr-liste a { display:block; width:100%; text-align:left; background:none; border:0; padding:7px 10px;
  font:inherit; font-size:13px; color:inherit; border-radius:6px; cursor:pointer; text-decoration:none; }
.mehr-liste button:hover, .mehr-liste a:hover { background:var(--akzent-hell,#f1f4f8); }
.mehr-liste .gefahr { color:var(--rot,#c0392b); border-top:1px solid var(--rand,#dde3ea); margin-top:4px; border-radius:0 0 6px 6px; }
table.liste td { vertical-align:top; }
