/* BDO template overrides.
   Loaded after cockpit.css when .env template=bdo. */

:root {
  --primary: #e10920;
  /* rgba(var(--primary-rgb), X) braucht dieses RGB-Tripel separat, siehe
     public/css/cockpit.css – ohne diese Zeile blieben alle dort auf
     rgba(var(--primary-rgb), X) umgestellten Box-Shadows/Hintergründe teal. */
  --primary-rgb: 177, 18, 38;
  /* Dunklere Variante von --primary/--secondary (dieselbe Verdunkelungsrate
     wie cockpit.css' --primary-dark/--secondary-dark ggü. --primary/--secondary),
     genutzt u.a. für die Chatbot-Akzentfarbe (--cb-akzent-dark). Ohne diese
     Zeilen blieben dort die alten teal/gold-Dunkeltöne stehen. */
  --primary-dark: #9c1021;
  --secondary-dark: #9c1021;
  --secondary: #e10920;
  --success: #e10920;
  --color-primary: #e10920;
  --color-primary-content: #ffffff;
  --income-primary: #e10920;

  --teal: #9c1021;

  /* --color-success wird von resources/js/fly.js für ApexCharts-Serienfarben
     gelesen (getCssVar('--color-success', '#16a34a')) – ohne diese Zeile
     bleiben Charts grün, egal was sonst im Template steht. Custom Properties
     vererben sich normal durchs Cockpit-Shadow-DOM (nur Selektoren werden
     dort gekapselt, keine geerbten Properties), :root reicht also aus. */
  --color-success: #e10920;

  /* Bootstrap-/Orchid-eigene --bs-success*-Variablen (aus dem gebündelten
     public/vendor/orchid/css/orchid.css) werden von .alert-success & Co.
     genutzt und waren bisher komplett ungefixt. */
  --bs-success: #e10920;
  --bs-success-rgb: 177, 18, 38;
  --bs-success-text-emphasis: #8f1022;
  --bs-success-bg-subtle: #f8e8e9;
  --bs-success-border-subtle: #e2a8ae;
}

/* Orchid/Bootstrap hartkodieren .text-success/.bg-success direkt auf #28a745
   (mit !important bei .text-success) statt über --bs-success zu gehen – die
   Custom-Property-Neudefinition oben reicht hier also nicht, braucht eigene
   Regeln. */
.text-success { color: var(--primary) !important; }
.bg-success   { background-color: var(--primary) !important; color: #fff !important; }
.alert-success {
  background-color: var(--bs-success-bg-subtle) !important;
  border-color: var(--bs-success-border-subtle) !important;
  color: #8f1022 !important;
}

div.aside .sidebar-toggle-btn:hover,
div.aside .menue_toggle:hover,
div.aside .nav > li > a.nav-link:hover,
div.aside .nav > .nav-item > a.nav-link:hover,
div.aside .nav > li.active > a.nav-link,
div.aside .nav > .nav-item.active > a.nav-link,
div.aside .nav .nav .nav-link:hover,
.ck-user-row:hover,
.ck-user-row:focus-visible,
.ck-notif-row:hover {
  background-color: rgba(177, 18, 38, 0.08) !important;
  color: var(--primary) !important;
}

div.aside .nav > li > a.nav-link.active,
div.aside .nav > .nav-item > a.nav-link.active,
div.aside .nav > li.active > a.nav-link,
div.aside .nav > .nav-item.active > a.nav-link,
div.aside .nav .nav .nav-link.active,
.ck-notif-row {
  background-color: rgba(177, 18, 38, 0.10) !important;
  border-color: rgba(177, 18, 38, 0.24) !important;
  color: #8f1022 !important;
}

div.aside .sidebar-toggle-btn:hover,
div.aside .nav > li > a.nav-link:hover .icon-menu,
div.aside .nav > .nav-item > a.nav-link:hover .icon-menu,
div.aside .nav > li > a.nav-link.active .icon-menu,
div.aside .nav > .nav-item > a.nav-link.active .icon-menu,
div.aside .nav .nav .nav-link:hover,
div.aside .nav .nav .nav-link.active,
.ck-user-row:hover .ck-user-name,
.ck-user-row:focus-visible .ck-user-name,
.ck-avatar,
.ck-notif-row,
.ck-wishbox-title {
  color: var(--primary) !important;
}


.ck-avatar {
  background: rgba(177, 18, 38, 0.12) !important;
}

.ck-wishbox {
  background: linear-gradient(135deg, rgba(177, 18, 38, 0.10), rgba(177, 18, 38, 0.03)) !important;
  border-color: rgba(177, 18, 38, 0.22) !important;
}

.ck-wishbox:hover {
  background: rgba(177, 18, 38, 0.16) !important;
  border-color: rgba(177, 18, 38, 0.34) !important;
}

.btn-primary,
a.btn-primary,
button.btn-primary,
.btn-success,
a.btn-success,
button.btn-success,
.ck-header-right .command-bar .btn-primary,
.ck-header-right .command-bar .dropdown-toggle.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(177, 18, 38, 0.22) !important;
}

