/* ──────────────────────────────────────────────────────────────────────
   GAEB Kalkulation – App-Styles
   Schlicht, professionell, viel Weißraum.
   ────────────────────────────────────────────────────────────────────── */

/* ──────────────────────────────────────────────────────────────────────
   Self-hosted Schriftart — Source Sans 3 (latin), Weights 400/500/600/700.
   Quelle: gwfh.mranftl.com/fonts/source-sans-3 (v19), woff2 only.
   Bewusst self-hosted statt von fonts.googleapis.com, damit beim Aufruf
   keine IP an Google übertragen wird (DSGVO).
   font-display:swap → System-Stack wird sofort gerendert, kein FOIT.
   ────────────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/source-sans-3/source-sans-3-v19-latin-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/source-sans-3/source-sans-3-v19-latin-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/source-sans-3/source-sans-3-v19-latin-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Source Sans 3';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/source-sans-3/source-sans-3-v19-latin-700.woff2') format('woff2');
}

:root {
    /* Palette nach Claude-Design-Mockup (2026-05): warmes Beige + dezentes Gold,
       statt des bisherigen kühlen Grau-Looks. Wirkt sich automatisch auf alle
       Seiten aus, weil die ganze CSS-Datei nur über diese Custom-Properties
       angesprochen wird. */
    --c-bg:        #f4f2ec;  /* Haupt-Hintergrund (warmes Beige) */
    --c-surface:   #ffffff;
    --c-border:    #e8e3d4;  /* Karten-Border, etwas wärmer */
    --c-border-2:  #d9d2bd;  /* dickere Linien / Dropzones */
    --c-text:      #1f1d18;  /* fast schwarz, mit Hauch Wärme */
    --c-muted:     #6b6558;
    --c-soft:      #8a8473;  /* tertiäre Texte (Datum, Meta) */
    /* Bauboost-CI in der Beige-Variante: Gold gedämpfter, mit warm-soft Akzent */
    --c-primary:   #7a6a3e;  /* Gold dunkel — primäre Aktionen */
    --c-primary-2: #645732;  /* Hover */
    --c-accent:    #b89554;  /* Gold hell — Logo-Markierungen, Akzente */
    --c-gold-soft: #ede5cf;  /* Badge-Hintergrund, Aktiv-Nav */
    /* Aliasse für Externe (Tender-Card aus Stage erbt diese Namen). Werte
       sind identisch zu --c-*, nur die Namen anders. Lieber zentral hier
       hinterlegen, als überall doppelt zu deklarieren. */
    --gold:        #7a6a3e;
    --gold-hover:  #645732;
    --gold-accent: #b89554;
    --gold-soft:   #ede5cf;
    --gold-soft-2: #f6efd9;
    --divider:     #ece8db;
    --c-brand-gray:#575757;
    --c-sidebar-bg:#faf8f2;  /* Sidebar leicht heller als der Page-Bg */
    --c-divider:   #ece8db;
    --c-ok:        #2d6b3a;
    --c-warn:      #856321;
    --c-err:       #b91c1c;
    --c-yellow-bg: #fbeecd;
    --c-green-bg:  #dff3e2;
    --c-red-bg:    #fde2e2;
    --c-blue-bg:   #e9efde;  /* Mandant-Banner, Info-Boxen — leicht ins Grüne */

    --radius: 8px;
    --shadow: 0 1px 2px rgba(31, 29, 24, .04), 0 1px 4px rgba(31, 29, 24, .06);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--c-bg);
    color: var(--c-text);
    /* Source Sans 3 wird per Google Fonts im Layout geladen. Fallback-Stack
       greift, falls die CDN-Anfrage fehlschlägt oder offline gearbeitet wird. */
    font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px; line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--c-text); margin-top: 0; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

code { background: #f0f2f5; padding: 0 .3rem; border-radius: 3px; font-size: .9em; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
button, .btn {
    display: inline-block;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    padding: .55rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    /* font-family auf inherit, damit <button>-Elemente Source Sans 3
       vom Body übernehmen. UA-Defaults (System-Sans) sehen sonst leicht
       anders aus als gleich danebenstehende <a>-Links. */
    font-family: inherit;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.2;
}
button:hover, .btn:hover { background: var(--c-primary-2); text-decoration: none; }
/* Sekundäre Buttons im neuen Beige-Look: weißer Fundament, dezente Border,
   leichter Off-White-Hover. Vorher #e9ecef (kühles Grau) — passte nicht
   mehr zur warmen Palette. */
button.secondary, .btn.secondary {
    background: #ffffff;
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
button.secondary:hover, .btn.secondary:hover {
    background: #fbfaf5;
    border-color: var(--c-border-2);
}
.btn-small { padding: .3rem .65rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; padding: .65rem 1rem; }
.btn-link {
    background: transparent; color: var(--c-primary);
    padding: .3rem .5rem; font-size: .9rem; border: 0; cursor: pointer;
}
.btn-link:hover { background: transparent; text-decoration: underline; }

/* ── Form-Felder ─────────────────────────────────────────────────────── */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=search], select, textarea {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    font-size: .95rem;
    background: #fff;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(31, 78, 121, .3);
    border-color: var(--c-primary);
}
label { display: block; font-weight: 500; margin-bottom: .2rem; font-size: .9rem; }
.field { margin-bottom: .9rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1rem; }
@media (max-width: 700px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Utilities ───────────────────────────────────────────────────────── */
.muted { color: var(--c-muted); }
.small { font-size: .87rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    background: #f0f2f5;
    color: var(--c-muted);
}
.badge.ok   { background: var(--c-green-bg);  color: var(--c-ok); }
.badge.err  { background: var(--c-red-bg);    color: var(--c-err); }
.badge.warn { background: var(--c-yellow-bg); color: var(--c-warn); }
.badge.info { background: var(--c-blue-bg);   color: var(--c-primary); }
/* Bedarfs-/Wahl-/Alternativposition: dezent neutral, mit Hover-Tooltip */
.badge.badge-optional {
    background: #eef0f3;
    color: var(--c-muted);
    border: 1px dashed var(--c-border-2);
    margin-left: .35rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
/* Bieter-Pflichteintrag (Modell/Fabrikat/Hersteller selbst auszufüllen).
   Auffälliger als „optional", weil hier echte Bearbeitung nötig ist. */
.badge.badge-bidder {
    background: #fff4d6;
    color: #8a5a00;
    border: 1px solid #f0c878;
    margin-left: .35rem;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: help;
}
.bidder-fillin-block {
    margin: .5rem 0 .75rem;
    padding: .6rem .8rem;
    background: #fff8e6;
    border-left: 3px solid #f0c878;
    border-radius: var(--radius);
}
.bidder-fillin-block strong { color: #8a5a00; }
.bidder-fillin-block .bidder-fillin-text {
    margin: .35rem 0;
    padding: 0;
    background: transparent;
    border: 0;
    font-family: inherit;
    font-size: .92em;
    line-height: 1.45;
    white-space: pre-wrap;
    color: #2a2a2a;
}

/* ──────────────────────────────────────────────────────────────────────
   LV-Pagination (Pager + Toolbar)
   ────────────────────────────────────────────────────────────────────── */
.lv-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin: .5rem 0 .75rem;
    padding: .5rem .75rem;
    background: #fafbfc;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: .9rem;
}
.lv-toolbar form {
    margin: 0;
    display: flex;
    align-items: center;
}
.lv-toolbar label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    font-weight: 500;
    color: var(--c-muted);
}
.lv-toolbar label > span {
    white-space: nowrap;
}
.lv-toolbar input[type="text"] {
    width: 130px;
    padding: .25rem .5rem;
    font-size: .9rem;
}
.lv-toolbar select {
    padding: .25rem .4rem;
    font-size: .9rem;
}
.pager-jump { margin-right: auto; }

.lv-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .5rem 0;
    padding: .25rem 0;
}
.lv-pager[data-pager-position="bottom"] {
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--c-border);
}
.pager-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem;
    align-items: center;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 .55rem;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    background: #fff;
    color: var(--c-text);
    text-decoration: none;
    font-size: .9rem;
    font-variant-numeric: tabular-nums;
    transition: background .12s, border-color .12s;
    user-select: none;
}
.pager-btn:hover:not(.disabled):not(.current) {
    background: var(--c-bg);
    border-color: var(--c-border-2);
}
.pager-btn.current {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
    font-weight: 600;
    cursor: default;
}
.pager-btn.disabled {
    opacity: .35;
    cursor: not-allowed;
    background: #fafbfc;
}
.pager-ellipsis {
    padding: 0 .25rem;
    color: var(--c-muted);
    user-select: none;
}
.pager-info {
    white-space: nowrap;
}

/* ── Setup-Seite (alt) ──────────────────────────────────────────────── */
.setup-page { padding: 2rem 1rem; }
.setup {
    max-width: 880px; margin: 0 auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}
table.checks { width: 100%; border-collapse: collapse; }
table.checks th, table.checks td {
    text-align: left; padding: .55rem .75rem;
    border-bottom: 1px solid var(--c-border);
    font-size: .92rem;
}
table.checks th {
    background: #f0f2f5; font-weight: 600; color: var(--c-muted);
    font-size: .8rem; text-transform: uppercase; letter-spacing: .03em;
}
table.checks tr.row-err td { background: #fff7f7; }
table.checks tr.row-err td:nth-child(2) { color: var(--c-err); font-weight: 600; }

/* ── Auth-Seiten (Login / Reset / Forgot) ────────────────────────────────
   Zweispaltiges Layout nach Claude-Design-Mockup:
     - Hero links: warmer Gradient mit Blueprint-Grid-Overlay,
       Brand-Block oben, Headline + Bullet-Points in der Mitte
     - Form rechts: weiße Card mit Login-Feldern, darunter die
       Legal-Links zentriert über die ganze rechte Spalte
     - Unter 960 px klappt das Hero weg, mobile-brand erscheint
       als kleiner Identifier oben in der Card
   ──────────────────────────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 960px) {
    /* Auf Mobile rutscht die Hero über die Form (single-column-Stack).
       Vorher war hero ausgeblendet + .mobile-brand in der Card — seit
       2026-05-15 zeigen wir die volle Hero auch auf Mobile, weil sie das
       Produkt klar erklärt. .mobile-brand ist entfernt. */
    .auth-page { grid-template-columns: 1fr; }
    .auth-page .hero {
        /* Stack-Layout: Logo oben, Textblock + Bottom natürlich darunter.
           1fr-Center würde sonst den Hero auf volle Viewport-Höhe ziehen,
           weil min-height: 100vh auf .auth-page wirkt — die Form käme dann
           erst weit unten. Mit auto-auto-auto bleibt die Hero kompakt. */
        grid-template-rows: auto auto auto;
        padding: 32px 24px 28px;
    }
    .auth-page .hero-center {
        /* Mehr Atemraum zwischen Logo-Zeile und Headline — Default mit
           1fr-Stretch greift auf Mobile nicht mehr, daher Margins. */
        margin: 36px 0 28px;
        max-width: none;
    }
    .auth-page .hero-headline { font-size: 32px; }
    .auth-page .hero-sub      { font-size: 15px; }
    .auth-page .hero-bottom {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    .auth-page .form-side { padding: 28px 20px 40px; }
    .auth-page .form-card { padding: 28px 24px 24px; }
}

/* ── Hero (links) ─────────────────────────────────────────────────────── */
.auth-page .hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 110%, rgba(184, 149, 84, 0.22), transparent 55%),
        radial-gradient(circle at 90% 0%,   rgba(122, 106, 62, 0.18), transparent 50%),
        linear-gradient(160deg, #f8f5ea 0%, #efe9d3 100%);
    display: grid;
    /* Drei Zeilen — Logo oben, Textblock in der Mitte (zentriert horizontal),
       Copyright unten. Dadurch sitzt der Textblock perfekt in der Mitte des
       Hero-Bereichs, unabhängig davon wo das Logo links oben sitzt. */
    grid-template-rows: auto 1fr auto;
    padding: 36px 48px 40px;
    color: var(--c-text);
}
.auth-page .hero::after {
    /* Subtile Blueprint-Grid — fängt die Bau-/Plan-Assoziation visuell ein */
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(122, 106, 62, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(122, 106, 62, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
            mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
    pointer-events: none;
}
.auth-page .hero-top,
.auth-page .hero-center,
.auth-page .hero-bottom { position: relative; z-index: 1; }

.auth-page .hero-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-page .hero-mark {
    width: 38px;
    height: auto;
    display: block;
}
.auth-page .hero-wordmark {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.2;
    text-transform: uppercase;
}
.auth-page .hero-wordmark small {
    display: block;
    font-weight: 500;
    letter-spacing: .22em;
    color: var(--c-muted);
}

.auth-page .hero-center {
    /* Horizontal mittig im Hero-Bereich; vertikal leicht oberhalb der
       geometrischen Mitte — durch das Bottom-Margin verschiebt sich der
       Schwerpunkt sichtbar nach oben. Wirkt visuell ruhiger als 100% Center,
       weil das Auge etwas oberhalb der Mitte „natürlich" landet. */
    justify-self: center;
    align-self: center;
    max-width: 460px;
    width: 100%;
    margin-bottom: 8vh;
}
.auth-page .hero-eyebrow {
    font-size: 11.5px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--c-primary-2);
    font-weight: 700;
    margin-bottom: 14px;
}
.auth-page .hero-headline {
    font-size: 38px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 0 0 18px;
    color: var(--c-text);
}
.auth-page .hero-headline em {
    font-style: normal;
    color: var(--c-primary-2);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}
.auth-page .hero-sub {
    color: var(--c-muted);
    font-size: 16px;
    line-height: 1.55;
    margin: 0 0 28px;
}
.auth-page .hero-points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.auth-page .hero-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--c-text);
}
.auth-page .hero-points .tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--c-gold-soft);
    color: var(--c-primary-2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.auth-page .hero-points .tick svg { width: 12px; height: 12px; }

.auth-page .hero-bottom {
    color: var(--c-soft);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.auth-page .trust-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--c-primary-2);
    font-weight: 600;
    letter-spacing: .01em;
}
.auth-page .trust-indicator svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Form-Side (rechts) ───────────────────────────────────────────────── */
.auth-page .form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 32px;
    background: var(--c-bg);
}
.auth-page .form-card {
    width: 100%;
    max-width: 420px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 14px;
    padding: 36px 36px 32px;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, .02),
        0 12px 32px -16px rgba(31, 29, 24, .18);
}

/* .mobile-brand wurde entfernt — die Hero ist auf Mobile sichtbar (über der
   Form gestackt) und enthält bereits Logo + Wordmark. Ein zweites Logo in
   der Card wäre Doppelung. */

