/* ============================================================
   rKern – gemeinsame Oberfläche aller Apps (Optik angelehnt an JobToDate)
   Farben kommen pro Firma über --brand / --akzent (siehe layout.php)
   Schrift: Inter, lokal eingebunden (DSGVO-konform, kein Google-Server)
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --brand: #1a2a4a;
  --akzent: #c9a24a;
  --bg: #f2f4f8;
  --karte: #ffffff;
  --linie: #e2e6ee;
  --linie-stark: #cfd5e1;
  --text: #18202f;
  --text-2: #5b6578;
  --text-3: #8a93a5;
  --ok: #18794e;
  --ok-bg: #e7f6ee;
  --warn: #9a5b00;
  --warn-bg: #fff4dc;
  --fehler: #b42318;
  --fehler-bg: #fdecea;
  --info-bg: #eaf0fb;
  --radius: 14px;
  --radius-s: 10px;
  --schatten: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --schatten-hoch: 0 8px 24px rgba(16, 24, 40, .10);
  --sidebar: 248px;
  --topbar: 58px;
  --bottomnav: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 650; }
p { margin: 0 0 .75em; }
.ic { width: 20px; height: 20px; flex: none; }
.gedaempft { color: var(--text-2); }
.klein { font-size: .85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Wortmarke ---------- */
.wortmarke {
  font-weight: 800; letter-spacing: .08em; font-size: 1.15rem; color: #fff;
}
.wortmarke b {
  color: var(--akzent); font-weight: 800; letter-spacing: 0; margin-right: 1px; text-transform: lowercase;
}
.wortmarke.gross { font-size: 2rem; }

/* ============================================================
   App-Rahmen
   ============================================================ */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: var(--brand); color: #fff;
  display: flex; flex-direction: column; z-index: 20;
}
.sidebar-brand {
  display: flex; flex-direction: column; gap: 2px;
  padding: 22px 22px 18px; text-decoration: none; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand img { max-height: 44px; max-width: 180px; object-fit: contain; object-position: left; }
.sidebar-brand small { color: rgba(255,255,255,.6); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-s);
  color: rgba(255,255,255,.78); text-decoration: none; font-weight: 500;
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.unter { padding: 7px 12px 7px 44px; font-size: .88rem; margin-top: -2px; }
.sidebar-nav a.unter .ic { width: 16px; height: 16px; }
.sidebar-nav a.aktiv { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--akzent); }
.sidebar-fuss { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-s); text-decoration: none; color: #fff; }
.sidebar-user:hover { background: rgba(255,255,255,.07); }
.sidebar-user span { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user b { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { color: rgba(255,255,255,.6); font-size: .78rem; }
.sidebar-logout {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; border: 0; background: none; color: rgba(255,255,255,.65);
  font: inherit; font-size: .9rem; cursor: pointer; border-radius: var(--radius-s);
}
.sidebar-logout:hover { background: rgba(255,255,255,.07); color: #fff; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center; object-fit: cover;
  background: var(--akzent); color: var(--brand); font-weight: 700; font-size: .8rem;
  line-height: 1; letter-spacing: .02em; text-decoration: none;
}
.avatar .ic { width: 18px; height: 18px; }
.topbar-user, .sidebar-user { text-decoration: none; }
.liste a, .person a { color: var(--text); text-decoration: none; }
.liste a:hover, .person a:hover { color: var(--brand); text-decoration: underline; }

/* Datei-Auswahl */
input[type=file]::file-selector-button {
  font: inherit; font-weight: 600; font-size: .84rem; color: var(--text);
  background: #fff; border: 1px solid var(--linie-stark); border-radius: 8px;
  padding: 7px 12px; margin-right: 10px; cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--bg); }

.topbar, .bottomnav { display: none; }

.haupt {
  margin-left: var(--sidebar);
  padding: 32px 40px 24px;
  max-width: calc(1180px + var(--sidebar));
  min-height: 100vh; display: flex; flex-direction: column;
}
.fuss { margin-top: auto; padding-top: 40px; color: var(--text-3); font-size: .8rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.fuss-credit { font-style: italic; }
.auth-fuss { text-align: center; line-height: 1.7; }

/* Tablet & Handy: Kopfzeile oben, Navigation unten */
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20; height: var(--topbar);
    padding: 0 16px; background: var(--brand); color: #fff;
  }
  .topbar-brand { text-decoration: none; display: flex; align-items: center; }
  .topbar-brand img { max-height: 32px; max-width: 160px; object-fit: contain; }
  .topbar-user { display: flex; }
  .topbar .avatar { width: 34px; height: 34px; }
  .bottomnav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 20;
    height: calc(var(--bottomnav) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: #fff; border-top: 1px solid var(--linie);
    box-shadow: 0 -2px 12px rgba(16,24,40,.05);
  }
  .bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--text-3); font-size: .7rem; font-weight: 600;
  }
  .bottomnav a .ic { width: 22px; height: 22px; }
  .bottomnav a.aktiv { color: var(--brand); }
  .bottomnav a.aktiv .ic { stroke-width: 2.4; }
  .haupt {
    margin-left: 0; padding: 22px 24px calc(var(--bottomnav) + var(--safe-b) + 16px);
    min-height: calc(100vh - var(--topbar));
  }
  .fuss { padding-top: 28px; }
}
@media (max-width: 639px) {
  body { font-size: 15px; }
  .haupt { padding-left: 16px; padding-right: 16px; padding-top: 18px; }
  h1 { font-size: 1.35rem; }
}

