/* ============================================================================
   Belegbiber — single global stylesheet.
   No Bootstrap, no Tailwind, no CSS isolation. Everything lives here.
   Base element rules keep the (static SSR) Identity pages looking intentional
   without their old framework classes; bb-* classes style the app shell.
   ============================================================================ */

:root {
    /* Brand palette */
    --cream:  #FBF6EC;
    --forest: #1E4636;
    --walnut: #9A6A3E;
    --honey:  #E7A33C;
    --ink:    #2B2218;

    --surface: #ffffff;
    --border: #e7dec9;
    --muted: #6f6353;
    --danger: #b3261e;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow: 0 1px 2px rgba(43, 34, 24, 0.06), 0 6px 20px rgba(43, 34, 24, 0.06);
    --space: 1rem;
    --sidebar-w: 256px;
    --maxw: 920px;

    --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 0.5rem; line-height: 1.2; color: var(--ink); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9em; }

/* ── Base form elements (also styles the Identity pages) ───────────────── */
input, select, textarea {
    font: inherit;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    width: 100%;
    max-width: 28rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--walnut);
    box-shadow: 0 0 0 3px rgba(154, 106, 62, 0.18);
}
label { display: inline-block; font-weight: 600; margin-bottom: 0.25rem; }

/* Blazor's <FocusOnNavigate Selector="h1" /> adds tabindex="-1" to the page heading and focuses it
   after each navigation (so screen readers announce the new page). That drew a focus ring, making
   every page look like the heading was "selected". :focus-visible alone isn't enough — browsers often
   match it on programmatic focus after a page load — so suppress :focus outright here. Safe: a
   tabindex="-1" element is never reachable by Tab, so no keyboard user loses a focus indicator. */
h1:focus,
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

button, .btn {
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--cream);
    background: var(--forest);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1rem;
}
button:hover, .btn:hover { background: #163528; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* Blazor validation */
.validation-message, .field-validation-error { color: var(--danger); font-size: 0.85rem; display: block; margin-top: 0.25rem; }
.invalid { border-color: var(--danger) !important; }

/* ── App shell: sticky top bar + full-width main ───────────────────────── */
.bb-app { min-height: 100vh; display: flex; flex-direction: column; }

.bb-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 246, 236, 0.82);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.bb-topbar__inner {
    max-width: 1100px;
    margin: 0 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    flex-wrap: wrap;
    padding: 0.65rem 1.5rem;
}
.bb-main {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem;
    min-width: 0;
}

/* ── Wordmark / logo ───────────────────────────────────────────────────── */
.bb-logo { display: inline-flex; align-items: center; gap: 0.55rem; }
.bb-logo:hover { text-decoration: none; }
.bb-logo__mark { display: inline-flex; }
.bb-logo__mark svg {
    width: 36px; height: 36px; display: block;
    filter: drop-shadow(0 2px 4px rgba(43, 34, 24, 0.18));
}
.bb-logo__text { font-size: 1.35rem; font-weight: 800; color: var(--forest); letter-spacing: -0.4px; line-height: 1; }
.bb-logo__text-accent { color: var(--honey); }
.bb-logo__tag {
    align-self: center;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--walnut);
    background: rgba(154, 106, 62, 0.12);
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    margin-left: 0.1rem;
}

/* ── Top nav ───────────────────────────────────────────────────────────── */
.bb-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem; }
.bb-nav__form { margin: 0; display: inline-flex; }
.bb-nav__link {
    display: inline-block;
    color: var(--ink);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}
.bb-nav__link:hover { color: var(--forest); background: rgba(30, 70, 54, 0.07); text-decoration: none; }
.bb-nav__link.active { color: var(--forest); background: rgba(231, 163, 60, 0.20); }
.bb-nav__link--button { background: transparent; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.bb-nav__link--button:hover { background: rgba(30, 70, 54, 0.07); }
/* primary call-to-action in the nav */
.bb-nav__link--cta { color: var(--cream); background: var(--forest); border-radius: 999px; padding: 0.5rem 1.1rem; }
.bb-nav__link--cta:hover { color: var(--cream); background: #163528; }
.bb-nav__link--cta.active { color: var(--cream); background: #163528; }

@media (max-width: 560px) {
    .bb-topbar__inner { padding: 0.6rem 1rem; }
    .bb-logo__tag { display: none; }
    .bb-nav { width: 100%; justify-content: flex-start; }
    .bb-main { padding: 1.5rem 1rem; }
}

/* ── Page + cards ──────────────────────────────────────────────────────── */
.bb-page { max-width: var(--maxw); }
.bb-page__head { margin-bottom: 1.5rem; }
.bb-muted { color: var(--muted); }

.bb-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1.25rem;
}
.bb-card__title { font-size: 1.05rem; margin-bottom: 1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────── */
.bb-form { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.bb-field { display: flex; flex-direction: column; width: 100%; max-width: 28rem; }
.bb-input { max-width: 28rem; }

/* two-column field grid (e.g. the DATEV configuration form) */
.bb-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bb-grid2 .bb-field, .bb-grid2 .bb-input { max-width: none; }
.bb-hint { font-size: 0.8rem; margin-top: 0.2rem; }
.bb-check { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; }
@media (max-width: 560px) { .bb-grid2 { grid-template-columns: 1fr; } }
.bb-btn { /* element button styling already applies; class kept for intent/targeting */ }

/* ── Table + badge ─────────────────────────────────────────────────────── */
.bb-table { width: 100%; border-collapse: collapse; }
.bb-table th, .bb-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
.bb-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); }

.bb-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--walnut);
    background: rgba(154, 106, 62, 0.12);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    margin: 0 0.15rem 0.15rem 0;
}
.bb-badge--ok { color: var(--forest); background: rgba(30, 70, 54, 0.12); }