.auth-page .form-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--c-text);
}
.auth-page .form-sub {
    margin: 0 0 26px;
    color: var(--c-muted);
    font-size: 14.5px;
}

/* Input-Felder mit Icon links und optional Passwort-Toggle rechts */
.auth-page .field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.auth-page .field label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--c-text);
}
.auth-page .field .input-wrap {
    position: relative;
}
.auth-page .field .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-soft);
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.auth-page .field input {
    width: 100%;
    height: 44px;
    padding: 0 44px 0 42px;
    border: 1px solid var(--c-border);
    background: #fbfaf5;
    border-radius: 8px;
    font: inherit;
    color: var(--c-text);
    transition: border-color .15s, box-shadow .15s, background .15s;
    outline: none;
}
.auth-page .field input::placeholder { color: var(--c-soft); }
.auth-page .field input:hover { border-color: var(--c-border-2); }
.auth-page .field input:focus {
    border-color: var(--c-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(122, 106, 62, 0.18);
}
.auth-page .pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    cursor: pointer;
    color: var(--c-soft);
    padding: 6px;
    border-radius: 4px;
    display: grid;
    place-items: center;
}
.auth-page .pw-toggle:hover {
    color: var(--c-text);
    background: var(--c-gold-soft);
}
.auth-page .pw-toggle svg { width: 16px; height: 16px; }

.auth-page .row-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13.5px;
}
.auth-page .forgot {
    color: var(--c-primary-2);
    font-weight: 600;
}
.auth-page .forgot:hover {
    color: var(--c-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Primary-Submit-Button mit Pfeil */
.auth-page .btn-primary {
    width: 100%;
    height: 46px;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background .15s, transform .05s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-page .btn-primary:hover { background: var(--c-primary-2); }
.auth-page .btn-primary:active { transform: translateY(1px); }
.auth-page .btn-primary svg { width: 16px; height: 16px; }

/* Legal-Footer — sitzt UNTER der Form-Card und nutzt die ganze rechte
   Spalte (über volle Breite des .form-side, nicht nur innerhalb der Card). */
.auth-page .signup-line {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--c-muted);
}
.auth-page .signup-line a {
    color: var(--c-primary-2);
    font-weight: 600;
}
.auth-page .signup-line a:hover {
    color: var(--c-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-page .legal {
    margin-top: 28px;
    text-align: center;
    font-size: 12.5px;
    color: var(--c-soft);
}
.auth-page .legal a { color: inherit; }
.auth-page .legal a:hover { color: var(--c-text); text-decoration: underline; }
.auth-page .legal .dot { margin: 0 8px; color: var(--c-border); }

/* Legal-Links sitzen in der hero-bottom-Zeile direkt neben dem © Copyright,
   nicht mehr als eigener Footer. */
.auth-page .hero-legal { display: inline-flex; align-items: center; gap: 0; }
.auth-page .hero-legal a { color: inherit; text-decoration: none; }
.auth-page .hero-legal a:hover { color: var(--c-text); text-decoration: underline; }
.auth-page .hero-legal .dot { margin: 0 8px; color: var(--c-border); }

/* ── Legal-Modal Overlay (rechte Auth-Spalte) ─────────────────────────
   Wird vom Klick auf einen Legal-Link aktiviert. Deckt die ganze rechte
   Spalte ab — inklusive Form-Card. Schließen-X oben rechts. Content kommt
   per fetch() aus /impressum?embed=1 (bzw. analog) und wird ins .legal-
   modal-body injiziert. */
.auth-page .form-side { position: relative; }
.auth-page .legal-modal {
    position: absolute;
    inset: 0;
    background: var(--c-bg);
    z-index: 50;
    display: flex;
    flex-direction: column;
}
.auth-page .legal-modal[hidden] { display: none; }
.auth-page .legal-modal-close {
    position: absolute;
    top: 24px; right: 32px;
    width: 32px; height: 32px;
    /* Kein Kreis, kein Hintergrund — nur das X-Icon. So gibt's auch keine
       visuelle Kollision mit dem Scrollbar oder dem Rand des Containers. */
    border: 0;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    display: grid; place-items: center;
    z-index: 2;
    padding: 0;
    transition: color .12s, transform .08s;
}
.auth-page .legal-modal-close:hover { color: var(--c-text); }
.auth-page .legal-modal-close:active { transform: scale(.94); }
.auth-page .legal-modal-close svg { width: 22px; height: 22px; }

.auth-page .legal-modal-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 64px 48px 48px;
}
.auth-page .legal-modal-body {
    max-width: 720px;
    margin: 0 auto;
    color: var(--c-text);
    font-size: 14.5px;
    line-height: 1.55;
}
.auth-page .legal-modal-body .page-head {
    margin-bottom: 1.25rem;
}
.auth-page .legal-modal-body .page-head h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--c-text);
    margin: 0;
}
.auth-page .legal-modal-body .card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1.5rem;
}
.auth-page .legal-modal-body h2,
.auth-page .legal-modal-body h3 {
    margin-top: 1.5rem;
    color: var(--c-text);
}
.auth-page .legal-modal-loading {
    text-align: center;
    color: var(--c-muted);
    padding: 2rem;
    font-size: 14px;
}
@media (max-width: 960px) {
    .auth-page .legal-modal-scroll { padding: 64px 24px 32px; }
}

/* ── App-Layout (eingeloggt) ─────────────────────────────────────────── */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app-nav {
    background: var(--c-sidebar-bg);
    border-right: 1px solid var(--c-divider);
    padding: 0 1.25rem 1rem;
    display: flex; flex-direction: column;
    gap: .25rem;
}
.app-brand {
    /* Links-bündiger Brand-Block nach Mockup-Look: SVG-Bildmarke obendrüber,
       Text-Wordmark darunter. Echter Text statt Pixel-Wordmark — skaliert
       sauber auf jeder Auflösung, Letter-Spacing & Größe per CSS justierbar. */
    padding: 1.25rem .25rem 1.25rem;
    margin-bottom: .25rem;
    display: flex;
    justify-content: flex-start;
}
.app-brand .brand-link {
    /* Icon + Wordmark nebeneinander (wie auf der Login-Hero) — der vertikal
       gestapelte Look passte nicht zum klaren Sidebar-Look. Jetzt: B links,
       Schriftblock daneben rechts. */
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.app-brand .brand-mark {
    /* Master: Login-Logo (.auth-page .hero-mark). Konsistent mit der
       Landingpage in landing.css (.brand img). */
    display: block;
    width: 38px;
    height: auto;
    flex-shrink: 0;
}
.app-brand .brand-wordmark {
    /* Master: Login-Logo (.auth-page .hero-wordmark). */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.2;
    color: var(--c-text);
    text-transform: uppercase;
}
.app-brand .brand-wordmark small {
    display: block;
    font-weight: 500;
    letter-spacing: .22em;
    color: var(--c-muted);
}
/* Falls irgendwo noch die alte combined-PNG-Logik gerendert wird (z.B.
   alte Layout-Includes), den Style auf brand-logo erhalten — fallback only. */
.app-brand img.brand-logo {
    display: block;
    width: 160px;
    height: auto;
}
/* .brand-tag im Sidebar-Layout entfernt — der „AUSSCHREIBUNGS ASSISTENT"-
   Untertext nahm zuviel Platz weg und wirkte redundant. Nur das Logo zählt. */
.nav-list {
    list-style: none; padding: 0; margin: 0; flex-grow: 1;
    display: flex; flex-direction: column; gap: 2px;
}
.nav-list li {
    margin: 0;
}
.nav-list li a {
    display: block;
    padding: .5rem .65rem;
    color: var(--c-text);
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 500;
}
.nav-list li a:hover {
    background: rgba(0, 0, 0, .04);
    text-decoration: none;
}
.nav-list li a.active,
.nav-list li.active a {
    background: var(--c-gold-soft);
    color: var(--c-primary-2);
    font-weight: 600;
}
.nav-list .nav-section {
    margin-top: 1rem;
    padding: .35rem .65rem;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--c-soft);
    font-size: .72rem;
    font-weight: 600;
}
.nav-list .nav-sub a {
    padding-left: 1.6rem;
    font-size: .85rem;
    color: var(--c-soft);
}
.nav-list .nav-sub a:hover,
.nav-list .nav-sub a.active {
    color: var(--c-primary);
}
.nav-bottom {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--c-divider);
}
.user-info { font-size: .87rem; }
.user-info strong { display: block; }
.ctx-banner {
    background: var(--c-blue-bg);
    border: 1px solid #d5deb9;
    border-radius: var(--radius);
    padding: .65rem .75rem;
    margin: 0 0 .9rem;
    font-size: .88rem;
}
.ctx-banner small { color: var(--c-muted); font-size: .8rem; }
.ctx-banner strong { display: block; margin: 2px 0 4px; }

.app-main {
    padding: 1.5rem 2rem;
    max-width: 1280px;
    width: 100%;
}
.app-footer {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--c-border);
    text-align: center;
    font-size: .82rem;
    color: var(--c-muted);
}
.app-footer a {
    color: var(--c-muted);
    margin: 0 .35rem;
}
.app-footer a:hover { color: var(--c-primary); }
.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: .8rem;
    color: var(--c-muted);
}
.auth-footer a {
    color: var(--c-muted);
    margin: 0 .35rem;
}
.auth-footer a:hover { color: var(--c-primary); }
@media (max-width: 800px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-nav { border-right: 0; border-bottom: 1px solid var(--c-border); }
    .app-main { padding: 1rem; }
}

/* ── Page-head ───────────────────────────────────────────────────────── */
.page-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem;
}
.page-head h1 { margin: 0; }

/* ── Welcome-Header (Dashboard) ──────────────────────────────────────────
   Persönliche Begrüßung mit Tageszeit-Variante (PHP-seitig gesetzt) und
   rechts der Datums-/Mandanten-Info. Trennt sich vom Rest per dezenter
   Bottom-Border. */
.welcome-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--c-divider);
    flex-wrap: wrap;
}
.welcome-text h1 {
    margin: 0 0 .25rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--c-text);
}
.welcome-text h1 .wave {
    display: inline-block;
    transform-origin: 70% 70%;
    margin-left: .3rem;
    /* Winkt zweimal beim Page-Load, dann ruht es. Subtile Begrüßung,
       kein Dauer-Loop, der nervt. */
    animation: welcome-wave 2.6s ease-in-out .4s 2;
}
@keyframes welcome-wave {
    0%, 60%, 100% { transform: rotate(0); }
    10%, 30%, 50% { transform: rotate(14deg); }
    20%, 40%      { transform: rotate(-8deg); }
}
.welcome-text p {
    margin: 0;
    color: var(--c-muted);
    font-size: .96rem;
    max-width: 60ch;
}
.welcome-meta {
    text-align: right;
    color: var(--c-muted);
    font-size: .87rem;
    line-height: 1.55;
}
.welcome-meta .date {
    font-weight: 600;
    color: var(--c-text);
}
@media (max-width: 700px) {
    .welcome-header { align-items: flex-start; }
    .welcome-meta { text-align: left; }
}

/* ── Cards ───────────────────────────────────────────────────────────── */
/* Lade-Spinner im Button (z.B. Feature-Vorschlag-Modal) */
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .65s linear infinite;
    vertical-align: middle;
}

.card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
}
.card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .9rem;
}
.card-head h2 { margin: 0; }

/* ── Tabellen ────────────────────────────────────────────────────────── */
.data-table {
    width: 100%; border-collapse: collapse;
    font-size: .92rem;
}
.data-table th, .data-table td {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--c-border);
    text-align: left;
    vertical-align: top;
}
.data-table th {
    color: var(--c-muted); font-weight: 600;
    font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
    background: #fafbfc;
}
.data-table tbody tr:hover { background: #fafbfc; }
.data-table .num { text-align: right; }

/* ── Stammdaten-Live-Suche ───────────────────────────────────────────── */
.stammdaten-search-box {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 .85rem;
    flex-wrap: wrap;
}
.stammdaten-search-box input.stammdaten-search {
    flex: 1 1 240px;
    min-width: 200px;
    max-width: 480px;
    padding: .45rem .7rem;
    border: 1px solid var(--c-border-2);
    border-radius: var(--radius);
    background: #fff;
    font-size: .95rem;
}
.stammdaten-search-box input.stammdaten-search:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 2px rgba(121, 102, 54, .18);
}
.stammdaten-search-box .search-count {
    color: var(--c-muted);
    font-size: .85rem;
    white-space: nowrap;
}

/* ── Preis-Strategie-Card (collapsible) ──────────────────────────────── */
.pricing-strategy-details > summary::-webkit-details-marker { display: none; }
.pricing-strategy-details > summary { user-select: none; }
.pricing-strategy-details[open] > summary .pricing-strategy-toggle {
    transform: rotate(90deg);
}


.pricing-strategy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}
.pricing-strategy-row select.form-select {
    padding: .35rem .65rem;
    border: 1px solid #c4c9d2;
    border-radius: .25rem;
    background: #fff;
    font-size: .95rem;
    min-width: 11rem;
    transition: background-color .4s, box-shadow .15s;
}
.pricing-strategy-row select.form-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(44, 110, 247, .25);
    border-color: var(--c-primary, #2c6ef7);
}
.pricing-strategy-desc {
    color: #555;
    font-size: .92rem;
    margin-left: .25rem;
}

