/* Central DWH polish for board-ready presentation. */
:root {
    --dwh-primary: #8B4049;
    --dwh-primary-2: #0f6f86;
    --dwh-primary-soft: #f7ecee;
    --dwh-ink: #17202a;
    --dwh-muted: #64748b;
    --dwh-border: #d9e2ec;
    --dwh-surface: #ffffff;
    --dwh-page: #f3f6fa;
    --dwh-good: #0f8a5f;
    --dwh-warn: #b7791f;
    --dwh-danger: #b91c1c;
    --dwh-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}

html {
    letter-spacing: 0 !important;
}

body,
body.dark-mode,
body.dark,
body.light-mode,
body.st-force-light {
    background: var(--dwh-page) !important;
    color: var(--dwh-ink) !important;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
}

.header,
.topbar,
.page-header {
    background: linear-gradient(135deg, #6f2934 0%, #8B4049 48%, #0f6f86 100%) !important;
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, .16) !important;
}

body.st-force-light .header,
body.st-force-light .topbar,
body.st-force-light .page-header,
body.light-mode .header,
body.light-mode .topbar,
body.light-mode .page-header,
body.dark-mode .header,
body.dark-mode .topbar,
body.dark-mode .page-header {
    background: linear-gradient(135deg, #6f2934 0%, #8B4049 48%, #0f6f86 100%) !important;
    color: #fff !important;
}

.header h1,
.topbar h1,
.page-header h1,
.brand-title,
.page-title {
    letter-spacing: 0 !important;
}

.header-demo-hinweis {
    display: none !important;
}

.st-demo-note {
    max-width: 1760px;
    margin: 20px auto 0;
    padding: 10px 16px;
    color: var(--dwh-muted);
    font-size: .78rem;
    line-height: 1.45;
    border-top: 1px solid var(--dwh-border);
}

.nav-bar,
.header-tabs,
.dwh-tabs {
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid var(--dwh-border) !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .06) !important;
}

.nav-content,
.tab-nav,
.dwh-tab-nav {
    max-width: 1760px !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    overflow: visible !important;
}

.nav-item,
.tab-item,
.dwh-tab-item,
.nav-link {
    min-height: 38px !important;
    padding: .58rem .82rem !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #475569 !important;
    font-size: .88rem !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

.nav-item:hover,
.nav-item.active,
.tab-item:hover,
.tab-item.active,
.dwh-tab-item:hover,
.dwh-tab-item.active,
.nav-link:hover,
.nav-link.active {
    color: var(--dwh-primary) !important;
    background: var(--dwh-primary-soft) !important;
    border-color: rgba(139, 64, 73, .22) !important;
    box-shadow: none !important;
}

.nav-icon,
.tab-icon,
.nav-item > span:first-child:empty,
.tab-item > span:first-child:empty,
.dwh-tab-item > span:first-child:empty {
    display: none !important;
}

.nav-icon::before,
.tab-icon::before,
.nav-item > span:first-child:empty::before,
.tab-item > span:first-child:empty::before,
.dwh-tab-item > span:first-child:empty::before {
    content: "" !important;
    display: none !important;
}

.nav-icon::after,
.tab-icon::after,
.nav-item > span:first-child:empty::after,
.tab-item > span:first-child:empty::after,
.dwh-tab-item > span:first-child:empty::after {
    content: "" !important;
    display: none !important;
}

.dwh-more {
    position: relative;
    flex: 0 0 auto;
}

.dwh-more-button {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: .88rem;
    font-weight: 800;
    padding: .58rem .82rem;
    cursor: pointer;
}

.dwh-more-button:hover,
.dwh-more.is-active .dwh-more-button,
.dwh-more:focus-within .dwh-more-button {
    color: var(--dwh-primary);
    background: var(--dwh-primary-soft);
    border-color: rgba(139, 64, 73, .22);
}

.dwh-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 500;
    display: none;
    min-width: 230px;
    padding: 8px;
    border: 1px solid var(--dwh-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
}

.dwh-more:hover .dwh-more-menu,
.dwh-more:focus-within .dwh-more-menu {
    display: grid;
    gap: 4px;
}

.dwh-more-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
    color: #475569;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none;
}

.dwh-more-menu a:hover,
.dwh-more-menu a.active {
    color: var(--dwh-primary);
    background: var(--dwh-primary-soft);
}

.st-mobile-menu-button,
.mobile-menu-button {
    display: none;
}

.toolbox {
    display: none !important;
}

