/* ================================================================
   Asset Engine — Portfolio Management System — Premium Enterprise Design
   ================================================================
   Design Language v3.0:
   - Deep navy sidebar with refined gradient
   - Layered shadow system for depth hierarchy
   - 10–12px radii for modern, premium feel
   - Smooth micro-interactions & view transitions
   - Glassmorphism accents on topbar
   - Premium typography with refined spacing
   - Enterprise-grade data density
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --gold: #B8964E;
  --gold-hover: #a6853f;
  --font: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 256px;
}

/* ── Light Theme ── */
.theme-light {
  --bg-primary: #f3f5f9;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-sidebar: linear-gradient(180deg, #0c1929 0%, #132744 100%);
  --bg-sidebar-flat: #0c1929;
  --bg-sidebar-hover: rgba(255,255,255,0.06);
  --bg-sidebar-active: rgba(255,255,255,0.10);
  --bg-input: #f5f7fa;
  --bg-topbar: rgba(255,255,255,0.82);
  --border: #e2e6ed;
  --border-light: #eef1f5;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-sidebar: rgba(255,255,255,0.55);
  --text-sidebar-active: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #60a5fa;
  --accent-bg: rgba(37,99,235,0.06);
  --accent-border: rgba(37,99,235,0.18);
  --green: #059669;
  --green-bg: rgba(5,150,105,0.07);
  --green-light: #34d399;
  --red: #dc2626;
  --red-bg: rgba(220,38,38,0.06);
  --red-light: #f87171;
  --amber: #d97706;
  --amber-bg: rgba(217,119,6,0.06);
  --blue: #2563eb;
  --blue-bg: rgba(37,99,235,0.06);
  --purple: #7c3aed;
  --purple-bg: rgba(124,58,237,0.06);
  --chart-grid: rgba(0,0,0,0.04);
  --table-header-bg: #f8fafc;
  --table-stripe: rgba(0,0,0,0.013);
  --table-hover: rgba(37,99,235,0.035);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 4px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.08);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.1);
  --kpi-border-accent: none;
  --kpi-accent-gradient: linear-gradient(135deg, #2563eb, #7c3aed);
}

/* ── Dark Theme ── */
.theme-dark {
  --bg-primary: #0b1120;
  --bg-secondary: #111827;
  --bg-card: #15202e;
  --bg-card-hover: #1a2740;
  --bg-sidebar: linear-gradient(180deg, #060a14 0%, #0a1020 100%);
  --bg-sidebar-flat: #060a14;
  --bg-sidebar-hover: rgba(255,255,255,0.05);
  --bg-sidebar-active: rgba(255,255,255,0.08);
  --bg-input: #1a2740;
  --bg-topbar: rgba(17,24,39,0.82);
  --border: #1e2d42;
  --border-light: #172236;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-sidebar: rgba(255,255,255,0.4);
  --text-sidebar-active: #f1f5f9;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-light: #93c5fd;
  --accent-bg: rgba(96,165,250,0.08);
  --accent-border: rgba(96,165,250,0.2);
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.08);
  --green-light: #6ee7b7;
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.08);
  --red-light: #fca5a5;
  --amber: #fbbf24;
  --amber-bg: rgba(251,191,36,0.08);
  --blue: #60a5fa;
  --blue-bg: rgba(96,165,250,0.08);
  --purple: #a78bfa;
  --purple-bg: rgba(167,139,250,0.08);
  --chart-grid: rgba(255,255,255,0.04);
  --table-header-bg: #111d2e;
  --table-stripe: rgba(255,255,255,0.012);
  --table-hover: rgba(96,165,250,0.05);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.15);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.25);
  --shadow-xl: 0 8px 16px rgba(0,0,0,0.3), 0 20px 40px rgba(0,0,0,0.35);
  --kpi-border-accent: none;
  --kpi-accent-gradient: linear-gradient(135deg, #60a5fa, #a78bfa);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  overflow: hidden;
  height: 100vh;
}
#app { display: flex; height: 100vh; }