/* ── News-Card (Major-Updates auf Dashboard) ─────────────────────────── */
.news-card { margin-top: 1.25rem; }
.news-card .card-head h2 { display: inline-flex; align-items: center; gap: .4rem; }
.news-list {
    list-style: none;
    margin: 0;
    padding: 0 .85rem 0 0; /* etwas Platz rechts, damit der Scrollbar nicht den Text überdeckt */
    /* Etwa 3 Einträge sichtbar, der Rest scrollt innerhalb der Box.
       Höhe vom Inhalt abgeleitet (3 × ca. 95px + leichter Puffer). */
    max-height: 320px;
    overflow-y: auto;
    /* Sanfter Indikator am unteren Rand, dass es weitergeht */
    mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
    scrollbar-width: thin;
    scrollbar-color: var(--c-border-2) transparent;
}
.news-list::-webkit-scrollbar { width: 6px; }
.news-list::-webkit-scrollbar-track { background: transparent; }
.news-list::-webkit-scrollbar-thumb {
    background: var(--c-border-2);
    border-radius: 3px;
}
.news-list::-webkit-scrollbar-thumb:hover { background: var(--c-muted); }
.news-entry {
    display: grid;
    /* Feste linke Spalte: Icon + Datum + Badge bleiben stabil,
       kein Springen des Textes bei unterschiedlich langen Daten. */
    grid-template-columns: 148px 1fr;
    gap: .25rem 1rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--c-border);
    /* Beide Spalten oben ausrichten */
    align-items: start;
}
.news-entry:last-child { border-bottom: 0; }
.news-entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .35rem;
    font-size: .8rem;
    padding-top: .1rem; /* optischer Ausgleich zur Titelzeile */
}
.news-icon { font-size: 1.1rem; line-height: 1; }
.news-date {
    font-variant-numeric: tabular-nums;
    color: var(--c-muted);
    white-space: nowrap;
}
.news-tag {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.news-tag-new       { background: rgba(121, 102, 54, .12);  color: var(--c-primary); }
.news-tag-improved  { background: rgba(198, 180, 101, .25); color: #6b5818; }
.news-tag-fix       { background: var(--c-yellow-bg);       color: var(--c-warn); }
.news-entry-body { min-width: 0; }
.news-title { display: block; margin-bottom: .15rem; color: var(--c-text); }
.news-text { margin: 0; color: var(--c-muted); font-size: .92rem; line-height: 1.45; }
@media (max-width: 720px) {
    .news-entry { grid-template-columns: 1fr; }
}

/* ── Stat-Grid (Dashboard) ───────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .9rem;
}
.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform .08s, box-shadow .12s;
}
a.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}
.stat-value {
    font-size: 2rem; font-weight: 700; color: var(--c-text);
}
.stat-label {
    color: var(--c-muted); font-size: .85rem;
}

/* ── Inline-Form (Stammdaten "neue Zeile") ─────────────────────────── */
.inline-form {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch;
}
.inline-form input, .inline-form select {
    width: auto; flex: 1 1 140px; min-width: 0;
}
.inline-form button {
    flex: 0 0 auto;
}

/* ── Inline-Editing (Tabellen-Inputs) ───────────────────────────────── */
table.data-table.editable td {
    padding: .35rem .45rem;
    /* Text-Zellen (TYP-Badge, Quelle, Summe) müssen vertikal mittig zum
       Input-Höhe-Niveau sitzen — sonst sieht der Badge „MATERIAL" und der
       Summe-Text leicht höher aus als die Inputs in den Nachbar-Zellen. */
    vertical-align: middle;
}
table.data-table .inline-edit {
    width: 100%;
    padding: .3rem .4rem;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    font-size: .9rem;
}
table.data-table .inline-edit:hover {
    border-color: var(--c-border);
    background: #fafbfc;
}
table.data-table .inline-edit:focus {
    outline: 2px solid rgba(31, 78, 121, .25);
    border-color: var(--c-primary);
    background: #fff;
}
table.data-table .inline-edit.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
table.data-table .inline-edit.saving {
    background: #fff7d6;
}
table.data-table .inline-edit.saved {
    background: var(--c-green-bg);
    transition: background .8s ease;
}

/* Cost-Lines-Tabelle: Beschreibungs-Spalte deutlich breiter, damit auch
   längere Material-/Lohn-/Geräte-Bezeichnungen lesbar sind. Die anderen
   Spalten (Mengen, Preise) brauchen wenig Platz; die Description darf
   den Rest schlucken. Verhindert das frühere Truncate-Problem
   („Geländer mit Handlauf montier…"). */
.cost-lines-table {
    table-layout: auto;
    width: 100%;
}
.cost-lines-table th:nth-child(3),
.cost-lines-table td:nth-child(3) {
    width: 36%;
    min-width: 280px;
}
.cost-lines-table input[data-field="description"] {
    width: 100%;
    min-width: 100%;
    text-overflow: ellipsis;
}
/* Description-Textarea: wrap und auto-height. Die Höhe wird per JS
   gesetzt (siehe app.js, autoResizeCostLineDesc), CSS sorgt nur für
   die Optik (kein Resize-Handle, kein Scrollbar, Wort-Umbruch). */
.cost-lines-table textarea.cl-desc-area {
    width: 100%;
    min-width: 100%;
    min-height: 1.7em;  /* sichtbar bleiben falls auto-resize 0 liefert (geschlossenes <details>) */
    resize: none;
    overflow: hidden;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    line-height: 1.35;
    font: inherit;
    color: inherit;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: transparent;
    box-sizing: border-box;
}
.cost-lines-table textarea.cl-desc-area:focus {
    border-color: #d4c896;
    background: #fffdf6;
    outline: none;
}

/* ── Stammdaten-Tabellen: Spalten-Breiten ──────────────────────────────
   Gleiche Logik wie bei den Cost-Lines: Text-Spalten (Bezeichnung,
   Stichwörter, Tätigkeit) bekommen prozentual mehr Platz, damit der
   Inhalt voll lesbar ist. Andere Spalten (Einheit, Preis, Aktion)
   bleiben bei natürlicher Breite. */

/* Materialien-Tabelle: Bezeichnung (1), Lieferant (4), Stichwörter (5) */
#materials-table { table-layout: auto; width: 100%; }
#materials-table th:nth-child(1),
#materials-table td:nth-child(1) { width: 24%; min-width: 220px; }
#materials-table th:nth-child(4),
#materials-table td:nth-child(4) { width: 16%; min-width: 140px; }
#materials-table th:nth-child(5),
#materials-table td:nth-child(5) { width: 28%; min-width: 240px; }

/* Aufwandswerte-Tabelle: Gruppe (1), Tätigkeit (2) */
#labor-table { table-layout: auto; width: 100%; }
#labor-table th:nth-child(1),
#labor-table td:nth-child(1) { width: 18%; min-width: 160px; }
#labor-table th:nth-child(2),
#labor-table td:nth-child(2) { width: 30%; min-width: 240px; }

/* Geräte-Tabelle: Bezeichnung (1), Anbieter (4) */
#equipment-table { table-layout: auto; width: 100%; }
#equipment-table th:nth-child(1),
#equipment-table td:nth-child(1) { width: 30%; min-width: 240px; }
#equipment-table th:nth-child(4),
#equipment-table td:nth-child(4) { width: 18%; min-width: 160px; }

/* Leistungsgruppen-Tabelle: Name (2), Stichwörter (4) */
#service-groups-table { table-layout: auto; width: 100%; }
#service-groups-table th:nth-child(2),
#service-groups-table td:nth-child(2) { width: 22%; min-width: 200px; }
#service-groups-table th:nth-child(4),
#service-groups-table td:nth-child(4) { width: 35%; min-width: 280px; }

/* Inputs der Stammdaten-Tabellen: 100% der Cell-Breite einnehmen
   (Default-inline-edit-CSS oben hat schon width:100%, hier nur sicher
   gehen, dass die ellipsis-Verkürzung nicht zuschlägt). */
#materials-table .inline-edit,
#labor-table .inline-edit,
#equipment-table .inline-edit,
#service-groups-table .inline-edit {
    width: 100%;
    min-width: 0; /* Flexbox-Schutz, falls Browser sonst tausenden Pixel nimmt */
}

/* Aufklappbare Erklärungs-Boxen oben auf den Stammdaten-Seiten.
   Standard-<details>-Marker zeigt Browser-eigenes Dreieck — wir lassen
   das so, weil's vertraut ist und auf den ersten Blick erkennbar
   ankündigt, dass hier was zum Aufklappen ist. */
details.stammdaten-help > summary {
    list-style: revert; /* nutzt Browser-Default-Marker */
    user-select: none;
}
details.stammdaten-help[open] > summary {
    margin-bottom: .25rem;
}
details.stammdaten-help > summary:hover {
    text-decoration: underline;
}
table.data-table .inline-edit.save-error {
    background: var(--c-red-bg);
    border-color: var(--c-err);
}

/* ── Dropzone (PDF-Upload mit Drag & Drop) ─────────────────────────── */
.dropzone {
    position: relative;
    border: 2px dashed var(--c-border-2);
    border-radius: var(--radius);
    background: #fafbfc;
    padding: 0;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--c-primary); background: #f3f7fb; }
.dropzone.is-dragover {
    border-color: var(--c-primary);
    background: var(--c-blue-bg);
    border-style: solid;
}
/* Während ein Upload läuft (JS setzt .is-busy + aria-busy):
   Dropzone ist gedimmt, klick/drag wird sichtbar verweigert. Verhindert
   parallele PDF-Uploads, die jeweils einen separaten Anthropic-Call
   produzieren würden. Hover-Effekt explizit zurücknehmen, damit die
   Sperre auch beim Mouse-Over deutlich bleibt. */
.dropzone.is-busy {
    opacity: .55;
    cursor: not-allowed !important;
    pointer-events: none; /* Drag&Drop-Events blockieren */
    border-style: solid;
    border-color: var(--c-border-2);
    background: #f3f3f3;
}
.dropzone.is-busy:hover {
    border-color: var(--c-border-2);
    background: #f3f3f3;
}
.dropzone input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0; cursor: pointer;
    width: 100%; height: 100%;
}
.dropzone-inner {
    padding: 2rem 1.5rem;
    text-align: center;
    pointer-events: none; /* damit nur der äußere Klick zählt */
}
.dropzone-inner button { pointer-events: auto; }
.dropzone-icon { font-size: 2.4rem; margin-bottom: .5rem; opacity: .6; }
.dropzone-text { margin: 0 0 .35rem; font-size: 1rem; }
.dropzone-text strong { color: var(--c-primary); }
.dropzone-inner .btn-link { font-size: 1rem; padding: 0; }

/* Indeterminate-Animation für unbekannten Fortschritt (KI-Analyse) */
.progress-bar.indeterminate {
    background: linear-gradient(
        90deg,
        var(--c-primary) 0%,
        var(--c-primary-2) 30%,
        var(--c-primary) 60%,
        var(--c-primary-2) 100%
    );
    background-size: 200% 100%;
    animation: indeterminateMove 1.4s linear infinite;
}
@keyframes indeterminateMove {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ── Fortschrittsbalken (Batch-Verarbeitung) ───────────────────────── */
.progress-panel {
    border-left: 4px solid var(--c-primary);
}
.progress-bar-wrap {
    width: 100%;
    background: #eef0f3;
    border-radius: 999px;
    overflow: hidden;
    height: 14px;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--c-primary), var(--c-primary-2));
    transition: width .3s ease;
    border-radius: 999px;
}