.filter-bar,
.filter-section,
.control-panel {
    background: rgba(255, 255, 255, .94) !important;
    border-bottom: 1px solid var(--dwh-border) !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .04) !important;
}

.filter-content,
.filter-bar-content {
    gap: .72rem !important;
}

.btn,
button.btn,
.action-btn,
.reload-btn {
    border-radius: 8px !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.btn:not(.btn-outline),
button.btn:not(.btn-outline),
.action-btn.primary {
    background: var(--dwh-primary) !important;
    border-color: var(--dwh-primary) !important;
}

.btn-outline,
button.btn-outline {
    color: var(--dwh-primary) !important;
    border-color: rgba(139, 64, 73, .28) !important;
    background: #fff !important;
}

.kpi-grid,
.metrics-grid,
.stats-grid,
.summary-grid {
    gap: 1rem !important;
}

.kpi-card,
.metric-card,
.stat-card,
.summary-card,
.chart-card,
.table-card,
.card,
.panel,
.modal {
    border: 1px solid rgba(217, 226, 236, .92) !important;
    border-radius: 8px !important;
    background: var(--dwh-surface) !important;
    box-shadow: var(--dwh-shadow) !important;
}

.kpi-card {
    min-height: 132px !important;
    padding: 1.15rem 1.2rem !important;
}

.kpi-card::before,
.metric-card::before,
.stat-card::before,
.summary-card::before {
    background: linear-gradient(90deg, var(--dwh-primary), var(--dwh-primary-2)) !important;
}

.kpi-card:hover,
.metric-card:hover,
.stat-card:hover,
.summary-card:hover,
.chart-card:hover,
.table-card:hover,
.card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .12) !important;
}

.kpi-icon,
.kpi-mega-icon,
.report-icon,
.empty-icon,
.stat-icon,
.ticker-icon,
.btn-icon,
.category-icon {
    display: none !important;
}

.kpi-label,
.metric-label,
.stat-label {
    color: var(--dwh-muted) !important;
    font-size: .76rem !important;
    letter-spacing: .06em !important;
    font-weight: 800 !important;
}