/* ── Client list actions ───────────────────────────────────────────────── */
.bb-link { color: var(--forest); font-weight: 600; text-decoration: none; }
.bb-link:hover { text-decoration: underline; }
.bb-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }

/* ── Settings extras ───────────────────────────────────────────────────── */
.bb-btn--ghost { background: transparent; color: var(--forest); border-color: var(--border); }
.bb-btn--ghost:hover { background: rgba(30, 70, 54, 0.06); }

.bb-note { border-left: 4px solid var(--honey); }

.bb-steps { margin: 0; padding-left: 1.25rem; }
.bb-steps li { margin-bottom: 0.5rem; }
.bb-steps code {
    background: rgba(43, 34, 24, 0.06);
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
}

/* ============================================================================
   Landing page (Home) — marketing surface that lives inside the app shell.
   All classes namespaced bb-lp__*; the beaver mascot is bb-beaver.
   ============================================================================ */
.bb-lp {
    --lp-maxw: 1040px;
    max-width: var(--lp-maxw);
    margin: 0 auto;
    /* pull out of .bb-main padding so the hero can breathe */
    margin-top: -0.5rem;
    /* long German compounds (DATEV-Buchungsstapel) wrap rather than overflow */
    overflow-wrap: break-word;
}
.bb-lp section { scroll-margin-top: 1.5rem; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.bb-lp__hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 0 1.5rem;
}
.bb-lp__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--walnut);
    background: rgba(154, 106, 62, 0.12);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    margin-bottom: 1.1rem;
}
.bb-lp__title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -0.5px;
    margin: 0 0 1.1rem;
    font-weight: 800;
}
.bb-lp__title-accent { color: var(--honey); }
.bb-lp__lead {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 34rem;
    margin-bottom: 1.6rem;
}
.bb-lp__cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.bb-lp__microcopy { font-size: 0.85rem; color: var(--muted); margin-top: 0.9rem; }
.bb-lp__microcopy--center { text-align: center; }

/* buttons */
.bb-lp__btn {
    display: inline-block;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
    border: 1.5px solid transparent;
}
.bb-lp__btn:hover { text-decoration: none; transform: translateY(-1px); }
.bb-lp__btn--primary { color: var(--cream); background: var(--forest); box-shadow: 0 6px 18px rgba(30, 70, 54, 0.25); }
.bb-lp__btn--primary:hover { background: #163528; box-shadow: 0 9px 24px rgba(30, 70, 54, 0.32); }
.bb-lp__btn--honey { color: var(--ink); background: var(--honey); box-shadow: 0 6px 18px rgba(231, 163, 60, 0.35); }
.bb-lp__btn--honey:hover { background: #d8922b; }
.bb-lp__btn--ghost { color: var(--forest); background: transparent; border-color: var(--border); }
.bb-lp__btn--ghost:hover { background: rgba(30, 70, 54, 0.06); }
.bb-lp__btn--block { display: block; text-align: center; width: 100%; }

/* hero art + mascot */
.bb-lp__hero-art { display: flex; justify-content: center; }
.bb-lp__beaver-stage {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: radial-gradient(120% 100% at 50% 30%, rgba(231, 163, 60, 0.18), rgba(251, 246, 236, 0) 70%);
    border-radius: 24px;
    padding: 1rem;
}
.bb-beaver {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 22px rgba(43, 34, 24, 0.16));
}
.bb-beaver--mini { width: 96px; margin: 0 auto 0.5rem; }
.bb-lp__bubble {
    position: absolute;
    top: 6px;
    right: -6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    color: var(--ink);
}

/* ── Trust strip ───────────────────────────────────────────────────────── */
.bb-lp__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    align-items: center;
    margin: 1rem 0 2.5rem;
    padding: 0.9rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--forest);
}
.bb-lp__dot { color: var(--honey); }

/* ── Generic section ───────────────────────────────────────────────────── */
.bb-lp__section { padding: 2.25rem 0; }
.bb-lp__section-head { text-align: center; max-width: 38rem; margin: 0 auto 2rem; }
.bb-lp__kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--honey);
    margin-bottom: 0.5rem;
}
.bb-lp__h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.3px; }

/* ── Problem / Solution ────────────────────────────────────────────────── */
.bb-lp__pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.bb-lp__pain {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}
.bb-lp__pain-icon { font-size: 1.8rem; display: block; margin-bottom: 0.6rem; }
.bb-lp__pain p { margin: 0; color: var(--ink); font-weight: 500; }
.bb-lp__solution {
    text-align: center;
    font-size: 1.25rem;
    margin: 1.75rem auto 0;
    max-width: 36rem;
    color: var(--ink);
}
.bb-lp__solution strong { color: var(--forest); }

/* ── Features ──────────────────────────────────────────────────────────── */
.bb-lp__features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.bb-lp__feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.5rem;
    transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.bb-lp__feature:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(43, 34, 24, 0.10); }
.bb-lp__feature-icon {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    font-size: 1.4rem;
    border-radius: 12px;
    background: rgba(231, 163, 60, 0.16);
    margin-bottom: 0.85rem;
}
.bb-lp__feature h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.bb-lp__feature p { margin: 0; color: var(--muted); }

