*{box-sizing:border-box} :root{--bg:#080808;--header:#101010;--text:#f4efe6;--heading:#d4b27a;--gold:#c8a96b;--muted:#9a948b;--line:rgba(200,169,107,.22)}
body{margin:0;background:radial-gradient(circle at 80% 0,color-mix(in srgb,var(--gold) 14%,transparent),transparent 380px),var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif}
a{text-decoration:none;color:inherit}.topbar{position:sticky;top:0;z-index:1000;background:color-mix(in srgb,var(--header) 92%,transparent);border-bottom:1px solid var(--line);backdrop-filter:blur(18px)}
.topbar-inner{max-width:1500px;margin:auto;padding:15px 24px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px}.brand{display:flex;align-items:center;gap:12px;color:var(--gold);font-weight:850;letter-spacing:.1em}.brand-logo{display:block;height:46px;width:auto;object-fit:contain}.brand-mark{font-size:34px;line-height:1}.center-nav{display:flex;gap:32px;align-items:center}.center-nav a,.nav-actions a{opacity:.78;font-weight:650}.center-nav a.active,.nav-actions a.active,.center-nav a:hover,.nav-actions a:hover{opacity:1;font-weight:850}.nav-actions{justify-self:end;display:flex;gap:18px}
.container{max-width:1500px;margin:auto;padding:42px 24px}.hero{padding:34px 0 28px}.eyebrow{color:var(--gold);font-size:12px;letter-spacing:.22em;text-transform:uppercase;font-weight:800}.hero h1{font-size:clamp(42px,6vw,78px);margin:8px 0;color:var(--heading);font-weight:850}.hero p{color:var(--muted);font-size:17px;line-height:1.7;max-width:900px}
.card,.panel,.widget{background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.018));border:1px solid var(--line);border-radius:30px;padding:26px;box-shadow:0 26px 80px rgba(0,0,0,.22)}
.grid{display:grid;gap:22px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.widget h2,.panel h2{color:var(--heading);margin:4px 0 10px}.big{font-size:clamp(32px,4vw,58px);font-weight:850;color:var(--text)}
.filterbar{margin:24px 0;padding:20px;border:1px solid var(--line);border-radius:32px;background:color-mix(in srgb,var(--header) 88%,transparent);display:grid;gap:14px}.filter-row{display:grid;gap:14px}.filter-row.main{grid-template-columns:repeat(4,1fr)}.filter-row.dates{grid-template-columns:1.3fr repeat(3,1fr)}.filter-row.actions{grid-template-columns:1fr auto auto auto}
label{font-weight:750;font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);display:flex;flex-direction:column;gap:8px}input,select{height:48px;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:rgba(255,255,255,.035);color:var(--text);padding:0 14px}button,.btn{height:48px;border:1px solid var(--line);border-radius:999px;background:var(--gold);color:#111;font-weight:850;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.btn.secondary{background:transparent;color:var(--text)}
.date-info{border:1px solid var(--line);border-radius:18px;padding:10px 14px;display:flex;flex-direction:column;justify-content:center;color:var(--text)}.date-info span{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.14em}.date-info b{margin-top:4px}
.chart{width:100%;height:350px}.table-wrap{max-height:620px;overflow:auto;border:1px solid var(--line);border-radius:22px;box-shadow:0 18px 55px rgba(0,0,0,.16)}table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}th{position:sticky;top:0;background:color-mix(in srgb,var(--gold) 9%,var(--bg));color:var(--gold);z-index:2;text-transform:uppercase;font-size:11px;letter-spacing:.12em}th,td{padding:13px;border-bottom:1px solid rgba(255,255,255,.06);text-align:left;white-space:normal;overflow-wrap:anywhere}tr:hover td{background:rgba(255,255,255,.035)}
.alert{padding:14px 16px;border:1px solid var(--line);border-radius:18px;margin:16px 0;background:rgba(255,255,255,.04)}
.account-page{max-width:1180px;margin:46px auto;padding:0 22px}.account-block{background:rgba(255,255,255,.035);border:1px solid var(--line);border-radius:32px;margin-bottom:18px;overflow:hidden}.block-head{display:flex;justify-content:space-between;align-items:center;padding:22px 26px;cursor:pointer}.block-body{display:none;padding:0 26px 26px}.account-block.open .block-body{display:block}.expand{width:44px;height:44px;border:1px solid var(--line);border-radius:99px;display:flex;align-items:center;justify-content:center}.account-block.open .expand{transform:rotate(45deg)}.preset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px}.preset{all:unset;display:block;cursor:pointer;border:1px solid var(--line);border-radius:24px;overflow:hidden}.preset-preview{height:130px;position:relative}.preset-title{padding:16px;font-weight:800}.expert-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.color-box{border:1px solid var(--line);border-radius:22px;padding:18px}.color-row{display:flex;justify-content:space-between;align-items:center;margin:12px 0}.login-row{display:grid;grid-template-columns:1fr .8fr 1.5fr;gap:16px;padding:14px 0;border-bottom:1px solid rgba(255,255,255,.06)}
@media(max-width:1000px){.topbar-inner{grid-template-columns:1fr;justify-items:center}.nav-actions{justify-self:center}.grid.four,.grid.two,.filter-row.main,.filter-row.dates,.filter-row.actions,.expert-grid,.login-row{grid-template-columns:1fr}.container{padding:28px 16px}.chart{height:300px}}
.workspace-bar{display:flex;gap:16px;align-items:center;justify-content:space-between;margin:18px 0 24px;flex-wrap:wrap}.workspace-bar form{display:flex;gap:10px;align-items:center}.workspace-bar input{min-width:240px}.saved-views{display:flex;gap:8px;flex-wrap:wrap}.chip{border:1px solid var(--line);border-radius:999px;padding:10px 14px;color:var(--gold);background:rgba(255,255,255,.03);font-weight:750}.mapbox{min-height:360px;border:1px solid var(--line);border-radius:24px;padding:18px;background:radial-gradient(circle at center,rgba(200,169,107,.10),transparent 60%)}.map-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.map-point{border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:14px;background:rgba(255,255,255,.035);display:flex;flex-direction:column;gap:5px}.map-point b{color:var(--heading)}.map-point span,.map-point em{color:var(--muted);font-style:normal}.map-empty{display:grid;place-items:center;min-height:320px;color:var(--muted)}@media(max-width:760px){.workspace-bar form{width:100%;flex-direction:column}.workspace-bar input,.workspace-bar button{width:100%}}


/* V2.2 Enterprise polish */
.filterbar-pro .data-top{grid-template-columns:1fr!important}
.date-info-wide{min-height:68px;align-items:flex-start}
.kpi-grid .widget{min-height:180px;display:flex;flex-direction:column;justify-content:space-between}
.kpi-grid .widget h2{font-size:clamp(22px,2.2vw,34px);line-height:1.08}
.kpi-grid .widget .big{font-size:clamp(26px,3.2vw,54px);line-height:1.05;overflow-wrap:anywhere}
.chart-scroll{width:100%;overflow-x:auto;overflow-y:hidden;padding-bottom:10px}
.chart-scroll canvas{display:block}
.table-wrap.compact{max-height:520px;overflow:auto}
.smart-table{table-layout:auto!important}
.smart-table th,.smart-table td{white-space:normal;word-break:normal;overflow-wrap:anywhere}
.smart-table .col-name{width:48%;min-width:220px}
.smart-table th:nth-child(2),.smart-table td:nth-child(2){width:18%}
.smart-table th:nth-child(3),.smart-table td:nth-child(3){width:14%;white-space:nowrap}
.smart-table th:nth-child(4),.smart-table td:nth-child(4){width:20%;white-space:nowrap}
.preset-grid.equal{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));align-items:stretch}
.preset-card{height:270px!important;display:flex!important;flex-direction:column!important;justify-content:space-between!important}
.preset-preview.rich{height:205px!important;border-radius:22px 22px 0 0;position:relative;padding:18px}
.mini-brand{font-weight:900;letter-spacing:.12em}
.mini-card{position:absolute;left:18px;right:18px;bottom:32px;border:1px solid;border-radius:18px;padding:12px;background:rgba(255,255,255,.08);display:flex;justify-content:space-between;gap:10px}
.mini-card span{font-size:12px;text-transform:uppercase;letter-spacing:.12em}
.mini-line{position:absolute;left:18px;right:18px;bottom:18px;height:4px;border-radius:999px}
.preset-title{text-align:left}
@media(max-width:900px){.smart-table .col-name{min-width:180px}.grid.two{grid-template-columns:1fr!important}}


/* V2.3 - typography, filter, chart, tables */
body{
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "Segoe UI", Arial, sans-serif !important;
    letter-spacing: .012em;
    font-kerning: normal;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,h2,h3,.brand strong{
    letter-spacing: .028em;
    font-weight: 650 !important;
}

.big{
    font-weight: 430 !important;
    letter-spacing: .005em;
}

.data-stock-line{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:18px;
    padding:0 2px 8px;
    border-bottom:1px solid color-mix(in srgb,var(--gold) 22%,transparent);
    color:var(--text);
}

.data-stock-line span{
    color:var(--muted);
    text-transform:uppercase;
    font-size:11px;
    letter-spacing:.18em;
    font-weight:650;
}

.data-stock-line b{
    font-weight:500;
    color:var(--text);
}

.filterbar-pro{
    gap:18px;
}

.filterbar-pro .data-top{
    grid-template-columns:1fr!important;
}

.chart-scroll{
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:12px;
    scrollbar-width:thin;
}

.chart-scroll canvas{
    display:block;
}

.smart-table{
    table-layout:auto!important;
}

.smart-table th,
.smart-table td{
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    vertical-align:top;
}

.smart-table .col-name{
    width:52%;
    min-width:240px;
}

.smart-table th:nth-child(2),.smart-table td:nth-child(2){
    width:18%;
}

.smart-table th:nth-child(3),.smart-table td:nth-child(3){
    width:12%;
    white-space:nowrap!important;
}

.smart-table th:nth-child(4),.smart-table td:nth-child(4){
    width:18%;
    white-space:nowrap!important;
}

.kpi-grid .widget h2{
    font-size:clamp(20px,2vw,31px);
}

.kpi-grid .widget .big{
    font-size:clamp(25px,3vw,48px);
}

@media(max-width:760px){
    .data-stock-line{
        flex-direction:column;
        align-items:flex-start;
        gap:6px;
    }

    .smart-table .col-name{
        min-width:180px;
    }
}


/* V2.4 final UX */
:root{
    --chart-axis: var(--text);
    --chart-grid: color-mix(in srgb,var(--text) 18%,transparent);
}

body{
    letter-spacing:.018em;
}

.date-info,
.date-info-wide{
    background:transparent!important;
    border:none!important;
    box-shadow:none!important;
}

.chart{
    height:300px!important;
}

.chart-scroll{
    max-height:330px;
}

.preset-grid.equal{
    grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
}

.preset-card{
    height:245px!important;
    min-height:245px!important;
    border-radius:28px!important;
}

.preset-preview.rich{
    height:178px!important;
    border-radius:28px 28px 0 0!important;
    overflow:hidden;
}

.mini-card{
    left:16px!important;
    right:16px!important;
    bottom:28px!important;
    min-height:58px;
    align-items:center;
}

.mini-line{
    bottom:15px!important;
}

html:has(style) body{
    color:var(--text);
}

/* Light/statistics readability */
body:has(.topbar){
    --chart-axis: var(--text);
}

.smart-table th:nth-child(5),.smart-table td:nth-child(5){
    white-space:nowrap!important;
}


/* V2.5 requested polish */
.kpi-grid .widget{
    display:flex!important;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    min-height:190px;
}

.kpi-grid .widget h2{
    width:100%;
    text-align:center;
    margin-bottom:18px;
}

.kpi-grid .widget .big{
    width:100%;
    text-align:center;
}

.hero p strong,
.widget p strong,
.panel p strong{
    color:var(--text);
    font-weight:720;
}

.filterbar-pro{
    padding:22px;
    gap:16px;
}

.filterbar-pro .main{
    grid-template-columns:repeat(4,minmax(160px,1fr))!important;
}

.filterbar-pro .dates{
    grid-template-columns:repeat(4,minmax(160px,1fr))!important;
}

.filterbar-pro .actions{
    grid-template-columns:min-content min-content min-content!important;
    justify-content:end;
    align-items:end;
}

.filterbar-pro button,
.filterbar-pro .btn{
    width:auto!important;
    min-width:max-content;
    padding-left:20px!important;
    padding-right:20px!important;
}

.data-stock-line{
    justify-content:center!important;
    text-align:center;
    gap:14px;
}

.data-stock-line b{
    text-align:center;
}

.saved-chip{
    display:inline-flex!important;
    align-items:center;
    gap:8px;
    padding:0!important;
    overflow:hidden;
}

.saved-chip a{
    padding:10px 0 10px 14px;
}

.saved-chip form{
    margin:0;
}

.chip-x{
    all:unset;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:34px;
    cursor:pointer;
    color:var(--muted);
    font-size:18px;
    border-left:1px solid var(--line);
}

.chip-x:hover{
    color:var(--gold);
    background:rgba(255,255,255,.04);
}

@media(max-width:900px){
    .filterbar-pro .main,
    .filterbar-pro .dates,
    .filterbar-pro .actions{
        grid-template-columns:1fr!important;
        justify-content:stretch;
    }

    .filterbar-pro button,
    .filterbar-pro .btn{
        width:100%!important;
    }
}


/* V2.6 users + password */
.password-form{
    max-width:520px;
    display:grid;
    gap:16px;
}

.admin-links{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
}

.inline-form{
    margin:0;
}

.inline-form select{
    min-width:110px;
}

.user-actions summary{
    cursor:pointer;
    color:var(--gold);
    font-weight:700;
}

.mini-form{
    display:grid;
    gap:8px;
    margin-top:12px;
    max-width:280px;
}

.mini-form input{
    width:100%;
}

.danger-btn{
    background:#7f1d1d!important;
    color:#fff!important;
    border-color:#991b1b!important;
}

.danger-btn:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.user-table td{
    vertical-align:top;
}


/* V2.7 Mobile UX overhaul */

/* Base mobile readability */
html{
    -webkit-text-size-adjust:100%;
}

body{
    overflow-x:hidden;
}

.container,
.account-page{
    width:100%;
    max-width:1500px;
}

/* Prevent form controls from causing iOS zoom */
input,
select,
textarea,
button,
.btn{
    font-size:16px;
}

/* Header becomes premium mobile app header */
@media(max-width:820px){

    .topbar{
        position:sticky;
        top:0;
        z-index:1000;
    }

    .topbar-inner{
        grid-template-columns:1fr!important;
        gap:12px!important;
        padding:12px 14px!important;
    }

    .brand{
        justify-content:center;
        font-size:15px;
        letter-spacing:.14em;
    }

    .brand-mark{
        font-size:28px!important;
    }

    .center-nav{
        width:100%;
        justify-content:center;
        gap:8px!important;
        overflow-x:auto;
        padding:4px 0 6px;
        scrollbar-width:none;
        -webkit-overflow-scrolling:touch;
    }

    .center-nav::-webkit-scrollbar{
        display:none;
    }

    .center-nav a{
        flex:0 0 auto;
        padding:10px 14px;
        border-radius:999px;
        background:rgba(255,255,255,.045);
        border:1px solid rgba(255,255,255,.055);
        font-size:14px;
    }

    .center-nav a.active{
        background:color-mix(in srgb,var(--gold) 20%,transparent);
        border-color:color-mix(in srgb,var(--gold) 35%,transparent);
    }

    .nav-actions{
        width:100%;
        justify-content:center!important;
        gap:10px!important;
    }

    .nav-actions a{
        padding:9px 14px;
        border-radius:999px;
        background:rgba(255,255,255,.035);
        font-size:13px;
    }
}

/* Hero mobile */
@media(max-width:760px){

    .container{
        padding:22px 14px!important;
    }

    .account-page{
        margin:18px auto 48px!important;
        padding:0 14px!important;
    }

    .hero{
        padding:20px 0 16px!important;
    }

    .hero h1{
        font-size:clamp(32px,10vw,46px)!important;
        line-height:1.02;
        letter-spacing:.015em;
    }

    .hero p{
        font-size:15px!important;
        line-height:1.58!important;
        max-width:100%;
    }

    .eyebrow{
        font-size:10px!important;
        letter-spacing:.18em!important;
    }
}

/* Mobile filter as calm stacked control surface */
@media(max-width:900px){

    .filterbar,
    .filterbar-pro{
        margin:16px 0 18px!important;
        padding:14px!important;
        border-radius:24px!important;
        gap:14px!important;
    }

    .filterbar-pro .main,
    .filterbar-pro .dates,
    .filterbar-pro .actions,
    .filter-row.main,
    .filter-row.dates,
    .filter-row.actions{
        grid-template-columns:1fr!important;
        gap:12px!important;
        justify-content:stretch!important;
    }

    label{
        font-size:10px!important;
        letter-spacing:.12em!important;
        gap:7px!important;
    }

    input,
    select{
        width:100%!important;
        min-width:0!important;
        height:48px!important;
        border-radius:16px!important;
    }

    .filterbar-pro button,
    .filterbar-pro .btn,
    button,
    .btn{
        width:100%!important;
        min-width:0!important;
        height:48px!important;
        border-radius:999px!important;
        justify-content:center!important;
        white-space:nowrap;
    }

    .data-stock-line{
        flex-direction:column!important;
        align-items:center!important;
        justify-content:center!important;
        gap:5px!important;
        padding:0 0 12px!important;
        text-align:center!important;
    }

    .data-stock-line b{
        font-size:14px;
    }
}

/* KPI cards mobile */
@media(max-width:900px){

    .grid.four,
    .kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        gap:12px!important;
    }

    .widget,
    .panel,
    .card{
        border-radius:24px!important;
        padding:18px!important;
    }

    .kpi-grid .widget{
        min-height:150px!important;
    }

    .kpi-grid .widget h2{
        font-size:clamp(16px,5vw,23px)!important;
        margin-bottom:10px!important;
    }

    .kpi-grid .widget .big{
        font-size:clamp(22px,7vw,34px)!important;
        line-height:1.08!important;
    }
}