.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover,
.btn-success:hover,
a.btn-success:hover,
button.btn-success:hover,
.ck-header-right .command-bar .btn-primary:hover,
.ck-header-right .command-bar .dropdown-toggle.btn-primary:hover {
  background: #8f1022 !important;
  border-color: #8f1022 !important;
  box-shadow: 0 10px 28px rgba(143, 16, 34, 0.28) !important;
}

.ck-header-right .command-bar .btn-default:hover,
.ck-header-right .command-bar .btn-outline-default:hover,
.ck-header-right .command-bar .btn-link:not(.btn-primary):hover {
  border-color: rgba(177, 18, 38, 0.34) !important;
  color: var(--primary) !important;
}

nav a:hover,
.prompt-chip:hover,
.btn-icon-only:hover,
.expense-hub__upload-card:hover,
.expense-hub__filter-tab:hover,
.upload-zone-full:hover {
  background-color: rgba(177, 18, 38, 0.06) !important;
  color: var(--primary) !important;
}

nav a.active,
.filter-tab.active,
.expense-hub__filter-tab.is-active {
  background-color: rgba(177, 18, 38, 0.10) !important;
  border-color: rgba(177, 18, 38, 0.28) !important;
  color: var(--primary) !important;
}

.btn-quick-add,
.btn-action-primary,
.expense-hub__btn--primary,
.expense-upload-modal__primary,
.beleg-review-modal__secondary,
.assistant-spotlight__submit,
.sidebar-toggle-btn:hover,
.wizard-primary-btn,
.wizard-choice-btn.is-selected,
.beleg-add-row-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 8px 24px rgba(177, 18, 38, 0.22) !important;
  color: #fff !important;
}

.btn-outline-sm:hover,
.btn-action-outline:hover,
.expense-hub__copy:hover,
.expense-hub__btn--outline:hover,
.expense-upload-modal__dropzone:hover,
.expense-upload-modal__dropzone.is-dragover,
.beleg-review-modal__ghost-link,
.beleg-review-modal__close,
.info-icon,
.header-link,
.logo-sub,
.expense-hub__meta-note,
.beleg-review-modal__eyebrow {
  color: var(--primary) !important;
}

.btn-outline-sm:hover,
.btn-action-outline:hover,
.expense-hub__copy,
.expense-hub__btn--outline,
.expense-upload-modal__dropzone,
.beleg-review-modal__ghost-link,
.beleg-review-modal__close,
.info-icon {
  border-color: rgba(177, 18, 38, 0.24) !important;
}

.input-wrapper:focus-within,
.expense-upload-modal__dropzone.is-dragover,
.beleg-editor-search input:focus,
.wizard-search-input:focus,
.platform-card__action:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 6px rgba(177, 18, 38, 0.10) !important;
}

.ai-spotlight,
.email-autopilot-card,
.burn-rate,
.expense-hub__mail-card,
.expense-hub__upload-card,
.beleg-review-modal__preview,
.wishbox-card {
  background: linear-gradient(135deg, rgba(177, 18, 38, 0.07), rgba(255, 255, 255, 0.98)) !important;
  border-color: rgba(177, 18, 38, 0.18) !important;
  box-shadow: 0 14px 40px rgba(177, 18, 38, 0.10) !important;
}

.item-icon,
.expense-hub__icon,
.sub-logo,
.tools-hub__icon--teal,
.tools-hub__icon--green {
  background: rgba(177, 18, 38, 0.12) !important;
  color: var(--primary) !important;
}

.status-open,
.expense-hub .status-open,
.status-pending,
.expense-hub .status-pending,
.status-paid,
.expense-hub .status-paid {
  background: rgba(177, 18, 38, 0.10) !important;
  color: #8f1022 !important;
  border-color: rgba(177, 18, 38, 0.20) !important;
}

.beleg-review-modal__meta span,
.expense-upload-modal__ghost-link,
.expense-upload-modal__secondary {
  background: rgba(177, 18, 38, 0.08) !important;
  color: #8f1022 !important;
}