/* ── Status + Zuständig auf einer Zeile ─────────────────────────────── */
.status-assignee-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: .4rem;
    flex-wrap: nowrap;
}
.status-row,
.assignee-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.meta-label {
    font-size: .78rem;
    color: var(--c-muted);
    white-space: nowrap;
}
.status-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--c-border);
    border-radius: 20px;
    padding: .25rem .9rem .25rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    background-color: #f5f5f3;
    color: var(--c-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;
    padding-right: 1.8rem;
    transition: border-color .15s, background-color .15s;
    outline: none;
}
.status-select:hover {
    border-color: var(--c-primary);
}
.status-select--in_progress {
    background-color: var(--c-yellow-bg, #fffbeb);
    border-color: #e6c84a;
    color: #7a6200;
}
.status-select--submitted {
    background-color: var(--c-blue-bg, #eff6ff);
    border-color: #93b4e8;
    color: #1e40af;
}
.status-select--won {
    background-color: var(--c-green-bg, #f0fdf4);
    border-color: #6bcf8f;
    color: #166534;
}
.status-select--lost {
    background-color: var(--c-red-bg, #fff1f2);
    border-color: #f4a7ae;
    color: #9f1239;
}
.status-select--archived {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #6b7280;
}

/* ── Inline-Edit Projekt-Titel (Stift) ─────────────────────────────── */
.project-title-wrap {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    flex-wrap: wrap;
}
.project-title-display {
    cursor: text;
}
.project-title-display:hover {
    background: linear-gradient(transparent 75%, rgba(31, 78, 121, .12) 75%);
    border-radius: 3px;
    padding: 0 .15rem;
    margin: 0 -.15rem;
}
.project-title-input {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.15;
    padding: .15rem .45rem;
    border: 2px solid var(--c-primary);
    border-radius: var(--radius);
    width: auto;
    min-width: 280px;
    max-width: 100%;
    background: #fff;
    color: var(--c-text);
    font-family: inherit;
}
.title-edit-btn {
    background: transparent;
    color: var(--c-muted);
    padding: .15rem .4rem;
    font-size: .9rem;
    border: 0;
    border-radius: 4px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s ease;
}
.project-title-wrap:hover .title-edit-btn,
.title-edit-btn:focus { opacity: 1; }
.title-edit-btn:hover {
    background: #f0f2f5;
    color: var(--c-primary);
}
.project-title-wrap.saving .project-title-input { opacity: .55; }
.project-title-wrap.saved .project-title-display {
    animation: titleSaved 1.2s ease-out;
}
@keyframes titleSaved {
    0%   { background-color: #b9e6c5; }
    100% { background-color: transparent; }
}

/* ── PDF-Import Review-Tabelle ─────────────────────────────────────── */
table.review-table {
    font-size: .9rem;
}
table.review-table th {
    font-size: .72rem;
    padding: .5rem .35rem;
}
table.review-table td {
    padding: .35rem;
    vertical-align: top;
}
table.review-table input {
    width: 100%;
    padding: .35rem .5rem;
    font-size: .88rem;
    box-sizing: border-box;
}
table.review-table input.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
/* Bestehender Eintrag → leicht ausgegraut, Default-Häkchen aus */
table.review-table tr.row-exists td {
    background: #fafbfc;
}
table.review-table tr.row-exists input[type="text"],
table.review-table tr.row-exists input[type="number"],
table.review-table tr.row-exists input:not([type]) {
    color: var(--c-muted);
}

/* ── Audit-Log Filter-Form ─────────────────────────────────────────── */
form.audit-filter {
    display: grid;
    grid-template-columns: 1.4fr 1.4fr 0.9fr 0.9fr auto;
    gap: .75rem 1rem;
    align-items: end;
}
form.audit-filter .field { margin-bottom: 0; }
form.audit-filter button + .btn { margin-left: .5rem; }
@media (max-width: 800px) {
    form.audit-filter { grid-template-columns: 1fr 1fr; }
}

/* Audit-Log: lange Filenames / Tokens in der Details-Spalte umbrechen.
   Ohne diese Regeln sprengt ein einzelner Underscore-String (z.B.
   "Angebot_2026-05-001_BSR_018_Metallbauarbeiten_LV_15082023.pdf") die
   ganze Tabelle, weil der Browser bei `_` per Default nicht trennt und
   die Auto-Layout-Engine die Spalte content-getrieben aufbläst. */
.data-table td.audit-details {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ── Wizard: Schritt-Indikator + Footer ────────────────────────────── */
.wizard-steps {
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: .65rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}
.wizard-steps ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex; flex-wrap: wrap;
    gap: .25rem;
    align-items: center;
}
.wizard-steps .step {
    padding: .3rem .85rem;
    border-radius: 999px;
    font-size: .88rem;
    color: var(--c-muted);
    background: #f0f2f5;
}
.wizard-steps .step a, .wizard-steps .step span { color: inherit; text-decoration: none; }
.wizard-steps .step + .step::before {
    content: "→";
    color: var(--c-muted);
    margin-right: .25rem;
    margin-left: -.5rem;
    padding-right: .35rem;
}
.wizard-steps .step-active  { background: var(--c-primary); color: #fff; font-weight: 600; }
.wizard-steps .step-done    { background: var(--c-green-bg); color: var(--c-ok); }
.wizard-steps .step-done a:hover { text-decoration: underline; }
.wizard-steps .step-pending { opacity: .55; }

.wizard-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; gap: .75rem;
}

/* ── Verweis-Hinweis (z.B. "wie Pos. 01.0010") ─────────────────────── */
.ref-hint {
    background: #fff7d6;
    border: 1px solid #f0c674;
    border-left: 4px solid var(--c-warn);
    border-radius: var(--radius);
    padding: .5rem .75rem;
    margin: .5rem 0 .75rem;
    font-size: .9rem;
    color: var(--c-text);
}
.ref-hint a {
    display: inline-block;
    margin: 0 .15rem;
    padding: 0 .3rem;
    background: #fff;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
}
.ref-hint a:hover { text-decoration: underline; }

/* ── Langtext-Block (Position aufgeklappt, Baubeschreibung) ───────── */
.longtext-block { margin: .5rem 0 1rem; }
.longtext-block summary {
    cursor: pointer;
    color: var(--c-primary);
    font-size: .85rem;
    padding: .25rem 0;
    user-select: none;
}
.longtext-block summary:hover { text-decoration: underline; }
pre.longtext {
    white-space: pre-wrap;
    word-break: break-word;
    background: #fafbfc;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .75rem 1rem;
    margin: .5rem 0 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--c-text);
    max-height: 480px;
    overflow-y: auto;
}

/* Editierbarer Langtext (ersetzt das alte Read-Only-<pre>) */
.longtext-editor { margin: .5rem 0 0; }
textarea.longtext-edit {
    width: 100%;
    box-sizing: border-box;
    background: #fafbfc;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: .75rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--c-text);
    resize: vertical;
    min-height: 6rem;
    overflow: hidden; /* Auto-Resize via JS — kein interner Scrollbalken */
}
textarea.longtext-edit:focus {
    outline: none;
    border-color: var(--c-primary);
    background: #fff;
}
.longtext-edit-toolbar {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .5rem;
}
.longtext-edit-toolbar .btn-sm {
    padding: .35rem .9rem;
    font-size: .82rem;
}
.longtext-edit-status { font-size: .8rem; }

/* ── LV-Position: Status-Indikator ──────────────────────────────────
   Konzept: alle "fertig kalkulierten" Positionen (egal ob Stammdaten,
   KI oder manuell) bekommen eine einheitliche grüne Tönung + grünen Balken.
   Rote Positionen ("muss noch") bleiben neutral und stechen so hervor.
*/
tr.pos-row > td:first-child {
    border-left: 4px solid transparent;
}

/* Ganze Positions-Zeile ist klickbar (klappt das Detail auf) → Pointer-
   Cursor als Affordance. Das EP-Preisfeld bleibt ein Eingabefeld und
   behält den Text-Cursor, damit klar ist: hier wird editiert, nicht geklappt. */
tr.pos-row, tr.match-row { cursor: pointer; }
tr.pos-row > td.cell-ep,
tr.pos-row > td.cell-ep * { cursor: text; }

/* Feste Spaltenbreiten für die Positions-Tabelle. Ohne das nutzt die
   Tabelle table-layout:auto und berechnet die Spaltenbreiten aus dem
   breitesten Zelleninhalt. Beim Aufklappen einer Detail-Zeile (colspan
   über alle Spalten, mit innerer Cost-Lines-Tabelle + Langtext) wächst
   der Mindest-Inhalt → die sichtbaren Spalten verschieben sich. Mit
   table-layout:fixed bleiben die Breiten konstant, egal was aufklappt.
   Scope: nur DIESE Tabelle (erkennbar am data-cost-line-endpoint). */
table.data-table[data-cost-line-endpoint] { table-layout: fixed; width: 100%; }
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(1),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(1) { width: 90px; }   /* Pos.-Nr */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(3),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(3) { width: 72px; }   /* Menge */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(4),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(4) { width: 64px; }   /* Einheit */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(5),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(5) { width: 140px; }  /* Match */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(6),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(6) { width: 130px; }  /* EP € */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(7),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(7) { width: 110px; }  /* GP € */
table.data-table[data-cost-line-endpoint] > thead > tr > th:nth-child(8),
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(8) { width: 76px; }   /* Aktionen */
/* Spalte 2 (Kurztext) bleibt ohne feste Breite → bekommt den Rest. */
table.data-table[data-cost-line-endpoint] > tbody > tr.pos-row > td:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* EP- und GP-Zellen auf eine Höhe bringen.
   EP ist ein <input>, GP ist plain <strong>-Text. Ohne explizite vertical-
   align-Regel sitzt der Input optisch tiefer (höhere Linebox durch Border +
   Padding), GP-Text wirkt dadurch „darüber". Wir zentrieren beide Zellen
   und ziehen die Innenränder des EP-Inputs zusammen, sodass die Zahlen
   bündig auf einer Linie stehen. */
tr.pos-row > td.cell-ep,
tr.pos-row > td.cell-gp {
    vertical-align: middle;
}
tr.pos-row > td.cell-ep .pos-ep-edit {
    vertical-align: middle;
    padding-top: .2rem;
    padding-bottom: .2rem;
    line-height: 1.3;
}
/*
   Zwei Stufen:
     1. Nur „gematched" (Status grün/gelb gesetzt, KI war noch nicht dran):
        Zeile bleibt komplett WEISS — Status-Badge (gelb/rot) zeigt den
        Vorab-Match-Status an, das reicht. Sonst wirken Zeilen vor der
        KI-Schätzung fälschlich „fertig grün".
     2. Tatsächlich kalkuliert (.is-calculated, gesetzt sobald KI gelaufen
        ist bzw. die Position vollständig aus Stammdaten kommt): kräftige
        Stripe + dezente Hintergrund-Tönung — signalisiert „Position fertig".
   So sieht der User auf einen Blick, was noch durch die KI muss.
   Nur error/manual zeigen schon vor Kalkulation eine farbige Markierung,
   weil sie vom User aktiv bearbeitet werden müssen.
*/
tr.pos-row.status-red       > td:first-child { border-left-color: #e88; }
/* status-manual: User-Zuweisung – orange Markierung */
tr.pos-row.status-manual    > td:first-child { border-left-color: #f0a040; }
/* status-error: KI-Fehler – kräftiges Rot, stärker als reiner red */
tr.pos-row.status-error     > td:first-child { border-left-color: #d84040; }

/* status-yellow: Stammdaten-Teil-Match. Schon vor der Kalkulation einen
   gelben Strich — gleiches Gelb wie die GELB-Badge (var(--c-yellow-bg)),
   damit Stripe und Badge visuell zusammengehören. */
tr.pos-row.status-yellow    > td:first-child { border-left-color: var(--c-yellow-bg); }

/* Wenn tatsächlich kalkuliert: kräftige grüne Stripe + grüne Tönung.
   Gelb (Teil-Stammdaten + KI-Ergänzung) bekommt nach abgeschlossener
   Kalkulation dieselbe grüne Markierung wie green/ki_only — denn ab dem
   Moment ist die Position fertig, der Match-Ursprung (Stammdaten vs. KI)
   ist nur noch über die Badge erkennbar. */
tr.pos-row.status-yellow.is-calculated  > td:first-child,
tr.pos-row.status-green.is-calculated   > td:first-child,
tr.pos-row.status-ki_only.is-calculated > td:first-child {
    border-left-color: #4a9362;
}
tr.pos-row.status-yellow.is-calculated  > td,
tr.pos-row.status-green.is-calculated   > td,
tr.pos-row.status-ki_only.is-calculated > td { background-color: rgba(74, 147, 98, .10); }

/* status-manual: dezente orange Tönung – „User hat zugewiesen, ggf. prüfen" */
tr.pos-row.status-manual    > td { background-color: rgba(240, 160, 64, .10); }
/* status-error: deutlichere rote Tönung – „KI ist gescheitert, hier muss was passieren" */
tr.pos-row.status-error     > td { background-color: rgba(216, 64, 64, .12); }
/* status-red: keine Tönung – sticht als "noch zu tun" heraus */

/* ── Info-only Zeilen (Section-Header / Hinweistexte aus X83) ──────────
   Strukturelle LV-Elemente, die NICHT kalkuliert werden, aber in der
   Tabelle inline mit den Positionen stehen, damit das LV in seiner
   Original-Gliederung sichtbar bleibt. */
tr.info-only > td {
    background-color: #f1f3f6;
    border-top: 2px solid var(--c-border);
}
tr.info-only.info-section > td {
    /* Untertitel als deutliche Zwischenüberschrift */
    background-color: #e8eef5;
    color: var(--c-text);
    font-weight: 600;
    font-size: .98rem;
    padding-top: .85rem;
    padding-bottom: .55rem;
}
tr.info-only.info-hint > td {
    /* Hinweistexte: dezenter, mit linker Akzent-Leiste. Inhalt ist als
       <details>-Block aufklappbar — Italic-Style nur in der Summary, im
       aufgeklappten Volltext wieder normal. */
    border-left: 3px solid #b8c2d1;
    color: var(--c-muted);
    padding: .55rem 1rem;
}
tr.info-only .info-text {
    white-space: pre-wrap;
    line-height: 1.45;
}
.info-hint-details > summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: .15rem 0;
}
.info-hint-details > summary::-webkit-details-marker { display: none; }
.info-hint-details > summary:hover {
    color: var(--c-text);
}
.info-hint-details[open] > summary {
    border-bottom: 1px dashed var(--c-border);
    padding-bottom: .35rem;
    margin-bottom: .25rem;
}

/* Aufklapp-Button: dreht sich, wenn die Zeile geöffnet ist.
   Generisch auf jede Zeile mit .open — funktioniert dann auch auf der
   Matching-Seite, wo der Wrapper tr nicht .pos-row sondern .match-row heißt. */
.toggle-btn {
    display: inline-block;
    transition: transform .2s ease-in-out;
    font-size: 1rem;
    line-height: 1;
}
tr.open .toggle-btn {
    transform: rotate(180deg);
}

/* ── Live-Highlight für gerade fertig kalkulierte LV-Zeilen ────────── */
tr.pos-row.just-estimated > td {
    /* startet hellgrün, fadet über 2.4s zurück */
    animation: justEstimated 2.4s ease-out;
}
@keyframes justEstimated {
    0%   { background-color: #b9e6c5; }   /* sattes Hellgrün am Anfang */
    25%  { background-color: #d6f1de; }
    100% { background-color: transparent; }
}

/* ── Aufklappbare Detail-Zeilen (Projekt-Show) ─────────────────────── */
tr.cost-detail { display: none; background: #fafbfc; }
tr.cost-detail.open { display: table-row; }
tr.cost-detail > td { padding: .5rem 1rem 1rem; }

tr.costline-material td { background: rgba(26, 127, 55, .04); }
tr.costline-labor    td { background: rgba(180, 83, 9,  .04); }
tr.costline-equipment td{ background: rgba(31, 78, 121, .04); }
tr.costline-markup   td { background: rgba(126, 34, 206, .05); }

/* ── Flash-Messages ─────────────────────────────────────────────────── */
.flash {
    padding: .65rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: .92rem;
    line-height: 1.5;
    border: 1px solid transparent;
    /* `pre-line` kollabiert mehrfache Whitespaces zu einem (wie normales
       HTML) — wichtig, weil das Layout-Template aus Lesbarkeits-Gründen
       eingerückt wird und sonst die Indentation als sichtbarer Leerraum
       VOR dem Flash-Text gerendert würde. Newlines bleiben aber erhalten,
       damit mehrzeilige Flashes (z.B. „Setup-Link\n\n...") weiterhin
       korrekt umbrechen. */
    white-space: pre-line;
    /* `overflow-wrap: break-word` greift NUR bei wirklich unbreakable
       Strings (z.B. lange URLs ohne Whitespace). Vorher stand hier
       `word-break: break-word`, das aggressiver ist und auch Wörter mit
       Bindestrichen wie „E-Mail" mitten im Wort umgebrochen hat — sah
       in schmalen Boxen wie der Login-Card hässlich aus. */
    overflow-wrap: break-word;
    word-break: normal;
}
.flash-success { background: var(--c-green-bg);  color: var(--c-ok);   border-color: #b8dcc1; }
.flash-error   { background: var(--c-red-bg);    color: var(--c-err);  border-color: #f4bcbc; }
.flash-warning { background: var(--c-yellow-bg); color: var(--c-warn); border-color: #f0c674; }
.flash-info    { background: var(--c-blue-bg);   color: var(--c-primary); border-color: #c7d8ec; }

/* ──────────────────────────────────────────────────────────────────────
   Dashboard Split-Layout: links Aktions-/Projekt-Stack, rechts Cross-Sell
   ────────────────────────────────────────────────────────────────────── */
.dashboard-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
    /* `align-items: start` statt `stretch`: jede Spalte behält ihre
       natürliche Höhe. Vorher hat das stretch zusammen mit `flex: 1` auf
       der rechten Card dafür gesorgt, dass die Cross-Sell-Box auf die
       volle Höhe der linken Spalte gezogen wurde — bei vielen Projekten
       entstand dadurch viel Leerraum unter dem Angebot. */
    align-items: start;
}
.dashboard-split.is-single {
    /* Wenn keine Cross-Sell-Angebote da sind, fällt der Stack auf 1 Spalte */
    grid-template-columns: 1fr;
}
.dashboard-split-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}
.dashboard-split-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (max-width: 980px) {
    .dashboard-split {
        grid-template-columns: 1fr;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   „Letzte Projekte"-Tabelle auf dem Dashboard
   Lange Projekt-Namen abschneiden statt das Layout zu sprengen, und
   den Auftragswert nicht umbrechen (das „€" bleibt am Betrag).
   ────────────────────────────────────────────────────────────────────── */
.dashboard-split-left .data-table {
    table-layout: fixed;
    width: 100%;
}
/* Abgabe-Frist-Pille in der Name-Spalte der „Letzte Projekte"-Tabelle.
   Sehr kompakt, vertical-aligned zum Link-Text. Farben matchen die
   Deadline-Box auf der Projekt-Detailseite. Wird nur gerendert wenn
   date_offer hinterlegt — bei fehlendem Datum keine Pille. */
.recent-projects-deadline {
    display: inline-block;
    padding: 1px 6px;
    margin-left: 6px;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 3px;
    vertical-align: middle;
    white-space: nowrap;
}
.recent-projects-deadline.deadline--ok       { background: #e9efde; color: #4a6c30; }
.recent-projects-deadline.deadline--warn     { background: #ffe9d6; color: #a4541f; }
.recent-projects-deadline.deadline--critical { background: #fde2e2; color: #b91c1c; }
.recent-projects-deadline.deadline--past     { background: #ede5cf; color: #6b6558; }

/* Spaltenbreiten: NAME bekommt mehr Platz für die langen Projekt-Namen,
   STATUS reicht das aus, was das längste Label („In Bearbeitung") braucht. */
.recent-projects-table colgroup col.col-name    { width: 52%; }
.recent-projects-table colgroup col.col-status  { width: 12%; }
.recent-projects-table colgroup col.col-amount  { width: 20%; }
.recent-projects-table colgroup col.col-updated { width: 16%; }

/* Dashboard card-head mit zwei Links */
.card-head-links { display: flex; gap: .75rem; align-items: center; }
.card-head-links .all-link { white-space: nowrap; }

/* "Letzte Projekte"-Card: Tabelle exakt im Mockup-Look — leichtere Header
   (uppercase, soft color, letter-spaced), größerer Body-Text, dezente
   Divider-Lines, kein Header-Hintergrund. Eigene Selektoren mit höherer
   Spezifität, damit die globalen .data-table-Defaults überschrieben werden. */
.recent-projects-card .card-head {
    margin-bottom: .25rem;
}
.recent-projects-card .card-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.recent-projects-card .all-link {
    font-size: .9rem;
    color: var(--c-primary-2);
    font-weight: 600;
}
.recent-projects-card .all-link:hover {
    color: var(--c-primary);
    text-decoration: none;
}
.recent-projects-card .recent-projects-table {
    font-size: .92rem;
}
.recent-projects-card .recent-projects-table thead th {
    text-align: left;
    background: transparent;
    color: var(--c-soft);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .75rem .75rem .75rem 0;
    border-bottom: 1px solid var(--c-divider);
}
.recent-projects-card .recent-projects-table thead th.num {
    text-align: right;
}
.recent-projects-card .recent-projects-table tbody td {
    padding: .9rem .75rem .9rem 0;
    border-bottom: 1px solid var(--c-divider);
    font-size: .92rem;
    vertical-align: middle;
}
.recent-projects-card .recent-projects-table tbody tr:last-child td {
    border-bottom: none;
}
.recent-projects-card .recent-projects-table tbody tr:hover {
    background: transparent; /* Mockup hat keinen Row-Hover */
}
.recent-projects-card .recent-projects-table tbody td:first-child {
    color: var(--c-primary-2);
    font-weight: 600;
}
.recent-projects-card .recent-projects-table tbody td:first-child a {
    color: inherit;
    text-decoration: none;
}
.recent-projects-card .recent-projects-table tbody td:first-child a:hover {
    color: var(--c-primary);
}
/* Datum-Spalte: einzeilig, nicht zwischen Datum + Uhrzeit umbrechen. */
.recent-projects-card .recent-projects-date {
    white-space: nowrap;
    color: var(--c-muted);
}
/* Status-Pill im Projekte-Kontext: rechteckig (4px) statt rund (999px),
   exakt nach Mockup. Gilt nur innerhalb der Recent-Projects-Card, damit
   die globalen Pillen-Badges (Stammdaten, Wizard, …) unverändert bleiben. */
.recent-projects-card .recent-projects-table .badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    /* nowrap, sonst bricht „In Bearbeitung" bei schmaler Status-Spalte um.
       Mit table-layout:fixed overflowed der Badge dann lieber, statt zu
       wrappen — wir geben der Spalte über col.col-status aber genug Breite. */
    white-space: nowrap;
}
.recent-projects-name {
    /* Ellipsis-Truncation auf Zellen-Ebene: greift unabhängig von der
       PHP-seitigen Hartkappe und passt sich der tatsächlichen Spalten-
       breite an. */
    max-width: 1px; /* table-layout: fixed nimmt sich die übrige Breite */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-projects-name a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}
.dashboard-split-left .data-table .num {
    /* „24.542.483,02 €" darf nicht zwischen Betrag und € umbrechen. */
    white-space: nowrap;
}

/* ──────────────────────────────────────────────────────────────────────
   Cross-Selling-Gallery auf dem Dashboard
   Ein Angebot sichtbar, Pfeile + Punkt-Indikator + Swipe-Geste.
   ────────────────────────────────────────────────────────────────────── */
.cross-sell-gallery {
    position: relative;
    margin-top: .25rem;
}
.cross-sell-viewport {
    overflow: hidden;
    border-radius: var(--radius);
}
.cross-sell-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    transition: transform .35s cubic-bezier(.4, .15, .2, 1);
    will-change: transform;
}
.cross-sell-track.is-dragging {
    transition: none;
}
.cross-sell-slide {
    flex: 0 0 100%;
    min-width: 100%;
    /* Flex-Item soll nicht horizontal "schrumpfen" wegen langer Texte */
    box-sizing: border-box;
}
.cross-sell-arrow {
    position: absolute;
    top: 90px; /* mittig auf dem Bild (Bild ist 180px hoch) */
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(4px);
    color: var(--c-text);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: background .15s, transform .12s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    padding: 0;
}
.cross-sell-arrow:hover {
    background: #fff;
    transform: scale(1.05);
}
.cross-sell-arrow:active {
    transform: scale(.95);
}
.cross-sell-arrow:disabled {
    opacity: 0;
    pointer-events: none;
}
.cross-sell-prev { left: .6rem; }
.cross-sell-next { right: .6rem; }

.cross-sell-dots {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin-top: .85rem;
}
/* SR-only-Variante: Dots als zusätzlicher Bedienpfad bleiben im DOM
   (Tablist + ARIA), sind aber visuell ausgeblendet, weil die neue
   Pfeil+Zähler-Navigation darunter sichtbar steuert. */
.cross-sell-dots.is-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;
}

/* Neue Inline-Navigation: kleine runde Pfeil-Buttons + "1 / N"-Zähler
   sitzen kompakt unter dem CTA-Bereich, statt als Overlay über dem Bild
   zu schweben. Wenn .cross-sell-arrow innerhalb von .cross-sell-nav steht,
   überschreiben wir die alten absolute-positioned-Defaults. */
.cross-sell-nav {
    display: flex;
    align-items: center;
    gap: .5rem;
    /* Horizontal-Padding bündig mit der cross-sell-body, Bottom kleiner,
       damit die Buttons schön knapp am Karten-Rand sitzen. */
    padding: 0 1.25rem 1.1rem;
    margin-top: -.25rem;
}
.cross-sell-nav .cross-sell-arrow {
    position: static;
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-muted);
    box-shadow: none;
    backdrop-filter: none;
    display: grid; place-items: center;
    padding: 0;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
}
.cross-sell-nav .cross-sell-arrow svg {
    width: 14px; height: 14px;
}
.cross-sell-nav .cross-sell-arrow:hover {
    border-color: var(--c-primary);
    color: var(--c-primary-2);
    background: var(--c-gold-soft);
    transform: none;
}
.cross-sell-nav .cross-sell-arrow:active {
    transform: scale(.94);
}
.cross-sell-nav .cross-sell-arrow:disabled {
    opacity: .4;
    pointer-events: none;
}
.cross-sell-count {
    margin-left: auto;
    font-size: .8rem;
    color: var(--c-soft);
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}
.cross-sell-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: var(--c-border-2);
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.cross-sell-dot:hover {
    background: var(--c-muted);
}
.cross-sell-dot.is-active {
    background: var(--c-primary);
    transform: scale(1.3);
}

/* Admin-Formular für Cross-Sell-Angebote */
.stacked-form > label,
.stacked-form > fieldset {
    display: block;
    margin-bottom: 1rem;
}
.stacked-form label > span {
    display: block;
    margin-bottom: .25rem;
    font-weight: 500;
    font-size: .9rem;
}
.stacked-form label > span em {
    color: var(--c-err);
    font-style: normal;
}
.stacked-form .grid-2 > label {
    display: block;
    margin-bottom: 1rem;
}
.stacked-form fieldset {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: .9rem 1rem;
    background: #fafbfc;
}
.stacked-form fieldset legend {
    padding: 0 .4rem;
    font-weight: 500;
    font-size: .92rem;
    color: var(--c-muted);
}
.stacked-form .inline-checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .5rem 0;
    font-weight: normal;
    font-size: .92rem;
}
.stacked-form .inline-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}
.stacked-form .form-actions {
    display: flex;
    gap: .6rem;
    margin-top: 1.25rem;
}
.cross-sell-current-image img {
    max-width: 360px;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--c-border);
}
.image-spec-hint {
    background: var(--c-blue-bg);
    border: 1px solid #d8c989;
    border-radius: var(--radius);
    padding: .65rem .85rem;
    margin-bottom: .9rem;
    line-height: 1.5;
}
.image-spec-hint strong {
    color: var(--c-text);
}

/* ──────────────────────────────────────────────────────────────────────
   FAQ-Akkordeon im Hilfe-Bereich
   ────────────────────────────────────────────────────────────────────── */
.faq-section h2 {
    margin: 0 0 1rem;
}
.faq-item {
    border-top: 1px solid var(--c-border);
    padding: .5rem 0;
}
.faq-item:first-of-type {
    border-top: 0;
}
.faq-item summary {
    cursor: pointer;
    padding: .5rem 0;
    user-select: none;
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.45;
    color: var(--c-text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: "▸";
    position: absolute;
    left: 0;
    top: .55rem;
    font-size: .85rem;
    color: var(--c-primary);
    transition: transform .15s ease;
    transform-origin: center;
}
.faq-item[open] summary::before {
    transform: rotate(90deg);
}
.faq-item summary:hover {
    color: var(--c-primary);
}
.faq-body {
    padding: .25rem 0 .85rem 1.5rem;
    line-height: 1.6;
    color: var(--c-text);
}
.faq-body p:first-child { margin-top: 0; }
.faq-body p:last-child  { margin-bottom: 0; }
.faq-body ul, .faq-body ol {
    margin: .5rem 0;
    padding-left: 1.4rem;
}
.faq-body code {
    background: var(--c-bg);
    padding: .1rem .35rem;
    border-radius: 3px;
    font-size: .92em;
}

/* Während live laufender (oder pausierter) KI-Schätzung blenden wir die
   destruktiven Action-Buttons (Kalkulation zurücksetzen, KI-Schätzung neu
   starten, Excel-Export) komplett aus. Klick auf eines dieser drei Elemente
   würde den laufenden Batch verfälschen oder eine inkonsistente Datei
   exportieren. Der User soll während des Laufs nur Pause / Fortsetzen /
   Abbrechen sehen — alles andere ist erst wieder sinnvoll, wenn der Batch
   abgeschlossen ist (dann entfernt finishBatch() die body-Klasse wieder).
   Navigation auf andere Seiten bleibt erlaubt: der Worker läuft serverseitig
   weiter, autoResumeBatchIfRunning() nimmt das Polling beim Wiederkehren
   automatisch auf. */
body.is-calculating .nav-blocked-during-batch {
    display: none !important;
}
/* Pause/Fortsetzen-Paar: das jeweils inaktive Element bleibt sichtbar, ist
   aber deutlich gedimmt und nicht klickbar. Damit ist immer klar, welche
   Aktion gerade möglich ist und welche „die andere Seite" wäre. */
.estimate-action-pair button[disabled] {
    opacity: .45;
    cursor: not-allowed;
}

/* ──────────────────────────────────────────────────────────────────────
   Modal-Dialog (bbConfirm / bbAlert) im Bauboost-Look
   Ersetzt die nativen Browser-confirm/alert-Boxen.
   ────────────────────────────────────────────────────────────────────── */
.bb-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 22, 26, .55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: bb-overlay-in .14s ease-out;
}
.bb-modal-overlay.is-closing {
    animation: bb-overlay-out .12s ease-in forwards;
}
.bb-modal {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    max-width: 480px;
    width: 100%;
    padding: 1.25rem 1.5rem 1.1rem;
    animation: bb-modal-in .16s cubic-bezier(.2, .9, .3, 1.1);
}
.bb-modal-title {
    margin: 0 0 .55rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--c-text);
}
.bb-modal-message {
    margin: 0;
    color: var(--c-text);
    font-size: .94rem;
    line-height: 1.55;
    white-space: pre-wrap; /* damit \n im Text als echte Zeilenumbrüche erscheinen */
}
.bb-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    margin-top: 1.25rem;
}
.bb-modal.is-danger [data-action="confirm"] {
    background: var(--c-err);
    border-color: var(--c-err);
}
.bb-modal.is-danger [data-action="confirm"]:hover {
    background: #9d1818;
    border-color: #9d1818;
}
@keyframes bb-overlay-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes bb-overlay-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bb-modal-in {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .bb-modal-overlay, .bb-modal { animation: none; }
}

/* ──────────────────────────────────────────────────────────────────────
   KI-Disclaimer Dialog (HTML5 <dialog>) — Hinweis nach KI-Kalkulation
   Eigene Optik mit dem warmen Warnton (gelbliches Beige), damit der
   User den Hinweis sofort als „Achtung, KI-geschätzt" wahrnimmt. Der
   native ::backdrop wird auf das gleiche Dunkelgrau wie bei bbConfirm
   gelegt, damit beide Modal-Typen gleich „schwer" wirken.
   ────────────────────────────────────────────────────────────────────── */
.ki-disclaimer-dialog {
    border: 1px solid #e0c78f;
    border-left: 4px solid #f0c878;
    border-radius: var(--radius);
    background: #fff8e6;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    max-width: 560px;
    width: calc(100% - 2rem);
    padding: 0;
    color: var(--c-text);
}
.ki-disclaimer-dialog::backdrop {
    background: rgba(20, 22, 26, .55);
}
.ki-disclaimer-content {
    padding: 1.4rem 1.6rem 1.15rem;
    line-height: 1.55;
}
.ki-disclaimer-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .75rem;
}
.ki-disclaimer-content p {
    margin: 0 0 .75rem;
    font-size: .94rem;
}
.ki-disclaimer-content p:last-of-type {
    margin-bottom: 0;
}
.ki-disclaimer-dialog[open] {
    animation: bb-modal-in .16s cubic-bezier(.2, .9, .3, 1.1);
}
@media (prefers-reduced-motion: reduce) {
    .ki-disclaimer-dialog[open] { animation: none; }
}

/* Cross-Sell-Slide: das Slide selbst ist KEINE eigene Card mehr — die äußere
   .cross-sell-section trägt Border + Radius (siehe unten). Hier nur noch
   Struktur (flex column + Position-Anker für das Badge). Verhindert
   "Card-in-Card"-Doppelborder und erlaubt das randlose Vollbreit-Bild. */
.cross-sell-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
}
.cross-sell-badge {
    position: absolute;
    top: .85rem;
    left: .85rem;
    z-index: 2;
    background: rgba(255, 255, 255, .92);
    color: var(--c-primary-2);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .25rem .65rem;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
    pointer-events: none;
}
.cross-sell-image-link {
    display: block;
    line-height: 0;
    background: var(--c-bg);
}
.cross-sell-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.cross-sell-body {
    padding: 1.1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    flex: 1;
}
.cross-sell-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--c-text);
}
.cross-sell-text {
    margin: 0;
    font-size: .92rem;
    color: var(--c-muted);
    line-height: 1.45;
    flex: 1;
}
.cross-sell-cta {
    align-self: flex-start;
    margin-top: .55rem;
}

/* Detailseite eines Cross-Sell-Angebots */
.cross-sell-detail-card {
    max-width: 760px;
}
.cross-sell-detail-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
}
.cross-sell-detail-body {
    margin: 1rem 0 1.25rem;
    line-height: 1.55;
}
.cross-sell-detail-cta {
    margin-top: 1.25rem;
}

/* ──────────────────────────────────────────────────────────────────────
   Welcome-Modal (Erst-Login Onboarding)
   HTML5 <dialog>-Element. Wird einmal pro User gezeigt, dann via DB-Flag
   `users.welcome_dismissed_at` dauerhaft unterdrückt.
   ────────────────────────────────────────────────────────────────────── */
.welcome-modal {
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    max-width: 600px;
    width: calc(100% - 2rem);
    padding: 0;
    color: var(--c-text);
}
.welcome-modal::backdrop {
    background: rgba(20, 22, 26, .55);
}
.welcome-modal[open] {
    animation: bb-modal-in .18s cubic-bezier(.2, .9, .3, 1.1);
}
.welcome-modal-content {
    padding: 1.6rem 1.75rem 1.4rem;
    line-height: 1.55;
}
.welcome-modal-content h2 {
    font-size: 1.2rem;
    font-weight: 600;
}
.welcome-steps {
    margin: 1rem 0;
    padding-left: 1.25rem;
    line-height: 1.6;
}
.welcome-steps li {
    margin-bottom: .65rem;
}
.welcome-steps li:last-child {
    margin-bottom: 0;
}
.welcome-modal-actions {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
}
.welcome-modal-actions .btn-link {
    background: transparent;
    border: 0;
    color: var(--c-muted);
    cursor: pointer;
    padding: .5rem .25rem;
    font: inherit;
    font-size: .9rem;
    text-decoration: underline;
}
.welcome-modal-actions .btn-link:hover {
    color: var(--c-text);
}
@media (prefers-reduced-motion: reduce) {
    .welcome-modal[open] { animation: none; }
}

/* ──────────────────────────────────────────────────────────────────────
   Help-Chat (Floating Bubble + Panel)
   KI-Bot, der bei Bedarf an einen Menschen eskaliert. Eingebunden im
   Layout für eingeloggte User. Bewusst minimal — keine Animations-
   Spielereien, kein Custom-Scrollbar-Look. Soll sich „mitschwimmend"
   anfühlen, nicht aufdringlich.
   ────────────────────────────────────────────────────────────────────── */
.help-chat-launcher {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    border: 0;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    transition: background .12s ease, transform .12s ease;
}
.help-chat-launcher:hover {
    background: var(--c-primary-2);
    transform: translateY(-1px);
}
.help-chat-launcher svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}
.help-chat-launcher.is-open {
    /* Wenn das Panel offen ist, blenden wir den Launcher aus, statt ein
       weiteres Element auf dem Schirm zu lassen. Das Panel hat einen
       eigenen Schließen-X. */
    display: none;
}

.help-chat-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 380px;
    max-width: calc(100vw - 2.5rem);
    height: 560px;
    max-height: calc(100vh - 2.5rem);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1201;
}
.help-chat-panel.is-open {
    display: flex;
}

.help-chat-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    background: var(--c-primary);
    color: #fff;
}
/* Titel-Block nimmt den freien Platz → ⋯ und ✕ rutschen an den rechten Rand. */
.help-chat-head > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}
.help-chat-head .help-chat-title {
    flex: 1;
    font-weight: 600;
    font-size: .95rem;
    letter-spacing: .01em;
}
.help-chat-head .help-chat-subtitle {
    flex: 1;
    font-size: .75rem;
    opacity: .85;
    margin-top: 1px;
}
.help-chat-head-icon-btn {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    padding: .25rem .35rem;
    border-radius: 4px;
    line-height: 1;
    font-size: 1.1rem;
}
.help-chat-head-icon-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.help-chat-menu {
    position: absolute;
    top: 48px;
    right: .75rem;
    background: #fff;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    padding: .25rem 0;
    min-width: 200px;
    z-index: 5;
    display: none;
}
.help-chat-menu.is-open {
    display: block;
}
.help-chat-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: .55rem .85rem;
    font-size: .9rem;
    color: var(--c-text);
    cursor: pointer;
}
.help-chat-menu button:hover {
    background: var(--c-bg);
}
.help-chat-menu button.danger {
    color: var(--c-err);
}