/* ================================================================
   SIDEBAR — Refined Deep Navy with Gradient
   ================================================================ */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  z-index: 10;
  border-right: 1px solid rgba(255,255,255,0.04);
  position: relative;
}
/* Subtle inner glow on the right edge */
#sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
}

/* Brand Header */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  letter-spacing: -0.5px;
  box-shadow: 0 2px 10px rgba(37,99,235,0.35), 0 0 20px rgba(124,58,237,0.15);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 15.5px; color: #ffffff; letter-spacing: -0.3px; }
.brand-sub { font-size: 10px; color: rgba(255,255,255,0.35); letter-spacing: 0.8px; text-transform: uppercase; font-weight: 500; margin-top: 1px; }

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.sidebar-nav-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 18px 14px 7px;
}
.sidebar-nav-label:first-child { padding-top: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; transition: all var(--transition); }
.nav-item:hover { background: var(--bg-sidebar-hover); color: rgba(255,255,255,0.85); }
.nav-item:hover svg { opacity: 0.9; }

.nav-item.active {
  background: var(--bg-sidebar-active);
  color: var(--text-sidebar-active);
  font-weight: 600;
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, #60a5fa, #a78bfa);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px rgba(96,165,250,0.4);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.sidebar-footer button {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 7px 9px;
  border-radius: 8px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: var(--font);
}
.sidebar-footer button:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.65); }
.sidebar-footer button svg { width: 14px; height: 14px; }
.theme-dark .icon-moon { display: none; }
.theme-dark .icon-sun { display: inline; }
.theme-light .icon-moon { display: inline; }
.theme-light .icon-sun { display: none; }
.sidebar-version { font-size: 10px; color: rgba(255,255,255,0.15); font-weight: 500; }

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
#main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Top Bar — Glassmorphism */
#top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.topbar-left h1 {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.35px;
  color: var(--text-primary);
}
.topbar-filters { display: flex; gap: 10px; align-items: center; }
.topbar-filters select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 34px 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  min-width: 155px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: all var(--transition);
}
.topbar-filters select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.topbar-filters select:hover { border-color: var(--accent-border); }
/* Multi-Select-Button im Topbar (SPV-Filter, optisch zu den <select>s passend) */
.topbar-multi-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  min-width: 155px;
  text-align: left;
  transition: all var(--transition);
}
.topbar-multi-btn:hover { border-color: var(--accent-border); }
.topbar-multi-btn:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.topbar-multi-btn.filter-spv-active { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.topbar-multi-pop .btn-sm { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-primary); padding: 3px 8px; border-radius: 4px; font-size: 11px; cursor: pointer; }
.topbar-multi-pop .btn-sm:hover { border-color: var(--accent-border); color: var(--accent); }
.topbar-multi-pop label:hover { background: var(--accent-bg); border-radius: 4px; }
.topbar-right { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }

/* View Container */
#view-container {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 48px;
  scroll-behavior: smooth;
}

/* View entry animation */
#view-container > * {
  animation: viewFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   CARDS — Premium Elevated Cards
   ================================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.15px;
}
.card-subtitle { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }

/* ================================================================
   KPI CARDS — Premium Dashboard Metric Tiles
   ================================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  border-top: var(--kpi-border-accent);
  position: relative;
  overflow: hidden;
}
/* Decorative accent bar at top */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-accent-gradient);
  opacity: 0.8;
}
.kpi-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--accent-border);
}
.kpi-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  margin-bottom: 10px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.7px;
  line-height: 1.1;
}
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.kpi-trend-up { color: var(--green); font-weight: 600; }
.kpi-trend-down { color: var(--red); font-weight: 600; }

/* ================================================================
   FINANCIAL TABLES — Premium Operating Statement Style
   ================================================================ */
