:root {
    --primary-color: #0f172a;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --accent-soft: #e0f2fe;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #334155;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --section-bg: #f8fafc;
    --sidebar-width: 260px;
    --topbar-height: 52px;
}

* { box-sizing: border-box; }

a, a:link, a:visited {
    text-decoration: none;
    color: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0; padding: 0; color: var(--text-color);
    height: 100vh; display: flex; flex-direction: column; overflow: hidden;
}

/* ---- TOPBAR ---- */
.topbar {
    height: var(--topbar-height);
    background: var(--primary-color);
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; flex-shrink: 0; z-index: 100;
    border-bottom: 1px solid #1e293b;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.brand-logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 15px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer;
}
.brand-logo-icon {
    font-size: 18px; background: rgba(255,255,255,0.1);
    padding: 3px 6px; border-radius: 5px;
}
.topbar-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.15); }
.topbar-nav { display: flex; align-items: center; gap: 3px; }
.topbar-link {
    color: #94a3b8; font-size: 12px; font-weight: 500; text-decoration: none;
    padding: 4px 10px; border-radius: 5px; cursor: pointer; transition: all 0.15s;
}
.topbar-link:hover, .topbar-link.active { color: #fff; background: rgba(255,255,255,0.09); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.system-pill {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
    padding: 3px 9px; border-radius: 20px; font-size: 11px; color: #cbd5e1;
}
.status-dot {
    width: 7px; height: 7px; background: var(--success-color);
    border-radius: 50%; box-shadow: 0 0 5px var(--success-color);
}

/* ---- LAYOUT ---- */
.app-layout { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
    height: calc(100vh - var(--topbar-height));
}

/* ---- SIDEBAR (MODERN SAAS DESIGN & CLEAN SIZING) ---- */
.sidebar {
    width: var(--sidebar-width); 
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    height: 100%;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    flex-shrink: 0; 
    user-select: none;
    box-shadow: 1px 0 3px rgba(0,0,0,0.02);
}

.sidebar-header-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 38px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sidebar-toolbar-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.sidebar-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-tool-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.4;
}

.sidebar-tool-btn:hover {
    background: #ede9fe;
    color: #6d28d9;
    border-color: #c4b5fd;
}

.sidebar-menu { 
    flex: 1;
    padding: 8px 8px 16px 8px; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    overflow-y: auto; 
    overflow-x: hidden;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Klappbare Sidebar-Sektionen */
.sidebar-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 2px;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.sidebar-section-header:hover {
    background: #f1f5f9;
}

.sidebar-section-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.sidebar-section-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sidebar-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-collapse-icon {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    width: 12px;
    text-align: center;
}

.sidebar-section.collapsed .sidebar-collapse-icon {
    transform: rotate(-90deg);
}

.sidebar-section.collapsed .sidebar-section-content {
    display: none;
}

.sidebar-section-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 0 2px 0;
}

.sidebar-subgroup-title {
    font-size: 9.5px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 10px 2px 10px;
    margin-top: 2px;
}

.sidebar-item {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 6px 9px; 
    border-radius: 5px; 
    color: #334155; 
    text-decoration: none;
    font-size: 12px; 
    font-weight: 500; 
    cursor: pointer; 
    transition: all 0.12s ease;
    line-height: 1.3;
}

.sidebar-item:hover { 
    background: #f1f5f9; 
    color: #0f172a; 
}

.sidebar-item.active { 
    background: #f5f3ff; 
    color: #6d28d9; 
    font-weight: 600; 
}

.sidebar-item-left { 
    display: flex; 
    align-items: center; 
    gap: 7px; 
    min-width: 0;
    overflow: hidden;
}

.sidebar-item-left span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-icon { 
    font-size: 13.5px; 
    width: 16px; 
    text-align: center; 
    flex-shrink: 0;
}

/* Klare Einrückung für Unterpunkte (Sub-Items / Tree View) */
.sidebar-subitem,
.sidebar-cm-subitem,
.sidebar-item.sidebar-subitem {
    margin-left: 12px;
    padding-left: 14px !important;
    border-left: 2px solid #e2e8f0;
    border-radius: 0 5px 5px 0;
    font-size: 11.5px;
    color: #475569;
}

.sidebar-subitem:hover,
.sidebar-cm-subitem:hover {
    border-left-color: #8b5cf6;
    background: #faf5ff;
    color: #6d28d9;
}

.sidebar-subitem.active,
.sidebar-cm-subitem.active {
    border-left-color: #7c3aed;
    background: #f5f3ff;
    color: #6d28d9;
    font-weight: 700;
}

.sidebar-footer {
    padding: 10px 12px; 
    border-top: 1px solid #e2e8f0;
    background: #f8fafc; 
    font-size: 10.5px; 
    color: #64748b;
    flex-shrink: 0;
    line-height: 1.4;
}

/* Topbar Active Database Pill */
.topbar-db-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.4);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(124, 58, 237, 0.25);
    transition: all 0.2s ease;
}

/* ---- CM ANALYZER SEPARATE VIEWS & ARTIKEL 2-COLUMN LAYOUT ---- */
.cm-view-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Horizontale Sub-Tabs für Query Analyzer */
.cm-subtab-container {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 8px;
    padding-bottom: 2px;
}

.cm-subtab-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    margin-bottom: -2px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cm-subtab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cm-subtab-btn.active {
    background: #ffffff;
    color: #7c3aed;
    border-color: #cbd5e1;
    border-bottom: 2px solid #ffffff;
    font-weight: 700;
}

.cm-subpanel {
    display: none;
}

.cm-subpanel.active {
    display: block;
}

/* ---- CM ANALYZER 2-COLUMN 3-BLOCK LAYOUT ---- */
.cm-artikel-layout {
    display: grid;
    grid-template-columns: 375px 1fr;
    gap: 16px;
    align-items: stretch;
    min-height: 620px;
}

@media (max-width: 1100px) {
    .cm-artikel-layout {
        grid-template-columns: 1fr;
    }
}

/* ---- 1-CLICK PRESETS COLLAPSIBLE (DEFAULT COLLAPSED) ---- */
.cm-presets-collapsible {
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.cm-presets-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f1f5f9;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    transition: background 0.15s ease;
}

.cm-presets-collapsible-header:hover {
    background: #e2e8f0;
}

.cm-presets-collapsible-icon {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.cm-presets-collapsible.open .cm-presets-collapsible-icon {
    transform: rotate(180deg);
}

.cm-presets-collapsible-body {
    padding: 10px 14px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

/* KPI BOX CLICKABLE */
.kpi-box-clickable {
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

.kpi-box-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08) !important;
    border-color: #94a3b8 !important;
}


.cm-artikel-col-left {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cm-artikel-col-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

.cm-block-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cm-block-card-full {
    height: 620px;
    display: flex;
    flex-direction: column;
}

.cm-block-card-facet {
    height: 380px;
    display: flex;
    flex-direction: column;
}

.cm-block-card-selection {
    height: 224px;
    display: flex;
    flex-direction: column;
}

.cm-block-card-half {
    height: 300px;
    display: flex;
    flex-direction: column;
}

.cm-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cm-block-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cm-block-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cm-block-empty-placeholder {
    flex: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #fafafa;
}

.cm-block-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.cm-block-empty-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 4px 0;
}

.cm-block-empty-desc {
    font-size: 12px;
    color: #64748b;
    max-width: 320px;
    margin: 0;
    line-height: 1.4;
}

/* ---- CONTENT AREA ---- */
.content-area { flex: 1; overflow-y: auto; padding: 20px 24px 40px 24px; background: var(--bg-color); }
.content-container {
    max-width: 980px; margin: 0 auto; background: var(--card-bg);
    padding: 22px 24px; border-radius: 10px;
    box-shadow: 0 2px 12px -2px rgba(0,0,0,0.05); border: 1px solid var(--border-color);
}
.content-container-wide {
    max-width: 1260px !important; /* ca. 30% breiter für Master Artikel Root */
}

/* ---- PAGE HEADER ---- */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color);
}
.page-header h1 { color: var(--primary-color); font-size: 17px; margin: 0 0 2px 0; letter-spacing: -0.3px; }
.page-header p { color: var(--text-muted); font-size: 12px; margin: 0; }

/* ---- DASHBOARD CARDS ---- */
.dashboard-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px; margin-top: 6px;
}
.dashboard-card {
    background: #fff; border: 1px solid var(--border-color); border-radius: 8px;
    padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
    text-decoration: none; color: inherit;
    cursor: pointer; transition: all 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.dashboard-card:hover { transform: translateY(-2px); border-color: var(--accent-color); box-shadow: 0 7px 18px -4px rgba(2,132,199,0.12); }
.dashboard-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.card-icon { width: 38px; height: 38px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--accent-soft); color: var(--accent-color); }
.dashboard-card h3 { font-size: 14px; color: var(--primary-color); margin: 0 0 4px 0; font-weight: 700; }
.dashboard-card p { font-size: 12px; color: var(--text-muted); margin: 0 0 12px 0; line-height: 1.4; }
.card-action-link { font-size: 12px; font-weight: 600; color: var(--accent-color); }