.kpi-value,
.metric-value,
.stat-value {
    color: var(--dwh-ink) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.kpi-sub,
.metric-sub,
.stat-sub {
    color: var(--dwh-muted) !important;
}

.dwh-loading-value {
    display: inline-block !important;
    width: min(100%, 170px) !important;
    min-width: 112px !important;
    height: 32px !important;
    margin: 5px 0 2px !important;
    border-radius: 7px !important;
    color: transparent !important;
    font-size: 0 !important;
    overflow: hidden !important;
    vertical-align: middle !important;
    background: linear-gradient(90deg, #e7edf4 0%, #f8fafc 42%, #e7edf4 82%) !important;
    background-size: 220% 100% !important;
    animation: dwhShimmer 1.25s ease-in-out infinite !important;
}

.kpi-value.dwh-loading-value,
.metric-value.dwh-loading-value,
.stat-value.dwh-loading-value {
    box-shadow: inset 0 0 0 1px rgba(217, 226, 236, .65) !important;
}

.spinner {
    width: min(260px, 80%) !important;
    height: 12px !important;
    margin: 1.4rem auto !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, #e7edf4 0%, #f8fafc 42%, #e7edf4 82%) !important;
    background-size: 220% 100% !important;
    animation: dwhShimmer 1.25s ease-in-out infinite !important;
}

@keyframes dwhShimmer {
    0% { background-position: 180% 0; }
    100% { background-position: -80% 0; }
}

.chart-title,
.card-title,
.table-title,
.section-title {
    color: var(--dwh-ink) !important;
    letter-spacing: 0 !important;
}

.dwh-click-hint {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: .55rem !important;
    padding: .18rem .48rem !important;
    border: 1px solid rgba(139, 64, 73, .22) !important;
    border-radius: 999px !important;
    color: var(--dwh-primary) !important;
    background: var(--dwh-primary-soft) !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
}

.data-table tr.clickable,
tr.clickable,
.clickable {
    cursor: pointer !important;
}

.data-table tr.clickable:hover,
tr.clickable:hover {
    background: #fff6f7 !important;
}

table {
    border-radius: 8px !important;
    overflow: hidden !important;
}

th {
    letter-spacing: .04em !important;
}

.table-wrap table,
.dwh-responsive-table {
    color: #243246 !important;
    font-size: .95rem !important;
    line-height: 1.5 !important;
}

.table-wrap th,
body.st-force-light .table-wrap th,
table.dwh-responsive-table th,
body.st-force-light table.dwh-responsive-table th {
    background: linear-gradient(90deg, #155f7b 0%, #0f6f86 100%) !important;
    color: rgba(255, 255, 255, .94) !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
    letter-spacing: .055em !important;
    text-transform: uppercase !important;
}

.table-wrap td,
table.dwh-responsive-table td {
    color: #314155 !important;
    font-weight: 500 !important;
}

.table-wrap .article,
.table-wrap .drill-link-article,
table.dwh-responsive-table .article,
table.dwh-responsive-table .drill-link-article {
    color: #1d2b3a !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

.table-wrap .muted,
.table-wrap .drill-link-muted,
table.dwh-responsive-table .muted,
table.dwh-responsive-table .drill-link-muted {
    color: #66758a !important;
    font-weight: 500 !important;
}

.table-wrap strong,
table.dwh-responsive-table strong {
    color: #1f334a !important;
    font-weight: 700 !important;
}

.panel-head h3,
.table-card h3,
.chart-card h3 {
    color: #162235 !important;
    font-weight: 750 !important;
    letter-spacing: 0 !important;
}

.table-wrap tr:hover td,
table.dwh-responsive-table tr:hover td {
    background: #f7fafc !important;
}

.st-board-flow {
    width: calc(100% - 32px) !important;
    max-width: 1760px !important;
    margin: 12px auto 18px !important;
    gap: 12px !important;
}

.st-board-flow-card,
.st-board-flow-card.good,
.st-board-flow-card.info,
.st-board-flow-card.warn,
.st-board-flow-card.dark {
    border-top: 0 !important;
    border-left: 4px solid var(--dwh-primary) !important;
    border-radius: 8px !important;
    padding: 1rem 1.08rem !important;
    min-height: 102px !important;
    background: #fff !important;
    box-shadow: var(--dwh-shadow) !important;
}

.st-board-flow-card.main {
    min-width: 320px !important;
}

.st-board-flow-kicker {
    color: var(--dwh-primary) !important;
    letter-spacing: .08em !important;
    font-size: .76rem !important;
}

.st-board-flow-title {
    font-size: 1.1rem !important;
    line-height: 1.18 !important;
    margin-bottom: .28rem !important;
}

.st-board-flow-copy {
    font-size: .9rem !important;
    line-height: 1.42 !important;
}

.st-export-actions {
    display: none !important;
}

@media (max-width: 1360px) {
    .nav-content,
    .tab-nav,
    .dwh-tab-nav {
        gap: 4px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .nav-item,
    .tab-item,
    .dwh-tab-item,
    .nav-link,
    .dwh-more-button {
        padding-left: .5rem !important;
        padding-right: .5rem !important;
        font-size: .82rem !important;
    }
}

@media (max-width: 1100px) {
    .st-mobile-menu-button,
    .mobile-menu-button {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: calc(100% - 32px) !important;
        max-width: 1760px !important;
        min-height: 42px !important;
        margin: 10px auto 8px !important;
        padding: 10px 14px !important;
        border: 1px solid var(--dwh-border) !important;
        border-radius: 8px !important;
        background: #fff !important;
        color: var(--dwh-ink) !important;
        font-size: .92rem !important;
        font-weight: 900 !important;
        cursor: pointer !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .08) !important;
    }

    .st-mobile-menu-lines,
    .mobile-menu-button span {
        display: inline-flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 22px !important;
    }

    .st-mobile-menu-lines i,
    .mobile-menu-button i {
        display: block !important;
        height: 2px !important;
        border-radius: 999px !important;
        background: currentColor !important;
    }

    .nav-content,
    .tab-nav,
    .dwh-tab-nav {
        display: none !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 16px 12px !important;
    }

    body.st-menu-open .nav-content,
    body.st-menu-open .tab-nav,
    body.st-menu-open .dwh-tab-nav {
        display: flex !important;
    }

    .nav-item,
    .tab-item,
    .dwh-tab-item {
        width: 100% !important;
        justify-content: flex-start !important;
        white-space: normal !important;
    }

    .dwh-more {
        width: 100%;
    }

    .dwh-more-button {
        width: 100%;
        text-align: left;
    }

    .dwh-more-menu {
        position: static;
        display: grid;
        box-shadow: none;
        margin-top: 4px;
        width: 100%;
    }

    .st-board-flow {
        display: none !important;
    }
}

body.dwh-sidebar-ready {
    padding-left: 252px !important;
    overflow-x: hidden !important;
}

body.dwh-sidebar-ready .nav-bar,
body.dwh-sidebar-ready .header-tabs,
body.dwh-sidebar-ready .dwh-tabs {
    display: none !important;
}

.dwh-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 8800;
    width: 252px;
    padding: 18px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid var(--dwh-border);
    box-shadow: 12px 0 34px rgba(15, 23, 42, .08);
    color: var(--dwh-ink);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dwh-sidebar-brand {
    padding: 4px 6px 16px;
    border-bottom: 1px solid var(--dwh-border);
    margin-bottom: 14px;
}

.dwh-sidebar-kicker {
    color: var(--dwh-primary);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.dwh-sidebar-title {
    color: #0f172a;
    font-size: 1.12rem;
    line-height: 1.16;
    font-weight: 900;
    margin-top: .35rem;
}

.dwh-sidebar-sub {
    color: var(--dwh-muted);
    font-size: .78rem;
    line-height: 1.35;
    margin-top: .38rem;
    font-weight: 700;
}

.dwh-sidebar-section {
    margin: 14px 0 7px;
    padding: 0 8px;
    color: var(--dwh-muted);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.dwh-sidebar-nav {
    display: grid;
    gap: 4px;
}

.dwh-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    font-size: .96rem;
    font-weight: 600;
    line-height: 1.15;
    text-decoration: none;
}

.dwh-sidebar-link::before {
    content: "";
    display: none;
}

.dwh-sidebar-link::after {
    content: "\203A";
    margin-left: auto;
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1;
    opacity: .7;
}

.dwh-sidebar-link:hover,
.dwh-sidebar-link.active {
    color: var(--dwh-primary);
    background: var(--dwh-primary-soft);
    border-color: rgba(139, 64, 73, .22);
}

.dwh-sidebar-link.active::after {
    color: var(--dwh-primary);
    opacity: 1;
}

.dwh-sidebar-toggle {
    position: fixed;
    left: 14px;
    top: 14px;
    z-index: 8900;
    display: none;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--dwh-border);
    border-radius: 8px;
    background: #fff;
    color: var(--dwh-ink);
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
    cursor: pointer;
}

.dwh-sidebar-toggle-lines {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
}

.dwh-sidebar-toggle-lines i {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.dwh-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 8790;
    display: none;
    background: rgba(15, 23, 42, .38);
}

.dwh-sidebar-ready .header,
.dwh-sidebar-ready .topbar,
.dwh-sidebar-ready .page-header {
    border-radius: 0 !important;
}

.dwh-sidebar-ready *,
.dwh-sidebar-ready *::before,
.dwh-sidebar-ready *::after {
    box-sizing: border-box !important;
}

.dwh-sidebar-ready .header,
.dwh-sidebar-ready .topbar,
.dwh-sidebar-ready .page-header,
.dwh-sidebar-ready .filter-bar,
.dwh-sidebar-ready .filter-section,
.dwh-sidebar-ready .status-bar,
.dwh-sidebar-ready .st-board-flow,
.dwh-sidebar-ready .container,
.dwh-sidebar-ready .main,
.dwh-sidebar-ready .workspace,
.dwh-sidebar-ready main,
.dwh-sidebar-ready .content {
    width: calc(100vw - 252px) !important;
    max-width: calc(100vw - 252px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.dwh-sidebar-ready .header-top,
.dwh-sidebar-ready .header-content,
.dwh-sidebar-ready .filter-content,
.dwh-sidebar-ready .filter-bar-content,
.dwh-sidebar-ready .nav-content,
.dwh-sidebar-ready .tab-nav,
.dwh-sidebar-ready .dwh-tab-nav {
    max-width: 100% !important;
}

.dwh-sidebar-ready .kpi-grid,
.dwh-sidebar-ready .metric-grid,
.dwh-sidebar-ready .stats-grid,
.dwh-sidebar-ready .kpi-mega-grid,
.dwh-sidebar-ready .charts-grid,
.dwh-sidebar-ready .chart-grid,
.dwh-sidebar-ready .ai-insights-grid,
.dwh-sidebar-ready .method-grid,
.dwh-sidebar-ready .weather-kpi-grid,
.dwh-sidebar-ready .wg-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(245px, 100%), 1fr)) !important;
}

.dwh-sidebar-ready .st-board-flow {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)) !important;
}

.dwh-sidebar-ready .st-board-flow-card.main {
    grid-column: auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.dwh-sidebar-ready .chart-card,
.dwh-sidebar-ready .table-card,
.dwh-sidebar-ready .card,
.dwh-sidebar-ready .panel,
.dwh-sidebar-ready .kpi-card,
.dwh-sidebar-ready .metric-card,
.dwh-sidebar-ready .stat-card,
.dwh-sidebar-ready .ai-insights,
.dwh-sidebar-ready .method-box {
    min-width: 0 !important;
}

.dwh-sidebar-ready canvas {
    max-width: 100% !important;
}

.dwh-hook-level {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)) !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

body.dwh-sidebar-ready {
    overflow-x: hidden !important;
}

.dwh-page-index .dwh-hook-level {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.dwh-skip-link {
    position: fixed;
    z-index: 100000;
    top: 10px;
    left: 10px;
    transform: translateY(-160%);
    padding: .7rem 1rem;
    border-radius: 8px;
    background: #fff;
    color: var(--dwh-primary, #8B4049);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease;
}

.dwh-skip-link:focus-visible {
    transform: translateY(0);
}

.dwh-showcase-status {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 38px;
    padding: .42rem 1.65rem;
    border-bottom: 1px solid #d9e2ec;
    background: rgba(255, 255, 255, .97);
    color: #475569;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.dwh-showcase-pill {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(139, 64, 73, .1);
    color: var(--dwh-primary, #8B4049);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dwh-showcase-trust {
    margin-left: auto;
    color: #0f6f86;
}

.st-demo-note {
    padding: 1rem 1.5rem 1.4rem;
    border-top: 0;
    background: transparent;
    color: #475569;
    text-align: left;
    font-size: .8rem;
    line-height: 1.45;
}

.st-demo-note-inner {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    padding: 1rem 1.15rem;
    overflow: hidden;
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}

.st-demo-note-inner::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, #8B4049, #0f6f86);
}

.st-demo-note-brand {
    display: flex;
    flex-direction: column;
    gap: .08rem;
    min-width: 128px;
}

.st-demo-note-brand span {
    color: #8B4049;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.st-demo-note-brand strong {
    color: #17202a;
    font-size: .98rem;
}

.st-demo-note-copy {
    margin: 0;
    color: #64748b;
}

.st-demo-note-links {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    white-space: nowrap;
}

.st-demo-note-links a {
    color: #8B4049;
    font-weight: 800;
    text-decoration: none;
}

.st-demo-note-links a:hover {
    color: #0f6f86;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.st-demo-note-links span {
    color: #cbd5e1;
}

.st-legal-links-20260524,
.dashboard-footer.dwh-legacy-footer {
    display: none !important;
}

@media (max-width: 760px) {
    .st-demo-note {
        padding: .75rem 1rem 1rem;
    }

    .st-demo-note-inner {
        grid-template-columns: 1fr;
        gap: .65rem;
        padding: 1rem;
    }

    .st-demo-note-links {
        white-space: normal;
    }
}

.dwh-sidebar-ready :where(a, button, input, select, [tabindex]):focus-visible {
    outline: 3px solid rgba(15, 111, 134, .55) !important;
    outline-offset: 3px !important;
}

.dwh-secondary-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: .72rem;
    margin: -.15rem 0 1.35rem;
}

.dwh-secondary-kpis .kpi-card,
.dwh-secondary-kpis .metric-card,
.dwh-secondary-kpis .stat-card {
    min-height: 94px !important;
    padding: .85rem .95rem !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .06) !important;
}

.dwh-secondary-kpis .kpi-value,
.dwh-secondary-kpis .metric-value,
.dwh-secondary-kpis .stat-value {
    font-size: 1.35rem !important;
}

tbody tr.dwh-clickable-row {
    cursor: pointer !important;
}

tbody tr.dwh-clickable-row td:last-child::after {
    content: "\203A";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    float: right;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    border-radius: 999px;
    background: var(--dwh-primary-soft);
    color: var(--dwh-primary);
    font-size: 1rem;
    font-weight: 900;
}

tbody tr.dwh-clickable-row:hover td {
    background: #fff6f7 !important;
}

@media (max-width: 1180px) {
    body.dwh-sidebar-ready {
        padding-left: 0 !important;
        padding-top: 58px !important;
        overflow-x: hidden !important;
    }

    .dwh-sidebar-ready .header,
    .dwh-sidebar-ready .topbar,
    .dwh-sidebar-ready .page-header,
    .dwh-sidebar-ready .filter-bar,
    .dwh-sidebar-ready .filter-section,
    .dwh-sidebar-ready .control-panel,
    .dwh-sidebar-ready .status-bar,
    .dwh-sidebar-ready .st-board-flow,
    .dwh-sidebar-ready .container,
    .dwh-sidebar-ready .main,
    .dwh-sidebar-ready .workspace,
    .dwh-sidebar-ready main,
    .dwh-sidebar-ready .content {
        width: 100% !important;
        max-width: 100% !important;
    }

    .dwh-sidebar {
        transform: translateX(-104%);
        transition: transform .22s ease;
        width: min(286px, 86vw);
    }

    body.dwh-sidebar-open .dwh-sidebar {
        transform: translateX(0);
    }

    body.dwh-sidebar-open .dwh-sidebar-overlay {
        display: block;
    }

    .dwh-sidebar-toggle {
        display: inline-flex;
    }
}

@media (max-width: 900px) {
    .dwh-hook-level {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .dwh-page-index .dwh-hook-level {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .dwh-hook-level,
    .dwh-secondary-kpis {
        grid-template-columns: 1fr !important;
    }

    .dwh-page-index .dwh-hook-level {
        grid-template-columns: 1fr !important;
    }

    .dwh-showcase-status {
        flex-wrap: wrap;
        gap: .35rem .55rem;
        padding: .5rem 1rem;
    }

    .dwh-showcase-trust {
        width: 100%;
        margin-left: 0;
    }

    table.dwh-responsive-table {
        display: block !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    table.dwh-responsive-table thead {
        display: none !important;
    }

    table.dwh-responsive-table tbody,
    table.dwh-responsive-table tr,
    table.dwh-responsive-table td {
        display: block !important;
        width: 100% !important;
    }

    table.dwh-responsive-table tr {
        position: relative;
        margin: 0 0 .8rem !important;
        padding: .78rem .86rem !important;
        border: 1px solid var(--dwh-border) !important;
        border-radius: 8px !important;
        background: #fff !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, .07) !important;
    }

    table.dwh-responsive-table td {
        display: grid !important;
        grid-template-columns: minmax(94px, 38%) minmax(0, 1fr) !important;
        gap: .65rem !important;
        align-items: start !important;
        padding: .42rem 0 !important;
        border: 0 !important;
        text-align: left !important;
        white-space: normal !important;
    }

    table.dwh-responsive-table td::before {
        content: attr(data-label);
        color: var(--dwh-muted);
        font-size: .7rem;
        font-weight: 900;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    table.dwh-responsive-table td[colspan] {
        display: block !important;
    }

    table.dwh-responsive-table td[colspan]::before {
        content: "";
        display: none;
    }

    table.dwh-responsive-table tr.dwh-clickable-row::after {
        content: "Details";
        position: absolute;
        right: .74rem;
        top: .66rem;
        border-radius: 999px;
        padding: .16rem .48rem;
        color: var(--dwh-primary);
        background: var(--dwh-primary-soft);
        font-size: .68rem;
        font-weight: 900;
    }

    table.dwh-responsive-table tr.dwh-clickable-row td:last-child::after {
        content: "";
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dwh-sidebar-ready *,
    .dwh-sidebar-ready *::before,
    .dwh-sidebar-ready *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

.dwh-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .38rem;
    margin: 0 0 .7rem;
    color: var(--dwh-muted);
    font-size: .78rem;
    font-weight: 700;
}

.dwh-breadcrumb a {
    color: var(--dwh-primary);
    text-decoration: none;
}

.dwh-breadcrumb strong {
    color: var(--dwh-ink);
}

.dwh-section-nav {
    display: flex;
    align-items: center;
    gap: .45rem;
    overflow-x: auto;
    margin: 0 0 1rem;
    padding: .6rem .7rem;
    border: 1px solid var(--dwh-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .88);
    scrollbar-width: thin;
}

.dwh-section-nav > span {
    flex: 0 0 auto;
    padding: .32rem .48rem;
    color: var(--dwh-muted);
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.dwh-section-nav a {
    flex: 0 0 auto;
    padding: .34rem .62rem;
    border-radius: 999px;
    background: var(--dwh-primary-soft);
    color: var(--dwh-primary);
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
}

.dwh-section-nav a:hover {
    background: var(--dwh-primary);
    color: #fff;
}

.dwh-wg-search {
    display: grid;
    gap: .25rem;
    min-width: 190px;
}

.dwh-wg-search label {
    color: var(--dwh-muted);
    font-size: .7rem;
    font-weight: 800;
}

.dwh-wg-search input {
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
    border: 1px solid var(--dwh-border);
    border-radius: 8px;
    padding: .52rem .7rem;
    background: #fff;
    color: var(--dwh-ink);
    font: inherit;
}

.dwh-chart-narrative {
    margin: .65rem 0 0;
    padding: .7rem .82rem;
    border-left: 3px solid var(--dwh-primary-2);
    border-radius: 0 8px 8px 0;
    background: rgba(15, 111, 134, .07);
    color: #536273;
    font-size: .78rem;
    line-height: 1.5;
}

.dwh-action-panel,
.dwh-data-quality,
.dwh-forecast-quality {
    margin: 1.35rem 0;
    padding: 1.15rem;
    border: 1px solid var(--dwh-border);
    border-radius: 14px;
    background: var(--dwh-surface);
    box-shadow: var(--dwh-shadow);
}

.dwh-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dwh-section-heading h2 {
    margin: .18rem 0 0;
    color: var(--dwh-ink);
    font-size: clamp(1.08rem, 2vw, 1.42rem);
    line-height: 1.2;
}

.dwh-section-heading > p {
    max-width: 360px;
    margin: .2rem 0 0;
    color: var(--dwh-muted);
    font-size: .78rem;
    text-align: right;
}

.dwh-section-kicker {
    color: var(--dwh-primary);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dwh-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .7rem;
}

.dwh-action-grid a {
    display: grid;
    gap: .38rem;
    min-height: 92px;
    padding: .85rem .9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--dwh-ink);
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.dwh-action-grid a::after {
    content: "Analyse \203A";
    align-self: end;
    color: var(--dwh-primary);
    font-size: .72rem;
    font-weight: 900;
}

.dwh-action-grid a:hover {
    transform: translateY(-2px);
    border-color: rgba(139, 64, 73, .35);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

.dwh-action-grid strong {
    font-size: .88rem;
}

.dwh-action-grid span {
    color: var(--dwh-muted);
    font-size: .75rem;
    line-height: 1.4;
}

.dwh-status-chip {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    flex: 0 0 auto;
    padding: .35rem .62rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
}

.dwh-status-chip::before,
.dwh-state-dot {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 999px;
    background: currentColor;
}

.dwh-status-chip.is-pass {
    background: #e8f7f0;
    color: var(--dwh-good);
}

.dwh-status-chip.is-warn {
    background: #fff7df;
    color: var(--dwh-warn);
}

.dwh-status-chip.is-fail {
    background: #fff0f0;
    color: var(--dwh-danger);
}

.dwh-quality-summary {
    display: grid;
    grid-template-columns: minmax(210px, .7fr) minmax(260px, 1.3fr);
    gap: .75rem;
    margin-bottom: .8rem;
}

.dwh-quality-score,
.dwh-quality-meta {
    display: grid;
    gap: .3rem;
    padding: .9rem 1rem;
    border-radius: 10px;
    background: #f8fafc;
}

.dwh-quality-score > span,
.dwh-quality-meta > span:first-child {
    color: var(--dwh-muted);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.dwh-quality-score strong {
    color: var(--dwh-primary-2);
    font-size: 2rem;
    line-height: 1;
}

.dwh-quality-score small {
    font-size: .8rem;
}

.dwh-quality-score p,
.dwh-quality-meta span:last-child {
    margin: 0;
    color: var(--dwh-muted);
    font-size: .75rem;
}

.dwh-quality-meta strong {
    color: var(--dwh-ink);
    font-size: 1rem;
}

.dwh-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .65rem;
}

.dwh-quality-check {
    padding: .8rem .85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.dwh-quality-check > div {
    display: flex;
    align-items: center;
    gap: .42rem;
    color: var(--dwh-muted);
    font-size: .72rem;
}

.dwh-quality-check.is-pass .dwh-state-dot { color: var(--dwh-good); }
.dwh-quality-check.is-warn .dwh-state-dot { color: var(--dwh-warn); }
.dwh-quality-check.is-fail .dwh-state-dot { color: var(--dwh-danger); }

.dwh-quality-value {
    display: block;
    margin: .48rem 0 .28rem;
    color: var(--dwh-ink);
    font-size: 1.25rem;
    font-weight: 900;
}

.dwh-quality-check p,
.dwh-method-note,
.dwh-quality-error {
    margin: 0;
    color: var(--dwh-muted);
    font-size: .72rem;
    line-height: 1.45;
}

.dwh-method-note {
    margin-top: .8rem;
    padding-top: .7rem;
    border-top: 1px solid #e2e8f0;
}

.dwh-quality-loading {
    color: var(--dwh-muted);
    font-size: .82rem;
}

.dwh-inline-action {
    display: inline-flex;
    margin-top: .55rem;
    color: var(--dwh-primary);
    font-size: .75rem;
    font-weight: 900;
    text-decoration: none;
}

.dwh-drilldown-breadcrumb {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .8rem;
    border-bottom: 1px solid var(--dwh-border);
    color: var(--dwh-muted);
    font-size: .72rem;
}

.dwh-state-positive { color: var(--dwh-good) !important; }
.dwh-state-warning { color: var(--dwh-warn) !important; }
.dwh-state-negative { color: var(--dwh-danger) !important; }

body.dwh-universal-open {
    overflow: hidden;
}

.dwh-data-chart-clickable {
    cursor: pointer !important;
}

.dwh-universal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1998;
    background: rgba(15, 23, 42, .42);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    backdrop-filter: blur(2px);
}

.dwh-universal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.dwh-universal-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1999;
    width: min(620px, 94vw);
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    box-shadow: -24px 0 70px rgba(15, 23, 42, .24);
    transform: translateX(104%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s;
}

.dwh-universal-panel.open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
}

.dwh-universal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1.15rem;
    color: #fff;
    background: linear-gradient(135deg, #6f2f38, var(--dwh-primary));
}

.dwh-universal-header h2 {
    margin: .35rem 0 .25rem;
    color: #fff;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    line-height: 1.15;
}

.dwh-universal-header p {
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: .78rem;
    line-height: 1.45;
}

.dwh-universal-breadcrumb {
    color: rgba(255, 255, 255, .68);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dwh-universal-breadcrumb span {
    margin: 0 .35rem;
}

.dwh-universal-close {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.dwh-universal-close:hover,
.dwh-universal-close:focus-visible {
    background: rgba(255, 255, 255, .22);
    transform: rotate(6deg);
    outline: 2px solid rgba(255, 255, 255, .55);
    outline-offset: 2px;
}

.dwh-universal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.5rem 2rem;
}

.dwh-universal-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: 1.25rem;
}

.dwh-universal-kpis > div {
    min-width: 0;
    padding: .8rem .65rem;
    border: 1px solid #e2e8f0;
    border-top: 3px solid var(--dwh-primary);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}

.dwh-universal-kpis span,
.dwh-universal-kpis strong {
    display: block;
}

.dwh-universal-kpis span {
    margin-bottom: .3rem;
    color: var(--dwh-muted);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.dwh-universal-kpis strong {
    overflow: hidden;
    color: #1e293b;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dwh-universal-section-title {
    margin: 0 0 .65rem;
    color: #334155;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dwh-universal-items {
    display: grid;
    gap: .65rem;
}

.dwh-universal-item {
    padding: .85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .04);
}

.dwh-universal-item > strong,
.dwh-universal-item > span {
    display: block;
}

.dwh-universal-item > strong {
    color: #1e293b;
    font-size: .88rem;
}

.dwh-universal-item > span {
    margin-top: .22rem;
    color: var(--dwh-muted);
    font-size: .68rem;
}

.dwh-universal-item > div {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .9rem;
    margin-top: .55rem;
    color: var(--dwh-primary);
    font-size: .74rem;
}

.dwh-universal-loading,
.dwh-universal-error {
    display: grid;
    place-items: center;
    min-height: 220px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: var(--dwh-muted);
    background: #fff;
    text-align: center;
}

.dwh-universal-error {
    align-content: center;
    gap: .45rem;
    padding: 1rem;
    color: var(--dwh-danger);
}

.dwh-universal-error span {
    color: var(--dwh-muted);
    font-size: .76rem;
}

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

@media (max-width: 640px) {
    .dwh-universal-panel {
        width: 100%;
    }

    .dwh-universal-header,
    .dwh-universal-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dwh-universal-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dwh-section-heading,
    .dwh-quality-summary {
        grid-template-columns: 1fr;
    }

    .dwh-section-heading {
        display: grid;
    }

    .dwh-section-heading > p {
        text-align: left;
    }

    .dwh-action-grid,
    .dwh-quality-grid {
        grid-template-columns: 1fr;
    }

    .dwh-action-panel,
    .dwh-data-quality,
    .dwh-forecast-quality {
        padding: .85rem;
        border-radius: 10px;
    }

    .dwh-wg-search {
        min-width: 100%;
        width: 100%;
    }
}
