:root {
    --bg-body: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-input-disabled: #f5f5f5;
    --bg-section: #f5f7fa;
    --bg-hover: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #888888;
    --text-hint: #999999;
    --border-color: #e0e0e0;
    --border-light: #eee;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-header: 0 4px 20px rgba(0,0,0,0.15);
}
.dark-mode {
    --bg-body: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --bg-card: #1e1e2f;
    --bg-input: #2a2a3d;
    --bg-input-disabled: #252536;
    --bg-section: #252536;
    --bg-hover: #2a2a3d;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --text-hint: #52525b;
    --border-color: #3f3f46;
    --border-light: #27272a;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-header: 0 4px 20px rgba(0,0,0,0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg-body); min-height: 100vh; padding: 15px; padding-top: 70px; transition: background 0.3s; }
.sticky-wrapper { position: fixed; top: 0; left: 0; right: 0; z-index: 1000;}
.sticky-bar { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); padding: 12px 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.sticky-item { background: rgba(255,255,255,0.15); backdrop-filter: blur(10px); padding: 8px 16px; border-radius: 8px; display: flex; align-items: center; gap: 8px; color: white; min-width: 140px; }
.sticky-item.gewinn { background: linear-gradient(135deg, rgba(76,175,80,0.3), rgba(56,142,60,0.3)); border: 1px solid rgba(76,175,80,0.5); }
.sticky-item.sub { background: linear-gradient(135deg, rgba(33,150,243,0.3), rgba(25,118,210,0.3)); border: 1px solid rgba(33,150,243,0.5); }
.sticky-item.rest { background: linear-gradient(135deg, rgba(29,78,216,0.25), rgba(30,64,175,0.25)); border: 1px solid rgba(29,78,216,0.4); }
.sticky-item.danger { background: linear-gradient(135deg, rgba(244,67,54,0.3), rgba(211,47,47,0.3)); border: 1px solid rgba(244,67,54,0.5); }
.sticky-divider { width: 2px; height: 40px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.sticky-models { display: flex; gap: 4px; }
.sticky-model { background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s; text-align: center; min-width: 80px; border: 2px solid transparent; }
.sticky-model:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.sticky-model.active { background: rgba(34,197,94,0.3); border-color: rgba(34,197,94,0.6); box-shadow: 0 0 10px rgba(34,197,94,0.3); }
.sticky-model-label { font-size: 9px; color: rgba(255,255,255,0.7); text-transform: uppercase; }
.sticky-model-value { font-size: 13px; font-weight: 800; color: white; }
.sticky-model.best .sticky-model-value { color: #4ade80; }
.sticky-model.negative .sticky-model-value { color: #f87171; }
.sticky-label { font-size: 10px; text-transform: uppercase; opacity: 0.8; letter-spacing: 0.5px; }
.sticky-value { font-size: 16px; font-weight: 800; }
.sticky-percent { font-size: 11px; opacity: 0.8; }
@media (max-width: 768px) { .sticky-bar { gap: 6px; padding: 8px 10px; } .sticky-item { padding: 6px 10px; min-width: auto; flex: 1; } .sticky-value { font-size: 14px; } .sticky-models { display: none; } .sticky-divider { display: none; } .budget-status-bar { padding: 10px 16px; font-size: 12px; } .container { padding-top: 96px; } }
.container { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; padding-top: 112px; }
.header { order: 1; background: var(--bg-card); border-radius: 16px; padding: 32px 24px 20px 24px; margin-bottom: 20px; box-shadow: var(--shadow-header); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; transition: background 0.3s; }
.budget-status-bar { background: linear-gradient(135deg, #64748b 0%, #475569 100%); color: white; padding: 12px 24px; border-radius: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: 0.3px; text-align: center; transition: all 0.3s ease; }
.budget-status-bar.status-ok { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); box-shadow: 0 4px 12px rgba(34,197,94,0.3); }
.budget-status-bar.status-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.budget-status-bar.status-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); animation: pulse-danger 2s ease-in-out infinite; }
@keyframes pulse-danger { 0%, 100% { box-shadow: 0 4px 12px rgba(239,68,68,0.3); } 50% { box-shadow: 0 4px 20px rgba(239,68,68,0.5); } }
.exec-dashboard { order: 4; background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: white; border-radius: 16px; padding: 24px; margin-bottom: 20px; box-shadow: 0 8px 32px rgba(30,60,114,0.3); }
.main-layout { order: 3; display: grid; gap: 20px; grid-template-columns: 1fr 360px; }
.header-left { text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; }
.header-icon { font-size: 36px; margin-bottom: 8px; }
.header h1 { color: var(--text-primary); font-size: 26px; margin-bottom: 4px; }
.header h1 span { color: #4CAF50; }
.header p { color: var(--text-secondary); font-size: 13px; }
.build-info { font-size: 11px; color: var(--text-hint); margin-top: 4px; }
.cache-active { color: #4CAF50; font-weight: 600; }
.project-name-display { margin-top: 12px; display: flex; align-items: center; gap: 8px; background: var(--bg-section); padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border-color); cursor: pointer; }
.project-name-text { font-weight: 700; color: var(--text-primary); font-size: 15px; }
.edit-icon { opacity: 0.6; transition: opacity 0.2s; font-size: 14px; }
.project-name-display:hover .edit-icon { opacity: 1; }
.header-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { padding: 10px 18px; border: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: #fff; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-primary { background: linear-gradient(135deg, #2196F3, #1976D2); }
.btn-success { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.btn-danger { background: linear-gradient(135deg, #f44336, #d32f2f); }
.btn-secondary { background: linear-gradient(135deg, #607D8B, #455A64); }
.btn-purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.card { background: var(--bg-card); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-card); margin-bottom: 20px; transition: background 0.3s, box-shadow 0.3s; }
.section-header { font-size: 17px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; color: var(--text-primary); }
.section-number { background: #2196F3; color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; }
.input-group { margin-bottom: 16px; }
.input-label { display: block; margin-bottom: 6px; font-weight: 600; color: var(--text-primary); font-size: 13px; }
.input-field { width: 100%; padding: 12px 14px; border: 2px solid var(--border-color); border-radius: 8px; font-size: 15px; transition: all 0.2s; background: var(--bg-input); color: var(--text-primary); }
.input-field:focus { outline: none; border-color: #2196F3; box-shadow: 0 0 0 3px rgba(33,150,243,0.1); }
.input-field::placeholder { color: #c0c0c0; opacity: 0.6; }
.input-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exec-dashboard { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); color: white; border-radius: 16px; padding: 24px; margin-bottom: 20px; box-shadow: 0 8px 32px rgba(30,60,114,0.3); }
.exec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.exec-title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.exec-buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.exec-status { background: var(--bg-card); color: var(--text-primary); padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.info-banner { background: var(--bg-card); border-left: 4px solid #2196F3; padding: 12px 16px; border-radius: 8px; font-size: 12px; color: var(--text-primary); margin-bottom: 16px; }
.exec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 900px) { .exec-grid { grid-template-columns: 1fr; } }
.exec-card { background: var(--bg-card); padding: 18px; border-radius: 12px; border-left: 4px solid; box-shadow: var(--shadow-card); }
.exec-card-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; margin-bottom: 6px; }
.exec-card-value { font-size: 26px; font-weight: 900; margin-bottom: 4px; line-height: 1.1; color: var(--text-primary) !important; }
.exec-card-sub { font-size: 11px; font-weight: 600; color: var(--text-secondary) !important; }
.exec-card-details { border-top: 1px solid var(--border-light); margin-top: 10px; padding-top: 10px; }
.exec-card-detail { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 3px; color: var(--text-secondary); }
.exec-restbetrag { padding: 24px; border-radius: 12px; border: 3px solid; text-align: center; margin-bottom: 16px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); transition: all 0.3s ease; }
.exec-restbetrag-normal { background: #e3f2fd; border-color: #2196F3; color: #0d47a1; }
.exec-restbetrag-warning { background: #fff3e0; border-color: #FF9800; color: #e65100; }
.exec-restbetrag-danger { background: #ffebee; border-color: #f44336; color: #b71c1c; animation: pulse-border 2s infinite; }
.dark-mode .exec-restbetrag-normal { background: rgba(33,150,243,0.2); color: #90caf9; }
.dark-mode .exec-restbetrag-warning { background: rgba(255,152,0,0.2); color: #ffcc80; }
.dark-mode .exec-restbetrag-danger { background: rgba(244,67,54,0.2); color: #ef9a9a; }
@keyframes pulse-border { 0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); } }
.exec-restbetrag-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; opacity: 0.9; margin-bottom: 8px; }
.exec-restbetrag-value { font-size: 40px; font-weight: 900; line-height: 1; }
.exec-restbetrag-percent { font-size: 13px; font-weight: 600; margin-top: 8px; opacity: 0.9; }
.exec-metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 900px) { .exec-metrics { grid-template-columns: repeat(2, 1fr); } }
.exec-metric { background: rgba(255,255,255,0.15); padding: 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.3); }
.exec-metric-label { font-size: 9px; text-transform: uppercase; opacity: 0.9; margin-bottom: 4px; letter-spacing: 0.5px; color: #fff; font-weight: 600; }
.exec-metric-value { font-size: 18px; font-weight: 700; line-height: 1.2; color: #fff; }
.exec-metric-sub { font-size: 8px; opacity: 0.8; margin-top: 2px; color: #eee; }
.progress-container { margin-bottom: 20px; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 8px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: #fff; font-weight: 600; }
.progress-bar { background: rgba(255,255,255,0.2); height: 12px; border-radius: 6px; overflow: hidden; }
.progress-fill { background: linear-gradient(90deg, #4CAF50, #8BC34A); height: 100%; width: 0%; transition: all 0.5s; border-radius: 6px; }
.exec-indicators { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .exec-indicators { grid-template-columns: repeat(2, 1fr); } }
.exec-indicator { display: flex; align-items: center; gap: 12px; background: var(--bg-card); padding: 14px; border-radius: 10px; color: var(--text-primary); }
.exec-indicator-icon { font-size: 28px; }
.exec-indicator-label { font-size: 10px; text-transform: uppercase; color: var(--text-secondary); font-weight: 600; }
.exec-indicator-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.main-layout { display: grid; gap: 20px; grid-template-columns: 1fr 360px; }
@media (max-width: 1024px) { .main-layout { grid-template-columns: 1fr; } }
.sticky-sidebar { position: sticky; top: 15px; align-self: flex-start; }
.security-split { background: linear-gradient(135deg, #fff8e1, #fff3cd); border: 2px solid #f59e0b; border-radius: 12px; padding: 16px; margin-top: 16px; }
.model-section-active { 
    background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(22,163,74,0.08)) !important; 
    border: 3px solid #22c55e !important; 
    box-shadow: 0 0 30px rgba(34,197,94,0.25), inset 0 0 20px rgba(34,197,94,0.05) !important;
    transform: scale(1.01);
    transition: all 0.3s ease;
}
.model-section-active::before {
    content: '✓ AKTIV';
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(34,197,94,0.4);
    z-index: 10;
}
[id^="model-section-"] {
    position: relative;
    transition: all 0.3s ease;
}
.model-kosten-box { background: linear-gradient(135deg, #fef3c7, #fef9c3); border: 1px solid #fcd34d; border-radius: 10px; padding: 14px; margin-top: 16px; }
.model-kosten-header { font-size: 11px; font-weight: 700; color: #92400e; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.model-kosten-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 11px; color: #78350f; }
.model-kosten-total { border-top: 2px solid #f59e0b; margin-top: 10px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 700; color: #b45309; }
.dark-mode .security-split { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(217,119,6,0.15)); }
.security-split-header { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #92400e; margin-bottom: 12px; }
.dark-mode .security-split-header { color: #fcd34d; }
.security-split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.security-split-result { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 2px solid #4CAF50; border-radius: 10px; padding: 14px; text-align: center; }
.dark-mode .security-split-result { background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(56,142,60,0.15)); }
.security-split-valid { color: #2e7d32; font-weight: 700; margin-bottom: 10px; }
.dark-mode .security-split-valid { color: #81c784; }
.security-split-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.security-split-box { background: var(--bg-card); padding: 12px; border-radius: 8px; text-align: center; }
.security-split-box-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.security-split-box-value { font-size: 20px; font-weight: 900; color: var(--text-primary); }
.security-split-box-percent { font-size: 11px; color: var(--text-muted); }
.security-split-total { margin-top: 10px; font-weight: 700; color: #1565c0; }
.dark-mode .security-split-total { color: #64b5f6; }
.hours-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 768px) { .hours-stats { grid-template-columns: repeat(2, 1fr); } }
.hours-stat { padding: 14px; border-radius: 10px; color: white; text-align: center; }
.hours-stat-label { font-size: 11px; opacity: 0.9; margin-bottom: 4px; }
.hours-stat-value { font-size: 22px; font-weight: 900; }
.hours-stat-1 { background: linear-gradient(135deg, #2196F3, #1976D2); }
.hours-stat-2 { background: linear-gradient(135deg, #FF9800, #F57C00); }
.hours-stat-3 { background: linear-gradient(135deg, #FFC107, #FFA000); }
.hours-stat-4 { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.quick-entry { background: var(--bg-section); border: 2px solid var(--border-color); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.quick-entry-header { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text-primary); margin-bottom: 12px; }
.quick-entry-row { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 768px) { .quick-entry-row { grid-template-columns: 1fr 1fr; } }
.quick-entry-sum { text-align: center; color: #1565c0; font-weight: 700; margin-top: 12px; }
.dark-mode .quick-entry-sum { color: #64b5f6; }
.teilrechnung-item { background: var(--bg-section); border: 2px solid var(--border-color); border-radius: 10px; padding: 14px; margin-bottom: 10px; }

/* Arbeitsstunden-Liste */
.hour-item { background: var(--bg-section); border: 2px solid var(--border-color); border-radius: 10px; padding: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: all 0.2s ease; }
.hour-item:hover { border-color: #9C27B0; box-shadow: 0 2px 8px rgba(156,39,176,0.15); }
.dark-mode .hour-item:hover { box-shadow: 0 2px 8px rgba(156,39,176,0.3); }
.hour-info { flex: 1; min-width: 0; }
.hour-name { font-weight: 700; color: var(--text-primary); font-size: 14px; margin-bottom: 4px; }
.hour-description { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hour-meta { font-size: 13px; color: #9C27B0; font-weight: 600; }
.dark-mode .hour-meta { color: #ce93d8; }
.hour-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.hour-actions { display: flex; gap: 6px; flex-shrink: 0; }
.btn-small { padding: 6px 10px; font-size: 11px; min-width: auto; }

.empty-state { text-align: center; padding: 40px; color: var(--text-muted); background: var(--bg-section); border-radius: 10px; border: 2px dashed var(--border-color); }
.empty-state-icon { font-size: 48px; margin-bottom: 10px; opacity: 0.5; }
.sum-box { background: linear-gradient(135deg, #fff3e0, #ffe0b2); padding: 16px; border-radius: 10px; border: 2px solid #ff9800; display: flex; justify-content: space-between; align-items: center; }
.dark-mode .sum-box { background: linear-gradient(135deg, rgba(255,152,0,0.2), rgba(255,152,0,0.1)); }
.sum-box-label { font-weight: 700; color: #e65100; }
.dark-mode .sum-box-label { color: #ffb74d; }
.sum-box-value { font-size: 24px; font-weight: 900; color: #f57c00; }
.dark-mode .sum-box-value { color: #ffcc80; }
.calc-box { padding: 14px; border-radius: 10px; margin-bottom: 10px; border: 2px solid; transition: all 0.3s ease; }
.calc-box-yellow { background: #fff8e1; border-color: #f59e0b; }
.calc-box-blue { background: #e3f2fd; border-color: #2196F3; }
.calc-box-orange { background: #fff3e0; border-color: #ff9800; }
.calc-box-green { background: #e8f5e9; border-color: #4CAF50; }
.calc-box-red { background: #ffebee; border-color: #f44336; }
.calc-box-gray { background: #f5f5f5; border-color: #9e9e9e; }
.calc-box-purple { background: #f3e5f5; border-color: #9C27B0; }
.dark-mode .calc-box-yellow { background: rgba(245,158,11,0.15); }
.dark-mode .calc-box-blue { background: rgba(33,150,243,0.15); }
.dark-mode .calc-box-orange { background: rgba(255,152,0,0.15); }
.dark-mode .calc-box-green { background: rgba(76,175,80,0.15); }
.dark-mode .calc-box-red { background: rgba(244,67,54,0.15); }
.dark-mode .calc-box-gray { background: rgba(158,158,158,0.15); }
.dark-mode .calc-box-purple { background: rgba(156,39,176,0.15); }
.calc-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.calc-value { font-size: 22px; font-weight: 900; color: var(--text-primary); }
.calc-formula { font-size: 11px; margin-top: 6px; opacity: 0.8; line-height: 1.4; color: var(--text-secondary); }
.tip-box { background: linear-gradient(135deg, #fff8e1, #fff3cd); border-left: 4px solid #f59e0b; padding: 12px 16px; border-radius: 8px; font-size: 12px; color: #92400e; margin-bottom: 16px; }
.dark-mode .tip-box { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(245,158,11,0.1)); color: #fcd34d; }
.hu-info-box { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 2px solid #4CAF50; border-radius: 10px; padding: 14px; }
.hu-info-box .hu-name { font-weight: 700; font-size: 15px; color: #2e7d32; margin-bottom: 8px; }
.hu-info-box .hu-details { font-size: 13px; color: #388e3c; line-height: 1.6; }
.dark-mode .hu-info-box { background: linear-gradient(135deg, rgba(76,175,80,0.2), rgba(76,175,80,0.1)); }
.dark-mode .hu-info-box .hu-name { color: #81c784; }
.dark-mode .hu-info-box .hu-details { color: #a5d6a7; }
.smart-sync-info { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 1px solid #4CAF50; padding: 10px 14px; border-radius: 8px; font-size: 11px; color: #2e7d32; margin-top: 12px; display: flex; align-items: center; gap: 8px; }
.dark-mode .smart-sync-info { background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(76,175,80,0.1)); color: #81c784; }
.invoice-table-container { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 16px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--bg-card); }
.invoice-table th { background: var(--bg-section); color: var(--text-secondary); font-weight: 600; text-align: left; padding: 12px 16px; border-bottom: 2px solid var(--border-color); }
.invoice-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
.invoice-table tr:hover { background: var(--bg-hover); }
.invoice-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: #e3f2fd; color: #1565c0; }
.dark-mode .invoice-badge { background: rgba(33,150,243,0.2); color: #64b5f6; }
.invoice-amount { font-weight: 700; color: var(--text-primary); }
.invoice-action-btn { background: transparent; border: none; cursor: pointer; padding: 6px; border-radius: 4px; transition: background 0.2s; color: #a0aec0; margin: 0 2px; }
.invoice-action-btn:hover { background: #e2e8f0; color: #4a5568; }
.invoice-action-btn.delete:hover { background: #fee2e2; color: #e53e3e; }
.cost-detail-item { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border-left: 3px solid #2196F3; padding: 8px 12px; border-radius: 6px; margin-bottom: 6px; }
.cost-detail-label { font-size: 10px; color: #1565c0; font-weight: 600; text-transform: uppercase; }
.cost-detail-value { font-size: 16px; font-weight: 800; color: #0d47a1; }
.toast { position: fixed; bottom: 24px; right: 24px; background: #4CAF50; color: white; padding: 14px 24px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.25); transform: translateX(400px); opacity: 0; transition: all 0.3s; z-index: 10000; font-weight: 600; }
.toast.show { transform: translateX(0); opacity: 1; }
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-card); border-radius: 16px; max-width: 900px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal-header { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 20px; font-weight: 700; }
.modal-close { background: rgba(255,255,255,0.2); border: none; color: white; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.modal-body { padding: 24px; overflow-y: auto; color: var(--text-primary); }
.summary-status { padding: 24px; border-radius: 12px; text-align: center; margin-bottom: 20px; color: white; }
.summary-status-optimal { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.summary-status-warning { background: linear-gradient(135deg, #FF9800, #F57C00); }
.summary-status-danger { background: linear-gradient(135deg, #f44336, #d32f2f); }
.summary-status-label { font-size: 14px; font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.summary-status-value { font-size: 36px; font-weight: 900; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 30px; }
@media (max-width: 600px) { .summary-grid { grid-template-columns: 1fr; } }
.summary-card { padding: 16px; border-radius: 10px; border-left: 4px solid; }
.summary-card-label { font-size: 11px; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.summary-card-value { font-size: 24px; font-weight: 900; }
.summary-card-sub { font-size: 11px; margin-top: 4px; }
.summary-card-green { background: #e8f5e9; border-color: #4CAF50; }
.summary-card-green .summary-card-label { color: #2e7d32; }
.summary-card-green .summary-card-value { color: #1b5e20; }
.summary-card-blue { background: #e3f2fd; border-color: #2196F3; }
.summary-card-blue .summary-card-label { color: #1565c0; }
.summary-card-blue .summary-card-value { color: #0d47a1; }
.summary-card-orange { background: #fff3e0; border-color: #FF9800; }
.summary-card-orange .summary-card-label { color: #e65100; }
.summary-card-orange .summary-card-value { color: #e65100; }
.summary-card-gray { background: #f5f5f5; border-color: #9e9e9e; }
.summary-card-gray .summary-card-label { color: #616161; }
.summary-card-gray .summary-card-value { color: #424242; }
.dark-mode .summary-card-green { background: rgba(76,175,80,0.15); }
.dark-mode .summary-card-green .summary-card-label { color: #81c784; }
.dark-mode .summary-card-green .summary-card-value { color: #a5d6a7; }
.dark-mode .summary-card-blue { background: rgba(33,150,243,0.15); }
.dark-mode .summary-card-blue .summary-card-label { color: #64b5f6; }
.dark-mode .summary-card-blue .summary-card-value { color: #90caf9; }
.dark-mode .summary-card-orange { background: rgba(255,152,0,0.15); }
.dark-mode .summary-card-orange .summary-card-label { color: #ffb74d; }
.dark-mode .summary-card-orange .summary-card-value { color: #ffcc80; }
.dark-mode .summary-card-gray { background: rgba(158,158,158,0.15); }
.dark-mode .summary-card-gray .summary-card-label { color: #bdbdbd; }
.dark-mode .summary-card-gray .summary-card-value { color: #e0e0e0; }
.report-section-title { font-size: 16px; font-weight: 700; margin: 20px 0 10px 0; padding-bottom: 5px; border-bottom: 2px solid var(--border-light); color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 20px; }
.report-table th { background: var(--bg-section); color: var(--text-secondary); font-weight: 700; text-align: left; padding: 8px; border-bottom: 2px solid var(--border-color); }
.report-table td { padding: 8px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); }
.analytics-section { background: linear-gradient(135deg, #667eea, #764ba2); padding: 20px; border-radius: 12px; margin-bottom: 20px; color: white; }
.analytics-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.analytics-title { font-size: 18px; font-weight: 700; }
.analytics-subtitle { font-size: 12px; opacity: 0.9; }
.insight-card { background: rgba(255,255,255,0.15); border-radius: 10px; padding: 14px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; }
.insight-icon { font-size: 28px; }
.insight-title { font-weight: 700; margin-bottom: 2px; }
.insight-desc { font-size: 12px; opacity: 0.9; }
.analytics-card { background: linear-gradient(135deg, var(--bg-card), var(--bg-section)); border: 2px solid var(--border-color); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.analytics-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.analytics-card-icon { font-size: 28px; }
.analytics-card-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.analytics-card-subtitle { font-size: 12px; color: var(--text-muted); }
.gauge-container { display: flex; justify-content: center; align-items: center; flex-direction: column; }
.gauge-svg { width: 180px; height: 180px; }
.gauge-track { fill: none; stroke: var(--border-color); stroke-width: 12; }
.gauge-fill { fill: none; stroke: #4CAF50; stroke-width: 12; stroke-linecap: round; transition: all 0.5s; }
.gauge-text { font-size: 32px; font-weight: 900; fill: var(--text-primary); }
.gauge-label { font-size: 12px; fill: var(--text-secondary); }
.gauge-info { text-align: center; margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.trend-list { display: flex; flex-direction: column; gap: 12px; }
.trend-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: var(--bg-section); border-radius: 8px; border: 1px solid var(--border-color); }
.trend-label { font-weight: 600; color: var(--text-primary); }
.trend-value { font-size: 18px; font-weight: 900; color: #1565c0; }
.dark-mode .trend-value { color: #64b5f6; }
.bottom-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 768px) { .bottom-stats { grid-template-columns: repeat(2, 1fr); } }
.bottom-stat { padding: 16px; border-radius: 10px; color: white; }
.bottom-stat-label { font-size: 11px; opacity: 0.9; margin-bottom: 4px; }
.bottom-stat-value { font-size: 22px; font-weight: 900; }
.bottom-stat-sub { font-size: 10px; opacity: 0.8; margin-top: 2px; }
.bottom-stat-blue { background: linear-gradient(135deg, #2196F3, #1976D2); }
.bottom-stat-green { background: linear-gradient(135deg, #4CAF50, #388E3C); }
.bottom-stat-orange { background: linear-gradient(135deg, #FF9800, #F57C00); }
.bottom-stat-purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.autosave-indicator { position: fixed; bottom: 24px; left: 24px; background: rgba(76, 175, 80, 0.9); color: white; padding: 8px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.3s; z-index: 9999; }
.autosave-indicator.show { opacity: 1; }
.modell-btn { padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 8px; background: var(--bg-card); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary); transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.modell-btn:hover { border-color: #2196F3; color: #2196F3; }
.modell-btn-active { border-color: #2196F3; background: #e3f2fd; color: #1565c0; }
.dark-mode .modell-btn-active { background: rgba(33,150,243,0.2); color: #64b5f6; }
.modell-btn span { font-size: 16px; }
@media print { body * { visibility: hidden; } #print-container, #print-container * { visibility: visible; } #print-container { position: absolute; left: 0; top: 0; width: 100%; } .no-print { display: none !important; } }

/* ============================================
   EXTRACTED INLINE STYLES
   ============================================ */

/* --- Phase 1: Sidebar Calc-Box Child Colors --- */
.calc-box-red .calc-title { color: #b71c1c; }
.calc-box-red .calc-value { color: #c62828; }
.calc-box-red .calc-formula { color: #e53935; }
.calc-box-yellow .calc-title { color: #92400e; }
.calc-box-yellow .calc-value { color: #78350f; }
.calc-box-yellow .calc-formula { color: #d97706; }
.calc-box-blue .calc-title { color: #1565C0; }
.calc-box-blue .calc-value { color: #0D47A1; }
.calc-box-blue .calc-formula { color: #1976D2; }
.calc-box-green .calc-title { color: #2E7D32; }
.calc-box-green .calc-value { color: #1B5E20; }
.calc-box-green .calc-formula { color: #388E3C; }
.calc-box-gray .calc-title { color: #424242; }
.calc-box-gray .calc-value { color: #212121; }
.calc-box-purple .calc-title { color: #7B1FA2; }
.calc-box-purple .calc-value { color: #6A1B9A; }
.calc-box-purple .calc-formula { color: #8E24AA; }
#sidebar-restbetrag-box .calc-value { font-size: 26px; }

/* --- Phase 2: Project Details Modal --- */
.meta-section-divider { border-top: 1px solid var(--border-light); padding-top: 16px; margin-bottom: 20px; }
.meta-section-title { font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.meta-section-title--projekt { color: #6366f1; display: flex; align-items: center; gap: 6px; }
.meta-section-title--hu { color: #4CAF50; }
.meta-section-title--ag { color: #FF9800; }
.meta-section-title--baustelle { color: #2196F3; }
.meta-section-title--sub { color: #9C27B0; }
.meta-section-title--notes { color: var(--text-secondary); }

/* --- Phase 3: Exec Dashboard Cards + Header --- */
.exec-card--gold { border-color: #ffd700; }
.exec-card--gold .exec-card-label { color: #856404; }
.exec-card--green { border-color: #4caf50; }
.exec-card--green .exec-card-label { color: #1b5e20; }
.exec-card--green .exec-card-value { color: #2e7d32; }
.exec-card--green .exec-card-sub { color: #388e3c; }
.exec-card--green .exec-card-sublabel { color: #66bb6a; font-size: 10px; margin-bottom: 4px; }
.exec-card--green .exec-card-details .exec-card-detail span:first-child { color: #f57c00; }
.exec-card--green .exec-card-details .exec-card-detail span:last-child { color: #f57c00; font-weight: 700; }
.exec-card--blue { border-color: #2196f3; }
.exec-card--blue .exec-card-label { color: #1565c0; }
.exec-card--blue .exec-card-value { color: #1976d2; }
.exec-card--blue .exec-card-sub { color: #42a5f5; }
.exec-card--blue .exec-card-sublabel { color: #42a5f5; font-size: 10px; margin-bottom: 4px; }
.exec-card-sublabel { color: #66bb6a; font-size: 10px; margin-bottom: 4px; }
.sticky-item--projekt { background: rgba(255,255,255,0.1); min-width: auto; cursor: pointer; }
.sticky-sublabel { font-size: 8px; opacity: 0.6; }
.sticky-projekt-value { font-size: 13px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-divider { display: inline-block; width: 1px; height: 24px; background: rgba(255,255,255,0.3); margin: 0 8px; vertical-align: middle; }
.btn--test { background: linear-gradient(135deg, #ff6b6b, #ee5a5a); }
.btn--dark-mode { padding: 10px 12px; }
.project-name-placeholder { color: #999; font-style: italic; }
.exec-header-cursor { cursor: pointer; }
.exec-title-icon { font-size: 28px; }
.exec-title-hint { font-size: 11px; opacity: 0.6; margin-left: 8px; }
.exec-title-toggle { font-size: 16px; margin-left: 10px; opacity: 0.7; }
.exec-restbetrag-sublabel { font-size: 10px; opacity: 0.8; margin-bottom: 6px; }
.exec-gewinn-percent { color: #66bb6a; }

/* --- Phase 4: Sicherheitseinbehalt + Defizit Boxes --- */
.sicherheit-box { background: #fffbeb; border: 2px solid #fcd34d; border-radius: 12px; padding: 16px; margin-top: 8px; }
.sicherheit-title { font-size: 11px; font-weight: 700; color: #92400e; margin-bottom: 12px; }
.sicherheit-divider { height: 1px; background: #fcd34d; margin: 16px 0; }
.sicherheit-split-box { background: #ecfdf5; border: 2px solid #a7f3d0; border-radius: 10px; padding: 14px; }
.sicherheit-split-header { text-align: center; font-size: 12px; font-weight: 600; color: #065f46; margin-bottom: 10px; }
.sicherheit-split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sicherheit-split-card { background: white; border-radius: 8px; padding: 12px; text-align: center; border: 1px solid #a7f3d0; }
.sicherheit-split-card-label { font-size: 10px; color: #666; }
.sicherheit-split-card-value--sub { font-size: 20px; font-weight: 900; color: #2e7d32; }
.sicherheit-split-card-value--ag { font-size: 20px; font-weight: 900; color: #f57c00; }
.sicherheit-split-card-pct { font-size: 11px; color: #666; }
.sicherheit-split-total { text-align: center; margin-top: 10px; font-size: 12px; color: #065f46; font-weight: 600; }
.input-hint--sub-euro { color: #2e7d32; font-weight: 600; }
.input-hint--ag-euro { color: #f57c00; font-weight: 600; }
.input-hint--mb4 { margin-bottom: 4px; }

/* Defizit Warning Box (exec + sidebar) */
.defizit-warning-box { background: linear-gradient(135deg, #ffebee, #ffcdd2); border: 2px solid #f44336; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.defizit-warning-box--sidebar { border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.defizit-warning-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.defizit-warning-header--sidebar { gap: 8px; margin-bottom: 10px; }
.defizit-warning-icon { font-size: 24px; }
.defizit-warning-icon--sidebar { font-size: 20px; }
.defizit-warning-title { font-weight: 700; color: #c62828; font-size: 15px; }
.defizit-warning-title--sidebar { font-size: 13px; }
.defizit-warning-subtitle { font-size: 12px; color: #d32f2f; }
.defizit-warning-subtitle--sidebar { font-size: 11px; }
.defizit-gesamt-box { background: #fff; border-radius: 8px; padding: 14px; text-align: center; }
.defizit-gesamt-box--sidebar { padding: 12px; }
.defizit-gesamt-label { font-size: 11px; color: #888; text-transform: uppercase; }
.defizit-gesamt-label--sidebar { font-size: 10px; }
.defizit-gesamt-value { font-size: 28px; font-weight: 900; color: #c62828; }
.defizit-gesamt-value--sidebar { font-size: 24px; }

/* Defizit Distribution Box (exec + sidebar) */
.defizit-distribution-box { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border: 2px solid #4CAF50; border-radius: 12px; padding: 16px; }
.defizit-distribution-box--sidebar { border-radius: 10px; padding: 14px; }
.defizit-distribution-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.defizit-distribution-header--sidebar { gap: 8px; margin-bottom: 12px; }
.defizit-distribution-icon { font-size: 24px; }
.defizit-distribution-icon--sidebar { font-size: 20px; }
.defizit-distribution-title { font-weight: 700; color: #2e7d32; font-size: 15px; }
.defizit-distribution-title--sidebar { font-size: 13px; }
.defizit-distribution-subtitle { font-size: 12px; color: #388e3c; }
.defizit-distribution-subtitle--sidebar { font-size: 11px; }
.defizit-distribution-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.defizit-distribution-grid--sidebar { gap: 10px; margin-bottom: 12px; }
.defizit-distribution-card { background: #fff; border-radius: 10px; padding: 14px; text-align: center; }
.defizit-distribution-card--sub { border-left: 4px solid #2196F3; }
.defizit-distribution-card--hu { border-left: 4px solid #4CAF50; }
.defizit-distribution-card--sidebar { border-radius: 8px; padding: 10px; }
.defizit-distribution-card--sidebar-sub { border-left: 3px solid #2196F3; }
.defizit-distribution-card--sidebar-hu { border-left: 3px solid #4CAF50; }
.defizit-card-label--sub { font-size: 10px; color: #1565c0; text-transform: uppercase; font-weight: 600; }
.defizit-card-label--hu { font-size: 10px; color: #2e7d32; text-transform: uppercase; font-weight: 600; }
.defizit-card-label--sidebar-sub { font-size: 9px; color: #1565c0; text-transform: uppercase; }
.defizit-card-label--sidebar-hu { font-size: 9px; color: #2e7d32; text-transform: uppercase; }
.defizit-card-pct { font-size: 12px; color: #888; margin: 4px 0; }
.defizit-card-pct--sidebar { font-size: 11px; }
.defizit-card-value--sub { font-size: 22px; font-weight: 900; color: #1565c0; }
.defizit-card-value--hu { font-size: 22px; font-weight: 900; color: #2e7d32; }
.defizit-card-value--sidebar-sub { font-size: 16px; font-weight: 800; color: #1565c0; }
.defizit-card-value--sidebar-hu { font-size: 16px; font-weight: 800; color: #2e7d32; }
.defizit-result-box { background: linear-gradient(135deg, #c8e6c9, #a5d6a7); border-radius: 10px; padding: 16px; text-align: center; border: 2px solid #66bb6a; }
.defizit-result-box--sidebar { border-radius: 8px; padding: 12px; }
.defizit-result-label { font-size: 11px; color: #2e7d32; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.defizit-result-label--sidebar { font-size: 10px; margin-bottom: 4px; }
.defizit-result-value { font-size: 32px; font-weight: 900; color: #1b5e20; }
.defizit-result-value--sidebar { font-size: 28px; }
.defizit-result-sub { font-size: 12px; color: #388e3c; margin-top: 6px; }
.defizit-result-sub--sidebar { font-size: 11px; margin-top: 4px; }

/* Sidebar Defizit Berechnungsdetails */
.defizit-details-box { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 12px; border: 1px solid #a5d6a7; }
.defizit-details-title { font-size: 10px; color: #2e7d32; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; }
.defizit-herleitung-box { background: #f0fdf4; border-radius: 6px; padding: 8px; margin-bottom: 10px; border: 1px dashed #86efac; }
.defizit-herleitung-title { font-size: 9px; color: #166534; text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.defizit-herleitung-grid { display: grid; grid-template-columns: 1fr auto; gap: 3px; font-size: 10px; }
.defizit-herleitung-grid .label--basis { color: #666; }
.defizit-herleitung-grid .value--basis { text-align: right; font-weight: 600; color: #374151; }
.defizit-herleitung-grid .label--sub { color: #1565c0; }
.defizit-herleitung-grid .value--sub { text-align: right; font-weight: 600; color: #1565c0; }
.defizit-herleitung-grid .label--ag { color: #f59e0b; }
.defizit-herleitung-grid .value--ag { text-align: right; font-weight: 600; color: #f59e0b; }
.defizit-herleitung-grid .label--result { color: #166534; font-weight: 600; }
.defizit-herleitung-grid .value--result { text-align: right; font-weight: 700; color: #166534; }
.defizit-herleitung-divider { grid-column: span 2; border-top: 1px solid #86efac; margin: 4px 0; }
.defizit-abzug-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 11px; }
.defizit-abzug-grid .label--gewinn { color: #666; }
.defizit-abzug-grid .value--gewinn { text-align: right; font-weight: 600; color: #2e7d32; }
.defizit-abzug-grid .label--defizit { color: #c62828; }
.defizit-abzug-grid .value--defizit { text-align: right; font-weight: 600; color: #c62828; }
.defizit-abzug-divider { grid-column: span 2; border-top: 1px solid #c8e6c9; margin: 6px 0; }
.defizit-abzug-grid .label--result { color: #1b5e20; font-weight: 700; }
.defizit-abzug-grid .value--result { text-align: right; font-weight: 800; color: #1b5e20; font-size: 13px; }

/* Echter Verlust Box */
.defizit-verlust-box { background: linear-gradient(135deg, #ffebee, #ffcdd2); border-radius: 8px; padding: 12px; border: 2px solid #ef5350; margin-top: 10px; }
.defizit-verlust-title { font-size: 10px; color: #c62828; text-transform: uppercase; margin-bottom: 8px; font-weight: 600; text-align: center; }
.defizit-verlust-grid { display: grid; grid-template-columns: 1fr auto; gap: 4px; font-size: 11px; background: #fff; border-radius: 6px; padding: 10px; }
.defizit-verlust-grid .label--gewinn { color: #666; }
.defizit-verlust-grid .value--gewinn { text-align: right; font-weight: 600; color: #2e7d32; }
.defizit-verlust-grid .label--tragen { color: #c62828; }
.defizit-verlust-grid .value--tragen { text-align: right; font-weight: 600; color: #c62828; }
.defizit-verlust-divider { grid-column: span 2; border-top: 1px solid #ffcdd2; margin: 6px 0; }
.defizit-verlust-grid .label--result { color: #b71c1c; font-weight: 700; }
.defizit-verlust-grid .value--result { text-align: right; font-weight: 800; color: #b71c1c; font-size: 13px; }
.defizit-verlust-info { text-align: center; margin-top: 8px; font-size: 10px; color: #c62828; }

/* Defizit Mode Section */
.defizit-section-box { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 2px solid #f87171; border-radius: 12px; padding: 16px; margin-top: 8px; }
.defizit-section-title { font-size: 11px; font-weight: 700; color: #b91c1c; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.defizit-section-icon { font-size: 16px; }
.defizit-aktuell-box { background: #fff; border: 2px solid #dc2626; border-radius: 8px; padding: 12px; margin-bottom: 16px; text-align: center; }
.defizit-aktuell-label { font-size: 10px; color: #888; text-transform: uppercase; }
.defizit-aktuell-value { font-size: 28px; font-weight: 900; color: #dc2626; }
.defizit-method-title { font-size: 11px; font-weight: 600; color: #7f1d1d; margin-bottom: 10px; }
.defizit-mode-box { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 8px; border: 2px solid #e5e7eb; cursor: pointer; }
.defizit-mode-box:last-child { margin-bottom: 0; }
.defizit-mode-content { display: flex; align-items: flex-start; gap: 10px; }
.defizit-mode-radio { margin-top: 3px; }
.defizit-mode-label { font-size: 13px; font-weight: 700; color: #374151; cursor: pointer; display: block; }
.defizit-mode-desc { font-size: 11px; color: #6b7280; margin-top: 4px; }
.defizit-mode-result { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.defizit-mode-result-card--hu { background: #ecfdf5; border-radius: 6px; padding: 8px; text-align: center; }
.defizit-mode-result-card--sub { background: #eff6ff; border-radius: 6px; padding: 8px; text-align: center; }
.defizit-mode-result-label--hu { font-size: 9px; color: #059669; }
.defizit-mode-result-label--sub { font-size: 9px; color: #2563eb; }
.defizit-mode-result-value--hu { font-size: 14px; font-weight: 800; color: #047857; }
.defizit-mode-result-value--sub { font-size: 14px; font-weight: 800; color: #1d4ed8; }
.defizit-manual-inputs { margin-top: 12px; }
.defizit-manual-hint--hu { margin-bottom: 4px; color: #059669; font-size: 10px; }
.defizit-manual-hint--sub { margin-bottom: 4px; color: #2563eb; font-size: 10px; }
.defizit-manual-input { padding: 8px; }
.defizit-split-valid-text { text-align: center; margin-top: 8px; font-size: 11px; font-weight: 600; }

/* Sidebar Ergebnis Box */
.sidebar-ergebnis { background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); border-radius: 12px; padding: 16px; margin: 12px 0; color: white; }
.sidebar-ergebnis-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; margin-bottom: 12px; text-align: center; }
.sidebar-ergebnis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sidebar-ergebnis-card--hu { background: rgba(76,175,80,0.2); border: 1px solid rgba(76,175,80,0.4); border-radius: 8px; padding: 12px; text-align: center; }
.sidebar-ergebnis-card--sub { background: rgba(33,150,243,0.2); border: 1px solid rgba(33,150,243,0.4); border-radius: 8px; padding: 12px; text-align: center; }
.sidebar-ergebnis-label { font-size: 10px; opacity: 0.8; margin-bottom: 4px; }
.sidebar-ergebnis-sublabel { font-size: 9px; opacity: 0.6; margin-bottom: 4px; }
.sidebar-ergebnis-value { font-size: 20px; font-weight: 900; }
.sidebar-ergebnis-pct { font-size: 11px; opacity: 0.7; }
.sidebar-ergebnis-info { text-align: center; margin-top: 10px; font-size: 11px; opacity: 0.7; }
.sidebar-divider-line { height: 1px; background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent); margin: 12px 0; }
.sidebar-empty { text-align: center; padding: 30px 20px; color: #9ca3af; }
.sidebar-empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.sidebar-empty-title { font-size: 14px; font-weight: 600; color: #6b7280; margin-bottom: 8px; }
.sidebar-empty-desc { font-size: 12px; line-height: 1.5; }
.sidebar-material-empty { opacity: 0.6; font-style: italic; font-size: 11px; }

/* --- Phase 5: Model Sections + Analysis + Quick-Overview --- */
.model-section { background: white; border: 2px solid #e0e0e0; border-radius: 12px; padding: 20px; margin-top: 8px; transition: all 0.3s; }
.model-section-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.model-section-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.model-input-box--sub { background: #eff6ff; border: 2px solid #bfdbfe; border-radius: 10px; padding: 14px; }
.model-input-box--hu { background: #ecfdf5; border: 2px solid #a7f3d0; border-radius: 10px; padding: 14px; }
.model-input-title--sub { font-size: 11px; font-weight: 700; color: #1d4ed8; margin-bottom: 8px; }
.model-input-title--hu { font-size: 11px; font-weight: 700; color: #059669; margin-bottom: 8px; }
.model-input-row { display: flex; gap: 12px; }
.model-input-col { flex: 1; }
.model-input-hint { margin-bottom: 4px; font-size: 11px; }
.model-input-field { font-size: 16px; font-weight: bold; }
.model-input-field--hu { font-size: 16px; font-weight: bold; background: #d1fae5; color: #065f46; }
.model-result-card { border-radius: 10px; padding: 14px; color: white; }
.model-result-card--sub { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
.model-result-card--hu { background: linear-gradient(135deg, #059669, #047857); }
.model-result-card--ag { background: linear-gradient(135deg, #f59e0b, #d97706); }
.model-result-label { font-size: 10px; opacity: 0.8; margin-bottom: 4px; }
.model-result-sublabel { font-size: 9px; opacity: 0.6; margin-bottom: 6px; }
.model-result-value { font-size: 20px; font-weight: 900; }
.model-result-info { font-size: 11px; opacity: 0.8; margin-top: 4px; }
.model-ziel-box { background: #f5f5f5; border-radius: 8px; padding: 14px; margin-top: 16px; }
.model-ziel-title { font-size: 12px; color: #666; margin-bottom: 10px; font-weight: 600; }
.model-ziel-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.model-ziel-input-col { flex: 1; min-width: 80px; }
.model-ziel-separator { color: #999; font-size: 12px; padding-bottom: 12px; }
.model-ziel-input { text-align: center; font-weight: bold; padding: 10px; font-size: 14px; }
.model-ziel-buttons { flex: 2; min-width: 200px; display: flex; gap: 8px; }
.model-ziel-buttons--quirin { flex: 1; min-width: 120px; }
.model-ziel-btn { flex: 1; font-size: 12px; padding: 10px 8px; }
.model-ziel-btn--quirin { width: 100%; font-size: 12px; padding: 10px 12px; }
.model-birgi-input-row { display: flex; gap: 12px; margin-bottom: 16px; }
.model-birgi-input-col { flex: 1; }
.model-birgi-input-hint { margin-bottom: 4px; font-weight: 600; }
.model-birgi-input-field { font-size: 18px; font-weight: bold; }
.model-quirin-input-hint { margin-bottom: 4px; font-weight: 600; }
.model-quirin-input-field { font-size: 18px; font-weight: bold; }
.model-birgi-calc-display { font-size: 10px; opacity: 0.6; margin-top: 2px; }

/* Modell-Beschreibung */
.modell-beschreibung { text-align: center; font-size: 13px; color: #1565c0; }

/* Modell-Wahl Box */
.modell-wahl-box { background: #f5f7fa; border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.modell-wahl-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #666; margin-bottom: 12px; }
.modell-wahl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }

/* Quick Overview */
.quick-overview-bar { margin-top: 16px; background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%); border-radius: 10px; padding: 12px 16px; }
.quick-overview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; color: white; }
.quick-overview-item { text-align: center; }
.quick-overview-item--hu { text-align: center; background: rgba(76,175,80,0.2); border-radius: 6px; padding: 6px; }
.quick-overview-item--sub { text-align: center; background: rgba(33,150,243,0.2); border-radius: 6px; padding: 6px; }
.quick-overview-label { font-size: 9px; text-transform: uppercase; opacity: 0.7; margin-bottom: 2px; }
.quick-overview-label--highlight { font-size: 9px; text-transform: uppercase; opacity: 0.8; margin-bottom: 2px; }
.quick-overview-sublabel { font-size: 8px; opacity: 0.6; margin-bottom: 2px; }
.quick-overview-value { font-size: 14px; font-weight: 700; }
.quick-overview-value--hu { font-size: 16px; font-weight: 900; color: #81c784; }
.quick-overview-value--sub { font-size: 16px; font-weight: 900; color: #64b5f6; }
.quick-overview-pct { font-size: 10px; opacity: 0.7; }

/* Modell-Analyse Box */
.modell-analyse-box { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border-radius: 12px; padding: 16px; margin-top: 16px; border: 1px solid #dee2e6; }
.modell-analyse-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modell-analyse-title { font-size: 13px; font-weight: 700; color: #495057; }
.modell-analyse-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.modell-analyse-card { background: white; border-radius: 8px; padding: 10px; text-align: center; border: 2px solid #e0e0e0; }
.modell-analyse-card.active { border-color: #4285f4; }
.modell-analyse-card-label { font-size: 10px; color: #666; margin-bottom: 6px; }
.modell-analyse-card-hu-label { font-size: 10px; color: #2e7d32; margin-bottom: 2px; }
.modell-analyse-card-hu-value { font-size: 15px; font-weight: 700; color: #388e3c; }
.modell-analyse-card-sub-label { font-size: 10px; color: #1565c0; margin-top: 6px; }
.modell-analyse-card-sub-value { font-size: 13px; font-weight: 600; color: #1976d2; }

/* Inline Results */
.inline-results { margin: 20px 0; }
.inline-results-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.inline-result-card--hu { background: linear-gradient(135deg, #059669 0%, #047857 100%); border-radius: 12px; padding: 16px; color: white; text-align: center; }
.inline-result-card--sub { background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%); border-radius: 12px; padding: 16px; color: white; text-align: center; }
.inline-result-label { font-size: 10px; text-transform: uppercase; opacity: 0.8; margin-bottom: 4px; }
.inline-result-sublabel { font-size: 9px; opacity: 0.7; margin-bottom: 6px; }
.inline-result-value { font-size: 24px; font-weight: 900; }
.inline-result-pct { font-size: 11px; opacity: 0.8; margin-top: 4px; }

/* Schnellvergleich */
.schnellvergleich-box { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; padding: 16px; }
.schnellvergleich-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.schnellvergleich-title { font-size: 12px; font-weight: 700; color: #475569; }
.schnellvergleich-badge { background: #059669; color: white; font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 12px; }
.schnellvergleich-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.schnellvergleich-card { background: white; border: 2px solid #e2e8f0; border-radius: 8px; padding: 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.schnellvergleich-card-label { font-size: 11px; color: #6b7280; font-weight: 600; }
.schnellvergleich-card-value { font-size: 18px; font-weight: 900; color: #059669; }
.schnellvergleich-card-sub { font-size: 10px; color: #1d4ed8; }
.schnellvergleich-recommendation { margin-top: 12px; padding: 10px; background: #ecfdf5; border-radius: 8px; font-size: 12px; color: #065f46; }
.schnellvergleich-recommendation-label { font-weight: 600; }

/* Section Number variants */
.section-number--orange { background: #FF9800; }
.section-number--purple { background: #9C27B0; }
.section-number--deep-purple { background: #673AB7; }

/* Misc extracted styles */
.sum-box--green { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-color: #4CAF50; }
.sum-box--green .sum-box-label { color: #2e7d32; }
.sum-box--green .sum-box-value { color: #1b5e20; }
.hour-live-sum { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); padding: 12px 16px; border-radius: 8px; margin-top: 12px; display: flex; justify-content: space-between; align-items: center; border: 2px solid #4CAF50; }
.hour-live-sum-label { font-size: 13px; color: #2e7d32; font-weight: 600; }
.hour-live-sum-value { font-size: 22px; font-weight: 900; color: #1b5e20; }
.hour-modal-sum-box { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); padding: 12px 16px; border-radius: 8px; margin: 12px 0; display: flex; justify-content: space-between; align-items: center; border: 2px solid #4CAF50; }
.hour-modal-sum-label { font-size: 13px; color: #2e7d32; font-weight: 600; }
.hour-modal-sum-value { font-size: 20px; font-weight: 900; color: #1b5e20; }
.tr-info-hint { font-size: 11px; color: #7b1fa2; margin-bottom: 8px; padding: 6px 10px; background: #f3e5f5; border-radius: 6px; }
.tr-status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.tr-status-card { padding: 14px; border-radius: 10px; text-align: center; }
.tr-status-card--offen { background: linear-gradient(135deg, #fff8e1, #ffecb3); border-left: 4px solid #ffc107; }
.tr-status-card--ueberfaellig { background: linear-gradient(135deg, #ffebee, #ffcdd2); border-left: 4px solid #f44336; }
.tr-status-card--bezahlt { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-left: 4px solid #4CAF50; }
.tr-status-card--gesamt { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border-left: 4px solid #2196F3; }
.tr-status-label--offen { font-size: 11px; color: #f57f17; font-weight: 600; }
.tr-status-label--ueberfaellig { font-size: 11px; color: #c62828; font-weight: 600; }
.tr-status-label--bezahlt { font-size: 11px; color: #2e7d32; font-weight: 600; }
.tr-status-label--gesamt { font-size: 11px; color: #1565c0; font-weight: 600; }
.tr-status-value--offen { font-size: 20px; font-weight: 900; color: #ff8f00; }
.tr-status-value--ueberfaellig { font-size: 20px; font-weight: 900; color: #d32f2f; }
.tr-status-value--bezahlt { font-size: 20px; font-weight: 900; color: #388e3c; }
.tr-status-value--gesamt { font-size: 20px; font-weight: 900; color: #1976d2; }
.tr-actions-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 20px; }
.analytics-time { margin-left: auto; font-size: 11px; color: #718096; }
.analytics-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Quick-entry input-group no-margin */
.input-group--no-margin { margin: 0; }

/* Layout utilities */
.flex-1 { flex: 1; }
.input-row--mb12 { margin-bottom: 12px; }
.input-row--mb10 { margin-bottom: 10px; }
.btn--ml-auto { margin-left: auto; }
.sum-box--mt16 { margin-top: 16px; }
.insights-icon { font-size: 28px; }
.trend-value-row { display: flex; align-items: center; gap: 8px; }
.meta-first-section { margin-bottom: 20px; }
.mb-16 { margin-bottom: 16px; }
.input-field--disabled { background: #f5f5f5; color: #666; }
.save-modal-btn { justify-content: center; padding: 15px; }
.btn--sm { padding: 6px 14px; font-size: 12px; }

/* Modal Variants */
.modal-content--sm { max-width: 450px; }
.modal-content--md { max-width: 500px; }
.modal-content--400 { max-width: 400px; }
.modal-content--550 { max-width: 550px; }
.modal-content--700 { max-width: 700px; }
.modal-content--lg { max-width: 1200px; }
.modal-body--center { text-align: center; }
.modal-body--scroll { max-height: 75vh; overflow-y: auto; }
.modal-header--purple { background: linear-gradient(135deg, #9C27B0, #7B1FA2); }
.modal-header--blue { background: linear-gradient(135deg, #1565c0, #0d47a1); }
.modal-header--navy { background: linear-gradient(135deg, #1e3a5f, #2d5a87); }
.modal-body-text { margin-bottom: 20px; color: var(--text-secondary); }
.modal-grid { display: grid; gap: 12px; }
.modal-grid--10 { display: grid; gap: 10px; }
.modal-btn-full { justify-content: center; padding: 18px; font-size: 14px; }
.modal-btn-full-icon { font-size: 20px; margin-right: 8px; }
.modal-btn-full-sub { font-size: 11px; opacity: 0.8; font-weight: normal; }
.modal-btn-cancel { width: 100%; margin-top: 16px; }
.modal-btn-save { width: 100%; margin-top: 16px; }
.modal-btn-save--mt8 { width: 100%; margin-top: 8px; }
.modal-flex-center { display: flex; gap: 10px; justify-content: center; }

/* Teilrechnung Modal extras */
.tr-modal-info { background: #f3e5f5; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 12px; color: #7b1fa2; }
.tr-budget-warning { background: linear-gradient(135deg, #fef2f2, #fee2e2); border: 2px solid #ef4444; border-radius: 8px; padding: 12px; margin-bottom: 16px; font-size: 12px; }
.tr-zahlung-box { background: linear-gradient(135deg, #e3f2fd, #bbdefb); border-radius: 10px; padding: 16px; margin: 16px 0; border: 2px solid #2196F3; }
.tr-zahlung-title { font-weight: 700; color: #1565c0; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* Projects Modal */
.projects-select-bar { margin-bottom: 12px; padding: 12px; background: #fef3c7; border-radius: 8px; border: 1px solid #fcd34d; }
.projects-select-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.projects-select-left { display: flex; align-items: center; gap: 8px; }
.projects-select-checkbox { width: 18px; height: 18px; cursor: pointer; }
.projects-select-label { font-size: 13px; font-weight: 600; color: #92400e; cursor: pointer; }
.projects-select-count { font-size: 12px; color: #b45309; margin-left: 8px; }
.projects-list-scroll { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; max-height: 400px; overflow-y: auto; }
.projects-footer { border-top: 1px solid #eee; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.projects-footer-buttons { display: flex; gap: 8px; }

/* Modellvergleich-Modal buttons */
.mv-header-btn { background: rgba(255,255,255,0.15); color: white; padding: 6px 12px; font-size: 12px; border: 1px solid rgba(255,255,255,0.3); }
.mv-header-btn--new { background: #10b981; color: white; padding: 6px 12px; font-size: 12px; }

/* --- Phase 6: Modellvergleich Modal --- */
.mv-modal-body { background: linear-gradient(135deg, #f0f4f8, #e2e8f0); padding: 24px; max-height: 85vh; overflow-y: auto; }
.mv-summary { background: linear-gradient(135deg, #1e293b, #334155); border-radius: 16px; padding: 20px; margin-bottom: 24px; color: white; }
.mv-summary-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mv-summary-title { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; opacity: 0.8; }
.mv-summary-date { font-size: 12px; opacity: 0.6; }
.mv-summary-row1 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.mv-summary-item-label { font-size: 10px; opacity: 0.7; margin-bottom: 4px; }
.mv-summary-item-value { font-size: 22px; font-weight: 800; }
.mv-summary-item-value--kosten { color: #fbbf24; }
.mv-summary-row2 { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 16px; text-align: center; align-items: center; }
.mv-sicherheit-box { background: rgba(251,191,36,0.15); border-radius: 10px; padding: 12px; border: 1px solid rgba(251,191,36,0.3); }
.mv-sicherheit-label { font-size: 10px; color: #fbbf24; margin-bottom: 6px; }
.mv-sicherheit-content { display: flex; justify-content: space-around; align-items: center; }
.mv-sicherheit-value { font-size: 16px; font-weight: 800; color: #fbbf24; }
.mv-sicherheit-pct { font-size: 9px; opacity: 0.6; }
.mv-sicherheit-divider { width: 1px; height: 30px; background: rgba(255,255,255,0.2); }
.mv-sicherheit-details { font-size: 10px; text-align: left; line-height: 1.6; }
.mv-sicherheit-details-label { color: #94a3b8; }
.mv-sicherheit-details-sub { color: #60a5fa; font-weight: 600; }
.mv-sicherheit-details-ag { color: #f97316; font-weight: 600; }
.mv-rabatt-label { font-size: 10px; opacity: 0.7; margin-bottom: 4px; }
.mv-rabatt-value { font-size: 16px; font-weight: 700; color: #ef4444; }
.mv-rabatt-pct { font-size: 9px; opacity: 0.6; }
.mv-best-label { font-size: 10px; opacity: 0.7; margin-bottom: 4px; }
.mv-best-value { font-size: 16px; font-weight: 800; color: #4ade80; }
.mv-maxhu-box { background: rgba(74,222,128,0.15); border-radius: 10px; padding: 12px; border: 1px solid rgba(74,222,128,0.3); }
.mv-maxhu-label { font-size: 10px; color: #4ade80; margin-bottom: 4px; }
.mv-maxhu-value { font-size: 22px; font-weight: 800; color: #4ade80; }

/* MV Cards Grid */
.mv-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 24px; }
.mv-card { background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.1); border: 2px solid transparent; }
.mv-card-header { color: white; padding: 20px; }
.mv-card-header--blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.mv-card-header--green { background: linear-gradient(135deg, #22c55e, #15803d); }
.mv-card-header--orange { background: linear-gradient(135deg, #f97316, #c2410c); }
.mv-card-header-row { display: flex; justify-content: space-between; align-items: center; }
.mv-card-header-icon { font-size: 28px; margin-bottom: 4px; }
.mv-card-header-title { font-size: 20px; font-weight: 800; }
.mv-card-header-subtitle { font-size: 11px; opacity: 0.8; margin-top: 4px; }
.mv-badge { background: #fbbf24; color: #000; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.mv-card-body { padding: 20px; }
.mv-card-input-group { margin-bottom: 16px; }
.mv-card-input-group--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.mv-card-input-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.mv-card-input-wrapper { display: flex; align-items: center; border: 2px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-top: 6px; }
.mv-card-input-field { border: none; flex: 1; font-size: 18px; font-weight: 600; text-align: center; }
.mv-card-input-field--sm { font-size: 16px; }
.mv-card-input-suffix { padding: 12px 16px; background: #f1f5f9; color: #64748b; font-weight: 600; }
.mv-card-input-suffix--sm { padding: 8px 12px; font-size: 12px; }
.mv-card-results { border-radius: 12px; padding: 16px; margin-top: 16px; }
.mv-card-results--blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.mv-card-results--green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.mv-card-results--orange { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.mv-card-results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mv-card-results-grid--detail { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.mv-card-results-detail-label { color: #64748b; }
.mv-card-results-detail-value { text-align: right; font-weight: 600; }
.mv-card-sub-label { font-size: 10px; color: #3b82f6; text-transform: uppercase; }
.mv-card-sub-label--green { color: #22c55e; }
.mv-card-sub-label--orange { color: #f97316; }
.mv-card-sub-value { font-size: 22px; font-weight: 800; color: #1d4ed8; }
.mv-card-sub-value--green { color: #15803d; }
.mv-card-sub-value--orange { color: #c2410c; }
.mv-card-section-divider { border-top: 1px solid; margin-top: 12px; padding-top: 12px; }
.mv-card-section-divider--blue { border-color: #bfdbfe; }
.mv-card-section-divider--green { border-color: #bbf7d0; }
.mv-card-section-divider--orange { border-color: #fed7aa; }
.mv-card-kosten-label { font-size: 10px; color: #b45309; text-transform: uppercase; margin-bottom: 6px; }
.mv-card-kosten-liste { font-size: 11px; color: #78350f; display: grid; gap: 2px; }
.mv-card-kosten-total { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #fbbf24; }
.mv-card-kosten-total-label { font-weight: 600; color: #92400e; }
.mv-card-kosten-total-value { font-weight: 700; color: #b45309; }
.mv-card-restbudget-label { font-size: 10px; color: #f97316; text-transform: uppercase; }
.mv-card-restbudget-label--ea { color: #ea580c; }
.mv-card-restbudget-value { font-size: 20px; font-weight: 800; }
.mv-card-hu-label { font-size: 10px; color: #059669; text-transform: uppercase; }
.mv-card-hu-value { font-size: 26px; font-weight: 900; color: #047857; }
.mv-card-hu-pct { font-size: 11px; color: #64748b; }
.mv-card-hu-breakdown { background: #f0fdf4; border-radius: 8px; padding: 10px; margin-top: 10px; font-size: 10px; }
.mv-card-hu-breakdown-grid { display: grid; grid-template-columns: 1fr auto; gap: 3px; }
.mv-card-hu-breakdown .label--basis { color: #64748b; }
.mv-card-hu-breakdown .value--basis { font-weight: 600; color: #374151; }
.mv-card-hu-breakdown .label--sub { color: #1565c0; }
.mv-card-hu-breakdown .value--sub { font-weight: 600; color: #1565c0; }
.mv-card-hu-breakdown .label--ag { color: #f59e0b; }
.mv-card-hu-breakdown .value--ag { font-weight: 600; color: #f59e0b; }
.mv-card-hu-breakdown-divider { grid-column: span 2; border-top: 1px solid #86efac; margin: 4px 0; }
.mv-card-hu-breakdown .label--result { color: #047857; font-weight: 600; }
.mv-card-hu-breakdown .value--result { font-weight: 700; color: #047857; }
.mv-card-fixpreis-note { background: #fef3c7; border-left: 4px solid #f59e0b; padding: 12px; border-radius: 0 8px 8px 0; margin-bottom: 16px; }
.mv-card-fixpreis-note-text { font-size: 11px; color: #92400e; }

/* MV Analysis Grid */
.mv-analysis-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px; }
.mv-chart-panel { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.mv-chart-title { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 20px; }
.mv-chart-container { display: flex; align-items: flex-end; justify-content: space-around; height: 180px; padding: 20px; background: linear-gradient(180deg, #f8fafc, #f1f5f9); border-radius: 12px; }
.mv-chart-bar-wrapper { text-align: center; flex: 1; }
.mv-chart-bar { width: 60px; margin: 0 auto; border-radius: 8px 8px 0 0; transition: all 0.5s; height: 0; position: relative; }
.mv-chart-bar--blue { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.mv-chart-bar--green { background: linear-gradient(180deg, #22c55e, #15803d); }
.mv-chart-bar--orange { background: linear-gradient(180deg, #f97316, #c2410c); }
.mv-chart-bar-label { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; }
.mv-chart-bar-label--blue { color: #1d4ed8; }
.mv-chart-bar-label--green { color: #15803d; }
.mv-chart-bar-label--orange { color: #c2410c; }
.mv-chart-label { margin-top: 12px; font-size: 12px; font-weight: 600; }
.mv-chart-label--blue { color: #3b82f6; }
.mv-chart-label--green { color: #22c55e; }
.mv-chart-label--orange { color: #f97316; }
.mv-side-panels { display: flex; flex-direction: column; gap: 16px; }
.mv-side-panel { background: #fff; border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); flex: 1; }
.mv-side-panel-title { font-size: 12px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.mv-side-panel-detail { font-size: 12px; }
.mv-side-panel-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.mv-side-panel-row:last-child { margin-bottom: 0; }
.mv-side-panel-label { color: #64748b; }
.mv-side-panel-value { font-weight: 700; }
.mv-side-panel-value--sub { font-weight: 600; color: #3b82f6; }
.mv-side-panel-value--ag { font-weight: 600; color: #f97316; }
.mv-kosten-total-divider { border-top: 2px solid #1e293b; margin-top: 12px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 700; }
.mv-kosten-total-value { color: #dc2626; font-size: 16px; }

/* MV Empfehlung */
.mv-empfehlung-box { background: linear-gradient(135deg, #ecfdf5, #d1fae5); border-radius: 16px; padding: 24px; border: 2px solid #10b981; }
.mv-empfehlung-title { font-size: 16px; font-weight: 800; margin-bottom: 16px; color: #065f46; display: flex; align-items: center; gap: 10px; }
.mv-empfehlung-icon { font-size: 24px; }
.mv-empfehlung-text { font-size: 14px; color: #047857; line-height: 1.6; }

/* MV Birgi Details */
.mv-birgi-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; margin-bottom: 8px; }
.mv-birgi-sub-row { border-top: 1px solid #bbf7d0; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }

/* ============================================
   AUTH SCREEN
   ============================================ */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-body);
}
.auth-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.auth-box h1 {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}
.auth-box .auth-subtitle {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}
.auth-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.auth-tab:hover {
    color: var(--text-primary);
}
.auth-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Auth Form */
.auth-form .form-group {
    margin-bottom: 16px;
}
.auth-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.auth-form .form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s;
}
.auth-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.auth-form .form-group small {
    display: block;
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 4px;
}
.auth-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 12px;
}
.auth-links a {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
}
.auth-links a:hover {
    text-decoration: underline;
}

/* Auth Offline */
.auth-offline {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.auth-offline .btn {
    width: 100%;
    font-size: 13px;
}

/* Auth Error */
.auth-error {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
    font-size: 13px;
    text-align: center;
}
.dark-mode .auth-error {
    background: rgba(220,38,38,0.15);
    border-color: rgba(220,38,38,0.3);
    color: #fca5a5;
}

/* Auth Spinner */
.auth-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(102,126,234,0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes auth-spin {
    to { transform: rotate(360deg); }
}
.auth-loading-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 12px;
}

/* Header Right (Buttons + User Info) */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Header Auth Info */
.header-auth-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn--logout {
    font-size: 12px !important;
    padding: 4px 10px !important;
}

/* Header User Detail */
.header-user-detail {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
}
.header-user-detail strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Auth Responsive */
@media (max-width: 480px) {
    .auth-box {
        padding: 24px 20px;
    }
    .auth-box h1 {
        font-size: 20px;
    }
}