/* ============================================================
   Seitenkopf
   ============================================================ */
.seitenkopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.seitenkopf p { margin: 4px 0 0; color: var(--text-2); }
.seitenkopf .aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.zurueck { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); text-decoration: none; font-size: .88rem; margin-bottom: 8px; }
.zurueck .ic { transform: rotate(180deg); width: 16px; height: 16px; }

/* ============================================================
   Karten, Raster
   ============================================================ */
.karte {
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: var(--schatten); padding: 22px;
}
.karte + .karte { margin-top: 16px; }
.karte-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.karte-kopf p { margin: 2px 0 0; color: var(--text-2); font-size: .88rem; }
.karte-kopf a { font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.raster { display: grid; gap: 16px; }
.raster-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.raster-haupt { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.raster > .karte + .karte { margin-top: 0; }
@media (max-width: 1100px) { .raster-haupt { grid-template-columns: 1fr; } }
@media (max-width: 639px)  { .raster-2 { grid-template-columns: 1fr; } .karte { padding: 18px; } }

/* Willkommens-Banner */
.banner {
  background: var(--brand); color: #fff; border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.banner::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 50%; background: var(--akzent); opacity: .18;
}
.banner h1 { font-size: 1.45rem; }
.banner p { margin: 6px 0 0; color: rgba(255,255,255,.75); }

/* Kennzahl-Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
a.kachel { text-decoration: none; }
.kachel:is(a):hover { border-color: var(--brand); }
.kachel { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--schatten); }
.kachel b { display: block; font-size: 1.7rem; font-weight: 750; color: var(--brand); line-height: 1.1; letter-spacing: -.02em; }
.kachel span { color: var(--text-2); font-size: .85rem; }
@media (max-width: 760px) { .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Fortschritt / Checkliste */
.fortschritt { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.fortschritt-balken { flex: 1; height: 8px; border-radius: 99px; background: var(--linie); overflow: hidden; }
.fortschritt-balken i { display: block; height: 100%; background: var(--akzent); border-radius: inherit; }
.fortschritt b { font-size: 1.1rem; color: var(--brand); min-width: 3.2em; text-align: right; }
.checkliste { list-style: none; margin: 0; padding: 0; }
.checkliste li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linie); }
.checkliste li:first-child { border-top: 0; }
.checkliste .punkt { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--linie-stark); color: transparent; }
.checkliste .punkt .ic { width: 14px; height: 14px; stroke-width: 3; }
.checkliste li.erledigt .punkt { background: var(--ok); border-color: var(--ok); color: #fff; }
.checkliste li.erledigt .text { color: var(--text-2); }
.checkliste .text { flex: 1; }
.checkliste a { font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
.checkliste a .ic { width: 16px; height: 16px; }

/* Schnellzugriff */
.schnell { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.schnell a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 16px 8px; border-radius: var(--radius-s); background: var(--bg);
  color: var(--text); text-decoration: none; font-size: .85rem; font-weight: 600;
  transition: background .15s, transform .15s;
}
.schnell a:hover { background: var(--info-bg); transform: translateY(-1px); }
.schnell a .ic { width: 24px; height: 24px; color: var(--brand); }
@media (max-width: 480px) { .schnell { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Aktivitätenliste */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--linie); align-items: flex-start; }
.liste li:first-child { border-top: 0; padding-top: 0; }
.liste .ic-rund { width: 34px; height: 34px; border-radius: 50%; background: var(--info-bg); color: var(--brand); display: grid; place-items: center; flex: none; }
.liste .ic-rund .ic { width: 17px; height: 17px; }
.liste small { display: block; color: var(--text-3); font-size: .8rem; }
.leer { color: var(--text-2); text-align: center; padding: 28px 12px; }
.leer .ic { width: 36px; height: 36px; color: var(--text-3); display: block; margin: 0 auto 8px; }

/* ============================================================
   Tabellen / Benutzerliste
   ============================================================ */
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; padding: 0 12px 10px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 12px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle td:first-child, .tabelle th:first-child { padding-left: 0; }
.tabelle td:last-child, .tabelle th:last-child { padding-right: 0; text-align: right; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .avatar { background: var(--info-bg); color: var(--brand); }
.person b { display: block; font-weight: 600; }
.person small { color: var(--text-2); font-size: .82rem; word-break: break-all; }

/* Auf Handy werden Tabellenzeilen zu Karten */
@media (max-width: 760px) {
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { padding: 14px 0; border-bottom: 1px solid var(--linie); }
  .tabelle tr:last-child { border-bottom: 0; }
  .tabelle td { border: 0; padding: 3px 0 !important; text-align: left !important; }
  .tabelle td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); font-size: .82rem; }
  .tabelle td.zeilen-aktionen { padding-top: 10px !important; }
}

/* Chips / Badges */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--bg); color: var(--text-2); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-fehler { background: var(--fehler-bg); color: var(--fehler); }
.chip-brand { background: var(--info-bg); color: var(--brand); }