.fin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.fin-table thead tr {
  background: var(--table-header-bg);
  border-bottom: 2px solid var(--border);
}
.fin-table th {
  padding: 11px 16px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--table-header-bg);
}
.fin-label-head { text-align: left; }
.fin-val-head { text-align: right; }
.fin-table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  line-height: 1.5;
  transition: background var(--transition);
}
.fin-table tr:hover td { background: var(--table-hover); }
.fin-label {
  text-align: left;
  color: var(--text-primary);
  font-weight: 500;
}
.fin-val {
  text-align: right;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Financial table row types */
.fin-header td {
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-primary);
  background: var(--table-header-bg);
  border-bottom: 1px solid var(--border);
  padding-top: 14px;
  padding-bottom: 9px;
}
.fin-sep td {
  padding: 0;
  height: 1px;
  background: var(--border);
  border: none;
}
.fin-total td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  background: var(--table-header-bg);
}
.fin-bold { font-weight: 700; }
.fin-indent { padding-left: 30px !important; }
.fin-indent2 { padding-left: 46px !important; }

/* Value coloring */
.val-pos { color: var(--green) !important; }
.val-neg { color: var(--red) !important; }
.val-warn { color: var(--amber) !important; }

/* Property comparison table variant */
.prop-compare td { font-size: 12px; }
.prop-compare tr:nth-child(even) td { background: var(--table-stripe); }
.prop-compare tr:hover td { background: var(--table-hover); }

/* Clickable object links */
.obj-link {
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}
.obj-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* Row states */
.row-vacant td { background: var(--red-bg) !important; }
.row-vacant:hover td { background: rgba(220,38,38,0.10) !important; }
.row-selected td { background: var(--accent-bg) !important; }
.row-selected:hover td { background: rgba(37,99,235,0.10) !important; }

/* ================================================================
   TABLES — Enterprise Data Grid
   ================================================================ */
.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th {
  background: var(--table-header-bg);
  border-bottom: 2px solid var(--border);
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 2;
  transition: color var(--transition);
}
.data-table th:hover { color: var(--accent); }
.data-table th.sort-asc::after { content: " ▲"; font-size: 8px; color: var(--accent); }
.data-table th.sort-desc::after { content: " ▼"; font-size: 8px; color: var(--accent); }
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  transition: background var(--transition);
}
.data-table tr:nth-child(even) td { background: var(--table-stripe); }
.data-table tr:hover td { background: var(--table-hover); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .clickable { cursor: pointer; color: var(--accent); font-weight: 600; }
.data-table .clickable:hover { text-decoration: underline; }

/* ================================================================
   BADGES — Premium Status Indicators (Pill Style)
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
  white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-muted { background: var(--bg-input); color: var(--text-muted); }

/* ================================================================
   TABS — Modern Horizontal Tabs
   ================================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 22px;
}
.tab-btn {
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  font-family: var(--font);
  letter-spacing: -0.1px;
  position: relative;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ================================================================
   SECTION HEADINGS
   ================================================================ */
.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 18px 0;
}
.section-heading:first-child { margin-top: 0; }
.section-heading h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.15px;
  white-space: nowrap;
}
.section-heading .line { flex: 1; height: 1px; background: var(--border); }

/* ================================================================
   REPORT LAYOUT — Financial Report Headers & Sections
   ================================================================ */
.report-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.report-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}
.report-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 5px;
  font-weight: 500;
}
.report-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.report-section { margin-bottom: 22px; }
.report-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

/* ================================================================
   NUMERIC INPUTS — Premium Parameter Fields
   ================================================================ */
.num-input {
  width: 92px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
  transition: all var(--transition);
}
.num-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
  background: var(--bg-card);
}
.num-input::-webkit-inner-spin-button,
.num-input::-webkit-outer-spin-button {
  opacity: 0.6;
}
.input-unit {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 5px;
  font-weight: 600;
}