.help-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #fafbfc;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.help-chat-msg {
    max-width: 85%;
    padding: .55rem .75rem;
    border-radius: 10px;
    font-size: .9rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.help-chat-msg.role-assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--c-border);
    color: var(--c-text);
    border-bottom-left-radius: 2px;
}
.help-chat-msg.role-user {
    align-self: flex-end;
    background: var(--c-primary);
    color: #fff;
    border-bottom-right-radius: 2px;
}
.help-chat-msg .help-chat-msg-time {
    display: block;
    font-size: .7rem;
    opacity: .6;
    margin-top: .25rem;
}
.help-chat-empty {
    color: var(--c-muted);
    font-size: .88rem;
    text-align: center;
    padding: 2rem 1rem;
    line-height: 1.55;
}
.help-chat-typing {
    align-self: flex-start;
    color: var(--c-muted);
    font-size: .85rem;
    font-style: italic;
    padding: .25rem .25rem;
}

.help-chat-foot {
    border-top: 1px solid var(--c-border);
    background: #fff;
    padding: .6rem .75rem;
    display: flex;
    gap: .4rem;
    align-items: flex-end;
}
.help-chat-input {
    flex: 1;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: .55rem .65rem;
    font: inherit;
    font-size: .9rem;
    resize: none;
    max-height: 120px;
    min-height: 38px;
    line-height: 1.4;
    background: var(--c-surface);
}
.help-chat-input:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 2px rgba(121, 102, 54, .15);
}
.help-chat-send {
    background: var(--c-primary);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0 .9rem;
    height: 38px;
    cursor: pointer;
    font-weight: 600;
    font-size: .85rem;
}
.help-chat-send:hover { background: var(--c-primary-2); }
.help-chat-send:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Auf schmalen Screens: Panel füllt fast den ganzen Viewport. */
@media (max-width: 480px) {
    .help-chat-panel {
        width: calc(100vw - 1rem);
        height: calc(100vh - 1rem);
        right: .5rem;
        bottom: .5rem;
        border-radius: 8px;
    }
    .help-chat-launcher {
        right: .75rem;
        bottom: .75rem;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   BatchTicker — Floating Live-Anzeige laufender KI-Kalkulationen.
   Sitzt unten rechts oberhalb des Help-Chat-FAB. Container ist eine
   verstickte aside, die JS dynamisch befüllt. Jede Karte ist ein <a>
   zum Projekt, damit der User mit einem Klick zurück zum Stand kommt.
   ────────────────────────────────────────────────────────────────────── */
.batch-ticker {
    position: fixed;
    right: 1.25rem;
    /* 1.25rem Basis + 54px Launcher + 12px Gap = sitzt knapp über dem FAB */
    bottom: calc(1.25rem + 54px + 12px);
    width: 320px;
    max-width: calc(100vw - 2.5rem);
    z-index: 1199;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    /* Container schluckt KEINE Clicks — nur die Karten sind klickbar.
       So bleibt der Bereich neben den Karten zum Page-Scrollen frei. */
    pointer-events: none;
}
.batch-ticker[hidden] { display: none; }

.batch-ticker-card {
    pointer-events: auto;
    display: block;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
    padding: .7rem .9rem;
    text-decoration: none;
    color: var(--c-text);
    transition: transform .15s ease, box-shadow .15s ease,
                opacity .4s ease, border-color .2s ease, background .2s ease;
}
.batch-ticker-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
    text-decoration: none;
}
.batch-ticker-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .35rem;
}
.batch-ticker-card-title {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.batch-ticker-card-status {
    font-size: .72rem;
    color: var(--c-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.batch-ticker-card.is-running .batch-ticker-card-status { color: var(--c-primary); }
.batch-ticker-card.is-complete {
    border-color: #b3e0c2;
    background: #f4fbf6;
}
.batch-ticker-card.is-complete .batch-ticker-card-status { color: #1a7d3a; }
.batch-ticker-card.is-paused {
    border-color: #f0c971;
    background: #fffaf1;
}
.batch-ticker-card.is-paused .batch-ticker-card-status { color: #a06400; }
.batch-ticker-card.is-error {
    border-color: #e9a4a4;
    background: #fdf4f4;
}
.batch-ticker-card.is-error .batch-ticker-card-status { color: #b41c1c; }

.batch-ticker-progress {
    height: 6px;
    background: #eef0f3;
    border-radius: 3px;
    overflow: hidden;
    margin: .4rem 0 .35rem;
}
.batch-ticker-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--c-primary);
    transition: width .4s ease;
}
.batch-ticker-card.is-complete .batch-ticker-progress-fill { background: #2da55c; }
.batch-ticker-card.is-paused   .batch-ticker-progress-fill { background: #d49422; }
.batch-ticker-card.is-error    .batch-ticker-progress-fill { background: #c14444; }

.batch-ticker-meta {
    display: flex;
    justify-content: space-between;
    font-size: .77rem;
    color: var(--c-muted);
    gap: .5rem;
}
.batch-ticker-meta strong {
    color: var(--c-text);
    font-weight: 600;
}
.batch-ticker-running-pos {
    font-size: .76rem;
    color: var(--c-muted);
    margin-top: .25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fade-out + Slide für Karten, die nach Completion auslaufen.
   JS toggelt .is-leaving 0.4–0.5 s vor dem Remove aus dem DOM. */
.batch-ticker-card.is-leaving {
    opacity: 0;
    transform: translateY(6px);
}

@media (max-width: 600px) {
    .batch-ticker {
        right: .75rem;
        left: .75rem;
        width: auto;
        max-width: none;
        bottom: calc(.75rem + 54px + 10px);
    }
}

/* ──────────────────────────────────────────────────────────────────────
   Feedback-Modal (Zufriedenheits-Befragung)
   ──────────────────────────────────────────────────────────────────────
   Erbt das welcome-modal-Look (Card, Backdrop, Action-Row), ergänzt nur
   Sterne-Rating und Textfelder. .visually-hidden für Screen-Reader-Labels.
   ────────────────────────────────────────────────────────────────────── */
.feedback-modal .feedback-stars {
    border: 0;
    padding: 0;
    margin: 1rem 0 .25rem;
}
.feedback-modal .feedback-stars legend {
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--c-text);
}
.feedback-stars-row {
    display: inline-flex;
    gap: .25rem;
}
.feedback-star {
    position: relative;
    cursor: pointer;
    user-select: none;
}
.feedback-star input[type="radio"] {
    /* unsichtbar, aber fokussierbar */
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%; height: 100%;
    cursor: pointer;
    margin: 0;
}
.feedback-star-icon {
    display: inline-block;
    font-size: 2rem;
    line-height: 1;
    color: var(--c-border-2);
    transition: color .12s, transform .12s;
}
.feedback-star.is-active .feedback-star-icon,
.feedback-star.is-hover  .feedback-star-icon {
    color: var(--c-primary);
}
.feedback-star:hover .feedback-star-icon {
    transform: scale(1.08);
}
.feedback-star input[type="radio"]:focus-visible + .feedback-star-icon {
    outline: 2px solid var(--c-primary);
    outline-offset: 3px;
    border-radius: 4px;
}
.feedback-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    margin: .85rem 0 0;
}
.feedback-field > span {
    font-weight: 600;
    font-size: .9rem;
    color: var(--c-text);
}
.feedback-field textarea {
    width: 100%;
    padding: .55rem .65rem;
    font-size: .95rem;
    font-family: inherit;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text);
    resize: vertical;
    min-height: 60px;
}
.feedback-field textarea:focus {
    outline: 2px solid var(--c-primary);
    outline-offset: -1px;
    border-color: var(--c-primary);
}
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Admin-Backend Feedback: Stat-Reihe + Inline-Filter ──────────────────── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    padding: 1rem 1.25rem;
}
.stat-row .stat-row-item {
    text-align: left;
}
.stat-row .stat-row-item .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--c-text);
}
.stat-row .stat-row-item .stat-label {
    font-size: .82rem;
    color: var(--c-muted);
}
.filter-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}
.filter-inline label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .85rem;
}
.kv-list {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: .5rem 1.25rem;
    margin: .5rem 0 0;
}
.kv-list dt {
    color: var(--c-muted);
    font-weight: 500;
}
.kv-list dd {
    margin: 0;
    color: var(--c-text);
}