@media(max-width:520px){

    .grid.four,
    .kpi-grid{
        grid-template-columns:1fr!important;
    }

    .kpi-grid .widget{
        min-height:126px!important;
    }
}

/* Charts on mobile: readable, not squeezed */
@media(max-width:760px){

    .panel:has(.chart-scroll){
        padding:16px!important;
    }

    .chart-scroll{
        margin-left:-2px;
        margin-right:-2px;
        padding-bottom:14px!important;
        overflow-x:auto!important;
        -webkit-overflow-scrolling:touch;
    }

    .chart{
        height:280px!important;
    }
}

/* Tables: mobile card-table behavior */
@media(max-width:760px){

    .table-wrap{
        border-radius:20px!important;
        max-height:560px!important;
        overflow:auto!important;
        -webkit-overflow-scrolling:touch;
    }

    table.smart-table{
        min-width:720px!important;
    }

    .smart-table th,
    .smart-table td{
        padding:11px 10px!important;
        font-size:13px!important;
    }

    .smart-table .col-name{
        min-width:240px!important;
        width:42%!important;
    }

    .grid.two{
        grid-template-columns:1fr!important;
        gap:16px!important;
    }
}

/* Workspace / saved views mobile */
@media(max-width:760px){

    .workspace-bar{
        align-items:stretch!important;
        gap:12px!important;
    }

    .workspace-bar form{
        width:100%!important;
        flex-direction:column!important;
        align-items:stretch!important;
    }

    .workspace-bar input{
        width:100%!important;
        min-width:0!important;
    }

    .saved-views{
        width:100%;
        display:flex!important;
        flex-wrap:nowrap!important;
        overflow-x:auto;
        gap:8px!important;
        padding-bottom:4px;
        -webkit-overflow-scrolling:touch;
    }

    .chip,
    .saved-chip{
        flex:0 0 auto;
        white-space:nowrap;
    }
}

/* Account page mobile */
@media(max-width:760px){

    .account-block{
        border-radius:24px!important;
        margin-bottom:14px!important;
    }

    .block-head{
        padding:18px!important;
        gap:12px;
    }

    .block-head h2{
        font-size:18px;
        margin:0 0 4px;
    }

    .block-head p{
        font-size:13px;
        line-height:1.45;
        margin:0;
    }

    .block-body{
        padding:0 18px 18px!important;
    }

    .expand{
        min-width:40px;
        width:40px!important;
        height:40px!important;
    }

    .login-row{
        grid-template-columns:1fr!important;
        gap:5px!important;
        font-size:13px;
        padding:12px 0!important;
    }

    .preset-grid.equal,
    .preset-grid{
        grid-template-columns:1fr!important;
    }

    .preset-card{
        height:auto!important;
        min-height:0!important;
    }

    .preset-preview.rich{
        height:150px!important;
    }

    .password-form{
        max-width:100%!important;
    }
}

/* Admin users mobile */
@media(max-width:760px){

    .admin-links{
        flex-direction:column;
        align-items:stretch;
    }

    .admin-links .btn{
        width:100%!important;
    }

    .user-table{
        min-width:760px!important;
    }

    .mini-form{
        max-width:100%!important;
    }

    details.user-actions{
        min-width:220px;
    }
}

/* Touch polish */
@media(hover:none){

    a,
    button,
    .btn,
    select,
    input,
    .block-head{
        touch-action:manipulation;
    }

    .widget:hover td,
    tr:hover td{
        background:transparent!important;
    }
}


/* V2.7.1 Mobile alignment refinement
   Ziel: keine abgehackten Widgets, alle Karten bündig auf maximale Breite.
*/

@media(max-width:900px){

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .container,
    .account-page{
        width:100%!important;
        max-width:100%!important;
        padding-left:14px!important;
        padding-right:14px!important;
        margin-left:auto!important;
        margin-right:auto!important;
    }

    .hero,
    .filterbar,
    .filterbar-pro,
    .workspace-bar,
    .grid,
    .grid.two,
    .grid.four,
    .kpi-grid,
    .panel,
    .widget,
    .card,
    .account-block{
        width:100%!important;
        max-width:100%!important;
        margin-left:0!important;
        margin-right:0!important;
    }

    .grid,
    .grid.two,
    .grid.four,
    .kpi-grid{
        display:grid!important;
        grid-template-columns:1fr!important;
        align-items:stretch!important;
        justify-items:stretch!important;
    }

    .widget,
    .panel,
    .card{
        align-self:stretch!important;
        justify-self:stretch!important;
        min-width:0!important;
    }

    .kpi-grid .widget{
        min-height:138px!important;
        height:auto!important;
    }

    .panel + .panel,
    .grid + .panel,
    .panel + .grid{
        margin-top:16px!important;
    }

    .chart-scroll,
    .table-wrap,
    .mapbox{
        width:100%!important;
        max-width:100%!important;
    }

    .chart-scroll{
        border-radius:20px;
    }

    /* Tabellen dürfen intern scrollen, aber die Karten selbst bleiben bündig */
    .table-wrap{
        overflow-x:auto!important;
        overflow-y:auto!important;
    }

    /* Verhindert optisch abgeschnittene Inhalte durch zu große Schatten/Radien */
    .widget,
    .panel,
    .card,
    .filterbar,
    .account-block{
        box-shadow:
            0 16px 42px rgba(0,0,0,.18),
            inset 0 1px 0 rgba(255,255,255,.035)!important;
    }
}

@media(max-width:520px){

    .container,
    .account-page{
        padding-left:12px!important;
        padding-right:12px!important;
    }

    .widget,
    .panel,
    .card,
    .filterbar,
    .account-block{
        border-radius:22px!important;
    }

    .widget,
    .panel,
    .card{
        padding:16px!important;
    }

    .hero h1{
        max-width:100%;
        overflow-wrap:anywhere;
    }
}

/* Mobile full-width utility for any future widget */
@media(max-width:900px){
    [class*="widget"],
    [class*="panel"]{
        box-sizing:border-box;
    }
}


/* V2.8 KPI Config, Comparison & AI Insights */
.kpi-grid-six{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

.kpi-grid-six .widget{
    min-height:170px;
}

.delta{
    margin:10px 0 0;
    color:var(--muted);
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.ai-panel p{
    font-size:15.5px;
    line-height:1.75;
    max-width:1100px;
}

.ai-panel strong{
    color:var(--text);
    font-weight:800;
}

.action-list{
    margin:10px 0 0;
    padding-left:20px;
    color:var(--muted);
    line-height:1.8;
}

.action-list li{
    margin-bottom:6px;
}

@media(max-width:1100px){
    .kpi-grid-six{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

@media(max-width:620px){
    .kpi-grid-six{
        grid-template-columns:1fr!important;
    }
}


/* V2.9 Mapping Studio + color presets + online order analytics */
.mapping-form{
    display:grid;
    gap:22px;
}

.mapping-section{
    border:1px solid var(--line);
    border-radius:24px;
    padding:20px;
    background:rgba(255,255,255,.025);
}

.mapping-section h3{
    margin:0 0 14px;
    color:var(--heading);
    font-size:18px;
    letter-spacing:.04em;
}

.mapping-section .muted,
.muted{
    color:var(--muted);
}

.channel-widget{
    grid-column:auto;
}

.channel-split{
    width:100%;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}

.channel-split span{
    border:1px solid var(--line);
    border-radius:18px;
    padding:14px 10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    background:rgba(255,255,255,.025);
}

.channel-split b{
    font-size:clamp(24px,3vw,42px);
    font-weight:460;
}

.channel-split em{
    font-style:normal;
    color:var(--muted);
    font-size:12px;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.expert-theme{
    margin-top:24px;
    border:1px solid var(--line);
    border-radius:24px;
    padding:18px;
    background:rgba(255,255,255,.025);
}

.expert-theme summary{
    cursor:pointer;
    color:var(--gold);
    font-weight:750;
}

.preset-card .preset-title{
    min-height:48px;
}

@media(max-width:760px){
    .mapping-section{
        padding:16px;
        border-radius:20px;
    }

    .channel-split{
        grid-template-columns:1fr;
    }
}


/* V3.0 contrast + order/payment polish */
.topbar,
.topbar a,
.brand,
.center-nav a,
.nav-actions a{
    color:var(--header-text)!important;
}

.brand{
    color:var(--gold)!important;
}

input,select,textarea{
    color:var(--text)!important;
}

button,.btn{
    color:#111827;
}

.channel-widget{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
}

.mapping-section select,
.mapping-section input{
    min-width:0;
}

.payment-table td,
.payment-table th{
    white-space:normal;
}

.preset-preview.rich{
    border-bottom:1px solid rgba(0,0,0,.08);
}

/* readable table/header in light themes */
th{
    color:var(--gold)!important;
}

.panel,.widget,.card,.filterbar{
    color:var(--text);
}


/* V3.1 Bestellart chart + Zahlungsart table fix */
.payment-table th:nth-child(2),
.payment-table td:nth-child(2),
.payment-table th:nth-child(3),
.payment-table td:nth-child(3){
    white-space:nowrap!important;
    width:20%;
}

.panel .muted{
    margin-top:-6px;
    margin-bottom:16px;
    color:var(--muted);
    font-size:13px;
}

#channelChart{
    min-height:320px;
}


/* V3.3 server-side Bestellart chart + Widget Designer cleanup */
.server-chart-wrap{
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding-bottom:8px;
}

.server-chart{
    display:block;
    width:100%;
    min-width:720px;
    height:320px;
}

@media(max-width:760px){
    .server-chart{
        min-width:760px;
    }
}

.designer-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:18px;
}

.designer-card{
    border:1px solid var(--line);
    border-radius:24px;
    padding:18px;
    background:rgba(255,255,255,.025);
}

.designer-card h3{
    margin:0 0 12px;
    color:var(--heading);
}

.designer-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    align-items:center;
    border-top:1px solid rgba(255,255,255,.06);
    padding:12px 0;
}

.designer-row:first-of-type{
    border-top:none;
}

.designer-row small{
    display:block;
    color:var(--muted);
    margin-top:4px;
}


/* V3.4 theme expert + preset preview fixes */
.expert-theme{
    margin-top:24px;
    border:1px solid var(--line);
    border-radius:24px;
    padding:18px;
    background:rgba(255,255,255,.035);
}

.expert-theme summary{
    cursor:pointer;
    color:var(--gold);
    font-weight:800;
    letter-spacing:.03em;
}

.expert-theme-form{
    margin-top:18px;
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:16px;
}

.expert-theme-form input[type="color"]{
    width:100%!important;
    height:54px!important;
    padding:4px!important;
    border-radius:16px!important;
}

.preset-card,
.preset-preview.rich{
    overflow:hidden!important;
}

.mini-card{
    overflow:hidden!important;
    gap:6px!important;
}

.mini-card b{
    max-width:70px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    text-align:right;
}

.mini-brand{
    color:inherit;
    opacity:.98;
}


/* V3.5 contrast fixes + integration UI */
.topbar{
    background:var(--header)!important;
}

.topbar a,
.center-nav a,
.nav-actions a{
    color:var(--header-text)!important;
    opacity:.98!important;
}

.center-nav a.active,
.center-nav a:hover,
.nav-actions a:hover{
    color:var(--header-text)!important;
    font-weight:800;
    background:rgba(255,255,255,.10);
}

.brand strong{
    color:var(--gold)!important;
}

.filterbar,
.filterbar-pro{
    background:var(--filter-bg)!important;
    color:var(--filter-text)!important;
}

.filterbar label,
.filterbar-pro label,
.filterbar .data-stock-line,
.filterbar .data-stock-line span,
.filterbar .data-stock-line b{
    color:var(--filter-text)!important;
    opacity:1!important;
}

.filterbar input,
.filterbar select,
.filterbar textarea,
.filterbar-pro input,
.filterbar-pro select,
.filterbar-pro textarea{
    background:rgba(255,255,255,.12)!important;
    color:var(--filter-text)!important;
    border-color:rgba(255,255,255,.20)!important;
}

.filterbar input::placeholder,
.filterbar-pro input::placeholder{
    color:color-mix(in srgb,var(--filter-text) 62%,transparent)!important;
}

.filterbar button,
.filterbar .btn,
.filterbar-pro button,
.filterbar-pro .btn{
    font-weight:800;
}

.integration-form .full{
    grid-column:1/-1;
}

.integration-form textarea{
    width:100%;
    border-radius:18px;
    padding:14px;
    background:rgba(255,255,255,.06);
    color:var(--text);
    border:1px solid var(--line);
}

@media(max-width:900px){
    .integration-form .full{
        grid-column:auto;
    }
}


/* V3.6 Designsystem preview + expert mode refinement */
.preset-grid.equal,
.preset-grid{
    row-gap:34px!important;
}

.preset-card{
    width:170px!important;
    max-width:170px!important;
    height:248px!important;
    min-height:248px!important;
    overflow:hidden!important;
}

.preset-preview.rich{
    height:178px!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
}

.mini-brand{
    height:48px!important;
    line-height:48px!important;
    padding:0 16px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}

.mini-card{
    position:static!important;
    margin:32px 16px 10px!important;
    min-height:68px!important;
    width:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    display:grid!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:8px!important;
    box-sizing:border-box!important;
}

.mini-card span{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
}

.mini-card b{
    max-width:54px!important;
    min-width:54px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:right!important;
    font-size:14px!important;
}

.mini-line{
    position:static!important;
    margin:0 16px!important;
    height:4px!important;
    width:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
}

.preset-title{
    padding:14px 16px!important;
}

/* expert mode placed lower, clearer button */
.expert-theme-shell{
    margin-top:44px!important;
    border-top:1px solid var(--line);
    padding-top:24px;
}

.expert-toggle{
    width:100%!important;
    min-height:64px!important;
    border-radius:22px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:14px!important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 14%,transparent),rgba(255,255,255,.03))!important;
    border:1px solid color-mix(in srgb,var(--gold) 32%,transparent)!important;
    color:var(--text)!important;
    text-align:left!important;
    padding:14px 18px!important;
}