/* ================================================================
   DETAIL PANEL
   ================================================================ */
.detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.detail-field label {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}
.detail-field .value { font-size: 14.5px; font-weight: 600; color: var(--text-primary); }

/* ================================================================
   CHECKBOX IN TABLES — Portfolio Builder Selection
   ================================================================ */
.fin-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
  border-radius: 4px;
}

/* ================================================================
   CHARTS — Premium Chart Containers
   ================================================================ */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.chart-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.chart-panel:hover { box-shadow: var(--shadow); }
.chart-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}
.chart-panel canvas {
  width: 100% !important;
  max-height: 220px;
}
@media (max-width: 1200px) {
  .chart-row { grid-template-columns: 1fr; }
  .chart-row-3 { grid-template-columns: 1fr; }
}

/* ================================================================
   BUTTONS — Premium Button System
   ================================================================ */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 18px;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: var(--shadow-xs);
}
.btn-back:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(-2px);
}

.btn {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: all var(--transition);
  letter-spacing: 0.05px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}
.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* ================================================================
   OBJEKT DETAIL — Hero Header & Steckbrief
   ================================================================ */
.obj-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.obj-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--kpi-accent-gradient);
}
.obj-hero-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.obj-hero-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 14px;
}
.obj-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ================================================================
   LOADING OVERLAY — Premium Loader
   ================================================================ */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#loading-overlay.hidden { opacity: 0; pointer-events: none; }
.loader { text-align: center; }
.loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin: 0 auto 18px;
}
.loader p { color: var(--text-muted); font-size: 13px; font-weight: 600; letter-spacing: -0.1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   SCROLLBAR — Refined
   ================================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ================================================================
   HOLD/SELL
   ================================================================ */
.hs-metric { margin-bottom: 14px; }
.hs-metric label {
  font-size: 10.5px;
  color: var(--text-muted);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
  margin-bottom: 3px;
}
.hs-metric .val { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }

/* ================================================================
   UTILITIES
   ================================================================ */
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-accent { color: var(--accent); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; }

/* ================================================================
   NEUVERMIETUNG KANBAN CARDS
   ================================================================ */
.nv-card {
  box-shadow: var(--shadow);
  cursor: grab;
  user-select: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.nv-card:hover {
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover) !important;
  transform: translateY(-2px);
}
.nv-card:active {
  cursor: grabbing;
  opacity: 0.85;
  transform: scale(0.98);
}
.nv-card.dragging { opacity: 0.5; }

/* ================================================================
   PARAMETER GROUPS — Finanzierung Szenarioanalyse
   ================================================================ */
.param-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.param-group-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  font-size: 12.5px;
}
.param-row label {
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 0;
}
.param-input {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.param-input input[type="number"] {
  width: 74px;
  padding: 5px 8px;
  font-size: 12.5px;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: right;
  transition: all var(--transition);
}
.param-input input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
  background: var(--bg-card);
}
.param-input input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }
.param-unit {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 16px;
}
.param-input select {
  width: 100%;
  padding: 5px 8px;
  font-size: 12.5px;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}
.param-input select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
.param-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
}

/* ================================================================
   SELECTION / FOCUS STYLING
   ================================================================ */
::selection {
  background: var(--accent);
  color: #fff;
}

/* Focus-visible for accessibility */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1200px) {
  .report-2col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #sidebar { width: 64px; min-width: 64px; }
  .nav-item span { display: none; }
  .nav-item { justify-content: center; padding: 10px; }
  .brand-text { display: none; }
  .sidebar-brand { justify-content: center; padding: 18px 8px; }
  .sidebar-footer button span { display: none; }
  #view-container { padding: 20px 18px 40px; }
  #top-bar { padding: 0 18px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ═══════════ PROJEKTE — KANBAN ═══════════ */
.proj-kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  min-height: 400px;
}
.proj-kanban-col {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.proj-kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.proj-kanban-col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  max-height: 520px;
}
.proj-kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}
.proj-kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--accent);
}

