/**
 * ALBO M&A Advisory Tool - Stylesheet
 * Version: 3.0 - Dark Sidebar Redesign - March 2026
 */

/* ================================================================ */
/* VARIABLES                                                         */
/* ================================================================ */

:root {
    /* Existing color palette */
    --ma-primary: #143464;
    --ma-primary-light: #1e40af;
    --ma-primary-bg: #eff6ff;
    --ma-success: #10b981;
    --ma-success-bg: #ecfdf5;
    --ma-warning: #f59e0b;
    --ma-warning-bg: #fffbeb;
    --ma-danger: #ef4444;
    --ma-danger-bg: #fef2f2;
    --ma-text: #1e293b;
    --ma-text-secondary: #64748b;
    --ma-text-muted: #94a3b8;
    --ma-border: #e2e8f0;
    --ma-border-light: #f1f5f9;
    --ma-bg: #f8fafc;
    --ma-card: #ffffff;
    --ma-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --ma-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --ma-radius: 8px;
    --ma-radius-sm: 6px;
    --ma-radius-lg: 12px;

    /* Sidebar-specific */
    --ma-sb-bg: #0f172a;
    --ma-sb-text: #94a3b8;
    --ma-sb-text-active: #ffffff;
    --ma-sb-hover: #1e293b;
    --ma-sb-active: #1e3a5f;
    --ma-sb-border: #1e293b;
    --ma-sb-accent: #3b82f6;
}


/* ================================================================ */
/* APP SHELL                                                         */
/* ================================================================ */

.ma-app {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.ma-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--ma-sb-bg);
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
    transition: width 0.2s ease;
}

/* ── Collapsed Sidebar (Icon-only) ── */
.ma-sidebar.collapsed {
    width: 56px;
    overflow-x: hidden;
}
.ma-sidebar.collapsed + .ma-content,
.ma-sidebar.collapsed ~ .ma-content {
    margin-left: 56px;
}
.ma-sidebar.collapsed .ma-sb-text,
.ma-sidebar.collapsed .ma-sb-badge,
.ma-sidebar.collapsed .ma-sb-pct,
.ma-sidebar.collapsed .ma-sb-title,
.ma-sidebar.collapsed .ma-sb-section-header,
.ma-sidebar.collapsed .ma-sb-deal-list,
.ma-sidebar.collapsed #dd-sub-items,
.ma-sidebar.collapsed #rd-sub-items,
.ma-sidebar.collapsed .ma-sb-deal-meta,
.ma-sidebar.collapsed .ma-sb-deal-name,
.ma-sidebar.collapsed [data-dd-toggle],
.ma-sidebar.collapsed [data-rd-toggle],
.ma-sidebar.collapsed .ma-sb-bottom {
    display: none !important;
}

.ma-sidebar.collapsed .ma-sb-area-item {
    justify-content: center;
    padding: 8px 0;
}

/* DD Flyout — sichtbar nur im eingeklappten Modus, oeffnet sich rechts neben dem Icon */
.ma-sb-dd-flyout {
    display: none;
}
.ma-sidebar.collapsed .ma-sb-dd-flyout {
    display: block;
    position: fixed;
    width: 220px;
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.ma-sidebar.collapsed .ma-sb-dd-flyout.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(0);
}
.ma-sb-dd-flyout-header {
    padding: 10px 14px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ma-sb-dd-flyout-body {
    padding: 4px 0;
    max-height: 60vh;
    overflow-y: auto;
}
.ma-sb-dd-flyout-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    transition: background 0.1s, color 0.1s;
    border-left: 3px solid transparent;
}
.ma-sb-dd-flyout-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.ma-sb-dd-flyout-item.active {
    background: rgba(59,130,246,0.15);
    color: #fff;
    border-left-color: #3b82f6;
    font-weight: 600;
}
.ma-sb-dd-flyout-label {
    flex: 1;
}
.ma-sb-dd-flyout-progress {
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    font-variant-numeric: tabular-nums;
}
.ma-sidebar.collapsed .ma-sb-brand {
    padding: 0.75rem 0.5rem;
    text-align: center;
}
.ma-sidebar.collapsed .ma-sb-logo {
    font-size: 14px;
    text-align: center;
}
.ma-sidebar.collapsed .ma-sb-item {
    padding: 0.6rem 0;
    justify-content: center;
    border-left: 3px solid transparent;
}
.ma-sidebar.collapsed .ma-sb-icon {
    margin-right: 0;
}
.ma-sidebar.collapsed .ma-sb-deal {
    padding: 0.5rem 0;
    justify-content: center;
}
.ma-sidebar.collapsed .ma-sb-deal-dot {
    margin-right: 0;
}
.ma-sidebar.collapsed .ma-sb-deal-info {
    display: none;
}

/* Global user-menu bar pushes body down — sidebar must follow */
body.has-global-bar .ma-sidebar {
    top: 36px;
}

body.has-global-bar .ma-content {
    padding-top: 36px;
}

.ma-content {
    flex: 1;
    overflow-y: auto;
    margin-left: 260px;
    background: var(--ma-bg);
    transition: margin-left 0.2s ease;
}

.ma-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}


/* ================================================================ */
/* SIDEBAR (.ma-sb-*)                                                */
/* ================================================================ */

.ma-sb {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ma-sb-brand {
    padding: 1.25rem 1rem 1rem 1.25rem;
    border-bottom: 1px solid var(--ma-sb-border);
    position: relative;
    z-index: 10;
    background: var(--ma-sb-bg);
}

.ma-sb-logo {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.ma-sb-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ma-sb-text);
    margin-top: 4px;
}

.ma-sb-section {
    padding: 0.5rem 0;
}

.ma-sb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--ma-sb-text);
    letter-spacing: 0.05em;
}

.ma-sb-add-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--ma-sb-text);
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}

.ma-sb-add-btn:hover {
    background: var(--ma-sb-hover);
    border-color: var(--ma-sb-accent);
}

.ma-sb-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    color: var(--ma-sb-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    cursor: pointer;
}

.ma-sb-item:hover {
    background: var(--ma-sb-hover);
    color: #ffffff;
}

.ma-sb-item.active {
    background: var(--ma-sb-active);
    color: #ffffff;
    border-left-color: var(--ma-sb-accent);
}

.ma-sb-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 0.75rem;
    opacity: 0.7;
}

.ma-sb-text {
    flex: 1;
    font-size: 13px;
}

.ma-sb-badge {
    background: var(--ma-sb-accent);
    color: #ffffff;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.ma-sb-pct {
    font-size: 11px;
    color: var(--ma-sb-text);
}

.ma-sb-deal-list {
    max-height: 220px;
    overflow-y: auto;
}