.expert-toggle .toggle-icon{
    width:38px;
    height:38px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--gold);
    color:#111827;
    font-size:22px;
    font-weight:800;
    flex:0 0 auto;
}

.expert-toggle strong{
    display:block;
    font-size:16px;
    color:var(--heading);
}

.expert-toggle em{
    display:block;
    font-style:normal;
    color:var(--muted);
    font-size:13px;
    margin-top:3px;
}

.expert-theme-panel{
    display:none;
    margin-top:18px;
    border:1px solid var(--line);
    border-radius:26px;
    padding:20px;
    background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
}

.expert-theme-shell.open .expert-theme-panel{
    display:block;
}

.expert-theme-shell.open .toggle-icon{
    transform:rotate(45deg);
}

.expert-theme-form{
    display:grid!important;
    grid-template-columns:260px 1fr!important;
    gap:22px!important;
    align-items:start;
}

.expert-preview{
    border:1px solid var(--line);
    border-radius:24px;
    overflow:hidden;
    min-height:220px;
    background:var(--bg);
}

.expert-preview-header{
    height:54px;
    display:flex;
    align-items:center;
    padding:0 18px;
    background:var(--header);
    color:var(--header-text);
    font-weight:900;
    letter-spacing:.16em;
}

.expert-preview-body{
    padding:22px;
}

.expert-preview-card{
    border:1px solid var(--gold);
    border-radius:18px;
    padding:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    color:var(--text);
}

.expert-preview-card span{
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:12px;
}

.expert-preview-card b{
    font-weight:700;
}

.expert-preview-line{
    margin-top:14px;
    height:4px;
    border-radius:999px;
    background:var(--gold);
}

.expert-controls{
    display:grid;
    grid-template-columns:repeat(2,minmax(180px,1fr));
    gap:16px;
}

.expert-controls input[type="color"]{
    width:100%!important;
    height:54px!important;
    padding:4px!important;
    border-radius:16px!important;
}

.expert-gradient-note{
    grid-column:2;
    color:var(--muted);
    line-height:1.6;
    padding:14px 16px;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.025);
}

.expert-actions{
    grid-column:2;
}

@media(max-width:820px){
    .expert-theme-form{
        grid-template-columns:1fr!important;
    }

    .expert-gradient-note,
    .expert-actions{
        grid-column:auto!important;
    }

    .expert-controls{
        grid-template-columns:1fr!important;
    }

    .preset-card{
        width:100%!important;
        max-width:100%!important;
    }
}


/* V3.7 Expert-Modus layout + PDF header update */
.expert-theme-shell{
    margin-top:52px!important;
    border-top:1px solid var(--line);
    padding-top:26px;
}

.expert-toggle{
    width:auto!important;
    min-width:230px!important;
    min-height:58px!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:13px!important;
    padding:12px 20px!important;
    background:linear-gradient(135deg,color-mix(in srgb,var(--gold) 18%,transparent),rgba(255,255,255,.04))!important;
    border:1px solid color-mix(in srgb,var(--gold) 42%,transparent)!important;
    color:var(--text)!important;
    text-align:left!important;
}

.expert-toggle .toggle-icon{
    width:34px;
    height:34px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:var(--gold);
    color:#111827;
    font-size:17px;
    font-weight:900;
    flex:0 0 auto;
}

.expert-toggle strong{
    display:block;
    font-size:16px;
    color:var(--heading);
}

.expert-toggle em{
    display:block;
    font-style:normal;
    color:var(--muted);
    font-size:12px;
    margin-top:2px;
}

.expert-theme-panel{
    display:none!important;
    margin-top:22px;
    border:1px solid var(--line);
    border-radius:28px;
    padding:22px;
    background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));
}

.expert-theme-shell.open .expert-theme-panel{
    display:block!important;
}

.expert-theme-form{
    display:grid!important;
    grid-template-columns:1fr 1fr 320px!important;
    gap:22px!important;
    align-items:start!important;
}

.expert-controls{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    border:1px solid var(--line);
    border-radius:24px;
    padding:18px;
    background:rgba(255,255,255,.025);
}

.expert-controls h3{
    margin:0 0 4px;
    color:var(--heading);
}

.expert-controls input[type="color"]{
    width:100%!important;
    height:54px!important;
    padding:4px!important;
    border-radius:16px!important;
}

.gradient-switch{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
    border:1px solid var(--line);
    border-radius:18px;
    padding:14px 16px;
    margin-top:8px;
    letter-spacing:.02em!important;
    text-transform:none!important;
    font-size:14px!important;
}

.gradient-switch input{
    width:22px!important;
    height:22px!important;
}

.expert-actions button{
    width:100%!important;
}

.expert-preview{
    border:1px solid var(--line);
    border-radius:26px;
    overflow:hidden;
    min-height:310px;
    background:var(--bg);
}

.expert-preview-header{
    height:58px;
    display:flex;
    align-items:center;
    padding:0 20px;
    background:var(--header);
    color:var(--header-text);
    font-weight:900;
    letter-spacing:.16em;
}

.expert-preview-body{
    padding:22px;
    color:var(--text);
}

.expert-preview-body h4{
    margin:0 0 10px;
    color:var(--heading);
    font-size:22px;
}

.expert-preview-body p{
    margin:0 0 18px;
    color:inherit;
    opacity:.74;
}

.expert-preview-card{
    border:1px solid var(--gold);
    border-radius:18px;
    padding:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.expert-preview-card span{
    color:var(--gold);
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:12px;
}

.expert-preview-card b{
    font-weight:700;
}

.expert-preview-line{
    margin-top:14px;
    height:4px;
    border-radius:999px;
    background:var(--gold);
}

@media(max-width:1050px){
    .expert-theme-form{
        grid-template-columns:1fr 1fr!important;
    }
    .expert-preview{
        grid-column:1/-1;
    }
}

@media(max-width:720px){
    .expert-theme-form{
        grid-template-columns:1fr!important;
    }
    .expert-preview{
        grid-column:auto;
    }
    .expert-toggle{
        width:100%!important;
    }
}


/* V3.8 Designsystem cleanup */
.design-system-block .block-body{
    padding-top:18px!important;
}

.design-system-block .preset-grid.equal{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(170px,170px))!important;
    gap:26px 34px!important;
    align-items:start!important;
}

.design-system-block .preset-card{
    width:170px!important;
    max-width:170px!important;
    height:248px!important;
    min-height:248px!important;
    border-radius:24px!important;
    overflow:hidden!important;
    padding:0!important;
    background:var(--bg)!important;
    border:1px solid var(--line)!important;
    box-shadow:0 16px 36px rgba(0,0,0,.10)!important;
}

.design-system-block .preset-preview.rich{
    height:178px!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:24px 24px 0 0!important;
}

.design-system-block .mini-brand{
    height:48px!important;
    line-height:48px!important;
    padding:0 16px!important;
    font-size:15px!important;
    font-weight:900!important;
    letter-spacing:.14em!important;
    white-space:nowrap!important;
}

.design-system-block .mini-card{
    position:static!important;
    margin:30px 16px 10px!important;
    min-height:66px!important;
    display:grid!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:6px!important;
    padding:12px!important;
    border-radius:18px!important;
}

.design-system-block .mini-card span{
    font-size:11px!important;
    letter-spacing:.12em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
}

.design-system-block .mini-card b{
    font-size:13px!important;
    max-width:54px!important;
    min-width:54px!important;
    text-align:right!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
}

.design-system-block .mini-line{
    position:static!important;
    height:4px!important;
    margin:0 16px!important;
    border-radius:999px!important;
}

.design-system-block .preset-title{
    padding:14px 16px!important;
    font-weight:800!important;
    color:var(--text)!important;
}

/* Expert mode is closed by default */
.expert-theme-shell{
    margin-top:46px!important;
    padding-top:26px!important;
    border-top:1px solid var(--line)!important;
}

.expert-theme-shell .expert-theme-panel{
    display:none!important;
}

.expert-theme-shell.open .expert-theme-panel{
    display:block!important;
}

.expert-toggle{
    width:auto!important;
    min-width:0!important;
    max-width:260px!important;
    min-height:52px!important;
    border-radius:999px!important;
    padding:11px 18px!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:12px!important;
    background:var(--gold)!important;
    border:1px solid var(--gold)!important;
    color:#111827!important;
    text-align:left!important;
}

.expert-toggle .toggle-icon{
    width:30px!important;
    height:30px!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:rgba(0,0,0,.12)!important;
    color:#111827!important;
    font-size:16px!important;
    flex:0 0 auto!important;
}

.expert-toggle strong{
    color:#111827!important;
    font-size:15px!important;
    line-height:1.1!important;
}

.expert-toggle em{
    color:rgba(17,24,39,.72)!important;
    font-size:12px!important;
    font-style:normal!important;
    display:block!important;
}

.expert-theme-panel{
    margin-top:22px!important;
    border:1px solid var(--line)!important;
    border-radius:28px!important;
    padding:22px!important;
    background:rgba(255,255,255,.035)!important;
}

.expert-theme-form{
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(360px,1.4fr)!important;
    gap:22px!important;
    align-items:stretch!important;
}

.expert-column{
    border:1px solid var(--line)!important;
    border-radius:24px!important;
    padding:18px!important;
    background:rgba(255,255,255,.025)!important;
    display:grid!important;
    gap:14px!important;
    align-content:start!important;
}

.expert-column h3{
    margin:0 0 6px!important;
    color:var(--heading)!important;
}

.expert-column input[type="color"]{
    width:100%!important;
    height:54px!important;
    border-radius:16px!important;
    padding:4px!important;
}

.gradient-switch{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    border:1px solid var(--line)!important;
    border-radius:18px!important;
    padding:14px!important;
    text-transform:none!important;
    letter-spacing:.02em!important;
    font-size:14px!important;
}

.gradient-switch input{
    width:22px!important;
    height:22px!important;
}

.expert-actions button{
    width:100%!important;
}

/* Website preview beside controls, styled like a dashboard/top-list */
.expert-live-preview{
    border:1px solid var(--line)!important;
    border-radius:26px!important;
    overflow:hidden!important;
    background:var(--bg)!important;
    min-height:360px!important;
    box-shadow:0 20px 50px rgba(0,0,0,.12)!important;
}

.preview-web-header{
    height:54px;
    display:flex;
    align-items:center;
    gap:18px;
    padding:0 18px;
    background:var(--header);
    color:var(--header-text);
    font-size:12px;
    font-weight:800;
}

.preview-logo{
    color:var(--gold);
    letter-spacing:.14em;
    font-weight:900;
    margin-right:auto;
}

.preview-web-body{
    padding:20px;
    color:var(--text);
}

.preview-web-body h3{
    margin:0 0 14px;
    color:var(--heading);
    font-size:26px;
}

.preview-filter{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    margin-bottom:16px;
}

.preview-filter span{
    border:1px solid var(--line);
    border-radius:14px;
    padding:10px;
    font-size:11px;
    color:var(--muted);
}

.preview-toplist{
    border:1px solid var(--line);
    border-radius:20px;
    overflow:hidden;
    background:rgba(255,255,255,.035);
}

.toplist-head,
.toplist-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    padding:12px 14px;
    border-bottom:1px solid var(--line);
}

.toplist-head{
    color:var(--gold);
    text-transform:uppercase;
    font-size:11px;
    letter-spacing:.12em;
}

.toplist-row:last-child{
    border-bottom:none;
}

.toplist-row b{
    color:var(--heading);
}

@media(max-width:1080px){
    .expert-theme-form{
        grid-template-columns:1fr 1fr!important;
    }
    .expert-live-preview{
        grid-column:1/-1;
    }
}

@media(max-width:760px){
    .expert-theme-form{
        grid-template-columns:1fr!important;
    }
    .expert-live-preview{
        grid-column:auto;
    }
    .expert-toggle{
        max-width:none!important;
        width:100%!important;
    }
}