/* ── How it works ──────────────────────────────────────────────────────── */
.bb-lp__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.bb-lp__step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem 1.4rem 1.4rem;
}
.bb-lp__step-num {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--forest);
    color: var(--cream);
    font-weight: 800;
    margin-bottom: 0.8rem;
}
.bb-lp__step h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.bb-lp__step p { margin: 0; color: var(--muted); }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.bb-lp__price-wrap { display: flex; justify-content: center; gap: 1.25rem; flex-wrap: wrap; align-items: stretch; }
.bb-lp__price-card--alt { border-style: dashed; }
.bb-lp__price-card {
    position: relative;
    width: 100%;
    max-width: 26rem;
    background: var(--surface);
    border: 1.5px solid var(--honey);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(43, 34, 24, 0.12);
    padding: 2rem 1.75rem 1.6rem;
    text-align: center;
}
.bb-lp__price-badge {
    position: absolute;
    top: -0.8rem; left: 50%; transform: translateX(-50%);
    background: var(--honey);
    color: var(--ink);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 999px;
    padding: 0.3rem 0.85rem;
    white-space: nowrap;
}
.bb-lp__price { display: flex; align-items: baseline; justify-content: center; gap: 0.3rem; margin: 0.5rem 0 1.25rem; }
.bb-lp__price-amount { font-size: 3rem; font-weight: 800; color: var(--forest); letter-spacing: -1px; }
.bb-lp__price-period { font-size: 1rem; color: var(--muted); font-weight: 600; }
.bb-lp__price-list { list-style: none; margin: 0 0 1.5rem; padding: 0; text-align: left; }
.bb-lp__price-list li {
    position: relative;
    padding: 0.5rem 0 0.5rem 1.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
}
.bb-lp__price-list li:last-child { border-bottom: 0; }
.bb-lp__price-list li::before {
    content: "✓";
    position: absolute; left: 0;
    color: var(--forest);
    font-weight: 800;
}

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.bb-lp__faq { max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.7rem; }
.bb-lp__faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1.1rem;
}
.bb-lp__faq-item summary {
    cursor: pointer;
    font-weight: 700;
    padding: 0.7rem 0;
    list-style: none;
    position: relative;
    padding-right: 1.5rem;
}
.bb-lp__faq-item summary::-webkit-details-marker { display: none; }
.bb-lp__faq-item summary::after {
    content: "+";
    position: absolute; right: 0; top: 0.55rem;
    font-size: 1.3rem; font-weight: 700; color: var(--honey);
    transition: transform 0.15s ease;
}
.bb-lp__faq-item[open] summary::after { content: "−"; }
.bb-lp__faq-item p { margin: 0 0 0.8rem; color: var(--muted); }

/* ── Before / after ────────────────────────────────────────────────────── */
.bb-lp__compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.bb-lp__compare-col {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem 1.5rem;
}
.bb-lp__compare-col h3 { font-size: 1.05rem; margin-bottom: 0.9rem; }
.bb-lp__compare-col ul { list-style: none; margin: 0; padding: 0; }
.bb-lp__compare-col li { position: relative; padding: 0.45rem 0 0.45rem 1.8rem; color: var(--ink); }
.bb-lp__compare-col li::before { position: absolute; left: 0; font-weight: 800; }
.bb-lp__compare-col--bad { background: rgba(179, 38, 30, 0.04); }
.bb-lp__compare-col--bad h3 { color: var(--danger); }
.bb-lp__compare-col--bad li { color: var(--muted); }
.bb-lp__compare-col--bad li::before { content: "✗"; color: var(--danger); }
.bb-lp__compare-col--good { border-color: var(--forest); background: rgba(30, 70, 54, 0.04); }
.bb-lp__compare-col--good h3 { color: var(--forest); }
.bb-lp__compare-col--good li::before { content: "✓"; color: var(--forest); }

/* ── Social proof quote ────────────────────────────────────────────────── */
.bb-lp__quote {
    max-width: 44rem;
    margin: 0 auto;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 2rem 2.25rem;
}
.bb-lp__quote-text { font-size: 1.35rem; line-height: 1.4; font-weight: 600; color: var(--ink); margin-bottom: 1.25rem; }
.bb-lp__quote-by { display: inline-flex; align-items: center; gap: 0.7rem; text-align: left; }
.bb-lp__quote-avatar {
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--honey); color: var(--ink); font-size: 1.1rem;
}
.bb-lp__quote-by strong { display: block; }
.bb-lp__quote-meta { font-size: 0.85rem; color: var(--muted); }

/* ── Motion: beaver micro-interaction + smooth anchor scroll ───────────── */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .bb-lp__hero-art .bb-beaver { animation: bb-bob 5s ease-in-out infinite; }
    .bb-lp__beaver-stage:hover .bb-beaver { animation-play-state: paused; transform: translateY(-4px) rotate(-1.5deg); }
    .bb-beaver { transition: transform 0.25s ease; }
}