.ma-sb-deal {
    display: flex;
    flex-direction: row;
    padding: 0.5rem 1.25rem;
    border-left: 3px solid transparent;
    text-decoration: none;
    color: var(--ma-sb-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ma-sb-deal:hover {
    background: var(--ma-sb-hover);
    color: #ffffff;
}

.ma-sb-deal.active {
    background: var(--ma-sb-active);
    color: #ffffff;
    border-left-color: var(--ma-sb-accent);
}

.ma-sb-deal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    margin-right: 0.75rem;
}

.dot-gray { background: #64748b; }
.dot-yellow { background: #f59e0b; }
.dot-blue { background: #3b82f6; }
.dot-green { background: #10b981; }
.dot-red { background: #ef4444; }

.ma-sb-deal-name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-sb-deal-meta {
    font-size: 11px;
    color: var(--ma-sb-text);
    margin-top: 1px;
}

.ma-sb-areas {
    border-top: 1px solid var(--ma-sb-border);
    padding-top: 0.5rem;
}

.ma-sb-area-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    color: var(--ma-sb-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    cursor: pointer;
}

.ma-sb-area-item:hover {
    background: var(--ma-sb-hover);
    color: #ffffff;
}

.ma-sb-area-item.active {
    background: var(--ma-sb-active);
    color: #ffffff;
    border-left-color: var(--ma-sb-accent);
}

.ma-sb-bottom {
    margin-top: auto;
    border-top: 1px solid var(--ma-sb-border);
}

.ma-sb-empty {
    padding: 1rem 1.25rem;
    font-size: 12px;
    color: var(--ma-sb-text);
    font-style: italic;
}


/* ================================================================ */
/* PIPELINE (.ma-pipeline-*)                                         */
/* ================================================================ */

.ma-pipeline { padding: 0; }

/* Top Bar — DealRoom-style */
.ma-pl-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 10px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0;
}
.ma-pl-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ma-pl-icon { font-size: 16px; color: #64748b; }
.ma-pl-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-right: 8px;
}
.ma-pl-tab {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.ma-pl-tab:hover { color: #475569; }
.ma-pl-tab.active {
    color: #1e293b;
    font-weight: 600;
    border-bottom-color: #1e293b;
}
.ma-pl-topbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Filter Bar */
.ma-pl-filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 10px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 12px;
}
.ma-pl-search {
    padding: 5px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    width: 180px;
    outline: none;
    transition: border-color 0.15s;
}
.ma-pl-search:focus { border-color: #94a3b8; }
.ma-pl-search::placeholder { color: #cbd5e1; }
.ma-pl-deal-count {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}

/* Pipeline Summary Bar */
.ma-pl-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
}
.ma-pl-kpi { display: flex; flex-direction: column; }
.ma-pl-kpi-val { font-size: 16px; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; line-height: 1.2; }
.ma-pl-kpi-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; font-weight: 600; }
.ma-pl-search-wrap { margin-left: auto; }
.ma-pl-search-wrap .ma-pl-search { width: 180px; }

/* Cancelled Deals Section */
.ma-pl-cancelled { margin-top: 16px; border-top: 1px solid #e2e8f0; padding-top: 8px; }
.ma-pl-cancelled-header { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #64748b; cursor: pointer; padding: 6px 0; user-select: none; }
.ma-pl-cancelled-header:hover { color: #334155; }
.ma-pl-cancelled-toggle { font-size: 10px; color: #94a3b8; }
.ma-pl-cancelled-body { margin-top: 6px; }
.ma-pl-reactivate { font-size: 11px; padding: 3px 10px; border: 1px solid #cbd5e1; background: #fff; color: #3b82f6; border-radius: 4px; cursor: pointer; font-family: inherit; font-weight: 500; }
.ma-pl-reactivate:hover { background: #eff6ff; border-color: #93c5fd; }

/* Table View */
.ma-pl-table-wrap {
    overflow-x: auto;
    margin-top: 4px;
}
.ma-pl-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.ma-pl-table th {
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.03em;
    padding: 8px 10px;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}
.ma-pl-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}
.ma-pl-table-row {
    cursor: pointer;
    transition: background 0.1s;
}
.ma-pl-table-row:hover {
    background: #f8fafc;
}
.ma-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}
.ma-status-dot-active { background: #10b981; }
.ma-status-dot-closed { background: #64748b; }
.ma-status-dot-cancelled { background: #ef4444; }

/* Board */
.ma-pipeline-board {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.ma-pipeline-board::-webkit-scrollbar {
    height: 8px;
}

.ma-pipeline-board::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ma-pipeline-board::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.ma-pipeline-board::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Analytics Tabs */
.ma-analytics-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.ma-analytics-tab:hover { color: #374151; }
.ma-analytics-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 600;
}
.ma-phase-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    font-size: 11px;
    color: #374151;
}
/* Heatmap */
.ma-heatmap td { transition: background 0.15s; }
/* Sortierbare Tabellen-Header */
.ma-sort-header { cursor: pointer; user-select: none; white-space: nowrap; }
.ma-sort-header:hover { color: #4f46e5; }
/* Stale Warning Card */
.ma-stale-warning { background: #fef2f2; }

/* ─── Pipeline Columns ─────────────────────────────────── */
.ma-pipeline-col {
    flex: 1 0 200px;
    min-width: 200px;
    background: #f8fafc;
    border-radius: var(--ma-radius);
    padding: 10px;
    border: 1px solid #e2e8f0;
    transition: background 0.2s;
}

.ma-pipeline-col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.ma-pipeline-col-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.ma-pipeline-col-count {
    font-size: 10px;
    font-weight: 700;
    background: var(--ma-primary);
    color: #fff;
    padding: 1px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.ma-pipeline-col-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 60px;
}

/* ─── Drag & Drop States ──────────────────────────────── */
.ma-pipeline-col.drag-over {
    background: #f1f5f9;
    border-color: #94a3b8;
    box-shadow: inset 0 0 0 1px #94a3b8;
}
.ma-pipeline-card-wrap.dragging {
    opacity: 0.3;
}
.ma-pipeline-card-wrap {
    transition: opacity 0.15s;
}

/* ─── Deal Cards (DealRoom-Style) ─────────────────────── */
.ma-pipeline-card {
    display: block;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.15s;
}
.ma-pipeline-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Card Top: Handle + Name */
.ma-card-top {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.ma-drag-handle {
    font-size: 10px;
    color: #cbd5e1;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.15s;
    user-select: none;
    letter-spacing: -2px;
    flex-shrink: 0;
}
.ma-pipeline-card-wrap:hover .ma-drag-handle { opacity: 0.5; }
.ma-pipeline-card-wrap:hover .ma-drag-handle:hover { opacity: 1; color: #475569; }

/* Quick Reject Button */
.ma-card-reject {
    font-size: 11px;
    color: #cbd5e1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0 2px;
    line-height: 1;
}
.ma-pipeline-card-wrap:hover .ma-card-reject { opacity: 0.6; }
.ma-card-reject:hover { opacity: 1 !important; color: #ef4444; }

/* Reject Dropdown */
.ma-reject-dropdown {
    position: fixed;
    z-index: 1000;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 200px;
    padding: 4px 0;
}
.ma-reject-dd-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #94a3b8;
    padding: 6px 12px 4px;
    letter-spacing: 0.03em;
}
.ma-reject-dd-item {
    font-size: 12px;
    color: #334155;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.1s;
}
.ma-reject-dd-item:hover {
    background: #fef2f2;
    color: #ef4444;
}

.ma-pipeline-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    flex: 1;
}

/* Card Fields: Key-Value Pairs */
.ma-card-fields {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ma-card-field {
    display: flex;
    gap: 6px;
    font-size: 11px;
    line-height: 1.35;
}
.ma-card-label {
    color: #94a3b8;
    min-width: 52px;
    flex-shrink: 0;
}
.ma-card-value {
    color: #334155;
    font-weight: 600;
}
.ma-card-badge {
    display: inline-block;
    padding: 0 6px;
    border-radius: 3px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 10px;
    font-weight: 600;
}

/* Card Bottom: Metrics + Date */
.ma-card-bottom {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid #f1f5f9;
    font-size: 10px;
    color: #94a3b8;
}
.ma-card-bottom span {
    padding: 0;
}
.ma-card-date {
    margin-left: auto;
}

.ma-pipeline-empty {
    font-size: 12px;
    color: var(--ma-text-muted);
    text-align: center;
    padding: 1rem;
}

/* ─── Compact Card Mode ──────────────────────────────── */
.ma-pipeline-compact { gap: 3px !important; }
.ma-compact-card {
    display: flex !important;
    align-items: center;
    gap: 6px;
    padding: 5px 8px !important;
    border-radius: 6px !important;
    min-height: 28px;
}
.ma-compact-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.ma-compact-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-compact-metric {
    font-size: 10px;
    color: #94a3b8;
    flex-shrink: 0;
}
.ma-compact-reject {
    font-size: 10px !important;
    padding: 0 1px !important;
}
.ma-compact-wrap:hover .ma-drag-handle { opacity: 0.4; }
.ma-compact-wrap:hover .ma-compact-reject { opacity: 0.5; }


/* ================================================================ */
/* DEAL COCKPIT — Professional Dashboard                              */
/* ================================================================ */

.ma-cockpit { padding: 0; }

/* ─── Compact Header Bar ─────────────────────────────── */
.ma-cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--ma-border);
    margin-bottom: 0;
}
.ma-cp-header-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}
.ma-cp-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0;
    line-height: 1.2;
}
.ma-cp-dealid {
    font-size: 11px;
    color: var(--ma-text-muted);
    font-family: 'SF Mono', 'Consolas', monospace;
    letter-spacing: 0.02em;
}
.ma-cp-phase {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 3px;
    background: #1e293b;
    color: #e2e8f0;
}
.ma-cp-status-dot {
    width: 7px; height: 7px; border-radius: 50%; display: inline-block;
}
.ma-cp-status-active { background: #22c55e; }
.ma-cp-status-closed { background: #3b82f6; }
.ma-cp-status-cancelled { background: #ef4444; }
.ma-cp-status-text { font-size: 11px; color: var(--ma-text-muted); }
.ma-cp-sep { color: var(--ma-text-muted); font-size: 11px; }
.ma-cp-sector { font-size: 11px; color: var(--ma-text-secondary); }

.ma-cp-header-kpis {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}
.ma-cp-hkpi { text-align: right; }
.ma-cp-hkpi-val { font-size: 15px; font-weight: 700; color: var(--ma-text); display: block; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ma-cp-hkpi-label { font-size: 9px; color: var(--ma-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ─── Quick Stats Row ────────────────────────────────── */
.ma-cp-stats {
    display: flex;
    gap: 20px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    margin-bottom: 12px;
}
.ma-cp-stat {
    font-size: 11px;
    color: var(--ma-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}
.ma-cp-stat-val {
    font-weight: 700;
    font-size: 13px;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}

/* ─── Compact Alert Bar ──────────────────────────────── */
.ma-cp-alerts-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.ma-cp-alert {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 3px;
    font-weight: 500;
}
.ma-cp-alert a { color: inherit; text-decoration: none; }
.ma-cp-alert a:hover { text-decoration: underline; }
.ma-cp-alert-critical { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444; }
.ma-cp-alert-high { background: #fff7ed; color: #9a3412; border-left: 3px solid #f97316; }
.ma-cp-alert-medium { background: #fffbeb; color: #92400e; border-left: 3px solid #eab308; }

/* ─── Cancel Button (in tab bar) ─────────────────────── */
.ma-cp-cancel-btn {
    font-size: 11px;
    color: #94a3b8;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
}
.ma-cp-cancel-btn:hover {
    color: #ef4444;
    border-color: #fca5a5;
}

/* ─── Legacy compat ──────────────────────────────────── */
.ma-cockpit-section { margin-bottom: 1.25rem; }
.ma-cockpit-section-title {
    font-size: 11px; font-weight: 700; color: var(--ma-text-muted);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem;
}

.ma-cockpit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.ma-cockpit-card {
    display: block;
    background: white;
    border-radius: var(--ma-radius);
    padding: 1rem;
    border: 1px solid var(--ma-border);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.ma-cockpit-card:hover {
    box-shadow: var(--ma-shadow-md);
    border-color: var(--ma-primary-light);
}

.ma-cockpit-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ma-cockpit-card-icon {
    color: var(--ma-primary);
    flex-shrink: 0;
}

.ma-cockpit-card-title {
    font-size: 13px;
    font-weight: 600;
}

.ma-cockpit-card-status {
    font-size: 11px;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ma-cockpit-card-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.ma-cockpit-card-status.dot-gray::before {
    background: #94a3b8;
}

.ma-cockpit-card-status.dot-yellow::before {
    background: #f59e0b;
}

.ma-cockpit-card-status.dot-green::before {
    background: #10b981;
}

.ma-cockpit-card-progress {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ma-cockpit-card-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--ma-border-light);
    border-radius: 2px;
}

.ma-cockpit-card-progress-fill {
    height: 100%;
    background: var(--ma-primary-light);
    border-radius: 2px;
    transition: width 0.3s;
}

.ma-cockpit-card-pct {
    font-size: 11px;
    color: var(--ma-text-muted);
    font-variant-numeric: tabular-nums;
}

.ma-cockpit-card-metrics {
    font-size: 12px;
    color: var(--ma-text-secondary);
    margin-top: 0.5rem;
}

.ma-cockpit-card-updated {
    font-size: 11px;
    color: var(--ma-text-muted);
    margin-top: 0.5rem;
}

/* ─── Cockpit Tab Bar ────────────────────────────────── */
.ma-cockpit-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--ma-border);
    margin-bottom: 12px;
}
.ma-cockpit-tabs-left {
    display: flex;
    gap: 0;
}
.ma-cockpit-tabs-right {
    flex-shrink: 0;
    padding-right: 4px;
}
.ma-cockpit-tab {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ma-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.ma-cockpit-tab:hover { color: var(--ma-text); }
.ma-cockpit-tab.active {
    color: var(--ma-text);
    border-bottom-color: var(--ma-text);
    font-weight: 600;
}

/* ─── 2-Column Layout ────────────────────────────────── */
.ma-cockpit-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.ma-cockpit-col-left, .ma-cockpit-col-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Panel (generic card for tab content) ──────────── */
.ma-cockpit-panel {
    background: white;
    border: 1px solid var(--ma-border);
    border-radius: 6px;
    padding: 12px 14px;
}
.ma-cockpit-panel-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ma-text-muted);
    margin-bottom: 8px;
}
.ma-cockpit-empty-hint {
    font-size: 12px;
    color: var(--ma-text-muted);
    padding: 0.5rem 0;
}
.ma-cockpit-empty-hint a { color: var(--ma-primary); }

/* ─── Phase Progress Bars ────────────────────────────── */
.ma-cockpit-phase-progress { display: flex; flex-direction: column; gap: 4px; }
.ma-phase-row { display: flex; align-items: center; gap: 6px; }
.ma-phase-row-label { font-size: 10px; font-weight: 500; color: var(--ma-text-muted); width: 110px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-phase-row-bar { flex: 1; height: 4px; background: var(--ma-border-light); border-radius: 2px; }
.ma-phase-row-fill { height: 100%; background: #94a3b8; border-radius: 2px; transition: width 0.3s; }
.ma-phase-row-fill.current { background: #1e293b; }
.ma-phase-row-pct { font-size: 10px; color: var(--ma-text-muted); width: 28px; text-align: right; font-variant-numeric: tabular-nums; }

/* ─── Alerts (legacy, used in panels) ────────────────── */
.ma-cockpit-alerts { display: flex; flex-direction: column; gap: 4px; }
.ma-alert-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 4px; font-size: 11px; }
.ma-alert-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ma-alert-text { color: var(--ma-text-secondary); }
a.ma-alert-text { color: var(--ma-primary); text-decoration: none; }
a.ma-alert-text:hover { text-decoration: underline; }
.ma-alert-critical { border-left: 2px solid #ef4444; }
.ma-alert-critical .ma-alert-dot { background: #ef4444; }
.ma-alert-high { border-left: 2px solid #f97316; }
.ma-alert-high .ma-alert-dot { background: #f97316; }
.ma-alert-medium { border-left: 2px solid #eab308; }
.ma-alert-medium .ma-alert-dot { background: #eab308; }

/* ─── DD Streams ─────────────────────────────────────── */
.ma-dd-streams { display: flex; flex-direction: column; gap: 6px; }
.ma-dd-stream-row { display: flex; align-items: center; gap: 8px; }
.ma-dd-stream-label { font-size: 11px; font-weight: 500; color: var(--ma-text-secondary); width: 110px; flex-shrink: 0; }
.ma-dd-stream-bar { flex: 1; height: 6px; background: var(--ma-border-light); border-radius: 3px; }
.ma-dd-stream-fill { height: 100%; background: var(--ma-primary-light); border-radius: 3px; }
.ma-dd-stream-pct { font-size: 10px; color: var(--ma-text-muted); width: 28px; text-align: right; }
.ma-dd-stream-findings { font-size: 10px; color: #ef4444; font-weight: 600; }

/* ─── Risk Assessment ────────────────────────────────── */
.ma-risk-assessment-list { display: flex; flex-direction: column; gap: 6px; }
.ma-ra-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.ma-ra-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ma-ra-cat { font-size: 12px; font-weight: 500; color: var(--ma-text); flex: 1; }
.ma-ra-badge { font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 10px; }

/* ─── Challenge Questions ────────────────────────────── */
.ma-cq-list { display: flex; flex-direction: column; gap: 6px; }
.ma-cq-item { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--ma-border-light); }
.ma-cq-item:last-child { border-bottom: none; }
.ma-cq-badge { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }
.ma-cq-open { background: #fef2f2; color: #ef4444; }
.ma-cq-escalated { background: #ef4444; color: #fff; }
.ma-cq-text { color: var(--ma-text-secondary); line-height: 1.4; }

/* ─── Financials Tab ─────────────────────────────────── */
.ma-fin-range { text-align: center; padding: 1rem 0; margin-bottom: 0.75rem; border-bottom: 1px solid var(--ma-border-light); }
.ma-fin-range-label { font-size: 11px; color: var(--ma-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.ma-fin-range-values { font-size: 22px; font-weight: 700; color: var(--ma-text); }
.ma-fin-range-low, .ma-fin-range-high { color: var(--ma-primary); }
.ma-fin-range-sep { color: var(--ma-text-muted); margin: 0 8px; }
.ma-fin-range-mid { font-size: 12px; color: var(--ma-text-muted); margin-top: 4px; }
.ma-fin-methods { display: flex; flex-direction: column; gap: 6px; }
.ma-val-method-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--ma-border-light); }
.ma-val-method-row:last-child { border-bottom: none; }
.ma-val-method-name { font-size: 12px; font-weight: 600; color: var(--ma-text-secondary); width: 90px; }
.ma-val-method-value { font-size: 13px; font-weight: 700; color: var(--ma-text); }
.ma-val-method-range { font-size: 11px; color: var(--ma-text-muted); }
.ma-fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.ma-fin-card { text-align: center; padding: 0.75rem; background: var(--ma-bg-subtle); border-radius: 6px; }
.ma-fin-card-value { font-size: 18px; font-weight: 700; color: var(--ma-text); }
.ma-fin-card-label { font-size: 11px; color: var(--ma-text-muted); margin-top: 2px; }
.ma-fin-details { display: flex; flex-direction: column; gap: 0; }
.ma-detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--ma-border-light); font-size: 12px; }
.ma-detail-row:last-child { border-bottom: none; }
.ma-detail-label { color: var(--ma-text-muted); }
.ma-detail-value { color: var(--ma-text); font-weight: 500; }


/* ─── Price Compare ──────────────────────────────────── */
.ma-price-compare { display: flex; flex-direction: column; gap: 8px; }
.ma-price-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--ma-bg-subtle); border-radius: 6px; }
.ma-price-label { font-size: 12px; color: var(--ma-text-secondary); }
.ma-price-value { font-size: 16px; }

/* ─── Earn-Outs ──────────────────────────────────────── */
.ma-earnout-list { display: flex; flex-direction: column; gap: 8px; }
.ma-earnout-item { padding: 8px 12px; background: var(--ma-bg-subtle); border-radius: 6px; border-left: 3px solid #f59e0b; }
.ma-earnout-desc { font-size: 12px; font-weight: 600; color: var(--ma-text); margin-bottom: 4px; }
.ma-earnout-details { display: flex; gap: 12px; font-size: 11px; color: var(--ma-text-muted); }
.ma-earnout-amount { font-weight: 700; color: var(--ma-text-secondary); }

/* ─── Penalties ──────────────────────────────────────── */
.ma-penalty-list { display: flex; flex-direction: column; gap: 6px; }
.ma-penalty-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--ma-border-light); }
.ma-penalty-item:last-child { border-bottom: none; }
.ma-penalty-dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; flex-shrink: 0; }
.ma-penalty-desc { flex: 1; color: var(--ma-text); }
.ma-penalty-amount { font-weight: 700; color: #ef4444; }

/* ─── Modern Arbeitsbereiche (List View) ─────────────── */
.ma-ws-stats { display: flex; gap: 16px; margin-bottom: 12px; }
.ma-ws-stat { font-size: 12px; color: var(--ma-text-muted); font-weight: 500; }
.ma-ws-list { display: flex; flex-direction: column; gap: 0; }
.ma-ws-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--ma-border-light);
    transition: background 0.1s;
}
.ma-ws-row:first-child { border-top: 1px solid var(--ma-border-light); }
.ma-ws-row:hover { background: var(--ma-bg-subtle); }
.ma-ws-row-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ma-ws-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ma-ws-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ma-ws-dot.dot-gray { background: #cbd5e1; }
.ma-ws-dot.dot-yellow { background: #f59e0b; }
.ma-ws-dot.dot-green { background: #10b981; }
.ma-ws-name { font-size: 13px; font-weight: 600; color: var(--ma-text); white-space: nowrap; }
.ma-ws-metric { font-size: 11px; color: var(--ma-text-muted); background: var(--ma-bg-subtle); padding: 1px 6px; border-radius: 3px; }
.ma-ws-bar { width: 80px; height: 4px; background: var(--ma-border-light); border-radius: 2px; }
.ma-ws-bar-fill { height: 100%; border-radius: 2px; }
.ma-ws-bar-fill.dot-bg-gray { background: #cbd5e1; }
.ma-ws-bar-fill.dot-bg-yellow { background: #f59e0b; }
.ma-ws-bar-fill.dot-bg-green { background: #10b981; }
.ma-ws-pct { font-size: 11px; color: var(--ma-text-muted); width: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.ma-ws-status-label { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; width: 90px; text-align: center; }
.ma-ws-status-label.ws-gray { background: #f1f5f9; color: #94a3b8; }
.ma-ws-status-label.ws-yellow { background: #fffbeb; color: #d97706; }
.ma-ws-status-label.ws-green { background: #f0fdf4; color: #16a34a; }
.ma-ws-arrow { font-size: 12px; color: var(--ma-text-muted); }


/* ================================================================ */
/* KPI BAR (.ma-kpi-*)                                               */
/* ================================================================ */

.ma-kpi-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ma-kpi-card {
    flex: 1;
    background: white;
    border-radius: var(--ma-radius);
    padding: 1rem;
    border: 1px solid var(--ma-border);
}

.ma-kpi-card.ma-kpi-blue {
    border-left: 3px solid var(--ma-primary-light);
}

.ma-kpi-card.ma-kpi-green {
    border-left: 3px solid var(--ma-success);
}

.ma-kpi-card.ma-kpi-yellow {
    border-left: 3px solid var(--ma-warning);
}

.ma-kpi-card.ma-kpi-red {
    border-left: 3px solid var(--ma-danger);
}

.ma-kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}

.ma-kpi-label {
    font-size: 12px;
    color: var(--ma-text-secondary);
    margin-top: 2px;
}

.ma-kpi-sub {
    font-size: 11px;
    color: var(--ma-text-muted);
}


/* ================================================================ */
/* DECISION GATES (.ma-gates-*, .ma-gate*)                           */
/* ================================================================ */

.ma-gates-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--ma-radius);
    padding: 1rem 1.5rem;
    border: 1px solid var(--ma-border);
}

.ma-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ma-gate-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--ma-border);
    color: var(--ma-text-muted);
    background: white;
}

.ma-gate.approved .ma-gate-dot {
    background: var(--ma-success);
    border-color: var(--ma-success);
    color: white;
}

.ma-gate.rejected .ma-gate-dot {
    background: var(--ma-danger);
    border-color: var(--ma-danger);
    color: white;
}

.ma-gate.conditional .ma-gate-dot {
    background: var(--ma-warning);
    border-color: var(--ma-warning);
    color: white;
}

.ma-gate-label {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ma-gate-line {
    flex: 1;
    height: 2px;
    background: var(--ma-border);
    min-width: 20px;
    margin: 0 4px;
    margin-bottom: 18px;
}

.ma-gate-line.active {
    background: var(--ma-success);
}


/* ================================================================ */
/* RISK SUMMARY (.ma-risk-*)                                         */
/* ================================================================ */

.ma-cockpit-risks {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ma-risk-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: var(--ma-radius-sm);
    border: 1px solid var(--ma-border);
    font-size: 13px;
}

.ma-risk-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
}

.ma-risk-high .ma-risk-dot {
    background: var(--ma-danger);
}

.ma-risk-medium .ma-risk-dot {
    background: var(--ma-warning);
}

.ma-risk-low .ma-risk-dot {
    background: var(--ma-text-muted);
}

.ma-risk-stream {
    font-size: 11px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    min-width: 80px;
    flex-shrink: 0;
}

.ma-risk-text {
    color: var(--ma-text);
}


/* ================================================================ */
/* TIMELINE (.ma-timeline-*)                                         */
/* ================================================================ */

.ma-cockpit-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ma-timeline-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 13px;
}

.ma-timeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ma-timeline-info .ma-timeline-dot {
    background: var(--ma-primary-light);
}

.ma-timeline-success .ma-timeline-dot {
    background: var(--ma-success);
}

.ma-timeline-danger .ma-timeline-dot {
    background: var(--ma-danger);
}

.ma-timeline-date {
    font-size: 12px;
    color: var(--ma-text-muted);
    min-width: 80px;
}


/* ================================================================ */
/* MODAL (.ma-modal-*)                                               */
/* ================================================================ */

.ma-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-modal {
    background: white;
    border-radius: var(--ma-radius-lg);
    width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ma-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--ma-border);
}

.ma-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.ma-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--ma-text-muted);
    padding: 0;
    line-height: 1;
}

.ma-modal-close:hover {
    color: var(--ma-text);
}

.ma-modal-body {
    padding: 1.5rem;
}

.ma-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--ma-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}


/* ================================================================ */
/* FORMS                                                             */
/* ================================================================ */

.ma-form-row {
    margin-bottom: 1rem;
}

.ma-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ma-text-secondary);
    margin-bottom: 4px;
}

.ma-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ma-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius-sm);
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}

.ma-input:focus {
    outline: none;
    border-color: var(--ma-primary-light);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}


/* ================================================================ */
/* BUTTONS                                                           */
/* ================================================================ */

.ma-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--ma-radius-sm);
    font-size: 14px;
    border: 1px solid var(--ma-border);
    background: white;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.ma-btn:hover {
    background: var(--ma-border-light);
}

.ma-btn-primary {
    background: var(--ma-primary);
    color: white;
    border-color: var(--ma-primary);
}

.ma-btn-primary:hover {
    background: var(--ma-primary-light);
    border-color: var(--ma-primary-light);
}

.ma-btn-sm {
    padding: 4px 12px !important;
    font-size: 12px !important;
}

.ma-btn-success {
    background: var(--ma-success) !important;
    color: white !important;
    border: none;
}

.ma-btn-success:hover {
    opacity: 0.9;
}

.ma-btn-danger-sm {
    background: none;
    border: none;
    color: var(--ma-danger);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}

.ma-btn-danger-sm:hover {
    background: var(--ma-danger-bg);
}


/* ================================================================ */
/* AREA PLACEHOLDER                                                  */
/* ================================================================ */

.ma-area-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--ma-text-muted);
}

.ma-area-placeholder-icon {
    width: 64px;
    height: 64px;
    color: var(--ma-text-muted);
    margin-bottom: 1rem;
    opacity: 0.4;
}

.ma-area-placeholder-icon svg {
    width: 100%;
    height: 100%;
}

.ma-area-placeholder h2 {
    font-size: 20px;
    margin: 0 0 0.5rem;
    color: var(--ma-text-secondary);
}

.ma-area-placeholder p {
    font-size: 14px;
    margin: 0;
}

.ma-area-placeholder-hint {
    margin-top: 1.5rem;
    font-size: 12px;
    background: var(--ma-border-light);
    padding: 0.5rem 1rem;
    border-radius: var(--ma-radius-sm);
}


/* ================================================================ */
/* EMPTY STATE                                                       */
/* ================================================================ */

.ma-empty {
    padding: 3rem;
    text-align: center;
    color: var(--ma-text-muted);
}


/* ================================================================ */
/* TABLES — TABULAR NUMBERS                                          */
/* ================================================================ */

table {
    font-variant-numeric: tabular-nums;
}


/* ================================================================ */
/* CARDS (generic)                                                   */
/* ================================================================ */

.ma-card {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 1.25rem;
    box-shadow: var(--ma-shadow);
}

.ma-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 1rem 0;
}

.ma-card-action {
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.ma-card-action:hover {
    box-shadow: var(--ma-shadow-md);
    transform: translateY(-1px);
    border-color: var(--ma-primary-light);
}


/* ================================================================ */
/* FORM GRID VARIANTS                                                */
/* ================================================================ */

/* Basis-Grid: ohne -2/-3 Modifier ein-spaltig.                       */
/* Die Modifier setzen die Spalten-Anzahl. Der gap gilt fuer beide.   */
.ma-form-grid {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: 1fr;
}
.ma-form-grid .ma-form-group { display: flex; flex-direction: column; gap: 4px; }
.ma-form-grid .ma-form-group label {
    font-size: 12px; font-weight: 500; color: #475569;
    letter-spacing: 0.01em;
}
.ma-form-grid-2 { grid-template-columns: 1fr 1fr; }
.ma-form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

.ma-input-sm {
    padding: 4px 8px !important;
    font-size: 12px !important;
    width: 60px;
}


/* ================================================================ */
/* SPINNER                                                           */
/* ================================================================ */

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


/* ================================================================ */
/* PHASE NAVIGATION (ma-pn-*)                                        */
/* ================================================================ */

.ma-phase-nav-container {
    padding: 0.75rem 2rem;
    background: var(--ma-card);
    border-bottom: 1px solid var(--ma-border);
    overflow-x: auto;
}

.ma-pn {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: max-content;
}

.ma-pn-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: var(--ma-radius);
    transition: background 0.15s;
    min-width: 90px;
}

.ma-pn-phase:hover {
    background: var(--ma-primary-bg);
}

.ma-pn-phase.active {
    background: var(--ma-primary-bg);
    box-shadow: inset 0 -2px 0 var(--ma-primary);
}

.ma-pn-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    background: var(--ma-border);
    color: var(--ma-text-secondary);
    transition: all 0.15s;
}

.ma-pn-pending .ma-pn-dot { background: var(--ma-border); color: var(--ma-text-muted); }
.ma-pn-in-progress .ma-pn-dot { background: var(--ma-primary); color: white; }
.ma-pn-completed .ma-pn-dot { background: var(--ma-success); color: white; }
.ma-pn-phase.active .ma-pn-dot { background: var(--ma-primary); color: white; box-shadow: 0 0 0 3px var(--ma-primary-bg); }

.ma-pn-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    text-align: center;
    white-space: nowrap;
}

.ma-pn-phase.active .ma-pn-label { color: var(--ma-primary); }

.ma-pn-progress {
    font-size: 10px;
    color: var(--ma-text-muted);
}

.ma-pn-connector {
    width: 24px;
    height: 2px;
    background: var(--ma-border);
    flex-shrink: 0;
}


/* ================================================================ */
/* PHASE WORKSPACE (ma-pw-*)                                         */
/* ================================================================ */

.ma-pw {
    padding: 0;
}

.ma-pw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: var(--ma-card);
    border-bottom: 1px solid var(--ma-border);
}

.ma-pw-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ma-pw-phase-icon { font-size: 28px; }

.ma-pw-phase-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0;
}

.ma-pw-phase-desc {
    font-size: 13px;
    color: var(--ma-text-secondary);
    margin: 2px 0 0;
}

.ma-pw-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ma-pw-progress-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ma-pw-progress-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--ma-primary);
}

.ma-pw-layout {
    display: flex;
    min-height: calc(100vh - 320px);
}

.ma-pw-stepper {
    width: 280px;
    min-width: 280px;
    background: var(--ma-card);
    border-right: 1px solid var(--ma-border);
    padding: 1rem 0;
    overflow-y: auto;
}

.ma-pw-content {
    flex: 1;
    padding: 1.5rem 2rem;
    overflow-y: auto;
    background: var(--ma-bg);
}

.ma-pw-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.15s;
}

.ma-pw-step:hover { background: var(--ma-bg); }
.ma-pw-step.active { background: var(--ma-primary-bg); border-left-color: var(--ma-primary); }

.ma-pw-step-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--ma-border);
    color: var(--ma-text-muted);
}

.ma-pw-step-available .ma-pw-step-indicator { background: var(--ma-border); color: var(--ma-text-muted); }
.ma-pw-step-in-progress .ma-pw-step-indicator { background: var(--ma-primary-bg); color: var(--ma-primary); border: 2px solid var(--ma-primary); }
.ma-pw-step-completed .ma-pw-step-indicator { background: var(--ma-success); color: white; }
.ma-pw-step.active .ma-pw-step-indicator { background: var(--ma-primary); color: white; }

.ma-pw-step-info { flex: 1; min-width: 0; }

.ma-pw-step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ma-pw-step-status {
    font-size: 11px;
    color: var(--ma-text-muted);
}


/* ================================================================ */
/* WORKSTEP (ma-ws-*)                                                */
/* ================================================================ */

.ma-ws {
    max-width: 900px;
}

.ma-ws-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.ma-ws-header-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ma-ws-icon { font-size: 28px; }

.ma-ws-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0;
}

.ma-ws-subtitle {
    font-size: 13px;
    color: var(--ma-text-secondary);
    margin: 2px 0 0;
}

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

.ma-ws-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
}

.ma-ws-status-available { background: var(--ma-border-light); color: var(--ma-text-muted); }
.ma-ws-status-in-progress { background: var(--ma-primary-bg); color: var(--ma-primary); }
.ma-ws-status-completed { background: var(--ma-success-bg); color: var(--ma-success); }

/* Context */
.ma-ws-context {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    margin-bottom: 1.25rem;
}

.ma-ws-context-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    user-select: none;
}

.ma-ws-context-toggle:hover { color: var(--ma-primary); }

.ma-ws-context-chevron {
    transition: transform 0.2s;
    font-size: 14px;
}
.ma-ws-context-chevron.rotated { transform: rotate(-90deg); }

.ma-ws-context-body {
    padding: 0 16px 16px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--ma-text-secondary);
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ma-ws-context-body.collapsed {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
}

.ma-ws-context-body strong { color: var(--ma-text); }
.ma-ws-context-body ul { margin: 4px 0; padding-left: 20px; }
.ma-ws-context-body li { margin: 2px 0; }

/* Tool Area */
.ma-ws-tool {
    margin-bottom: 1.25rem;
}

.ma-ws-tool-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--ma-text-muted);
    background: var(--ma-card);
    border: 1px dashed var(--ma-border);
    border-radius: var(--ma-radius);
}

/* AI Section */
.ma-ws-ai {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    margin-bottom: 1.25rem;
}

.ma-ws-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text-secondary);
}