/* V3.9 final Designsystem correction */
.design-system-block .block-body{
    padding-top:18px!important;
}

.design-system-block .preset-grid.equal{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(170px,170px))!important;
    gap:30px 42px!important;
    align-items:start!important;
}

.design-system-block .preset-card{
    width:170px!important;
    max-width:170px!important;
    height:248px!important;
    min-height:248px!important;
    border-radius:24px!important;
    overflow:hidden!important;
    padding:0!important;
    border:1px solid var(--line)!important;
    box-shadow:0 16px 36px rgba(0,0,0,.10)!important;
}

.design-system-block .preset-preview.rich{
    height:178px!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    border-radius:24px 24px 0 0!important;
}

.design-system-block .mini-brand{
    height:48px!important;
    line-height:48px!important;
    padding:0 16px!important;
    font-size:15px!important;
    font-weight:900!important;
    letter-spacing:.14em!important;
    overflow:hidden!important;
    white-space:nowrap!important;
}

.design-system-block .mini-card{
    position:static!important;
    margin:30px 16px 10px!important;
    min-height:66px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 52px!important;
    align-items:center!important;
    gap:6px!important;
    padding:12px!important;
    border-radius:18px!important;
    box-sizing:border-box!important;
    width:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
}

.design-system-block .mini-card span{
    font-size:11px!important;
    letter-spacing:.12em!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}

.design-system-block .mini-card b{
    font-size:13px!important;
    max-width:52px!important;
    min-width:52px!important;
    text-align:right!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    font-weight:800!important;
}

.design-system-block .mini-line{
    position:static!important;
    height:4px!important;
    margin:0 16px!important;
    border-radius:999px!important;
    width:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
}

.design-system-block .preset-title{
    padding:14px 16px!important;
    font-weight:800!important;
    color:var(--text)!important;
}

/* Expert mode: closed by default and Apple-like simple card */
#expertThemeShell.expert-theme-shell{
    margin-top:48px!important;
    padding-top:26px!important;
    border-top:1px solid var(--line)!important;
}

#expertThemeShell .expert-theme-panel{
    display:none!important;
}

#expertThemeShell.open .expert-theme-panel{
    display:block!important;
}

#expertThemeShell .expert-toggle{
    width:auto!important;
    max-width:220px!important;
    min-height:50px!important;
    border-radius:999px!important;
    padding:10px 18px!important;
    display:inline-flex!important;
    align-items:center!important;
    gap:12px!important;
    background:var(--gold)!important;
    border:1px solid var(--gold)!important;
    color:#111827!important;
    text-align:left!important;
}

#expertThemeShell .toggle-icon{
    width:30px!important;
    height:30px!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:rgba(0,0,0,.12)!important;
    color:#111827!important;
    font-size:16px!important;
}

#expertThemeShell .toggle-text strong{
    color:#111827!important;
    font-size:15px!important;
    line-height:1.1!important;
    display:block!important;
}

#expertThemeShell .toggle-text em{
    color:rgba(17,24,39,.72)!important;
    font-size:12px!important;
    font-style:normal!important;
    display:block!important;
}

#expertThemeShell .expert-theme-panel{
    margin-top:22px!important;
    border:1px solid var(--line)!important;
    border-radius:28px!important;
    padding:22px!important;
    background:rgba(255,255,255,.04)!important;
}

#expertThemeShell .expert-theme-form{
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(360px,1.4fr)!important;
    gap:22px!important;
    align-items:stretch!important;
}

#expertThemeShell .expert-column{
    border:1px solid var(--line)!important;
    border-radius:24px!important;
    padding:18px!important;
    background:rgba(255,255,255,.025)!important;
    display:grid!important;
    gap:14px!important;
    align-content:start!important;
}

#expertThemeShell .expert-column h3{
    margin:0 0 6px!important;
    color:var(--heading)!important;
}

#expertThemeShell .expert-column input[type="color"]{
    width:100%!important;
    height:54px!important;
    border-radius:16px!important;
    padding:4px!important;
}

#expertThemeShell .gradient-switch{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    border:1px solid var(--line)!important;
    border-radius:18px!important;
    padding:14px!important;
    text-transform:none!important;
    letter-spacing:.02em!important;
    font-size:14px!important;
}

#expertThemeShell .gradient-switch input{
    width:22px!important;
    height:22px!important;
}

#expertThemeShell .expert-actions button{
    width:100%!important;
}

#expertThemeShell .expert-live-preview{
    border:1px solid var(--line)!important;
    border-radius:26px!important;
    overflow:hidden!important;
    background:var(--bg)!important;
    min-height:360px!important;
    box-shadow:0 20px 50px rgba(0,0,0,.12)!important;
}

.preview-web-header{
    height:54px!important;
    display:flex!important;
    align-items:center!important;
    gap:18px!important;
    padding:0 18px!important;
    background:var(--header)!important;
    color:var(--header-text)!important;
    font-size:12px!important;
    font-weight:800!important;
}

.preview-logo{
    color:var(--gold)!important;
    letter-spacing:.14em!important;
    font-weight:900!important;
    margin-right:auto!important;
}

.preview-web-body{
    padding:20px!important;
    color:var(--text)!important;
}

.preview-web-body h3{
    margin:0 0 14px!important;
    color:var(--heading)!important;
    font-size:26px!important;
}

.preview-filter{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:8px!important;
    margin-bottom:16px!important;
}

.preview-filter span{
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    padding:10px!important;
    font-size:11px!important;
    color:var(--muted)!important;
}

.preview-toplist{
    border:1px solid var(--line)!important;
    border-radius:20px!important;
    overflow:hidden!important;
    background:rgba(255,255,255,.035)!important;
}

.toplist-head,
.toplist-row{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:12px!important;
    padding:12px 14px!important;
    border-bottom:1px solid var(--line)!important;
}

.toplist-head{
    color:var(--gold)!important;
    text-transform:uppercase!important;
    font-size:11px!important;
    letter-spacing:.12em!important;
}

.toplist-row:last-child{
    border-bottom:none!important;
}

.toplist-row b{
    color:var(--heading)!important;
}

@media(max-width:1080px){
    #expertThemeShell .expert-theme-form{
        grid-template-columns:1fr 1fr!important;
    }
    #expertThemeShell .expert-live-preview{
        grid-column:1/-1!important;
    }
}

@media(max-width:760px){
    #expertThemeShell .expert-theme-form{
        grid-template-columns:1fr!important;
    }
    #expertThemeShell .expert-live-preview{
        grid-column:auto!important;
    }
    #expertThemeShell .expert-toggle{
        max-width:none!important;
        width:100%!important;
    }
}


/* V4.0 rebuilt Designsystem - clean, controlled, no inherited broken layout */
.ds-clean *{
    box-sizing:border-box;
}

.ds-clean .block-body{
    padding:24px!important;
}

.ds-subtitle{
    margin:0 0 24px!important;
}

.ds-preset-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fit, minmax(170px, 170px))!important;
    gap:30px 42px!important;
    align-items:start!important;
}

.ds-preset-grid form{
    margin:0!important;
}

.ds-preset-card{
    all:unset;
    display:block!important;
    width:170px!important;
    height:248px!important;
    border-radius:24px!important;
    overflow:hidden!important;
    border:1px solid var(--line)!important;
    background:var(--bg)!important;
    box-shadow:0 16px 36px rgba(0,0,0,.10)!important;
    cursor:pointer!important;
    font-family:inherit!important;
}

.ds-card-preview{
    height:178px!important;
    display:flex!important;
    flex-direction:column!important;
    background:linear-gradient(180deg,var(--p-header) 0 30%,var(--p-bg) 30% 100%)!important;
    color:var(--p-text)!important;
    overflow:hidden!important;
}

.ds-card-header{
    height:48px!important;
    display:flex!important;
    align-items:center!important;
    padding:0 16px!important;
    font-weight:900!important;
    font-size:15px!important;
    letter-spacing:.14em!important;
    color:inherit!important;
    white-space:nowrap!important;
    overflow:hidden!important;
}

.ds-card-body{
    padding:30px 16px 0!important;
}

.ds-mini-kpi{
    border:1px solid var(--p-accent)!important;
    border-radius:18px!important;
    min-height:66px!important;
    padding:12px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 52px!important;
    gap:6px!important;
    align-items:center!important;
}

.ds-mini-kpi span{
    color:var(--p-accent)!important;
    font-size:11px!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
}

.ds-mini-kpi b{
    color:var(--p-text)!important;
    max-width:52px!important;
    min-width:52px!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    text-align:right!important;
    font-size:13px!important;
    font-weight:800!important;
}

.ds-mini-line{
    height:4px!important;
    margin-top:10px!important;
    border-radius:999px!important;
    background:var(--p-accent)!important;
}

.ds-card-title{
    height:70px!important;
    display:flex!important;
    align-items:center!important;
    padding:0 16px!important;
    font-weight:800!important;
    color:var(--text)!important;
}

/* Expert button and panel */
.ds-expert{
    margin-top:48px!important;
    padding-top:26px!important;
    border-top:1px solid var(--line)!important;
}

.ds-expert-button{
    all:unset;
    display:inline-flex!important;
    align-items:center!important;
    gap:10px!important;
    padding:12px 18px!important;
    border-radius:999px!important;
    background:var(--gold)!important;
    color:#111827!important;
    font-weight:900!important;
    cursor:pointer!important;
    box-shadow:0 10px 26px rgba(0,0,0,.10)!important;
}

.ds-expert-button span{
    width:28px!important;
    height:28px!important;
    border-radius:999px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    background:rgba(0,0,0,.12)!important;
}

.ds-expert-panel{
    display:none!important;
    margin-top:22px!important;
    border:1px solid var(--line)!important;
    border-radius:28px!important;
    padding:22px!important;
    background:rgba(255,255,255,.04)!important;
}

.ds-expert.open .ds-expert-panel{
    display:block!important;
}

.ds-expert-form{
    display:grid!important;
    grid-template-columns:minmax(220px,1fr) minmax(220px,1fr) minmax(380px,1.35fr)!important;
    gap:22px!important;
    align-items:stretch!important;
}

.ds-color-panel{
    border:1px solid var(--line)!important;
    border-radius:24px!important;
    padding:18px!important;
    background:rgba(255,255,255,.025)!important;
    display:grid!important;
    gap:14px!important;
    align-content:start!important;
}

.ds-color-panel h3{
    margin:0 0 8px!important;
    color:var(--heading)!important;
    font-size:18px!important;
}

.ds-color-panel label{
    display:grid!important;
    gap:8px!important;
    color:var(--muted)!important;
    font-size:11px!important;
    letter-spacing:.14em!important;
    text-transform:uppercase!important;
}

.ds-color-panel input[type="color"]{
    width:100%!important;
    height:56px!important;
    border-radius:18px!important;
    padding:5px!important;
    border:1px solid var(--line)!important;
    background:rgba(255,255,255,.06)!important;
}

.ds-switch{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:space-between!important;
    border:1px solid var(--line)!important;
    border-radius:18px!important;
    padding:14px!important;
    text-transform:none!important;
    letter-spacing:.02em!important;
    font-size:14px!important;
}

.ds-switch input{
    width:22px!important;
    height:22px!important;
}

.ds-save{
    width:100%!important;
    height:48px!important;
}

/* Website / Top-list preview */
.ds-live-preview{
    border:1px solid var(--line)!important;
    border-radius:26px!important;
    overflow:hidden!important;
    background:var(--bg)!important;
    min-height:360px!important;
    box-shadow:0 20px 50px rgba(0,0,0,.12)!important;
}

.ds-live-header{
    height:54px!important;
    display:flex!important;
    align-items:center!important;
    gap:18px!important;
    padding:0 18px!important;
    background:var(--header)!important;
    color:var(--header-text)!important;
    font-size:12px!important;
    font-weight:800!important;
}

.ds-live-header strong{
    color:var(--gold)!important;
    letter-spacing:.14em!important;
    margin-right:auto!important;
}

.ds-live-content{
    padding:20px!important;
    color:var(--text)!important;
}

.ds-live-content h3{
    margin:0 0 14px!important;
    color:var(--heading)!important;
    font-size:26px!important;
}

.ds-live-filters{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:8px!important;
    margin-bottom:16px!important;
}

.ds-live-filters span{
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    padding:10px!important;
    font-size:11px!important;
    color:var(--muted)!important;
}

.ds-live-table{
    border:1px solid var(--line)!important;
    border-radius:20px!important;
    overflow:hidden!important;
    background:rgba(255,255,255,.035)!important;
}

.ds-live-table-head,
.ds-live-row{
    display:grid!important;
    grid-template-columns:1fr auto!important;
    gap:12px!important;
    padding:12px 14px!important;
    border-bottom:1px solid var(--line)!important;
}

.ds-live-table-head{
    color:var(--gold)!important;
    text-transform:uppercase!important;
    font-size:11px!important;
    letter-spacing:.12em!important;
}

.ds-live-row:last-child{
    border-bottom:none!important;
}

.ds-live-row b{
    color:var(--heading)!important;
}

@media(max-width:1080px){
    .ds-expert-form{
        grid-template-columns:1fr 1fr!important;
    }
    .ds-live-preview{
        grid-column:1/-1!important;
    }
}

@media(max-width:760px){
    .ds-preset-grid{
        grid-template-columns:repeat(auto-fit, minmax(150px,1fr))!important;
    }
    .ds-preset-card{
        width:100%!important;
    }
    .ds-expert-form{
        grid-template-columns:1fr!important;
    }
    .ds-live-preview{
        grid-column:auto!important;
    }
    .ds-expert-button{
        width:100%!important;
        justify-content:center!important;
    }
}


/* V4.2 dropdown readability + Dienstleistung analytics */
select option{
    background:#f8fafc!important;
    color:#111827!important;
}

.filterbar select option,
.filterbar-pro select option{
    background:#ffffff!important;
    color:#111827!important;
}

.bubble-map{
    min-height:340px;
    border:1px solid var(--line);
    border-radius:24px;
    background:
        radial-gradient(circle at 20% 35%, color-mix(in srgb,var(--gold) 10%,transparent), transparent 24%),
        radial-gradient(circle at 70% 55%, color-mix(in srgb,var(--gold) 8%,transparent), transparent 22%),
        rgba(255,255,255,.025);
    display:flex;
    flex-wrap:wrap;
    align-content:center;
    justify-content:center;
    gap:14px;
    padding:22px;
    overflow:auto;
}