/* ============================================================
   Formulare & Buttons
   ============================================================ */
.feld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.feld label, .feld .label { font-size: .86rem; font-weight: 600; color: var(--text); }
.feld .hilfe { font-size: .8rem; color: var(--text-2); }
.pflicht { color: var(--fehler); }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--linie-stark); border-radius: var(--radius-s);
  background: #fff; transition: border-color .15s, box-shadow .15s;
  min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.felder-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.felder-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 0 16px; }
@media (max-width: 639px) { .felder-2, .felder-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .92rem; line-height: 1;
  padding: 0 18px; min-height: 44px; border-radius: var(--radius-s);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--brand); color: #fff; transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn .ic { width: 18px; height: 18px; }
.btn-voll { width: 100%; }
.btn-hell { background: #fff; color: var(--text); border-color: var(--linie-stark); }
.btn-hell:hover { background: var(--bg); filter: none; }
.btn-akzent { background: var(--akzent); color: var(--brand); }
.btn-gefahr { background: #fff; color: var(--fehler); border-color: #f1c4bf; }
.btn-gefahr:hover { background: var(--fehler-bg); filter: none; }
.btn-klein { min-height: 34px; padding: 0 12px; font-size: .84rem; }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0; min-height: 0; font-weight: 600; }
.btn-link:hover { filter: none; text-decoration: underline; }
.btn-reihe { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.zeilen-aktionen form { display: inline; }
.zeilen-aktionen .btn-reihe { justify-content: flex-end; }
@media (max-width: 760px) { .zeilen-aktionen .btn-reihe { justify-content: flex-start; } }
.formular-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--linie); }
.formular-fuss .links { margin-right: auto; }

/* Farbwahl */
.farbe { display: flex; align-items: center; gap: 10px; }
.farbe input[type=color] { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--linie-stark); border-radius: var(--radius-s); background: #fff; cursor: pointer; flex: none; }
.farbe input[type=text] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }

/* Bild-Upload */
.upload { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.upload-vorschau {
  width: 180px; height: 90px; border: 1px dashed var(--linie-stark); border-radius: var(--radius-s);
  display: grid; place-items: center; background: repeating-conic-gradient(#f4f6fa 0% 25%, #fff 0% 50%) 50% / 16px 16px;
  overflow: hidden; color: var(--text-3); flex: none;
}
.upload-vorschau.dunkel { background: var(--brand); border-style: solid; border-color: var(--brand); }
.upload-vorschau img { max-width: 90%; max-height: 80%; object-fit: contain; }
.upload-vorschau.rund { width: 96px; height: 96px; border-radius: 50%; }
.upload-vorschau.rund img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; }
.upload-feld { display: flex; flex-direction: column; gap: 6px; }
.upload input[type=file] { font: inherit; font-size: .85rem; max-width: 100%; }

/* Hinweise */
.hinweis { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); margin-bottom: 16px; font-size: .92rem; background: var(--info-bg); color: var(--brand); }
.hinweis .ic { width: 18px; height: 18px; margin-top: 1px; }
.hinweis-ok { background: var(--ok-bg); color: var(--ok); }
.hinweis-fehler { background: var(--fehler-bg); color: var(--fehler); }
.hinweis-warn { background: var(--warn-bg); color: var(--warn); }
.hinweis ul { margin: 0; padding-left: 18px; }

/* Link zum Kopieren */
.kopierfeld { display: flex; gap: 8px; margin-top: 8px; }
.kopierfeld input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; background: var(--bg); }