/* ═══════════ PROJEKTE — TIMELINE ═══════════ */
.proj-tl-header {
  position: relative;
  height: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.proj-tl-today {
  position: absolute;
  top: 0;
  bottom: -100%;
  width: 2px;
  background: var(--red);
  z-index: 2;
  border-radius: 1px;
}
.proj-tl-today::before {
  content: '▼';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: var(--red);
}
.proj-tl-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.proj-tl-row {
  display: grid;
  grid-template-columns: 180px 1fr 90px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light, var(--border));
  transition: background 0.1s;
}
.proj-tl-row:hover {
  background: var(--bg-hover);
}
.proj-tl-label {
  min-width: 0;
  overflow: hidden;
}
.proj-tl-bar-area {
  position: relative;
  height: 18px;
  background: var(--bg-primary);
  border-radius: 9px;
}
.proj-tl-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 9px;
  min-width: 8px;
  overflow: hidden;
  transition: width 0.3s, left 0.3s;
}
.proj-tl-meta {
  text-align: right;
}

/* ═══════════ PROJEKTE — BUDGET BAR ═══════════ */
.proj-budget-bar-wrap {
  margin-top: 12px;
}
.proj-budget-bar {
  position: relative;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: visible;
}
.proj-budget-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}
.proj-budget-bar-forecast {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--amber);
  opacity: 0.4;
  border-radius: 0 10px 10px 0;
}