.bubble-map span{
    width:var(--s);
    min-width:var(--s);
    height:var(--s);
    border-radius:999px;
    border:1px solid color-mix(in srgb,var(--gold) 70%,transparent);
    background:color-mix(in srgb,var(--gold) 18%,transparent);
    color:var(--text);
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:10px;
    line-height:1.15;
    padding:5px;
    overflow:hidden;
}

.bubble-map span b{
    color:var(--heading);
    font-size:12px;
    margin-top:2px;
}

.map-switch{
    display:flex;
    gap:10px;
    margin-bottom:14px;
}

.map-switch button{
    width:auto!important;
    min-width:130px;
}

.donut-list{
    display:grid;
    gap:10px;
}

.donut-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    border:1px solid var(--line);
    border-radius:16px;
    padding:12px 14px;
    background:rgba(255,255,255,.025);
}

.donut-row b{
    color:var(--heading);
}

.bar-chart{
    min-width:720px;
}

@media(max-width:760px){
    .map-switch{
        flex-direction:column;
    }

    .map-switch button{
        width:100%!important;
    }
}


/* V4.4 Dienstleistung rebuild */
.unit-switch{
    display:flex;
    justify-content:center;
    gap:10px;
    margin:22px auto 18px;
}

.unit-switch a{
    min-width:150px;
    text-align:center;
    padding:13px 22px;
    border-radius:999px;
    border:1px solid var(--line);
    background:rgba(255,255,255,.04);
    color:var(--text);
    text-decoration:none;
    font-weight:800;
    letter-spacing:.03em;
}

.unit-switch a.active{
    background:var(--gold);
    border-color:var(--gold);
    color:#111827;
}

.service-panel h2{
    font-size:clamp(26px,2.3vw,36px)!important;
    line-height:1.08;
    margin-bottom:18px!important;
    color:var(--heading);
}

.service-panel .eyebrow{
    display:none!important;
}

select option,
.filterbar select option,
.filterbar-pro select option{
    background:#ffffff!important;
    color:#111827!important;
}

.world-map-wrap{
    width:100%;
    overflow:auto;
    border:1px solid var(--line);
    border-radius:26px;
    background:
        radial-gradient(circle at 20% 20%, color-mix(in srgb,var(--gold) 10%,transparent), transparent 24%),
        rgba(255,255,255,.025);
}

.world-map-svg{
    display:block;
    width:100%;
    min-width:760px;
    height:auto;
}

.map-switch{
    display:flex;
    gap:10px;
    margin-bottom:14px;
    justify-content:center;
}

.map-switch button{
    width:auto!important;
    min-width:130px;
}

.donut-list{
    display:grid;
    gap:10px;
}

.donut-row{
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px;
    border:1px solid var(--line);
    border-radius:16px;
    padding:12px 14px;
    background:rgba(255,255,255,.025);
}

.donut-row b{
    color:var(--heading);
}

.bar-chart{
    min-width:720px;
}

.service-only{
    border-color:color-mix(in srgb,var(--gold) 42%,var(--line))!important;
}

@media(max-width:760px){
    .unit-switch{
        flex-direction:column;
    }

    .unit-switch a{
        width:100%;
    }

    .map-switch{
        flex-direction:column;
    }

    .map-switch button{
        width:100%!important;
    }
}


/* V4.5 period logic + service polish */
.unit-switch,
.map-switch{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    gap:12px!important;
    margin-left:auto!important;
    margin-right:auto!important;
}

.unit-switch a,
.map-switch button{
    background:rgba(255,255,255,.04)!important;
    border:1px solid color-mix(in srgb,var(--gold) 60%,transparent)!important;
    color:var(--text)!important;
    border-radius:999px!important;
    font-weight:850!important;
}

.unit-switch a.active,
.map-switch button:hover,
.map-switch button:focus{
    background:var(--gold)!important;
    color:#111827!important;
    border-color:var(--gold)!important;
}

.service-stacked-chart{
    min-width:760px;
}

.driver-period-table{
    overflow:auto;
}

.driver-period-table table{
    table-layout:auto!important;
    min-width:760px;
}

.driver-period-table th:first-child,
.driver-period-table td:first-child{
    min-width:190px!important;
    max-width:260px!important;
    white-space:normal!important;
}

.driver-period-table th:not(:first-child),
.driver-period-table td:not(:first-child){
    min-width:88px!important;
    text-align:right!important;
    white-space:nowrap!important;
}

.service-panel h2{
    font-size:clamp(29px,2.6vw,40px)!important;
}


/* V4.6 Upload progress */
.upload-progress-overlay{
    position:fixed;
    inset:0;
    z-index:99999;
    background:rgba(0,0,0,.52);
    backdrop-filter:blur(10px);
    align-items:center;
    justify-content:center;
    padding:24px;
}

.upload-progress-card{
    width:min(520px,100%);
    border:1px solid var(--line);
    border-radius:28px;
    background:var(--bg);
    color:var(--text);
    padding:28px;
    box-shadow:0 30px 90px rgba(0,0,0,.35);
    text-align:center;
}

.upload-progress-card h2{
    margin:0 0 10px;
    color:var(--heading);
    font-size:28px;
}

.upload-progress-card p{
    font-size:34px;
    margin:10px 0 18px;
    color:var(--gold);
    font-weight:800;
}

.upload-progress-bar{
    width:100%;
    height:16px;
    border-radius:999px;
    border:1px solid var(--line);
    overflow:hidden;
    background:rgba(255,255,255,.08);
    margin:0 0 16px;
}

.upload-progress-bar span{
    display:block;
    height:100%;
    width:0;
    background:var(--gold);
    border-radius:999px;
    transition:width .18s ease;
}

.upload-progress-card small{
    color:var(--muted);
    line-height:1.5;
}


/* V4.7 dynamic upload/mapping */
.mapping-handel[style*="display: none"],
.service-only[style*="display: none"]{
    display:none!important;
}

.compact-for-service .grid.two label:nth-child(n+5){
    display:none!important;
}

.mapping-null-note{
    border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line));
    border-radius:16px;
    padding:12px 14px;
    background:rgba(255,255,255,.025);
}

.process-progress-form button[name],
.process-progress-form > button{
    position:relative;
}

.upload-progress-overlay{
    position:fixed;
    inset:0;
    z-index:99999;
    background:rgba(0,0,0,.52);
    backdrop-filter:blur(10px);
    align-items:center;
    justify-content:center;
    padding:24px;
}

.upload-progress-card{
    width:min(520px,100%);
    border:1px solid var(--line);
    border-radius:28px;
    background:var(--bg);
    color:var(--text);
    padding:28px;
    box-shadow:0 30px 90px rgba(0,0,0,.35);
    text-align:center;
}

.upload-progress-card h2{
    margin:0 0 10px;
    color:var(--heading);
    font-size:28px;
}

.upload-progress-card p{
    font-size:30px;
    margin:10px 0 18px;
    color:var(--gold);
    font-weight:800;
}

.upload-progress-bar{
    width:100%;
    height:16px;
    border-radius:999px;
    border:1px solid var(--line);
    overflow:hidden;
    background:rgba(255,255,255,.08);
    margin:0 0 16px;
}

.upload-progress-bar span{
    display:block;
    height:100%;
    width:0;
    background:var(--gold);
    border-radius:999px;
    transition:width .18s ease;
}

.upload-progress-card small{
    color:var(--muted);
    line-height:1.5;
}


/* V4.9 Service layout + real maps */
.service-wide{
    width:100%;
}

.service-age-chart .bar-chart{
    min-width:1080px!important;
}

.service-state-chart .bar-chart{
    min-width:980px!important;
}

.service-map-panel{
    min-height:720px;
}

.real-map-card{
    position:relative;
    width:100%;
    min-height:620px;
    border:1px solid var(--line);
    border-radius:26px;
    overflow:hidden;
    background:rgba(255,255,255,.025);
}

.leaflet-service-map{
    width:100%;
    height:620px;
    min-height:620px;
    z-index:1;
}