/* ── Risk-reversal / guarantee cue ─────────────────────────────────────── */
.bb-lp__guarantee {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-top: 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forest);
}
.bb-lp__guarantee span { display: inline-flex; align-items: center; gap: 0.35rem; }
.bb-lp__guarantee span::before { content: "✓"; color: var(--honey); font-weight: 800; }
@keyframes bb-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ── Focus-visible (keyboard accessibility) ────────────────────────────── */
.bb-lp__btn:focus-visible,
.bb-lp__faq-item summary:focus-visible,
.bb-lp a:focus-visible {
    outline: 3px solid var(--walnut);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ── Final CTA ─────────────────────────────────────────────────────────── */
.bb-lp__final {
    text-align: center;
    background: linear-gradient(160deg, var(--forest), #163528);
    color: var(--cream);
    border-radius: 22px;
    padding: 2.5rem 1.5rem;
    margin: 2.5rem 0 2rem;
}
.bb-lp__final .bb-beaver { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3)); }
.bb-lp__final-title { color: var(--cream); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: 0.5rem auto 0.6rem; max-width: 32rem; }
.bb-lp__final-sub { color: rgba(251, 246, 236, 0.85); max-width: 34rem; margin: 0 auto 1.5rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.bb-lp__footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 1.5rem 0 0.5rem;
    border-top: 1px solid var(--border);
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
    .bb-lp__hero { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
    .bb-lp__hero-copy .bb-lp__lead { margin-left: auto; margin-right: auto; }
    .bb-lp__cta-row { justify-content: center; }
    .bb-lp__hero-art { order: -1; }
    .bb-lp__beaver-stage { max-width: 260px; }
    .bb-lp__features { grid-template-columns: 1fr; }
    .bb-lp__pains, .bb-lp__steps, .bb-lp__compare { grid-template-columns: 1fr; }
}

/* ── Error UI (kept from template, restyled) ───────────────────────────── */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--honey);
    color: var(--ink);
    padding: 0.6rem 1.25rem;
    box-shadow: 0 -1px 2px rgba(43, 34, 24, 0.2);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ============================================================================
   App surface (authenticated adviser area) — Stripe-inspired: cool neutrals,
   crisp borders, generous spacing, restrained shadows. Namespaced .bb-shell so
   the cream marketing landing page keeps its own warmer look.
   ============================================================================ */
.bb-shell {
    --app-bg:      #f6f9fc;
    --app-surface: #ffffff;
    --app-border:  #e3e8ee;
    --app-text:    #0a2540;
    --app-muted:   #5c6b80;
    --app-faint:   #8a96a6;
    --app-accent:  #1E4636;
    --app-accent-soft: rgba(30, 70, 54, 0.08);
    --app-radius:  10px;
    --app-radius-sm: 7px;
    --app-shadow:  0 1px 2px rgba(10, 37, 64, 0.05), 0 2px 8px rgba(10, 37, 64, 0.04);
    --app-sidebar: 250px;

    min-height: 100vh;
    display: flex;
    background: var(--app-bg);
    color: var(--app-text);
}
.bb-shell a { color: var(--app-accent); }
.bb-shell h1, .bb-shell h2, .bb-shell h3 { color: var(--app-text); letter-spacing: -0.01em; }

/* Sidebar */
.bb-side {
    width: var(--app-sidebar);
    flex: 0 0 var(--app-sidebar);
    background: var(--app-surface);
    border-right: 1px solid var(--app-border);
    display: flex;
    flex-direction: column;
    padding: 1.1rem 0.85rem;
    gap: 0.15rem;
    position: sticky;
    top: 0;
    height: 100vh;
}
.bb-side__brand { display: flex; align-items: center; gap: 0.55rem; padding: 0.2rem 0.5rem 1rem; }
.bb-side__brand:hover { text-decoration: none; }
.bb-side__brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
.bb-side__brand-text { font-size: 1.12rem; font-weight: 750; color: var(--app-accent); letter-spacing: -0.3px; }
.bb-side__brand-text span { color: var(--honey); }