.ma-ws-ai-result {
    padding: 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--ma-text);
    max-height: 500px;
    overflow-y: auto;
}

.ma-ws-ai-result strong { color: var(--ma-primary); }
.ma-ws-ai-result ul { padding-left: 20px; margin: 8px 0; }
.ma-ws-ai-result li { margin: 4px 0; }

.ma-ws-ai-error {
    color: var(--ma-danger);
    background: var(--ma-danger-bg);
    border-radius: var(--ma-radius-sm);
}

.ma-ws-ai-placeholder {
    padding: 16px;
    font-size: 13px;
    color: var(--ma-text-muted);
    text-align: center;
}

/* Notes */
.ma-ws-notes {
    margin-bottom: 1rem;
}

.ma-ws-notes-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    margin-bottom: 6px;
    display: block;
}

/* Checklist */
.ma-ws-checklist {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    overflow: hidden;
}

.ma-ws-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--ma-border-light);
    cursor: pointer;
    transition: background 0.1s;
}

.ma-ws-checklist-item:last-child { border-bottom: none; }
.ma-ws-checklist-item:hover { background: var(--ma-bg); }
.ma-ws-checklist-item.checked { opacity: 0.6; }
.ma-ws-checklist-item.checked .ma-ws-checklist-text { text-decoration: line-through; }