.map-empty{
    position:absolute;
    inset:auto 24px 24px 24px;
    z-index:2;
    background:rgba(0,0,0,.55);
    color:#fff;
    border-radius:18px;
    padding:14px 16px;
    text-align:center;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip{
    color:#111827;
}

.service-driver-panel{
    min-height:520px;
}

.service-driver-panel .driver-period-table{
    max-height:640px;
    overflow:auto;
}

.service-driver-panel .driver-period-table table{
    width:100%;
    min-width:980px!important;
}

.service-driver-panel .driver-period-table th,
.service-driver-panel .driver-period-table td{
    padding:12px 14px!important;
}

.service-driver-panel .driver-period-table th:first-child,
.service-driver-panel .driver-period-table td:first-child{
    min-width:240px!important;
    width:280px!important;
}

.service-panel h2{
    margin-bottom:24px!important;
}

@media(max-width:900px){
    .real-map-card,
    .leaflet-service-map{
        min-height:520px;
        height:520px;
    }
}


/* V6.0 FINAL RESCUE — keep V4.9 structure, only controlled visual/layout changes */

/* KPI Privat/Mitglieder: no heading, compact table, left aligned */
.kpi-split-widget.no-kpi-title{
    padding:18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}

.kpi-split-widget.no-kpi-title .mini-split-table{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    width:100%;
}

.kpi-split-widget.no-kpi-title .mini-split-table div{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    border:1px solid var(--line);
    border-radius:14px;
    padding:10px 12px;
    background:rgba(255,255,255,.035);
}

.kpi-split-widget.no-kpi-title .mini-split-table span{
    justify-self:start;
    text-align:left;
    color:var(--muted);
    font-size:12px;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.kpi-split-widget.no-kpi-title .mini-split-table b{
    justify-self:end;
    color:var(--heading);
    font-size:18px;
    font-weight:850;
}

/* Age chart: readable, same design language as Fallverlauf */
.html-bar-list{
    display:grid;
    gap:12px;
    width:100%;
    padding:8px 10px 6px;
    font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Arial,sans-serif;
}

.html-bar-row{
    display:grid;
    grid-template-columns:92px minmax(0,1fr) 76px;
    gap:16px;
    align-items:center;
}

.html-bar-label{
    font-size:14px;
    font-weight:800;
    color:var(--text);
    letter-spacing:.01em;
}

.html-bar-track{
    height:22px;
    border-radius:999px;
    background:rgba(148,163,184,.13);
    overflow:hidden;
}

.html-bar-track span{
    display:block;
    height:100%;
    min-width:4px;
    border-radius:999px;
    background:var(--gold);
}

.html-bar-value{
    font-size:14px;
    font-weight:900;
    color:var(--heading);
    text-align:left;
}

/* balanced two-column widgets */
.service-balanced-row > .panel{
    min-height:360px!important;
}

.service-balanced-row .table-wrap{
    max-height:292px!important;
    overflow:auto!important;
}

.service-balanced-row .smart-table{
    table-layout:auto!important;
    width:100%;
}

.service-balanced-row .smart-table th:first-child,
.service-balanced-row .smart-table td:first-child{
    width:auto!important;
    max-width:none!important;
    white-space:normal!important;
}

.service-balanced-row .smart-table th:last-child,
.service-balanced-row .smart-table td:last-child{
    width:112px!important;
    text-align:right!important;
}

/* Donut */
.donut-chart-wrap{
    width:100%;
    min-height:360px;
    display:flex;
    align-items:center;
    justify-content:center;
}

.donut-chart{
    width:100%;
    height:360px;
    display:block;
}

/* Service panels */
.service-panel h2{
    font-size:clamp(28px,2.45vw,40px)!important;
    margin-bottom:24px!important;
    color:var(--heading);
}

.service-panel{
    overflow:hidden;
}

.service-panel .table-wrap{
    border-radius:20px;
}

.service-state-chart .bar-chart{
    min-width:1100px!important;
}

/* Real maps stay one under another and large */
.service-map-panel{
    min-height:720px;
}

.real-map-card{
    min-height:650px!important;
    width:100%;
}

.leaflet-service-map{
    height:650px!important;
    min-height:650px!important;
}

.leaflet-service-map .leaflet-popup-content{
    color:#111827;
}

/* Fahrer */
.service-driver-panel{
    min-height:520px;
}

.service-driver-panel .driver-period-table{
    max-height:640px;
    overflow:auto;
}

.service-driver-panel .driver-period-table table{
    min-width:900px!important;
    width:100%;
}

.service-driver-panel .driver-period-table th:first-child,
.service-driver-panel .driver-period-table td:first-child{
    min-width:210px!important;
    width:230px!important;
}

.service-driver-panel .driver-period-table th:not(:first-child),
.service-driver-panel .driver-period-table td:not(:first-child){
    min-width:74px!important;
    padding-left:10px!important;
    padding-right:10px!important;
    text-align:right!important;
}

@media(max-width:900px){
    .html-bar-row{
        grid-template-columns:70px minmax(0,1fr) 54px;
        gap:10px;
    }

    .html-bar-label,
    .html-bar-value{
        font-size:12px;
    }

    .service-balanced-row{
        grid-template-columns:1fr!important;
    }

    .real-map-card,
    .leaflet-service-map{
        min-height:540px!important;
        height:540px!important;
    }
}


/* V6.1 final polish */

/* Privat/Mitglieder KPI wording bold like other widgets, values sized like KPI numbers */
.kpi-split-widget.no-kpi-title .mini-split-table div{
    min-height:58px;
    padding:12px 14px;
}

.kpi-split-widget.no-kpi-title .mini-split-table span{
    font-weight:900!important;
    color:var(--heading)!important;
    font-size:13px!important;
    letter-spacing:.08em!important;
}

.kpi-split-widget.no-kpi-title .mini-split-table b{
    font-size:30px!important;
    line-height:1!important;
    font-weight:500!important;
    color:var(--heading)!important;
}

/* Bundesländer uses the same readable design as Altersstruktur */
.service-state-chart .html-bar-list{
    padding:8px 10px 6px!important;
}

.service-state-chart .html-bar-row{
    grid-template-columns:190px minmax(0,1fr) 76px!important;
}

.service-state-chart .html-bar-label{
    font-size:14px!important;
    font-weight:800!important;
}

/* Leaflet bubbles with visible count labels */
.city-bubble-marker{
    background:transparent!important;
    border:none!important;
}

.city-bubble-marker .bubble-count{
    width:var(--bubble-size,34px);
    height:var(--bubble-size,34px);
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(245,158,11,.78);
    border:2px solid #fff;
    color:#111827;
    font-weight:900;
    font-size:12px;
    box-shadow:0 8px 22px rgba(0,0,0,.22);
}

.city-bubble-marker .bubble-label{
    position:absolute;
    left:50%;
    top:calc(var(--bubble-size,34px) + 2px);
    transform:translateX(-50%);
    white-space:nowrap;
    color:#111827;
    font-weight:800;
    font-size:10px;
    text-shadow:0 1px 2px #fff, 0 -1px 2px #fff, 1px 0 2px #fff, -1px 0 2px #fff;
}

/* Fahrer: uniform gaps + total row */
.service-driver-panel .driver-period-table{
    max-height:680px!important;
}

.service-driver-panel .driver-table{
    table-layout:fixed!important;
    min-width:980px!important;
    width:100%!important;
}

.service-driver-panel .driver-table th:first-child,
.service-driver-panel .driver-table td:first-child{
    width:240px!important;
    min-width:240px!important;
    max-width:240px!important;
    text-align:left!important;
    white-space:normal!important;
}

.service-driver-panel .driver-table th:not(:first-child),
.service-driver-panel .driver-table td:not(:first-child){
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    text-align:right!important;
    padding-left:12px!important;
    padding-right:12px!important;
}

.driver-total-row td{
    position:sticky;
    bottom:0;
    background:color-mix(in srgb,var(--bg) 92%,var(--gold) 8%)!important;
    border-top:2px solid var(--gold)!important;
    font-weight:900!important;
    z-index:2;
}

.driver-total-row strong{
    color:var(--heading)!important;
}


/* V6.2 final map/state corrections */
.service-state-chart .html-bar-row{
    grid-template-columns:180px minmax(0,1fr) 76px!important;
}

.service-state-chart .html-bar-label{
    white-space:normal!important;
    line-height:1.25!important;
}

/* Zielort/Zielflughafen switch exactly like ZSU switch */
.map-switch{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    gap:10px!important;
    margin:0 auto 18px!important;
}

.map-switch button{
    min-width:150px!important;
    text-align:center!important;
    padding:13px 22px!important;
    border-radius:999px!important;
    border:1px solid var(--line)!important;
    background:rgba(255,255,255,.04)!important;
    color:var(--text)!important;
    font-weight:800!important;
    letter-spacing:.03em!important;
    box-shadow:none!important;
}

.map-switch button:hover,
.map-switch button:focus{
    background:var(--gold)!important;
    border-color:var(--gold)!important;
    color:#111827!important;
}

.city-bubble-marker .bubble-count{
    background:rgba(245,158,11,.78)!important;
    border:2px solid #fff!important;
    color:#111827!important;
}

.city-bubble-marker .bubble-label{
    color:#111827!important;
    text-shadow:0 1px 2px #fff,0 -1px 2px #fff,1px 0 2px #fff,-1px 0 2px #fff!important;
}


/* V6.4 analyst fix: matrix table for Bestattungsfirma + Fahrer */
.matrix-period-table,
.driver-period-table{
    max-height:680px!important;
    overflow:auto!important;
}

.matrix-table,
.driver-table{
    table-layout:fixed!important;
    min-width:980px!important;
    width:100%!important;
}

.matrix-table th:first-child,
.matrix-table td:first-child,
.driver-table th:first-child,
.driver-table td:first-child{
    width:260px!important;
    min-width:260px!important;
    max-width:260px!important;
    text-align:left!important;
    white-space:normal!important;
}

.matrix-table th:not(:first-child),
.matrix-table td:not(:first-child),
.driver-table th:not(:first-child),
.driver-table td:not(:first-child){
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    text-align:right!important;
    padding-left:12px!important;
    padding-right:12px!important;
}

.matrix-total-row td,
.driver-total-row td{
    position:sticky;
    bottom:0;
    background:color-mix(in srgb,var(--bg) 92%,var(--gold) 8%)!important;
    border-top:2px solid var(--gold)!important;
    font-weight:900!important;
    z-index:2;
}

.matrix-total-row strong,
.driver-total-row strong{
    color:var(--heading)!important;
}


/* V6.5 table layout polish */

/* Bestattungsfirma gets its own full-width row like Fahrer */
.service-funeral-panel{
    min-height:520px;
}

.service-funeral-panel .matrix-period-table{
    max-height:640px!important;
    overflow:auto!important;
}

.service-funeral-panel .matrix-table{
    table-layout:fixed!important;
    min-width:980px!important;
    width:100%!important;
}

.service-funeral-panel .matrix-table th:first-child,
.service-funeral-panel .matrix-table td:first-child{
    width:260px!important;
    min-width:260px!important;
    max-width:260px!important;
    text-align:left!important;
    white-space:normal!important;
}

.service-funeral-panel .matrix-table th:not(:first-child),
.service-funeral-panel .matrix-table td:not(:first-child){
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    text-align:right!important;
    padding-left:12px!important;
    padding-right:12px!important;
}

/* Ziel Land table under Bundesländer, same clean table style */
.service-country-panel{
    min-height:360px;
}

.service-country-panel .table-wrap{
    max-height:420px!important;
    overflow:auto!important;
    border-radius:20px!important;
}

.service-country-panel .smart-table{
    width:100%!important;
    table-layout:auto!important;
}

.service-country-panel .smart-table th:first-child,
.service-country-panel .smart-table td:first-child{
    width:auto!important;
    text-align:left!important;
    white-space:normal!important;
}

.service-country-panel .smart-table th:last-child,
.service-country-panel .smart-table td:last-child{
    width:140px!important;
    text-align:right!important;
}


/* V6.6 Ziel Land matrix table */
.service-country-panel{
    min-height:520px!important;
}

.service-country-panel .matrix-period-table{
    max-height:640px!important;
    overflow:auto!important;
}

.service-country-panel .matrix-table{
    table-layout:fixed!important;
    min-width:980px!important;
    width:100%!important;
}

.service-country-panel .matrix-table th:first-child,
.service-country-panel .matrix-table td:first-child{
    width:260px!important;
    min-width:260px!important;
    max-width:260px!important;
    text-align:left!important;
    white-space:normal!important;
}

.service-country-panel .matrix-table th:not(:first-child),
.service-country-panel .matrix-table td:not(:first-child){
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    text-align:right!important;
    padding-left:12px!important;
    padding-right:12px!important;
}

.service-country-panel .matrix-total-row td{
    position:sticky;
    bottom:0;
    background:color-mix(in srgb,var(--bg) 92%,var(--gold) 8%)!important;
    border-top:2px solid var(--gold)!important;
    font-weight:900!important;
    z-index:2;
}


/* V6.8 Zeitraum-Tabellen ohne horizontales Schieben
   Betrifft Fahrer, Bestattungsfirma und Ziel Land Matrix-Tabellen.
   Ziel: volle Breite nutzen, keine horizontale Scrollbar. */
.driver-period-table,
.matrix-period-table,
.service-driver-panel .driver-period-table,
.service-funeral-panel .matrix-period-table,
.service-country-panel .matrix-period-table{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
}

.driver-period-table table,
.matrix-period-table table,
.service-driver-panel .driver-table,
.service-funeral-panel .matrix-table,
.service-country-panel .matrix-table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-collapse:separate!important;
}

/* Erste Spalte kompakt, aber lesbar. Rest verteilt sich automatisch gleichmäßig. */
.driver-period-table th:first-child,
.driver-period-table td:first-child,
.matrix-period-table th:first-child,
.matrix-period-table td:first-child,
.service-driver-panel .driver-table th:first-child,
.service-driver-panel .driver-table td:first-child,
.service-funeral-panel .matrix-table th:first-child,
.service-funeral-panel .matrix-table td:first-child,
.service-country-panel .matrix-table th:first-child,
.service-country-panel .matrix-table td:first-child{
    width:22%!important;
    min-width:0!important;
    max-width:none!important;
    text-align:left!important;
    white-space:normal!important;
    word-break:break-word!important;
    overflow-wrap:anywhere!important;
    padding-left:10px!important;
    padding-right:10px!important;
}

/* Zeitraumsspalten werden bewusst schmaler, damit alles auf die Karte passt. */
.driver-period-table th:not(:first-child),
.driver-period-table td:not(:first-child),
.matrix-period-table th:not(:first-child),
.matrix-period-table td:not(:first-child),
.service-driver-panel .driver-table th:not(:first-child),
.service-driver-panel .driver-table td:not(:first-child),
.service-funeral-panel .matrix-table th:not(:first-child),
.service-funeral-panel .matrix-table td:not(:first-child),
.service-country-panel .matrix-table th:not(:first-child),
.service-country-panel .matrix-table td:not(:first-child){
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    text-align:center!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:clip!important;
    padding-left:5px!important;
    padding-right:5px!important;
}

/* Schrift bewusst kompakter für Zeitraumstabellen. */
.driver-period-table th,
.driver-period-table td,
.matrix-period-table th,
.matrix-period-table td{
    font-size:clamp(9px, .72vw, 12px)!important;
    line-height:1.2!important;
    padding-top:9px!important;
    padding-bottom:9px!important;
}

/* Kopfzeile darf umbrechen, z.B. 2026-Q1 oder lange Monatslabels. */
.driver-period-table th,
.matrix-period-table th{
    word-break:break-word!important;
    overflow-wrap:anywhere!important;
}

/* Gesamtspalte visuell stabil, aber ohne feste Breite. */
.driver-period-table th:last-child,
.driver-period-table td:last-child,
.matrix-period-table th:last-child,
.matrix-period-table td:last-child{
    font-weight:850!important;
    color:var(--heading)!important;
}

/* Gesamtzeile bleibt sichtbar und passt in die Breite. */
.driver-total-row td,
.matrix-total-row td{
    position:sticky;
    bottom:0;
    background:color-mix(in srgb,var(--bg) 92%,var(--gold) 8%)!important;
    border-top:2px solid var(--gold)!important;
    z-index:2;
}

/* Bei sehr schmalen Displays noch kompakter, trotzdem ohne horizontales Schieben. */
@media(max-width:900px){
    .driver-period-table th:first-child,
    .driver-period-table td:first-child,
    .matrix-period-table th:first-child,
    .matrix-period-table td:first-child{
        width:26%!important;
    }

    .driver-period-table th,
    .driver-period-table td,
    .matrix-period-table th,
    .matrix-period-table td{
        font-size:9px!important;
        padding-left:3px!important;
        padding-right:3px!important;
    }
}


/* V7.0 Handel Kundengruppe + Lieferort map + Dienstleistung AI */
.service-ai-panel p{
    line-height:1.7;
    margin-bottom:14px;
}

.service-ai-panel strong{
    color:var(--heading);
}

.service-ai-panel h3{
    color:var(--heading);
    margin-top:18px;
}

.service-map-panel .real-map-card{
    min-height:620px;
}

.service-map-panel .leaflet-service-map{
    min-height:620px;
    height:620px;
}


/* V7.3.1 stable admin cleanup */
.grid.one{
    display:grid;
    grid-template-columns:1fr;
}
.admin-control-card{
    min-height:180px!important;
}
.admin-control-grid .card{
    min-height:180px!important;
}

.auth-logo{display:block;max-width:320px;width:100%;height:auto;margin:0 auto 18px auto}.login-panel{text-align:center}.login-panel form{text-align:left}


/* V733_FINAL_UX_PERFORMANCE */
.table-widget-grid .panel,
.top-list-sized{
    min-height:420px;
}
.table-widget-grid .table-wrap,
.top-list-sized .table-wrap{
    max-height:340px;
    overflow:auto;
}
.chart-scroll{
    width:100%;
    max-width:100%;
    overflow-x:auto!important;
    overflow-y:hidden;
    padding-bottom:12px;
}
.chart-scroll canvas{
    display:block;
    min-height:300px;
}
.chart-point-tip{
    position:fixed;
    z-index:99999;
    max-width:260px;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:16px;
    background:color-mix(in srgb,var(--header) 92%,#000 8%);
    color:var(--text);
    box-shadow:0 18px 50px rgba(0,0,0,.35);
    font-size:13px;
    pointer-events:none;
}
.admin-stat-grid .widget{
    min-height:150px;
}
@media(max-width:760px){
    .container{padding-left:12px!important;padding-right:12px!important;}
    .hero{padding:20px!important;}
    .filterbar-pro .filter-row,
    .grid.two,
    .grid.three,
    .grid.four,
    .table-widget-grid{
        grid-template-columns:1fr!important;
    }
    .topbar-inner{
        grid-template-columns:1fr!important;
        gap:12px!important;
    }
    .center-nav,.nav-actions{
        overflow-x:auto;
        justify-content:flex-start!important;
        width:100%;
        gap:14px!important;
        padding-bottom:4px;
    }
    .widget,.panel,.card{border-radius:20px!important;}
    .smart-table{font-size:13px;}
    .table-wrap{overflow:auto;}
}


/* V733_ABMAHNUNG2_RECOVERY */
.widget-heading-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin:0 0 10px;
}
.widget-heading-row h2{
    margin:0!important;
}
.mini-switch-form.inline{
    margin:0!important;
    justify-content:flex-end;
}
.mini-switch-form.inline label{
    flex-direction:row!important;
    align-items:center!important;
    white-space:nowrap;
}
.mini-switch-form.inline select{
    min-width:160px;
    height:38px;
}
.state-funeral-breakdown{
    max-height:560px;
    overflow:auto;
}
.state-funeral-breakdown .smart-table{
    min-width:980px;
}
@media(max-width:760px){
    .widget-heading-row{
        flex-direction:column;
        align-items:flex-start;
    }
    .mini-switch-form.inline,
    .mini-switch-form.inline label,
    .mini-switch-form.inline select{
        width:100%;
    }
}


/* FINAL_CHAPTER_CSS */
.sarimont-logo{display:inline-flex;align-items:center;gap:14px;color:var(--gold,#c8a96b);font-weight:900;letter-spacing:.08em;text-decoration:none;line-height:1}
.sarimont-logo svg{width:72px;height:48px;display:block;overflow:visible}.sarimont-logo .logo-mountain{fill:none;stroke:currentColor;stroke-width:5.5;stroke-linejoin:round;stroke-linecap:round}.sarimont-logo .logo-snow{fill:currentColor;opacity:.88}.sarimont-logo .logo-word{font-size:20px;color:currentColor}.nav-logo svg{width:58px;height:38px}.nav-logo .logo-word{font-size:16px}.auth-logo-inline{justify-content:center;display:flex;margin:0 auto 24px;color:var(--gold,#c8a96b)}.auth-logo-inline svg{width:110px;height:70px}.auth-logo-inline .logo-word{font-size:32px}
.login-body{min-height:100vh;background:radial-gradient(circle at top,#ffffff 0,#f5efe4 38%,#e9ddc7 100%);display:flex;align-items:center}.login-card-final{background:rgba(255,255,255,.86)!important;border:1px solid rgba(200,169,107,.45)!important;box-shadow:0 30px 90px rgba(17,24,39,.14);backdrop-filter:blur(18px);color:#111827}.login-card-final label{color:#111827}.login-card-final input{background:#fff!important;color:#111827!important;border-color:#d8c7a3!important}.login-card-final button{width:100%;justify-content:center}.login-subtitle{text-align:center;color:#6b5b3e;margin:-8px 0 22px}.dashboard-card-grid{align-items:stretch}.dashboard-card-grid .card{min-height:210px;height:100%;display:flex;flex-direction:column;justify-content:center}.table-export-btn{float:right;margin:0 0 8px 8px;padding:7px 12px;border-radius:999px;border:1px solid var(--line);background:var(--header);color:var(--text);font-size:12px;font-weight:800;cursor:pointer}.table-export-btn:hover{border-color:var(--gold);color:var(--gold)}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:10px 0}.permission-grid label{display:flex;align-items:center;gap:8px;min-height:auto}.report-deck .slide{min-height:720px;page-break-after:always;break-after:page;display:flex;flex-direction:column}.report-deck .slide.compact{min-height:520px}.report-cover{min-height:760px!important;justify-content:center;position:relative;overflow:hidden}.report-cover:before{content:"";position:absolute;inset:-120px -80px auto auto;width:420px;height:420px;border-radius:50%;background:color-mix(in srgb,var(--gold) 30%,transparent);filter:blur(10px)}.report-section-number{font-size:52px;font-weight:200;color:var(--gold);opacity:.7}.toc-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:24px}.toc-list div{border:1px solid var(--line);border-radius:18px;padding:16px;background:#fff}.report-narrative{font-size:17px;line-height:1.75}.report-footer{margin-top:auto;font-size:11px;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}@media(max-width:900px){.permission-grid,.toc-list,.dashboard-card-grid{grid-template-columns:1fr!important}.auth-logo-inline .logo-word{font-size:26px}.auth-logo-inline svg{width:92px}}


/* FINAL_POLISH_EXPORT_LOGO_LOGIN_REPORT */
.export-host{
    position:relative!important;
}
.table-export-btn{
    position:absolute!important;
    top:14px!important;
    right:14px!important;
    z-index:20!important;
    float:none!important;
    width:34px!important;
    height:34px!important;
    padding:0!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:999px!important;
    border:1px solid color-mix(in srgb,var(--gold) 42%,var(--line))!important;
    background:color-mix(in srgb,var(--header) 88%,transparent)!important;
    color:var(--gold)!important;
    box-shadow:0 10px 24px rgba(0,0,0,.08)!important;
    opacity:.66!important;
    backdrop-filter:blur(10px);
    transition:.18s ease;
}
.table-export-btn:hover{
    opacity:1!important;
    transform:translateY(-1px);
    border-color:var(--gold)!important;
    box-shadow:0 14px 32px rgba(0,0,0,.14)!important;
}
.table-export-btn svg{
    width:17px;
    height:17px;
}
.table-export-btn::after{
    content:none!important;
}

/* filigranes SARIMONT Logo */
.sarimont-logo{
    display:inline-flex;
    align-items:center;
    gap:12px;
    color:var(--gold);
}
.sarimont-logo svg{
    width:104px;
    height:auto;
    overflow:visible;
}
.sarimont-logo .logo-mountain-line,
.sarimont-logo .logo-mountain-base,
.sarimont-logo .logo-snow-line{
    fill:none;
    stroke:var(--gold);
    stroke-linecap:round;
    stroke-linejoin:round;
}
.sarimont-logo .logo-mountain-line{stroke-width:2.6}
.sarimont-logo .logo-mountain-base{stroke-width:1.4;opacity:.55}
.sarimont-logo .logo-snow-line{stroke-width:1.7;opacity:.82}
.sarimont-logo .logo-dot{fill:var(--gold);opacity:.92}
.sarimont-logo .logo-word{
    color:var(--gold);
    font-weight:500!important;
    letter-spacing:.22em!important;
    font-size:19px!important;
    line-height:1;
}
.nav-logo svg{width:88px}
.nav-logo .logo-word{font-size:15px!important;letter-spacing:.2em!important}

/* Login: symmetrisch, hell, hochwertig */
.login-body{
    min-height:100vh!important;
    display:grid!important;
    place-items:center!important;
    background:
        radial-gradient(circle at 20% 15%, color-mix(in srgb,var(--gold) 18%,transparent) 0 18%, transparent 34%),
        radial-gradient(circle at 84% 78%, rgba(15,23,42,.08) 0 20%, transparent 42%),
        linear-gradient(135deg,#fffaf1 0%,#f6efe3 44%,#ece0cc 100%)!important;
    padding:24px;
}
.login-body .container{
    width:100%;
    max-width:620px!important;
    padding:0!important;
}
.login-card-final{
    max-width:560px!important;
    margin:0 auto!important;
    padding:44px 46px!important;
    background:rgba(255,255,255,.9)!important;
    border:1px solid rgba(200,169,107,.38)!important;
    box-shadow:0 34px 100px rgba(17,24,39,.16)!important;
    border-radius:34px!important;
}
.login-card-final .auth-logo-inline{
    width:100%;
    justify-content:center;
    flex-direction:column;
    gap:8px;
    margin-bottom:14px;
}
.login-card-final .auth-logo-inline svg{
    width:132px!important;
}
.login-card-final .auth-logo-inline .logo-word{
    font-size:25px!important;
    letter-spacing:.24em!important;
}
.login-subtitle{
    text-align:center!important;
    color:#756443!important;
    margin:0 0 28px!important;
    font-size:14px;
    letter-spacing:.08em;
}
.login-card-final form{
    display:grid;
    gap:14px;
}
.login-card-final label{
    color:#263241!important;
    font-weight:650;
}
.login-card-final input{
    height:48px;
    border-radius:16px!important;
}
.login-card-final button{
    height:50px;
    border-radius:16px!important;
    margin-top:4px;
}

/* PDF/Print report polish support */
.report-deck .slide{
    color:#111827!important;
}
.report-deck .card,
.report-deck .kpi,
.report-deck .toc div{
    background:rgba(255,255,255,.96)!important;
}
.report-deck .footer{
    color:#64748b!important;
}

@media(max-width:760px){
    .table-export-btn{top:10px!important;right:10px!important}
    .login-card-final{padding:34px 24px!important;border-radius:28px!important}
    .login-card-final .auth-logo-inline svg{width:112px!important}
}


/* FINAL_DOWNLOAD_POLISH_V2 */
.export-host{position:relative!important}
.widget-download-btn{
    right:14px!important;
}
.widget-data-download{
    right:54px!important;
}
.widget-download-btn,
.widget-data-download{
    top:14px!important;
    position:absolute!important;
    width:34px!important;
    height:34px!important;
}
.widget-data-download{
    color:color-mix(in srgb,var(--gold) 72%,var(--text))!important;
    opacity:.58!important;
}
.widget-data-download:hover{
    opacity:1!important;
}
.real-map-card > .table-export-btn:not(.widget-download-btn):not(.widget-data-download),
.chart-scroll > .table-export-btn:not(.widget-download-btn):not(.widget-data-download){
    display:none!important;
}


/* FUNCTION_REPAIR_DOWNLOAD_BUTTONS */
.panel.export-host > .widget-download-btn,
.card.export-host > .widget-download-btn,
section.export-host > .widget-download-btn,
article.export-host > .widget-download-btn{
    display:inline-flex!important;
    top:14px!important;
    right:14px!important;
}
.panel.export-host > .widget-data-download,
.card.export-host > .widget-data-download,
section.export-host > .widget-data-download,
article.export-host > .widget-data-download{
    display:inline-flex!important;
    top:14px!important;
    right:54px!important;
}


/* COMPLAINT_STANDALONE_V1 */
.grid.six{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}
.complaint-kpi-grid .widget{min-height:112px}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-weight:800;font-size:12px;background:rgba(148,163,184,.16)}
.status-pill.critical,.complaint-row-critical{background:rgba(239,68,68,.18)!important}
.status-pill.serious,.complaint-row-serious{background:rgba(249,115,22,.18)!important}
.status-pill.complaint,.complaint-row-complaint{background:rgba(234,179,8,.18)!important}
.status-pill.closed,.complaint-row-closed{background:rgba(34,197,94,.18)!important}
.status-pill.praise,.complaint-row-praise{background:rgba(59,130,246,.18)!important}
.status-pill.not_reached,.complaint-row-not_reached{background:rgba(168,85,247,.18)!important}
.status-critical{border-color:rgba(239,68,68,.35)!important}
.status-serious{border-color:rgba(249,115,22,.35)!important}
.status-complaint{border-color:rgba(234,179,8,.35)!important}
.status-closed{border-color:rgba(34,197,94,.35)!important}
.status-praise{border-color:rgba(59,130,246,.35)!important}
.complaint-table tbody tr[data-toggle-row]{cursor:pointer}
.complaint-details-row{display:none}
.complaint-details-row.open{display:table-row}
.complaint-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:12px}
.btn.small{padding:7px 11px;font-size:12px;border-radius:12px}
.complaint-case-grid{align-items:start}
.raw-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.raw-field-grid div{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(148,163,184,.06)}
.raw-field-grid span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800;margin-bottom:5px}
.raw-field-grid b{font-size:13px;font-weight:650;word-break:break-word;color:var(--text)}
.case-form{display:grid;gap:12px}
.case-form textarea{min-height:70px}
.case-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.attachment-list,.event-list{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.attachment-list li,.event-list li{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(148,163,184,.06)}
.attachment-list span,.event-list span{color:var(--muted);font-size:12px}
@media(max-width:980px){.grid.six{grid-template-columns:repeat(2,minmax(0,1fr))}.raw-field-grid{grid-template-columns:1fr}}
@media(max-width:640px){.grid.six{grid-template-columns:1fr}}


/* COMPLAINT_STANDALONE_V4_DESIGN */
.complaint-page .hero{margin-bottom:18px}
.complaint-view-switch{
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    margin:18px auto 18px!important;
    width:max-content!important;
    max-width:100%;
    padding:6px!important;
    border-radius:999px!important;
}
.complaint-view-switch a{
    min-width:116px;
    text-align:center;
    justify-content:center;
}
.complaint-filterbar{
    margin-top:0!important;
}
.complaint-filterbar .data-stock-line{
    width:100%;
}
.complaint-filterbar .filter-row.main{
    align-items:end;
}
.complaint-kpi-grid.kpi-grid{
    grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
}
.complaint-kpi-grid.kpi-grid .widget{
    min-height:176px;
}
.complaint-kpi-grid.kpi-grid .widget h2{
    font-size:clamp(30px,3.2vw,56px);
    line-height:1;
    margin:8px 0;
}
.complaint-kpi-grid.kpi-grid .widget p{
    color:var(--muted);
    margin:0;
}
.complaint-kpi-panels .panel{
    min-height:260px;
}
.complaint-data-panel{
    overflow:hidden;
}
.complaint-table-scroll{
    width:100%;
    overflow:auto;
    max-height:72vh;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.02);
}
.full-raw-table{
    table-layout:auto!important;
    min-width:1900px;
    border-collapse:separate;
    border-spacing:0;
}
.full-raw-table th,
.full-raw-table td{
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    max-width:260px;
    overflow:hidden;
    text-overflow:ellipsis;
    vertical-align:middle;
    font-size:12px;
}
.full-raw-table th{
    position:sticky;
    top:0;
    z-index:3;
    background:var(--panel);
    border-bottom:1px solid var(--line);
}
.full-raw-table .action-col{
    position:sticky;
    left:0;
    z-index:4;
    background:var(--panel);
    min-width:124px;
    max-width:142px;
}
.full-raw-table td.action-col{
    background:color-mix(in srgb,var(--panel) 92%,var(--gold) 8%);
}
.full-raw-table th:nth-child(2),
.full-raw-table td:nth-child(2){min-width:150px}
.full-raw-table th:nth-child(3),
.full-raw-table td:nth-child(3){min-width:130px}
.full-raw-table th:nth-child(4),
.full-raw-table td:nth-child(4){min-width:120px}
.full-raw-table th:nth-child(5),
.full-raw-table td:nth-child(5){min-width:140px}
.full-raw-table th:nth-child(6),
.full-raw-table td:nth-child(6){min-width:150px}
.full-raw-table th:nth-child(7),
.full-raw-table td:nth-child(7){min-width:105px;text-align:center}
.full-raw-table th:nth-child(8),
.full-raw-table td:nth-child(8){min-width:110px}
.full-raw-table th:nth-child(n+15),
.full-raw-table td:nth-child(n+15){min-width:150px}
.full-raw-table tr:hover td{
    background:rgba(148,163,184,.08);
}
.full-raw-table tr:hover td.action-col{
    background:color-mix(in srgb,var(--panel) 84%,var(--gold) 16%);
}
.complaint-table .status-pill{
    white-space:nowrap;
}
@media(max-width:760px){
    .complaint-view-switch{width:100%!important}
    .complaint-view-switch a{flex:1;min-width:0}
    .full-raw-table{min-width:1500px}
}


/* COMPLAINT_STANDALONE_V5_FIX */
.full-raw-table th{
    white-space:normal!important;
    word-break:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.15;
    vertical-align:bottom;
    max-width:180px;
    min-height:52px;
    padding-top:10px;
    padding-bottom:10px;
}
.full-raw-table td{
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    max-width:220px;
    overflow:hidden;
    text-overflow:ellipsis;
}
.full-raw-table th:nth-child(n+15){
    min-width:132px;
    max-width:170px;
}
.full-raw-table td:nth-child(n+15){
    min-width:132px;
    max-width:220px;
}
.full-raw-table .action-col{
    min-width:118px!important;
    max-width:128px!important;
}
.full-raw-table th.action-col{
    white-space:normal!important;
}
.full-raw-table td.action-col{
    white-space:nowrap!important;
}
.complaint-filterbar .filter-actions a[href*="complaint_export_standalone"]{
    display:none!important;
}
.case-actions button[name="action"][value="reset_case"]{
    border-color:rgba(239,68,68,.45);
    color:var(--heading);
}


/* COMPLAINT_STANDALONE_V8_PERF */
.bmt-case-info{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin:0 0 14px;
}
.bmt-case-info div{
    border:1px solid var(--line);
    border-radius:14px;
    padding:10px;
    background:rgba(148,163,184,.06);
}
.bmt-case-info span{
    display:block;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.08em;
    color:var(--muted);
    font-weight:800;
    margin-bottom:5px;
}
.bmt-case-info b{
    font-size:13px;
    font-weight:700;
    color:var(--text);
    word-break:break-word;
}
.complaint-table-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    flex-wrap:wrap;
    margin-bottom:12px;
}
.complaint-table-head h2{
    margin:0;
}
.pagination-line{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    color:var(--muted);
    font-size:13px;
}
@media(max-width:720px){
    .bmt-case-info{grid-template-columns:1fr}
    .complaint-table-head{align-items:flex-start}
}


/* COMPLAINT_STANDALONE_V11_UI */
.case-form input,
.case-form select,
.case-form textarea{
    border-radius:16px!important;
    background:#fff!important;
    color:#0f172a!important;
    border:1px solid rgba(148,163,184,.45)!important;
}
.case-form input:disabled,
.case-form select:disabled,
.case-form textarea:disabled{
    background:#f8fafc!important;
    color:#64748b!important;
}
.case-form input:focus,
.case-form select:focus,
.case-form textarea:focus{
    outline:none!important;
    border-color:var(--gold)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 22%,transparent)!important;
}
.case-actions-v11{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    align-items:stretch!important;
    margin-top:6px;
}
.case-actions-v11 .case-action-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}
.case-actions-v11 .case-action-row > button,
.case-actions-v11 .case-action-row > .btn{
    min-height:42px;
    border-radius:14px!important;
    justify-content:center;
    text-align:center;
}
.case-actions-v11 .row-not-reached > button{
    width:100%;
}
.case-actions-v11 .row-main > .btn,
.case-actions-v11 .row-main > button{
    flex:1 1 180px;
}
.case-actions-v11 .row-export > .btn{
    width:100%;
}
.case-actions-v11 .row-admin{
    padding-top:8px;
    border-top:1px solid var(--line);
}
.case-actions-v11 .row-admin > button{
    flex:1 1 190px;
}
.case-actions-v11 button[name="action"][value="reset_case"]{
    border-color:rgba(239,68,68,.45)!important;
}
@media(max-width:640px){
    .case-actions-v11 .row-main > .btn,
    .case-actions-v11 .row-main > button,
    .case-actions-v11 .row-admin > button{
        flex-basis:100%;
    }
}


/* COMPLAINT_STANDALONE_V13_ATTACHMENTS_UI */
.attachment-upload-field{
    display:grid;
    gap:8px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:16px;
    background:rgba(148,163,184,.06);
}
.attachment-upload-field > span{
    font-weight:800;
    color:var(--heading);
}
.hidden-file-input{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
}
.file-upload-button{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    min-height:42px;
    width:max-content;
    padding:10px 16px!important;
    border-radius:14px!important;
    border:1px solid var(--line)!important;
    background:color-mix(in srgb,var(--gold) 16%,var(--panel))!important;
    color:var(--heading)!important;
    font-weight:800!important;
    cursor:pointer;
    box-shadow:var(--shadow-sm, none);
}
.file-upload-button:hover{
    background:color-mix(in srgb,var(--gold) 26%,var(--panel))!important;
}
.attachment-upload-field small{
    color:var(--muted);
    font-size:12px;
}
.case-actions-v11 .case-action-link{
    background:buttonface!important;
    color:buttontext!important;
    border:1px solid rgba(148,163,184,.55)!important;
    font:inherit!important;
    font-weight:800!important;
    text-decoration:none!important;
    box-shadow:none!important;
}
.case-actions-v11 .case-action-link:hover{
    filter:brightness(.98);
}
.case-actions-v11 .row-export .case-action-link{
    width:100%;
}
.attachment-list-v13 li{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}
.attachment-info{
    min-width:0;
    display:grid;
    gap:3px;
}
.attachment-info a{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.attachment-delete-form{
    margin:0;
    flex:0 0 auto;
}
.attachment-delete-btn{
    border-color:rgba(239,68,68,.45)!important;
    color:var(--heading)!important;
    min-height:34px;
}
@media(max-width:620px){
    .file-upload-button{width:100%}
    .attachment-list-v13 li{
        align-items:stretch;
        flex-direction:column;
    }
    .attachment-delete-form button{
        width:100%;
    }
}


/* COMPLAINT_STANDALONE_V14_KPI_FILTERS */
.period-matrix-wrap{
    width:100%;
    overflow:auto;
    max-height:360px;
}
.period-matrix{
    min-width:720px;
}
.period-matrix th{
    white-space:normal!important;
    line-height:1.15;
}
.period-matrix td{
    white-space:nowrap!important;
}
.period-matrix th:first-child,
.period-matrix td:first-child{
    position:sticky;
    left:0;
    z-index:2;
    background:var(--panel);
    min-width:220px;
    max-width:320px;
}
.complaint-filterbar .filter-actions{
    gap:10px;
}
.complaint-filterbar .filter-actions .btn{
    min-height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    font-weight:800;
}


/* COMPLAINT_STANDALONE_V15_STATUS_KPI */
.status-pill.complaint_closed,
.complaint-row-complaint_closed{
    background:rgba(34,197,94,.18)!important;
}
.status-pill.praise_closed,
.complaint-row-praise_closed{
    background:rgba(20,184,166,.20)!important;
}
.status-kpi-grid.kpi-grid{
    grid-template-columns:repeat(3,minmax(220px,1fr));
}
.complaint-kpi-pairs{
    display:grid;
    gap:18px;
}
.kpi-pair{
    display:grid;
    grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
    gap:18px;
    align-items:stretch;
}
.kpi-pair .panel{
    min-height:280px;
}
.kpi-visual-panel{
    overflow:hidden;
}
.kpi-visual-bars{
    display:grid;
    gap:12px;
}
.kpi-vbar{
    display:grid;
    gap:6px;
}
.kpi-vbar-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    font-size:13px;
    color:var(--text);
}
.kpi-vbar-head span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.kpi-vbar-head b{
    flex:0 0 auto;
}
.kpi-vbar-track{
    height:10px;
    border-radius:999px;
    background:rgba(148,163,184,.18);
    overflow:hidden;
}
.kpi-vbar-track i{
    display:block;
    height:100%;
    border-radius:999px;
    background:var(--gold);
}
.period-matrix th,
.period-matrix td{
    padding-left:10px!important;
    padding-right:10px!important;
}
.period-matrix th:first-child,
.period-matrix td:first-child{
    min-width:180px!important;
    max-width:260px!important;
}
.full-raw-table th,
.full-raw-table td{
    max-width:190px!important;
}
.full-raw-table th:nth-child(n+15),
.full-raw-table td:nth-child(n+15){
    min-width:118px!important;
    max-width:180px!important;
}
@media(max-width:1100px){
    .kpi-pair{
        grid-template-columns:1fr;
    }
    .status-kpi-grid.kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:680px){
    .status-kpi-grid.kpi-grid{
        grid-template-columns:1fr;
    }
}


/* COMPLAINT_STANDALONE_V16_LINECHARTS */
.status-pill.very_unhappy,
.complaint-row-very_unhappy{
    background:rgba(234,179,8,.20)!important;
}
.status-pill.unhappy,
.complaint-row-unhappy{
    background:rgba(250,204,21,.16)!important;
}
.status-pill.praise,
.complaint-row-praise{
    background:rgba(59,130,246,.18)!important;
}
.status-kpi-grid.kpi-grid{
    grid-template-columns:repeat(3,minmax(190px,1fr));
}
.status-kpi-grid .widget{
    min-height:150px!important;
}
.line-chart-wrap{
    width:100%;
    overflow:auto;
}
.line-chart-wrap svg{
    width:100%;
    min-width:560px;
    height:auto;
}
.line-chart-wrap .axis{
    stroke:rgba(148,163,184,.7);
    stroke-width:1.25;
}
.line-chart-wrap .gridline{
    stroke:rgba(148,163,184,.18);
    stroke-width:1;
}
.line-chart-wrap .axis-label{
    fill:var(--muted);
    font-size:11px;
}
.line-chart-legend{
    display:flex;
    flex-wrap:wrap;
    gap:8px 12px;
    margin-top:10px;
    font-size:12px;
    color:var(--text);
}
.line-chart-legend span{
    display:inline-flex;
    align-items:center;
    gap:6px;
    max-width:180px;
}
.line-chart-legend i{
    width:10px;
    height:10px;
    border-radius:999px;
    flex:0 0 auto;
}
.period-matrix th,
.period-matrix td{
    font-size:12px!important;
    padding:7px 8px!important;
}
.period-matrix th:first-child,
.period-matrix td:first-child{
    min-width:150px!important;
    max-width:220px!important;
}
.period-matrix td:first-child{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
@media(max-width:1120px){
    .status-kpi-grid.kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:680px){
    .status-kpi-grid.kpi-grid{
        grid-template-columns:1fr;
    }
}


/* COMPLAINT_STANDALONE_V18_KPI_LAYOUT */
.complaint-kpi-board{
    display:grid;
    gap:12px;
}
.complaint-kpi-board .kpi-row-label{
    font-size:12px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:var(--muted);
    margin-top:6px;
}
.complaint-kpi-board .kpi-row{
    display:grid;
    gap:14px;
}
.complaint-kpi-board .kpi-row.four{
    grid-template-columns:repeat(4,minmax(0,1fr));
}
.complaint-kpi-board .praise-row{
    grid-template-columns:repeat(2,minmax(240px,420px));
    justify-content:center;
}
.complaint-kpi-board .widget{
    min-height:128px!important;
    padding:18px!important;
}
.complaint-kpi-board .widget h2{
    font-size:clamp(28px,2.4vw,42px)!important;
    line-height:1;
    margin:6px 0!important;
}
.complaint-kpi-board .widget p{
    font-size:12px!important;
    margin:0!important;
}
.kpi-status-row{
    display:grid;
    grid-template-columns:1fr;
}
.kpi-status-row .panel{
    min-height:auto!important;
}
.complaint-kpi-pairs{
    display:grid;
    gap:18px;
}
.kpi-pair{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:18px;
    align-items:stretch;
}
.kpi-pair .panel{
    min-height:300px;
    width:100%;
}
.kpi-pair .panel h2,
.kpi-status-row .panel h2{
    padding-right:78px;
}
.period-matrix-wrap{
    max-height:340px!important;
    overflow:auto!important;
}
.period-matrix{
    min-width:620px!important;
    width:100%;
}
.period-matrix th,
.period-matrix td{
    font-size:11.5px!important;
    padding:6px 7px!important;
    text-align:right;
    vertical-align:middle;
}
.period-matrix th:first-child,
.period-matrix td:first-child{
    text-align:left!important;
    min-width:142px!important;
    max-width:210px!important;
    position:sticky;
    left:0;
    z-index:2;
    background:var(--panel);
}
.period-matrix thead th{
    position:sticky;
    top:0;
    z-index:3;
    background:var(--panel);
}
.period-matrix tfoot td{
    position:sticky;
    bottom:0;
    z-index:3;
    background:color-mix(in srgb,var(--panel) 88%,var(--gold) 12%);
    border-top:1px solid var(--line);
}
.period-matrix tfoot td:first-child{
    z-index:4;
}
.line-chart-wrap{
    width:100%;
    overflow:auto;
}
.line-chart-wrap svg{
    width:100%;
    min-width:520px;
    max-height:320px;
}
.kpi-visual-panel{
    overflow:hidden;
}
.kpi-visual-panel .line-chart-legend{
    max-height:78px;
    overflow:auto;
}
.kpi-status-row .service-panel .smart-table{
    width:100%;
}
.kpi-status-row .service-panel td:first-child{
    text-align:left;
}
.kpi-status-row .service-panel td:last-child{
    text-align:right;
    width:120px;
}
@media(max-width:1180px){
    .complaint-kpi-board .kpi-row.four{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .kpi-pair{
        grid-template-columns:1fr!important;
    }
}
@media(max-width:680px){
    .complaint-kpi-board .kpi-row.four,
    .complaint-kpi-board .praise-row{
        grid-template-columns:1fr;
    }
}


/* COMPLAINT_STANDALONE_V19_EMAIL_SYSTEM */
.case-email-panel{
    position:relative;
}
.case-email-form{
    display:grid;
    gap:12px;
}
.case-email-form input,
.case-email-form textarea{
    border-radius:16px!important;
    background:#fff!important;
    color:#0f172a!important;
    border:1px solid rgba(148,163,184,.45)!important;
}
.case-email-form textarea{
    min-height:260px;
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
    line-height:1.45;
}
.case-email-form input:focus,
.case-email-form textarea:focus{
    outline:none!important;
    border-color:var(--gold)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 22%,transparent)!important;
}
.case-email-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}
.case-email-actions button,
.case-email-actions .btn{
    min-height:44px;
    border-radius:14px!important;
    justify-content:center;
    text-align:center;
    font-weight:800;
}
.alert.success{
    border-color:rgba(34,197,94,.45)!important;
    background:rgba(34,197,94,.12)!important;
}
@media(max-width:720px){
    .case-email-actions{
        grid-template-columns:1fr;
    }
}


/* COMPLAINT_STANDALONE_V20_EMAIL_POPUP */
.case-email-open-btn{
    width:100%;
    min-height:44px;
    border-radius:14px!important;
    font-weight:800!important;
}
.case-email-modal{
    position:fixed;
    inset:0;
    z-index:9999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:22px;
}
.case-email-modal.open{
    display:flex;
}
.case-email-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.56);
    backdrop-filter:blur(8px);
}
.case-email-dialog{
    position:relative;
    width:min(980px,100%);
    max-height:92vh;
    overflow:auto;
    border:1px solid color-mix(in srgb,var(--gold) 30%,var(--line));
    border-radius:28px;
    background:var(--panel);
    box-shadow:0 30px 90px rgba(0,0,0,.35);
    padding:22px;
}
.case-email-dialog-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    margin-bottom:10px;
}
.case-email-dialog-head h2{
    margin:0;
}
.case-email-close{
    width:42px;
    height:42px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
    line-height:1;
    padding:0;
}
.case-email-form{
    display:grid;
    gap:12px;
    margin-top:14px;
}
.case-email-form input,
.case-email-form textarea{
    border-radius:16px!important;
    background:#fff!important;
    color:#0f172a!important;
    border:1px solid rgba(148,163,184,.45)!important;
}
.case-email-form textarea{
    min-height:310px;
    font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
    line-height:1.45;
}
.case-email-form input:focus,
.case-email-form textarea:focus{
    outline:none!important;
    border-color:var(--gold)!important;
    box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 22%,transparent)!important;
}
.case-email-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}
.case-email-actions button,
.case-email-actions .btn{
    min-height:44px;
    border-radius:14px!important;
    justify-content:center;
    text-align:center;
    font-weight:800;
}
.alert.success{
    border-color:rgba(34,197,94,.45)!important;
    background:rgba(34,197,94,.12)!important;
}
@media(max-width:720px){
    .case-email-modal{padding:10px}
    .case-email-dialog{border-radius:20px;padding:16px}
    .case-email-actions{grid-template-columns:1fr}
}