/* ──────────────────────────────────────────────────────────────────────
   KI-Warnhinweise pro Position
   ──────────────────────────────────────────────────────────────────────
   Pill (kompakt, neben Status) + Detail-Box (oben in cost-detail-body).
   Drei Severities: info (gelb), warn (orange), critical (rot).
   ────────────────────────────────────────────────────────────────────── */
/* Status-Zelle: Badge + Alerts-Pille auf EINER Linie nebeneinander,
   nicht umbrechen. Vorher waren beide einfach inline-Elemente; bei
   schmaler Status-Spalte rutschte die Pille darunter. */
td.cell-status {
    white-space: nowrap;
}
.alerts-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    margin-left: .35rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.4;
    font-family: inherit;
    vertical-align: middle;
}
.alerts-pill-info     { background: var(--c-yellow-bg); color: var(--c-warn);     border-color: #e8d5a8; }
.alerts-pill-warn     { background: #ffe9d6;             color: #a4541f;          border-color: #f0c290; }
.alerts-pill-critical { background: var(--c-red-bg);     color: var(--c-err);     border-color: #f0aaaa; }
.alerts-pill:hover { transform: translateY(-1px); }

.alerts-box {
    margin: .5rem 0 .75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: #fffaf2;
    overflow: hidden;
}
.alerts-box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem .85rem;
    background: #fbf3e1;
    border-bottom: 1px solid var(--c-border);
    font-size: .82rem;
    font-weight: 600;
    color: var(--c-warn);
}
.alerts-box-head .muted { color: var(--c-soft); font-weight: 500; }
.alerts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.alert-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .55rem;
    align-items: center;
    padding: .5rem .85rem;
    border-bottom: 1px solid var(--c-divider);
    font-size: .88rem;
    line-height: 1.4;
}
.alert-item:last-child { border-bottom: none; }
.alert-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--c-bg);
    color: var(--c-muted);
    white-space: nowrap;
}
.alert-msg { color: var(--c-text); }
.alert-dismiss-btn {
    border: 0;
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 .3rem;
    border-radius: 4px;
    font-family: inherit;
}
.alert-dismiss-btn:hover {
    background: var(--c-border);
    color: var(--c-text);
}
.alert-item.alert-sev-info     { background: rgba(251, 238, 205, .35); }
.alert-item.alert-sev-info     .alert-cat { background: var(--c-yellow-bg); color: var(--c-warn); }
.alert-item.alert-sev-warn     { background: rgba(255, 233, 214, .55); }
.alert-item.alert-sev-warn     .alert-cat { background: #ffe9d6; color: #a4541f; }
.alert-item.alert-sev-critical { background: rgba(253, 226, 226, .45); }
.alert-item.alert-sev-critical .alert-cat { background: var(--c-red-bg); color: var(--c-err); }

/* ──────────────────────────────────────────────────────────────────────
   Cost-Line-Adder: „+ Zeile hinzufügen"-Button + Inline-Editor unter der
   Cost-Lines-Tabelle pro Position. Die hinzugefügten Zeilen bekommen
   source_type='manual' und überleben KI-Reestimation + Reset.
   ────────────────────────────────────────────────────────────────────── */
.cost-line-adder {
    margin: .6rem 0 .25rem;
}
.add-cost-line-btn {
    font-size: .88rem;
    color: var(--c-primary-2);
    font-weight: 600;
    padding: .25rem .5rem .25rem 0;
}
.add-cost-line-btn:hover {
    color: var(--c-primary);
}
.cost-line-add-form {
    margin-top: .5rem;
    padding: .9rem 1rem 1rem;
    background: #faf8f2;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}
.cost-line-add-grid {
    display: grid;
    /* Typ + Beschreibung in der ersten Reihe, Menge/Einheit/EK/Lohngruppe darunter */
    grid-template-columns: minmax(140px, 1fr) minmax(260px, 2fr) 110px 100px 120px minmax(160px, 1fr);
    gap: .6rem .75rem;
    align-items: end;
}
@media (max-width: 980px) {
    .cost-line-add-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.cost-line-add-field {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    font-size: .8rem;
    color: var(--c-muted);
}
/* Wichtig: das hidden-Attribut auf Feldern muss display:flex überstimmen
   (sonst bleibt die Lohngruppe sichtbar, wenn Typ ≠ Lohn ist). */
.cost-line-add-field[hidden] {
    display: none !important;
}
.cost-line-add-field > span {
    font-weight: 600;
    letter-spacing: .02em;
}
.cost-line-add-field input,
.cost-line-add-field select {
    padding: .35rem .5rem;
    font-size: .92rem;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    background: var(--c-surface);
    color: var(--c-text);
    font-family: inherit;
    /* Tabular-Nums für Mengen/EK-Felder — sieht bei Inkrement/Korrektur ruhiger aus. */
    font-variant-numeric: tabular-nums;
}
.cost-line-add-field input:focus,
.cost-line-add-field select:focus {
    outline: 2px solid var(--c-primary);
    outline-offset: -1px;
    border-color: var(--c-primary);
}
.cost-line-add-field input.is-auto {
    /* Auto-befüllt aus den Stammdaten (z.B. Stundensatz für Lohngruppe) —
       visuell als „kommt nicht von dir" markieren. */
    background: #f4f1e6;
    color: var(--c-muted);
    cursor: not-allowed;
}
.cost-line-add-field.cost-line-add-qty input,
.cost-line-add-field.cost-line-add-cost input {
    text-align: right;
}
.cost-line-add-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: .75rem;
}
.cost-line-add-actions .btn.small {
    padding: .35rem .9rem;
    font-size: .88rem;
}
.cost-line-add-actions .cancel-cost-line-btn {
    color: var(--c-muted);
    font-size: .88rem;
}
.cost-line-add-actions .cancel-cost-line-btn:hover {
    color: var(--c-text);
}
.cost-line-add-error {
    font-size: .85rem;
    color: var(--c-err);
}
.cost-line-add-form.is-busy {
    opacity: .6;
    pointer-events: none;
}
/* Während der Editor offen ist, soll der „+ Zeile hinzufügen"-Button
   verschwinden — sonst hat man zwei „Start"-Punkte nebeneinander. */
.cost-line-adder.is-open .add-cost-line-btn { display: none; }

/* ──────────────────────────────────────────────────────────────────────
   Dashboard – Reihe 1: "Aktuelle Ausschreibungen" (Teaser, Coming-Soon) +
   "Auftrag kalkulieren" (X83-Direkt-Dropzone).
   Eigene dash-* Klassen, damit der globale .card / .card-head / .dropzone-
   Look nicht überschrieben wird.
   ────────────────────────────────────────────────────────────────────── */
.dashboard-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
    align-items: stretch;
}
@media (max-width: 980px) {
    .dashboard-actions-row {
        grid-template-columns: 1fr;
    }
}

.dash-card {
    display: flex;
    flex-direction: column;
    padding: 1.4rem 1.5rem;
}
.dash-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
}
.dash-eyebrow {
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-soft);
    font-weight: 600;
    margin-bottom: .15rem;
}
.dash-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.dash-card-sub {
    color: var(--c-muted);
    font-size: .95rem;
    line-height: 1.55;
    margin: 0 0 .9rem;
    max-width: 52ch;
}