/* ---- BUTTONS ---- */
.btn {
    background-color: var(--accent-color); color: white; border: none; text-decoration: none;
    padding: 8px 16px; font-size: 12.5px; font-weight: 600; border-radius: 5px;
    cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover:not(:disabled) { background-color: var(--accent-hover); color: white; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-secondary { background-color: #f1f5f9; color: var(--text-color); border: 1px solid var(--border-color); }
.btn-secondary:hover:not(:disabled) { background-color: #e2e8f0; color: var(--text-color); }
.btn-success { background-color: var(--success-color); flex: 1; padding: 10px 16px; font-size: 13px; }
.btn-success:hover:not(:disabled) { background-color: #059669; }
.btn-danger { background-color: var(--danger-color); flex: 1; padding: 10px 16px; font-size: 13px; }
.btn-danger:hover:not(:disabled) { background-color: #dc2626; }
.btn-purple { background-color: #7e22ce; color: white; border: 1px solid #6b21a8; }
.btn-purple:hover:not(:disabled) { background-color: #6b21a8; color: white; }

/* ---- BADGES ---- */
.badge { display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 10.5px; font-weight: 600; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-memory { 
    background: linear-gradient(135deg, #ecfdf5, #d1fae5); 
    color: #065f46; 
    border: 1px solid #10b981; 
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
    font-weight: 700;
}


/* ---- PROGRESS BARS & LOADING BANNER ---- */
.overall-progress-container {
    background: #fff; border: 1px solid var(--border-color); border-radius: 8px;
    padding: 10px 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.overall-progress-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11.5px; font-weight: 600; color: var(--primary-color); margin-bottom: 6px;
    flex-wrap: wrap; gap: 6px;
}
.overall-progress-track {
    width: 100%; height: 7px; background: #e2e8f0; border-radius: 4px; overflow: hidden;
}
.overall-progress-fill {
    height: 100%; background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 4px; transition: width 0.35s ease;
}

.loading-banner {
    background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 6px;
    padding: 9px 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px;
}
.loading-header { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: #0369a1; }
.progress-track { width: 100%; height: 6px; background: #e0f2fe; border-radius: 3px; overflow: hidden; position: relative; }
.progress-bar-fill {
    height: 100%; background: linear-gradient(90deg, #0284c7, #2563eb); border-radius: 3px;
    transition: width 0.3s ease;
}
.progress-bar-indeterminate {
    width: 40%; height: 100%; background: #0284c7; border-radius: 3px; position: absolute;
    animation: indeterminateAnimation 1.2s infinite ease-in-out;
}
@keyframes indeterminateAnimation { 0% { left: -40%; } 50% { left: 30%; width: 60%; } 100% { left: 100%; width: 40%; } }
.cards-container { transition: opacity 0.25s ease; }
.cards-container.loading { opacity: 0.4; pointer-events: none; }
.card { background: #fff; border: 1px solid var(--border-color); padding: 12px 16px; border-radius: 8px; margin: 8px 0; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.card-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px solid var(--section-bg); }
.card-header h3 { margin: 0; font-size: 13px; color: var(--primary-color); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 5px 7px; }
.info-item { background: var(--section-bg); padding: 4px 8px; border-radius: 4px; border: 1px solid var(--border-color); }
.info-item.full-width { grid-column: 1 / -1; }
.info-label { font-size: 9px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 1px; }
.info-value { font-size: 12px; font-weight: 600; color: var(--primary-color); word-break: break-word; line-height: 1.3; }
.stats-bar { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }

/* ---- 2-SPALTEN GRID FÜR ARTIKEL-MATCHING & ANLAGE ---- */
.matching-columns-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.25fr);
    gap: 14px;
    align-items: start;
}
.matching-columns-grid > .card {
    margin: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}
@media (max-width: 1050px) {
    .matching-columns-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- KOMPAKTE BUTTON-REIHE (CA. HALBE HÖHE) ---- */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 4px;
    align-items: center;
    width: 100%;
}
.action-buttons .btn {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 5px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
}
.action-buttons .btn-success,
.action-buttons .btn-danger {
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700;
}
.placeholder-box { background: var(--section-bg); border: 1px dashed var(--border-color); border-radius: 8px; padding: 40px 20px; text-align: center; margin-top: 12px; }

/* ---- SUCHFELD / SEARCH BOX ---- */
.search-root-box {
    margin-top: 10px; border: 1px solid #bae6fd; border-radius: 6px;
    background: #f8fafc; overflow: hidden;
}
.search-root-header {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
}
.search-root-header span { font-size: 11px; font-weight: 600; color: #0369a1; white-space: nowrap; }

.search-master-box {
    margin-top: 10px; border: 1px solid #cbd5e1; border-radius: 6px;
    background: #f8fafc; overflow: hidden;
}
.search-master-header {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-bottom: 1px solid #cbd5e1;
    background: #f1f5f9;
}
.search-master-header span { font-size: 11px; font-weight: 700; color: #334155; white-space: nowrap; }
.search-root-input {
    flex: 1; padding: 4px 8px; border: 1px solid #cbd5e1; border-radius: 4px;
    font-size: 11.5px; outline: none; background: #fff; color: var(--primary-color);
}
.search-root-results { padding: 4px; max-height: 850px; overflow-y: auto; }
#search-master-results.search-root-results { padding: 0; max-height: none; overflow: visible; }
.search-root-empty { padding: 8px 12px; text-align: center; color: var(--text-muted); font-size: 11px; }
.search-result-row {
    padding: 4px 8px; border-radius: 4px; cursor: pointer;
    transition: all 0.12s; border: 1px solid transparent; margin-bottom: 2px;
    background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.search-result-row:hover { background: var(--accent-soft); border-color: #bae6fd; }
.search-result-row.selected { background: #d1fae5; border-color: #86efac; }
.search-result-main { font-size: 11px; font-weight: 600; color: var(--primary-color); margin-bottom: 2px; line-height: 1.25; }
.search-result-tag { font-size: 9.5px; color: var(--text-muted); background: var(--section-bg); padding: 0 4px; border-radius: 3px; border: 1px solid var(--border-color); line-height: 1.35; }

/* ---- MASTER ARTIKEL SUCHTABELLE (QUELLENVERGLEICH) ---- */
.master-search-table-wrapper {
    overflow-x: auto;
    max-height: 850px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
}
.master-search-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
}
.master-search-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 7px 10px;
    border-bottom: 2px solid #cbd5e1;
    position: sticky;
    top: 0;
    z-index: 2;
}
.master-search-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-color);
}
.master-search-table tr.search-result-row {
    cursor: pointer;
    transition: background 0.1s ease;
}
.master-search-table tr.search-result-row:hover td {
    background: #e0f2fe !important;
}
.master-search-table tr.search-result-row.selected td {
    background: #d1fae5 !important;
    color: #065f46;
}

/* ---- TABELLEN / DATENLISTEN (FÜR MODULE) ---- */
.data-table-container {
    overflow-x: auto; margin-top: 12px; border: 1px solid var(--border-color); border-radius: 6px;
}
.data-table {
    width: 100%; border-collapse: collapse; font-size: 11.5px; text-align: left;
}
.data-table th {
    background: #f1f5f9; color: var(--text-muted); font-weight: 700; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.5px; padding: 8px 10px; border-bottom: 1px solid var(--border-color);
}
.data-table td {
    padding: 7px 10px; border-bottom: 1px solid var(--border-color); color: var(--text-color);
}
.data-table tr:hover td {
    background: var(--accent-soft);
}

/* ---- SPINNER ---- */
.loading-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 0.8s linear infinite; }
.loading-spinner-blue { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(2,132,199,0.2); border-radius: 50%; border-top-color: #0284c7; animation: spin 0.8s linear infinite; margin-right: 6px; vertical-align: middle; }
.search-spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid rgba(2,132,199,0.3); border-radius: 50%; border-top-color: #0284c7; animation: spin 0.8s linear infinite; }

.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- MODAL DIALOG ---- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65); backdrop-filter: blur(3px);
    z-index: 999; display: flex; align-items: center; justify-content: center;
    padding: 20px; animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-container {
    background: #fff; border-radius: 10px; width: 100%; max-width: 880px;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 10px 10px -5px rgba(0,0,0,0.1);
    border: 1px solid #cbd5e1; overflow: hidden; animation: slideUp 0.18s ease-out;
}
.modal-container-wide {
    max-width: 1200px !important;
}
@keyframes slideUp { from { transform: translateY(15px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
    padding: 14px 20px; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 8px; margin: 0; }
.modal-close {
    background: transparent; border: none; font-size: 18px; line-height: 1;
    color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.modal-close:hover { background: #e2e8f0; color: var(--primary-color); }

.modal-body {
    padding: 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px;
}
.modal-split-layout {
    display: grid; grid-template-columns: 1fr 340px; gap: 18px; flex: 1; overflow: hidden;
}
.modal-form-column {
    overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 14px;
}
.modal-chatbot-column {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    display: flex; flex-direction: column; overflow: hidden;
}
.chatbot-header {
    background: #0f172a; color: #fff; padding: 10px 14px;
    font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px;
}
.chatbot-body {
    flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
    font-size: 12px; line-height: 1.4;
}
.chat-msg {
    padding: 8px 11px; border-radius: 7px; max-width: 90%; word-break: break-word;
}
.chat-msg-bot {
    background: #fff; border: 1px solid #e2e8f0; align-self: flex-start; color: var(--primary-color);
}
.chat-msg-user {
    background: var(--accent-color); color: #fff; align-self: flex-end;
}
.chat-quick-actions {
    display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; background: #fff;
    border-top: 1px solid #e2e8f0;
}
.btn-chat-quick {
    font-size: 10.5px; padding: 3px 7px; background: #f1f5f9; border: 1px solid #cbd5e1;
    border-radius: 4px; cursor: pointer; color: #334155; transition: all 0.12s;
}
.btn-chat-quick:hover { background: #e0f2fe; color: #0284c7; border-color: #93c5fd; }
.chatbot-footer {
    padding: 8px 10px; background: #fff; border-top: 1px solid #e2e8f0;
    display: flex; gap: 6px;
}
.chatbot-input {
    flex: 1; padding: 6px 9px; font-size: 11.5px; border: 1px solid #cbd5e1;
    border-radius: 5px; outline: none;
}
.chatbot-input:focus { border-color: var(--accent-color); }
.btn-chat-send {
    padding: 6px 10px; font-size: 12px; background: #0284c7; color: #fff;
    border: none; border-radius: 5px; cursor: pointer;
}
.btn-chat-send:hover { background: #0369a1; }
.modal-footer {
    padding: 12px 20px; background: #f8fafc; border-top: 1px solid #e2e8f0;
    display: flex; justify-content: flex-end; gap: 10px; align-items: center;
}

/* ---- FORMS & SECTIONS ---- */
.form-section {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 14px;
}
.form-section-title {
    font-size: 12px; font-weight: 700; color: #0369a1; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-label { font-size: 10.5px; font-weight: 600; color: var(--primary-color); }
.form-label-hint { font-size: 9.5px; color: var(--text-muted); font-weight: 400; }
.form-input, .form-select {
    padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 5px;
    font-size: 12px; background: #fff; color: var(--primary-color); outline: none;
    transition: border-color 0.15s, box-shadow 0.15s; width: 100%; box-sizing: border-box;
}
.form-input:focus, .form-select:focus {
    border-color: var(--accent-color); box-shadow: 0 0 0 2px rgba(2,132,199,0.15);
}
.form-input[readonly] { background: #f1f5f9; color: #64748b; cursor: not-allowed; }

/* ---- FLAG CHECKBOX CARDS ---- */
.flag-card {
    background: #fff; border: 1px solid #cbd5e1; border-radius: 6px;
    padding: 8px 10px; display: flex; align-items: flex-start; gap: 8px;
    cursor: pointer; transition: all 0.12s;
}
.flag-card:hover { border-color: #93c5fd; background: #f0f9ff; }
.flag-card input[type="checkbox"] {
    margin-top: 2px; width: 15px; height: 15px; accent-color: #0284c7; cursor: pointer;
}
.flag-card-content { flex: 1; }
.flag-card-title { font-size: 11px; font-weight: 700; color: var(--primary-color); line-height: 1.2; }
.flag-card-desc { font-size: 9.5px; color: var(--text-muted); line-height: 1.25; margin-top: 2px; }

/* ---- TOAST NOTIFICATION ---- */
.toast-notification {
    position: fixed; bottom: 24px; right: 24px; background: #0f172a; color: #fff;
    padding: 10px 18px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); z-index: 10000;
    display: flex; align-items: center; gap: 8px; animation: slideInToast 0.2s ease-out;
}
.toast-success { background: #065f46; border-left: 4px solid #10b981; }
.toast-error { background: #991b1b; border-left: 4px solid #ef4444; }
@keyframes slideInToast { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---- BUTTON SM & TABLE ACTIONS ---- */
.btn-sm { padding: 3px 8px; font-size: 11px; border-radius: 4px; }
.btn-edit { background: #0284c7; color: #fff; border: none; cursor: pointer; }
.btn-edit:hover { background: #0369a1; }

/* ---- SOURCE STATUS INITIAL LOADER ---- */
.source-status-loader {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #7dd3fc; border-radius: 8px; padding: 14px 18px;
    margin-bottom: 16px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.source-status-loader-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.source-status-loader-title {
    font-size: 13px; font-weight: 700; color: #0369a1; display: flex; align-items: center; gap: 8px;
}
.source-status-loader-timer {
    font-size: 12px; font-weight: 700; color: #0284c7; background: #fff;
    padding: 2px 8px; border-radius: 12px; border: 1px solid #bae6fd;
}
.source-status-loader-desc {
    font-size: 11.5px; color: #334155; margin-bottom: 8px; line-height: 1.4;
}

/* ---- EDITABLE GEBINDE INPUTS & WARNINGS ---- */
.gebinde-number-input {
    width: 110px; font-weight: 700; font-size: 13.5px; padding: 4px 8px;
    border: 1.5px solid #94a3b8; border-radius: 5px; color: #0f172a;
    background: #fff; outline: none; transition: all 0.15s;
}
.gebinde-number-input:focus {
    border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}
.gebinde-warning {
    margin-top: 4px; font-size: 11px; font-weight: 700; color: #b45309;
    background: #fef3c7; border: 1px solid #fde68a; border-radius: 4px;
    padding: 3px 6px; display: flex; align-items: center; gap: 4px;
}
.gebinde-warning.danger {
    color: #991b1b; background: #fee2e2; border-color: #fca5a5;
}

/* ---- TEMPLATE SEARCH TRIGGER & DEDICATED MODAL ---- */
.template-search-trigger-box {
    background: #f0fdf4; border: 1.5px solid #86efac; border-radius: 8px;
    padding: 10px 14px; margin-bottom: 12px;
}
.template-modal-table th {
    background: #f0fdf4; color: #166534; font-size: 10.5px;
}
.template-table-row {
    transition: background 0.12s ease;
}
.template-table-row:hover td {
    background: #f0fdf4 !important;
}

/* ---- REVIEW & STAGING SECTION ---- */
.review-section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.review-header-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.review-table-container {
    max-height: 540px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 16px;
}

.review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.review-table thead th {
    position: sticky;
    top: 0;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    padding: 10px 12px;
    border-bottom: 2px solid #cbd5e1;
    z-index: 2;
}

.review-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.review-table tbody tr:hover {
    background-color: #f8fafc;
}

.review-footer-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 14px 18px;
}

/* ---- USER AUTH & TOPBAR USER PILL ---- */
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    color: #f1f5f9;
}
.user-pill-avatar {
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}
.btn-logout {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-logout:hover {
    background: #ef4444;
    color: #fff;
}

/* ---- LOGIN PAGE ---- */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 420px;
    padding: 36px 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.login-header {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo {
    font-size: 38px;
    margin-bottom: 8px;
    display: inline-block;
}
.login-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 6px 0;
}
.login-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.login-field label {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.login-input {
    padding: 10px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
    transition: all 0.15s ease;
}
.login-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.login-btn {
    margin-top: 8px;
    padding: 11px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.login-btn:hover {
    background: var(--accent-hover);
}
.login-alert {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* ---- ADMIN PERMISSIONS MATRIX ---- */
.perm-matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 10px;
}
.perm-matrix-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    text-align: center;
}
.perm-matrix-table th.left-align {
    text-align: left;
}
.perm-matrix-table td {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
}
.perm-matrix-table td.left-align {
    text-align: left;
}
.perm-matrix-table tr:hover td {
    background: #f8fafc;
}
.perm-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-color);
    cursor: pointer;
}

/* ---- EAN / OPEN FOOD FACTS LOOKUP ---- */
#modal-ean-lookup {
    z-index: 1200;
}
#modal-ean-lookup.hidden {
    display: none !important;
}
.btn-ean-lookup {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.15s ease;
}
.btn-ean-lookup:hover {
    background: #dcfce7;
    border-color: #4ade80;
    color: #15803d;
    box-shadow: 0 1px 3px rgba(22, 101, 52, 0.15);
}
.ean-product-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-top: 10px;
}
.ean-product-image {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px;
    flex-shrink: 0;
}
.ean-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
}
.ean-product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}
.ean-badge-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 10.5px;
    font-weight: 600;
}
.ean-link {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    border-bottom: 1px dotted #38bdf8;
    transition: all 0.15s ease;
}
.ean-link:hover {
    color: #0369a1;
    border-bottom: 1px solid #0369a1;
    background: #f0fdf4;
    border-radius: 3px;
    padding: 0 2px;
}
.ean-link-tag {
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    border: 1px solid #cbd5e1;
}
.ean-link-tag:hover {
    background: #f0fdf4 !important;
    color: #166534 !important;
    border-color: #86efac !important;
    box-shadow: 0 1px 3px rgba(22, 101, 52, 0.15);
}

/* ====================================================
   COCKPIT V2.0: 2-SÄULEN HERO LAYOUT & HUBS
   ==================================================== */

.cockpit-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.cockpit-primary-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    color: #1e293b !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.cockpit-primary-card:link,
.cockpit-primary-card:visited,
.cockpit-primary-card:hover,
.cockpit-primary-card:active {
    color: #1e293b !important;
    text-decoration: none !important;
}

.cockpit-primary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0284c7, #2563eb);
    transition: height 0.2s ease;
}

.cockpit-primary-card.card-cm::before {
    background: linear-gradient(90deg, #7c3aed, #d946ef);
}

.cockpit-primary-card:hover {
    transform: translateY(-4px);
    border-color: #38bdf8;
    box-shadow: 0 16px 36px -4px rgba(2, 132, 199, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.cockpit-primary-card.card-cm:hover {
    border-color: #c084fc;
    box-shadow: 0 16px 36px -4px rgba(124, 58, 237, 0.14), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.primary-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.primary-card-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0284c7;
    border: 1px solid #7dd3fc;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.primary-card-icon-wrap.cm-icon {
    background: linear-gradient(135deg, #f5f3ff 0%, #ddd6fe 100%);
    color: #7c3aed;
    border: 1px solid #c4b5fd;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.primary-card-title {
    font-size: 21px;
    font-weight: 800;
    color: #0f172a !important;
    margin: 0 0 8px 0;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.primary-card-subtitle {
    font-size: 13px;
    color: #475569 !important;
    line-height: 1.55;
    margin-bottom: 18px;
}

/* Stat Grid inside card */
.primary-card-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.primary-card-stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.primary-card-stat-val {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
}

.primary-card-stat-lbl {
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.primary-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.primary-card-feature-item {
    font-size: 12.5px;
    color: #334155 !important;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.4;
}

.primary-card-feature-item strong {
    color: #0f172a !important;
}

/* Direct link chips */
.primary-card-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}

.primary-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: #334155 !important;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.primary-card-chip:hover {
    background: #e0f2fe;
    color: #0369a1 !important;
    border-color: #7dd3fc;
    transform: translateY(-1px);
}

.primary-card-chip.cm-chip:hover {
    background: #f3e8ff;
    color: #6b21a8 !important;
    border-color: #c084fc;
}

.primary-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.primary-card-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.18s ease;
}

.cockpit-primary-card:hover .primary-card-action-btn {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    gap: 12px;
}

.primary-card-action-btn.cm-action {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.25);
}

.cockpit-primary-card.card-cm:hover .primary-card-action-btn.cm-action {
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    gap: 12px;
}

/* ---- BREADCRUMB BAR ---- */
.breadcrumb-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12.5px;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-weight: 500;
}

.breadcrumb-list a {
    color: #0284c7;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #94a3b8;
    font-size: 11px;
}

.breadcrumb-current {
    color: #0f172a;
    font-weight: 600;
}

/* ---- HUB SECTION (STAMMDATEN) ---- */
.hub-group {
    margin-bottom: 26px;
}

.hub-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e2e8f0;
}

.hub-group-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

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

/* ==========================================================================
   CM ANALYZER – QUERY ANALYZER 2-SPALTEN / 3-BLÖCKE LAYOUT
   ========================================================================== */

.cm-kpi-matrix-layout {
    grid-template-columns: 1.15fr 0.85fr;
}

.cm-kpi-col-matrix {
    height: 100%;
}

.cm-kpi-col-selected {
    height: 100%;
}

.cm-block-card-full .cm-block-body-scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cm-block-card-facet .cm-block-body-scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cm-block-card-selection .cm-block-body-scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cm-block-card-half .cm-block-body-scrollable {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.cm-block-header {
    padding: 9px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.cm-block-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cm-block-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-block-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cm-toolbar-btn {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.12s ease;
}

.cm-toolbar-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.cm-toolbar-btn.active {
    background: #7c3aed;
    color: #ffffff;
    border-color: #6d28d9;
}

.cm-toolbar-btn.cm-btn-summe.active {
    background: #d97706;
    color: #ffffff;
    border-color: #b45309;
}

.cm-toolbar-btn.cm-btn-transfer {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
}

.cm-toolbar-btn.cm-btn-transfer:hover {
    background: #1d4ed8;
}

.cm-toolbar-btn.cm-btn-clear {
    color: #dc2626;
    border-color: #fca5a5;
    background: #fef2f2;
}

.cm-toolbar-btn.cm-btn-clear:hover {
    background: #fee2e2;
    border-color: #f87171;
}

.cm-btn-sym {
    font-size: 12px;
    font-weight: bold;
}

.cm-num-btn-group {
    display: inline-flex;
    gap: 3px;
    margin-right: 4px;
}

.cm-num-btn {
    width: 24px;
    height: 26px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.cm-num-btn:hover {
    background: #7c3aed;
    color: #ffffff;
    border-color: #6d28d9;
}

/* SUMME WARN-BANNER */
.cm-summe-banner {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    padding: 6px 12px;
    font-size: 11px;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.cm-summe-banner-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-summe-banner-close {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 10px;
    color: #b45309;
    cursor: pointer;
    font-weight: 600;
}

.cm-summe-banner-close:hover {
    background: #fde68a;
}

.cm-block-body-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    background: #ffffff;
}

/* BLOCK 1: ATTRIBUT LISTE */
.cm-attributes-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cm-attr-row {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
    user-select: none;
}

.cm-attr-row:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.cm-attr-row.selected {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.cm-attr-row.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.cm-attr-checkbox {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #7c3aed;
    margin-right: 8px;
}

.cm-attr-label {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.cm-attr-pos {
    font-size: 10px;
    color: #94a3b8;
    margin-right: 8px;
    font-family: monospace;
}

.cm-attr-btn-search {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.12s;
}

.cm-attr-btn-search:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
}

.cm-attr-btn-jump {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.12s;
    margin-left: 2px;
}

.cm-attr-btn-jump:hover {
    background: #ede9fe;
    color: #7c3aed;
    border-color: #ddd6fe;
    transform: scale(1.1);
}

/* BLOCK 2: TREE SEARCH & CONTAINER */
.cm-tree-search-bar {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    gap: 6px;
    flex-shrink: 0;
}

.cm-tree-search-icon {
    font-size: 12px;
    color: #94a3b8;
}

.cm-tree-search-input {
    flex: 1;
    height: 26px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 0 24px 0 8px;
    font-size: 11.5px;
    outline: none;
    background: #ffffff;
}

.cm-tree-search-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.cm-tree-search-clear {
    position: absolute;
    right: 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
}

.cm-tree-search-clear:hover {
    color: #0f172a;
}

.cm-tree-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cm-tree-node {
    margin-bottom: 2px;
}

.cm-tree-node-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.cm-tree-node-header:hover {
    background: #f1f5f9;
}

.cm-tree-node-header.active {
    background: #eff6ff;
}

.cm-tree-toggle {
    width: 14px;
    font-size: 10px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.cm-tree-toggle.expanded {
    transform: rotate(90deg);
}

.cm-tree-node-check, .cm-tree-leaf-check {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #2563eb;
}

.cm-tree-node-icon {
    font-size: 12px;
}

.cm-tree-node-text {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
}

.cm-tree-node-count {
    font-size: 9.5px;
    padding: 1px 5px;
}

.cm-tree-node-children {
    padding-left: 20px;
    margin-left: 14px;
    border-left: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}

.cm-tree-leaf {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11.5px;
    color: #334155;
    cursor: pointer;
    transition: background 0.1s;
}

.cm-tree-leaf:hover {
    background: #f8fafc;
    color: #0f172a;
}

.cm-tree-leaf.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.cm-tree-leaf-icon {
    font-size: 11px;
    color: #94a3b8;
}

.cm-tree-leaf-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* BLOCK 3: FILTER SELEKTION */
.cm-selected-filters-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cm-filter-group-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 10px;
}

.cm-filter-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
}

.cm-filter-group-remove-all {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 10.5px;
    padding: 0;
}

.cm-filter-group-remove-all:hover {
    text-decoration: underline;
}

.cm-filter-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cm-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 2px 7px 2px 8px;
    font-size: 11px;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.cm-filter-chip-remove {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.cm-filter-chip-remove:hover {
    color: #ef4444;
}

/* RATIO ANZEIGE (SELEKTIERT | GESAMT) */
.cm-attr-ratio {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-left: 6px;
    transition: color 0.12s;
}

.cm-attr-ratio.has-selected {
    color: #2563eb;
    font-weight: 700;
}

/* QA BERECHNEN BUTTON TOOLBAR */
.cm-qa-action-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cm-btn-calc {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    border: none;
    font-weight: 700;
    font-size: 13px;
    padding: 7px 18px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(37,99,235,0.28);
    transition: all 0.15s ease;
}

.cm-btn-calc:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    box-shadow: 0 4px 12px rgba(37,99,235,0.38);
    transform: translateY(-1px);
}

.cm-btn-calc:active {
    transform: translateY(0);
}

/* 250x250 TEXTAREA FILTER-EINFÜGEN MODAL */
.cm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cm-modal-content {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    width: 286px;
    overflow: hidden;
    animation: cmModalFadeIn 0.15s ease-out;
}

@keyframes cmModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.cm-modal-header {
    padding: 9px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-modal-close {
    border: none;
    background: transparent;
    font-size: 14px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}

.cm-modal-close:hover {
    color: #0f172a;
}

.cm-modal-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cm-paste-textarea {
    width: 250px;
    height: 250px;
    padding: 8px;
    font-size: 11.5px;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    resize: none;
    outline: none;
    background: #fafafa;
    line-height: 1.4;
    box-sizing: border-box;
}

.cm-paste-textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
    background: #ffffff;
}

.cm-modal-footer {
    padding: 9px 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ---- UNIVERSAL BADGES ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.badge-purple { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.badge-green { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-amber { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-gray { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge-cyan { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.badge-indigo { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-rose { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.badge-teal { background: #f0fdf4; color: #0f766e; border: 1px solid #99f6e4; }

/* ---- KPI TAB MODERN STYLES ---- */
.cm-kpi-level1-node {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 7px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cm-kpi-level1-node:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.cm-kpi-level1-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid transparent;
    user-select: none;
    transition: background 0.15s ease;
}

.cm-kpi-level1-header:hover {
    background: #f1f5f9;
}

.cm-kpi-level1-node.expanded > .cm-kpi-level1-header {
    border-bottom-color: #e2e8f0;
    background: #f1f5f9;
}

.cm-kpi-level1-body {
    display: none;
    padding: 6px 8px;
    background: #ffffff;
}

.cm-kpi-level1-node.expanded > .cm-kpi-level1-body {
    display: block;
}

.cm-kpi-level2-node {
    margin-bottom: 5px;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    overflow: hidden;
    background: #fcfcfd;
}

.cm-kpi-level2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    user-select: none;
    border-left: 3px solid #cbd5e1;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.cm-kpi-level2-header:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-left-color: #7c3aed;
}

.cm-kpi-level2-node.expanded > .cm-kpi-level2-header {
    border-bottom: 1px solid #f1f5f9;
    background: #f1f5f9;
    border-left-color: #7c3aed;
}

.cm-kpi-level2-body {
    display: none;
    padding: 4px 6px;
    background: #ffffff;
}

.cm-kpi-level2-node.expanded > .cm-kpi-level2-body {
    display: block;
}

.cm-kpi-leaf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 7px;
    border-radius: 5px;
    font-size: 11.5px;
    color: #1e293b;
    border: 1px solid transparent;
    transition: all 0.12s ease;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 2px;
}

.cm-kpi-leaf-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.cm-kpi-leaf-item.selected {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #5b21b6;
    font-weight: 600;
}

.cm-kpi-leaf-item input[type="checkbox"] {
    accent-color: #7c3aed;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.cm-kpi-selected-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11.5px;
}

.cm-kpi-selected-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 8px;
    border-bottom: 1px solid #e2e8f0;
    z-index: 5;
    white-space: nowrap;
}

.cm-kpi-selected-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    background: #ffffff;
}

.cm-kpi-selected-table tr:hover td {
    background: #faf5ff;
}

.cm-kpi-unit-select {
    padding: 3px 7px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    color: #0f172a;
    outline: none;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cm-kpi-unit-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.cm-fmt-badge {
    display: inline-block;
    padding: 1.5px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
}

/* Parameterspeicher Table Style in Info View */
.cm-params-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 10px;
}
.cm-params-table th {
    background: #f8fafc;
    text-align: left;
    padding: 8px 10px;
    color: #475569;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}
.cm-params-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.cm-params-table tr:hover td {
    background: #fcfcfd;
}

/* ========================================================================== */
/* SMART KPI MATRIX & 1-CLICK PRESETS (MODERN CM DASHBOARD)                  */
/* ========================================================================== */

.cm-kpi-presets-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.cm-kpi-presets-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.cm-kpi-presets-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-kpi-presets-subtitle {
    font-size: 11px;
    color: #64748b;
}

.cm-kpi-presets-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.cm-preset-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.cm-preset-btn:hover {
    background: #f5f3ff;
    border-color: #a78bfa;
    color: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
}

.cm-preset-btn.active {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.28);
}

.cm-preset-custom-badge {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
}

/* 2-Spalten Matrix Layout */
.cm-kpi-matrix-layout {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 14px;
    min-height: 590px;
    align-items: stretch;
}

@media (max-width: 1180px) {
    .cm-kpi-matrix-layout {
        grid-template-columns: 1fr !important;
    }
}

.cm-kpi-matrix-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Kategorie Segment-Pills */
.cm-kpi-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 8px;
}

.cm-cat-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.12s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.cm-cat-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.cm-cat-pill.active {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #ffffff;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.22);
}

.cm-cat-pill .badge {
    font-size: 9px;
    padding: 0 4px;
}

.cm-cat-pill.active .badge {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
    border: none;
}

/* Sub-Filter & Suche */
.cm-kpi-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cm-kpi-subfilters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.cm-subfilter-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.12s ease;
}

.cm-subfilter-btn:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #94a3b8;
}

.cm-subfilter-btn.active {
    background: #e0e7ff;
    border-color: #818cf8;
    color: #3730a3;
    font-weight: 700;
}

.cm-kpi-search-bar {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2px 8px;
    flex: 1;
    min-width: 140px;
    background: #ffffff;
}

/* Matrix Items List */
.cm-kpi-matrix-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 4px;
}

.cm-kpi-matrix-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    transition: all 0.12s ease;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.01);
}

.cm-kpi-matrix-item:hover {
    border-color: #cbd5e1;
    background: #fafafa;
}

.cm-kpi-matrix-item.selected {
    border-color: #c4b5fd;
    background: #fdfaff;
    box-shadow: 0 1px 4px rgba(124, 58, 237, 0.08);
}

.cm-kpi-matrix-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    user-select: none;
}

.cm-kpi-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.cm-kpi-name-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.cm-kpi-name {
    font-size: 11.5px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-kpi-tags {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Direct Unit Pills */
.cm-kpi-unit-pills {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.cm-unit-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 2.5px 7px;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.12s ease;
    white-space: nowrap;
    user-select: none;
}

.cm-unit-pill:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #6d28d9;
}

.cm-unit-pill.active {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.25);
}

/* Reordering & Selected Items in Right Column */
.cm-kpi-selected-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 5px;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.01);
    transition: all 0.12s ease;
}

.cm-kpi-selected-card:hover {
    border-color: #cbd5e1;
    background: #fcfcfd;
}

.cm-kpi-reorder-controls {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.cm-kpi-reorder-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    width: 18px;
    height: 16px;
    font-size: 8.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.1s;
}

.cm-kpi-reorder-btn:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

/* ==========================================================================
   SMART FACET HUB & DIMENSION FILTER CARDS (ARTIKEL, GESCHÄFT, ZEITRAUM)
   ========================================================================== */

.cm-facet-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
}

.cm-facet-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
    transition: all 0.15s ease;
}

.cm-facet-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cm-facet-card.has-active-filters {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px #3b82f61a;
}

@keyframes cm-facet-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.7);
        border-color: #7c3aed;
    }
    40% {
        box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.25);
        border-color: #6d28d9;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
        border-color: #cbd5e1;
    }
}

.cm-facet-card.cm-facet-highlight-pulse {
    animation: cm-facet-pulse 2s ease-out;
    border-color: #7c3aed !important;
}

.cm-facet-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s;
}

.cm-facet-card.has-active-filters .cm-facet-card-header {
    background: #eff6ff;
    border-bottom-color: #bfdbfe;
}

.cm-facet-card-header:hover {
    background: #f1f5f9;
}

.cm-facet-header-left {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.cm-facet-icon {
    font-size: 13px;
    flex-shrink: 0;
}

.cm-facet-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-facet-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.cm-facet-badge.active-count {
    background: #3b82f6;
    color: #ffffff;
}

.cm-facet-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cm-facet-act-btn {
    font-size: 10px;
    padding: 2px 5px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #475569;
    cursor: pointer;
    transition: all 0.1s;
}

.cm-facet-act-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.cm-facet-toggle-arrow {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 3px;
    transition: transform 0.2s;
}

.cm-facet-card.collapsed .cm-facet-toggle-arrow {
    transform: rotate(-90deg);
}

.cm-facet-card.collapsed .cm-facet-card-body {
    display: none;
}

.cm-facet-card-body {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
}

.cm-facet-mini-search-wrap {
    position: relative;
    margin-bottom: 4px;
}

.cm-facet-mini-search {
    width: 100%;
    padding: 3px 6px 3px 22px;
    font-size: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
}

.cm-facet-mini-search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.cm-facet-mini-search-icon {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #94a3b8;
    pointer-events: none;
}

.cm-facet-values-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cm-facet-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    color: #334155;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.cm-facet-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cm-facet-item.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.cm-facet-item input[type="checkbox"] {
    accent-color: #3b82f6;
    cursor: pointer;
    margin: 0;
    width: 13px;
    height: 13px;
}

.cm-facet-item-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Quell-Artikel Schnellsuche mit % Buttons */
.src-search-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-src-quick-search {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-src-quick-search:hover {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.btn-src-quick-search:active {
    transform: translateY(0);
}

/* ==========================================================================
   MODERN APPLICATION STATUS, CURSOR, TOP-PROGRESS & TOAST SYSTEM
   ========================================================================== */

/* 1. GLOBAL CURSOR MANAGEMENT (MODERN ENTERPRISE CURSOR MODEL) */
body.app-busy,
body.cm-busy {
    cursor: wait !important;
}

body.app-busy *,
body.cm-busy * {
    cursor: wait !important;
}

/* Allow abort / cancel buttons to still be clickable during busy state */
body.app-busy .cm-allow-during-busy,
body.cm-busy .cm-allow-during-busy {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Interactive elements: standard pointer */
button:not(:disabled),
.btn:not(:disabled),
.cm-subtab-btn,
.cm-wtab,
.cm-pp-pill,
.cm-facet-card-header,
.cm-facet-act-btn,
.cm-kpi-preset-btn,
.cm-filter-chip-remove,
.cm-filter-group-remove-all,
.cm-attr-checkbox,
.cm-attr-row,
.cm-facet-check,
.cm-kpi-check,
.cm-kpi-leaf-item,
.cm-pivot-btn,
.cm-profile-card,
th.sortable,
th[onclick],
.cm-tab-item,
.tab-button,
.sidebar-item,
.cm-tree-toggle,
.cm-tree-node-header,
.cm-tree-leaf,
input[type="checkbox"],
input[type="radio"],
select {
    cursor: pointer;
}

/* Disabled elements: not-allowed */
button:disabled,
.btn:disabled,
input:disabled,
select:disabled,
.disabled,
[disabled] {
    cursor: not-allowed !important;
    opacity: 0.55;
}

/* Draggable pivot elements & badges */
[draggable="true"],
.cm-pp-chip-draggable,
.cm-dim-draggable,
.cm-pivot-drop-item {
    cursor: grab;
    user-select: none;
}

[draggable="true"]:active,
.cm-pp-chip-draggable:active,
.cm-dim-draggable:active,
.cm-pivot-drop-item:active {
    cursor: grabbing;
}

/* Resize dividers */
.cm-col-resize-handle,
.cm-split-handle-horizontal {
    cursor: col-resize;
}

.cm-split-handle-vertical {
    cursor: row-resize;
}

/* Text & search input fields */
input[type="text"],
input[type="search"],
textarea {
    cursor: text;
}

/* 2. TOP PROGRESS BAR (NProgress / YouTube / Linear Style) */
#cm-global-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed 0%, #2563eb 50%, #38bdf8 100%);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 5px rgba(124, 58, 237, 0.5);
    z-index: 999999;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    pointer-events: none;
    opacity: 0;
}

#cm-global-progress-bar.active {
    opacity: 1;
}

#cm-global-progress-bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 100px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.8) 100%);
    box-shadow: 0 0 15px #38bdf8;
    animation: cm-progress-glow 1s infinite linear;
}

@keyframes cm-progress-glow {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* 3. BUTTON MICRO-SPINNER & LOCKED STATES */
.cm-btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: cm-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.cm-btn-spinner-dark {
    border: 2px solid rgba(15, 23, 42, 0.2);
    border-top-color: #0f172a;
}

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

button.btn-loading,
button.cm-btn-loading {
    pointer-events: none !important;
    opacity: 0.88 !important;
    cursor: wait !important;
    position: relative;
}

/* Taktiler Button Klick-Effekt */
button:active:not(:disabled) {
    transform: scale(0.975);
    transition: transform 0.05s ease;
}

/* PIVOT APPLY BUTTON PENDING STATE */
.cm-btn-pivot-apply.pending {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    color: #ffffff !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35), 0 2px 8px rgba(99, 102, 241, 0.4) !important;
    animation: cm-pulse-glow 1.5s infinite ease-in-out;
}

@keyframes cm-pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5), 0 2px 8px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.15), 0 2px 12px rgba(99, 102, 241, 0.6); }
    100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.5), 0 2px 8px rgba(99, 102, 241, 0.3); }
}

/* 4. HEADER STATUS PILL (Databricks / Snowflake Style) */
.cm-header-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    transition: all 0.25s ease;
    user-select: none;
}

.cm-header-status-pill .status-indicator {
    width: 7.5px;
    height: 7.5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cm-header-status-pill.status-ready .status-indicator {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.cm-header-status-pill.status-busy {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.cm-header-status-pill.status-busy .status-indicator {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
    animation: cm-pulse-ring 1.2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.cm-header-status-pill.status-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
}

.cm-header-status-pill.status-error .status-indicator {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

.cm-header-status-pill .cancel-task-btn {
    margin-left: 6px;
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.15s;
}

.cm-header-status-pill .cancel-task-btn:hover {
    background: #ef4444;
    color: #ffffff;
}

@keyframes cm-pulse-ring {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* 5. UNIVERSAL TOAST NOTIFICATION SYSTEM */
#cm-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    pointer-events: none;
}

.cm-toast {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.16), 0 4px 10px -2px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cm-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cm-toast.hide {
    transform: translateY(10px) scale(0.95);
    opacity: 0;
}

.cm-toast-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.cm-toast-content {
    flex: 1;
    min-width: 0;
}

.cm-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.cm-toast-message {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
    word-break: break-word;
}

.cm-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}

.cm-toast-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

/* Toast Varianten */
.cm-toast-success { border-left: 4px solid #10b981; }
.cm-toast-error { border-left: 4px solid #ef4444; }
.cm-toast-warning { border-left: 4px solid #f59e0b; }
.cm-toast-info { border-left: 4px solid #3b82f6; }

/* Toast Countdown Progress Bar */
.cm-toast-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: #e2e8f0;
}

.cm-toast-timer-progress {
    height: 100%;
    width: 100%;
    background: #7c3aed;
    transition: width linear;
}

.cm-toast-success .cm-toast-timer-progress { background: #10b981; }
.cm-toast-error .cm-toast-timer-progress { background: #ef4444; }
.cm-toast-warning .cm-toast-timer-progress { background: #f59e0b; }
.cm-toast-info .cm-toast-timer-progress { background: #3b82f6; }

/* ==========================================================================
   ENTERPRISE POWERPIVOT MATRIX ENGINE (EXCEL / OLAP WORKSPACE)
   ========================================================================== */

.cm-powerpivot-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* TOP RIBBON TOOLBAR */
.cm-powerpivot-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.cm-pp-ribbon-left, .cm-pp-ribbon-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cm-pp-btn-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.cm-pp-ribbon-btn {
    border: none;
    background: transparent;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.cm-pp-ribbon-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cm-pp-ribbon-btn.active {
    background: #ede9fe;
    color: #7c3aed;
    font-weight: 700;
}

.cm-pp-divider {
    width: 1px;
    height: 22px;
    background: #cbd5e1;
    margin: 0 2px;
}

.cm-pp-visual-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cm-pp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.cm-pp-checkbox-label input {
    accent-color: #7c3aed;
    cursor: pointer;
}

/* MAIN WORKSPACE */
.cm-powerpivot-workspace {
    display: flex;
    gap: 12px;
    position: relative;
    min-height: 540px;
    align-items: flex-start;
}

.cm-powerpivot-grid-container {
    flex: 1;
    min-width: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.cm-pivot-table-scroll {
    flex: 1;
    overflow: auto;
    max-height: 640px;
}

/* MATRIX TABLE */
.cm-powerpivot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.cm-powerpivot-table th, .cm-powerpivot-table td {
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    white-space: nowrap;
}

.cm-pp-th-row-main {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cm-pp-th-row-sub {
    background: #f1f5f9;
    position: sticky;
    top: 29px;
    z-index: 9;
}

.cm-pp-th-row-dim {
    background: #f1f5f9;
    font-weight: 700;
    color: #1e293b;
    z-index: 11;
    position: sticky;
    left: 0;
    top: 0;
}

.cm-pp-th-col-group {
    font-weight: 700;
    color: #0f172a;
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
}

.cm-pp-th-val {
    font-weight: 600;
    color: #475569;
    font-size: 11px;
}

.cm-pp-agg-badge {
    font-size: 9px;
    padding: 1px 4px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 700;
}

.cm-pp-th-grand-total {
    font-weight: 700;
    background: #ede9fe;
    color: #5b21b6;
    border-left: 2px solid #c4b5fd;
}

.cm-pp-cell-row-header {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 5;
    font-weight: 500;
    color: #1e293b;
    border-right: 2px solid #cbd5e1;
}

.cm-pp-row-parent {
    background: #f8fafc;
    font-weight: 600;
}

.cm-pp-row-parent.expanded {
    background: #fbfcfe;
}

.cm-pp-row-parent .cm-pp-cell-row-header {
    background: #f8fafc;
}

.cm-pp-row-leaf {
    background: #fff;
}

.cm-pp-row-subtotal {
    background: #f1f5f9;
    font-weight: 700;
    border-top: 1px dashed #94a3b8;
}

.cm-pp-row-subtotal .cm-pp-cell-row-header {
    background: #f1f5f9;
}

.cm-pp-subtotal-val {
    font-weight: 700;
    color: #334155;
    background: #f8fafc;
}

.cm-pp-toggle-btn {
    display: inline-block;
    width: 16px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
    margin-right: 4px;
    user-select: none;
}

.cm-pp-toggle-btn.interactive {
    cursor: pointer;
    color: #7c3aed;
    font-weight: 700;
}

.cm-pp-toggle-btn.interactive:hover {
    transform: scale(1.2);
}

.cm-pp-row-label-text {
    vertical-align: middle;
}

.cm-pp-val-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
    position: relative;
    cursor: pointer;
    transition: background 0.15s ease;
}

.cm-pp-val-cell:hover {
    outline: 2px solid #7c3aed;
    z-index: 2;
}

.cm-pp-val-text {
    position: relative;
    z-index: 2;
}

.cm-pp-databar {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    background: rgba(124, 58, 237, 0.18);
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
}

.cm-pp-row-total-cell {
    background: #faf5ff;
    font-weight: 700;
    color: #581c87;
    border-left: 2px solid #e9d5ff;
}

.cm-pp-tfoot-row {
    position: sticky;
    bottom: 0;
    background: #e2e8f0;
    font-weight: 700;
    z-index: 8;
    border-top: 2px solid #94a3b8;
}

.cm-pp-cell-grand-label {
    position: sticky;
    left: 0;
    background: #e2e8f0;
    z-index: 9;
    font-weight: 800;
    color: #0f172a;
    border-right: 2px solid #94a3b8;
}

.cm-pp-tfoot-val {
    text-align: right;
    color: #0f172a;
    font-weight: 700;
}

.cm-pp-tfoot-grand-val {
    text-align: right;
    background: #d8b4fe !important;
    color: #3b0764;
    font-weight: 800;
    border-left: 2px solid #a855f7;
}

/* FIELD LIST PANEL (4-QUADRANT COCKPIT) */
.cm-powerpivot-fieldlist-panel {
    width: 380px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 10px;
    font-size: 12.5px;
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cm-pp-fl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.cm-pp-fl-section.cm-pp-fl-available {
    height: 190px;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    background: #f8fafc;
}

.cm-pp-fl-search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 8px;
}

.cm-pp-fl-search {
    border: none;
    outline: none;
    font-size: 12px;
    width: 100%;
}

.cm-pp-available-fields-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cm-pp-fl-group-title {
    font-size: 10.5px;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.5px;
    padding: 4px 2px 2px 2px;
}

.cm-pp-field-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    transition: all 0.15s ease;
}

.cm-pp-field-item:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.cm-pp-field-item.used {
    opacity: 0.6;
    background: #f1f5f9;
}

.cm-pp-field-icon {
    font-size: 12px;
    margin-right: 5px;
}

.cm-pp-field-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    color: #1e293b;
}

.cm-pp-field-actions {
    display: flex;
    gap: 4px;
}

.cm-pp-add-btn {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    font-weight: 600;
    color: #334155;
    transition: all 0.15s ease;
}

.cm-pp-add-btn:hover {
    background: #ede9fe;
    border-color: #7c3aed;
    color: #7c3aed;
}

.cm-pp-add-val-btn {
    color: #7c3aed;
    border-color: #c4b5fd;
    background: #faf5ff;
}

/* 4 QUADRANTS GRID */
.cm-pp-quadrants-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cm-pp-quadrant {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    padding: 6px;
    min-height: 135px;
    display: flex;
    flex-direction: column;
}

.cm-pp-quad-title {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-pp-dropzone {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 140px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    padding: 5px;
}

.cm-pp-empty-zone {
    font-size: 10.5px;
    color: #94a3b8;
    text-align: center;
    padding: 20px 4px;
    font-style: italic;
}

/* CHIPS */
.cm-pp-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.cm-pp-chip-filter {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.cm-pp-chip-col {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.cm-pp-chip-row {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #581c87;
}

.cm-pp-chip-val {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.cm-pp-chip-reorder {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cm-pp-chip-reorder button {
    font-size: 7px;
    padding: 0 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    color: #64748b;
}

.cm-pp-chip-reorder button:disabled {
    opacity: 0.2;
}

.cm-pp-chip-level {
    font-weight: 800;
    font-size: 9.5px;
    color: #7c3aed;
}

.cm-pp-chip-label {
    flex: 1;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-pp-chip-select {
    font-size: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    background: #fff;
    padding: 1px 2px;
    font-weight: 600;
    outline: none;
}

.cm-pp-chip-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    color: #94a3b8;
    padding: 0 2px;
}

.cm-pp-chip-remove:hover {
    color: #ef4444;
}

.cm-pp-fl-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 6px;
}

/* SLICER DROPDOWN POPUP */
.cm-pp-slicer-popup {
    position: fixed;
    z-index: 9999;
    width: 250px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cm-pp-slicer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cm-pp-slicer-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 4px 6px;
    gap: 2px;
}

.cm-pp-slicer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    cursor: pointer;
    user-select: none;
}

.cm-pp-slicer-item:hover {
    background: #f1f5f9;
}

.cm-pp-slicer-item input {
    accent-color: #7c3aed;
    cursor: pointer;
}

/* ==========================================================================
   ENTERPRISE VISUALISIERUNGS-DASHBOARD STUDIO (EXCEL & POWER BI LEVEL)
   ========================================================================== */

.cm-dashboard-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* DASHBOARD RIBBON TOOLBAR */
.cm-dash-ribbon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.cm-dash-ribbon-left, .cm-dash-ribbon-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cm-dash-btn-group {
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    background: #fff;
}

.cm-dash-ribbon-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.cm-dash-ribbon-btn:hover {
    background: #f8fafc;
    color: #0f172a;
}

.cm-dash-ribbon-btn.active {
    background: #ede9fe;
    color: #7c3aed;
    font-weight: 700;
}

/* EXECUTIVE KPI SCORECARDS */
.cm-dash-scorecards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    width: 100%;
}

.cm-dash-scorecard {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cm-dash-scorecard:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.cm-dash-scorecard::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #7c3aed;
}

.cm-dash-scorecard.theme-emerald::before { background: #10b981; }
.cm-dash-scorecard.theme-amber::before { background: #f59e0b; }
.cm-dash-scorecard.theme-blue::before { background: #3b82f6; }
.cm-dash-scorecard.theme-purple::before { background: #8b5cf6; }

.cm-scorecard-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.cm-scorecard-content {
    flex: 1;
    min-width: 0;
}

.cm-scorecard-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-scorecard-value {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Consolas', 'Menlo', monospace;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-scorecard-subtext {
    font-size: 10.5px;
    color: #94a3b8;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* SLICER & CROSS-FILTER BAR */
.cm-dash-slicers-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 6px 12px;
    flex-wrap: wrap;
}

.cm-dash-slicer-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: #ede9fe;
    border: 1px solid #c4b5fd;
    color: #6d28d9;
    font-size: 11px;
    font-weight: 600;
}

.cm-dash-slicer-tag .cm-slicer-close {
    cursor: pointer;
    font-size: 11px;
    color: #8b5cf6;
}

.cm-dash-slicer-tag .cm-slicer-close:hover {
    color: #ef4444;
}

/* DASHBOARD GRID & CARDS */
.cm-dash-grid {
    display: grid;
    gap: 14px;
    width: 100%;
}

.cm-dash-grid.grid-1-col {
    grid-template-columns: 1fr;
}

.cm-dash-grid.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
}

.cm-dash-grid.grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

.cm-dash-grid.grid-asymm {
    grid-template-columns: 2fr 1fr;
}

.cm-dash-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.2s ease;
    min-height: 360px;
}

.cm-dash-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.cm-dash-card.card-span-2 {
    grid-column: span 2;
}

.cm-dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}

.cm-dash-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cm-dash-card-type-icon {
    font-size: 15px;
}

.cm-dash-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-dash-card-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.cm-dash-card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.cm-dash-card-body {
    flex: 1;
    height: 320px;
    min-height: 320px;
    width: 100%;
    position: relative;
}

/* CHART INSPECTOR DRAWER */
.cm-dash-inspector-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    background: #ffffff;
    box-shadow: -8px 0 24px rgba(0,0,0,0.12);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.cm-dash-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cm-dash-inspector-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cm-dash-inspector-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.cm-dash-inspector-group:last-child {
    border-bottom: none;
}

.cm-dash-inspector-title {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cm-dash-inspector-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* PALETTE PICKER CHIPS */
.cm-theme-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.cm-theme-chip {
    padding: 6px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    transition: all 0.15s ease;
}

.cm-theme-chip:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
}

.cm-theme-chip.active {
    border-color: #7c3aed;
    background: #ede9fe;
    color: #7c3aed;
}

/* =============================================================================
   HIGH-PERFORMANCE UI, GPU ACCELERATION & GLOBAL BUSY / CURSOR WAIT
   ============================================================================= */

/* 1. Globale Cursor-Wait & Busy States */
body.app-busy,
body.cm-busy,
body.app-busy *,
body.cm-busy * {
    cursor: wait !important;
}

body.app-busy .cm-allow-during-busy,
body.cm-busy .cm-allow-during-busy,
body.app-busy .cm-allow-during-busy *,
body.cm-busy .cm-allow-during-busy * {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* 2. Native Tabellen-Virtualisierung & Rendering Isolation (content-visibility) */
.cm-results-table tbody tr,
.cm-pivot-table tbody tr,
#aq-results-tbody tr,
#cm-pp-tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: 0 32px;
    contain: layout style paint;
}

/* 3. GPU Hardware-Beschleunigung für Overlays, Shimmer und Animationen */
.cm-table-loading-overlay,
.aq-table-loading-shimmer,
#aq-table-loading-shimmer,
.cm-pivot-matrix-overlay,
.cm-toast {
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* 4. Tabellen-Scroll-Performance */
.cm-results-table-container,
.cm-pivot-matrix-container,
#aq-table-container {
    contain: strict;
    transform: translateZ(0);
    -webkit-overflow-scrolling: touch;
}

/* =============================================================================
   QUERY GOVERNOR, COST ESTIMATION & LIVE TIMER STYLES
   ============================================================================= */

.cm-cost-pill-green {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cm-cost-pill-yellow {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde047;
}

.cm-cost-pill-red {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.cm-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.cm-timer-pill.running {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
    animation: cm-timer-pulse 2s infinite ease-in-out;
}

@keyframes cm-timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

@keyframes cmPulseProgress {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0%); }
    100% { transform: translateX(100%); }
}

/* ========================================================================== */
/* POWER BI DIRECT-ANALYTICS ENGINE STYLES                                   */
/* ========================================================================== */

.cm-pbi-canvas-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    min-height: 600px;
}

.cm-pbi-topbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.cm-pbi-topbar-row1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.cm-pbi-topbar-row2 {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.cm-pbi-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.cm-pbi-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid #fde68a;
}

.cm-pbi-pulse-dot {
    width: 7px;
    height: 7px;
    background: #d97706;
    border-radius: 50%;
    box-shadow: 0 0 6px #d97706;
}

.cm-pbi-stat-text {
    font-size: 12px;
    color: #334155;
}

.cm-pbi-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cm-pbi-btn {
    font-size: 11.5px !important;
    font-weight: 600 !important;
    padding: 5px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    border-radius: 6px !important;
}

/* Slicer Container */
.cm-pbi-slicer-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    flex-wrap: wrap;
    min-height: 44px;
}

.cm-pbi-slicer-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-right: 4px;
}

.cm-pbi-slicer-empty {
    font-size: 11.5px;
    color: #94a3b8;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cm-pbi-slicer-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cm-pbi-slicer-select {
    appearance: none;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 24px 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
    max-width: 180px;
}

.cm-pbi-slicer-select:hover, .cm-pbi-slicer-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.cm-pbi-slicer-select.has-filter {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 700;
}

.cm-pbi-slicer-arrow {
    position: absolute;
    right: 8px;
    pointer-events: none;
    font-size: 9px;
    color: #64748b;
}

.cm-pbi-slicer-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    animation: fadeIn 0.2s ease-in-out;
}

.cm-pbi-slicer-dim {
    color: #475569;
    font-weight: 600;
}

.cm-pbi-slicer-remove {
    background: none;
    border: none;
    color: #1d4ed8;
    font-size: 12px;
    cursor: pointer;
    padding: 0 0 0 4px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.cm-pbi-slicer-remove:hover {
    color: #dc2626;
}

/* Hero Scorecards Grid (Flexible 2 to 6 columns) */
.cm-pbi-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.cm-pbi-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.2s ease;
}

.cm-pbi-hero-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.cm-pbi-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.cm-pbi-hero-title {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cm-pbi-hero-title:hover {
    color: #3b82f6;
}

.cm-pbi-hero-val {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 4px;
}

.cm-pbi-hero-sub {
    font-size: 11px;
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cm-pbi-hero-badge {
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.cm-pbi-badge-green {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.cm-pbi-badge-blue {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.cm-pbi-badge-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.cm-pbi-hero-selector {
    background: transparent;
    border: none;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    outline: none;
    text-transform: uppercase;
}

.cm-pbi-hero-selector:hover {
    color: #1e293b;
}

/* 2x2 Visuals Grid & Responsive Layouts */
.cm-pbi-visuals-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.cm-pbi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    padding: 14px;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    position: relative;
    transition: all 0.2s ease;
}

.cm-pbi-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.cm-pbi-card.col-12 {
    grid-column: span 12;
}

.cm-pbi-card.col-6 {
    grid-column: span 6;
}

.cm-pbi-card.col-4 {
    grid-column: span 4;
}

.cm-pbi-card.col-3 {
    grid-column: span 3;
}

.cm-pbi-visuals-grid.grid-1-col > .cm-pbi-card {
    grid-column: span 12 !important;
}

.cm-pbi-visuals-grid.grid-2-col > .cm-pbi-card {
    grid-column: span 6;
}
.cm-pbi-visuals-grid.grid-2-col > .cm-pbi-card.col-12 {
    grid-column: span 12 !important;
}

.cm-pbi-visuals-grid.grid-3-col > .cm-pbi-card {
    grid-column: span 4;
}
.cm-pbi-visuals-grid.grid-3-col > .cm-pbi-card.col-6 {
    grid-column: span 8;
}
.cm-pbi-visuals-grid.grid-3-col > .cm-pbi-card.col-12 {
    grid-column: span 12 !important;
}

@media (max-width: 1024px) {
    .cm-pbi-card.col-6, .cm-pbi-card.col-4, .cm-pbi-card.col-3 {
        grid-column: span 12;
    }
}

.cm-pbi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.cm-pbi-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}

.cm-pbi-card-hint {
    font-size: 10.5px;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.cm-pbi-chart-container {
    flex: 1;
    width: 100%;
    min-height: 270px;
}

.cm-pbi-matrix-container {
    flex: 1;
    width: 100%;
    min-height: 270px;
    overflow: auto;
}

/* Slicer Visual Kachel */
.cm-pbi-slicer-widget-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 4px;
}

.cm-pbi-slicer-chip-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
}

.cm-pbi-slicer-chip-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.cm-pbi-slicer-chip-btn.active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 700;
}

/* Matrix Pivot Table */
.cm-pbi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    text-align: right;
}

.cm-pbi-table th, .cm-pbi-table td {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
}

.cm-pbi-table thead th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 2;
}

.cm-pbi-th-corner {
    text-align: left;
    background: #f1f5f9 !important;
}

.cm-pbi-th-total {
    background: #f1f5f9 !important;
}

.cm-pbi-td-rowheader {
    text-align: left;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    position: sticky;
    left: 0;
    z-index: 1;
}

.cm-pbi-td-val {
    color: #0f172a;
}

.cm-pbi-td-total {
    font-weight: 700;
    background: #f8fafc;
    color: #0f172a;
}

.cm-pbi-matrix-empty {
    padding: 40px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* Power BI Templates Dropdown */
.cm-pbi-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 240px;
    padding: 6px 0;
}

.cm-pbi-dropdown-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.cm-pbi-dropdown-menu a:hover {
    background: #f1f5f9;
    color: #0f172a;
    padding-left: 18px;
}

/* Mini Action Buttons on Visual Cards */
.cm-pbi-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
}

.cm-pbi-mini-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

.cm-pbi-mini-btn-del:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.cm-pbi-slicer-toggle-btn {
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cm-pbi-slicer-toggle-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.cm-pbi-matrix-empty {
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    font-style: italic;
}

/* Fullscreen / Focus Mode Overlay */
.cm-pbi-focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 99999;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.cm-pbi-focus-modal {
    background: #ffffff;
    border-radius: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

/* Modals General Style */
.cm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: cmFadeIn 0.2s ease-out;
}

.cm-modal-content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    animation: cmSlideUp 0.25s ease-out;
}

.cm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.cm-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.cm-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s ease;
}

.cm-modal-close-btn:hover {
    color: #1e293b;
}

.cm-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.cm-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

@keyframes cmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes cmSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cmPulseProgress {
    0% { transform: scaleX(0.05); transform-origin: left; }
    50% { transform: scaleX(0.75); transform-origin: left; }
    100% { transform: scaleX(1); transform-origin: left; }
}

@keyframes cmShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* =============================================================================
 * POWER BI STUDIO v3.0: MULTI-SELECT SLICER POPOVER & EMPTY CANVAS & REPORT BADGES
 * ============================================================================= */

/* Slicer Multi-Select Button */
.cm-pbi-slicer-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.cm-pbi-slicer-btn:hover {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

.cm-pbi-slicer-btn.has-filter {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 700;
}

.cm-pbi-slicer-badge {
    background: #3b82f6;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    line-height: 1;
}

/* Multi-Select Slicer Popover Dropdown */
.cm-pbi-slicer-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    width: 250px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: cmSlideUp 0.15s ease-out;
}

.cm-pbi-popover-search {
    width: 100%;
    padding: 5px 8px;
    font-size: 11.5px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    outline: none;
    background: #f8fafc;
    transition: all 0.15s ease;
}

.cm-pbi-popover-search:focus {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.cm-pbi-popover-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 2px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 5px;
}

.cm-pbi-popover-link {
    font-size: 10.5px;
    color: #3b82f6;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-weight: 600;
    border-radius: 3px;
}

.cm-pbi-popover-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.cm-pbi-popover-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cm-pbi-popover-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11.5px;
    color: #334155;
    cursor: pointer;
    transition: background 0.1s ease;
}

.cm-pbi-popover-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cm-pbi-popover-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: #2563eb;
}

.cm-pbi-popover-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Empty State Canvas */
.cm-pbi-empty-canvas {
    grid-column: span 12;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 380px;
    margin: 10px 0;
}

.cm-pbi-empty-icon {
    font-size: 42px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.cm-pbi-empty-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.cm-pbi-empty-desc {
    font-size: 13px;
    color: #64748b;
    max-width: 540px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.cm-pbi-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.cm-pbi-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cm-pbi-empty-btn-primary {
    background: #d97706;
    color: #ffffff;
    border-color: #b45309;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.cm-pbi-empty-btn-primary:hover {
    background: #b45309;
    transform: translateY(-1px);
}

.cm-pbi-empty-btn-secondary {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}

.cm-pbi-empty-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Sidebar Report Badges (Verwechslungsschutz) */
.cm-report-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 5px;
    flex-shrink: 0;
}

.cm-report-badge-pbi {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.cm-report-badge-qa {
    background: #e0e7ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