.ma-ws-checklist-text {
    flex: 1;
    font-size: 13px;
    color: var(--ma-text);
}

.ma-ws-checklist-severity {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.ma-ws-severity-high { background: var(--ma-danger-bg); color: var(--ma-danger); }
.ma-ws-severity-medium { background: var(--ma-warning-bg); color: var(--ma-warning); }
.ma-ws-severity-low { background: var(--ma-success-bg); color: var(--ma-success); }

/* Scoring Matrix */
.ma-ws-scoring-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    overflow: hidden;
    font-size: 13px;
}

.ma-ws-scoring-table th {
    background: var(--ma-bg);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--ma-text-secondary);
    border-bottom: 1px solid var(--ma-border);
}

.ma-ws-scoring-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ma-border-light);
    vertical-align: middle;
}

.ma-ws-scoring-table tfoot td {
    background: var(--ma-bg);
    border-top: 2px solid var(--ma-border);
}

.ma-ws-scoring-hint {
    font-size: 11px;
    color: var(--ma-text-muted);
    margin-top: 2px;
}

/* Team Form */
.ma-ws-team {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 12px;
}

.ma-ws-team-row {
    display: grid;
    grid-template-columns: 180px 1fr 1fr;
    gap: 8px;
    align-items: center;
}

.ma-ws-team-role {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text);
}