/* ═══════════ PROJEKTE — RESPONSIVE ═══════════ */
@media (max-width: 1100px) {
  .proj-kanban {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .proj-kanban {
    grid-template-columns: 1fr 1fr;
  }
  .proj-tl-row {
    grid-template-columns: 120px 1fr 70px;
  }
}
@media (max-width: 480px) {
  .proj-kanban {
    grid-template-columns: 1fr;
  }
  .proj-tl-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .proj-tl-bar-area {
    height: 12px;
  }
}

/* ═══════════ BEWERTUNG: Heatmap-Tabellen ═══════════ */
.bew-heatmap td.fin-val {
  padding: 5px 6px;
  text-align: center;
  white-space: nowrap;
  transition: background 0.15s;
  min-width: 68px;
}
.bew-heatmap td.fin-label {
  white-space: nowrap;
  font-size: 11px;
}
.bew-heatmap th.fin-val-head {
  font-size: 10px;
  white-space: nowrap;
  text-align: center;
}
.bew-heatmap th.fin-label-head {
  font-size: 10px;
  white-space: nowrap;
}

/* ================================================================
   EXPORT CENTER
   ================================================================ */
.export-center { max-width: 900px; }
.export-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.export-tab {
  padding: 10px 20px; border: none; background: transparent;
  color: var(--text-secondary); font-size: 13.5px; font-weight: 600;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: var(--transition);
  font-family: var(--font);
}
.export-tab:hover { color: var(--text-primary); }
.export-tab.active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.export-panel {
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
}
.export-section {
  margin-bottom: 24px;
}
.export-section h3 {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px;
}
.export-checkboxes {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.export-cols { max-height: 240px; overflow-y: auto; padding: 4px 0; }
.export-cb {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius);
  background: var(--bg-input); cursor: pointer;
  font-size: 12.5px; color: var(--text-secondary);
  transition: var(--transition); min-width: 180px;
  border: 1px solid transparent;
}
.export-cb:hover { border-color: var(--accent-border); color: var(--text-primary); }
.export-cb input { accent-color: var(--accent); }
.export-cb input:checked + span { color: var(--text-primary); font-weight: 500; }
.export-select {
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-primary); font-size: 13px; font-family: var(--font);
  min-width: 200px;
}
.export-col-actions {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.btn-sm {
  padding: 4px 10px; border-radius: var(--radius);
  background: var(--bg-input); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: 11px; cursor: pointer;
  font-family: var(--font); transition: var(--transition);
}
.btn-sm:hover { border-color: var(--accent); color: var(--accent); }
.export-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, #8B7355, #A08968);
  color: #fff; border: none; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  transition: var(--transition); box-shadow: 0 2px 8px rgba(139,115,85,0.3);
}
.export-btn:hover {
  background: linear-gradient(135deg, #7A6548, #8B7355);
  box-shadow: 0 4px 16px rgba(139,115,85,0.4);
  transform: translateY(-1px);
}
.export-btn:active { transform: translateY(0); }
.export-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.badge-green { background: rgba(58,125,88,0.12); color: #3A7D58; }
.badge-amber { background: rgba(193,127,36,0.12); color: #C17F24; }
.badge-gray { background: rgba(107,107,107,0.12); color: #6B6B6B; }
.export-radio-list {
  display: flex; flex-direction: column; gap: 8px;
}
.export-radio-list .export-cb { min-width: auto; }

/* ── Quartalsreporting Progress ── */
.qr-progress-bar {
  height: 6px;
  background: var(--bg-tertiary, #E0DDD8);
  border-radius: 3px;
  overflow: hidden;
  margin: 10px 0;
}
.qr-progress-fill {
  height: 100%;
  background: var(--accent, #8B7355);
  width: 0%;
  transition: width 0.4s ease;
  border-radius: 3px;
}
.qr-status-text {
  font-size: 13px;
  color: var(--text-secondary, #6B6B6B);
  margin-top: 4px;
}
.qr-selectors {
  display: flex;
  gap: 12px;
}
.qr-selectors .export-select {
  flex: 1;
}

/* ═══════════ AUTH SCREEN ═══════════ */
#auth-screen {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0c1929 0%, #132744 50%, #1a365d 100%);
}
#auth-screen.hidden { display: none; }
.auth-card {
  width: 360px; padding: 48px 40px; text-align: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(20px);
}
.auth-logo {
  width: 56px; height: 56px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #B8964E, #d4b06a);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  letter-spacing: 1px;
}
.auth-title {
  font-family: var(--font); font-size: 22px; font-weight: 700;
  color: #fff; margin: 0 0 4px;
}
.auth-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.45); margin: 0 0 32px;
}
#auth-form { display: flex; flex-direction: column; gap: 12px; }
#auth-form input {
  width: 100%; padding: 12px 16px; box-sizing: border-box;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; color: #fff; font-size: 14px; font-family: var(--font);
  outline: none; transition: border-color 0.2s;
}
#auth-form input::placeholder { color: rgba(255,255,255,0.3); }
#auth-form input:focus { border-color: #B8964E; }
#auth-submit {
  width: 100%; padding: 12px; margin-top: 4px;
  background: linear-gradient(135deg, #B8964E, #a07f3e);
  border: none; border-radius: 8px; cursor: pointer;
  color: #fff; font-size: 14px; font-weight: 600; font-family: var(--font);
  transition: opacity 0.2s;
}
#auth-submit:hover { opacity: 0.9; }
#auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }
#auth-error {
  min-height: 20px; margin-top: 8px;
  font-size: 12px; color: #ef5350;
}
#auth-reset {
  display: inline-block; margin-top: 16px;
  font-size: 12px; color: rgba(255,255,255,0.35);
  text-decoration: none; transition: color 0.2s;
}
#auth-reset:hover { color: rgba(255,255,255,0.6); }

/* ═══════════ SYNC INDICATOR ═══════════ */
.sync-indicator {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; font-size: 10px;
  color: rgba(255,255,255,0.4);
}
.sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #6b7280; flex-shrink: 0;
}
.sync-indicator.synced .sync-dot { background: #059669; }
.sync-indicator.syncing .sync-dot { background: #d97706; animation: pulse 1s infinite; }
.sync-indicator.offline .sync-dot { background: #ef5350; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Logout button — full width row */
#auth-logout-btn { width: 100%; justify-content: center; margin-top: 2px; }

/* ================================================================
   Phase 2: Ampel-System, Alerts, Validation
   ================================================================ */

/* Ampel dots (traffic light indicators) */
.ampel-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
}
.ampel-dot-gruen { background: #059669; box-shadow: 0 0 4px rgba(5,150,105,0.4); }
.ampel-dot-gelb { background: #d97706; box-shadow: 0 0 4px rgba(217,119,6,0.4); }
.ampel-dot-rot { background: #dc2626; box-shadow: 0 0 4px rgba(220,38,38,0.4); animation: pulse 2s infinite; }

/* Ampel badges (text labels) */
.ampel-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.ampel-gruen { background: rgba(5,150,105,0.12); color: #059669; }
.ampel-gelb { background: rgba(217,119,6,0.12); color: #d97706; }
.ampel-rot { background: rgba(220,38,38,0.12); color: #dc2626; }

/* Nav badge for alerts */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 9px;
  background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700;
  margin-left: 6px; padding: 0 5px;
}

/* Small buttons */
.btn-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; font-size: 0.75rem;
  cursor: pointer; border: none; transition: var(--transition);
}
.btn-sm.btn-primary {
  background: var(--accent); color: #fff;
}
.btn-sm.btn-primary:hover { filter: brightness(1.1); }
.btn-sm.btn-outline {
  background: transparent; border: 1px solid var(--border); color: var(--text-secondary);
}
.btn-sm.btn-outline:hover { background: var(--bg-secondary); }

.btn-xs {
  font-size: 0.72rem; padding: 2px 8px; border-radius: 4px;
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); transition: all 0.15s;
}
.btn-xs:hover { background: var(--bg-secondary); border-color: var(--accent); color: var(--accent); }
.btn-xs.btn-outline { background: transparent; }

/* Leitfaden-Tab */
.lf-aufgabe:last-child { border-bottom: none; }
.lf-aufgabe:hover { background: rgba(184,150,78,0.03); }
.lf-kat-header:hover { background: var(--bg-secondary); border-radius: 8px; }
.badge-success { background: #059669; color: #fff; }

/* Inline edit inputs */
.inline-edit {
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 6px; font-size: 0.8rem; color: var(--text-primary);
  font-family: inherit;
}
.inline-edit:focus { border-color: var(--accent); outline: none; }

/* Object edit tab */
.obj-edit-input { background: var(--bg-secondary); color: var(--text-primary); font-family: inherit; }
.obj-edit-input:focus { border-color: var(--accent) !important; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.obj-edit-input:disabled { background: var(--bg-input); color: var(--text-muted); }
.obj-edit-save { transition: all 0.2s ease; }
.obj-edit-save:hover:not(:disabled) { background: var(--gold-hover) !important; transform: translateY(-1px); }
.obj-edit-save:disabled { opacity: 0.6; cursor: wait; }

/* Alerts list */
.alerts-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
  transition: var(--transition);
}
.alert-item:hover { box-shadow: var(--shadow); }
.alert-unread { border-left: 3px solid var(--accent); }
.alert-read { opacity: 0.7; }
.alert-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; }
.alert-content { flex: 1; }
.alert-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.alert-message { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.4; }
.alert-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }
.alert-actions { display: flex; gap: 6px; align-items: flex-start; flex-shrink: 0; margin-left: 12px; }

/* Modal overlay for correction draft + Konto-Modal (Audit-Runde 4e) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.modal-content {
  background: var(--bg-card); border-radius: 8px;
  max-width: 90vw; max-height: 90vh; overflow: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  margin: 0; font-size: 1.15rem;
}
.modal-close {
  background: none; border: none; font-size: 1.8rem; line-height: 1;
  cursor: pointer; color: var(--text-muted); padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 20px;
}