/* Branding-Vorschau (Firma) */
.mini-vorschau { border: 1px solid var(--linie); border-radius: var(--radius-s); overflow: hidden; background: #fff; font-size: .8rem; }
.mini-vorschau .kopf { height: 54px; display: flex; align-items: center; padding: 0 16px; }
.mini-vorschau .kopf img { max-height: 30px; max-width: 140px; object-fit: contain; }
.mini-vorschau .kopf .wortmarke { font-size: .95rem; }
.mini-vorschau .bild { height: 110px; background: linear-gradient(135deg, #cfd8e6, #e9edf4); display: grid; place-items: center; color: #8a93a5; }
.mini-vorschau .inhalt { padding: 14px 16px; }
.mini-vorschau .titel { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.mini-vorschau .preis { font-weight: 700; margin-top: 8px; display: inline-block; padding: 3px 8px; border-radius: 6px; color: #fff; }
.mini-vorschau .fuss-zeile { padding: 8px 16px; border-top: 3px solid; color: var(--text-2); font-size: .72rem; }

/* ============================================================
   Anmelde-Seiten
   ============================================================ */
body.auth {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in srgb, var(--akzent) 22%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255,255,255,.08), transparent 60%),
    var(--brand);
}
.auth-buehne { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-marke { text-align: center; color: #fff; margin-bottom: 22px; }
.auth-marke .wortmarke b { color: var(--akzent); }
.auth-marke p { color: rgba(255,255,255,.7); margin: 6px 0 0; }
.auth-karte { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-karte.breit { max-width: 640px; }
.auth-karte h1 { font-size: 1.35rem; margin-bottom: 4px; }
.auth-karte > p.gedaempft { margin-bottom: 20px; }
.auth-karte h2 { margin: 22px 0 12px; font-size: .95rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.auth-link { text-align: center; margin: 18px 0 0; font-size: .9rem; }
.auth-fuss { color: rgba(255,255,255,.45); font-size: .8rem; margin-top: 22px; }
@media (max-width: 480px) { .auth-karte { padding: 22px; border-radius: 16px; } }

/* ---------- Feature Requests ---------- */
.fuss-wunsch { flex-basis: 100%; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; text-decoration: none; margin-bottom: 6px; }
.fuss-wunsch:hover { color: var(--brand); }
.fuss-wunsch .ic { width: 15px; height: 15px; }
.fr-filter { display: flex; gap: 8px; flex-wrap: wrap; }
.fr-filter select { min-height: 38px; padding: 6px 10px; width: auto; }
.fr-liste { display: flex; flex-direction: column; gap: 10px; }
.fr-karte { display: flex; gap: 14px; align-items: flex-start; background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 14px 18px 14px 14px; }
.fr-stimme button { width: 54px; min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; border: 1px solid var(--linie-stark); border-radius: 10px; background: #fff; color: var(--text-2); cursor: pointer; font: inherit; }
.fr-stimme button .ic { width: 20px; height: 20px; }
.fr-stimme button b { font-size: 1.05rem; color: var(--text); }
.fr-stimme button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.fr-stimme button.an { background: var(--brand); border-color: var(--brand); color: #fff; }
.fr-stimme button.an b { color: #fff; }
.fr-stimme button:disabled { opacity: .6; cursor: default; }
.fr-inhalt { flex: 1; min-width: 0; }
.fr-inhalt summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 6px; padding-top: 2px; }
.fr-inhalt summary::-webkit-details-marker { display: none; }
.fr-titel { font-weight: 700; font-size: 1.02rem; color: var(--text); }
.fr-inhalt summary:hover .fr-titel { color: var(--brand); }
.fr-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fr-meta small { color: var(--text-3); font-size: .8rem; }
.fr-meta .chip .ic { width: 13px; height: 13px; }
.fr-text { margin-top: 12px; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.fr-bild { display: inline-block; margin-top: 12px; }
.fr-bild img { max-width: min(100%, 420px); max-height: 280px; border-radius: 8px; border: 1px solid var(--linie); display: block; }
.fr-antwort { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); line-height: 1.5; }
.fr-antwort b { display: flex; align-items: center; gap: 6px; color: var(--brand); margin-bottom: 4px; }
.fr-antwort b .ic { width: 15px; height: 15px; }
.fr-admin { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--linie-stark); }
.fr-aktionen { margin-top: 14px; }
.fr-github { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--linie-stark); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fr-github + .fr-admin { border-top: 0; padding-top: 0; margin-top: 12px; }
.fr-github small { font-size: .8rem; }
.nur-kopie { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; line-height: 1.45; }
@media (max-width: 639px) { .fr-karte { padding: 12px; gap: 10px; } .fr-stimme button { width: 46px; min-height: 52px; } .fr-filter, .fr-filter input { width: 100%; } }
.chip-link.aktiv .gedaempft { color: rgba(255,255,255,.75); }

/* ---------- Firma: E-Mail-Versand ---------- */
.karte-kopf h2 .ic { width: 19px; height: 19px; vertical-align: -3px; margin-right: 4px; color: var(--brand); }
.mail-status { display: flex; gap: 12px; align-items: flex-start; background: var(--bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.mail-status > .ic { color: var(--brand); margin-top: 2px; }
.mail-status b { display: block; overflow-wrap: anywhere; }
.mail-status small { color: var(--text-2); font-size: .82rem; }
.mail-status .ok { color: var(--ok); font-weight: 600; }
.wahl-liste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.wahl { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--linie); border-radius: 10px; padding: 11px 14px; cursor: pointer; }
.wahl:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.wahl input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.wahl small { display: block; color: var(--text-2); font-size: .82rem; margin-top: 2px; }
.smtp-felder { border: 0; padding: 0; margin: 0; }
.smtp-felder[hidden] { display: none; }
.smtp-server { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 0 12px; }
@media (max-width: 639px) { .smtp-server { grid-template-columns: 1fr 1fr; } .smtp-server .feld:first-child { grid-column: 1 / -1; } }

/* ============================================================
   Bausteine für alle Apps
   ============================================================ */

/* Dialoge: <dialog class="dialog"><form class="dialog-inhalt">…</form></dialog>, öffnen mit data-oeffnen="id" */
.dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: 0 24px 70px rgba(0,0,0,.3); color: var(--text); }
.dialog::backdrop { background: rgba(16,24,40,.55); }
.dialog-gross { width: min(1040px, calc(100vw - 32px)); }
.dialog-inhalt { padding: 22px; }
.dialog .karte-kopf { align-items: flex-start; }
@media (max-width: 480px) { .dialog-inhalt { padding: 16px; } }

/* Filterleiste über Listen: Chips links, Suche rechts */
.filterleiste { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-link { padding: 7px 14px; border-radius: 99px; background: #fff; border: 1px solid var(--linie); color: var(--text-2); text-decoration: none; font-size: .86rem; font-weight: 600; }
.chip-link.aktiv { background: var(--brand); border-color: var(--brand); color: #fff; }
.suche input { min-height: 38px; padding: 7px 12px; width: 240px; max-width: 100%; }
@media (max-width: 639px) { .suche, .suche input { width: 100%; } }

/* Karten-Raster für Inhalte (Liste als Kacheln mit Bild) */
.karten-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.inhalt-karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); display: flex; flex-direction: column; }
.inhalt-bild { position: relative; aspect-ratio: 4 / 3; background: var(--bg); display: grid; place-items: center; color: var(--text-3); border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.inhalt-bild img { width: 100%; height: 100%; object-fit: cover; }
.inhalt-bild .ic { width: 40px; height: 40px; }
.inhalt-bild .chip { position: absolute; left: 10px; top: 10px; box-shadow: var(--schatten); }
.inhalt-text { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inhalt-text a { color: var(--text); text-decoration: none; }
.inhalt-text a:hover { color: var(--brand); }
.inhalt-text small { font-size: .82rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inhalt-aktionen { display: flex; gap: 6px; padding: 10px 14px 14px; margin-top: auto; }

/* Menü (⋯): <details class="menue"><summary class="btn …">…</summary><div class="menue-liste">…</div></details> */
.menue { position: relative; }
.menue summary { list-style: none; }
.menue summary::-webkit-details-marker { display: none; }
.menue-liste { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 30; min-width: 230px; background: #fff; border: 1px solid var(--linie); border-radius: 12px; box-shadow: var(--schatten-hoch); padding: 6px; }
.menue-liste.unten { bottom: auto; top: calc(100% + 6px); }
.menue-liste a, .menue-liste button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; font: inherit; font-size: .88rem; color: var(--text); text-decoration: none; border-radius: 8px; cursor: pointer; text-align: left; }
.menue-liste a:hover, .menue-liste button:hover { background: var(--bg); }
.menue-liste .ic { width: 17px; height: 17px; color: var(--text-2); }
.menue-liste .rot, .menue-liste .rot .ic { color: var(--fehler); }

/* „PDF wird erstellt …“ – Links mit data-pdf (siehe app.js) */
.pdf-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(16,24,40,.5); display: grid; place-items: center; }
.pdf-overlay div { background: #fff; border-radius: 14px; padding: 22px 26px; display: flex; align-items: center; gap: 14px; box-shadow: var(--schatten-hoch); font-weight: 600; margin: 16px; }
.pdf-overlay i { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 3px solid var(--linie); border-top-color: var(--brand); animation: dreh 0.8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* rKern 2: Pakete beim Super-Admin */
.pakete-liste li { align-items: center; flex-wrap: wrap; }
.pakete-liste .paket-info { flex: 1 1 220px; min-width: 0; }
.pakete-liste small { display: block; color: var(--text-2); }
.paket-schalter { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; }
@media (max-width: 640px) { .paket-schalter { margin-left: 48px; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Ticket-Seite */
.ticket-tipps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.ticket-tipps li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.ticket-tipps .ic { width: 17px; height: 17px; color: var(--ok); flex: none; margin-top: 2px; }

/* Branche beim Anlegen einer Firma (rKern 3) */
.branchen-wahl { border: 0; padding: 0; margin: 0 0 16px; }
.branchen-wahl legend { font-weight: 600; font-size: .88rem; margin-bottom: 6px; padding: 0; }
.branche-karte { display: block; margin-bottom: 8px; cursor: pointer; }
.branche-karte input { position: absolute; opacity: 0; pointer-events: none; }
.branche-karte > span { display: grid; grid-template-columns: 22px 1fr; column-gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--linie-stark); border-radius: 10px; }
.branche-karte > span svg { grid-row: span 2; width: 20px; height: 20px; color: var(--brand); }
.branche-karte small { color: var(--text-2); font-size: .8rem; }
.branche-karte input:checked + span { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.branche-karte input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