.nav-badge,
.badge.rounded-pill.bg-primary,
.badge.bg-primary,
.filter-count.urgent,
.status-missing,
.expense-hub .status-missing {
  background: #e10920 !important;
  color: #fff !important;
  border-color: #e10920 !important;
}



.fly-scope .f-btn:is(input[type=checkbox],input[type=radio]):checked {
    background: #e10920;
    
}

.header-brand.aside-show-expanded img{
    max-height: 50px
}


.ae-topbar-actions .btn-default:hover,
.ae-topbar-actions .btn-outline-default:hover,
.ae-topbar-actions .ae-default-action.btn-default:hover {
  border-color: #e10920 !important;
  color: #e10920 !important;
}

.ae-topbar-actions .btn-primary,
.ae-topbar-actions .ae-default-action.btn-primary,.bl-new-btn {
  background: #e10920 !important;
  border: 1px solid #e10920 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(177,18,38,0.28) !important;
}
.bl-contact-btn,.bl-chip { /*outline red */
  border-color: #e10920 !important;
  color: #e10920 !important;
  background: rgba(177, 18, 38, 0.08) !important;
}

.tax-hub__savings {
    background: linear-gradient(135deg, var(--primary) 0%, #7f1d1d 100%);
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(177, 18, 38, 0.15);
    color: #FFFFFF;
    padding: 32px 38px;
}


.fly-scope .f-btn-primary {
    --f-btn-color: var(--primary)!important;
    --f-btn-fg: var(--color-primary-content)!important;
}



.form-signin .btn-primary:hover, .form-signin #button-login:hover, .form-signin #button-register:hover {
    background: #951526 !important;
    border-color: #951526 !important;
    box-shadow: 0 6px 20px rgba(149, 21, 38, 0.32) !important;
}

.ae-topbar-actions .btn-primary:hover, .ae-topbar-actions .ae-default-action.btn-primary:hover {
    background: #951526 !important;
    border-color: #951526 !important;
    box-shadow: 0 6px 18px rgba(149, 21, 38, 0.36) !important;
}

.income-hub__button {

    box-shadow: 0 8px 20px rgba(149, 21, 38, 0.22);
}

.catalog-action--primary, .catalog-action--primary:hover {
    background: var(--income-primary);
    color: #fff;
    box-shadow: 0 10px 22px rgba(149, 21, 38, 0.28);
}
.catalog-row__badge {
    background: var(--income-primary);

}
.catalog-panel--customers {
    border-top: 4px solid var(--income-primary);
}
.catalog-hub__summary-label, .catalog-hub__summary-meta, .catalog-row span, .catalog-panel__header p, .catalog-panel__empty, .catalog-hub__highlight-copy {
    color: #74808b;
}
.catalog-row__badge.catalog-row__badge--square {
  color: #fff;
}


.sd-tab.active {
    background: #f8e8e9!important;
    color: #8f1022!important;
}
.sd-tab.active .sd-tab-num {
    background: #8f1022!important;

}