.bb-side__label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--app-faint); padding: 0.9rem 0.6rem 0.35rem;
}
.bb-side__link {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.52rem 0.6rem;
    border-radius: var(--app-radius-sm);
    font-size: 0.925rem; font-weight: 550;
    color: var(--app-muted);
}
.bb-side__link:hover { background: #f1f5f9; color: var(--app-text); text-decoration: none; }
.bb-side__link.active { background: var(--app-accent-soft); color: var(--app-accent); font-weight: 650; }
.bb-side__icon { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.85; }
.bb-side__foot { margin-top: auto; border-top: 1px solid var(--app-border); padding-top: 0.7rem; }
.bb-side__user { font-size: 0.78rem; color: var(--app-faint); padding: 0.15rem 0.6rem 0.5rem; word-break: break-all; }
.bb-side__form { margin: 0; }
.bb-side__signout {
    width: 100%; text-align: left; background: transparent; border: 0; cursor: pointer;
    font: inherit; font-size: 0.9rem; font-weight: 550; color: var(--app-muted);
    padding: 0.5rem 0.6rem; border-radius: var(--app-radius-sm); box-shadow: none;
}
.bb-side__signout:hover { background: #f1f5f9; color: var(--app-text); box-shadow: none; transform: none; }

/* Content column */
.bb-content { flex: 1 1 auto; min-width: 0; padding: 1.9rem 2.2rem 3rem; }
.bb-content__inner { max-width: 940px; }

.bb-head { margin-bottom: 1.5rem; }
.bb-head__crumb { font-size: 0.83rem; color: var(--app-faint); margin-bottom: 0.35rem; }
.bb-head__crumb a { color: var(--app-muted); font-weight: 550; }
.bb-head h1 { font-size: 1.55rem; font-weight: 700; margin: 0 0 0.3rem; }
.bb-head__sub { color: var(--app-muted); margin: 0; font-size: 0.95rem; }
.bb-head__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Tabs (per-client sections) */
.bb-tabs { display: flex; gap: 0.15rem; border-bottom: 1px solid var(--app-border); margin: 1.2rem 0 1.6rem; flex-wrap: wrap; }
.bb-tab {
    padding: 0.55rem 0.85rem; font-size: 0.92rem; font-weight: 600; color: var(--app-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.bb-tab:hover { color: var(--app-text); text-decoration: none; }
.bb-tab.active { color: var(--app-accent); border-bottom-color: var(--app-accent); }

/* Panels */
.bb-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    box-shadow: var(--app-shadow);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.bb-panel__head { padding: 1rem 1.25rem; border-bottom: 1px solid var(--app-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.bb-panel__title { font-size: 0.98rem; font-weight: 650; margin: 0; }
.bb-panel__sub { font-size: 0.85rem; color: var(--app-muted); margin: 0.15rem 0 0; }
.bb-panel__body { padding: 1.25rem; }
.bb-panel__body--flush { padding: 0; }

/* Stat tiles */
.bb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.bb-stat {
    background: var(--app-surface); border: 1px solid var(--app-border);
    border-radius: var(--app-radius); box-shadow: var(--app-shadow); padding: 1rem 1.15rem;
}
.bb-stat__label { font-size: 0.76rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.6px; color: var(--app-faint); margin-bottom: 0.4rem; }
.bb-stat__value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bb-stat__meta { font-size: 0.8rem; color: var(--app-muted); margin-top: 0.25rem; }

/* Data table */
.bb-dtable { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bb-dtable th {
    text-align: left; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--app-faint); padding: 0.7rem 1.25rem; background: #fbfcfd; border-bottom: 1px solid var(--app-border);
}
.bb-dtable td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--app-border); vertical-align: middle; }
.bb-dtable tr:last-child td { border-bottom: 0; }
.bb-dtable tbody tr:hover { background: #fbfcfd; }
.bb-dtable__name { font-weight: 650; color: var(--app-text); }
.bb-dtable__num { text-align: right; font-variant-numeric: tabular-nums; }

/* Pills */
.bb-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    font-size: 0.75rem; font-weight: 650; border-radius: 999px; padding: 0.2rem 0.6rem;
    background: #eef2f7; color: var(--app-muted); white-space: nowrap;
}
.bb-pill--ok   { background: #e3f5ec; color: #0b6b45; }
.bb-pill--warn { background: #fdf2dd; color: #8a5b12; }

/* App buttons */
.bb-shell .bb-abtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    background: var(--app-accent); color: #fff; border: 1px solid transparent;
    border-radius: var(--app-radius-sm); padding: 0.55rem 1rem;
    font-size: 0.92rem; font-weight: 620; cursor: pointer; box-shadow: none; width: auto;
}
.bb-shell .bb-abtn:hover { background: #163528; text-decoration: none; transform: none; box-shadow: none; }
.bb-shell .bb-abtn--ghost { background: #fff; color: var(--app-text); border-color: var(--app-border); }
.bb-shell .bb-abtn--ghost:hover { background: #f6f9fc; color: var(--app-text); }
.bb-shell .bb-abtn--danger { background: #fff; color: #b3261e; border-color: #f0c7c4; }
.bb-shell .bb-abtn--danger:hover { background: #fdf3f2; color: #b3261e; }
.bb-shell .bb-abtn--sm { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
.bb-btnrow { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* App forms */
.bb-shell .bb-afield { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.bb-shell .bb-afield > label { font-size: 0.86rem; font-weight: 620; color: var(--app-text); margin: 0; }
.bb-shell .bb-afield input,
.bb-shell .bb-afield select {
    width: 100%; max-width: none;
    background: #fff; border: 1px solid var(--app-border); border-radius: var(--app-radius-sm);
    padding: 0.5rem 0.65rem; font-size: 0.93rem; color: var(--app-text);
}
.bb-shell .bb-afield input:focus,
.bb-shell .bb-afield select:focus {
    outline: none; border-color: var(--app-accent);
    box-shadow: 0 0 0 3px rgba(30, 70, 54, 0.12);
}
.bb-shell .bb-afield__hint { font-size: 0.79rem; color: var(--app-faint); }
.bb-agrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.bb-agrid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .bb-agrid--2 { grid-template-columns: 1fr; } }
.bb-acheck { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; }
.bb-acheck input { width: auto; max-width: none; margin-top: 0.2rem; }

/* Inline notices */
.bb-notice { border-radius: var(--app-radius-sm); padding: 0.8rem 1rem; font-size: 0.9rem; margin-bottom: 1.15rem; border: 1px solid transparent; }
.bb-notice--ok   { background: #e9f7f0; border-color: #bfe6d4; color: #0b6b45; }
.bb-notice--err  { background: #fdf3f2; border-color: #f3ccc8; color: #a03028; }
.bb-notice--info { background: #eef4fb; border-color: #cfe0f3; color: #23496f; }

/* Empty state */
.bb-empty { text-align: center; padding: 2.6rem 1.25rem; }
.bb-empty img { width: 76px; height: 76px; opacity: 0.9; margin-bottom: 0.6rem; }
.bb-empty__title { font-weight: 650; margin-bottom: 0.25rem; }
.bb-empty__text { color: var(--app-muted); font-size: 0.92rem; margin-bottom: 1.1rem; }

.bb-kv { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 0.65rem 1.25rem; font-size: 0.92rem; }
.bb-kv dt { color: var(--app-muted); }
.bb-kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; word-break: break-all; }

@media (max-width: 860px) {
    .bb-shell { flex-direction: column; }
    .bb-side { width: 100%; flex: none; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.25rem; padding: 0.7rem 1rem; }
    .bb-side__brand { padding: 0 0.6rem 0 0; }
    .bb-side__label, .bb-side__user { display: none; }
    .bb-side__foot { margin: 0 0 0 auto; border: 0; padding: 0; }
    .bb-content { padding: 1.4rem 1.1rem 2.5rem; }
}

/* ============================================================================
   Auth surface (custom login) — centred card on the app background.
   ============================================================================ */
.bb-auth {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: #f6f9fc; padding: 2rem 1.25rem;
    --app-border: #e3e8ee; --app-text: #0a2540; --app-muted: #5c6b80; --app-faint: #8a96a6;
    --app-accent: #1E4636;
}
.bb-auth__card { width: 100%; max-width: 400px; }
.bb-auth__brand { display: flex; align-items: center; justify-content: center; gap: 0.55rem; margin-bottom: 1.4rem; }
.bb-auth__brand:hover { text-decoration: none; }
.bb-auth__brand img { width: 40px; height: 40px; border-radius: 10px; }
.bb-auth__brand-text { font-size: 1.35rem; font-weight: 750; color: var(--app-accent); letter-spacing: -0.3px; }
.bb-auth__brand-text span { color: var(--honey); }
.bb-auth__box {
    background: #fff; border: 1px solid var(--app-border); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(10,37,64,.05), 0 8px 28px rgba(10,37,64,.07);
    padding: 1.9rem 1.75rem;
}
.bb-auth__title { font-size: 1.24rem; font-weight: 700; margin: 0 0 0.3rem; color: var(--app-text); }
.bb-auth__sub { font-size: 0.92rem; color: var(--app-muted); margin: 0 0 1.5rem; }
.bb-auth__field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.05rem; }
.bb-auth__field label { font-size: 0.87rem; font-weight: 620; color: var(--app-text); margin: 0; }
.bb-auth__field input {
    width: 100%; max-width: none; background: #fff; color: var(--app-text);
    border: 1px solid var(--app-border); border-radius: 8px; padding: 0.62rem 0.75rem; font-size: 0.95rem;
}
.bb-auth__field input:focus { outline: none; border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(30,70,54,.12); }
.bb-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.35rem; }
.bb-auth__remember { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--app-muted); font-weight: 500; margin: 0; }
.bb-auth__remember input { width: auto; max-width: none; }
.bb-auth__link { font-size: 0.87rem; font-weight: 600; color: var(--app-accent); }
.bb-auth__submit {
    width: 100%; background: var(--app-accent); color: #fff; border: 0; border-radius: 8px;
    padding: 0.7rem 1rem; font-size: 0.97rem; font-weight: 650; cursor: pointer; box-shadow: none;
}
.bb-auth__submit:hover { background: #163528; transform: none; box-shadow: none; }
.bb-auth__error { background: #fdf3f2; border: 1px solid #f3ccc8; color: #a03028; border-radius: 8px; padding: 0.7rem 0.85rem; font-size: 0.88rem; margin-bottom: 1.15rem; }
.bb-auth__foot { text-align: center; font-size: 0.85rem; color: var(--app-faint); margin-top: 1.15rem; }
.bb-auth__foot a { color: var(--app-muted); font-weight: 550; }

/* ============================================================================
   Landing refresh — pull the marketing page onto the same clean, Stripe-like
   surface as the app: cool neutrals, crisp 1px borders, restrained shadows,
   tighter type. Brand stays: forest green, honey accent, the beaver. Declared
   last so it overrides the original warm landing rules above.
   ============================================================================ */
body {
    background: #ffffff;
    color: #0a2540;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Marketing top bar: white, crisp hairline */
.bb-topbar { background: rgba(255, 255, 255, 0.88); border-bottom-color: #e3e8ee; }
.bb-nav__link { color: #425466; font-weight: 550; }
.bb-nav__link:hover { background: #f6f9fc; color: #0a2540; }
.bb-nav__link.active { background: #eef2f7; color: #0a2540; }
.bb-nav__link--cta { background: var(--forest); color: #fff; border-radius: 8px; font-weight: 620; }
.bb-nav__link--cta:hover, .bb-nav__link--cta.active { background: #163528; color: #fff; }
.bb-logo__tag { color: #5c6b80; background: #eef2f7; font-weight: 650; }

/* Typography */
.bb-lp, .bb-lp h1, .bb-lp h2, .bb-lp h3 { color: #0a2540; }
.bb-lp__title { letter-spacing: -0.03em; font-weight: 780; }
.bb-lp__lead { color: #425466; font-size: 1.13rem; }
.bb-lp__h2 { letter-spacing: -0.02em; font-weight: 720; }
.bb-lp__muted, .bb-muted { color: #5c6b80; }
.bb-lp__microcopy { color: #5c6b80; }
.bb-lp__eyebrow { color: #0b6b45; background: #e3f5ec; font-weight: 650; letter-spacing: 0.4px; }
.bb-lp__kicker { color: #8a96a6; }

/* Buttons: squarer, calmer, no lift */
.bb-lp__btn { border-radius: 8px; font-weight: 620; padding: 0.72rem 1.35rem; transition: background 0.15s ease; }
.bb-lp__btn:hover { transform: none; box-shadow: none; }
.bb-lp__btn--primary { background: var(--forest); color: #fff; border-color: transparent; }
.bb-lp__btn--primary:hover { background: #163528; }
.bb-lp__btn--ghost { background: #fff; color: #0a2540; border-color: #e3e8ee; }
.bb-lp__btn--ghost:hover { background: #f6f9fc; }
.bb-lp__btn--honey { background: var(--honey); color: #2B2218; border-color: transparent; }
.bb-lp__btn--honey:hover { background: #d8952f; }

/* Hero art: neutral halo instead of the warm glow */
.bb-lp__beaver-stage { background: radial-gradient(120% 100% at 50% 30%, #f1f6fb, rgba(255,255,255,0) 70%); }
.bb-lp__bubble { background: #fff; border: 1px solid #e3e8ee; box-shadow: 0 2px 10px rgba(10,37,64,.06); color: #0a2540; }

/* Trust strip */
.bb-lp__trust {
    color: #5c6b80; background: #f6f9fc; border: 1px solid #e3e8ee;
    border-radius: 10px; font-weight: 550;
}
.bb-lp__dot { color: #c3cdd9; }

/* Cards: white, hairline border, soft shadow, no hover lift */
.bb-lp__feature, .bb-lp__step, .bb-lp__pain, .bb-lp__faq-item, .bb-lp__quote {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(10, 37, 64, 0.05), 0 2px 8px rgba(10, 37, 64, 0.04);
}
.bb-lp__feature:hover { transform: none; box-shadow: 0 1px 2px rgba(10,37,64,.05), 0 6px 18px rgba(10,37,64,.07); }
.bb-lp__feature p, .bb-lp__step p, .bb-lp__pain p { color: #425466; }
.bb-lp__feature-icon { background: #f1f6fb; border: 1px solid #e6edf5; border-radius: 10px; }
.bb-lp__step-num { background: var(--forest); color: #fff; border-radius: 10px; font-weight: 700; }

/* Solution line + quote */
.bb-lp__solution { color: #0a2540; }
.bb-lp__quote-text { color: #0a2540; }
.bb-lp__quote-meta { color: #8a96a6; }
.bb-lp__quote-avatar { background: #e3f5ec; color: #0b6b45; }

/* FAQ */
.bb-lp__faq-item summary { color: #0a2540; font-weight: 620; }
.bb-lp__faq-item p { color: #425466; }

/* Final CTA + footer */
.bb-lp__final { background: #0a2540; border-radius: 16px; }
.bb-lp__final-title { color: #fff; }
.bb-lp__final-sub { color: rgba(255, 255, 255, 0.82); }
.bb-lp__footer { color: #8a96a6; border-top: 1px solid #e3e8ee; }
/* The mascot PNG carries a cream backdrop; frame it as a deliberate card on the white page. */
.bb-lp__hero-art .bb-beaver { border-radius: 14px; border: 1px solid #e9e2d4; }

/* ============================================================================
   Revenue chart — one series (Umsatz per month). Series hue #12a06a is validated
   against the white panel surface (lightness band, chroma floor, ≥3:1 contrast).
   Thin marks, hairline solid gridlines, values on the axis + hover tooltip + the
   table below rather than a number on every bar.
   ============================================================================ */
.bb-chart {
    --chart-series: #12a06a;
    --chart-grid: #eaeef3;
    --chart-plot-h: 190px;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: var(--chart-plot-h) auto; /* plot + x-axis band, so labels are never clipped */
    column-gap: 0.6rem;
}

/* y axis */
.bb-chart__yaxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 0.72rem;
    color: #8a96a6;
    font-variant-numeric: tabular-nums; /* ticks align vertically */
    line-height: 1;
    padding-bottom: 0; /* baseline-aligned with the plot floor */
}
.bb-chart__yaxis span { transform: translateY(-0.35em); }
.bb-chart__yaxis span:last-child { transform: none; }

/* plot area */
.bb-chart__plot { position: relative; height: var(--chart-plot-h); }
.bb-chart__grid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.bb-chart__grid span { display: block; height: 1px; background: var(--chart-grid); } /* solid hairline, recessive */

.bb-chart__bars {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    gap: 2px; /* surface gap does the separating — no borders on marks */
}
.bb-chart__col {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.bb-chart__bar {
    width: 100%;
    max-width: 24px;              /* cap the mark; the band's leftover is air */
    min-height: 2px;              /* a real but tiny month still reads as a mark */
    background: var(--chart-series);
    border-radius: 4px 4px 0 0;   /* rounded data-end, square at the baseline */
    transition: filter 0.12s ease;
}
.bb-chart__col:hover .bb-chart__bar { filter: brightness(0.92); }

/* per-bar hover tooltip */
.bb-chart__tip {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 168px;
    background: #ffffff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(10, 37, 64, 0.12);
    padding: 0.55rem 0.7rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #425466;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 5;
}
.bb-chart__tip strong { color: #0a2540; font-size: 0.82rem; margin-bottom: 0.15rem; }
.bb-chart__tip span { display: flex; justify-content: space-between; gap: 1.1rem; white-space: nowrap; }
.bb-chart__tip b { color: #0a2540; font-variant-numeric: tabular-nums; }
.bb-chart__col:hover .bb-chart__tip { opacity: 1; visibility: visible; }
/* keep the first/last tooltip inside the panel */
.bb-chart__col:first-child .bb-chart__tip { left: 0; transform: none; }
.bb-chart__col:last-child .bb-chart__tip { left: auto; right: 0; transform: none; }

/* x axis band */
.bb-chart__xaxis { grid-column: 1 / -1; display: grid; grid-template-columns: 44px 1fr; column-gap: 0.6rem; }
.bb-chart__xlabels { display: flex; gap: 2px; padding-top: 0.45rem; }
.bb-chart__xlabels span {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 0.72rem;
    color: #8a96a6;
    white-space: nowrap;
}
.bb-mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.78rem; color: #5c6b80; }
.bb-shell .bb-dtable tfoot td { background: #fbfcfd; border-top: 1px solid #e3e8ee; }
.bb-shell select { width: auto; max-width: none; background: #fff; border: 1px solid #e3e8ee; border-radius: 7px; padding: 0.35rem 0.6rem; font-size: 0.87rem; color: #0a2540; }

/* ============================================================================
   Loading states — skeletons + a "reading from Stripe" banner. Pages use Blazor
   streaming rendering: the shell ships immediately with these placeholders, and
   the real content replaces them when the (sometimes slow) Stripe call returns.
   ============================================================================ */
.bb-skel {
    background: linear-gradient(90deg, #eef2f7 25%, #f7fafc 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: bb-shimmer 1.4s ease infinite;
    border-radius: 6px;
    display: block;
}
@keyframes bb-shimmer {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
.bb-skel--line   { height: 0.8rem; margin-bottom: 0.55rem; }
.bb-skel--line:last-child { margin-bottom: 0; }
.bb-skel--title  { height: 1.15rem; width: 38%; margin-bottom: 0.7rem; }
.bb-skel--pill   { height: 1.1rem; width: 5.5rem; border-radius: 999px; }
.bb-skel--value  { height: 1.6rem; width: 62%; }
.bb-skel--btn    { height: 2.1rem; width: 9rem; border-radius: 7px; }
.bb-skel--chart  { height: 190px; border-radius: 8px; }
.bb-skel--w40 { width: 40%; } .bb-skel--w55 { width: 55%; }
.bb-skel--w70 { width: 70%; } .bb-skel--w85 { width: 85%; }

/* skeleton rows inside a data table, so the shell keeps the table's geometry */
.bb-skel-row td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--app-border, #e3e8ee); }

/* "loading from Stripe" banner — visible only while the request is in flight;
   it disappears on its own when the streamed update replaces this frame. */
.bb-loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #eef4fb;
    border: 1px solid #cfe0f3;
    color: #23496f;
    border-radius: 7px;
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
    margin-bottom: 1.15rem;
}
.bb-spinner {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: bb-spin 0.7s linear infinite;
}
@keyframes bb-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .bb-skel { animation: none; }
    .bb-spinner { animation-duration: 2.4s; }
}

/* ============================================================================
   Configuration sections — label column on the left, field card on the right
   (mirrors the reference Buchhaltungskonten layout).
   ============================================================================ */
.bb-cfg { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 1.5rem 2.5rem; padding: 1.9rem 0; border-top: 1px solid var(--app-border, #e3e8ee); }
.bb-cfg:first-of-type { border-top: 0; padding-top: 0.5rem; }
.bb-cfg__label h2 { font-size: 1.12rem; font-weight: 680; margin: 0 0 0.4rem; }
.bb-cfg__label p { color: #5c6b80; font-size: 0.92rem; margin: 0; }
.bb-cfg__fields { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.bb-cfg__card {
    background: #fff; border: 1px solid var(--app-border, #e3e8ee); border-radius: 10px;
    padding: 1.35rem 1.4rem; display: flex; flex-direction: column; gap: 1.15rem;
}
/* an account field with its optional Buchungsschlüssel beside it */
.bb-cfg__row { display: grid; grid-template-columns: 1fr 190px; gap: 0.9rem; align-items: start; }
.bb-cfg__row--solo { grid-template-columns: 1fr; }
.bb-cfg__or { display: flex; align-items: center; gap: 0.9rem; color: #8a96a6; font-size: 0.86rem; }
.bb-cfg__or::before, .bb-cfg__or::after { content: ""; flex: 1; height: 1px; background: var(--app-border, #e3e8ee); }
@media (max-width: 900px) {
    .bb-cfg { grid-template-columns: 1fr; gap: 1rem; }
    .bb-cfg__row { grid-template-columns: 1fr; }
}

/* ── Sidebar: client shortcuts ──────────────────────────────────────────── */
.bb-side__grouphead { display: flex; align-items: center; justify-content: space-between; padding: 0.9rem 0.6rem 0.35rem; }
.bb-side__add {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 6px; color: #8a96a6; flex: 0 0 22px;
}
.bb-side__add svg { width: 14px; height: 14px; }
.bb-side__add:hover { background: #f1f5f9; color: var(--app-accent, #1E4636); text-decoration: none; }
.bb-side__link--client { padding-left: 0.6rem; font-size: 0.9rem; }
.bb-side__link--muted { color: #a4aebb; font-style: italic; font-size: 0.86rem; }
.bb-side__clientname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bb-side__dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.bb-side__dot--ok { background: #12a06a; }
.bb-side__dot--warn { background: #e0a53a; }
@media (max-width: 860px) { .bb-side__grouphead { display: none; } }

/* ── Export-Fortschritt (Toast oben rechts) ─────────────────────────────── */
.bb-toast {
    position: fixed;
    top: 1.1rem;
    right: 1.1rem;
    z-index: 1000;
    max-width: 26rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-left: 4px solid #12a06a;
    border-radius: 10px;
    box-shadow: 0 4px 22px rgba(10, 37, 64, 0.16);
    padding: 0.9rem 1.05rem;
    font-size: 0.88rem;
    color: #425466;
    animation: bb-toast-in 0.18s ease-out;
}
@keyframes bb-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.bb-toast__text { display: flex; flex-direction: column; gap: 0.2rem; }
.bb-toast__text strong { color: #0a2540; font-size: 0.92rem; }
.bb-toast__spinner {
    width: 16px; height: 16px; flex: 0 0 16px; margin-top: 0.15rem;
    border: 2px solid #12a06a; border-right-color: transparent; border-radius: 50%;
    animation: bb-spin 0.7s linear infinite;
}
.bb-toast--done { border-left-color: #12a06a; }
.bb-toast--done .bb-toast__spinner {
    animation: none; border: 0; background: #12a06a;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 6L9 17l-5-5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20 6L9 17l-5-5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
}
@media (prefers-reduced-motion: reduce) {
    .bb-toast { animation: none; }
    .bb-toast__spinner { animation-duration: 2.4s; }
}
@media (max-width: 560px) { .bb-toast { left: 1rem; right: 1rem; max-width: none; } }
.bb-side__version { font-size: 0.72rem; color: #a4aebb; padding: 0.5rem 0.6rem 0; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .bb-side__version { display: none; } }