/* Quick Valuation */
.ma-ws-quick-val { margin: 0; }

.ma-ws-quick-val-result { margin-top: 1rem; }

.ma-ws-quick-val-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.ma-ws-val-card {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 16px;
    text-align: center;
}

.ma-ws-val-card-primary {
    background: var(--ma-primary-bg);
    border-color: var(--ma-primary);
}

.ma-ws-val-label {
    font-size: 12px;
    color: var(--ma-text-secondary);
    margin-bottom: 4px;
}

.ma-ws-val-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ma-text);
}

.ma-ws-val-card-primary .ma-ws-val-value {
    color: var(--ma-primary);
}

/* Generic Tool */
.ma-ws-generic-tool .ma-card {
    background: var(--ma-bg);
    border: 1px dashed var(--ma-border);
}


/* ================================================================ */
/* MANUAL INPUT FORMS (ma-ws-form-*)                                 */
/* ================================================================ */

.ma-ws-form {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 16px;
}

.ma-ws-form-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ma-border-light);
}

.ma-ws-form-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0 0 2px;
}

.ma-ws-form-hint {
    font-size: 12px;
    color: var(--ma-text-muted);
}

.ma-ws-fieldset {
    border: 1px solid var(--ma-border-light);
    border-radius: var(--ma-radius-sm);
    padding: 12px 14px;
    margin: 0 0 12px;
}

.ma-ws-fieldset legend {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-primary);
    padding: 0 6px;
}

/* Findings (Red Flag) */
.ma-ws-finding-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ma-ws-finding-row .ma-input { flex: 1; }

.ma-ws-findings { margin-bottom: 4px; }


/* ================================================================ */
/* KNOWLEDGE BASE (ma-kb-*)                                          */
/* ================================================================ */

.ma-kb {
    padding: 1.5rem 2rem;
    max-width: 960px;
    margin: 0 auto;
}

.ma-kb-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.ma-kb-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0 0 4px;
}

.ma-kb-subtitle {
    font-size: 13px;
    color: var(--ma-text-secondary);
    margin: 0;
    max-width: 550px;
}

.ma-kb-completeness {
    text-align: right;
}

.ma-kb-completeness-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--ma-primary);
}

.ma-kb-completeness-label {
    font-size: 12px;
    color: var(--ma-text-muted);
}

/* KB Sections (Accordion) */
.ma-kb-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ma-kb-section {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    overflow: hidden;
}

.ma-kb-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
}

.ma-kb-section-header:hover { background: var(--ma-bg); }

.ma-kb-section-icon { font-size: 18px; }

.ma-kb-section-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--ma-text);
}

.ma-kb-section-status {
    font-size: 14px;
    color: var(--ma-success);
}

.ma-kb-section-chevron {
    color: var(--ma-text-muted);
    transition: transform 0.2s;
    font-size: 14px;
}

.ma-kb-section-chevron.rotated { transform: rotate(-90deg); }

.ma-kb-section-body {
    padding: 0 16px 16px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ma-kb-section-body.collapsed {
    max-height: 0 !important;
    padding: 0 16px;
}

.ma-kb-hint {
    font-size: 12px;
    color: var(--ma-text-muted);
    margin: 0 0 12px;
}

/* Strategic Fit Grid */
.ma-kb-fit-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ma-kb-fit-row {
    display: grid;
    grid-template-columns: 160px 80px 1fr;
    gap: 8px;
    align-items: center;
}

.ma-kb-fit-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text);
}

.ma-kb-fit-weight {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--ma-text-secondary);
}

.ma-kb-fit-total {
    margin-top: 8px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
}

/* Deal Breakers */
.ma-kb-dealbreaker-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ma-kb-dealbreaker-icon { font-size: 16px; }

.ma-kb-dealbreaker-row .ma-input { flex: 1; }


/* ================================================================ */
/* CHECKLISTS                                                        */
/* ================================================================ */

.ma-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ma-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.5rem;
    border-radius: var(--ma-radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--ma-border-light);
}

.ma-checklist-item:last-child {
    border-bottom: none;
}

.ma-checklist-item:hover {
    background: var(--ma-border-light);
}