/* "Demnächst"-Badge mit pulsing dot */
.soon-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: 3px 9px 3px 7px;
    background: var(--c-gold-soft);
    color: var(--c-primary-2);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.soon-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--c-primary-2);
    box-shadow: 0 0 0 0 rgba(122, 106, 62, .5);
    animation: pulseGold 2.2s infinite;
}
@keyframes pulseGold {
    0%   { box-shadow: 0 0 0 0 rgba(122, 106, 62, .45); }
    70%  { box-shadow: 0 0 0 6px rgba(122, 106, 62, 0); }
    100% { box-shadow: 0 0 0 0 rgba(122, 106, 62, 0); }
}

/* Tender-Preview: echte Liste vom Backend, mit Live-Dot + EXTERN-Badge im
   Header. Empty-State wenn keine Tender matchen. Klick auf eine Zeile öffnet
   die externe Quelle. */
.ausschreibungen-teaser .tender-preview {
    position: relative;
    flex: 1;
    min-height: 240px;
}
.ausschreibungen-teaser .tender-list {
    list-style: none;
    padding: 0;
    /* Negativer horizontaler Margin: die Tender-Zeilen dehnen sich 1 rem
       über die Card-Padding-Innenseite hinaus. Card-Padding ist 1.5 rem
       (s. .card-Definition), also bleiben rechts/links noch 0.5 rem Card-
       Padding-Rest — der Hover-Hintergrund knallt nicht an die Card-Border.
       Kombiniert mit dem 1 rem Innen-Padding der .tender-Zeile selbst steht
       der Text-Anfang wieder bündig zur ursprünglichen Card-Innenkante. */
    margin: 4px -1rem 18px;
    display: flex;
    flex-direction: column;
}
.ausschreibungen-teaser .head-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--c-muted);
    font-size: 13px;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4caf50;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, .6);
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(76, 175, 80, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}
.ext-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background: var(--gold-soft);
    color: var(--gold-hover);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
}
.tender {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 1rem;
    /* Allround-Padding statt links 0 — sonst klebt der Title direkt am
       Hover-Hintergrund-Rand und es sieht "abgeschnitten" aus. 1 rem
       horizontal gibt Text und Icon genug Luft zum Tinting-Rand. */
    padding: .95rem 1rem;
    border-top: 1px solid var(--c-divider);
    align-items: center;
    cursor: pointer;
}
.tender:first-child { border-top: none; }
.tender-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--c-text);
    /* inline-flex, damit das External-Link-Icon direkt am Title-Ende sitzt
       (statt am rechten Container-Rand zu kleben). baseline-Alignment hält
       das Icon optisch in der Schriftlinie. */
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    transition: color .15s ease;
}
.tender-title-text {
    /* Bricht den Title sauber um, falls er sehr lang ist, ohne dass das
       Icon mit umbricht. */
    min-width: 0;
}
.tender-ext-ic {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--c-soft);
    transition: color .15s ease, transform .15s ease;
    /* leichter Y-Offset, weil die SVG-Box optisch tiefer wirkt als
       die x-höhe der Schrift */
    transform: translateY(1px);
}
.tender-meta {
    color: var(--c-muted);
    font-size: .82rem;
    display: flex; gap: .55rem; flex-wrap: wrap;
    margin-top: 2px;
}
.tender-meta .sep { color: var(--c-border); }

/* ── Hover-State: deutlich signalisieren, dass die Zeile klickbar ist.
   Hintergrund-Tinting in unserem Brand-Gold, Title in Primary-Farbe,
   und das External-Icon wandert subtil nach oben-rechts (universelle
   "öffnet extern"-Geste). Die negative Margin + Padding kompensiert,
   damit der Hover-Bereich über die volle Card-Breite reicht ohne dass
   sich das Grid-Layout verschiebt. */
.ausschreibungen-teaser .tender {
    border-radius: 6px;
    transition: background-color .15s ease;
}
.ausschreibungen-teaser .tender:hover {
    background: var(--c-gold-soft);
}
.ausschreibungen-teaser .tender:hover .tender-title {
    color: var(--c-primary-2);
}
.ausschreibungen-teaser .tender:hover .tender-ext-ic {
    color: var(--c-primary);
    transform: translate(2px, -2px);
}
.tender-right {
    grid-column: 2;
    grid-row: 1 / span 2;
    text-align: right;
}
.tender-deadline {
    font-size: .85rem;
    font-weight: 600;
}
.tender-deadline.urgent { color: #b14a2a; }
.tender-deadline.soon   { color: var(--c-warn); }
.tender-deadline.calm   { color: var(--c-muted); }
.tender-deadline-label {
    font-size: .7rem;
    color: var(--c-soft);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.soon-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.2rem 1.4rem;
    background: linear-gradient(
        180deg,
        rgba(252, 250, 243, .55) 0%,
        rgba(252, 250, 243, .92) 38%,
        rgba(252, 250, 243, .96) 100%
    );
    border-radius: var(--radius);
}
.soon-eyebrow {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--c-primary-2);
    margin-bottom: .5rem;
}
.soon-overlay h3 {
    margin: 0 0 .35rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -.01em;
}
.soon-overlay p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--c-muted);
    max-width: 380px;
}

/* ── Tender-Card: Footer mit Filter-Info + Settings-CTA ──────────────── */
.tender-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--divider);
    margin-top: 2px;
}
.tender-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--gold);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background .15s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.tender-footer .btn:hover {
    background: var(--gold-hover);
}
.tender-footer .filter-line {
    display: block;
    font-size: .82rem;
    color: var(--c-muted);
    margin-top: 2px;
}
.tender-footer .filter-line a {
    color: inherit;
    text-decoration: none;
}
.tender-footer .filter-line a:hover {
    color: var(--c-primary);
    text-decoration: underline;
}

/* Tender-Liste begrenzen auf ~3 sichtbare Einträge, Rest scrollbar. */
.ausschreibungen-teaser .tender-list {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.ausschreibungen-teaser .tender-list::-webkit-scrollbar { width: 6px; }
.ausschreibungen-teaser .tender-list::-webkit-scrollbar-thumb {
    background-color: var(--c-border-2);
    border-radius: 10px;
}
.ausschreibungen-teaser .tender-list::-webkit-scrollbar-track {
    background: transparent;
}

/* Empty-State innerhalb der Tender-Card. */
.tender-preview .empty-state {
    background: linear-gradient(180deg, #fbfaf5 0%, #f6f3e9 100%);
    padding: 3rem 1.5rem;
    text-align: center;
    border-radius: 8px;
    border: 1px solid var(--c-border-2);
}

/* Scroll-Anker für /settings#trades — wenn von der Tender-Card aus gesprungen
   wird, sollen die Bekanntmachungs-Settings nicht direkt am Seitenrand kleben. */
#trades { scroll-margin-top: 1.25rem; }

/* ── Custom-Checkbox + Range-Slider (GESCOPED auf #trades) ───────────────
   Der Stage-Entwickler hatte diese Styles global gesetzt — würde alle
   bestehenden Forms im System optisch ändern (Stammdaten, Settings etc.).
   Wir scopen das hart auf die Bekanntmachungs-Section, damit der Rest der
   App unverändert bleibt. */
#trades input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    border: 1.5px solid var(--c-border-2);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    margin: 0;
    transition: all .15s ease-in-out;
}
#trades input[type="checkbox"]::before {
    content: "";
    width: .65rem;
    height: .65rem;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--c-surface);
    background-color: CanvasText;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
#trades input[type="checkbox"]:checked {
    background-color: var(--c-primary);
    border-color: var(--c-primary);
}
#trades input[type="checkbox"]:checked::before {
    transform: scale(1);
}
#trades input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--c-gold-soft);
    outline-offset: 2px;
}

#trades input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
    outline: none;
}
#trades input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: var(--c-border-2);
    border-radius: 3px;
}
#trades input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background: var(--c-primary);
    border-radius: 50%;
    margin-top: -7px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
    transition: transform .1s ease;
}
#trades input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.2);
}
#trades input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: var(--c-border-2);
    border-radius: 3px;
}
#trades input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    background: var(--c-primary);
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

