/* ==========================================================================
   formbar Kundenportal
   Tokens aus dem formbar Design System (colors_and_type.css), Grid: Bootstrap 5.
   ========================================================================== */

@import url("bootstrap-grid.min.css");

@font-face { font-family: 'Euclid Circular B'; src: url('../Fonts/EuclidCircularB-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Euclid Circular B'; src: url('../Fonts/EuclidCircularB-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Euclid Circular B'; src: url('../Fonts/EuclidCircularB-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Euclid Circular B'; src: url('../Fonts/EuclidCircularB-Semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Euclid Circular B'; src: url('../Fonts/EuclidCircularB-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --fb-blue: #3B5AF9;
  --fb-purple: #B620E0;
  --fb-magenta: #CD2699;
  --fb-yellow: #F7B500;
  --fb-black: #000;
  --fb-white: #fff;
  --fb-gray-50: #F3F3F3;
  --fb-gray-200: #DEDEDE;
  --fb-gray-400: #AFAFAF;
  --fb-gray-500: #A0A0A0;
  --fb-gray-700: #575656;
  --fb-error: #D4407D;
  --fb-ok: #1E9E6A;
  --fb-gradient: linear-gradient(222deg, #3B5AF9 0%, #B620E0 46%, #CD2699 65%, #F7B500 100%);
  --fb-font-sans: 'Euclid Circular B', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fb-radius-md: 6px;
  --fb-radius-xl: 15px;
  --fb-radius-pill: 33px;
  --fb-ease: ease-in-out;
  --kp-nav-breite: 300px;
  --kp-gutter: 36px;
}
@media (max-width: 767.98px) { :root { --kp-gutter: 18px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--fb-font-sans);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: #fff;
  color: var(--fb-black);
}
body.kp-dunkel { background: var(--fb-black); color: var(--fb-white); }
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.01em; margin: 0 0 .5em; }
p { margin: 0 0 1em; font-weight: 400; }
.kp-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Eyebrow, Buttons, Links ---------- */
.fb-eyebrow {
  display: inline-block; position: relative; padding-left: 105px;
  font-size: 14px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500;
}
.fb-eyebrow::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 95px; height: 4px; background-image: var(--fb-gradient);
}
.fb-cta {
  --bg: var(--fb-black);
  display: inline-block; position: relative; isolation: isolate;
  font: 500 18px/24px var(--fb-font-sans); text-transform: uppercase; text-decoration: none; text-align: center;
  padding: 15px 40px; min-height: 54px; border: 0; border-radius: var(--fb-radius-pill);
  background-color: var(--bg); color: var(--fb-white); cursor: pointer;
}
.fb-cta::before, .fb-cta::after {
  content: ""; position: absolute; inset: -2px; border-radius: var(--fb-radius-pill);
  background-image: var(--fb-gradient); opacity: .8; z-index: -1;
  transition: opacity .5s var(--fb-ease), filter .5s var(--fb-ease);
}
.fb-cta::after { filter: blur(.5em); }
.fb-cta:hover::before, .fb-cta:hover::after, .fb-cta:focus-visible::after { opacity: 1; }
.fb-cta:hover::after, .fb-cta:focus-visible::after { filter: blur(1.2em); }
.fb-cta--klein { font-size: 15px; line-height: 20px; padding: 10px 24px; min-height: 0; }
.fb-cta[disabled] { opacity: .6; cursor: wait; }
.kp-hell .fb-cta { --bg: var(--fb-black); }

.kp-link {
  color: inherit; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px;
  transition: border-color .3s var(--fb-ease), opacity .3s var(--fb-ease);
}
.kp-link:hover { opacity: .7; }
.kp-link--leise { border-bottom-color: rgba(127,127,127,.5); }
.kp-knopf-text {
  background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  border-bottom: 1.5px solid currentColor;
}

/* ==========================================================================
   Anmeldung (dunkel, nach design_handoff_kundenlogin)
   ========================================================================== */
.kl { min-height: 100dvh; display: flex; flex-direction: column; background: #000; color: #fff; }
.kl-header, .kl-main, .kl-footer { padding-left: 36px; padding-right: 36px; }
.kl-header { display: flex; align-items: center; justify-content: space-between; padding-top: 25px; padding-bottom: 25px; }
.kl-header img { height: 26px; display: block; }
.kl-header__link { font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.7); text-decoration: none; transition: color .3s var(--fb-ease); }
.kl-header__link:hover { color: #fff; }
.kl-main { flex: 1; display: grid; grid-template-columns: minmax(0,1fr); align-items: center; padding-top: 40px; padding-bottom: 80px; }
.kl-grid { width: 100%; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); align-items: center; gap: 64px 120px; }
.kl-eyebrow { margin-bottom: 28px; color: #fff; }
.kl-h1 { font-size: clamp(38px, 6vw, 90px); line-height: 1.1; margin: 0 0 24px; font-weight: 500; letter-spacing: -.01em; hyphens: auto; }
.kl-lead { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; font-weight: 300; margin: 0 0 20px; max-width: 520px; text-wrap: pretty; }
.kl-text { font-size: 17px; line-height: 28px; font-weight: 400; margin: 0; max-width: 480px; color: rgba(255,255,255,.7); text-wrap: pretty; }
.kl-form { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 36px; }
.kl-fehler { font-size: 15px; line-height: 22px; color: #fff; padding: 14px 18px; background: rgba(212,64,125,.18); border-radius: 6px; }
.kl-fehler ul { margin: 0; padding-left: 18px; }
.kl-erfolg { font-size: 15px; line-height: 22px; color: #fff; padding: 14px 18px; background: rgba(255,255,255,.11); border-radius: 6px; }
.kl-feld { display: flex; flex-direction: column; gap: 12px; }
.kl-label { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; font-weight: 500; opacity: .85; }
.kl-input {
  background: transparent; border: 0; border-bottom: 2px solid rgba(255,255,255,.5); border-radius: 0;
  color: #fff; font: 500 18px var(--fb-font-sans); padding: 8px 0; outline: none; width: 100%;
}
.kl-input:focus { border-bottom-color: #fff; }
.kl-input::placeholder { color: var(--fb-gray-500); opacity: 1; }
.kl-input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 1000px #000 inset; }
.kl-passwort { position: relative; display: flex; }
.kl-passwort .kl-input { flex: 1; padding-right: 100px; }
.kl-toggle {
  position: absolute; right: 0; top: 0; bottom: 2px; background: none; border: 0; padding: 0 0 0 12px;
  color: rgba(255,255,255,.4); font: 500 11px var(--fb-font-sans); letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: color .3s var(--fb-ease);
}
.kl-toggle:hover { color: rgba(255,255,255,.8); }
.kl-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 4px; }
.kl-actions a, .kl-unterlink { font-size: 16px; line-height: 22px; color: #fff; text-decoration: none; border-bottom: 1.5px solid rgba(255,255,255,.5); padding-bottom: 2px; transition: border-color .3s var(--fb-ease); }
.kl-actions a:hover, .kl-unterlink:hover { border-bottom-color: #fff; }
.kl-hint {
  margin: 16px 0 0; padding: 22px 28px; background: rgba(255,255,255,.11); border-radius: 15px;
  font-size: 15px; line-height: 24px; font-weight: 400; color: rgba(255,255,255,.7);
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px;
}
.kl-hint a { color: #fff; text-decoration: none; border-bottom: 1.5px solid rgba(255,255,255,.5); padding-bottom: 1px; }
.kl-hint a:hover { border-bottom-color: #fff; }
.kl-regeln { margin: -16px 0 0; padding-left: 18px; font-size: 14px; line-height: 22px; font-weight: 400; color: rgba(255,255,255,.7); }
.kl-footer { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-bottom: 28px; font-size: 13px; color: rgba(255,255,255,.5); }
.kl-footer nav { display: flex; gap: 24px; }
.kl-footer a { color: rgba(255,255,255,.5); text-decoration: none; }
.kl-footer a:hover { color: #fff; }
.kl .typo3-messages, .kl .kp-meldungen { list-style: none; margin: 0; padding: 0; }

@media (max-width: 991.98px) {
  .kl-grid { gap: 48px 64px; }
  .kl-main { padding-top: 24px; padding-bottom: 64px; }
}
@media (max-width: 767.98px) {
  .kl-header, .kl-main, .kl-footer { padding-left: 18px; padding-right: 18px; }
  .kl-header { padding-top: 20px; padding-bottom: 20px; }
  .kl-main { padding-top: 16px; padding-bottom: 48px; align-items: start; }
  .kl-grid { gap: 40px; }
  .kl-eyebrow { margin-bottom: 20px; }
  .kl-h1 { margin-bottom: 16px; }
  .kl-lead { margin-bottom: 14px; }
  .kl-form { gap: 28px; }
  .kl-actions { flex-direction: column; align-items: stretch; }
  .kl-actions .fb-cta { display: block; width: 100%; }
  .kl-actions a { align-self: center; }
  .kl-hint { padding: 18px 20px; }
}

/* ==========================================================================
   Portal (nach design_handoff_kundenportal, Resources/Private/Design/Kundenportal/)
   ========================================================================== */
:root {
  --kp-grau-text: #575656;
  --kp-rand: #DEDEDE;
  --kp-flaeche: #F3F3F3;
  --kp-linie: rgba(0, 0, 0, .08);
  --kp-seite-x: 64px;
}
@media (max-width: 991.98px) { :root { --kp-seite-x: 36px; } }
@media (max-width: 575.98px) { :root { --kp-seite-x: 18px; } }

.kp-icon { display: inline-block; flex: 0 0 auto; fill: currentColor; vertical-align: middle; width: 15px; height: 14px; }
.kp-btn .kp-icon { width: 12px; height: 13px; }
.kp-zahl, .kp-tnum { font-feature-settings: 'tnum'; }

/* ---------- Rahmen ---------- */
.kp { display: flex; flex-wrap: wrap; min-height: 100vh; background: #fff; }

.kp-nav {
  flex: 1 1 264px; background: #000; color: #fff;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 36px 22px 28px; display: flex; flex-direction: column; gap: 40px;
}
.kp-nav__logo { padding: 0 14px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-decoration: none; color: #fff; }
.kp-nav__logo img { height: 22px; width: auto; display: block; }
.kp-nav__label { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }
.kp-nav__kunde { padding: 0 14px; }
.kp-nav__firma { font-size: 16px; line-height: 22px; font-weight: 500; margin: 0; }
.kp-nav__nummer { font-size: 14px; color: rgba(255,255,255,.6); margin-top: 2px; }
.kp-nav__menue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.kp-nav__menue a {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 14px; border-radius: 8px; color: #fff; text-decoration: none;
  font-size: 16px; font-weight: 500; transition: background-color .3s ease-in-out;
}
.kp-nav__menue a::before { content: ''; flex: 0 0 auto; width: 20px; height: 4px; background: rgba(255,255,255,.2); }
.kp-nav__menue a:hover { background: rgba(255,255,255,.1); }
.kp-nav__menue a[aria-current="page"] { background: rgba(255,255,255,.1); }
.kp-nav__menue a[aria-current="page"]::before { background-image: var(--fb-gradient); }
.kp-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; background-image: var(--fb-gradient);
}
.kp-nav__kontakt {
  margin-top: auto; border-top: 1.5px solid rgba(255,255,255,.25); padding: 22px 14px 0;
  display: flex; flex-direction: column; gap: 18px;
}
.kp-nav__kontakt-label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); }
.kp-person { display: flex; align-items: center; gap: 12px; }
.kp-avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
}
.kp-avatar--verlauf { border: 0; background-image: var(--fb-gradient); color: #fff; }
.kp-avatar--hell { border-color: #000; color: #000; }
.kp-person__name { font-size: 15px; font-weight: 500; }
.kp-person__rolle { font-size: 13px; color: rgba(255,255,255,.6); }
.kp-nav__links { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.kp-nav__links a { color: #fff; text-decoration: none; word-break: break-word; }
.kp-nav__links a:hover { text-decoration: underline; }
.kp-abmelden { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); text-decoration: none; transition: color .3s ease-in-out; }
.kp-abmelden:hover { color: #fff; }
.kp-nav__toggle { display: none; }

.kp-haupt { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Seitenkopf (schwarzes Band) ---------- */
.kp-kopf { background: #000; color: #fff; padding: 40px var(--kp-seite-x) 64px; display: flex; flex-direction: column; gap: 40px; }
.kp-kopf__oben { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.kp-kopf .fb-eyebrow { color: #fff; }
.kp-kopf__benutzer { display: flex; align-items: center; gap: 14px; text-align: right; }
.kp-kopf__name { font-size: 15px; font-weight: 500; }
.kp-kopf__meta { font-size: 13px; color: rgba(255,255,255,.6); }
.kp-kopf h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1.1; font-weight: 500; letter-spacing: -.01em; margin: 0; hyphens: auto; }
.kp-kopf__lead { font-size: clamp(18px, 1.8vw, 24px); line-height: 1.4; font-weight: 300; color: rgba(255,255,255,.8); max-width: 900px; margin: 16px 0 0; }

/* ---------- Inhalt ---------- */
.kp-inhalt { padding: 56px var(--kp-seite-x) 120px; max-width: 1360px; width: 100%; display: flex; flex-direction: column; gap: 56px; }
.kp-inhalt > * { margin: 0; }
.kp-h2 { font-size: 28px; line-height: 36px; font-weight: 500; margin: 0 0 20px; letter-spacing: 0; }
.kp-abschnitt__kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin-bottom: 20px; }
.kp-abschnitt__kopf .kp-h2 { margin: 0; }
.kp-label { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--kp-grau-text); margin: 0; }
.kp-grau { color: var(--kp-grau-text); }
.kp-stand { font-size: 13px; color: var(--kp-grau-text); }

.kp-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.kp-zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 56px; align-items: start; }

.kp-karte { border: 2px solid var(--kp-rand); border-radius: 15px; padding: 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kp-karte--gross { padding: 40px; gap: 28px; }
.kp-karte__kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.kp-karte__fuss { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.kp-panel { background: var(--kp-flaeche); border-radius: 15px; padding: 26px 30px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kp-panel--gross { padding: 40px; gap: 16px; }
.kp-panel--dunkel { background: #000; color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.kp-panel--dunkel::after { content: ''; position: absolute; right: -90px; bottom: -140px; width: 340px; height: 340px; background-image: var(--fb-gradient); filter: blur(60px); opacity: .55; z-index: -1; }
.kp-panel--dunkel .kp-label, .kp-panel--dunkel .kp-grau { color: rgba(255,255,255,.7); }

.kp-wert-gross { font-size: 48px; line-height: 1.1; font-weight: 500; font-feature-settings: 'tnum'; margin: 0; }
.kp-wert { font-size: 36px; line-height: 1.15; font-weight: 500; font-feature-settings: 'tnum'; margin: 0; }
.kp-wert-mittel { font-size: 28px; line-height: 1.2; font-weight: 500; margin: 0; }
.kp-text { font-size: 16px; line-height: 24px; font-weight: 400; margin: 0; }
.kp-meta { font-size: 15px; line-height: 22px; font-weight: 400; color: var(--kp-grau-text); margin: 0; }
.kp-klein { font-size: 14px; line-height: 20px; font-weight: 400; color: var(--kp-grau-text); margin: 0; }

/* Key/Value-Zeilen */
.kp-kv { margin: 0; }
.kp-kv__zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-top: 2px solid var(--kp-linie); padding: 12px 0; }
.kp-kv__zeile dt { color: var(--kp-grau-text); font-weight: 400; flex: 0 0 auto; }
.kp-kv__zeile dd { margin: 0; font-weight: 500; text-align: right; word-break: break-word; }
.kp-ausstehend { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: #2a43c4; }
.kp-ausstehend--konflikt { color: #8a6400; }

/* Listenzeilen */
.kp-liste { list-style: none; margin: 0; padding: 0; }
.kp-zeile { border-top: 3px solid var(--kp-linie); padding: 18px 0; display: flex; align-items: center; gap: 18px; }
.kp-zeile__haupt { flex: 1 1 auto; min-width: 0; }
.kp-zeile__titel { font-size: 17px; line-height: 24px; font-weight: 500; margin: 0; }

/* ---------- Buttons, Links, Pills ---------- */
.kp-btn {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 33px; padding: 12px 24px;
  font: 500 14px/20px var(--fb-font-sans); text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; border: 0; transition: background .3s ease-in-out, color .3s ease-in-out;
}
.kp-btn--primaer { background: var(--fb-gradient); color: #fff; }
.kp-btn--primaer:hover, .kp-btn--primaer:focus-visible { background: #000; }
.kp-btn--sekundaer { background: #fff; color: #000; border: 1px solid #000; padding: 11px 23px; }
.kp-btn--sekundaer:hover, .kp-btn--sekundaer:focus-visible { background: #000; color: #fff; }
.kp-btn--gross { padding: 14px 28px; }
.kp-btn[disabled] { opacity: .6; cursor: wait; }
.kp-panel--dunkel .kp-btn--primaer:hover { background: #fff; color: #000; }

.kp-pfeil { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: #000; text-decoration: none; transition: gap .3s ease-in-out; }
.kp-pfeil:hover { gap: 16px; }
.kp-pfeil .kp-icon { width: 15px; height: 14px; }
.kp-panel--dunkel .kp-pfeil { color: #fff; }

.kp-rund {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #000; color: #000; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: background .3s ease-in-out, color .3s ease-in-out; text-decoration: none; cursor: pointer;
}
.kp-rund:hover, .kp-rund:focus-visible { background: #000; color: #fff; }
.kp-rund .kp-icon { width: 12px; height: 13px; }

.kp-pill { display: inline-block; border-radius: 33px; font-size: 12px; line-height: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 4px 12px; white-space: nowrap; }
.kp-pill--offen { background-image: var(--fb-gradient); color: #fff; }
.kp-pill--fehler { background: var(--fb-error); color: #fff; }
.kp-pill--erledigt { border: 1px solid var(--kp-rand); color: var(--kp-grau-text); padding: 3px 11px; }
.kp-pill--schwarz { background: #000; color: #fff; }

.kp-segment { display: inline-flex; background: var(--kp-flaeche); border-radius: 33px; padding: 4px; gap: 4px; }
.kp-segment button {
  border: 0; background: transparent; border-radius: 33px; padding: 8px 18px; cursor: pointer;
  font: 500 13px/18px var(--fb-font-sans); text-transform: uppercase; letter-spacing: .04em; color: #000;
  transition: background .3s ease-in-out, color .3s ease-in-out;
}
.kp-segment button[aria-pressed="true"] { background: #000; color: #fff; }

/* Status-Punkt: Verlauf = in Ordnung, Gelb = Hinweis, Rot = Handlungsbedarf, Ring = pausiert */
.kp-punkt { display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background-image: var(--fb-gradient); }
.kp-punkt--gross { width: 18px; height: 18px; }
.kp-punkt--gelb { background: #F7B500; }
.kp-punkt--rot { background: var(--fb-error); }
.kp-punkt--aus { background: transparent; border: 2px solid #AFAFAF; }
.kp-status { display: flex; align-items: center; gap: 12px; }
.kp-status--klein { gap: 8px; font-size: 14px; line-height: 20px; font-weight: 400; }

/* ---------- Übersicht ---------- */
.kp-hinweis { background: var(--kp-flaeche); border-radius: 15px; padding: 22px 30px; display: flex; align-items: baseline; gap: 18px; font-size: 17px; line-height: 26px; font-weight: 400; }
.kp-hinweis::before { content: ''; flex: 0 0 auto; width: 32px; height: 4px; background-image: var(--fb-gradient); transform: translateY(-4px); }

/* ---------- Rechnungen ---------- */
.kp-tabelle-rahmen { overflow-x: auto; }
.kp-tabelle { min-width: 900px; }
.kp-tabelle__kopf, .kp-tabelle__zeile {
  display: grid; grid-template-columns: 180px 110px minmax(0, 1fr) 110px 120px 120px 56px; gap: 16px; align-items: center; padding: 0 14px;
}
.kp-tabelle__kopf { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--kp-grau-text); padding-bottom: 10px; }
.kp-tabelle__zeile { border-top: 2px solid var(--kp-linie); padding-top: 16px; padding-bottom: 16px; font-size: 15px; transition: background .3s ease-in-out; }
.kp-tabelle__zeile:hover { background: rgba(0,0,0,.04); border-radius: 8px; }
.kp-tabelle__zeile[hidden] { display: none; }
/* Gutschrift direkt unter dem gutgeschriebenen Beleg */
.kp-tabelle__zeile--bezug { border-top: 1px dashed var(--kp-rand); }
.kp-tabelle__zeile--bezug > :first-child { padding-left: 16px; position: relative; }
.kp-tabelle__zeile--bezug > :first-child::before { content: ''; position: absolute; left: 0; top: 2px; width: 8px; height: 10px; border-left: 2px solid var(--kp-rand); border-bottom: 2px solid var(--kp-rand); }
.kp-tabelle .kp-rechts { text-align: right; }
.kp-tabelle__nummer { font-weight: 500; font-feature-settings: 'tnum'; }
.kp-tabelle__notiz { display: block; font-size: 13px; line-height: 18px; color: var(--kp-grau-text); font-weight: 400; }
.kp-leer { padding: 22px 14px; border-top: 2px solid var(--kp-linie); color: var(--kp-grau-text); }

/* ---------- System & Wartung ---------- */
.kp-website { display: flex; flex-direction: column; gap: 40px; }
.kp-website + .kp-website { border-top: 3px solid var(--kp-linie); padding-top: 56px; }
.kp-statuskarte { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.kp-statuskarte__titel { font-size: 36px; line-height: 1.2; font-weight: 500; margin: 0; }
.kp-statuskarte__rechts { text-align: right; }
.kp-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.kp-kachel { background: var(--kp-flaeche); border-radius: 15px; padding: 26px; display: flex; flex-direction: column; gap: 8px; }
.kp-kachel__wert { font-size: 24px; line-height: 30px; font-weight: 500; margin: 0; word-break: break-word; }

.kp-protokoll { list-style: none; margin: 0; padding: 0; }
.kp-protokoll > li { border-top: 3px solid var(--kp-linie); }
.kp-protokoll details > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 92px minmax(0, 1fr) 40px; gap: 18px; align-items: start; padding: 18px 0;
}
.kp-protokoll details > summary::-webkit-details-marker { display: none; }
.kp-protokoll__datum { font-size: 15px; line-height: 24px; color: var(--kp-grau-text); font-feature-settings: 'tnum'; }
.kp-protokoll .kp-rund .kp-icon { transition: transform .3s ease-in-out; }
.kp-protokoll details[open] .kp-rund .kp-icon { transform: rotate(180deg); }
.kp-protokoll__inhalt { padding: 0 0 28px 110px; display: flex; flex-direction: column; gap: 20px; }
.kp-komponenten { width: 100%; border-collapse: collapse; font-size: 15px; }
.kp-komponenten th, .kp-komponenten td { text-align: left; padding: 10px 12px 10px 0; border-top: 2px solid var(--kp-linie); font-weight: 400; }
.kp-komponenten th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--kp-grau-text); font-weight: 500; border-top: 0; }
.kp-bilder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kp-bilder figure { margin: 0; }
.kp-bilder img { display: block; width: 100%; border-radius: 8px; border: 2px solid var(--kp-rand); aspect-ratio: 16 / 10; object-fit: cover; background: var(--kp-flaeche); }
.kp-bilder figcaption { margin-top: 8px; }

/* ---------- Konto ---------- */
.kp-zugang { display: flex; align-items: center; gap: 14px; border-top: 3px solid var(--kp-linie); padding: 16px 0; }
.kp-zugang__haupt { flex: 1 1 auto; min-width: 0; }
.kp-zugang__rolle { font-size: 14px; color: var(--kp-grau-text); text-align: right; }

/* Formular mit schwebendem Label (Design System) */
.kp-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px 24px; }
.kp-form > div:not([class]) { display: none; } /* Extbase-Hilfsfelder (__referrer, __trustedProperties) */
.kp-feld { position: relative; }
.kp-feld label {
  position: absolute; top: -10px; left: 13px; z-index: 1; padding: 0 6px; background: #fff;
  font-size: 14px; line-height: 20px; font-weight: 400; color: #000;
}
.kp-panel .kp-feld label { background: #fff; }
.kp-feld .kp-pflicht { background-image: var(--fb-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kp-feld input {
  width: 100%; border: 2px solid var(--kp-rand); border-radius: 6px; background: #fff;
  font: 300 17px/20px var(--fb-font-sans); color: #000; padding: 18px 19px; outline: none; transition: border-color .3s ease-in-out;
}
.kp-feld input::placeholder { color: var(--fb-gray-500); font-size: 14px; }
.kp-feld input:focus { border-color: #000; }
.kp-feld--fehler input { border-color: var(--fb-error); }
.kp-feld__fehler { display: block; margin-top: 6px; font-size: 14px; line-height: 20px; color: #a8275d; font-weight: 400; }
.kp-form__aktionen { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.kp-textlink { color: #000; font-size: 15px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.kp-vergleich { width: 100%; border-collapse: collapse; font-size: 16px; }
.kp-vergleich th, .kp-vergleich td { text-align: left; padding: 14px 16px 14px 0; border-top: 2px solid var(--kp-linie); font-weight: 400; vertical-align: top; }
.kp-vergleich th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--kp-grau-text); font-weight: 500; border-top: 0; }
.kp-vergleich .kp-alt { color: var(--kp-grau-text); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); }
.kp-vergleich .kp-neu { font-weight: 500; }

/* ---------- Meldungen ---------- */
.kp-meldungen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.kp-meldung { background: var(--kp-flaeche); border-radius: 15px; padding: 18px 26px; display: flex; align-items: baseline; gap: 16px; font-size: 16px; line-height: 24px; font-weight: 400; }
.kp-meldung::before { content: ''; flex: 0 0 auto; width: 24px; height: 4px; background-image: var(--fb-gradient); transform: translateY(-4px); }
.kp-meldung--warnung::before { background: #F7B500; }
.kp-meldung--fehler::before { background: var(--fb-error); }
.kl .kp-meldung { background: rgba(255,255,255,.11); color: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 991.98px) {
  .kp-nav { position: sticky; top: 0; z-index: 20; height: auto; flex-basis: 100%; padding: 16px var(--kp-seite-x); flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 16px; }
  .kp-nav__logo { padding: 0; flex-direction: row; align-items: center; gap: 12px; }
  .kp-nav__toggle {
    margin-left: auto; display: inline-flex; align-items: center; gap: 10px;
    background: none; border: 0; color: #fff; font: 500 13px var(--fb-font-sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; padding: 8px 0;
  }
  .kp-nav__toggle span { display: block; width: 22px; height: 2px; background: #fff; box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff; }
  .kp-nav__kunde, .kp-nav__menue, .kp-nav__kontakt { flex-basis: 100%; display: none; }
  .kp-nav.ist-offen .kp-nav__kunde { display: block; margin-top: 24px; padding: 0; }
  .kp-nav.ist-offen .kp-nav__menue { display: flex; margin-top: 20px; }
  .kp-nav.ist-offen .kp-nav__kontakt { display: flex; margin-top: 24px; padding: 22px 0 8px; }
  .kp-nav__menue a { padding-left: 0; padding-right: 0; }
  .kp-haupt { flex-basis: 100%; }
  .kp-kopf { padding-top: 28px; padding-bottom: 40px; gap: 28px; }
  .kp-inhalt { padding-top: 40px; padding-bottom: 80px; gap: 48px; }
}
@media (max-width: 575.98px) {
  .kp-kopf__benutzer { display: none; }
  .kp-karte, .kp-karte--gross { padding: 24px 20px; }
  .kp-panel, .kp-panel--gross { padding: 24px 20px; }
  .kp-wert-gross { font-size: 40px; }
  .kp-statuskarte__titel { font-size: 28px; }
  .kp-statuskarte__rechts { text-align: left; }
  .kp-protokoll details > summary { grid-template-columns: minmax(0, 1fr) 40px; }
  .kp-protokoll__datum { grid-column: 1 / -1; margin-bottom: -12px; }
  .kp-protokoll__inhalt { padding-left: 0; }
  .kp-tabelle { min-width: 0; }
  .kp-tabelle__kopf { display: none; }
  /* Mobil: Nummer und Betrag oben, Leistung und Datum darunter, Status und Download in der letzten Zeile */
  .kp-tabelle__zeile {
    grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 16px 0;
    grid-template-areas: "nummer betrag" "leistung leistung" "datum datum" "status aktion";
  }
  .kp-tabelle__zeile > :nth-child(1) { grid-area: nummer; }
  .kp-tabelle__zeile > :nth-child(2) { grid-area: datum; font-size: 13px; }
  .kp-tabelle__zeile > :nth-child(3) { grid-area: leistung; }
  .kp-tabelle__zeile > :nth-child(4) { display: none; }
  .kp-tabelle__zeile > :nth-child(5) { grid-area: betrag; text-align: right; }
  .kp-tabelle__zeile > :nth-child(6) { grid-area: status; align-self: center; margin-top: 8px; }
  .kp-tabelle__zeile > :nth-child(7) { grid-area: aktion; text-align: right; margin-top: 8px; }
}

@media print {
  .kp-nav { display: none; }
  .kp-kopf { background: #fff; color: #000; padding: 0 0 24px; }
}