.ma-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--ma-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ma-checkbox.checked {
    background: var(--ma-success);
    border-color: var(--ma-success);
    color: white;
}

.ma-checklist-text {
    font-size: 13px;
    color: var(--ma-text);
    flex: 1;
}

.ma-checklist-item.completed .ma-checklist-text {
    text-decoration: line-through;
    color: var(--ma-text-muted);
}

.ma-checklist-date {
    font-size: 11px;
    color: var(--ma-text-muted);
    white-space: nowrap;
}


/* ================================================================ */
/* INFO LISTS                                                        */
/* ================================================================ */

.ma-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ma-info-list li {
    font-size: 12px;
    color: var(--ma-text-secondary);
    padding: 4px 0;
    line-height: 1.4;
    border-bottom: 1px solid var(--ma-border-light);
}

.ma-info-list li:last-child {
    border-bottom: none;
}

.ma-deliverables li {
    font-weight: 500;
}


/* ================================================================ */
/* TEASER / IM ANALYSIS                                              */
/* ================================================================ */

.ma-teaser-upload-section {
    max-width: 640px;
    margin: 2rem auto;
}

.ma-teaser-upload-area {
    border: 2px dashed var(--ma-border);
    border-radius: var(--ma-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    background: var(--ma-card);
    cursor: pointer;
    transition: all 0.2s;
}

.ma-teaser-upload-area:hover,
.ma-teaser-upload-area.dragover {
    border-color: var(--ma-primary-light);
    background: var(--ma-primary-bg);
}

.ma-teaser-upload-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.ma-teaser-upload-area h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ma-text);
    margin: 0 0 0.5rem 0;
}

.ma-teaser-upload-area p {
    font-size: 13px;
    color: var(--ma-text-secondary);
    margin: 0 0 1.25rem 0;
}

.ma-teaser-upload-formats {
    font-size: 11px;
    color: var(--ma-text-muted);
    margin-top: 0.75rem;
}

.ma-teaser-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.ma-teaser-divider span {
    background: var(--ma-bg);
    padding: 0 1rem;
    font-size: 13px;
    color: var(--ma-text-muted);
    position: relative;
    z-index: 1;
}

.ma-teaser-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ma-border);
}

.ma-teaser-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--ma-border);
    border-top-color: var(--ma-primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 0.8s linear infinite;
}

/* Sub-navigation */
.ma-teaser-subnav {
    display: flex;
    gap: 4px;
    margin-bottom: 1.5rem;
    padding: 4px;
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    overflow-x: auto;
}

.ma-teaser-subnav-btn {
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--ma-radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ma-teaser-subnav-btn:hover {
    background: var(--ma-border-light);
    color: var(--ma-text);
}

.ma-teaser-subnav-btn.active {
    background: var(--ma-primary);
    color: white;
}

/* Section grid */
.ma-teaser-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.ma-teaser-section-grid > .ma-card:first-child {
    grid-column: 1 / -1;
}

/* AI Insights */
.ma-teaser-insight-block {
    margin-bottom: 1rem;
}

.ma-teaser-insight-block:last-child {
    margin-bottom: 0;
}

.ma-teaser-insight-block h5 {
    font-size: 12px;
    font-weight: 700;
    color: var(--ma-text);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 0.5rem 0;
}

.ma-risk-list li { color: var(--ma-danger); }
.ma-opportunity-list li { color: var(--ma-success); }

/* Source document */
.ma-teaser-doc-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ma-teaser-doc-icon {
    font-size: 28px;
}

.ma-teaser-doc-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ma-text);
}

.ma-teaser-doc-meta {
    font-size: 12px;
    color: var(--ma-text-muted);
}

/* Scoring */
.ma-scoring-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ma-scoring-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--ma-border-light);
    transition: background 0.15s;
}

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

.ma-scoring-row:hover {
    background: var(--ma-border-light);
}

.ma-scoring-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--ma-text);
}

.ma-scoring-desc {
    font-size: 12px;
    color: var(--ma-text-muted);
    margin-top: 1px;
}

.ma-scoring-stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ma-star-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 2px;
    color: var(--ma-border);
    transition: color 0.15s, transform 0.1s;
    line-height: 1;
}

.ma-star-btn:hover {
    transform: scale(1.2);
}

.ma-star-btn.active {
    color: var(--ma-warning);
}

.ma-scoring-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    margin-left: 8px;
    min-width: 28px;
    text-align: right;
}

/* Decision buttons */
.ma-decision-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.ma-decision-btn {
    padding: 1.5rem;
    border: 2px solid var(--ma-border);
    border-radius: var(--ma-radius);
    background: var(--ma-card);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.ma-decision-btn:hover {
    border-color: var(--ma-primary-light);
    background: var(--ma-primary-bg);
}

.ma-decision-btn.active.go {
    border-color: var(--ma-success);
    background: var(--ma-success-bg);
}

.ma-decision-btn.active.conditional {
    border-color: var(--ma-warning);
    background: var(--ma-warning-bg);
}

.ma-decision-btn.active.no-go {
    border-color: var(--ma-danger);
    background: var(--ma-danger-bg);
}

.ma-decision-btn-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.ma-decision-btn-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--ma-text);
}

.ma-decision-btn-desc {
    font-size: 12px;
    color: var(--ma-text-secondary);
    margin-top: 2px;
}

/* Decision factors */
.ma-decision-factors {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ma-decision-factor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 13px;
}

.ma-decision-factor:last-child {
    border-bottom: none;
}

.ma-decision-factor-label {
    color: var(--ma-text-secondary);
}

.ma-decision-factor-value {
    font-weight: 600;
    color: var(--ma-text);
}

/* Quick Valuation results */
.ma-qv-results .ma-kpi-card {
    text-align: left;
}


/* ================================================================ */
/* RESPONSIVE                                                        */
/* ================================================================ */

@media (max-width: 1024px) {
    .ma-teaser-section-grid {
        grid-template-columns: 1fr;
    }
    .ma-decision-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ma-sidebar {
        width: 200px;
    }

    .ma-content {
        margin-left: 200px;
    }

    .ma-main {
        padding: 1rem;
    }

    .ma-cockpit-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ma-kpi-row {
        flex-wrap: wrap;
    }

    .ma-kpi-card {
        min-width: calc(50% - 0.5rem);
    }

    .ma-ws-quick-val-cards {
        grid-template-columns: 1fr;
    }
}


/* ================================================================ */
/* DOCUMENT UPLOAD + EXTRACTION INDICATORS                           */
/* (Preserved from v2.0 - needed for document upload feature)        */
/* ================================================================ */

/* Upload zone */
.ma-ws-upload-section {
    margin-bottom: 16px;
}

