:root{
 --sidebar-width:272px;
 --brand-red:#009039;
 --brand-red-dark:#007A30;
 --brand-red-soft:#EAF7EF;
 --anthracite:#292d32;
 --anthracite-2:#3a3f45;
 --paper:#ffffff;
 --warm-bg:#f4f3f1;
 --line:#e4e2df;
 --text:#262a2f;
 --muted:#71767c;
 --success:#278552;
 --danger:#007A30;
 --warning:#d69217;
 --info:#247ca5;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
 margin:0;
 background:var(--warm-bg);
 color:var(--text);
 font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
 letter-spacing:.005em
}
.app-shell{min-height:100vh}
.sidebar{
 position:fixed;
 inset:0 auto 0 0;
 width:var(--sidebar-width);
 color:#fff;
 background:var(--anthracite);
 display:flex;
 flex-direction:column;
 z-index:1040;
 box-shadow:10px 0 30px rgba(28,30,33,.13)
}
.sidebar:before{
 content:"";
 position:absolute;
 inset:0 0 auto;
 height:6px;
 background:var(--brand-red)
}
.sidebar-brand{
 display:flex;
 align-items:center;
 gap:14px;
 padding:30px 22px 24px;
 border-bottom:1px solid rgba(255,255,255,.10)
}
.brand-icon{
 width:50px;
 height:50px;
 position:relative;
 display:grid;
 place-items:center;
 background:var(--brand-red);
 font-weight:900;
 font-size:1rem;
 box-shadow:0 8px 20px rgba(0,144,57,.25)
}
.brand-icon strong{position:relative;z-index:2;margin-top:7px}
.brand-roof{
 position:absolute;
 left:8px;
 top:8px;
 width:34px;
 height:17px;
 border-top:4px solid white;
 border-left:4px solid white;
 transform:skewY(-28deg) rotate(2deg);
 opacity:.92
}
.brand-title{
 font-weight:900;
 font-size:1.05rem;
 letter-spacing:.01em
}
.brand-subtitle{
 font-size:.69rem;
 text-transform:uppercase;
 letter-spacing:.095em;
 color:#bfc2c6;
 margin-top:5px;
 line-height:1.35
}
.sidebar-nav{display:grid;gap:4px;padding:23px 16px}
.sidebar-nav a{
 display:flex;
 align-items:center;
 gap:13px;
 color:#e6e7e8;
 text-decoration:none;
 padding:13px 15px;
 border-left:4px solid transparent;
 font-size:.92rem;
 font-weight:700;
 transition:.18s ease
}
.sidebar-nav a:hover{
 color:#fff;
 background:rgba(255,255,255,.055);
 border-left-color:#868b91
}
.sidebar-nav a.active{
 color:#fff;
 background:var(--brand-red);
 border-left-color:#fff;
 box-shadow:0 8px 22px rgba(0,144,57,.22)
}
.nav-icon{width:24px;text-align:center;font-size:1.1rem}
.sidebar-footer{
 margin-top:auto;
 padding:18px;
 border-top:1px solid rgba(255,255,255,.1);
 background:#24282d
}
.user-card{
 display:flex;
 align-items:center;
 gap:11px;
 padding:13px;
 background:#34393f
}
.user-avatar{
 width:40px;height:40px;border-radius:50%;
 display:grid;place-items:center;
 background:var(--brand-red);
 font-weight:900
}
.user-meta{display:flex;flex-direction:column;min-width:0}
.user-meta span{
 font-size:.68rem;
 color:#b6bac0;
 text-transform:uppercase;
 letter-spacing:.07em
}
.user-meta strong{font-size:.94rem;overflow:hidden;text-overflow:ellipsis}
.logout-link{
 display:block;
 margin-top:10px;
 padding:11px 13px;
 border:1px solid rgba(255,255,255,.14);
 text-decoration:none;
 color:#fff;
 text-align:center;
 font-weight:700;
 font-size:.88rem
}
.logout-link:hover{background:var(--brand-red);border-color:var(--brand-red);color:#fff}
.app-main{margin-left:var(--sidebar-width);min-height:100vh}
.topbar-modern{
 min-height:82px;
 background:#fff;
 border-bottom:1px solid var(--line);
 display:flex;
 align-items:center;
 padding:0 32px;
 position:sticky;
 top:0;
 z-index:1020;
 box-shadow:0 5px 22px rgba(30,33,36,.05)
}
.topbar-modern:after{
 content:"";
 position:absolute;
 left:0;
 bottom:-1px;
 width:88px;
 height:3px;
 background:var(--brand-red)
}
.sidebar-toggle{display:none;border:0;background:transparent;font-size:1.35rem;margin-right:12px}
.topbar-title{font-size:1.13rem;font-weight:900;color:var(--anthracite)}
.topbar-subtitle{
 font-size:.68rem;
 color:var(--muted);
 text-transform:uppercase;
 letter-spacing:.11em;
 margin-top:4px
}
.topbar-user{margin-left:auto;display:flex;align-items:center;gap:7px;font-weight:800}
.topbar-user-label{color:var(--muted);font-weight:500;font-size:.82rem}
.status-dot{
 width:9px;height:9px;border-radius:50%;
 background:#2fa662;
 box-shadow:0 0 0 4px rgba(47,166,98,.14)
}
.content-area{padding:30px}
.crm-hero{
 min-height:315px;
 overflow:hidden;
 position:relative;
 display:flex;
 align-items:stretch;
 background:linear-gradient(104deg,var(--anthracite) 0%,#33383e 64%,#454a50 100%);
 color:#fff;
 box-shadow:0 18px 44px rgba(31,34,37,.17)
}
.crm-hero:before{
 content:"";
 position:absolute;
 left:0;top:0;bottom:0;
 width:8px;
 background:var(--brand-red)
}
.crm-hero-content{
 position:relative;
 z-index:2;
 width:68%;
 padding:43px 52px
}
.hero-kicker{
 color:#fff;
 font-size:.72rem;
 font-weight:900;
 letter-spacing:.2em;
 margin-bottom:14px;
 padding-left:17px;
 position:relative
}
.hero-kicker:before{
 content:"";
 position:absolute;
 left:0;top:2px;
 width:5px;height:12px;
 background:var(--brand-red)
}
.crm-hero h1{
 font-size:clamp(2rem,4vw,3.65rem);
 line-height:1.02;
 font-weight:900;
 letter-spacing:-.035em;
 margin:0 0 16px
}
.crm-hero p{
 max-width:650px;
 color:#d9dbdd;
 font-size:1rem;
 line-height:1.62;
 margin:0 0 25px
}
.hero-actions{display:flex;flex-wrap:wrap;gap:11px}
.hero-shape{
 position:absolute;
 right:-40px;
 top:-28px;
 width:37%;
 height:120%;
 background:var(--brand-red);
 clip-path:polygon(34% 0,100% 0,100% 100%,0 100%);
 display:grid;
 place-items:center
}
.hero-house{
 position:relative;
 width:125px;
 height:95px;
 border:8px solid rgba(255,255,255,.94);
 border-top:0;
 margin-left:28px
}
.hero-roof{
 position:absolute;
 width:100px;
 height:100px;
 border-left:8px solid #fff;
 border-top:8px solid #fff;
 transform:rotate(45deg);
 left:5px;
 top:-53px
}
.hero-window{
 position:absolute;
 width:38px;
 height:43px;
 border:6px solid #fff;
 bottom:0;
 left:36px
}
.btn{
 border-radius:0;
 font-weight:800;
 padding:.68rem 1.05rem;
 box-shadow:none!important
}
.btn-primary{
 --bs-btn-bg:var(--brand-red);
 --bs-btn-border-color:var(--brand-red);
 --bs-btn-hover-bg:var(--brand-red-dark);
 --bs-btn-hover-border-color:var(--brand-red-dark);
 --bs-btn-active-bg:var(--brand-red-dark)
}
.btn-outline-primary{
 --bs-btn-color:var(--brand-red);
 --bs-btn-border-color:var(--brand-red);
 --bs-btn-hover-bg:var(--brand-red);
 --bs-btn-hover-border-color:var(--brand-red)
}
.card{
 border-radius:0!important;
 background:#fff
}
.dashboard-card{
 border:0!important;
 border-top:5px solid var(--brand-red)!important;
 box-shadow:0 9px 25px rgba(29,32,35,.075)!important
}
.dashboard-card .card-body{padding:23px}
.dashboard-card .text-secondary{
 color:#74797f!important;
 text-transform:uppercase;
 font-size:.73rem;
 font-weight:800;
 letter-spacing:.08em
}
.dashboard-card .h3{margin-top:9px;color:var(--anthracite)}
.form-control,.form-select{
 border-radius:0;
 border:1px solid #d7d5d2;
 min-height:43px
}
.form-control:focus,.form-select:focus{
 border-color:var(--brand-red);
 box-shadow:0 0 0 .18rem rgba(0,144,57,.1)
}
.form-label{
 font-size:.77rem;
 font-weight:800;
 text-transform:uppercase;
 letter-spacing:.055em;
 color:#555a60
}
.crm-table{
 max-height:68vh;
 border-top:5px solid var(--brand-red);
 box-shadow:0 9px 28px rgba(29,32,35,.075)
}
.crm-table table{min-width:1550px}
.crm-table th{
 white-space:nowrap;
 z-index:2;
 padding:15px 13px;
 font-size:.7rem;
 text-transform:uppercase;
 letter-spacing:.065em;
 color:#4d5258;
 background:#efeeec!important;
 border-bottom:2px solid #d6d3cf
}
.crm-table td{padding:12px 13px;border-color:#ece9e5}
.crm-table tbody tr:hover{background:#fff7f7}
.sort-link{color:inherit;text-decoration:none}
.sort-link:hover{color:var(--brand-red)}
.crm-table tbody tr td:first-child{border-left:6px solid transparent}
.status-provisioniert td:first-child{border-left-color:var(--success)!important}
.status-storniert td:first-child{border-left-color:var(--danger)!important}
.status-offen td:first-child{border-left-color:var(--warning)!important}
.status-in-bearbeitung td:first-child{border-left-color:var(--info)!important}
.status-select{
 min-width:152px;
 border:0;
 min-height:34px;
 font-weight:800;
 font-size:.8rem
}
.status-offen-select{background:#fff3d7;color:#97610a}
.status-bearbeitung-select{background:#e6f4fb;color:#176884}
.status-provisioniert-select{background:#e7f5ec;color:#216c45}
.status-storniert-select{background:#fdebec;color:#a4242a}
.alert{border-radius:0;border:0;border-left:6px solid currentColor}
.login-wrap{
 min-height:calc(100vh - 3rem);
 display:grid;
 place-items:center;
 background:
 linear-gradient(112deg,rgba(41,45,50,.98),rgba(41,45,50,.88)),
 linear-gradient(135deg,#31363c,#1f2327)
}
.login-card{
 width:min(460px,100%);
 border-top:7px solid var(--brand-red)!important
}
.login-card .card-body{padding:48px!important}
.login-mark{
 width:58px;height:58px;
 display:grid;place-items:center;
 background:var(--brand-red);
 color:#fff;
 font-weight:900;
 margin-bottom:22px;
 box-shadow:10px 10px 0 #ecebea
}
@media(max-width:1100px){
 .crm-hero-content{width:76%}
 .hero-shape{width:32%}
}
@media(max-width:991px){
 .sidebar{transform:translateX(-100%);transition:.2s}
 body.sidebar-open .sidebar{transform:translateX(0)}
 .app-main{margin-left:0}
 .sidebar-toggle{display:inline-block}
 .content-area{padding:18px}
 .topbar-modern{padding:0 16px}
 body.sidebar-open:after{
  content:"";position:fixed;inset:0;
  background:rgba(20,22,24,.55);z-index:1030
 }
 body.sidebar-open .sidebar{z-index:1040}
 .crm-hero-content{width:100%;padding:36px 31px}
 .hero-shape{display:none}
}
@media(max-width:600px){
 .crm-hero{min-height:auto}
 .crm-hero h1{font-size:2.15rem}
 .hero-actions{display:grid}
 .hero-actions .btn{width:100%}
 .topbar-user-label{display:none}
}


/* Kompakteres Layout */
.crm-hero{min-height:170px!important}
.crm-hero-content{padding:22px 34px!important}
.hero-kicker{font-size:.60rem!important;margin-bottom:8px!important}
.crm-hero h1{font-size:1.8rem!important;margin-bottom:8px!important}
.crm-hero p{font-size:.85rem!important;line-height:1.4!important;margin-bottom:14px!important;max-width:520px}
.hero-actions .btn{padding:.45rem .9rem!important;font-size:.85rem!important}
.hero-house{transform:scale(.72)}

body,
.table,
.form-control,
.form-select,
.btn{
    font-size:.88rem!important;
}

.crm-table th{
    font-size:.65rem!important;
    padding:10px 8px!important;
}

.crm-table td{
    font-size:.82rem!important;
    padding:8px 8px!important;
}

.dashboard-card .h3{
    font-size:1.35rem!important;
}

.dashboard-card .text-secondary{
    font-size:.65rem!important;
}

.topbar-title{
    font-size:1rem!important;
}

.sidebar-nav a{
    font-size:.85rem!important;
}

/* KW ohne Präfix */


.compact-page-head{display:flex;align-items:center;justify-content:space-between;gap:20px}
.page-kicker{font-size:.62rem;font-weight:900;letter-spacing:.18em;color:var(--brand-red);margin-bottom:4px}
.customer-row{cursor:pointer}
.theme-toggle{margin-left:auto;margin-right:18px;width:36px;height:36px;border:1px solid var(--line);background:var(--paper);color:var(--text);font-size:1rem}
.customer-drawer{position:fixed;top:0;right:0;width:min(430px,100%);height:100vh;background:var(--paper);box-shadow:-18px 0 42px rgba(20,22,24,.18);z-index:2000;transform:translateX(105%);transition:.25s;overflow:auto}
.customer-drawer.open{transform:translateX(0)}
.drawer-close{position:absolute;top:14px;right:16px;border:0;background:rgba(255,255,255,.12);color:white;width:38px;height:38px;font-size:1.7rem;z-index:2}
.drawer-header{background:var(--anthracite);color:white;padding:36px 30px 28px;border-top:6px solid var(--brand-red)}
.drawer-header h2{font-size:1.7rem;font-weight:900;margin:8px 0}
.drawer-header p{margin:0;color:#d5d7da}
.drawer-status{font-size:.67rem;letter-spacing:.1em;text-transform:uppercase;color:#fff}
.drawer-body{padding:24px}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.detail-grid>div{background:var(--warm-bg);padding:14px}
.detail-grid span{display:block;font-size:.67rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.detail-grid strong{display:block;margin-top:4px}
.drawer-actions{display:flex;flex-wrap:wrap;gap:8px;margin:20px 0}
.drawer-section{border-top:1px solid var(--line);padding-top:18px}
.drawer-section h3{font-size:1rem;font-weight:900}
.note-preview{padding:12px 0;border-bottom:1px solid var(--line)}
.note-preview small{display:block;color:var(--muted);margin-top:5px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}
.calendar-weekday{background:var(--anthracite);color:white;padding:10px;text-align:center;font-weight:800;font-size:.75rem}
.calendar-day{min-height:135px;background:var(--paper);padding:8px;overflow:hidden}
.calendar-day.empty{background:#eeece9}
.calendar-day.today{box-shadow:inset 0 0 0 3px var(--brand-red)}
.calendar-day-number{font-weight:900;margin-bottom:7px}
.calendar-event{display:block;text-decoration:none;color:var(--text);background:var(--warm-bg);padding:6px 7px;margin-bottom:5px;border-left:4px solid var(--info);font-size:.72rem}
.calendar-event strong,.calendar-event span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.status-dot-provisioniert{border-left-color:var(--success)}
.status-dot-storniert{border-left-color:var(--danger)}
.status-dot-offen{border-left-color:var(--warning)}
.status-dot-in-bearbeitung{border-left-color:var(--info)}
.chart-card{min-height:100%}

[data-theme="dark"]{
 --warm-bg:#171a1f;
 --paper:#23272d;
 --line:#373c43;
 --text:#f1f3f5;
 --muted:#aab0b7;
 --anthracite:#111318;
 --anthracite-2:#1b1f25
}
[data-theme="dark"] body{background:var(--warm-bg);color:var(--text)}
[data-theme="dark"] .topbar-modern,
[data-theme="dark"] .card,
[data-theme="dark"] .customer-drawer,
[data-theme="dark"] .calendar-day{background:var(--paper);color:var(--text)}
[data-theme="dark"] .table{--bs-table-bg:var(--paper);--bs-table-color:var(--text);--bs-table-border-color:var(--line)}
[data-theme="dark"] .table-light{--bs-table-bg:#2d3239;--bs-table-color:#f3f4f6}
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select{background:#1d2127;color:#f3f4f6;border-color:#444a52}
[data-theme="dark"] .text-secondary{color:#aab0b7!important}
[data-theme="dark"] .dashboard-card .h3{color:#fff}
[data-theme="dark"] .detail-grid>div,[data-theme="dark"] .calendar-event{background:#191d22}

@media(max-width:900px){
 .compact-page-head{align-items:flex-start;flex-direction:column}
 .calendar-grid{grid-template-columns:repeat(7,minmax(105px,1fr));overflow-x:auto}
}


/* =========================================================
   Bauelementedirekt24 CRM – vollständiger Dark Mode
   ========================================================= */

html,
body {
    min-height: 100%;
}

[data-theme="dark"] {
    color-scheme: dark;

    --warm-bg: #15181d;
    --paper: #22262c;
    --line: #383e46;
    --text: #f1f3f5;
    --muted: #a8afb8;
    --anthracite: #0f1115;
    --anthracite-2: #191d23;
    --brand-red-soft: #12351F;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-main,
[data-theme="dark"] main,
[data-theme="dark"] .content-area,
[data-theme="dark"] .container,
[data-theme="dark"] .container-fluid {
    background: var(--warm-bg) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .topbar-modern,
[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer,
[data-theme="dark"] .customer-drawer,
[data-theme="dark"] .drawer-body,
[data-theme="dark"] .table-responsive,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .accordion-item,
[data-theme="dark"] .accordion-button,
[data-theme="dark"] .offcanvas,
[data-theme="dark"] .toast,
[data-theme="dark"] .bg-white {
    background: var(--paper) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .card-footer.bg-white,
[data-theme="dark"] .card-header.bg-white {
    background: var(--paper) !important;
}

[data-theme="dark"] .text-secondary,
[data-theme="dark"] .form-text,
[data-theme="dark"] small,
[data-theme="dark"] .muted,
[data-theme="dark"] .topbar-subtitle,
[data-theme="dark"] .page-kicker + h1 + p {
    color: var(--muted) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .topbar-title,
[data-theme="dark"] .dashboard-card .h3,
[data-theme="dark"] .dashboard-card .h2,
[data-theme="dark"] .dashboard-card strong {
    color: var(--text) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea,
[data-theme="dark"] input,
[data-theme="dark"] select {
    background: #1a1e24 !important;
    color: #f3f4f6 !important;
    border-color: #454c56 !important;
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] textarea::placeholder,
[data-theme="dark"] input::placeholder {
    color: #7f8791 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus {
    background: #1a1e24 !important;
    color: #ffffff !important;
    border-color: var(--brand-red) !important;
    box-shadow: 0 0 0 .2rem rgba(0, 144, 57, .16) !important;
}

[data-theme="dark"] input[readonly],
[data-theme="dark"] input:disabled,
[data-theme="dark"] select:disabled,
[data-theme="dark"] textarea:disabled {
    background: #252a31 !important;
    color: #c7ccd2 !important;
}

[data-theme="dark"] .table {
    --bs-table-bg: var(--paper);
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: #272c33;
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: #2c3138;
    --bs-table-hover-color: #ffffff;
    background: var(--paper) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .table > :not(caption) > * > * {
    background: transparent !important;
    color: inherit !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .table-light,
[data-theme="dark"] thead.table-light,
[data-theme="dark"] .crm-table th {
    --bs-table-bg: #2b3037;
    --bs-table-color: #f4f5f6;
    background: #2b3037 !important;
    color: #f4f5f6 !important;
    border-color: #424851 !important;
}

[data-theme="dark"] .crm-table tbody tr:hover,
[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background: #2b3037 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .calendar-grid {
    background: var(--line) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .calendar-day,
[data-theme="dark"] .calendar-event {
    background: var(--paper) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .calendar-day.empty {
    background: #1a1e24 !important;
}

[data-theme="dark"] .calendar-event {
    background: #1a1e24 !important;
}

[data-theme="dark"] .detail-grid > div,
[data-theme="dark"] .note-preview,
[data-theme="dark"] .user-card,
[data-theme="dark"] .dashboard-card {
    background: #1c2026 !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .drawer-header {
    background: #101216 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .drawer-section,
[data-theme="dark"] .note-preview,
[data-theme="dark"] hr {
    border-color: var(--line) !important;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #d5d9de !important;
    border-color: #5b626c !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: #3a4048 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-outline-primary {
    color: #4FD27F !important;
    border-color: #009039 !important;
}

[data-theme="dark"] .btn-outline-danger {
    color: #76E29A !important;
    border-color: #007A30 !important;
}

[data-theme="dark"] .alert {
    background: #252a31 !important;
    color: var(--text) !important;
}

[data-theme="dark"] .alert-success {
    border-left-color: #2e9d62 !important;
}

[data-theme="dark"] .alert-danger {
    border-left-color: #009039 !important;
}

[data-theme="dark"] .alert-warning {
    border-left-color: #d69217 !important;
}

[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .list-group-item-action {
    color: var(--text) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus,
[data-theme="dark"] .list-group-item-action:hover {
    background: #30353d !important;
    color: #ffffff !important;
}

[data-theme="dark"] code {
    color: #76E29A !important;
    background: #191d22 !important;
}

[data-theme="dark"] canvas {
    filter: brightness(.92) contrast(1.05);
}

[data-theme="dark"] .login-wrap {
    background: #111318 !important;
}

[data-theme="dark"] .login-card {
    background: var(--paper) !important;
}

[data-theme="dark"] .status-offen-select {
    background: #463818 !important;
    color: #ffd978 !important;
}

[data-theme="dark"] .status-bearbeitung-select {
    background: #173446 !important;
    color: #7dd4ff !important;
}

[data-theme="dark"] .status-provisioniert-select {
    background: #193b2a !important;
    color: #80e5ad !important;
}

[data-theme="dark"] .status-storniert-select {
    background: #452326 !important;
    color: #ff9da1 !important;
}

[data-theme="dark"] .theme-toggle {
    background: #1a1e24 !important;
    color: #ffffff !important;
    border-color: #454c56 !important;
}

/* Verhindert weiße Restflächen am unteren Seitenende */
[data-theme="dark"] .app-shell,
[data-theme="dark"] .app-main,
[data-theme="dark"] .content-area {
    min-height: 100vh;
}

[data-theme="dark"] .content-area::after {
    content: "";
    display: block;
    height: 1px;
    background: transparent;
}


/* CRM Pro Module */
.pipeline-board{display:flex;gap:12px;overflow-x:auto;padding-bottom:16px;align-items:flex-start}
.pipeline-column{width:285px;min-width:285px;background:var(--paper);border-top:5px solid var(--brand-red);box-shadow:0 8px 24px rgba(0,0,0,.08)}
.pipeline-column>header{display:flex;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}
.pipeline-column>header span{background:var(--warm-bg);padding:2px 8px;font-size:.75rem;font-weight:800}
.pipeline-dropzone{padding:10px;min-height:420px}
.pipeline-card{background:var(--warm-bg);border:1px solid var(--line);border-left:5px solid var(--brand-red);padding:11px;margin-bottom:9px;cursor:grab}
.pipeline-card.dragging{opacity:.45}
.pipeline-name{font-weight:900;color:var(--text);text-decoration:none;display:block}
.pipeline-meta,.pipeline-date{font-size:.72rem;color:var(--muted);margin-top:4px}
.pipeline-value{font-weight:900;margin-top:8px}
.pipeline-priority{font-size:.58rem;text-transform:uppercase;letter-spacing:.08em;float:right}
.priority-dringend{color:#009039}.priority-hoch{color:#d69217}
.today-item{display:flex;flex-direction:column;padding:12px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text)}
.today-item span{font-size:.78rem;color:var(--muted)}

.timeline{position:relative;padding-left:28px}.timeline:before{content:"";position:absolute;left:8px;top:0;bottom:0;width:2px;background:var(--line)}
.timeline-item{position:relative;background:var(--paper);padding:16px 18px;margin-bottom:12px;box-shadow:0 5px 18px rgba(0,0,0,.06)}
.timeline-dot{position:absolute;left:-25px;top:20px;width:12px;height:12px;border-radius:50%;background:var(--brand-red);box-shadow:0 0 0 5px var(--warm-bg)}
.timeline-item h3{font-size:1rem;margin:5px 0}.timeline-item p{margin:0}
.contact-quick-actions{display:flex;gap:8px;margin:15px 0}
.contact-quick-actions a{width:40px;height:40px;display:grid;place-items:center;background:var(--brand-red);color:#fff;text-decoration:none;font-weight:900}
[data-theme="dark"] .pipeline-column,[data-theme="dark"] .pipeline-card,[data-theme="dark"] .timeline-item{background:var(--paper);color:var(--text)}
[data-theme="dark"] .pipeline-card{background:#1a1e24}


/* =========================================================
   Bauelementedirekt24 CRM v4.3
   Firmenfarbe #009039 · kompaktere Oberfläche
   ========================================================= */

:root{
    --brand-red:#009039;
    --brand-red-dark:#007A30;
    --brand-red-soft:#EAF7EF;
    --primary:#009039;
    --primary-dark:#007A30;
}

.btn,
.form-control,
.form-select,
.card,
.alert,
.dropdown-menu,
.modal-content{
    border-radius:12px !important;
}

.card{
    box-shadow:0 8px 24px rgba(20,32,24,.07) !important;
}

.sidebar-nav a.active{
    background:#009039 !important;
    box-shadow:0 8px 22px rgba(0,144,57,.22) !important;
}

.brand-icon,
.user-avatar,
.login-mark,
.contact-quick-actions a{
    background:#009039 !important;
}

.crm-hero:before,
.topbar-modern:after,
.dashboard-card,
.crm-table,
.pipeline-column{
    border-color:#009039 !important;
}

.page-kicker,
.sort-link:hover{
    color:#009039 !important;
}

.btn-primary{
    --bs-btn-bg:#009039;
    --bs-btn-border-color:#009039;
    --bs-btn-hover-bg:#007A30;
    --bs-btn-hover-border-color:#007A30;
    --bs-btn-active-bg:#007A30;
    --bs-btn-active-border-color:#007A30;
}

.btn-outline-primary{
    --bs-btn-color:#009039;
    --bs-btn-border-color:#009039;
    --bs-btn-hover-bg:#009039;
    --bs-btn-hover-border-color:#009039;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
input:focus,
select:focus{
    border-color:#009039 !important;
    box-shadow:0 0 0 .18rem rgba(0,144,57,.12) !important;
}

/* Bearbeitungsformular kompakter */
.customer-form-compact .form-control,
.customer-form-compact .form-select,
.card .form-control,
.card .form-select{
    min-height:34px !important;
    height:34px !important;
    padding:4px 9px !important;
    font-size:.80rem !important;
}

.card textarea.form-control{
    height:auto !important;
    min-height:72px !important;
}

.card .form-label{
    margin-bottom:3px !important;
    font-size:.68rem !important;
    letter-spacing:.045em !important;
}

.card .row{
    --bs-gutter-y:.55rem;
}

.card .form-text{
    font-size:.68rem !important;
    line-height:1.25;
}

.card .btn{
    padding:.45rem .8rem !important;
    font-size:.78rem !important;
}

.compact-page-head{
    margin-bottom:12px !important;
}

.compact-page-head h1{
    font-size:1.3rem !important;
}

.topbar-modern{
    min-height:68px !important;
}

.content-area{
    padding:20px !important;
}

.sidebar-nav a{
    padding:10px 13px !important;
    font-size:.82rem !important;
}

.dashboard-card .card-body{
    padding:16px !important;
}

.dashboard-card .h3{
    font-size:1.2rem !important;
}

.crm-table th{
    padding:8px 7px !important;
    font-size:.60rem !important;
}

.crm-table td{
    padding:7px !important;
    font-size:.78rem !important;
}

.status-select{
    min-height:30px !important;
    height:30px !important;
    font-size:.72rem !important;
}

/* Dark Mode in Grün */
[data-theme="dark"]{
    --brand-red:#00B348;
    --brand-red-dark:#009039;
    --brand-red-soft:#12351F;
}

[data-theme="dark"] .sidebar-nav a.active,
[data-theme="dark"] .brand-icon,
[data-theme="dark"] .user-avatar,
[data-theme="dark"] .login-mark,
[data-theme="dark"] .contact-quick-actions a{
    background:#009039 !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus{
    border-color:#00B348 !important;
    box-shadow:0 0 0 .2rem rgba(0,179,72,.16) !important;
}

[data-theme="dark"] .btn-outline-primary{
    color:#63E394 !important;
    border-color:#009039 !important;
}

[data-theme="dark"] code{
    color:#75E6A0 !important;
}

.pipeline-card{
    border-left-color:#009039 !important;
}

.timeline-dot{
    background:#009039 !important;
}

.low-stock td{
    background:transparent !important;
}


/* =========================================================
   Bauelementedirekt24 CRM v4.4
   Bearbeitungsaktionen + Kundenkarte
   ========================================================= */

.customer-form-actions{
    display:flex;
    flex-wrap:wrap;
    justify-content:flex-end;
    align-items:center;
    gap:7px;
    max-width:100%;
}

.customer-form-actions .btn{
    min-width:auto;
    white-space:nowrap;
    padding:.42rem .68rem !important;
    font-size:.72rem !important;
}

.map-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.map-layout{
    display:grid;
    grid-template-columns:minmax(260px,340px) minmax(0,1fr);
    gap:14px;
    min-height:calc(100vh - 145px);
}

.map-sidebar{
    min-height:0;
    overflow:hidden;
}

.map-sidebar .card-body{
    height:100%;
    display:flex;
    flex-direction:column;
}

.map-progress{
    font-size:.72rem;
    color:var(--muted);
}

.map-customer-list{
    overflow:auto;
    min-height:0;
    border-top:1px solid var(--line);
}

.map-customer-item{
    width:100%;
    display:grid;
    grid-template-columns:10px minmax(0,1fr) 18px;
    align-items:center;
    gap:9px;
    padding:9px 4px;
    border:0;
    border-bottom:1px solid var(--line);
    background:transparent;
    color:var(--text);
    text-align:left;
}

.map-customer-item:hover{
    background:var(--brand-red-soft);
}

.map-customer-item strong,
.map-customer-item small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.map-customer-item strong{
    font-size:.76rem;
}

.map-customer-item small{
    color:var(--muted);
    font-size:.66rem;
    margin-top:2px;
}

.map-customer-dot{
    width:8px;
    height:8px;
    border-radius:50%;
}

.map-coordinate-state{
    color:#009039;
    font-size:.75rem;
}

.map-panel{
    overflow:hidden;
    min-height:560px;
}

#customerMap{
    width:100%;
    height:100%;
    min-height:560px;
    background:#e6e8e5;
}

.map-popup{
    display:grid;
    gap:4px;
    min-width:190px;
}

.map-popup strong{
    font-size:.9rem;
}

.map-popup span{
    font-size:.73rem;
    color:#5f666d;
}

.map-popup a{
    color:#009039;
    font-weight:800;
    margin-top:5px;
}

[data-theme="dark"] .map-customer-item:hover{
    background:#193526;
}

[data-theme="dark"] .leaflet-popup-content-wrapper,
[data-theme="dark"] .leaflet-popup-tip{
    background:#23272d;
    color:#f1f3f5;
}

[data-theme="dark"] .map-popup span{
    color:#a8afb8;
}

@media(max-width:900px){
    .customer-form-actions{
        width:100%;
        justify-content:flex-start;
    }

    .map-layout{
        grid-template-columns:1fr;
        min-height:auto;
    }

    .map-sidebar{
        max-height:330px;
    }

    .map-panel,
    #customerMap{
        min-height:520px;
    }
}

@media(max-width:520px){
    .customer-form-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
    }

    .customer-form-actions .btn{
        width:100%;
    }

    .map-toolbar{
        width:100%;
    }

    .map-toolbar .btn{
        flex:1;
    }
}


/* Bauelementedirekt24 CRM v5.1 – Leaflet Kartenfix */
#customerMap,
.map-panel,
.leaflet-container{
    position:relative;
    width:100%;
    min-height:560px;
}

.leaflet-container{
    z-index:1;
    background:#dfe6df;
    font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas{
    position:absolute;
    left:0;
    top:0;
}

.leaflet-tile{
    visibility:inherit;
}

.leaflet-control{
    position:relative;
    z-index:800;
}

.leaflet-top,
.leaflet-bottom{
    position:absolute;
    z-index:1000;
    pointer-events:none;
}

.leaflet-top{top:0}
.leaflet-right{right:0}
.leaflet-bottom{bottom:0}
.leaflet-left{left:0}

.leaflet-control{
    float:left;
    clear:both;
    pointer-events:auto;
}

.leaflet-right .leaflet-control{
    float:right;
}

.leaflet-top .leaflet-control{
    margin-top:10px;
}

.leaflet-bottom .leaflet-control{
    margin-bottom:10px;
}

.leaflet-left .leaflet-control{
    margin-left:10px;
}

.leaflet-right .leaflet-control{
    margin-right:10px;
}


/* Bauelementedirekt24 CRM v5.2 – Karten-Lader und Fallback */
.map-panel{
    position:relative;
}

.map-loading,
.map-error{
    position:absolute;
    inset:0;
    z-index:1200;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    gap:10px;
    padding:25px;
    text-align:center;
    background:var(--paper);
    color:var(--text);
}

.map-loading[hidden],
.map-error[hidden]{
    display:none !important;
}

.map-loading span,
.map-error span{
    max-width:520px;
    color:var(--muted);
    font-size:.78rem;
}

.map-spinner{
    width:36px;
    height:36px;
    border:4px solid var(--line);
    border-top-color:#009039;
    border-radius:50%;
    animation:map-spin .8s linear infinite;
}

@keyframes map-spin{
    to{transform:rotate(360deg)}
}

#customerMap[hidden]{
    display:none !important;
}


/* Bauelementedirekt24 CRM v5.3 – kompakte Karte */
.map-layout{
    grid-template-columns:300px minmax(0,1fr) !important;
    min-height:0 !important;
    height:calc(100vh - 150px) !important;
    max-height:720px !important;
}

.map-sidebar,
.map-panel{
    height:100% !important;
    min-height:0 !important;
}

.map-sidebar .card-body{
    overflow:hidden !important;
}

.map-customer-list{
    flex:1 1 auto !important;
    overflow-y:auto !important;
    min-height:0 !important;
}

#customerMap,
.map-panel,
.leaflet-container{
    min-height:0 !important;
    height:100% !important;
}

.map-loading,
.map-error{
    min-height:0 !important;
}

.map-toolbar .btn{
    white-space:nowrap;
}

@media(max-width:1100px){
    .map-layout{
        grid-template-columns:260px minmax(0,1fr) !important;
        height:calc(100vh - 165px) !important;
    }
}

@media(max-width:900px){
    .map-layout{
        grid-template-columns:1fr !important;
        height:auto !important;
        max-height:none !important;
    }

    .map-sidebar{
        height:240px !important;
    }

    .map-panel,
    #customerMap,
    .leaflet-container{
        height:480px !important;
        min-height:480px !important;
    }
}


/* Bauelementedirekt24 CRM v5.4 */
#provision_summe{font-weight:800}
.customer-form-compact #provision,
.customer-form-compact #provision_summe{border-color:#009039}
.map-progress{min-height:32px}


/* Bauelementedirekt24 CRM v5.5 – Deutschlandansicht */
.map-popup-actions{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:7px;
}

.map-popup-actions a{
    font-size:.72rem;
}

#advisorFilter{
    min-height:32px !important;
}

.map-toolbar{
    align-items:center;
}


/* Bauelementedirekt24 CRM v6.0 */
.customer-record-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:16px}
.customer-record-head h1{font-size:1.6rem;font-weight:900;margin:2px 0}.customer-record-head p{margin:0;color:var(--muted)}
.record-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}
.record-kpis>div{background:var(--paper);border-top:4px solid #009039;padding:13px;box-shadow:0 6px 18px rgba(0,0,0,.05)}
.record-kpis span{display:block;font-size:.62rem;text-transform:uppercase;color:var(--muted);letter-spacing:.06em}.record-kpis strong{display:block;margin-top:5px;font-size:.9rem}
.section-title-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.section-title-row a{font-size:.75rem;color:#009039;font-weight:800;text-decoration:none}
.record-timeline article{position:relative;padding:0 0 16px 22px;border-left:2px solid var(--line)}.record-timeline-dot{position:absolute;left:-7px;top:4px;width:12px;height:12px;border-radius:50%;background:#009039}.record-timeline h3{font-size:.9rem;margin:4px 0}.record-timeline p{font-size:.78rem;margin:0;color:var(--muted)}
.document-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.document-card{display:flex;flex-direction:column;padding:12px;background:var(--warm-bg);text-decoration:none;color:var(--text)}.document-card span{font-size:.68rem;color:var(--muted);margin-top:4px}
.task-mini{padding:10px 0;border-bottom:1px solid var(--line)}.task-mini span{display:block;font-size:.68rem;color:var(--muted)}.task-mini.done{opacity:.55;text-decoration:line-through}
.offer-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--line);text-decoration:none;color:var(--text)}.offer-row span{display:flex;flex-direction:column}.offer-row small{color:var(--muted)}
.task-row{display:grid;grid-template-columns:34px 1fr;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.task-check{border:0;background:#009039;color:#fff;width:30px;height:30px;border-radius:50%}.task-row span{display:block;font-size:.7rem;color:var(--muted)}.task-row p{font-size:.76rem;margin:5px 0 0}.task-row.done{opacity:.55}.customer-name-link{color:inherit;text-decoration:none}.customer-name-link:hover{color:#009039}
@media(max-width:1200px){.record-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.customer-record-head{flex-direction:column}.record-kpis{grid-template-columns:repeat(2,1fr)}.document-grid{grid-template-columns:1fr}}


/* Bauelementedirekt24 CRM v6.1 */
.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:10px;
}
.dashboard-metric{
    display:flex;
    flex-direction:column;
    min-height:92px;
    padding:14px;
    border-top:4px solid #009039;
    background:var(--paper);
    color:var(--text);
    text-decoration:none;
    box-shadow:0 7px 20px rgba(0,0,0,.06);
}
.dashboard-metric span,
.offer-kpis span,
.statistics-kpis span{
    color:var(--muted);
    font-size:.64rem;
    text-transform:uppercase;
    letter-spacing:.055em;
}
.dashboard-metric strong{
    margin-top:auto;
    font-size:1.12rem;
}
.dashboard-chart-card{height:100%}
.offer-kpis,
.statistics-kpis{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:10px;
}
.statistics-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.offer-kpis>div,
.statistics-kpis>div{
    padding:13px;
    border-top:4px solid #009039;
    background:var(--paper);
    box-shadow:0 6px 18px rgba(0,0,0,.05);
}
.offer-kpis strong,
.statistics-kpis strong{
    display:block;
    margin-top:5px;
    font-size:.95rem;
}
.offer-status{min-width:130px}
.chart-card canvas{max-height:410px}
@media(max-width:1200px){
    .dashboard-grid{grid-template-columns:repeat(3,1fr)}
    .offer-kpis{grid-template-columns:repeat(3,1fr)}
    .statistics-kpis{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:650px){
    .dashboard-grid,
    .offer-kpis,
    .statistics-kpis{grid-template-columns:repeat(2,1fr)}
}


/* Bauelementedirekt24 CRM v6.2 – Dashboard/Dark-Mode-Fix */
[data-theme="dark"] .dashboard-metric,
[data-theme="dark"] .offer-kpis > div,
[data-theme="dark"] .statistics-kpis > div,
[data-theme="dark"] .record-kpis > div,
[data-theme="dark"] .dashboard-chart-card,
[data-theme="dark"] .chart-card {
    background: var(--paper) !important;
    color: var(--text) !important;
    border-color: #00B348 !important;
}

[data-theme="dark"] .dashboard-metric span,
[data-theme="dark"] .offer-kpis span,
[data-theme="dark"] .statistics-kpis span,
[data-theme="dark"] .record-kpis span {
    color: var(--muted) !important;
}

[data-theme="dark"] .dashboard-metric strong,
[data-theme="dark"] .offer-kpis strong,
[data-theme="dark"] .statistics-kpis strong,
[data-theme="dark"] .record-kpis strong,
[data-theme="dark"] .section-title-row h2,
[data-theme="dark"] .dashboard-chart-card h2,
[data-theme="dark"] .chart-card h2 {
    color: var(--text) !important;
}

[data-theme="dark"] canvas {
    background: transparent !important;
}


/* Bauelementedirekt24 CRM v7.0 – Angebotseditor */
.offer-editor .form-control,
.offer-editor .form-select{min-height:36px}
.offer-items-header{display:flex;justify-content:space-between;align-items:center;margin:10px 0}
.offer-items{display:grid;gap:8px}
.offer-item-row{
    display:grid;
    grid-template-columns:minmax(240px,1fr) 90px 95px 120px 120px 42px;
    gap:8px;
    align-items:center;
    padding:8px;
    background:var(--warm-bg);
    border:1px solid var(--line);
    border-radius:12px;
}
.offer-summary{
    background:var(--warm-bg);
    border:1px solid var(--line);
    border-radius:12px;
    padding:14px;
}
.offer-summary>div{display:flex;justify-content:space-between;padding:6px 0}
.offer-summary .offer-total{border-top:2px solid #009039;margin-top:6px;padding-top:10px;font-size:1.08rem}
[data-theme="dark"] .offer-item-row,
[data-theme="dark"] .offer-summary{background:#1a1e24}
@media(max-width:1050px){
    .offer-item-row{grid-template-columns:1fr 80px 90px 110px}
    .offer-item-row .offer-line-total{grid-column:2/4}
}
@media(max-width:700px){
    .offer-item-row{grid-template-columns:1fr 1fr}
    .offer-item-row>*{width:100%}
}


/* Bauelementedirekt24 CRM v8.0 - Benutzer & Berechtigungen */
.user-meta small{display:block;color:var(--muted);font-size:.62rem}
.permission-form .card-body{padding:18px}
.permission-default{font-size:.78rem;font-weight:700}
.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.permission-item{
    display:flex;
    gap:9px;
    align-items:flex-start;
    padding:9px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--warm-bg);
    font-size:.75rem;
}
.permission-item .form-check-input{margin-top:2px}
.permission-item:has(input:checked){border-color:#009039;background:#eaf7ef}
[data-theme="dark"] .permission-item{background:#1a1e24}
[data-theme="dark"] .permission-item:has(input:checked){background:#163522;border-color:#00b348}
@media(max-width:650px){.permission-grid{grid-template-columns:1fr}}


/* Bauelementedirekt24 CRM v8.1
   Scrollbare Navigation und kompaktes Dashboard */

.sidebar,
.sidebar-modern,
.app-sidebar{
    height:100vh !important;
    min-height:100vh !important;
    overflow:hidden !important;
}

.sidebar-nav{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    flex:1 1 auto !important;
    min-height:0 !important;
    padding-right:5px;
    scrollbar-width:thin;
    scrollbar-color:#009039 transparent;
}

.sidebar-nav::-webkit-scrollbar{
    width:7px;
}

.sidebar-nav::-webkit-scrollbar-track{
    background:transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:20px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover{
    background:#007A30;
}

.dashboard-grid{
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:10px;
}

.dashboard-metric{
    min-height:84px;
    padding:12px 13px;
}

.dashboard-metric strong{
    font-size:1.02rem;
}

.content-area{
    max-width:none !important;
}

.crm-table th,
.crm-table td{
    white-space:nowrap;
}

@media(max-width:1200px){
    .dashboard-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}

@media(max-width:650px){
    .dashboard-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}


/* Bauelementedirekt24 CRM v8.2 – echter Sidebar-Scrollfix */
html,
body{
    min-height:100%;
}

.sidebar{
    top:0 !important;
    bottom:0 !important;
    height:100vh !important;
    height:100dvh !important;
    min-height:0 !important;
    max-height:100vh !important;
    max-height:100dvh !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
}

.sidebar-brand{
    flex:0 0 auto !important;
}

.sidebar-nav{
    display:block !important;
    flex:1 1 0 !important;
    min-height:0 !important;
    height:auto !important;
    overflow-y:scroll !important;
    overflow-x:hidden !important;
    padding:16px 11px 20px 16px !important;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
}

.sidebar-nav a{
    margin-bottom:4px;
}

.sidebar-footer{
    flex:0 0 auto !important;
    margin-top:0 !important;
    position:relative;
    z-index:2;
}

@media(max-height:720px){
    .sidebar-brand{
        padding-top:18px !important;
        padding-bottom:15px !important;
    }

    .brand-icon{
        width:42px !important;
        height:42px !important;
    }

    .sidebar-footer{
        padding:10px 14px !important;
    }

    .user-card{
        padding:8px !important;
    }

    .sidebar-nav a{
        padding-top:10px !important;
        padding-bottom:10px !important;
    }
}


/* Bauelementedirekt24 CRM v8.3 – garantierter Menü-Scroll */
.sidebar{
    display:block !important;
    height:100vh !important;
    height:100dvh !important;
    max-height:100vh !important;
    max-height:100dvh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    scrollbar-width:thin;
    scrollbar-color:#009039 #24282d;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
}

.sidebar::-webkit-scrollbar{
    width:8px;
}

.sidebar::-webkit-scrollbar-track{
    background:#24282d;
}

.sidebar::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:20px;
}

.sidebar-brand{
    position:sticky !important;
    top:0;
    z-index:5;
    background:var(--anthracite);
}

.sidebar-nav{
    display:block !important;
    height:auto !important;
    min-height:auto !important;
    overflow:visible !important;
    padding:18px 16px !important;
}

.sidebar-nav a{
    display:flex !important;
    width:100%;
    margin-bottom:4px;
}

.sidebar-footer{
    position:sticky !important;
    bottom:0;
    z-index:5;
    margin-top:0 !important;
    background:#24282d;
}

/* Sichtbare Scrollreserve, damit der letzte Menüpunkt nicht vom Footer verdeckt wird */
.sidebar-nav::after{
    content:"";
    display:block;
    height:12px;
}

@media(max-width:991.98px){
    .sidebar{
        overflow-y:auto !important;
    }
}


/* Bauelementedirekt24 CRM v9.0 – Kundenauswahl oder manuelle Eingabe */
.customer-mode-box{
    padding:12px;
    border:1px solid var(--line);
    border-radius:12px;
    background:var(--warm-bg);
}
[data-theme="dark"] .customer-mode-box{
    background:#1a1e24;
}


/* Bauelementedirekt24 CRM v10.0 */
.global-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.global-results section a{display:flex;flex-direction:column;padding:9px 0;border-bottom:1px solid var(--line);color:var(--text);text-decoration:none}
.global-results small{color:var(--muted)}
.audit-details{max-width:420px;white-space:normal}
.offer-item-row{grid-template-columns:105px minmax(220px,1fr) 80px 90px 110px 145px 115px 42px!important}
.offer-image{font-size:.7rem!important}
.small-link{font-size:.68rem;color:#9fa7b0;text-decoration:none;margin-right:8px}
@media(max-width:900px){.global-results{grid-template-columns:1fr}.offer-item-row{grid-template-columns:1fr 1fr!important}}


/* Bauelementedirekt24 CRM v10.4 – Angebotspositions-Fix */
.offer-item-row .remove-offer-item{
    width:42px !important;
    min-width:42px !important;
    height:36px !important;
    min-height:36px !important;
    padding:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    font-size:1rem !important;
    line-height:1 !important;
    border-radius:10px !important;
}

.offer-item-row .offer-image{
    min-width:0 !important;
    height:36px !important;
    padding:5px 7px !important;
    font-size:.68rem !important;
}

.offer-item-row input[type="file"]::file-selector-button{
    height:24px;
    padding:2px 8px;
    margin-right:7px;
    font-size:.67rem;
}


/* Bauelementedirekt24 CRM v11.0 */
.pdf-options{display:flex;flex-wrap:wrap;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--warm-bg)}
.pdf-options strong{width:100%}
[data-theme="dark"] .pdf-options{background:#1a1e24}
.offer-item-row{cursor:grab}
.offer-item-row.dragging{opacity:.45}
.audit-action{display:inline-block;padding:3px 7px;border-radius:999px;background:var(--warm-bg);font-size:.68rem;font-weight:700}


/* Bauelementedirekt24 CRM v11.1 – Beratungstermine */
.consultation-kpis{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:10px;
}

.consultation-kpis > div{
    padding:13px;
    border-top:4px solid #009039;
    background:var(--paper);
    box-shadow:0 6px 18px rgba(0,0,0,.05);
}

.consultation-kpis span{
    display:block;
    color:var(--muted);
    font-size:.64rem;
    text-transform:uppercase;
    letter-spacing:.055em;
}

.consultation-kpis strong{
    display:block;
    margin-top:5px;
    font-size:1rem;
}

@media(max-width:900px){
    .consultation-kpis{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:600px){
    .consultation-kpis{
        grid-template-columns:repeat(2,1fr);
    }
}


/* Bauelementedirekt24 CRM v11.2 – feste PDF-Ausgabe */
.signature-upload-info{
    font-size:.72rem;
    color:var(--muted);
}


/* Bauelementedirekt24 CRM v11.3 */
.offer-item-row input[name="item_image[]"]{
    display:block;
    width:100%;
}
.offer-item-row input[name="item_image[]"] ~ input[name="item_image[]"]{
    display:none !important;
}


/* Bauelementedirekt24 CRM v11.4 – Beratungstermine im Kalender */
.calendar-legend{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
    align-items:center;
    font-size:.75rem;
    color:var(--muted);
}

.calendar-legend span{
    display:inline-flex;
    align-items:center;
    gap:6px;
}

.calendar-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    display:inline-block;
}

.customer-dot{
    background:#009039;
}

.consultation-dot{
    background:#247ca5;
}

.consultation-calendar-event{
    font-weight:700;
}

.today-consultation-row{
    display:grid;
    grid-template-columns:90px 1fr auto;
    gap:12px;
    align-items:center;
    padding:11px 0;
    border-bottom:1px solid var(--line);
    color:var(--text);
    text-decoration:none;
}

.today-consultation-row small{
    display:block;
    color:var(--muted);
    font-size:.7rem;
    margin-top:3px;
}

.today-consultation-time{
    color:#247ca5;
    font-weight:800;
}

@media(max-width:650px){
    .today-consultation-row{
        grid-template-columns:70px 1fr;
    }

    .today-consultation-row .badge{
        grid-column:2;
        justify-self:start;
    }
}


/* Bauelementedirekt24 CRM v11.5 – Kalender und Heute-Dashboard */
.calendar-filter-bar{
    display:flex;
    flex-wrap:wrap;
    gap:18px;
    align-items:center;
    padding:11px 14px;
    background:var(--paper);
    border:1px solid var(--line);
    border-radius:12px;
}

.calendar-filter-bar .form-check{
    margin:0;
}

.calendar-filter-bar .form-check span{
    display:inline-flex;
    gap:7px;
    align-items:center;
}

.fc .fc-button-primary{
    background:#009039;
    border-color:#009039;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active{
    background:#007a30;
    border-color:#007a30;
}

[data-theme="dark"] .fc{
    color:var(--text);
}

[data-theme="dark"] .fc-theme-standard td,
[data-theme="dark"] .fc-theme-standard th,
[data-theme="dark"] .fc-theme-standard .fc-scrollgrid{
    border-color:var(--line);
}

.today-schedule{
    display:grid;
    gap:7px;
    margin-top:12px;
}

.today-schedule-row{
    display:grid;
    grid-template-columns:85px 30px 1fr;
    gap:10px;
    align-items:center;
    padding:10px 12px;
    color:var(--text);
    text-decoration:none;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--warm-bg);
}

.today-schedule-row:hover{
    border-color:#009039;
}

.today-schedule-time{
    font-weight:800;
    white-space:nowrap;
}

.today-schedule-marker{
    width:26px;
    height:26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    border-radius:50%;
    font-size:.7rem;
    font-weight:900;
}

.today-schedule-row.is-customer .today-schedule-marker{
    background:#009039;
}

.today-schedule-row.is-consultation .today-schedule-marker{
    background:#247ca5;
}

.today-schedule-content{
    min-width:0;
}

.today-schedule-content strong,
.today-schedule-content small{
    display:block;
}

.today-schedule-content small{
    color:var(--muted);
    font-size:.7rem;
    margin-top:2px;
}

[data-theme="dark"] .today-schedule-row{
    background:#1a1e24;
}

@media(max-width:600px){
    .today-schedule-row{
        grid-template-columns:68px 28px 1fr;
        padding:9px;
    }
}


/* Bauelementedirekt24 CRM v11.6 – vollständiger Kalender-Dark-Mode */
[data-theme="dark"] .calendar-filter-bar,
[data-theme="dark"] #calendar,
[data-theme="dark"] .fc,
[data-theme="dark"] .fc-view-harness,
[data-theme="dark"] .fc-view,
[data-theme="dark"] .fc-scrollgrid,
[data-theme="dark"] .fc-scrollgrid-section,
[data-theme="dark"] .fc-scrollgrid-section-body,
[data-theme="dark"] .fc-scrollgrid-section-header,
[data-theme="dark"] .fc-daygrid-body,
[data-theme="dark"] .fc-timegrid-body,
[data-theme="dark"] .fc-list,
[data-theme="dark"] .fc-list-table{
    background:#15191f !important;
    color:var(--text) !important;
}

[data-theme="dark"] .fc-theme-standard td,
[data-theme="dark"] .fc-theme-standard th,
[data-theme="dark"] .fc-theme-standard .fc-scrollgrid{
    border-color:#343a43 !important;
}

[data-theme="dark"] .fc-col-header-cell,
[data-theme="dark"] .fc-scrollgrid-section-header > *,
[data-theme="dark"] .fc-list-day-cushion,
[data-theme="dark"] .fc-list-sticky .fc-list-day > *{
    background:#1d2229 !important;
    color:#f1f4f6 !important;
}

[data-theme="dark"] .fc-col-header-cell-cushion,
[data-theme="dark"] .fc-daygrid-day-number,
[data-theme="dark"] .fc-timegrid-axis-cushion,
[data-theme="dark"] .fc-timegrid-slot-label-cushion,
[data-theme="dark"] .fc-list-day-text,
[data-theme="dark"] .fc-list-day-side-text{
    color:#dce2e7 !important;
    text-decoration:none !important;
}

[data-theme="dark"] .fc-daygrid-day,
[data-theme="dark"] .fc-timegrid-col,
[data-theme="dark"] .fc-timegrid-slot,
[data-theme="dark"] .fc-list-event td{
    background:#15191f !important;
}

[data-theme="dark"] .fc-day-other{
    background:#11151a !important;
}

[data-theme="dark"] .fc-day-other .fc-daygrid-day-number{
    color:#6f7984 !important;
}

[data-theme="dark"] .fc-day-today{
    background:rgba(0,144,57,.14) !important;
}

[data-theme="dark"] .fc-timegrid-now-indicator-line{
    border-color:#00b348 !important;
}

[data-theme="dark"] .fc-timegrid-now-indicator-arrow{
    border-color:#00b348 !important;
    border-top-color:transparent !important;
    border-bottom-color:transparent !important;
}

[data-theme="dark"] .fc-toolbar,
[data-theme="dark"] .fc-header-toolbar{
    background:#15191f !important;
    color:#f1f4f6 !important;
    margin:0 0 14px !important;
    padding:0 !important;
}

[data-theme="dark"] .fc-toolbar-title{
    color:#f1f4f6 !important;
}

[data-theme="dark"] .fc-button-primary{
    background:#252b33 !important;
    border-color:#3a424c !important;
    color:#f4f6f8 !important;
    box-shadow:none !important;
}

[data-theme="dark"] .fc-button-primary:hover,
[data-theme="dark"] .fc-button-primary:focus{
    background:#303740 !important;
    border-color:#4a535f !important;
}

[data-theme="dark"] .fc-button-primary:not(:disabled).fc-button-active,
[data-theme="dark"] .fc-button-primary:not(:disabled):active{
    background:#009039 !important;
    border-color:#009039 !important;
    color:#fff !important;
}

[data-theme="dark"] .fc-button-primary:disabled{
    background:#20252c !important;
    border-color:#303740 !important;
    color:#7d8792 !important;
    opacity:1 !important;
}

[data-theme="dark"] .fc-list-event:hover td{
    background:#222830 !important;
}

[data-theme="dark"] .fc-more-popover,
[data-theme="dark"] .fc-popover{
    background:#1d2229 !important;
    border-color:#3a424c !important;
    box-shadow:0 14px 35px rgba(0,0,0,.45) !important;
}

[data-theme="dark"] .fc-popover-header{
    background:#252b33 !important;
    color:#f1f4f6 !important;
}

[data-theme="dark"] .fc-popover-close{
    color:#dce2e7 !important;
}

[data-theme="dark"] .fc-list-empty{
    background:#15191f !important;
    color:var(--muted) !important;
}

[data-theme="dark"] .fc-event{
    box-shadow:none !important;
}

[data-theme="dark"] .card:has(#calendar){
    background:#15191f !important;
}

[data-theme="dark"] .card:has(#calendar) .card-body{
    background:#15191f !important;
}

/* Verhindert den hellen FullCalendar-Balken beim Ansichtswechsel */
[data-theme="dark"] .fc-scroller,
[data-theme="dark"] .fc-scroller-liquid-absolute,
[data-theme="dark"] .fc-scroller-harness,
[data-theme="dark"] .fc-scroller-harness-liquid{
    background:#15191f !important;
    scrollbar-color:#009039 #20252c;
}

[data-theme="dark"] .fc-scroller::-webkit-scrollbar{
    width:9px;
    height:9px;
}

[data-theme="dark"] .fc-scroller::-webkit-scrollbar-track{
    background:#20252c;
}

[data-theme="dark"] .fc-scroller::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:20px;
}


[data-theme="dark"] .calendar-card,
[data-theme="dark"] .calendar-card .card-body{
    background:#15191f !important;
    color:var(--text) !important;
}


/* Bauelementedirekt24 CRM v11.7 – Kalenderfilter */
.calendar-filter-bar{
    display:flex;
    flex-wrap:wrap;
    gap:9px;
    align-items:center;
}

.calendar-type-toggle,
.calendar-show-all{
    min-height:36px;
    padding:7px 12px;
    border:1px solid var(--line);
    border-radius:10px;
    background:var(--paper);
    color:var(--muted);
    display:inline-flex;
    align-items:center;
    gap:7px;
    font-size:.75rem;
    font-weight:700;
    cursor:pointer;
}

.calendar-type-toggle:hover,
.calendar-show-all:hover{
    border-color:#009039;
    color:var(--text);
}

.calendar-type-toggle.is-active{
    color:var(--text);
    border-color:#009039;
    background:rgba(0,144,57,.08);
}

.calendar-type-toggle[data-event-type="consultation"].is-active{
    border-color:#247ca5;
    background:rgba(36,124,165,.10);
}

.calendar-show-all{
    margin-left:auto;
    color:#009039;
}

[data-theme="dark"] .calendar-type-toggle,
[data-theme="dark"] .calendar-show-all{
    background:#1d2229;
    border-color:#3a424c;
    color:#c9d0d6;
}

[data-theme="dark"] .calendar-type-toggle.is-active{
    background:rgba(0,144,57,.18);
    border-color:#00b348;
    color:#f5f7f8;
}

[data-theme="dark"] .calendar-type-toggle[data-event-type="consultation"].is-active{
    background:rgba(36,124,165,.22);
    border-color:#4aa1c9;
}

[data-theme="dark"] .calendar-show-all{
    color:#5fd17e;
}

/* Verhindert sichtbares Hochspringen der Navigation beim Seitenaufbau */
.sidebar,
.sidebar-nav{
    scroll-behavior:auto !important;
}

@media(max-width:620px){
    .calendar-show-all{
        margin-left:0;
        width:100%;
        justify-content:center;
    }
}


/* Bauelementedirekt24 CRM v12.0 – Final Stable */
.quick-action-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin-top:12px;
}

.quick-action-grid a{
    padding:13px;
    border:1px solid var(--line);
    border-radius:12px;
    text-decoration:none;
    color:var(--text);
    background:var(--warm-bg);
}

.quick-action-grid a:hover{
    border-color:#009039;
    transform:translateY(-1px);
}

.quick-action-grid strong,
.quick-action-grid span{
    display:block;
}

.quick-action-grid span{
    color:var(--muted);
    font-size:.68rem;
    margin-top:4px;
}

.crm-version-footer{
    margin-top:24px;
    padding:12px 0;
    text-align:center;
    color:var(--muted);
    font-size:.65rem;
}

.system-error-message{
    max-width:460px;
    white-space:normal;
    word-break:break-word;
}

[data-theme="dark"] .quick-action-grid a{
    background:#1a1e24;
}

@media(max-width:900px){
    .quick-action-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:520px){
    .quick-action-grid{
        grid-template-columns:1fr;
    }
}


/* Bauelementedirekt24 CRM v12.0.2 – scrollbare Pipeline */
.pipeline-scroll-wrapper{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:12px;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    scrollbar-color:#009039 #e7ebe8;
}

.pipeline-scroll-wrapper::-webkit-scrollbar{
    height:10px;
}

.pipeline-scroll-wrapper::-webkit-scrollbar-track{
    background:#e7ebe8;
    border-radius:20px;
}

.pipeline-scroll-wrapper::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:20px;
}

.pipeline-scroll-wrapper::-webkit-scrollbar-thumb:hover{
    background:#007a30;
}

.pipeline-scroll-wrapper .pipeline-board,
.pipeline-scroll-wrapper #pipelineBoard,
.pipeline-scroll-wrapper .pipeline{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:flex-start;
    gap:14px;
    width:max-content;
    min-width:100%;
}

.pipeline-scroll-wrapper .pipeline-column,
.pipeline-scroll-wrapper .pipeline-stage,
.pipeline-scroll-wrapper .kanban-column{
    flex:0 0 300px !important;
    min-width:300px !important;
    max-width:300px !important;
}

.pipeline-scroll-wrapper .pipeline-column-header,
.pipeline-scroll-wrapper .pipeline-stage-header,
.pipeline-scroll-wrapper .kanban-column-header{
    position:sticky;
    top:0;
    z-index:2;
}

[data-theme="dark"] .pipeline-scroll-wrapper{
    scrollbar-color:#009039 #20252c;
}

[data-theme="dark"] .pipeline-scroll-wrapper::-webkit-scrollbar-track{
    background:#20252c;
}

[data-theme="dark"] .pipeline-scroll-wrapper::-webkit-scrollbar-thumb{
    background:#009039;
}

@media(max-width:700px){
    .pipeline-scroll-wrapper .pipeline-column,
    .pipeline-scroll-wrapper .pipeline-stage,
    .pipeline-scroll-wrapper .kanban-column{
        flex-basis:275px !important;
        min-width:275px !important;
        max-width:275px !important;
    }
}


/* Bauelementedirekt24 CRM v12.0.3 – maximal 5 Karten pro Pipeline-Spalte sichtbar */
.pipeline-column-limited,
.pipeline-scroll-wrapper .pipeline-column,
.pipeline-scroll-wrapper .pipeline-stage,
.pipeline-scroll-wrapper .kanban-column{
    display:flex !important;
    flex-direction:column !important;
    max-height:640px;
}

.pipeline-card-scroll,
.pipeline-column-limited > .pipeline-cards,
.pipeline-column-limited > .pipeline-items,
.pipeline-column-limited > .kanban-cards,
.pipeline-scroll-wrapper .pipeline-column > .pipeline-cards,
.pipeline-scroll-wrapper .pipeline-stage > .pipeline-items,
.pipeline-scroll-wrapper .kanban-column > .kanban-cards{
    overflow-y:auto !important;
    overflow-x:hidden !important;
    max-height:520px !important;
    padding-right:6px;
    overscroll-behavior-y:contain;
    scrollbar-width:thin;
    scrollbar-color:#009039 #e7ebe8;
}

/* Fallback, falls die Karten direkt in der Spalte liegen */
.pipeline-scroll-wrapper .pipeline-column,
.pipeline-scroll-wrapper .pipeline-stage,
.pipeline-scroll-wrapper .kanban-column{
    overflow-y:auto;
    overflow-x:hidden;
}

/* Höhe so bemessen, dass ungefähr fünf Karten sichtbar bleiben */
.pipeline-scroll-wrapper .pipeline-card,
.pipeline-scroll-wrapper .pipeline-item,
.pipeline-scroll-wrapper .kanban-card{
    min-height:92px;
}

.pipeline-card-scroll::-webkit-scrollbar,
.pipeline-scroll-wrapper .pipeline-column::-webkit-scrollbar,
.pipeline-scroll-wrapper .pipeline-stage::-webkit-scrollbar,
.pipeline-scroll-wrapper .kanban-column::-webkit-scrollbar{
    width:8px;
}

.pipeline-card-scroll::-webkit-scrollbar-track,
.pipeline-scroll-wrapper .pipeline-column::-webkit-scrollbar-track,
.pipeline-scroll-wrapper .pipeline-stage::-webkit-scrollbar-track,
.pipeline-scroll-wrapper .kanban-column::-webkit-scrollbar-track{
    background:#e7ebe8;
    border-radius:20px;
}

.pipeline-card-scroll::-webkit-scrollbar-thumb,
.pipeline-scroll-wrapper .pipeline-column::-webkit-scrollbar-thumb,
.pipeline-scroll-wrapper .pipeline-stage::-webkit-scrollbar-thumb,
.pipeline-scroll-wrapper .kanban-column::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:20px;
}

[data-theme="dark"] .pipeline-card-scroll,
[data-theme="dark"] .pipeline-scroll-wrapper .pipeline-column,
[data-theme="dark"] .pipeline-scroll-wrapper .pipeline-stage,
[data-theme="dark"] .pipeline-scroll-wrapper .kanban-column{
    scrollbar-color:#009039 #20252c;
}

[data-theme="dark"] .pipeline-card-scroll::-webkit-scrollbar-track,
[data-theme="dark"] .pipeline-scroll-wrapper .pipeline-column::-webkit-scrollbar-track,
[data-theme="dark"] .pipeline-scroll-wrapper .pipeline-stage::-webkit-scrollbar-track,
[data-theme="dark"] .pipeline-scroll-wrapper .kanban-column::-webkit-scrollbar-track{
    background:#20252c;
}

@media(max-width:700px){
    .pipeline-column-limited,
    .pipeline-scroll-wrapper .pipeline-column,
    .pipeline-scroll-wrapper .pipeline-stage,
    .pipeline-scroll-wrapper .kanban-column{
        max-height:580px;
    }

    .pipeline-card-scroll,
    .pipeline-column-limited > .pipeline-cards,
    .pipeline-column-limited > .pipeline-items,
    .pipeline-column-limited > .kanban-cards{
        max-height:465px !important;
    }
}


/* Bauelementedirekt24 CRM v12.0.9 – Benutzerseiten Layout-Fix */
.users-toolbar{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:8px;
}

.users-card .card-body{
    padding:14px;
}

.users-card .row{
    align-items:end;
}

.users-card .form-label{
    margin-bottom:4px;
}

.users-card .form-control,
.users-card .form-select{
    min-height:36px;
}

.users-card .form-check{
    min-height:36px;
    display:flex;
    align-items:center;
    gap:7px;
    margin:0;
}

.users-card .form-check-input{
    margin-top:0;
}

.users-table{
    width:100%;
    table-layout:auto;
}

.users-table th,
.users-table td{
    vertical-align:middle;
    white-space:nowrap;
}

.users-table td:nth-child(1),
.users-table td:nth-child(2){
    white-space:normal;
}

.users-actions{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    gap:6px;
}

.users-actions form{
    margin:0;
}

.users-actions .btn{
    min-height:32px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

[data-theme="dark"] .users-card,
[data-theme="dark"] .users-card .card-body{
    background:var(--paper);
}

@media(max-width:900px){
    .users-toolbar{
        justify-content:flex-start;
    }

    .users-table{
        min-width:860px;
    }

    .users-actions{
        flex-wrap:wrap;
    }
}


/* Bauelementedirekt24 CRM v12.0.10 – Benutzerformular repariert */
.users-main-fields{
    align-items:start !important;
}

.users-main-fields > [class*="col-"]{
    display:block !important;
}

.users-main-fields .form-label{
    display:block;
    min-height:20px;
    margin-bottom:5px;
}

.users-main-fields .form-control,
.users-main-fields .form-select{
    width:100%;
    height:38px;
    min-height:38px;
}

.users-active-check{
    width:100%;
    height:38px;
    min-height:38px;
    margin:0;
    padding:0 12px;
    display:flex !important;
    align-items:center !important;
    gap:9px;
    border:1px solid var(--line);
    border-radius:8px;
    background:var(--paper);
}

.users-active-check .form-check-input{
    margin:0 !important;
    flex:0 0 auto;
}

.users-active-check span{
    line-height:1;
}

[data-theme="dark"] .users-active-check{
    background:var(--paper);
    border-color:var(--line);
}

@media(max-width:767px){
    .users-main-fields .form-label{
        min-height:auto;
    }
}


/* Bauelementedirekt24 CRM v12.0.16 – eigener Angebots-Papierkorb */
.offer-trash-toggle{
    min-height:36px;
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:0;
    white-space:nowrap;
}

.offer-trash-toggle .form-check-input{
    margin-top:0;
}

[data-theme="dark"] .offer-trash-toggle{
    color:var(--text);
}


/* Bauelementedirekt24 CRM v12.0.18 – Admin-Angebotsübersicht */
.admin-user-offer-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:9px;
}

.admin-user-offer-stats a{
    display:block;
    padding:11px 12px;
    border:1px solid var(--line);
    border-radius:10px;
    text-decoration:none;
    color:var(--text);
    background:var(--warm-bg);
}

.admin-user-offer-stats a:hover{
    border-color:#009039;
}

.admin-user-offer-stats span,
.admin-user-offer-stats strong,
.admin-user-offer-stats small{
    display:block;
}

.admin-user-offer-stats span{
    color:var(--muted);
    font-size:.66rem;
}

.admin-user-offer-stats strong{
    margin-top:3px;
}

.admin-user-offer-stats small{
    color:var(--muted);
    margin-top:3px;
}

.admin-trash-check{
    min-height:36px;
    margin:0;
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
}

.admin-trash-check .form-check-input{
    margin-top:0;
}

[data-theme="dark"] .admin-user-offer-stats a{
    background:#1a1e24;
}

@media(max-width:1000px){
    .admin-user-offer-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:550px){
    .admin-user-offer-stats{
        grid-template-columns:1fr;
    }

    .admin-offers-table{
        min-width:1000px;
    }
}


/* Bauelementedirekt24 CRM v12.2.0 – Öffentliche Website */
.public-site{
    margin:0;
    background:#f6f8f7;
    color:#1d2721;
}

.public-container{
    width:min(1180px,calc(100% - 32px));
    margin:0 auto;
}

.public-header{
    position:sticky;
    top:0;
    z-index:100;
    background:rgba(255,255,255,.96);
    border-bottom:1px solid #dfe6e1;
    backdrop-filter:blur(10px);
}

.public-header-inner{
    min-height:74px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:24px;
}

.public-brand{
    display:flex;
    align-items:center;
    gap:10px;
    color:#17211b;
    text-decoration:none;
}

.public-brand-mark{
    width:42px;
    height:42px;
    border-radius:10px;
    display:grid;
    place-items:center;
    background:#009039;
    color:#fff;
    font-weight:900;
}

.public-brand strong,
.public-brand small{
    display:block;
}

.public-brand small{
    color:#728078;
    font-size:.68rem;
}

.public-nav{
    display:flex;
    align-items:center;
    gap:18px;
}

.public-nav > a:not(.btn){
    color:#4c5b52;
    text-decoration:none;
    font-size:.88rem;
    font-weight:600;
}

.public-hero{
    padding:90px 0 72px;
    background:
        radial-gradient(circle at 85% 20%,rgba(0,144,57,.13),transparent 31%),
        linear-gradient(135deg,#fbfdfc,#eef5f0);
}

.public-hero-grid,
.public-request-grid{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr);
    gap:52px;
    align-items:center;
}

.public-kicker{
    display:inline-block;
    color:#009039;
    font-size:.72rem;
    letter-spacing:.12em;
    font-weight:900;
    margin-bottom:10px;
}

.public-hero h1{
    max-width:820px;
    font-size:clamp(2.35rem,5vw,4.5rem);
    line-height:1.02;
    letter-spacing:-.045em;
    margin-bottom:22px;
}

.public-hero p,
.public-section p{
    color:#65736a;
    line-height:1.7;
}

.public-hero-card{
    background:#fff;
    border-top:5px solid #009039;
    border-radius:18px;
    padding:30px;
    box-shadow:0 22px 60px rgba(18,45,28,.12);
}

.public-hero-badge{
    width:55px;
    height:55px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:#fff;
    background:#009039;
    font-size:1.25rem;
    font-weight:900;
    margin-bottom:22px;
}

.public-section{
    padding:76px 0;
}

.public-section-head{
    max-width:700px;
    margin-bottom:30px;
}

.public-section h2{
    font-size:clamp(1.8rem,3vw,2.7rem);
    letter-spacing:-.035em;
}

.public-feature-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.public-feature-grid article{
    background:#fff;
    padding:26px;
    border-radius:14px;
    border:1px solid #e1e8e3;
}

.public-feature-grid article > span{
    color:#009039;
    font-size:.72rem;
    font-weight:900;
}

.public-feature-grid h3{
    margin:10px 0 8px;
    font-size:1.12rem;
}

.public-consultation-section{
    background:#edf3ef;
}

.public-request-grid{
    align-items:start;
}

.public-request-form{
    background:#fff;
    padding:28px;
    border-radius:16px;
    box-shadow:0 18px 50px rgba(18,45,28,.09);
}

.public-consent{
    display:flex;
    gap:9px;
    align-items:flex-start;
    font-size:.78rem;
    color:#647168;
}

.public-footer{
    padding:26px 0;
    background:#17211b;
    color:#dfe7e2;
}

.public-footer .public-container{
    display:flex;
    gap:18px;
    align-items:center;
    justify-content:space-between;
}

.public-footer a{
    color:#79d497;
}

/* Mobile/Tablet Optimierung des CRM */
@media(max-width:900px){
    .public-hero-grid,
    .public-request-grid{
        grid-template-columns:1fr;
        gap:28px;
    }

    .public-feature-grid{
        grid-template-columns:1fr;
    }

    .public-hero{
        padding:62px 0 52px;
    }

    .content-area{
        padding-left:14px !important;
        padding-right:14px !important;
    }

    .compact-page-head{
        align-items:flex-start !important;
        gap:12px;
    }

    .compact-page-head > .d-flex{
        width:100%;
        flex-wrap:wrap;
    }
}

@media(max-width:650px){
    .public-container{
        width:min(100% - 22px,1180px);
    }

    .public-header-inner{
        min-height:66px;
    }

    .public-nav > a:not(.btn){
        display:none;
    }

    .public-hero h1{
        font-size:2.35rem;
    }

    .public-section{
        padding:52px 0;
    }

    .public-request-form{
        padding:18px;
    }

    .public-footer .public-container{
        flex-direction:column;
        align-items:flex-start;
    }

    .dashboard-grid,
    .quick-action-grid,
    .consultation-kpis{
        grid-template-columns:1fr !important;
    }

    .table-responsive{
        border-radius:10px;
    }

    .btn{
        max-width:100%;
    }
}


/* Bauelementedirekt24 CRM v12.2.1 – Public Dark Mode */
.public-site,
.public-site[data-theme="dark"]{
    background:#101418 !important;
    color:#eef3ef !important;
}

.public-site .public-header{
    background:rgba(16,20,24,.96) !important;
    border-bottom-color:#2c3430 !important;
}

.public-site .public-brand{
    color:#f2f6f3 !important;
}

.public-site .public-brand small,
.public-site .public-nav > a:not(.btn),
.public-site .public-hero p,
.public-site .public-section p,
.public-site .public-consent,
.public-site .legal-note-public{
    color:#a8b4ac !important;
}

.public-site .public-hero{
    background:
        radial-gradient(circle at 85% 20%,rgba(0,144,57,.22),transparent 31%),
        linear-gradient(135deg,#12171a,#18231d) !important;
}

.public-site .public-hero-card,
.public-site .public-feature-grid article,
.public-site .public-request-form{
    background:#1a2024 !important;
    color:#eef3ef !important;
    border-color:#303a34 !important;
}

.public-site .public-consultation-section{
    background:#141b17 !important;
}

.public-site .form-control,
.public-site .form-select,
.public-site textarea{
    background:#11171a !important;
    border-color:#37413b !important;
    color:#f1f5f2 !important;
}

.public-site .form-control:focus,
.public-site .form-select:focus,
.public-site textarea:focus{
    border-color:#009039 !important;
    box-shadow:0 0 0 .2rem rgba(0,144,57,.16) !important;
}

.public-site .form-select option{
    background:#11171a;
    color:#f1f5f2;
}

.public-footer-links{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.public-footer-links > div span,
.public-footer-links > div strong{
    display:block;
}

.public-footer-links nav{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
}

.legal-page{
    max-width:900px;
}

.legal-page h1{
    margin-bottom:28px;
}

.legal-page section{
    padding:22px 0;
    border-bottom:1px solid #2c3430;
}

.legal-page h2{
    font-size:1.05rem;
    margin-bottom:12px;
}

.legal-page a{
    color:#6bd08b;
}

.legal-note-public{
    font-size:.78rem;
    line-height:1.55;
}

@media(max-width:650px){
    .public-footer-links{
        flex-direction:column;
        align-items:flex-start;
    }

    .public-footer-links nav{
        flex-direction:column;
        gap:8px;
    }
}


/* Bauelementedirekt24 CRM v12.2.3 – Produktinformationen & Mehrfachauswahl */
.public-products-section{
    background:#101418;
}

.public-product-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.public-product-card{
    overflow:hidden;
    border:1px solid #303a34;
    border-radius:16px;
    background:#1a2024;
    box-shadow:0 14px 35px rgba(0,0,0,.17);
    transition:transform .18s ease,border-color .18s ease;
}

.public-product-card:hover{
    transform:translateY(-3px);
    border-color:#009039;
}

.public-product-card img{
    display:block;
    width:100%;
    aspect-ratio:16/10;
    object-fit:cover;
    background:#11171a;
}

.public-product-card-body{
    padding:20px;
}

.public-product-card-body h3{
    margin:0 0 8px;
    font-size:1.12rem;
    color:#f0f5f1;
}

.public-product-card-body p{
    min-height:52px;
    margin-bottom:14px;
}

.public-product-select-link{
    color:#62d486;
    text-decoration:none;
    font-size:.82rem;
    font-weight:800;
}

.public-product-select-link:hover{
    color:#8ce4a8;
}

.public-product-choice-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}

.public-product-choice{
    min-height:46px;
    display:flex;
    align-items:center;
    gap:9px;
    padding:9px 11px;
    border:1px solid #37413b;
    border-radius:10px;
    background:#11171a;
    color:#dfe7e2;
    cursor:pointer;
    transition:border-color .15s ease,background .15s ease;
}

.public-product-choice:hover{
    border-color:#009039;
}

.public-product-choice.is-selected,
.public-product-choice:has(input:checked){
    border-color:#009039;
    background:rgba(0,144,57,.16);
}

.public-product-choice .form-check-input{
    margin:0;
    flex:0 0 auto;
}

.public-field-hint{
    display:block;
    margin-top:7px;
    color:#8e9d94;
    font-size:.7rem;
}

@media(max-width:950px){
    .public-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .public-product-choice-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px){
    .public-product-grid,
    .public-product-choice-grid{
        grid-template-columns:1fr;
    }

    .public-product-card-body p{
        min-height:auto;
    }
}


/* Bauelementedirekt24 CRM v12.2.4 – bessere Produktauswahl */
.public-product-choice-title{
    font-size:.9rem;
    font-weight:800;
    margin-bottom:9px;
}

.public-product-choice-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
}

.public-product-choice{
    position:relative;
    min-width:0;
    min-height:58px !important;
    width:100%;
    display:grid !important;
    grid-template-columns:30px minmax(0,1fr);
    align-items:center !important;
    gap:10px !important;
    padding:10px 13px !important;
    border:1px solid #37413b !important;
    border-radius:11px !important;
    background:#11171a !important;
    color:#e5ece7 !important;
    cursor:pointer;
    overflow:hidden;
}

.public-product-choice:hover{
    border-color:#009039 !important;
    background:#151e19 !important;
}

.public-product-choice .form-check-input{
    position:absolute !important;
    opacity:0 !important;
    pointer-events:none;
    width:1px !important;
    height:1px !important;
}

.public-product-choice-check{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border:1px solid #4a574f;
    border-radius:8px;
    background:#1c2420;
    color:transparent;
    font-size:.85rem;
    font-weight:900;
    transition:.15s ease;
}

.public-product-choice-label{
    display:block;
    min-width:0;
    width:100%;
    line-height:1.25;
    font-size:.82rem;
    font-weight:700;
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:normal;
}

.public-product-choice.is-selected,
.public-product-choice:has(input:checked){
    border-color:#009039 !important;
    background:rgba(0,144,57,.13) !important;
}

.public-product-choice.is-selected .public-product-choice-check,
.public-product-choice:has(input:checked) .public-product-choice-check{
    background:#009039;
    border-color:#009039;
    color:#fff;
}

.public-field-hint{
    margin-top:9px !important;
}

@media(max-width:720px){
    .public-product-choice-grid{
        grid-template-columns:1fr !important;
    }

    .public-product-choice{
        min-height:54px !important;
    }

    .public-product-choice-label{
        font-size:.86rem;
    }
}


/* Bauelementedirekt24 CRM v12.2.5 – einfache Produktauswahl */
.public-product-choice-list{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    width:100% !important;
}

.public-product-choice-simple{
    width:100% !important;
    min-width:0 !important;
    min-height:46px !important;
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    padding:10px 12px !important;
    margin:0 !important;
    border:1px solid #37413b !important;
    border-radius:9px !important;
    background:#11171a !important;
    color:#e8eee9 !important;
    cursor:pointer;
    box-sizing:border-box !important;
}

.public-product-choice-simple:hover{
    border-color:#009039 !important;
}

.public-product-choice-simple .form-check-input{
    position:static !important;
    opacity:1 !important;
    pointer-events:auto !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    flex:0 0 18px !important;
    margin:0 !important;
}

.public-product-choice-simple span{
    display:block !important;
    min-width:0 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    line-height:1.35 !important;
    font-size:.86rem !important;
    font-weight:600 !important;
}

.public-product-choice-simple.is-selected,
.public-product-choice-simple:has(input:checked){
    border-color:#009039 !important;
    background:rgba(0,144,57,.12) !important;
}

.public-product-choice-simple input:checked{
    background-color:#009039 !important;
    border-color:#009039 !important;
}

@media(max-width:650px){
    .public-product-choice-simple{
        min-height:44px !important;
        padding:9px 10px !important;
    }

    .public-product-choice-simple span{
        font-size:.84rem !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v12.3.0 – Premium Public Website
   ============================================================ */

.public-hero-premium{
    position:relative;
    min-height:680px;
    display:flex;
    align-items:center;
    overflow:hidden;
    padding:90px 0;
    background:#101418 !important;
}

.public-hero-media{
    position:absolute;
    inset:0;
}

.public-hero-media img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center;
    filter:saturate(.92) contrast(1.03);
}

.public-hero-overlay{
    position:absolute;
    inset:0;
    background:
        linear-gradient(90deg,rgba(8,12,10,.95) 0%,rgba(8,12,10,.82) 42%,rgba(8,12,10,.28) 72%,rgba(8,12,10,.12) 100%),
        linear-gradient(0deg,rgba(8,12,10,.48),transparent 50%);
}

.public-hero-premium-content{
    position:relative;
    z-index:2;
}

.public-hero-copy{
    max-width:720px;
}

.public-hero-copy h1{
    margin:0 0 22px;
    max-width:760px;
    color:#fff;
    font-size:clamp(3rem,6vw,5.6rem);
    line-height:.98;
    letter-spacing:-.055em;
}

.public-hero-copy > p{
    max-width:640px;
    color:#d0d9d3 !important;
    font-size:1.08rem;
    line-height:1.7;
    margin-bottom:28px;
}

.public-trust-row{
    display:flex;
    flex-wrap:wrap;
    gap:10px 22px;
    margin-top:28px;
    color:#c7d1cb;
    font-size:.78rem;
    font-weight:700;
}

.premium-products-section{
    padding:92px 0 !important;
    background:#0d1114 !important;
}

.premium-section-intro{
    display:grid;
    grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);
    gap:40px;
    align-items:end;
    margin-bottom:36px;
}

.premium-section-intro h2{
    margin:0;
    color:#fff;
    font-size:clamp(2rem,4vw,3.5rem);
}

.premium-section-intro > p{
    margin:0;
    max-width:560px;
}

.premium-product-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.premium-product-card{
    min-width:0;
    overflow:hidden;
    border:1px solid #2b3530;
    border-radius:18px;
    background:#171d20;
    box-shadow:0 16px 45px rgba(0,0,0,.2);
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.premium-product-card:hover{
    transform:translateY(-5px);
    border-color:#009039;
    box-shadow:0 24px 55px rgba(0,0,0,.32);
}

.premium-product-image{
    position:relative;
    aspect-ratio:16/10;
    overflow:hidden;
    background:#11171a;
}

.premium-product-image img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
    transition:transform .45s ease;
}

.premium-product-card:hover .premium-product-image img{
    transform:scale(1.045);
}

.premium-product-tag{
    position:absolute;
    left:14px;
    bottom:14px;
    padding:6px 9px;
    border-radius:999px;
    background:rgba(8,14,10,.82);
    border:1px solid rgba(255,255,255,.12);
    color:#dce7df;
    font-size:.63rem;
    font-weight:800;
    backdrop-filter:blur(7px);
}

.premium-product-body{
    padding:21px;
}

.premium-product-body h3{
    margin:0 0 8px;
    color:#fff;
    font-size:1.22rem;
}

.premium-product-body p{
    min-height:64px;
    margin-bottom:14px;
    color:#aeb9b2 !important;
}

.premium-product-body ul{
    margin:0 0 18px;
    padding:0;
    list-style:none;
}

.premium-product-body li{
    position:relative;
    padding:4px 0 4px 18px;
    color:#c9d3cd;
    font-size:.75rem;
}

.premium-product-body li::before{
    content:"✓";
    position:absolute;
    left:0;
    color:#50ce79;
    font-weight:900;
}

.premium-product-cta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding-top:14px;
    border-top:1px solid #29332e;
    color:#6cda8e;
    text-decoration:none;
    font-size:.76rem;
    font-weight:800;
}

.premium-product-cta span{
    font-size:1.05rem;
}

.premium-benefit-section{
    padding:86px 0 !important;
    background:#13191c !important;
}

.premium-benefit-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
}

.premium-benefit-grid article{
    min-height:220px;
    padding:22px;
    border:1px solid #2d3732;
    border-radius:15px;
    background:#191f22;
}

.premium-benefit-number{
    display:inline-block;
    margin-bottom:34px;
    color:#51cf7a;
    font-size:.68rem;
    font-weight:900;
    letter-spacing:.12em;
}

.premium-benefit-grid h3{
    margin-bottom:8px;
    color:#fff;
    font-size:1.05rem;
}

.premium-product-selector{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:9px;
    width:100%;
}

.premium-product-choice{
    display:block;
    min-width:0;
    margin:0;
    cursor:pointer;
}

.premium-product-choice > input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.premium-choice-box{
    min-height:52px;
    width:100%;
    display:flex;
    align-items:center;
    gap:9px;
    padding:9px 11px;
    border:1px solid #39443e;
    border-radius:10px;
    background:#11171a;
    color:#dce4df;
    transition:.15s ease;
}

.premium-product-choice:hover .premium-choice-box{
    border-color:#009039;
}

.premium-choice-check{
    width:25px;
    height:25px;
    flex:0 0 25px;
    display:grid;
    place-items:center;
    border-radius:7px;
    border:1px solid #4c5a52;
    background:#1b2320;
    color:transparent;
    font-size:.75rem;
    font-weight:900;
}

.premium-choice-text{
    min-width:0;
    white-space:normal;
    line-height:1.2;
    overflow-wrap:break-word;
    font-size:.76rem;
    font-weight:700;
}

.premium-product-choice.is-selected .premium-choice-box,
.premium-product-choice:has(input:checked) .premium-choice-box{
    border-color:#009039;
    background:rgba(0,144,57,.15);
}

.premium-product-choice.is-selected .premium-choice-check,
.premium-product-choice:has(input:checked) .premium-choice-check{
    border-color:#009039;
    background:#009039;
    color:#fff;
}

.premium-contact-strip{
    padding:42px 0;
    background:#009039;
    color:#fff;
}

.premium-contact-strip .public-kicker{
    color:#dff5e6;
}

.premium-contact-strip-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
}

.premium-contact-strip strong{
    display:block;
    font-size:1.25rem;
}

.premium-contact-strip p{
    margin:4px 0 0;
    color:#e3f5e9 !important;
}

.premium-contact-actions{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:5px;
}

.premium-contact-actions a{
    color:#fff;
    text-decoration:none;
    font-weight:800;
}

@media(max-width:1050px){
    .premium-product-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .premium-benefit-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .premium-product-selector{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:760px){
    .public-hero-premium{
        min-height:630px;
        padding:72px 0;
    }

    .public-hero-overlay{
        background:rgba(8,12,10,.76);
    }

    .public-hero-copy h1{
        font-size:3rem;
    }

    .premium-section-intro{
        grid-template-columns:1fr;
        gap:14px;
    }

    .premium-product-grid,
    .premium-benefit-grid{
        grid-template-columns:1fr;
    }

    .premium-product-body p{
        min-height:auto;
    }

    .premium-contact-strip-inner{
        flex-direction:column;
        align-items:flex-start;
    }

    .premium-contact-actions{
        align-items:flex-start;
    }
}

@media(max-width:520px){
    .premium-product-selector{
        grid-template-columns:1fr;
    }

    .premium-choice-text{
        font-size:.82rem;
    }
}


/* Bauelementedirekt24 CRM v12.3.1 – Produktauswahl final stabilisiert */
.premium-product-selector-list{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
    width:100% !important;
}

.premium-product-choice-row{
    width:100% !important;
    min-width:0 !important;
    min-height:50px !important;
    display:flex !important;
    align-items:center !important;
    gap:11px !important;
    padding:10px 13px !important;
    margin:0 !important;
    border:1px solid #39443e !important;
    border-radius:10px !important;
    background:#11171a !important;
    color:#e5ece7 !important;
    cursor:pointer;
    box-sizing:border-box !important;
}

.premium-product-choice-row:hover{
    border-color:#009039 !important;
    background:#151e19 !important;
}

.premium-product-choice-row .form-check-input{
    position:static !important;
    opacity:1 !important;
    pointer-events:auto !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    flex:0 0 18px !important;
    margin:0 !important;
}

.premium-product-choice-name{
    display:block !important;
    min-width:0 !important;
    width:100% !important;
    color:#e5ece7 !important;
    font-size:.84rem !important;
    font-weight:700 !important;
    line-height:1.3 !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
}

.premium-product-choice-row.is-selected,
.premium-product-choice-row:has(input:checked){
    border-color:#009039 !important;
    background:rgba(0,144,57,.14) !important;
}

.premium-product-choice-row input:checked{
    background-color:#009039 !important;
    border-color:#009039 !important;
}

@media(max-width:760px){
    .premium-product-selector-list{
        grid-template-columns:1fr !important;
    }

    .premium-product-choice-row{
        min-height:48px !important;
    }

    .premium-product-choice-name{
        font-size:.86rem !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL – Product Pills ohne Zeilenumbruch
   ============================================================ */

.premium-product-pill-scroll{
    width:100% !important;
    max-width:100% !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    gap:9px !important;
    padding:3px 2px 10px !important;
    margin:0 !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scroll-snap-type:x proximity;
    scrollbar-width:thin;
    scrollbar-color:#009039 #202924;
}

.premium-product-pill-scroll::-webkit-scrollbar{
    height:7px;
}

.premium-product-pill-scroll::-webkit-scrollbar-track{
    background:#202924;
    border-radius:999px;
}

.premium-product-pill-scroll::-webkit-scrollbar-thumb{
    background:#009039;
    border-radius:999px;
}

.premium-product-pill{
    position:relative !important;
    flex:0 0 auto !important;
    width:auto !important;
    min-width:max-content !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    min-height:44px !important;
    padding:8px 14px !important;
    margin:0 !important;
    border:1px solid #39443e !important;
    border-radius:999px !important;
    background:#11171a !important;
    color:#e7eee9 !important;
    cursor:pointer !important;
    box-sizing:border-box !important;
    white-space:nowrap !important;
    scroll-snap-align:start;
    transition:
        border-color .15s ease,
        background .15s ease,
        transform .15s ease;
}

.premium-product-pill:hover{
    border-color:#009039 !important;
    background:#151e19 !important;
    transform:translateY(-1px);
}

.premium-product-pill > input{
    position:absolute !important;
    opacity:0 !important;
    pointer-events:none !important;
    width:1px !important;
    height:1px !important;
}

.premium-product-pill-check{
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    flex:0 0 22px !important;
    display:grid !important;
    place-items:center !important;
    border:1px solid #4a5850 !important;
    border-radius:50% !important;
    background:#1b2320 !important;
    color:transparent !important;
    font-size:.68rem !important;
    font-weight:900 !important;
    line-height:1 !important;
}

.premium-product-pill-text{
    display:inline-block !important;
    width:auto !important;
    min-width:max-content !important;
    max-width:none !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    word-break:keep-all !important;
    overflow-wrap:normal !important;
    hyphens:none !important;
    line-height:1 !important;
    font-size:.78rem !important;
    font-weight:750 !important;
}

.premium-product-pill.is-selected,
.premium-product-pill:has(input:checked){
    border-color:#009039 !important;
    background:rgba(0,144,57,.16) !important;
    color:#fff !important;
}

.premium-product-pill.is-selected .premium-product-pill-check,
.premium-product-pill:has(input:checked) .premium-product-pill-check{
    border-color:#009039 !important;
    background:#009039 !important;
    color:#fff !important;
}

/* Auf großen Monitoren möglichst alles ohne Scrollbar zeigen.
   Wenn der Platz nicht reicht, bleibt horizontales Scrollen erhalten. */
@media(min-width:1200px){
    .premium-product-pill-scroll{
        gap:8px !important;
    }

    .premium-product-pill{
        padding-left:12px !important;
        padding-right:12px !important;
    }

    .premium-product-pill-text{
        font-size:.74rem !important;
    }
}

@media(max-width:650px){
    .premium-product-pill-scroll{
        margin-left:-2px !important;
        padding-bottom:11px !important;
    }

    .premium-product-pill{
        min-height:43px !important;
        padding:8px 13px !important;
    }

    .premium-product-pill-text{
        font-size:.8rem !important;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Mehrfach-Dropdown */
.public-product-multiselect-wrap{
    width:100%;
}

.public-product-multiselect{
    width:100% !important;
    min-height:200px !important;
    padding:8px !important;
    border:1px solid #39443e !important;
    border-radius:10px !important;
    background:#11171a !important;
    color:#e8eee9 !important;
    line-height:1.4 !important;
}

.public-product-multiselect option{
    padding:9px 10px !important;
    margin:2px 0 !important;
    border-radius:6px !important;
    background:#11171a !important;
    color:#e8eee9 !important;
    white-space:nowrap !important;
}

.public-product-multiselect option:checked{
    background:#009039 !important;
    color:#fff !important;
}

.public-product-multiselect:focus{
    border-color:#009039 !important;
    box-shadow:0 0 0 .2rem rgba(0,144,57,.15) !important;
}

@media(max-width:650px){
    .public-product-multiselect{
        min-height:230px !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Sharp Hero + Checkbox Multi-Dropdown
   ============================================================ */

/* Hero: Bild bewusst ohne Weichzeichner oder Kontrastfilter */
.public-hero-premium .public-hero-media img{
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
    object-position:center 54% !important;
    filter:none !important;
    transform:scale(1.002);
    image-rendering:auto;
    backface-visibility:hidden;
    animation:bd24HeroZoom 14s ease-out both;
}

.public-hero-premium .public-hero-overlay{
    background:
        linear-gradient(
            90deg,
            rgba(5,9,7,.88) 0%,
            rgba(5,9,7,.67) 39%,
            rgba(5,9,7,.20) 70%,
            rgba(5,9,7,.06) 100%
        ),
        linear-gradient(
            0deg,
            rgba(5,9,7,.30),
            transparent 50%
        ) !important;
}

.public-hero-copy h1{
    text-shadow:0 3px 25px rgba(0,0,0,.28);
}

.public-hero-copy .btn{
    min-height:52px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    padding-left:22px;
    padding-right:22px;
    font-weight:800;
    transition:transform .16s ease,box-shadow .16s ease;
}

.public-hero-copy .btn:hover{
    transform:translateY(-2px);
    box-shadow:0 12px 28px rgba(0,0,0,.28);
}

.bd24-reveal{
    animation:bd24Reveal .7s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes bd24Reveal{
    from{opacity:0;transform:translateY(18px)}
    to{opacity:1;transform:translateY(0)}
}

@keyframes bd24HeroZoom{
    from{transform:scale(1.035)}
    to{transform:scale(1.002)}
}

/* Produktkarten etwas klarer und moderner */
.premium-product-card{
    transition:
        transform .22s cubic-bezier(.2,.7,.2,1),
        border-color .22s ease,
        box-shadow .22s ease !important;
}

.premium-product-card:hover{
    transform:translateY(-7px) !important;
    box-shadow:0 28px 65px rgba(0,0,0,.34) !important;
}

.premium-product-card:hover .premium-product-image img{
    transform:scale(1.025) !important;
}

.premium-product-image img{
    filter:none !important;
}

/* Echtes Mehrfach-Dropdown mit Checkboxen */
.bd24-multiselect{
    position:relative;
    width:100%;
    z-index:30;
}

.bd24-multiselect-trigger{
    width:100%;
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:10px 14px;
    border:1px solid #39443e;
    border-radius:10px;
    background:#11171a;
    color:#eef3ef;
    text-align:left;
    cursor:pointer;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}

.bd24-multiselect-trigger:hover,
.bd24-multiselect.is-open .bd24-multiselect-trigger{
    border-color:#009039;
    background:#141d18;
}

.bd24-multiselect-trigger:focus-visible{
    outline:none;
    border-color:#009039;
    box-shadow:0 0 0 .2rem rgba(0,144,57,.16);
}

.bd24-multiselect-trigger.is-invalid{
    border-color:#dc3545 !important;
    box-shadow:0 0 0 .2rem rgba(220,53,69,.14) !important;
}

.bd24-multiselect-trigger-text{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}

.bd24-multiselect-trigger-text strong{
    font-size:.84rem;
    line-height:1.15;
}

.bd24-multiselect-trigger-text small{
    color:#88968e;
    font-size:.69rem;
    line-height:1.2;
}

.bd24-multiselect-trigger.has-selection small{
    color:#78d896;
}

.bd24-multiselect-chevron{
    flex:0 0 auto;
    color:#87dba1;
    font-size:1.35rem;
    line-height:1;
    transition:transform .16s ease;
}

.bd24-multiselect.is-open .bd24-multiselect-chevron{
    transform:rotate(180deg);
}

.bd24-multiselect-panel{
    position:absolute;
    z-index:1000;
    left:0;
    right:0;
    top:calc(100% + 7px);
    overflow:hidden;
    border:1px solid #39443e;
    border-radius:12px;
    background:#151b1e;
    box-shadow:0 22px 55px rgba(0,0,0,.45);
}

.bd24-multiselect-panel[hidden]{
    display:none !important;
}

.bd24-multiselect-panel-head{
    padding:13px 14px 10px;
    border-bottom:1px solid #2c3530;
}

.bd24-multiselect-panel-head strong,
.bd24-multiselect-panel-head span{
    display:block;
}

.bd24-multiselect-panel-head strong{
    color:#fff;
    font-size:.84rem;
}

.bd24-multiselect-panel-head span{
    margin-top:2px;
    color:#849188;
    font-size:.66rem;
}

.bd24-multiselect-options{
    max-height:310px;
    overflow-y:auto;
    padding:7px;
    scrollbar-width:thin;
    scrollbar-color:#009039 #202824;
}

.bd24-multiselect-option{
    min-height:44px;
    width:100%;
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px 10px;
    margin:0;
    border-radius:8px;
    color:#dce5df;
    cursor:pointer;
    user-select:none;
}

.bd24-multiselect-option:hover{
    background:#1d2721;
}

.bd24-multiselect-option > input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.bd24-option-check{
    width:24px;
    height:24px;
    flex:0 0 24px;
    display:grid;
    place-items:center;
    border:1px solid #4a5850;
    border-radius:6px;
    background:#101619;
    color:transparent;
    font-size:.72rem;
    font-weight:900;
}

.bd24-option-label{
    min-width:0;
    white-space:nowrap;
    color:#e4ebe6;
    font-size:.8rem;
    font-weight:650;
}

.bd24-multiselect-option.is-selected{
    background:rgba(0,144,57,.13);
}

.bd24-multiselect-option.is-selected .bd24-option-check{
    border-color:#009039;
    background:#009039;
    color:#fff;
}

.bd24-multiselect-panel-footer{
    display:flex;
    justify-content:space-between;
    gap:8px;
    padding:10px;
    border-top:1px solid #2c3530;
    background:#12181b;
}

.bd24-multiselect-panel-footer .btn{
    min-width:96px;
}

@media(max-width:760px){
    .public-hero-premium .public-hero-media img{
        object-position:62% center !important;
    }

    .public-hero-premium .public-hero-overlay{
        background:rgba(5,9,7,.60) !important;
    }

    .bd24-multiselect-panel{
        position:fixed;
        z-index:2000;
        left:12px;
        right:12px;
        top:auto;
        bottom:12px;
        max-height:min(72vh,560px);
    }

    .bd24-multiselect-options{
        max-height:45vh;
    }
}

@media(prefers-reduced-motion:reduce){
    .public-hero-premium .public-hero-media img,
    .bd24-reveal{
        animation:none !important;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – neues schärferes Hero-Foto */
.public-hero-premium .public-hero-media img{
    object-position:center 48% !important;
    filter:none !important;
}

@media(max-width:760px){
    .public-hero-premium .public-hero-media img{
        object-position:58% center !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Hero statisch + Bilder vollständig lokal
   ============================================================ */

.public-hero-premium .public-hero-media,
.public-hero-premium .public-hero-media img{
    animation:none !important;
    transition:none !important;
    transform:none !important;
}

.public-hero-premium .public-hero-media img{
    filter:none !important;
    object-fit:cover !important;
    object-position:center 48% !important;
    will-change:auto !important;
}

.public-hero-copy,
.bd24-reveal{
    animation:none !important;
    transform:none !important;
    transition:none !important;
}

@media(max-width:760px){
    .public-hero-premium .public-hero-media img{
        object-position:58% center !important;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – statischer Hero */
.public-hero-premium .public-hero-media,
.public-hero-premium .public-hero-media img{
    animation:none !important;
    transition:none !important;
    transform:none !important;
}
.public-hero-premium .public-hero-media img{
    filter:none !important;
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Website-Bildverwaltung */
.website-image-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}

.website-image-card{
    overflow:hidden;
}

.website-image-card > img{
    width:100%;
    aspect-ratio:16/10;
    object-fit:cover;
    display:block;
    background:#11171a;
}

@media(max-width:1050px){
    .website-image-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}

@media(max-width:650px){
    .website-image-grid{grid-template-columns:1fr;}
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Logo & Design */
.public-brand-logo{
    display:flex !important;
    align-items:center !important;
    min-width:0;
}

.public-brand-logo img{
    display:block;
    height:44px;
    width:auto;
    max-width:280px;
    object-fit:contain;
}

.bd24-header-logo{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    min-height:calc(var(--brand-logo-height) + (var(--brand-header-padding-y) * 2));
    padding-top:var(--brand-header-padding-y) !important;
    padding-bottom:var(--brand-header-padding-y) !important;
    text-decoration:none !important;
}

.bd24-header-logo img,
.bd24-header-logo-img{
    display:block;
    height:var(--brand-logo-height) !important;
    width:auto !important;
    max-width:var(--brand-logo-max-width) !important;
    object-fit:contain !important;
}

.design-logo-preview{
    min-height:150px;
    display:grid;
    place-items:center;
    padding:18px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#11171a;
}

.design-logo-preview img{
    display:block;
    max-width:100%;
    max-height:120px;
    object-fit:contain;
}

.design-favicon-preview{
    width:36px;
    height:36px;
    object-fit:contain;
    border-radius:7px;
}

/* zentrale Designfarben */
.btn-primary{
    background-color:var(--brand-primary, #009039) !important;
    border-color:var(--brand-primary, #009039) !important;
}

.text-primary{
    color:var(--brand-primary, #009039) !important;
}

a{
    --bs-link-color-rgb:0,144,57;
}

@media(max-width:650px){
    .public-brand-logo img{
        height:38px;
        max-width:220px;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – größeres Standardlogo */
.public-header-inner{
    min-height:92px !important;
}

.public-brand-logo{
    flex:0 1 auto !important;
}

.public-brand-logo img{
    height:72px !important;
    width:auto !important;
    max-width:390px !important;
    object-fit:contain !important;
}

.bd24-header-logo{
    min-height:calc(var(--brand-logo-height) + (var(--brand-header-padding-y) * 2)) !important;
}

.bd24-header-logo img,
.bd24-header-logo-img{
    height:var(--brand-logo-height) !important;
    max-width:var(--brand-logo-max-width) !important;
}

@media(max-width:900px){
    .public-header-inner{
        min-height:80px !important;
    }

    .public-brand-logo img{
        height:58px !important;
        max-width:310px !important;
    }
}

@media(max-width:650px){
    .public-brand-logo img{
        height:48px !important;
        max-width:245px !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Header-/Logo-Einstellungen werden überall angewendet
   ============================================================ */

.public-header-inner{
    min-height:unset !important;
    padding-top:var(--public-header-padding-y, 12px) !important;
    padding-bottom:var(--public-header-padding-y, 12px) !important;
}

.public-brand-logo{
    display:flex !important;
    align-items:center !important;
    min-width:0 !important;
    max-width:100% !important;
}

.public-brand-logo img{
    display:block !important;
    height:var(--public-logo-height, 78px) !important;
    width:auto !important;
    max-width:min(var(--public-logo-max-width, 390px), 60vw) !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
    flex:none !important;
}

.bd24-header-logo img,
.bd24-header-logo-img{
    display:block !important;
    height:var(--brand-logo-height, 78px) !important;
    width:auto !important;
    max-width:var(--brand-logo-max-width, 390px) !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
    flex:none !important;
}

.bd24-header-logo{
    min-height:unset !important;
    padding-top:var(--brand-header-padding-y, 12px) !important;
    padding-bottom:var(--brand-header-padding-y, 12px) !important;
}

.public-admin-shortcut{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:6px 10px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:8px;
    color:#dce7df !important;
    text-decoration:none !important;
    font-size:.76rem;
    font-weight:800;
}

.public-admin-shortcut:hover{
    border-color:var(--public-brand-primary, #009039);
    color:#fff !important;
}

.design-live-preview{
    display:flex;
    align-items:center;
    min-height:100px;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:12px;
    background:#11171a;
}

@media(max-width:900px){
    .public-brand-logo img{
        max-width:min(var(--public-logo-max-width, 390px), 72vw) !important;
        height:min(var(--public-logo-height, 78px), 64px) !important;
    }
}

@media(max-width:650px){
    .public-brand-logo img{
        max-width:min(var(--public-logo-max-width, 390px), 68vw) !important;
        height:min(var(--public-logo-height, 78px), 52px) !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Logo wirklich groß + kompakte Produkt-Dropdown-Buttons
   ============================================================ */

.public-brand-logo img{
    display:block !important;
    height:var(--public-logo-height, 92px) !important;
    width:auto !important;
    max-width:var(--public-logo-max-width, 520px) !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
}

.bd24-header-logo img,
.bd24-header-logo-img{
    display:block !important;
    height:var(--brand-logo-height, 92px) !important;
    width:auto !important;
    max-width:var(--brand-logo-max-width, 520px) !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
}

.public-header-inner,
.bd24-header-logo{
    overflow:visible !important;
}

.bd24-multiselect-panel-footer{
    justify-content:flex-end !important;
    gap:6px !important;
    padding:7px 9px !important;
}

.bd24-multiselect-panel-footer .btn{
    min-width:unset !important;
    min-height:30px !important;
    padding:4px 9px !important;
    font-size:.7rem !important;
    line-height:1.1 !important;
    border-radius:7px !important;
}

@media(max-width:650px){
    .bd24-multiselect-panel-footer .btn{
        min-height:29px !important;
        padding:4px 8px !important;
        font-size:.68rem !important;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – großes transparentes Logo */
.public-header-inner{
    min-height:calc(var(--public-logo-height,118px) + (var(--public-header-padding-y,5px) * 2)) !important;
    padding-top:var(--public-header-padding-y,5px) !important;
    padding-bottom:var(--public-header-padding-y,5px) !important;
}

.public-brand-logo img{
    display:block !important;
    height:var(--public-logo-height,118px) !important;
    width:auto !important;
    max-width:var(--public-logo-max-width,680px) !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
    transform:none !important;
}

.bd24-header-logo{
    min-height:calc(var(--brand-logo-height,118px) + (var(--brand-header-padding-y,5px) * 2)) !important;
    padding-top:var(--brand-header-padding-y,5px) !important;
    padding-bottom:var(--brand-header-padding-y,5px) !important;
}

.bd24-header-logo img,
.bd24-header-logo-img{
    display:block !important;
    height:var(--brand-logo-height,118px) !important;
    width:auto !important;
    max-width:var(--brand-logo-max-width,680px) !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
    transform:none !important;
}

.public-brand-logo,
.bd24-header-logo{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

@media(max-width:900px){
    .public-brand-logo img{
        height:min(var(--public-logo-height,118px),82px) !important;
        max-width:min(var(--public-logo-max-width,680px),72vw) !important;
    }
}

@media(max-width:650px){
    .public-brand-logo img{
        height:min(var(--public-logo-height,118px),62px) !important;
        max-width:min(var(--public-logo-max-width,680px),68vw) !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Textbranding, breite Beratung, Karrierecheck
   ============================================================ */

.bd24-text-brand,
.bd24-public-text-brand{
    text-decoration:none !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.bd24-text-brand strong{
    color:#f2f7f3;
    font-size:1.05rem;
    letter-spacing:-.02em;
    white-space:nowrap;
}

.bd24-public-text-brand{
    display:flex !important;
    flex-direction:column;
    align-items:flex-start !important;
    gap:1px;
}

.bd24-public-text-brand strong{
    color:#f3f7f4;
    font-size:1.35rem;
    line-height:1;
    letter-spacing:-.035em;
}

.bd24-public-text-brand small{
    color:#8fa097 !important;
    font-size:.62rem;
    letter-spacing:.04em;
}

.public-request-stack{
    display:flex;
    flex-direction:column;
    gap:24px;
}

.public-request-stack > div:first-child{
    max-width:920px;
}

.public-request-form{
    width:100%;
    max-width:none !important;
}

.public-request-form .row{
    max-width:100%;
}

.career-public-section{
    background:#0f1518 !important;
    border-top:1px solid #27312c;
}

.career-public-head{
    max-width:860px;
    margin-bottom:26px;
}

.career-public-form{
    width:100%;
    padding:28px;
    border:1px solid #303a34;
    border-radius:16px;
    background:#171d20;
    box-shadow:0 18px 48px rgba(0,0,0,.18);
}

.career-form-section{
    padding:22px 0;
    border-bottom:1px solid #2d3732;
}

.career-form-section:first-of-type{
    padding-top:0;
}

.career-form-section:last-child{
    padding-bottom:0;
    border-bottom:0;
}

.career-form-section h3{
    margin:0 0 16px;
    color:#fff;
    font-size:1rem;
}

.career-contact-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}

.career-check-option{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:42px;
    padding:8px 10px;
    border:1px solid #39443e;
    border-radius:9px;
    background:#11171a;
    color:#e3eae5;
    cursor:pointer;
}

.career-check-option input{
    width:17px;
    height:17px;
    accent-color:#009039;
}

.admin-section-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
    padding:5px;
    border:1px solid var(--line,#30363d);
    border-radius:10px;
    background:var(--panel,#171d20);
}

.admin-section-tabs a{
    padding:7px 11px;
    border-radius:7px;
    color:var(--text,#e5e7eb);
    text-decoration:none;
    font-size:.78rem;
    font-weight:700;
}

.admin-section-tabs a:hover,
.admin-section-tabs a.active{
    background:rgba(0,144,57,.17);
    color:#73da92;
}

@media(max-width:850px){
    .career-contact-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:600px){
    .career-public-form{
        padding:18px;
    }

    .career-contact-grid{
        grid-template-columns:1fr;
    }
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL - aufgeräumte öffentliche Formulare */
.public-action-section{padding:72px 0 !important;background:#101619 !important}.career-public-section{background:#0d1315 !important}.public-action-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:20px;padding:24px;border:1px solid #303a34;border-radius:16px;background:#171d20;box-shadow:0 15px 38px rgba(0,0,0,.16)}.public-action-icon{width:54px;height:54px;display:grid;place-items:center;border-radius:14px;background:rgba(0,144,57,.15);color:#63d487;font-size:1.5rem;font-weight:900}.public-action-copy h2{margin:2px 0 7px;color:#fff}.public-action-copy p{margin:0;color:#aab5ae !important}.public-action-points{display:flex;flex-wrap:wrap;gap:7px 16px;margin-top:12px;color:#cbd5cf;font-size:.72rem;font-weight:700}.public-form-toggle{white-space:nowrap}.public-collapsible-form{margin-top:16px}.public-collapsible-form[hidden]{display:none!important}.public-collapsible-form.is-open{animation:bd24FormOpen .18s ease-out}.public-wide-form{width:100%;max-width:none!important}.public-form-group,.career-form-section{padding:20px;border:1px solid #2e3832;border-radius:12px;background:#141a1d;margin-bottom:12px}.public-form-group h3,.career-form-section h3{margin:0 0 14px;color:#fff;font-size:.9rem}.career-public-form{padding:14px!important}.career-form-section{border-bottom:1px solid #2e3832!important}.career-form-section:last-child{margin-bottom:0}.public-action-card-career .public-action-icon{background:rgba(107,208,139,.12)}@keyframes bd24FormOpen{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}@media(max-width:800px){.public-action-card{grid-template-columns:1fr}.public-action-icon{width:46px;height:46px}.public-form-toggle{width:100%}.public-action-points{flex-direction:column;gap:5px}}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL – aufgeräumte Navigation
   ============================================================ */
.bd24-clean-nav{
    display:flex !important;
    flex-direction:column !important;
    gap:8px !important;
    padding:10px 8px 18px !important;
    overflow-y:auto !important;
    overscroll-behavior:contain;
}

.bd24-nav-group{
    border-bottom:1px solid rgba(255,255,255,.055);
    padding-bottom:7px;
}

.bd24-nav-group:last-child{
    border-bottom:0;
}

.bd24-nav-group-label,
.bd24-nav-group-toggle{
    width:100%;
    min-height:28px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:5px 9px;
    border:0;
    background:transparent;
    color:#75837b;
    font-size:.61rem;
    font-weight:900;
    letter-spacing:.09em;
    text-transform:uppercase;
}

.bd24-nav-group-toggle{
    cursor:pointer;
}

.bd24-nav-group-toggle:hover{
    color:#a6b4ab;
}

.bd24-nav-chevron{
    font-size:.8rem;
    transition:transform .15s ease;
}

.bd24-nav-group.is-collapsed .bd24-nav-chevron{
    transform:rotate(-90deg);
}

.bd24-nav-group-items{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.bd24-nav-group.is-collapsed .bd24-nav-group-items{
    display:none;
}

.bd24-clean-nav a{
    min-height:39px !important;
    display:grid !important;
    grid-template-columns:26px minmax(0,1fr) !important;
    align-items:center !important;
    gap:9px !important;
    padding:7px 9px !important;
    margin:0 !important;
    border-radius:8px !important;
    border-left:0 !important;
    color:#c8d2cc !important;
    font-size:.79rem !important;
    font-weight:650 !important;
}

.bd24-clean-nav a:hover{
    background:rgba(255,255,255,.055) !important;
    color:#fff !important;
}

.bd24-clean-nav a.active{
    background:rgba(0,144,57,.20) !important;
    color:#7ee19c !important;
    box-shadow:inset 3px 0 0 #009039;
}

.bd24-nav-icon{
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
    flex:0 0 24px;
    color:#91a198;
    font-size:.95rem;
    line-height:1;
}

.bd24-clean-nav a.active .bd24-nav-icon{
    color:#69da8b;
}

/* Sidebar nicht unnötig breit wirken lassen */
.sidebar{
    scrollbar-width:thin;
    scrollbar-color:#3b4740 transparent;
}

/* auf kleinen Displays kompakt */
@media(max-width:800px){
    .bd24-clean-nav{
        padding-left:6px !important;
        padding-right:6px !important;
    }

    .bd24-clean-nav a{
        font-size:.77rem !important;
    }
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL – vollständige Navigation
   ============================================================ */

.bd24-clean-nav{
    gap:6px !important;
}

.bd24-nav-group{
    padding-bottom:6px !important;
}

.bd24-nav-group-toggle,
.bd24-nav-group-label{
    color:#718078 !important;
    font-size:.60rem !important;
}

.bd24-clean-nav a{
    min-height:38px !important;
    grid-template-columns:25px minmax(0,1fr) !important;
    gap:8px !important;
    font-size:.77rem !important;
    border-radius:7px !important;
}

.bd24-nav-icon{
    width:23px !important;
    height:23px !important;
    font-size:.92rem !important;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif !important;
}

.bd24-clean-nav a.bd24-nav-special{
    margin:3px 0 5px !important;
    background:rgba(0,144,57,.14) !important;
    border:1px solid rgba(0,144,57,.28) !important;
    color:#86e2a0 !important;
}

.bd24-clean-nav a.bd24-nav-special:hover,
.bd24-clean-nav a.bd24-nav-special.active{
    background:rgba(0,144,57,.27) !important;
    color:#fff !important;
}

.bd24-nav-group-items{
    gap:1px !important;
}

/* Scrollbar unauffälliger */
.bd24-clean-nav::-webkit-scrollbar{
    width:6px;
}
.bd24-clean-nav::-webkit-scrollbar-track{
    background:transparent;
}
.bd24-clean-nav::-webkit-scrollbar-thumb{
    background:#344139;
    border-radius:999px;
}

/* Einrückung der Gruppen klarer */
.bd24-nav-group-items{
    padding-left:2px;
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Mausrad-Scrolling in der Admin-Navigation wiederhergestellt
   ============================================================ */

/* Die Sidebar muss als Flex-Container eine echte Resthöhe bereitstellen. */
.sidebar{
    display:flex !important;
    flex-direction:column !important;
    height:100vh !important;
    max-height:100vh !important;
    overflow:hidden !important;
}

/* Navigation nimmt den verfügbaren Rest ein und darf scrollen. */
#crmSidebarNav.bd24-clean-nav{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior-y:contain !important;
    -webkit-overflow-scrolling:touch;
    scrollbar-gutter:stable;
    pointer-events:auto !important;
    touch-action:pan-y !important;
}

/* Header/Brand und Footer-Bereich der Sidebar dürfen den Scrollbereich nicht zusammendrücken. */
.sidebar > :not(#crmSidebarNav){
    flex:0 0 auto;
}

/* Scrollbar sichtbar genug für Mausbedienung */
#crmSidebarNav.bd24-clean-nav{
    scrollbar-width:thin !important;
    scrollbar-color:#4b5a51 transparent !important;
}

#crmSidebarNav.bd24-clean-nav::-webkit-scrollbar{
    width:8px !important;
}

#crmSidebarNav.bd24-clean-nav::-webkit-scrollbar-track{
    background:transparent !important;
}

#crmSidebarNav.bd24-clean-nav::-webkit-scrollbar-thumb{
    background:#435149 !important;
    border-radius:999px !important;
    border:2px solid transparent !important;
    background-clip:padding-box !important;
}

#crmSidebarNav.bd24-clean-nav::-webkit-scrollbar-thumb:hover{
    background:#5b6a61 !important;
    background-clip:padding-box !important;
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – erweiterte Benutzerrechte */
.permission-groups{display:flex;flex-direction:column;gap:12px;}
.permission-group-card{padding:12px;border:1px solid var(--line,#30363d);border-radius:10px;background:rgba(255,255,255,.015);}
.permission-group-title{margin-bottom:8px;color:#7c8b82;font-size:.65rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;}
.permission-group-card .permission-grid{margin-top:0!important;}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Benutzerstatus und Rollenstandard unabhängig
   ============================================================ */
.user-option-box{
    position:relative;
    z-index:1;
    padding:10px 12px;
    border:1px solid var(--line,#30363d);
    border-radius:9px;
    background:rgba(255,255,255,.015);
    overflow:visible;
}

.user-option-box .form-check{
    position:relative;
    z-index:2;
    display:flex;
    align-items:center;
    gap:8px;
    min-height:24px;
    cursor:pointer;
    pointer-events:auto !important;
}

.user-option-box .form-check-input{
    position:static !important;
    flex:0 0 auto;
    opacity:1 !important;
    pointer-events:auto !important;
    cursor:pointer !important;
    margin:0 !important;
}

.user-option-box small{
    display:block;
    margin-top:5px;
    color:var(--muted,#89968e);
    font-size:.68rem;
    line-height:1.3;
}

/* Rollenstandard deaktiviert nur die einzelnen Rechtefelder. */
.permission-checkbox:disabled{
    opacity:.45;
    cursor:not-allowed;
}


/* ============================================================
   Bauelementedirekt24 CRM v13.0.0 FINAL
   Grüne Checkbox-Haken + öffentliches Logo
   ============================================================ */

/* Normale CRM-/Website-Checkboxen */
.form-check-input[type="checkbox"]{
    appearance:none !important;
    -webkit-appearance:none !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    border:1px solid #536158 !important;
    border-radius:5px !important;
    background-color:#11171a !important;
    background-image:none !important;
    display:inline-grid !important;
    place-content:center !important;
    cursor:pointer !important;
    transition:border-color .12s ease,background-color .12s ease,box-shadow .12s ease !important;
}

.form-check-input[type="checkbox"]::before{
    content:"✓";
    color:#fff;
    font-size:13px;
    font-weight:900;
    line-height:1;
    transform:scale(0);
    transition:transform .1s ease;
}

.form-check-input[type="checkbox"]:checked{
    background-color:#009039 !important;
    border-color:#009039 !important;
    background-image:none !important;
}

.form-check-input[type="checkbox"]:checked::before{
    transform:scale(1);
}

.form-check-input[type="checkbox"]:focus{
    border-color:#009039 !important;
    box-shadow:0 0 0 .18rem rgba(0,144,57,.18) !important;
}

.form-check-input[type="checkbox"]:disabled{
    opacity:.45 !important;
    cursor:not-allowed !important;
}

/* Checkboxen ohne Bootstrap-Klasse, z.B. Karriere-Kontaktquellen */
input[type="checkbox"]:not(.form-check-input){
    accent-color:#009039;
}

/* Hochgeladenes Logo auf der öffentlichen Website */
.bd24-public-brand{
    display:flex !important;
    align-items:center !important;
    min-width:0 !important;
    text-decoration:none !important;
    background:transparent !important;
    border:0 !important;
}

.bd24-public-logo{
    display:block !important;
    height:var(--public-logo-height,118px) !important;
    width:auto !important;
    max-width:min(var(--public-logo-max-width,680px),58vw) !important;
    max-height:none !important;
    object-fit:contain !important;
    object-position:left center !important;
    aspect-ratio:auto !important;
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
}

.bd24-public-brand .bd24-public-text-brand{
    display:flex;
    flex-direction:column;
    gap:2px;
}

@media(max-width:900px){
    .bd24-public-logo{
        height:min(var(--public-logo-height,118px),76px) !important;
        max-width:60vw !important;
    }
}

@media(max-width:650px){
    .bd24-public-logo{
        height:min(var(--public-logo-height,118px),58px) !important;
        max-width:64vw !important;
    }
}


/* Kalender v13.0.0 FINAL */
.calendar-count{
    display:inline-grid;
    place-items:center;
    min-width:20px;
    height:20px;
    margin-left:3px;
    padding:0 5px;
    border-radius:999px;
    background:rgba(255,255,255,.10);
    font-size:.65rem;
    font-weight:800;
}

.calendar-card .fc .fc-event{
    cursor:pointer;
}

.calendar-card .fc .fc-list-event:hover td{
    background:rgba(0,144,57,.06);
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Pagination */
.bd24-pagination{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    margin-top:12px;
    padding:10px 12px;
    border:1px solid var(--line,#30363d);
    border-radius:10px;
    background:var(--panel,#171d20);
}
.bd24-pagination-info{color:var(--muted,#8d9992);font-size:.75rem;font-weight:700}
.bd24-page-size{display:flex;align-items:center;gap:7px;margin-left:auto}
.bd24-page-size label{color:var(--muted,#8d9992);font-size:.7rem;white-space:nowrap}
.bd24-page-size select{width:76px}
.bd24-page-links{display:flex;flex-wrap:wrap;gap:4px}
.audit-details{max-width:420px;white-space:normal;overflow-wrap:anywhere}


/* Bauelementedirekt24 CRM v13.0.0 FINAL */
.bd24-pagination + .customer-drawer{
    margin-top:0;
}

.table td form.d-inline{
    display:inline-block !important;
    margin-left:3px;
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Vergangene Termine Pagination */
.past-appointments-pagination{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-top:1px solid var(--line,#30363d);
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Produkt-Papierkorb */
.product-trash-actions{
    display:flex;
    gap:5px;
    justify-content:flex-end;
    flex-wrap:wrap;
}

/* v13.0.0 FINAL */
.crm-version-footer{
    margin:18px 0 8px;
    text-align:center;
    color:var(--muted,#7d8982);
    font-size:.66rem;
    letter-spacing:.03em;
}


/* Bauelementedirekt24 CRM v13.0.0 FINAL – Dashboard Monatsauswahl */
.dashboard-active-filter{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
    padding-top:10px;
    border-top:1px solid var(--line,#30363d);
    color:var(--muted,#8d9992);
    font-size:.75rem;
}

.dashboard-active-filter strong{
    color:var(--text,#e5e7eb);
}

.dashboard-active-filter a{
    margin-left:auto;
    font-weight:700;
    text-decoration:none;
}

/* v13.0.0 FINAL */
.dashboard-month-selector .form-control[type="month"]{min-width:185px}