.ob-step.is-active .ob-step-num { background: #8f1022!important; color: #fff; }
.ob-step.is-active .ob-step-body strong { color: #8f1022!important; }

.ob-btn--primary {
    background: #8f1022!important;
}

.ob-progress-bar {
    background: linear-gradient(90deg, #8f1022 0%, #c8243c 100%)!important;
}
.btn-outline-primary {
    border-color: #8f1022 !important;
    color: #8f1022 !important;
}

/* ── Buchungseditor (public/css/buchen.css) ──────────────────────────────
   buchen.css hat sein eigenes, auf .bk gescoptes Mini-Designsystem
   (--bk-green/--bk-green-go/--bk-green-soft, --bk-teal/--bk-teal-soft)
   statt der globalen --primary/--success-Variablen oben – die "Erfolg/
   Gebucht"-Farbe UND der teal-blaue Akzent (Experte/Schnell-Umschalter,
   Links, Fokus-Ringe, Split-Chips, Kontenplan-Badges, ...) blieben dort
   deshalb unverändert, obwohl .btn-primary/.btn-success im Rest der App
   schon auf BDO-Rot umgestellt sind. Selektor bewusst mit "body.ae-tpl-bdo"
   statt nur ".bk" (höhere Spezifität als buchen.css' eigenes ".bk {}"),
   dadurch reicht die Custom-Property-Neudefinition ohne !important – buchen.css
   lädt zwar NACH dieser Datei im DOM, Spezifität schlägt aber Ladereihenfolge.
   Farben identisch zur bestehenden BDO-Palette oben (--primary/#8f1022-Hover),
   damit "Buchen & weiter" & Co. exakt wie die anderen Primary-Buttons wirken. */
/* .bk-modal (Konto-anlegen-Modal) hat seit dem Scope-Fix in buchen.css einen
   eigenen, vollständigen --bk-*-Variablensatz (unabhängig von .bk, siehe dort)
   – deshalb hier mit in den Selektor, sonst bliebe der "Anlegen"-Button dort
   grün statt rot. */
body.ae-tpl-bdo .bk,
body.ae-tpl-bdo .bk-modal {
    --bk-green:      #8f1022;
    --bk-green-go:   #e10920;
    --bk-green-soft: #f8e8e9;
    --bk-teal:       #e10920;
    --bk-teal-soft:  #f8e8e9;
}

/* Einzige Stelle in buchen.css, die die Hover-Farbe hart statt über eine
   Variable setzt (.bk-btn--go:hover) – braucht deshalb einen eigenen,
   höher-spezifischen Override statt automatisch über --bk-green-go mitzulaufen. */
body.ae-tpl-bdo .bk-btn--go:hover:not(:disabled) {
    background: #8f1022;
}

/* ── Kleine, eigenständig gescopte Module mit eigener --grün-Variable ────
   belegdetail.css/belegliste.css/ausziffern.css/kontoblatt.css definieren
   je eine eigene "Erfolg/OK/positiv"-Variable innerhalb ihres eigenen
   App-Scopes statt der globalen --success zu nutzen. Gleiches Prinzip wie
   beim Buchungseditor oben: body.ae-tpl-bdo-Präfix gibt genug Spezifität,
   um ohne !important zu gewinnen, unabhängig von der Lade-Reihenfolge. */
body.ae-tpl-bdo .bd-app { --green: #8f1022; --green-bg: #f8e8e9; }
body.ae-tpl-bdo .bl-app { --green: #8f1022; --green-bg: #f8e8e9; }
body.ae-tpl-bdo .az     { --az-green: #8f1022; }
body.ae-tpl-bdo .kb     { --kb-green: #8f1022; }

/* .az-badge--ok/.az-note--ok/.np-status--ok/.pd-status--ok & Co. setzen ihren
   hellen Hintergrund teils hart auf #dcfce7 statt über eine Variable –
   betrifft nur die "OK/positiv"-Badges dieser Module, nicht die roten/gelben. */
.az-badge--ok, .az-tag--stark, .az-note--ok {
  background: #f8e8e9 !important;
}

/* ── cockpit.css: hartkodierte Grün-Werte ohne var(--success) ─────────────
   Diese Selektoren lesen ihre Farbe nicht aus --success, deshalb reicht die
   :root-Neudefinition oben nicht – jeder braucht seinen eigenen Override.
   Einheitlich auf die BDO-Palette: Text/Icon #8f1022, Fläche #f8e8e9. */
.cockpit-toggle-head__icon--success,
.tools-hub__uid-result[data-state="valid"],
.expense-upload-modal__status.is-success,
.wm-alert-success,
.tax-hub__goal-delta.is-up,
.svs-hub__box--ok,
.svs-hub__chip--ok,
.svs-modal__preview[data-tone="ok"],
.svs-hub__tag--ok,
.svs-hub__status--bezahlt,
.svs-opt-hist__badge--ok,
.svs-hub__qc-badge--bezahlt {
  background: #f8e8e9 !important;
  border-color: #e2a8ae !important;
}
.cockpit-toggle-head__icon--success,
.tools-hub__uid-result[data-state="valid"] strong,
.expense-upload-modal__status.is-success,
.wm-alert-success,
.tax-hub__goal-delta.is-up,
.tax-hub__kpi-delta.is-up,
.svs-hub__box--ok,
.svs-hub__chip--ok,
.svs-hub__chip--ok .svs-hub__chip-day,
.svs-hub__tag--ok,
.svs-hub__rail-amount--bezahlt,
.svs-hub__status--bezahlt,
.svs-opt-hist__badge--ok,
.svs-hub__qc-badge--bezahlt,
.svs-hub__calc-result-total--credit > strong:last-child,
.aw-kpi__sub--up,
.ie-kpi-cell--income .ie-kpi-cell__icon,
.ie-kpi-cell--income .ie-kpi-cell__value,
.ie-kpi-cell--accepted .ie-kpi-cell__icon,
.ie-kpi-cell--accepted .ie-kpi-cell__value,
.income-hub__item-icon.icon-success,
.ae-order-edit .invoice-summary-card__badge {
  color: #8f1022 !important;
}
.ie-kpi-cell--income .ie-kpi-cell__icon,
.ie-kpi-cell--income .ie-kpi-cell__value,
.ie-kpi-cell--accepted .ie-kpi-cell__icon,
.ie-kpi-cell--accepted .ie-kpi-cell__value,
.income-hub__item-icon.icon-success,
.ae-order-edit .invoice-summary-card__badge,
.income-hub__status.status-paid,
.income-hub__status.status-accepted {
  background: #f8e8e9 !important;
}
.income-hub__status.status-paid,
.income-hub__status.status-accepted {
  color: #8f1022 !important;
}
.svs-hub__detail-row.is-bezahlt,
.svs-opt-hist__row.is-erledigt,
.aw-kpi--profit {
  border-left-color: #8f1022 !important;
}
.ae-modal-btn--success {
  background: #e10920 !important;
  border-color: #e10920 !important;
  color: #fff !important;
}
.ae-modal-btn--success:hover {
  background: #8f1022 !important;
  border-color: #8f1022 !important;
}
.form-signin .alert-success {
  background: #f8e8e9 !important;
  color: #8f1022 !important;
  border-left-color: #e10920 !important;
}

/* ── Blade-eigene <style>-Blöcke mit hartkodiertem Grün ───────────────────
   (Inbox, Dokument-Archiv, Natürliche Personen, Person-Dashboard,
   Buchhaltungs-Hub, Statistik, Steuerkonto, Rechnungslayout-Editor,
   Chat-Bubbles, Global-Dropzone). Gleiche Palette wie oben. */
.income-hub__status.status-aufgabe,
.inbox-status--beantwortet,
.np-status--ok,
.pd-status--ok,
.da-chip--in,
.da-status-select.da-status--ok,
.income-hub__status.status-dokument-uebernommen,
.bh-ust-badge.is-klein,
.bh-step.is-ok .bh-step__icon {
  background: #f8e8e9 !important;
  color: #8f1022 !important;
  border-color: #e2a8ae !important;
}
.inbox-anfrage-block--antwort,
.da-subhead--in,
#chatbot-messages .cb-thread-bubble--antwort,
.nl-bubble--antwort {
  background: #f8e8e9 !important;
}
.da-subhead--in {
  border-left-color: #8f1022 !important;
  color: #8f1022 !important;
}
.nl-modal__reply-hint,
.stat-bar__fill--user {
  color: #8f1022 !important;
}
.stat-bar__fill--user {
  background: #8f1022 !important;
}
.sk-stat-card.green::before {
  background: #8f1022 !important;
}
.rl-toggle input:checked + .slider {
  background: #e10920 !important;
}
#gdz-overlay.gdz-success {
  border-color: #e10920 !important;
  background: rgba(177, 18, 38, .08) !important;
}
#gdz-overlay.gdz-success #gdz-overlay-inner {
  color: #8f1022 !important;
  border-color: #e10920 !important;
}
.ae-preview__timeline-item--created .ae-preview__timeline-dot,
.ae-preview__timeline-item--payment .ae-preview__timeline-dot,
.ae-preview__timeline-item--paid .ae-preview__timeline-dot {
  background: #e10920 !important;
}

/* fristenradar/index.blade.php definiert --success lokal neu (scoped auf
   .fristenradar-page) und überschreibt damit unsere globale :root-Variable
   für alles innerhalb dieser Seite – eigener Override nötig. */
body.ae-tpl-bdo .fristenradar-page { --success: #e10920; }
.fristenradar-stat--success .fristenradar-stat-value {
  color: #8f1022 !important;
}

/* Animierter Border-Top der Hub-Karten (Einnahmen/Ausgaben/Steuern & SVS,
   siehe cockpit.css .income-hub__card--tabbed/.expense-hub__card/
   .tax-hub__card--tabbed/.border-primary-animation) ist dort als literale
   Farbe #449ea8 hartkodiert statt über var(--income-primary) – reagiert
   deshalb nicht automatisch auf den :root-Override oben und braucht einen
   eigenen Override mit denselben Selektoren (gleiche Ursache wie der
   frühere box-shadow-Bug bei .income-hub__button etc.). */
.income-hub__card--tabbed::before,
.income-hub__card--tabbed::after,
.expense-hub>.ae-tabs-row~.expense-hub__card::before,
.expense-hub>.ae-tabs-row~.expense-hub__card::after,
.border-primary-animation::before,
.border-primary-animation::after,
.tax-hub__card--tabbed::before,
.tax-hub__card--tabbed::after {
  background: var(--income-primary) !important;
}