/* Dropzone-Variante für direkten Dashboard-Upload.
   Eigene Klassen .dash-dropzone* — nicht mit der globalen .dropzone teilen,
   weil die hier flex/inline-Form-Behavior hat und das Layout sich vom
   PDF-Upload-Drop unterscheidet (gold-soft Icon-Kreis, Format-Pills). */
.dash-dropzone-form {
    display: flex;
    flex: 1;
    margin-top: .25rem;
}
.dash-dropzone {
    position: relative;
    flex: 1;
    padding: 1.5rem 1.25rem;
    border: 2px dashed var(--c-border-2);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #fbfaf5 0%, #f6f3e9 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .5rem;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dash-dropzone:hover {
    border-color: var(--c-primary);
    background: linear-gradient(180deg, #faf5e4 0%, #f1ead2 100%);
}
.dash-dropzone.is-dragover {
    border-color: var(--c-primary);
    border-style: solid;
    background: linear-gradient(180deg, #faf5e4 0%, #f1ead2 100%);
}
.dash-dropzone.is-busy {
    opacity: .55;
    cursor: progress;
    pointer-events: none;
}
.dash-dropzone input[type="file"] {
    position: absolute; inset: 0;
    opacity: 0;
    width: 100%; height: 100%;
    cursor: pointer;
}
.dash-dropzone-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--c-gold-soft);
    color: var(--c-primary-2);
    display: grid; place-items: center;
    margin-bottom: .1rem;
}
.dash-dropzone-headline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-text);
}
.dash-dropzone-headline strong {
    color: var(--c-primary-2);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
}
.dash-dropzone-formats {
    display: flex; gap: .35rem; margin-top: .15rem;
}
.dash-dropzone-formats span {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    padding: 2px .55rem;
    border-radius: 4px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--c-muted);
}
.dash-dropzone-hint {
    margin-top: .35rem;
    font-size: .78rem;
    color: var(--c-soft);
}

/* Dropzone-Loading-State: idle wird ausgeblendet, busy wird sichtbar.
   Verhindert Doppelklicks während Upload + Parsing + Matching (kann
   bei großen X83 mehrere Sekunden dauern). */
.dash-dropzone-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    width: 100%;
}
.dash-dropzone-busy {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .25rem;
    text-align: center;
}
.dash-dropzone.is-busy .dash-dropzone-idle { display: none; }
.dash-dropzone.is-busy .dash-dropzone-busy {
    display: flex;
    opacity: 0;
    animation: dashBusyFadeIn .25s ease-out forwards;
}
.dash-dropzone.is-busy {
    cursor: progress;
    border-style: solid;
    border-color: var(--c-primary);
    background: linear-gradient(180deg, #faf5e4 0%, #f1ead2 100%);
}
.dash-dropzone.is-busy input[type="file"] {
    pointer-events: none;
}
@keyframes dashBusyFadeIn {
    to { opacity: 1; }
}

.dash-spinner {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 3px solid rgba(122, 106, 62, .18);
    border-top-color: var(--c-primary);
    animation: dashSpin .9s linear infinite;
    margin-bottom: .15rem;
}
@keyframes dashSpin {
    to { transform: rotate(360deg); }
}
.dash-busy-filename {
    font-size: .92rem;
    font-weight: 600;
    color: var(--c-text);
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-busy-stage {
    font-size: .9rem;
    color: var(--c-primary-2);
    font-weight: 500;
    min-height: 1.4em; /* verhindert Layout-Sprung beim Stage-Wechsel */
}
.dash-busy-hint {
    font-size: .78rem;
    color: var(--c-soft);
    max-width: 36ch;
    line-height: 1.4;
}

/* Cross-Sell-Section wird selbst zur Karte: padding raus + overflow:hidden,
   damit das Vollbreit-Bild bis an die Kanten reicht und an den Ecken vom
   Card-Radius beschnitten wird. Ohne diesen Override würde das Bild von
   der globalen .card-Padding (1.25rem 1.5rem) eingerückt. */
.cross-sell-section {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.cross-sell-section .cross-sell-gallery {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}
/* Reviewer-Variante des Dashboard-Splits — "Letzte Projekte" deutlich
   breiter als das Cross-Sell-Karussell, damit die Tabelle nicht
   gequetscht wird.
   Wichtig: align-items: START (NICHT stretch). Sonst würde die linke
   Karte die rechte hochziehen, wenn sie selbst mehr Inhalt hat — der
   JS-Trimmer würde keinen Overflow erkennen und nichts kappen. So bleibt
   die rechte (Angebots-)Karte ihre natürliche Höhe und gibt das Maß für
   die linke vor. Die linke wird per JS auf rightCard.offsetHeight begrenzt. */
.dashboard-split--review {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    align-items: start;
}
.dashboard-split--review .dashboard-split-left > .card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dashboard-split--review .dashboard-split-left > .card > .card-head {
    flex-shrink: 0;
}
.dashboard-split--review .dashboard-split-left > .card .data-table {
    /* Tabelle NICHT stretchen — wenige Einträge sollen oben sitzen und unten
       Whitespace lassen, statt die Zeilen aufzublasen. Die Card behält ihre
       fixe Höhe (siehe JS-Trimmer); überschüssiger Platz bleibt einfach leer. */
    flex: 0 0 auto;
}
@media (max-width: 980px) {
    .dashboard-split--review {
        grid-template-columns: 1fr;
    }
    .dashboard-split--review .dashboard-split-left > .card {
        overflow: visible;
        max-height: none !important;
    }
}
/* Vom JS-Trimmer ausgeblendete Tabellenzeilen — nicht via display:none auf
   dem TR-Selektor, sondern eigene Klasse, damit ein Resize sie wieder
   einblenden kann ohne Layout-Sprung. */
tr.is-hidden-by-fit { display: none; }

/* ─── Gewerke-Pillen (Projekt-Detail) ─────────────────────────────────
   Neue Box neben den Summen. Klick auf eine Pille filtert die LV-Liste
   per JS (s. app.js — Block GewerkeFilter). Mehrere Pillen können
   aktiv sein (ODER-Logik). Keine DB-Round-Trips, kein Server-State.
   --------------------------------------------------------------- */
.summary-row { width: 100%; }
@media (max-width: 920px) {
    .summary-row { grid-template-columns: 1fr !important; }
}
.gewerke-box .data-table { display: none; }
.gewerke-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: .25rem;
}
.gpill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--c-bg-alt, #faf8f2);
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    color: inherit;
    font-family: inherit;
}
.gpill:hover {
    background: var(--gold-soft, #ede5cf);
    transform: translateY(-1px);
}
.gpill.active {
    background: var(--gold, #7a6a3e);
    color: #fff;
}
.gpill .gpill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    /* Farbe inline gesetzt via --gewerk-color */
}
.gpill.active .gpill-dot {
    box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}
.gpill .gpill-pct {
    background: rgba(0,0,0,0.06);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.gpill.active .gpill-pct {
    background: rgba(255,255,255,0.25);
}

/* Gewerk-Filter ausgeblendete LV-Position. Eigene Klasse, damit andere
   Hide-Mechanismen (Pagination, Trimmer) parallel funktionieren. */
tr.pos-row.is-hidden-by-gewerk { display: none; }

.gewerke-filter-reset:hover {
    background: var(--bg-alt, #faf8f2);
}

/* ─── Settings-Seite: Themen-Gruppen + Quick-Jump-Nav ─────────────────
   Visuelle Gruppierung der Cards in /settings nach Themen (Kalkulation,
   Ausschreibungen, Mein Konto).

   Die Quick-Jump-Bar ist sticky und nutzt :target/:hover für aktiven State.
   Group-Header sind absichtlich kein <h2> (Heading-Hierarchie bleibt Page-H1
   → Card-H2). Größe ist trotzdem visuell als Section-Header lesbar.
   ─────────────────────────────────────────────────────────────────────-->
/* Quick-Jump-Nav als klassische Tab-Bar mit Underline. Sticky bleibt,
   weil die Page-Höhe groß ist und der User beim Scrollen jederzeit
   springen können soll. Underline-Style fühlt sich weniger verspielt
   an als Pills und passt zur Doku-haften Settings-Seite. */
.settings-jump {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 0;
    padding: 0;
    margin: -.5rem -1rem 1.5rem;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-divider);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.settings-jump a {
    padding: 14px 20px;
    color: var(--c-muted);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1;
    border-bottom: 2px solid transparent;
    /* -1px: die eigene Underline überlappt mit der Container-Bottom-Border,
       sonst springt der Text um 1 px nach oben beim Aktivieren. */
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
}
.settings-jump a:hover {
    color: var(--c-primary);
    border-bottom-color: var(--c-primary);
}
/* :target-Selector markiert den aktuell angesprungenen Anker.
   Funktioniert reactionsfrei ohne JS — sobald der User auf einen
   Jump-Link klickt, hat die URL den Hash und der entsprechende
   <div id="g-*"> ist :target. */
:target ~ .settings-group-head .settings-group-eyebrow,
.settings-group:target .settings-group-eyebrow {
    /* nur ein dezenter Visual-Hint dass dieser Bereich aktiv ist */
}

.settings-group {
    /* scroll-margin: Quick-Jump-Bar (sticky, ~56 px hoch) darf den Group-
       Header nicht verdecken, wenn der User einen Anker anspringt. */
    scroll-margin-top: 80px;
    margin-top: 5rem;
}
.settings-group:first-of-type {
    margin-top: 1.25rem;
}
.settings-group-head {
    position: relative;
    padding: 0 0 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--c-divider);
}
.settings-group-eyebrow {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -.02em;
    margin-bottom: .35rem;
    line-height: 1.15;
}
.settings-group-head p {
    margin: 0;
    color: var(--c-muted);
    font-size: .92rem;
    line-height: 1.5;
    max-width: 680px;
}

/* Mobile: kompaktere Tabs, kein backdrop-filter (kostet GPU). */
@media (max-width: 720px) {
    .settings-jump {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        overflow-x: auto;
    }
    .settings-jump a {
        padding: 12px 14px;
        font-size: .87rem;
        white-space: nowrap;
    }
    .settings-group {
        margin-top: 3.5rem;
    }
    .settings-group-eyebrow {
        font-size: 1.3rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Dashboard Bottom Split – News + Roadmap nebeneinander
   Gleiche Höhe: align-items: stretch, beide Cards auf height:100%
   ═══════════════════════════════════════════════════════════════ */
.dashboard-split--bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;   /* beide Spalten gleich hoch */
    margin-top: 1.25rem;
}
/* News-Card hat global margin-top: 1.25rem — im Split nicht nötig */
.dashboard-split--bottom .news-card {
    margin-top: 0;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
/* News-Liste im Split: gleiche max-height wie Roadmap-Liste */
.dashboard-split--bottom .news-list {
    flex: 1;
    max-height: 280px;
}
@media (max-width: 900px) {
    .dashboard-split--bottom {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .dashboard-split--bottom .news-card {
        height: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Roadmap-Card — „Was kommt als Nächstes"
   ═══════════════════════════════════════════════════════════════ */
.roadmap-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}
.roadmap-subtitle {
    margin: 0 0 .75rem;
    font-size: .88rem;
    color: var(--c-muted);
    line-height: 1.45;
}
.roadmap-list {
    list-style: none;
    /* padding-left: Platz für den Pulse-Ring (6px outward + 2px Luft) */
    padding: 0 .85rem 0 8px;
    margin: 0 0 .75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    /* Scrollt wie die News-Liste, wenn mehr Einträge kommen */
    max-height: 280px;
    overflow-y: auto;
    /* overflow-x: visible damit der Pulse-Ring links nicht abgeschnitten wird.
       Hinweis: overflow-x:visible + overflow-y:auto ist nicht erlaubt — Browser
       erzwingt overflow-x:auto. Daher nutzen wir padding-left statt visible. */
    mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%);
    scrollbar-width: thin;
    scrollbar-color: var(--c-border-2) transparent;
}
.roadmap-list::-webkit-scrollbar { width: 6px; }
.roadmap-list::-webkit-scrollbar-track { background: transparent; }
.roadmap-list::-webkit-scrollbar-thumb {
    background: var(--c-border-2);
    border-radius: 3px;
}
.roadmap-list::-webkit-scrollbar-thumb:hover { background: var(--c-muted); }
/* Pulse-Animation für aktive Roadmap-Punkte */
@keyframes roadmap-pulse {
    0%   { box-shadow: 0 0 0 0   color-mix(in srgb, var(--c-primary) 45%, transparent); }
    70%  { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c-primary)  0%, transparent); }
    100% { box-shadow: 0 0 0 0   color-mix(in srgb, var(--c-primary)  0%, transparent); }
}
.roadmap-item {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    position: relative; /* Anker für die Verbindungslinie */
    padding-bottom: .75rem;
}
.roadmap-item {
    border-bottom: 1px solid var(--c-border);
}
/* Vertikale Verbindungslinie zwischen zwei Dots.
   Stoppt bei bottom:0 = untere Padding-Kante des Items, also genau an der
   border-bottom — die horizontale Linie wird nicht gekreuzt. */
.roadmap-item::after {
    content: '';
    position: absolute;
    left: 4px;
    /* Startet direkt unterhalb des Dots */
    top: calc(.35rem + 9px + 2px);
    /* Endet an der unteren Padding-Kante = direkt an der border-bottom */
    bottom: 0;
    width: 1px;
    background: var(--c-border);
}
.roadmap-dot {
    position: relative; /* damit der Pulse nicht vom overflow-y geclippt wird */
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: .35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-primary);
    opacity: .85;
    animation: roadmap-pulse 2.2s ease-out infinite;
}
.roadmap-body {
    flex: 1;
    min-width: 0;
}
.roadmap-item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .25rem;
}
.roadmap-item-head strong {
    font-size: .9rem;
    font-weight: 600;
    color: var(--c-text);
}
.roadmap-badge {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--c-primary) 28%, transparent);
    border-radius: 4px;
    padding: 1px 6px;
    line-height: 1.6;
    white-space: nowrap;
}
.roadmap-text {
    margin: 0;
    font-size: .85rem;
    color: var(--c-muted);
    line-height: 1.5;
}
.roadmap-footer {
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid var(--c-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.roadmap-footer .muted.small {
    font-size: .82rem;
    color: var(--c-muted);
}
.btn-link.roadmap-suggest-btn {
    font-size: .85rem;
    font-weight: 600;
    color: var(--c-primary);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
}
.btn-link.roadmap-suggest-btn:hover {
    text-decoration: underline;
}