.ma-ws-upload-zone {
    border: 2px dashed var(--ma-border, #d1d5db);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--ma-bg, #fafafa);
}

.ma-ws-upload-zone:hover,
.ma-ws-upload-zone.ma-ws-upload-dragover {
    border-color: var(--ma-primary, #2563eb);
    background: #eff6ff;
}

.ma-ws-upload-icon {
    font-size: 28px;
    opacity: 0.3;
    margin-bottom: 6px;
}

.ma-ws-upload-text strong {
    display: block;
    font-size: 14px;
    color: var(--ma-text, #1f2937);
    margin-bottom: 2px;
}

.ma-ws-upload-text span {
    font-size: 12px;
    color: var(--ma-text-muted, #9ca3af);
}

.ma-ws-upload-hint {
    font-size: 11px;
    color: var(--ma-text-muted, #9ca3af);
    margin-top: 6px;
}

/* Document list */
.ma-ws-doc-list {
    margin-top: 10px;
}

.ma-ws-doc-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.ma-ws-doc-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ma-ws-doc-meta {
    font-size: 11px;
    color: var(--ma-text-muted, #9ca3af);
    white-space: nowrap;
}

.ma-ws-doc-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--ma-text-muted, #9ca3af);
    transition: all 0.15s;
}

.ma-ws-doc-btn:hover {
    background: #f3f4f6;
    color: var(--ma-text, #1f2937);
}

.ma-ws-doc-type-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.ma-ws-doc-type-teaser { background: #dbeafe; color: #1e40af; }
.ma-ws-doc-type-im { background: #dcfce7; color: #166534; }
.ma-ws-doc-type-nda { background: #fef3c7; color: #92400e; }
.ma-ws-doc-type-process-letter { background: #fce7f3; color: #9d174d; }
.ma-ws-doc-type-mgmt-presentation { background: #ede9fe; color: #5b21b6; }
.ma-ws-doc-type-unknown { background: #f3f4f6; color: #6b7280; }

/* AI-filled field indicators */
.ma-field-ai {
    border-color: #93c5fd !important;
    background: #eff6ff !important;
}

.ma-field-regex {
    border-color: #86efac !important;
    background: #f0fdf4 !important;
}

.ma-field-source-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.3px;
}

.ma-field-source-ai {
    background: #dbeafe;
    color: #1e40af;
}

.ma-field-source-regex {
    background: #dcfce7;
    color: #166534;
}

/* Completeness bar */
.ma-ws-completeness {
    margin: 12px 0 16px;
    padding: 10px 12px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.ma-ws-completeness-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.ma-ws-completeness-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 3px;
    transition: width 0.3s;
}

.ma-ws-completeness-text {
    font-size: 12px;
    color: #6b7280;
}

.ma-ws-completeness-text strong {
    color: #374151;
}

.ma-ws-completeness-missing {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #d97706;
}

.ma-ws-completeness-complete {
    color: #16a34a;
    font-weight: 600;
}

.ma-ws-completeness-legend {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* Upload status messages */
.ma-ws-upload-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 8px;
}

.ma-ws-upload-status-loading {
    background: #eff6ff;
    color: #1d4ed8;
    border-left: 3px solid #2563eb;
}

.ma-ws-upload-status-success {
    background: #f0fdf4;
    color: #15803d;
    border-left: 3px solid #22c55e;
}

.ma-ws-upload-status-error {
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════
   EXECUTIVE OVERVIEW (Horváth-Style) — sehr wenig Farben, monochrom
   Nur 3 RAG-Farben in kleinen 8px-Dots. Alles andere Graustufen.
   ═══════════════════════════════════════════════════════════════════════ */

/* RAG-Dot (einziger Farbakzent in der Executive View) */
.ma-exec-rag-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    vertical-align: middle;
    background: transparent;
    border: 1.5px solid #cbd5e1;
}
.ma-exec-rag-dot[data-rag="green"] { background: #16a34a; border-color: #16a34a; }
.ma-exec-rag-dot[data-rag="amber"] { background: #d97706; border-color: #d97706; }
.ma-exec-rag-dot[data-rag="red"]   { background: #dc2626; border-color: #dc2626; }
.ma-exec-rag-dot[data-rag="na"]    { background: transparent; border-color: #cbd5e1; }

/* Deal-Ampel */
.ma-exec-ampel {
    background: #ffffff;
    border: 1px solid var(--ma-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.ma-exec-ampel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}
.ma-exec-rag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ma-border);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color 0.15s;
}
.ma-exec-rag:hover { border-color: #94a3b8; }
.ma-exec-rag .ma-exec-rag-dot { width: 10px; height: 10px; }
.ma-exec-rag-body { min-width: 0; flex: 1; }
.ma-exec-rag-title {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    margin-bottom: 2px;
}
.ma-exec-rag-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}

.ma-exec-rec {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ma-border);
}
.ma-exec-rec-label {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ma-exec-rec-decision {
    font-size: 14px;
    font-weight: 800;
    color: var(--ma-text);
    letter-spacing: 0.04em;
    padding: 2px 10px;
    border: 1.5px solid var(--ma-text);
    border-radius: 4px;
}
.ma-exec-rec-decision[data-dec="GO"]     { border-color: #16a34a; color: #166534; }
.ma-exec-rec-decision[data-dec="HOLD"]   { border-color: #d97706; color: #9a3412; }
.ma-exec-rec-decision[data-dec="NO-GO"]  { border-color: #dc2626; color: #991b1b; }
.ma-exec-rec-decision[data-dec="REVIEW"] { border-color: #64748b; color: #475569; }
.ma-exec-rec-note { font-size: 12px; color: var(--ma-text-secondary); }

/* Deal-Thesis */
.ma-exec-thesis {
    background: #f8fafc;
    border: 1px solid var(--ma-border);
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
}
.ma-exec-thesis-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}
.ma-exec-thesis-label {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.ma-exec-thesis-lead {
    font-size: 11px;
    color: var(--ma-text-secondary);
}
.ma-exec-thesis-text {
    font-size: 13px;
    color: var(--ma-text);
    line-height: 1.5;
}

/* Value Creation */
.ma-exec-pricerange { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ma-exec-pr-row { display: flex; align-items: center; gap: 10px; }
.ma-exec-pr-lbl {
    width: 100px;
    font-size: 11px;
    color: var(--ma-text-secondary);
    flex-shrink: 0;
}
.ma-exec-pr-bar { flex: 1; height: 6px; background: var(--ma-border-light); border-radius: 3px; overflow: hidden; }
.ma-exec-pr-fill { height: 100%; background: #475569; border-radius: 3px; }
.ma-exec-pr-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--ma-text);
    width: 90px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.ma-exec-pr-val.muted { color: var(--ma-text-muted); font-weight: 500; }

.ma-exec-gap {
    font-size: 11px;
    color: var(--ma-text-secondary);
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 10px;
}
.ma-exec-gap strong { color: var(--ma-text); }

.ma-exec-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 6px;
}
.ma-exec-metric {
    text-align: left;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 4px;
}
.ma-exec-metric-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.ma-exec-metric-lbl {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.ma-exec-metric-sub {
    text-transform: none;
    letter-spacing: 0;
    color: var(--ma-text-secondary);
    font-weight: 500;
}

/* Meilenstein-Tabelle */
.ma-exec-mst { width: 100%; border-collapse: collapse; font-size: 12px; }
.ma-exec-mst th {
    text-align: left;
    font-weight: 500;
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 6px 8px 6px 0;
    border-bottom: 1px solid var(--ma-border);
}
.ma-exec-mst td {
    padding: 8px 8px 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}
.ma-exec-mst tr:last-child td { border-bottom: none; }
.ma-exec-mst-lbl { font-weight: 600; }
.ma-exec-mst td.muted { color: var(--ma-text-muted); }

/* Risiko- & DD-Radar */
.ma-exec-breakers {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--ma-text);
}
.ma-exec-sev-row {
    display: flex;
    gap: 18px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    margin-bottom: 10px;
}
.ma-exec-sev-cell {
    font-size: 11px;
    color: var(--ma-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ma-exec-sev-n {
    display: inline-block;
    font-size: 15px;
    font-weight: 700;
    color: var(--ma-text);
    margin-right: 4px;
    font-variant-numeric: tabular-nums;
}

.ma-exec-dd-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.ma-exec-dd-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    background: #f8fafc;
    border-radius: 4px;
}
.ma-exec-dd-cell .ma-exec-rag-dot { width: 7px; height: 7px; }
.ma-exec-dd-lbl {
    font-size: 10px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ma-exec-dd-pct {
    font-size: 11px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}
.ma-exec-dd-f { font-size: 9px; color: #dc2626; font-weight: 700; }

.ma-exec-findings { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ma-border-light); }
.ma-exec-findings-hdr {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.ma-exec-finding {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    font-size: 11px;
    line-height: 1.4;
}
.ma-exec-finding-stream {
    font-weight: 600;
    color: var(--ma-text-secondary);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    padding-top: 1px;
}
.ma-exec-finding-txt { color: var(--ma-text); }

/* Offene Entscheidungen */
.ma-exec-pending { display: flex; flex-direction: column; gap: 0; }
.ma-exec-pending-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 12px;
}
.ma-exec-pending-row:last-child { border-bottom: none; }
.ma-exec-pending-type {
    font-size: 9px;
    font-weight: 700;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 28px;
    flex-shrink: 0;
}
.ma-exec-pending-lbl { color: var(--ma-text); flex: 1; text-decoration: none; }
a.ma-exec-pending-lbl:hover { text-decoration: underline; }
.ma-exec-pending-hint {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Changelog */
.ma-exec-changelog { display: flex; flex-direction: column; gap: 0; }
.ma-exec-cl-row {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 12px;
}
.ma-exec-cl-row:last-child { border-bottom: none; }
.ma-exec-cl-date {
    width: 80px;
    color: var(--ma-text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.ma-exec-cl-text { color: var(--ma-text); }

/* Gemeinsame Helfer */
.ma-exec-link {
    float: right;
    font-size: 11px;
    font-weight: 500;
    color: var(--ma-text-secondary);
    text-decoration: none;
}
.ma-exec-link:hover { color: var(--ma-text); text-decoration: underline; }
.ma-exec-panel-hint { font-size: 10px; color: var(--ma-text-muted); font-weight: 400; }

/* Responsive: Deal-Ampel schrumpft auf 2-spaltig auf schmalen Screens */
@media (max-width: 1100px) {
    .ma-exec-ampel-grid { grid-template-columns: repeat(3, 1fr); }
    .ma-exec-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .ma-exec-dd-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════════════
   POST-SIGNING & CANCELLED — monochrom, passend zum Executive-View
   ═══════════════════════════════════════════════════════════════════════ */

/* Abschluss-Banner (dunkel, neutral) */
.ma-exec-closed-banner {
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ma-exec-closed-status { display: flex; align-items: center; gap: 12px; }
.ma-exec-closed-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border: 1.5px solid #16a34a;
    color: #86efac;
    border-radius: 4px;
    background: rgba(22, 163, 74, 0.1);
}
.ma-exec-closed-company {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.ma-exec-closed-dates {
    display: flex;
    gap: 18px;
    font-size: 12px;
    color: #cbd5e1;
    flex-wrap: wrap;
}
.ma-exec-closed-dates strong { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.ma-exec-closed-lbl {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

/* Cancelled-Banner (einziger roter Akzent durch Rand + Badge) */
.ma-exec-cancelled-banner {
    background: #fff;
    border: 1px solid var(--ma-border);
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.ma-exec-cancelled-status { display: flex; align-items: center; gap: 12px; }
.ma-exec-cancelled-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border: 1.5px solid #dc2626;
    color: #991b1b;
    border-radius: 4px;
}
.ma-exec-cancelled-banner .ma-exec-closed-company { color: var(--ma-text); }
.ma-exec-cancelled-banner .ma-exec-closed-dates { color: var(--ma-text-secondary); }
.ma-exec-cancelled-banner .ma-exec-closed-dates strong { color: var(--ma-text); }
.ma-exec-cancelled-banner .ma-exec-closed-lbl { color: var(--ma-text-muted); }

/* Finaler Preis – Edit-Button sieht wie Text-Link aus */
button[data-final-price-edit] {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    float: right;
    font-size: 11px;
    font-weight: 500;
    color: var(--ma-text-secondary);
}
button[data-final-price-edit]:hover { color: var(--ma-text); text-decoration: underline; }

.ma-exec-pr-hint {
    font-size: 10px;
    font-weight: 500;
    color: var(--ma-text-muted);
    margin-left: 4px;
}

/* Earn-Out-Kalender */
.ma-exec-earnouts { display: flex; flex-direction: column; gap: 0; }
.ma-exec-earnout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 12px;
}
.ma-exec-earnout:last-child { border-bottom: none; }
.ma-exec-earnout-desc { flex: 1; color: var(--ma-text); }
.ma-exec-earnout-amt {
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}
.ma-exec-earnout-date {
    font-size: 11px;
    color: var(--ma-text-muted);
    width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* PMI-Workstreams */
.ma-exec-pmi-list { display: flex; flex-direction: column; gap: 6px; }
.ma-exec-pmi-row { display: flex; align-items: center; gap: 8px; }
.ma-exec-pmi-lbl {
    font-size: 11px;
    font-weight: 500;
    color: var(--ma-text-secondary);
    width: 140px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ma-exec-pmi-bar { flex: 1; height: 5px; background: var(--ma-border-light); border-radius: 3px; overflow: hidden; }
.ma-exec-pmi-fill { height: 100%; background: #475569; border-radius: 3px; }
.ma-exec-pmi-stats {
    font-size: 10px;
    color: var(--ma-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Closing Conditions */
.ma-exec-cond-list { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.ma-exec-cond-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 12px;
}
.ma-exec-cond-row:last-child { border-bottom: none; }
.ma-exec-cond-lbl { flex: 1; color: var(--ma-text); }
.ma-exec-cond-st {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Cancelled – Grund + Notes + Stats */
.ma-exec-cancel-reason {
    font-size: 13px;
    font-weight: 600;
    color: var(--ma-text);
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 6px;
}
.ma-exec-cancel-notes {
    font-size: 12px;
    color: var(--ma-text-secondary);
    line-height: 1.5;
    padding: 6px 10px;
}
.ma-exec-cancel-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.ma-exec-cancel-stat {
    text-align: left;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
}
.ma-exec-cancel-n {
    font-size: 16px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.ma-exec-cancel-l {
    font-size: 10px;
    color: var(--ma-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

@media (max-width: 900px) {
    .ma-exec-closed-banner, .ma-exec-cancelled-banner { flex-direction: column; align-items: flex-start; }
    .ma-exec-cancel-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════════════════
   IC-Memo Übersicht — McKinsey-Stil
   ═══════════════════════════════════════════════════════════════ */

/* 5-Pillar Scorecard */
.ma-exec-scorecard {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.ma-pillar {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, transform .15s;
}
.ma-pillar:hover {
    border-color: var(--ma-text-muted);
    transform: translateY(-1px);
}
.ma-pillar-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}
.ma-pillar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ma-pillar-dot[data-rag="green"] { background: #16a34a; }
.ma-pillar-dot[data-rag="amber"] { background: #d97706; }
.ma-pillar-dot[data-rag="red"]   { background: #dc2626; }
.ma-pillar-dot[data-rag="na"]    { background: var(--ma-border); }
.ma-pillar-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ma-text-muted);
}
.ma-pillar-primary {
    font-size: 22px;
    font-weight: 700;
    color: var(--ma-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
}
.ma-pillar-primary-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--ma-text-muted);
    margin-left: 2px;
}
.ma-pillar-na {
    font-size: 14px;
    font-weight: 500;
    color: var(--ma-text-muted);
}
.ma-pillar-secondary {
    font-size: 11px;
    color: var(--ma-text-muted);
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid var(--ma-border-light);
    line-height: 1.4;
}
.ma-pillar-link {
    font-size: 10px;
    color: var(--ma-primary);
    margin-top: 4px;
}

/* Empfehlung Deal-Team Bar */
.ma-exec-rec-bar {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-left-width: 4px;
    border-radius: var(--ma-radius);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 12px;
}
.ma-exec-rec-block { min-width: 110px; }
.ma-exec-rec-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ma-text-muted);
    margin-bottom: 4px;
}
.ma-exec-rec-decision-big {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.ma-exec-rec-rationale {
    flex: 1;
    font-size: 13px;
    color: var(--ma-text);
    line-height: 1.5;
    font-style: italic;
}
.ma-exec-rec-by {
    font-size: 11px;
    color: var(--ma-text-muted);
    text-align: right;
    line-height: 1.5;
    flex-shrink: 0;
    min-width: 200px;
}
.ma-exec-rec-by strong { color: var(--ma-text-secondary); font-weight: 600; }
.ma-exec-rec-source {
    font-size: 10px;
    color: var(--ma-text-faint, #94a3b8);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* 4-Spalten Quad */
.ma-exec-quad {
    display: grid;
    grid-template-columns: 1.05fr 1fr 1.1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.ma-quad-panel {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 14px 18px;
}

/* Top-Risiken Liste */
.ma-exec-risks-list { display: flex; flex-direction: column; }
.ma-exec-risk-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
    font-size: 12px;
    text-decoration: none;
    color: inherit;
}
.ma-exec-risk-row:last-child { border-bottom: none; }
.ma-exec-risk-row:hover { background: var(--ma-bg); }
.ma-exec-risk-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}
.ma-exec-risk-dot[data-sev="critical"] { background: #dc2626; }
.ma-exec-risk-dot[data-sev="high"]     { background: #dc2626; }
.ma-exec-risk-dot[data-sev="medium"]   { background: #d97706; }
.ma-exec-risk-dot[data-sev="low"]      { background: #16a34a; }
.ma-exec-risk-source {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ma-text-muted);
    flex-shrink: 0;
    width: 56px;
}
.ma-exec-risk-text {
    flex: 1;
    color: var(--ma-text);
    line-height: 1.4;
}
.ma-exec-risk-arrow {
    color: var(--ma-text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

/* Synergien-Panel */
.ma-exec-syn-row {
    padding: 8px 0;
    border-bottom: 1px solid var(--ma-border-light);
}
.ma-exec-syn-row:last-of-type { border-bottom: none; }
.ma-exec-syn-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
.ma-syn-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 3px;
}
.ma-syn-tag-rev  { background: #ecfdf5; color: #166534; }
.ma-syn-tag-cost { background: #eff6ff; color: #1e40af; }
.ma-syn-tag-tax  { background: #f1f5f9; color: var(--ma-text-secondary); }
.ma-syn-tag-inv  { background: #faf5ff; color: #6b21a8; }
.ma-exec-syn-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--ma-text);
    font-variant-numeric: tabular-nums;
}
.ma-exec-syn-desc {
    font-size: 11px;
    color: var(--ma-text-muted);
    line-height: 1.4;
}
.ma-exec-syn-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ma-border);
}
.ma-exec-syn-foot-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 3px 0;
    color: var(--ma-text-secondary);
}
.ma-exec-syn-foot-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ma-syn-pos { color: #166534; }
.ma-syn-neg { color: #b45309; }

/* DD-Workstreams Panel */
.ma-exec-dd-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 11px;
    text-decoration: none;
    color: inherit;
}
.ma-exec-dd-row:hover { background: var(--ma-bg); }
.ma-exec-dd-label {
    width: 76px;
    font-weight: 600;
    color: var(--ma-text-secondary);
    flex-shrink: 0;
}
.ma-exec-dd-bar {
    flex: 1;
    height: 5px;
    background: var(--ma-border-light);
    border-radius: 3px;
    overflow: hidden;
}
.ma-exec-dd-fill {
    height: 100%;
    background: var(--ma-primary-light);
    border-radius: 3px;
}
.ma-exec-dd-pct {
    width: 32px;
    text-align: right;
    font-weight: 600;
    color: var(--ma-text-muted);
    font-variant-numeric: tabular-nums;
}
.ma-exec-dd-find {
    width: 18px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.ma-exec-dd-find-high { color: var(--ma-danger); }
.ma-exec-dd-find-none { color: var(--ma-text-muted); }
.ma-exec-dd-legend {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ma-border-light);
    font-size: 10px;
    color: var(--ma-text-muted);
}

/* Phasen-Timeline */
.ma-exec-tl {
    position: relative;
    padding-left: 4px;
}
.ma-exec-tl::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--ma-border);
}
.ma-exec-tl-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.ma-exec-tl-row:hover { opacity: 0.85; }
.ma-exec-tl-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--ma-card);
    border: 1.5px solid var(--ma-border);
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}
.ma-exec-tl-dot.done {
    background: #16a34a;
    border-color: #16a34a;
}
.ma-exec-tl-dot.current {
    background: var(--ma-card);
    border: 2.5px solid var(--ma-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}
.ma-exec-tl-body { flex: 1; min-width: 0; }
.ma-exec-tl-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--ma-text);
    line-height: 1.3;
}
.ma-exec-tl-row.current .ma-exec-tl-name { color: var(--ma-primary); }
.ma-exec-tl-row:not(.done):not(.current) .ma-exec-tl-name {
    color: var(--ma-text-secondary);
    font-weight: 500;
}
.ma-exec-tl-meta {
    font-size: 10px;
    color: var(--ma-text-muted);
    margin-top: 2px;
}
.ma-exec-tl-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    background: var(--ma-primary);
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 4px;
    vertical-align: 1px;
}
.ma-exec-tl-pct {
    font-size: 11px;
    font-weight: 600;
    color: var(--ma-text-muted);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.ma-exec-tl-row.done .ma-exec-tl-pct { color: #16a34a; }
.ma-exec-tl-row.current .ma-exec-tl-pct { color: var(--ma-primary); }

/* Footer-Strip */
.ma-exec-footer {
    background: var(--ma-card);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 11px;
    color: var(--ma-text-muted);
}
.ma-exec-footer-activity { flex: 1; }
.ma-exec-footer-label {
    font-weight: 600;
    color: var(--ma-text-secondary);
    margin-right: 6px;
}
.ma-exec-footer-actions { display: flex; gap: 8px; }
.ma-exec-footer-btn {
    font-size: 11px;
    padding: 5px 12px;
    background: var(--ma-bg);
    border: 1px solid var(--ma-border);
    border-radius: var(--ma-radius-sm);
    color: var(--ma-text-secondary);
    cursor: pointer;
    font-family: inherit;
}
.ma-exec-footer-btn:hover {
    border-color: var(--ma-text-muted);
    color: var(--ma-text);
}
.ma-exec-footer-stamp { font-variant-numeric: tabular-nums; }

@media (max-width: 1200px) {
    .ma-exec-scorecard { grid-template-columns: repeat(3, 1fr); }
    .ma-exec-quad { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
    .ma-exec-scorecard { grid-template-columns: repeat(2, 1fr); }
    .ma-exec-quad { grid-template-columns: 1fr; }
    .ma-exec-rec-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
}
