/* verpackungsnachweis.de – Portal-Styles (ohne externe Fonts/CDNs) */
:root {
  --green: #1F6E43; --green-dark: #14532D; --green-light: #EAF3EE;
  --ink: #1A2420; --grey: #5B6660; --line: #E3E8E5;
  --radius: 14px; --shadow: 0 6px 24px rgba(20,40,30,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 22px; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand em { font-style: normal; color: var(--grey); font-weight: 500; }
.brand-mark { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--green-dark); }
.nav-cta { background: var(--green); color: #fff !important; padding: 9px 16px; border-radius: 9px; }
.nav-cta:hover { background: var(--green-dark); }

/* Hero */
.hero { color: #fff; padding: 72px 0;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(255,255,255,.14), transparent 60%),
              linear-gradient(150deg, var(--green-dark) 0%, var(--green) 55%, #2E8B57 100%); }
.hero-sub { padding: 56px 0; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; opacity: .85; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; font-weight: 800; margin-bottom: 16px; }
.hero .lead { font-size: 1.07rem; opacity: .94; max-width: 62ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.micro { margin-top: 16px; font-size: .82rem; opacity: .78; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 700; border-radius: 10px; padding: 13px 24px; font-size: 1rem; transition: transform .12s, background .12s;
  border: 0; cursor: pointer; font-family: inherit; line-height: inherit; appearance: none; }
.btn:hover { transform: translateY(-1px); }
.btn-light { background: #fff; color: var(--green-dark); }
.btn-outline { color: #fff; border: 1.5px solid rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }

/* Sections */
.section { padding-top: 64px; padding-bottom: 64px; }
.section h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 800; margin-bottom: 26px; color: var(--green-dark); }
.section-alt { background: var(--green-light); }
.center { text-align: center; }
.lead-narrow { max-width: 62ch; margin: 0 auto 26px; color: var(--grey); }
.section-note { margin-top: 22px; padding: 12px 16px; background: #FAFCFB; border-left: 4px solid var(--green); border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--grey); }
.page-narrow { max-width: 820px; }
.page-narrow h1 { color: var(--green-dark); margin-bottom: 22px; font-size: 1.8rem; }
.page-narrow h2 { font-size: 1.12rem; margin: 24px 0 8px; color: var(--ink); }
.page-narrow p { color: var(--grey); font-size: .97rem; }

/* Grid & Cards */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { color: var(--grey); font-size: .95rem; }

/* Pricing */
.price-card .price { font-size: 1.9rem; font-weight: 800; color: var(--green-dark); margin-bottom: 10px; }
.price-card .price span { font-size: .95rem; font-weight: 500; color: var(--grey); }
.price-card.featured { border: 2px solid var(--green); }
.mini-tarif { margin-top: 18px; border-style: dashed; }

/* Aktuelles / News */
.news-karte .news-datum, .news-beitrag .news-datum { color: var(--grey); font-size: .85rem; margin: 8px 0 4px; }
.news-titel { font-size: 1.05rem; margin: 0 0 8px; }
.news-titel a { color: var(--green-dark); text-decoration: none; }
.news-titel a:hover { text-decoration: underline; }
.news-bildlink { display: block; }
/* Beitragsbild läuft über die volle Textbreite – gleiche Kante wie der Text */
.news-beitrag .news-bild { display: block; width: 100%; margin: 12px 0 20px; }
.news-cta { margin-top: 28px; border: 2px solid var(--green); }
.inline-form { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.btn-gefahr { background: #fff; color: #a33; border: 1px solid #c66; }
.btn-gefahr:hover { background: #fdf1f1; }

/* Beta-Feedback (Admin) */
.feedback-texte td { background: #FAFCFB; font-size: .9rem; padding-top: 4px; }
.feedback-texte p { margin: 4px 0; }

/* Aufwand-Vergleichsbild (Preisseite) */
.aufwand-bild { margin: 8px 0 28px; }
.aufwand-bild img { width: 100%; height: auto; border-radius: 16px; display: block; }

/* API-Schnittstelle */
.code-block { background: #0f2418; color: #d9e8de; border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: .85rem; line-height: 1.5; }
.api-schluessel-box { border: 2px solid var(--green); }
.api-schluessel { font-size: 1.05rem; word-break: break-all; background: var(--green-light); padding: 6px 10px; border-radius: 8px; display: inline-block; }

/* Timeline & Steps */
.timeline { list-style: none; border-left: 3px solid var(--green); padding-left: 22px; display: grid; gap: 16px; margin-bottom: 22px; }
.timeline li { position: relative; font-size: .97rem; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2.5px solid #fff; box-shadow: 0 0 0 2px var(--green); }
.tl-date { display: block; font-weight: 800; color: var(--green-dark); font-size: .86rem; }
.steps { padding-left: 22px; display: grid; gap: 12px; color: var(--ink); }
.steps li { font-size: .98rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #FAFCFB; padding: 36px 0 18px; margin-top: 40px; }
.footer-quellen { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.footer-quellen-titel { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft, #5a6b62); margin: 0 0 10px; }
.footer-quellen-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-quellen-links a { color: var(--green-dark); text-decoration: none; font-size: .85rem; white-space: nowrap; }
.footer-quellen-links a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
.footer-brand { font-weight: 800; color: var(--green-dark); margin-bottom: 8px; }
.footer-note { font-size: .82rem; color: var(--grey); margin-bottom: 8px; max-width: 68ch; }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links a { color: var(--green-dark); text-decoration: none; font-weight: 600; font-size: .9rem; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; font-size: .8rem; color: var(--grey); }

/* Blazor */
#blazor-error-ui { background: #B91C1C; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
#blazor-error-ui a { color: #fff; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 12px 16px; font-size: .9rem; }
}

/* Mobil & kleine Tablets: Kopfzeile zweizeilig, nichts bricht mitten im Wort um */
@media (max-width: 700px) {
  .site-header { position: static; } /* dreizeiliger Kopf soll mobil nicht kleben */
  .nav { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 24px; height: 24px; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px 16px; }
  .nav-links a { white-space: nowrap; font-size: .9rem; padding: 4px 0; }
  .nav-cta { padding: 8px 14px; }
  .hero { padding: 40px 0 48px; }
  .hero-sub { padding: 36px 0; }
  .section { padding-top: 44px; padding-bottom: 44px; }
  .kopfzeile { flex-wrap: wrap; gap: 10px; }
  /* Tabellen: seitlich wischen statt quetschen */
  .tabelle { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .footer-mth { flex-wrap: wrap; }
  .footer-version { float: none; display: block; margin-top: 4px; }
}

/* Bild-Slots (erscheinen nur, wenn Dateien in wwwroot/img/ liegen) */
.hero-inner { display: flex; gap: 40px; align-items: center; }
.hero-copy { flex: 1 1 60%; }
.hero-art { flex: 0 1 38%; margin: 0; }
.hero-paket { flex: 0 1 40%; min-width: 0; max-width: 460px; height: auto; }
.hero-paket img { width: 100%; height: auto; display: block; }
/* KI-Kennzeichnung (siehe Impressum → Bildnachweise) */
.ki-bild { position: relative; }
.ki-label { position: absolute; right: 8px; bottom: 8px; background: rgba(9, 28, 19, .55);
  color: #fff; font-size: .66rem; letter-spacing: .04em; padding: 2px 9px;
  border-radius: 999px; pointer-events: none; }
.card-illu { display: block; width: 100%; margin: -6px auto 8px; }
.card-illu img, .card-illu svg { display: block; width: 100%; max-height: 130px; object-fit: contain; }
/* Hochgeladene Fotos (News/Startseiten-Karten): festes Seitenverhältnis, zuschneiden statt strecken */
.card-illu img[src^="/medien/"] { max-height: none; height: auto; aspect-ratio: 1.91 / 1;
  object-fit: cover; object-position: center; border-radius: 8px; }
/* Video-Vorschaubilder: 16:9 wie der Player */
.tutorial-thumb img { max-height: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* Im Beitrag selbst: Bild vollständig und unverzerrt zeigen */
.news-bild img, .card-illu.news-bild img[src^="/medien/"] { max-height: none; height: auto;
  aspect-ratio: auto; object-fit: contain; border-radius: 8px; }
.hero-art img { border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.28); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
/* Ausnahme: das Isometrie-Paket ist eine Grafik – kein Zuschnitt, kein Schatten-Rahmen */
.hero-paket img { border-radius: 0; box-shadow: none; aspect-ratio: auto; object-fit: contain; }
.card-media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-img { margin: 0; }
.card-img img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-media .card-body { padding: 22px 26px 26px; }
.card-media:not(:has(.card-img)) .card-body { padding: 26px; }
@media (max-width: 900px) { .hero-art { display: none; } }

/* Formulare, Tabellen, Designer (Sprint 2) */
.formular { display: grid; gap: 8px; max-width: 460px; margin: 18px 0; }
.formular-breit { max-width: 640px; }
.formular label { font-weight: 600; font-size: .92rem; margin-top: 8px; }
.formular input, .formular select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.formular input:focus, .formular select:focus { outline: 2px solid var(--green); border-color: var(--green); }
.formular input[type="color"] { padding: 2px; height: 42px; width: 100%; }
.formular button { margin-top: 14px; justify-self: start; border: 0; cursor: pointer; }
.formular h2 { margin-top: 18px; font-size: 1.1rem; color: var(--green-dark); }
.formular-zeile { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
/* Eingaben in einer Zeile bündig unten ausrichten – auch wenn ein Label zweizeilig umbricht */
.formular-zeile > div { display: flex; flex-direction: column; justify-content: flex-end; }
.label-hinweis { font-weight: 400; font-size: .82rem; color: var(--ink-soft, #5b6b62); }
/* ---------- Tarifverwaltung: bündiges Raster mit gestylten Inline-Feldern ---------- */
.tarif-liste { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 14px 0; }
.tarif-raster { display: grid; grid-template-columns: 1.3fr .9fr .8fr .9fr .7fr .7fr .6fr auto minmax(190px, auto); gap: 12px; align-items: center; padding: 10px 14px; }
.tarif-kopf { background: #EAF2ED; font-weight: 700; font-size: .88rem; color: var(--green-dark); }
.tarif-zeile { border-top: 1px solid var(--line); margin: 0; }
.tarif-zeile:nth-child(odd) { background: #FAFCFB; }
.tarif-zeile input:not([type="checkbox"]) { min-width: 0; width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-size: .95rem; font-family: inherit; }
.tarif-zeile input:focus { outline: 2px solid var(--green); border-color: var(--green); }
.tarif-wert { font-size: .95rem; color: var(--grey); white-space: nowrap; }
.tarif-aktiv { white-space: nowrap; font-size: .92rem; }
.tarif-aktionen { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 900px) {
    .tarif-raster { grid-template-columns: 1fr 1fr; }
    .tarif-kopf { display: none; }
}
.footer-version { float: right; opacity: .55; font-size: .8rem; }
/* Partner-Bereich: bewusst einfach und groß */
.partner-schritte { margin: 10px 0 18px 20px; display: grid; gap: 8px; font-size: 1.02rem; }
.partner-link { background: var(--green-light); border: 1.5px dashed var(--green); border-radius: 10px; padding: 14px 16px; font-size: 1.05rem; overflow-wrap: anywhere; }
/* Prüf-Status (Freischalte-Queue) */
.pruef-ok { color: var(--green-dark); font-weight: 700; font-size: .85rem; }
.pruef-warnung { color: #B91C1C; font-weight: 700; font-size: .85rem; }
.pruef-offen { color: var(--grey); font-size: .85rem; }
/* Vorlagen-Verwaltung */
.vorlage-block { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 10px 14px; background: #FAFCFB; }
.vorlage-block summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .98rem; }
.vorlage-block textarea, .code-editor { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-family: ui-monospace, Consolas, monospace; font-size: .86rem; line-height: 1.5; }
.vorlage-block textarea:focus, .code-editor:focus { outline: 2px solid var(--green); border-color: var(--green); }
.formular-fuss { font-size: .85rem; color: var(--grey); margin-top: 10px; max-width: 62ch; }
.checkbox-zeile { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; }
.hinweis-fehler { background: #FDECEC; border-left: 4px solid #B91C1C; padding: 10px 14px; border-radius: 0 8px 8px 0; color: #7F1D1D; }
.hinweis-ok { background: var(--green-light); border-left: 4px solid var(--green); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.tabelle { width: 100%; border-collapse: collapse; margin: 14px 0 30px; font-size: .95rem; }
.tabelle th { text-align: left; background: var(--green-light); color: var(--green-dark); padding: 10px 12px; }
.tabelle td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tabelle .aktionen form { display: inline; }
.btn-klein { padding: 6px 14px; font-size: .85rem; }
.btn-warn { background: #B45309; color: #fff; }
.btn-warn:hover { background: #92400E; }
.btn-etikett { background: #fff; color: var(--green-dark); border: 1.5px solid var(--green); }
.btn-etikett:hover { background: var(--green); color: #fff; }
.btn-link { background: none; border: none; color: var(--green-dark); font-weight: 600; cursor: pointer; text-decoration: underline; font-size: .95rem; }
/* Ankündigungs-Banner Startseite (Admin → Vorlagen → banner-startseite) */
.ankuendigung { background: #B45309; color: #fff; }
.ankuendigung-inner { padding: 10px 20px; text-align: center; font-weight: 600; }
.ankuendigung-inner p { margin: 0; display: inline; }
.ankuendigung a { color: #fff; text-decoration: underline; }
.kopfzeile { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.kopfzeile h1 { color: var(--green-dark); }
/* Knopfleiste im Seitenkopf: sauber umbrechen statt ausfransen */
.kopfzeile .aktionen { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.qr-rahmen { max-width: 320px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; box-shadow: var(--shadow); }
.qr-rahmen svg { width: 100%; height: auto; display: block; }
.designer { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; margin-top: 20px; }
.designer-vorschau { display: grid; gap: 12px; justify-items: start; }
.download-reihe { display: flex; flex-wrap: wrap; gap: 10px; }
.dokument-liste { padding-left: 20px; display: grid; gap: 8px; margin: 14px 0; }
.dokument-meta { color: var(--grey); font-size: .85rem; }
@media (max-width: 900px) { .designer { grid-template-columns: 1fr; } }

/* Fehlerseiten */
.fehler-referenz { display: inline-block; background: var(--green-light); padding: 8px 16px; border-radius: 8px; font-size: 1.05rem; letter-spacing: .5px; }

/* Kundenverwaltung + Navigation */
.suchzeile { display: flex; gap: 10px; align-items: center; margin: 10px 0 6px; }
.suchzeile input[type="search"] { flex: 1; max-width: 420px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: .95rem; }
.btn-neutral { background: var(--green-light); color: var(--green-dark); }
.btn-neutral:hover { background: #DCEBE2; }
.zurueck-link { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.zurueck-link:hover { text-decoration: underline; }
.formular textarea { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 1rem; font-family: inherit; resize: vertical; }
.nachweis-beschreibung { font-size: 1.02rem; color: var(--ink); margin: 6px 0 14px; white-space: pre-line; }
.nachweis-logo { max-height: 64px; max-width: 220px; margin-bottom: 14px; }
.nachweis-marke { font-weight: 700; color: var(--green-dark); letter-spacing: .02em; margin: 0 0 4px; }
.nachweis-erzeuger { background: #F4F7F5; border-radius: 10px; padding: 12px 16px; margin: 14px 0; }
.nachweis-erzeuger h2 { font-size: .95rem; margin: 0 0 6px; color: var(--green-dark); }
.nachweis-erzeuger p { margin: 0; }
.formular-zwischen { margin: 14px 0 2px; font-size: 1rem; color: var(--green-dark); }

/* Admin-Menü + Dashboard */
/* Admin-Menü: kompakte Pillen, umbruchfest (kein zweizeiliges "Kunde anlegen",
   kein Spreizen über die volle Breite, Abmelden bleibt sichtbar) */
.admin-menue { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -24px 0 26px; }
.admin-menue a { padding: 7px 14px; text-decoration: none; color: var(--grey); font-weight: 600;
                 font-size: .92rem; white-space: nowrap; background: #fff;
                 border: 1px solid var(--line); border-radius: 999px; }
.admin-menue a:hover { color: var(--green-dark); border-color: var(--green); }
.admin-menue a.aktiv { background: var(--green); border-color: var(--green); color: #fff; }
.admin-menue-platz { flex: 1; min-width: 8px; }
/* Kunden-Detailseite: Reiter (Übersicht / Kundendaten / Tarif / Nachweise / Auftraggeber / Funktionen) */
.kunden-reiter { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 24px;
                 border-bottom: 2px solid var(--line); padding-bottom: 10px; }
.kunden-reiter a { padding: 6px 13px; text-decoration: none; color: var(--grey); font-weight: 600;
                   font-size: .92rem; white-space: nowrap; background: #fff;
                   border: 1px solid var(--line); border-radius: 8px; }
.kunden-reiter a:hover { color: var(--green-dark); border-color: var(--green); }
.kunden-reiter a.aktiv { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
/* Funktionsübersicht: schmale Beschriftungsspalte, Werte daneben */
.uebersicht-tabelle td:first-child { white-space: nowrap; font-weight: 600; width: 1%; padding-right: 18px; vertical-align: top; }
.admin-menue form { margin-left: auto; }
.admin-menue .btn-link { white-space: nowrap; }
.kpi-reihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin: 10px 0 30px; }
.kpi { display: grid; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow); text-decoration: none; }
.kpi-wert { font-size: 2rem; font-weight: 800; color: var(--green-dark); }
.kpi-name { font-size: .85rem; color: var(--grey); font-weight: 600; }
.kpi-achtung .kpi-wert { color: #B45309; }
.suchzeile select { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: .95rem; }

/* Lösch-Aktionen im Admin */
.btn-loeschen { background: #B91C1C; color: #fff; }
.btn-loeschen:hover { background: #7F1D1D; }
.loesch-form { display: inline-flex !important; gap: 8px; align-items: center; margin-left: 10px; }
.checkbox-zeile.klein { font-size: .8rem; color: var(--grey); }
.tabelle td.aktionen { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.designer-abschnitt { margin-top: 20px; font-size: 1.05rem; color: var(--green-dark); }
.mfa-wahl { display: flex; gap: 10px; margin: 10px 0 18px; }

/* Branchen-Assistent (AP10) */
.assistent-teaser { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1.5px solid var(--green); border-radius: 12px; background: #F2F9F5;
  padding: 14px 18px; margin: 6px 0 22px; flex-wrap: wrap; }
.branchen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px; margin: 14px 0 18px; }
.branchen-karte { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #FAFCFB;
  text-decoration: none; color: inherit; transition: border-color .12s, background .12s; }
.branchen-karte:hover { border-color: var(--green); background: #F2F9F5; }
.branchen-karte strong { font-size: 1.02rem; }
.branchen-karte span { font-size: .84rem; color: var(--grey); }

/* MTH-Herkunftszeile im Footer */
.footer-mth { display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; font-size: .9rem; }
.footer-mth img { display: block; height: 40px; width: auto; }

/* Entstehungsgeschichte */
.erzaehlung { max-width: 760px; }
.erzaehlung p { margin-bottom: 14px; line-height: 1.65; }

/* ---------- Scan-Statistik (Sprint 4) ---------- */
.tabelle-schmal { max-width: 520px; }
.scan-balken { color: var(--green); font-family: ui-monospace, monospace; letter-spacing: -1px; white-space: nowrap; }

/* ---------- Wissensbibliothek (Admin) ---------- */
.wissen-brotkrumen { font-size: .95rem; margin-bottom: 12px; }
.wissen-brotkrumen a { color: var(--green-dark); text-decoration: none; font-weight: 600; }
.wissen-explorer { display: grid; gap: 6px; margin-bottom: 26px; }
.wissen-eintrag { display: flex; align-items: center; gap: 10px; padding: 10px 14px;
                  border: 1px solid var(--line); border-radius: 10px; background: #fff;
                  color: var(--ink); text-decoration: none; font-weight: 600; }
.wissen-eintrag:hover { border-color: var(--green); }
.wissen-eintrag .symbol { font-size: 1.05rem; }
.wissen-ordner { background: var(--green-light); }
.wissen-meta { margin-left: auto; font-size: .8rem; color: var(--grey); font-weight: 500; }
.ablage-zone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px 18px;
               text-align: center; color: var(--grey); background: #fff; cursor: pointer;
               margin-bottom: 10px; }
.ablage-zone.aktiv { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.ablage-eingabe { display: block; margin: 10px auto 0; }
.wissen-anlegen { align-items: end; }
.wissen-pfadzeile { color: var(--grey); font-size: .9rem; }
.wissen-editor { font-family: ui-monospace, Consolas, monospace; font-size: .92rem; line-height: 1.5; }

/* Gerenderter Markdown-Inhalt im Portal-Design */
.wissen-inhalt { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
                 padding: 22px 26px; margin-bottom: 26px; box-shadow: var(--shadow); }
.wissen-inhalt h1, .wissen-inhalt h2, .wissen-inhalt h3, .wissen-inhalt h4 { color: var(--green-dark); margin: 14px 0 8px; }
.wissen-inhalt h1 { font-size: 1.5rem; } .wissen-inhalt h2 { font-size: 1.25rem; } .wissen-inhalt h3 { font-size: 1.05rem; }
.wissen-inhalt p { margin-bottom: 10px; }
.wissen-inhalt ul, .wissen-inhalt ol { margin: 0 0 10px 22px; }
.wissen-inhalt li { margin-bottom: 4px; }
.wissen-inhalt code { background: #F2F5F3; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: .9em; }
.wissen-inhalt pre { background: #1A2420; color: #E7EFE9; border-radius: 10px; padding: 12px 16px; overflow-x: auto; margin-bottom: 12px; }
.wissen-inhalt pre code { background: none; border: none; color: inherit; padding: 0; }
.wissen-inhalt blockquote { border-left: 3px solid var(--green); background: var(--green-light);
                            padding: 8px 14px; border-radius: 0 8px 8px 0; margin-bottom: 10px; }
.wissen-inhalt blockquote p { margin: 0; }
.wissen-inhalt table { border-collapse: collapse; margin-bottom: 12px; width: 100%; }
.wissen-inhalt th, .wissen-inhalt td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.wissen-inhalt th { background: var(--green-light); color: var(--green-dark); }
.wissen-inhalt hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.wissen-inhalt img { max-width: 100%; border-radius: 8px; }
.wissen-inhalt a { color: var(--green-dark); }

/* Firmenlogo-Vorschau im Portal */
.logo-vorschau { display: flex; align-items: center; gap: 16px; background: #fff;
                 border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
                 margin-bottom: 8px; width: fit-content; }
.logo-vorschau img { max-height: 64px; max-width: 220px; width: auto; }

/* Angemeldet-Anzeige in der Kopfzeile */
.nav-benutzer { color: var(--green-dark); font-weight: 600; font-size: .88rem;
                max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-abmelden { display: inline; }
.nav-cta-knopf { border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: .95rem; }
@media (max-width: 700px) { .nav-benutzer { max-width: 130px; } }

/* Wunschbox */
.wunsch-verlauf { display: grid; gap: 10px; margin: 18px 0 22px; }
.wunsch-beitrag { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: #fff; max-width: 92%; }
.wunsch-beitrag.von-admin { background: var(--green-light); border-color: var(--green); margin-left: auto; }
.wunsch-kopf { font-size: .78rem; color: var(--grey); font-weight: 600; margin-bottom: 4px; }
.wunsch-beitrag p { margin: 0; white-space: pre-line; }
.geplant-liste { list-style: none; display: grid; gap: 8px; margin: 8px 0 20px; }
.geplant-liste li { padding: 10px 14px 10px 38px; background: #fff; border: 1px solid var(--line);
                    border-radius: 10px; position: relative; font-weight: 600; }
.geplant-liste li::before { content: "→"; position: absolute; left: 14px; color: var(--green); font-weight: 800; }
.geplant-liste.umgesetzt li::before { content: "✓"; }

/* ---------- Admin: Postfächer / Mail-Agent „Vera" ---------- */
.kachel-reihe { display:flex; flex-wrap:wrap; gap:.75rem; margin:1rem 0; }
.kachel { flex:1 1 8rem; border:1px solid #d9dee5; border-radius:.5rem; padding:.75rem 1rem; background:#fff; text-align:center; }
.kachel-zahl { display:block; font-size:1.6rem; font-weight:700; line-height:1.1; }
.mail-filter a { text-decoration:none; }
.mail-filter a.aktiv { font-weight:700; text-decoration:underline; }
.mail-roh { white-space:pre-wrap; word-break:break-word; background:#f6f8fa; border:1px solid #e2e6ea; border-radius:.4rem; padding:.6rem .8rem; max-height:16rem; overflow:auto; }
.pf-editor { border:1px solid #d9dee5; border-radius:.5rem; padding:.5rem .9rem; margin:.5rem 0; background:#fff; }
.pf-editor > summary { cursor:pointer; font-weight:600; }

/* ---------- Interner Hilfe-Assistent (Chat) ---------- */
.chat-verlauf { display:flex; flex-direction:column; gap:.6rem; margin:1rem 0; }
.chat-bubble { border-radius:.6rem; padding:.55rem .8rem; max-width:46rem; }
.chat-nutzer { align-self:flex-end; background:#e8f0fe; }
.chat-vera { align-self:flex-start; background:#f4f6f8; border:1px solid #e2e6ea; }
.chat-wer { display:block; font-size:.75rem; font-weight:700; opacity:.6; margin-bottom:.15rem; }
.chat-text { white-space:pre-wrap; word-break:break-word; }

/* --- Dokument-Prüfwert (SHA-256) / Integritätsprüfung --- */
.dok-hash { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .8rem; color: var(--grey); word-break: break-all; }
.dokument-liste .dok-hash { display: block; margin-top: 3px; }
.ampel-ok { color: var(--green); font-weight: 700; }
.ampel-fehler { color: #B91C1C; font-weight: 700; }
.pruef-ablage { display: block; border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px 20px; text-align: center; color: var(--grey); cursor: pointer; transition: border-color .12s, background .12s; }
.pruef-ablage:hover, .pruef-ablage.zieht { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.pruef-ergebnis { margin: 18px 0; }
.pruef-rechnet { color: var(--grey); }
.pruef-treffer { background: var(--green-light); border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--green-dark); }
.pruef-fehlschlag { background: #FDECEC; border-left: 4px solid #B91C1C; padding: 12px 16px; border-radius: 0 8px 8px 0; color: #7F1D1D; }

/* Tarif-Preiszelle: Monats- und Jahrespreis gestapelt in einer Rasterzelle */
.tarif-preis { display: flex; flex-direction: column; gap: 3px; }
.tarif-preis input { width: 100%; }

/* --- Mail-Bearbeitung (Vera): volle Breite + Web-Ansicht --- */
.container-breit { max-width: 1540px; }
.mail-editor { max-width: none; }
.mail-editor textarea { width: 100%; font-size: 1rem; line-height: 1.5; }
.mail-webansicht { width: 100%; height: 62vh; min-height: 380px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; }
.signatur-vorschau pre { margin-top: 6px; }

/* Vertrags-Gate: Laien-Kurzerklaerung */
.vertrag-kurz h2 { margin-top: 0; font-size: 1.15rem; color: var(--green-dark); }
.vertrag-kurz ul { margin: 10px 0 0 18px; display: grid; gap: 10px; }
.vertrag-kurz li { color: var(--ink); font-size: .96rem; line-height: 1.5; }

/* ---------- Tutorials (Video-Bereich) & Teilen-Leiste ---------- */
.video-rahmen { margin: 18px 0 26px; border-radius: var(--radius); overflow: hidden;
                background: #000; box-shadow: var(--shadow); }
.video-rahmen video { display: block; width: 100%; max-height: 70vh; }
.tutorial-thumb { position: relative; display: block; }
.tutorial-thumb.klein { width: 132px; flex: 0 0 132px; border-radius: 8px; overflow: hidden; }
.tutorial-thumb .tutorial-play { position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 2rem; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); pointer-events: none; }
.tutorial-reihe-titel { margin: 26px 0 12px; }
.tutorial-reihe-titel a { text-decoration: none; color: var(--green-dark); }
.tutorial-folgenliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tutorial-folge { padding: 10px 14px; }
.tutorial-folge.aktiv { border-color: var(--green); }
.tutorial-folge-link { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.kategorie-chip { display: inline-block; padding: 2px 10px; margin-left: 6px; font-size: .8rem;
    font-weight: 600; color: var(--grey); background: #fff; border: 1px solid var(--line); border-radius: 999px;
    text-decoration: none; }
.kategorie-chip.aktiv { background: var(--green); border-color: var(--green); color: #fff; }
.kategorie-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.kategorie-filter .kategorie-chip { margin-left: 0; }
.teilen-leiste { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0; }
.teilen-titel { font-weight: 600; color: var(--grey); }

/* News-/Tutorial-Editor (Admin): volle Breite, Beschriftung über dem Feld */
.news-editor { max-width: 960px; }
.news-editor > div:not(.formular-zeile):not(.cta-row) { display: flex; flex-direction: column; }
.news-editor input, .news-editor select, .news-editor textarea { width: 100%; }
.news-editor .formular-zeile { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
.news-editor .formular-zeile label { min-height: 2.4em; display: flex; align-items: flex-end; }
.news-editor textarea { line-height: 1.5; }
.news-editor input[type="file"] { padding: 8px; background: #FAFCFB; }
/* Tutorial-Felder (Reihe/Folge/Videolänge/Video-Upload) nur zeigen, wenn Typ „Tutorial"
   gewählt ist – rein per CSS (:has reagiert live auf die Auswahl, kein Skript nötig;
   sehr alte Browser ohne :has zeigen die Felder einfach weiterhin an). */
.news-editor:has(select[name="FeldTyp"] option[value="News"]:checked) .nur-tutorial { display: none; }

/* Startseiten-Karten-Verwaltung (Admin) */
.karten-verwaltung { display: grid; gap: 12px; margin: 12px 0 30px; }
.karten-editor { padding: 14px 18px; }
.karten-editor.inaktiv { opacity: .6; border-style: dashed; }
.karten-editor-kopf { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.karten-editor-status { color: var(--grey); font-size: .85rem; }
.karten-editor-aktionen { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.karten-text p { color: var(--grey); font-size: .95rem; }
