@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #eef4f7;
  --border: #e2e8f0;
  --border-light: #eff3f8;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent: #0e7490;
  --accent-light: #e0f7fa;
  --accent-hover: #0c5f75;
  --accent-secondary: #f43f5e;
  --green: #3a7d44;
  --green-light: #e2f0e6;
  --red: #c0392b;
  --red-light: #fbeeed;
  --amber: #c4a97d;
  --amber-light: #fbf6ed;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
  --transition: 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* === HEADER === */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: height 0.25s ease, box-shadow 0.25s ease;
}
.header.compact {
  height: 52px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 0;
}
.header-logo {
  height: 56px;
  width: auto;
  display: block;
  transition: height 0.25s ease;
}
.header.compact .header-logo {
  height: 34px;
}
.header-praxis {
  color: var(--text-muted);
  font-size: 14px;
  margin-left: -8px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === BUTTONS === */
.btn {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  background: var(--surface-alt);
  border-color: #d5d3ce;
}
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 13px;
}
.btn-toggle-off {
  color: var(--text-light);
  border-color: var(--border-light);
  background: var(--surface-alt);
  opacity: 0.7;
  text-decoration: line-through;
}

/* Segmented Euro/Anzahl control */
.euro-seg {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  gap: 0;
}
.euro-seg .btn {
  border: none;
  border-radius: 0;
}
.euro-seg .btn:first-child {
  border-right: 1px solid var(--border);
}
.btn-seg-inactive {
  background: var(--surface-alt);
  color: var(--text-light);
}
.btn-seg-inactive:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* Euro-Schätzhinweis-Banner (unter dem Header) */
.euro-banner {
  display: none;
  align-items: center;
  gap: 8px;
  background: #faf6e8;
  border-bottom: 1px solid #e8dfa8;
  color: #7a6a20;
  font-size: 13px;
  padding: 7px 32px;
  position: sticky;
  top: 80px; /* direkt unter Header (compact: 52px) */
  z-index: 90;
}
.euro-banner.visible {
  display: flex;
}
.header.compact ~ .euro-banner {
  top: 52px;
}
@media (max-width: 600px) {
  .euro-banner { padding: 7px 16px; }
}

/* === MAIN === */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 40px;
}

/* === HERO === */
.hero-question {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-question span {
  color: var(--accent);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.hero-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  cursor: default;
}
.hero-kpi:nth-child(odd) {
  border-top: 3px solid var(--accent);
}
.hero-kpi:nth-child(even) {
  border-top: 3px solid var(--accent-secondary);
}
.hero-kpi:first-child .hero-kpi-value {
  color: var(--accent);
}
.hero-kpi[data-click]:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.hero-kpi-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.hero-kpi-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.hero-kpi-value small {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}
.hero-kpi-context {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.4;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}
.trend-up {
  color: var(--green);
  background: var(--green-light);
}
.trend-down {
  color: var(--red);
  background: var(--red-light);
}

.hero-compare {
  display: flex;
  align-items: center;
  margin-top: 5px;
  gap: 8px;
}
.hero-compare-label {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-compare-delta {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.hero-compare-up   { color: var(--green); }
.hero-compare-down { color: var(--red); }

.hero-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  margin-top: 8px;
}
.hero-spark span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
  opacity: 0.3;
  transition: opacity var(--transition);
}
.hero-spark span:last-child {
  opacity: 1;
}

/* === NAV PILLS === */
.section-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  flex-wrap: wrap;
  position: sticky;
  top: 56px;
  z-index: 90;
  background: var(--bg);
  padding: 10px 0;
  margin-top: -10px;
}
.nav-pill {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.nav-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.nav-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* === CHART CARDS === */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}
.chart-card-full {
  grid-column: 1 / -1;
}
.chart-card-clickable {
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.chart-card-clickable:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}
.chart-nav-hint {
  color: var(--accent);
  font-weight: 500;
  opacity: 0.75;
}
.chart-card-clickable:hover .chart-nav-hint {
  opacity: 1;
}
.dist-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.dist-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.chart-subtitle {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ECharts container */
.echart-container {
  width: 100%;
  height: 280px;
}
.echart-container-sm {
  width: 100%;
  height: 200px;
}
.echart-container-tall {
  width: 100%;
  height: 360px;
}

/* === TOGGLE CHIPS === */
.toggle-group {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  border-radius: 6px;
  padding: 2px;
}
.toggle-chip {
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
}
.toggle-chip.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* === DATA QUALITY BAR === */
.data-quality-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 13px;
  color: var(--text-muted);
}
.data-quality-bar:hover {
  background: var(--surface-alt);
}
.dq-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.dq-dot.warn {
  background: var(--amber);
}
.dq-dot.error {
  background: var(--red);
}
.dq-summary {
  flex: 1;
}
.dq-chevron {
  transition: transform var(--transition);
  font-size: 15px;
  color: var(--text-light);
}
.dq-chevron.open {
  transform: rotate(180deg);
}
.dq-details {
  display: none;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  margin-top: -25px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-muted);
}
.dq-details.open {
  display: block;
}
.dq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.dq-item-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 2px;
}
.dq-item-value {
  font-weight: 600;
  font-size: 14px;
}
.dq-gruppe-list {
  font-weight: 400;
  font-size: 12px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dq-gruppe-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.dq-gruppe-name {
  color: var(--text-light);
  white-space: nowrap;
  min-width: 170px;
}
.dq-gruppe-stats {
  color: var(--text);
}
.dq-gruppe-sonstige {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}
.dq-gruppe-sonstige .dq-gruppe-name,
.dq-gruppe-sonstige .dq-gruppe-stats {
  color: var(--text-light);
  opacity: .8;
}

/* === FILTER === */
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
}
.filter-select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.filter-input {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  width: 260px;
  outline: none;
  transition: border-color 0.15s;
}
.filter-input:focus {
  border-color: var(--accent);
}

/* === ACCORDION === */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.acc-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.acc-group:hover {
  box-shadow: var(--shadow);
}
.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.acc-header:hover {
  background: var(--surface-alt);
}
.acc-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acc-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.acc-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.acc-group-name {
  font-size: 15px;
  font-weight: 600;
}
.acc-group-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 10px;
}
.acc-group-count {
  font-size: 13px;
  color: var(--text-light);
}
.acc-chevron {
  font-size: 13px;
  color: var(--text-light);
  transition: transform var(--transition);
}
.acc-group.open .acc-chevron {
  transform: rotate(180deg);
}
.acc-body {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--border-light);
}
.acc-group.open .acc-body {
  display: block;
}

.acc-mehr-row {
  cursor: pointer;
}
.acc-mehr-row:hover .acc-mehr-label {
  color: var(--accent);
}
.acc-mehr-cell {
  padding: 8px 12px;
  text-align: center;
}
.acc-mehr-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
}

.acc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}
.acc-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 8px 8px;
  border-bottom: 1px solid var(--border-light);
}
.acc-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border-light);
}
.acc-table tr:last-child td {
  border-bottom: none;
}
.acc-table tr:hover td {
  background: var(--surface-alt);
}
.acc-ziffer {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.acc-ziffer:hover {
  text-decoration: underline;
}
.acc-ziffer::after {
  content: "→";
  font-size: 11px;
  opacity: 0;
  transition: opacity var(--transition);
}
.acc-ziffer:hover::after {
  opacity: 1;
}
@keyframes acc-highlight-fade {
  0%   { background: #b8d4a8; }
  100% { background: transparent; }
}
.acc-highlight td {
  animation: acc-highlight-fade 2.5s ease forwards;
}
.acc-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.acc-table th.acc-num {
  text-align: right;
}
.acc-sparkline-col {
  width: 72px;
  text-align: center;
}
.mini-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 22px;
}
.mini-bars span {
  width: 10px;
  background: var(--accent);
  opacity: 0.5;
  border-radius: 2px 2px 0 0;
}
.mini-bars span:last-child {
  opacity: 1;
}

/* === DEEPDIVE TOTALS === */
.dd-totals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  margin-top: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.dd-totals-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.dd-totals-val {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.dd-totals-label {
  color: var(--text-muted);
}
.dd-totals-sep {
  color: var(--border);
  font-size: 16px;
}

/* === UPLOAD MODE MODAL === */
.upload-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(61, 61, 53, 0.35);
  backdrop-filter: blur(4px);
  z-index: 600;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease;
}
.upload-modal-overlay.open {
  display: flex;
}
.upload-modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.08);
  padding: 36px 32px 28px;
  width: 440px;
  animation: slideUp 0.2s ease;
}
.upload-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}
.upload-modal-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upload-modal-actions {
  display: flex;
  gap: 12px;
}
.upload-modal-actions .btn {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 18px 16px;
  gap: 6px;
  text-align: center;
  font-size: 15px;
}
.upload-modal-hint {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
  white-space: normal;
  line-height: 1.4;
  text-align: center;
}

/* === ZIFFER DETAIL PANEL === */
.ziffer-detail-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(61, 61, 53, 0.3);
  backdrop-filter: blur(4px);
  z-index: 500;
  animation: fadeIn 0.2s ease;
}
.ziffer-detail-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ziffer-detail-panel {
  background: var(--surface);
  border-radius: 16px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.08);
  width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.25s ease;
}
.zdp-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.zdp-ziffer-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.zdp-bezeichnung {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}
.zdp-gruppe-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-top: 6px;
  display: inline-block;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.zdp-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}
.zdp-close:hover {
  background: var(--surface-alt);
  color: var(--text);
}
.zdp-body {
  padding: 20px 28px 28px;
}
.zdp-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.zdp-kpi {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.zdp-kpi-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.zdp-kpi-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.zdp-kpi-val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.zdp-kpi-delta {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}
.zdp-chart-container {
  margin-bottom: 16px;
}

/* Treemap blocks */
.treemap-block {
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}
.treemap-block:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

/* === EMPTY STATE === */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  animation: fadeInUp 0.5s ease forwards;
}
.drop-zone {
  width: 100%;
  max-width: 520px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 48px 32px;
  transition: all 0.25s ease;
  cursor: pointer;
  background: var(--surface);
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.drop-zone.dragover {
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(122, 139, 110, 0.12);
}
.drop-icon {
  width: 56px;
  height: 56px;
  background: var(--surface-alt);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 24px;
  color: var(--accent);
}
.drop-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}
.drop-sub {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 20px;
}
.drop-or {
  font-size: 13px;
  color: var(--text-light);
  margin: 16px 0;
}
.drop-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 24px;
  max-width: 360px;
}
.drop-hint code {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  background: var(--surface-alt);
  padding: 1px 5px;
  border-radius: 3px;
}
.demo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition);
}
.demo-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* === LOGIN OVERLAY === */
#loginOverlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 250, 245, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
.login-logo {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 14px;
  color: white;
  font-weight: 700;
  font-size: 22px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.login-praxis {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.login-hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}
.login-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  letter-spacing: 0.1em;
  outline: none;
  transition: border-color var(--transition);
}
.login-input:focus {
  border-color: var(--accent);
}
.login-error {
  font-size: 13px;
  color: var(--red);
  min-height: 16px;
}
.login-contact {
  font-size: 12px;
  color: var(--text-light);
}
.login-contact a {
  color: var(--accent);
  text-decoration: none;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--text-light);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-in {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}
.delay-1 {
  animation-delay: 0.05s;
}
.delay-2 {
  animation-delay: 0.1s;
}
.delay-3 {
  animation-delay: 0.15s;
}
.delay-4 {
  animation-delay: 0.2s;
}
.delay-5 {
  animation-delay: 0.25s;
}

/* === OVERVIEW: Hero (neu) === */
.ov-greeting {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ov-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.ov-headline {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}
.ov-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.ov-hero-left,
.ov-hero-right {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.ov-hero-tile {
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.ov-hero-tile:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.ov-hero-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.ov-hero-value {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 6px;
}
.ov-hero-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-spark-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 80px;
}
.ov-spark-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}
.ov-spark-val {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  white-space: nowrap;
}
.ov-spark-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--accent-light);
  min-height: 4px;
}
.ov-spark-bar.current {
  background: var(--accent);
}
.ov-spark-labels {
  display: flex;
  gap: 10px;
}
.ov-spark-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
}

/* === OVERVIEW: Delta-Karten === */
.ov-delta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.ov-delta-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.ov-delta-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.ov-delta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ov-delta-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.ov-delta-icon.green  { background: #E1F5EE; color: #0F6E56; }
.ov-delta-icon.red    { background: #FCEBEB; color: #A32D2D; }
.ov-delta-icon.purple { background: #EEEDFE; color: #534AB7; }
.ov-delta-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-block;
}
.ov-delta-badge.green  { background: #E1F5EE; color: #1D9E75; }
.ov-delta-badge.red    { background: #FCEBEB; color: #A32D2D; }
.ov-delta-badge.purple { background: #EEEDFE; color: #534AB7; }
.ov-delta-type-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 8px;
}
.ov-delta-ziffer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}
.ov-delta-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}
.ov-delta-nums {
  font-size: 12px;
  color: var(--text-light);
}
.ov-delta-nums strong {
  color: var(--text);
}

/* === OVERVIEW: Zusammenfassung === */
.ov-compare-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ov-yoy-hint {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
}
.ov-summary-item-inner {
  flex: 1;
}
.ov-expand-hint {
  font-size: 11px;
  color: var(--text-light);
  margin-left: 6px;
}
.ov-summary-detail {
  margin-top: 8px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 6px;
}
.ov-detail-section-label {
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-top: 6px;
}
.ov-detail-ziffer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  transition: border-color var(--transition);
  width: fit-content;
}
.ov-detail-ziffer:hover {
  border-color: var(--accent);
}
.ov-detail-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.ov-detail-sep {
  font-size: 12px;
  color: var(--border);
}
.ov-detail-n {
  font-size: 12px;
  color: var(--text-light);
}
.ov-summary-heading {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-top: 10px;
  margin-bottom: 6px;
}
.ov-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background var(--transition);
}
.ov-summary:hover {
  background: var(--surface-alt);
}
.ov-summary-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.ov-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}
.ov-dot.teal  { background: var(--accent); }
.ov-dot.amber { background: var(--amber); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chart-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 20px 16px;
  }
  .header {
    padding: 0 16px;
  }
  .dq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ziffer-detail-panel {
    width: 95%;
    margin: 16px;
  }
  .filter-row {
    flex-wrap: wrap;
  }
  .ov-hero-grid {
    grid-template-columns: 1fr;
  }
  .ov-delta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .header-praxis {
    display: none;
  }
}

/* === THEME SWITCHER === */
.theme-switcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
}

.ts-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ts-circles {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ts-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
  outline: none;
}

.ts-circle:hover {
  transform: scale(1.15);
}

.ts-circle.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--surface);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.ts-label {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 130px;
}

.ts-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  transition: color var(--transition);
}

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

.ts-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition);
}

.ts-toggle:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

/* === AUTH WALL === */
.auth-wall {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px 40px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.07);
}

.auth-logo {
  height: 72px;
  width: auto;
  margin-bottom: 24px;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.auth-input {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  outline: none;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  text-transform: none;
  letter-spacing: normal;
  color: var(--text-light);
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.auth-input.shake {
  border-color: #ef4444;
}

.auth-error {
  font-size: 12px;
  color: #ef4444;
  font-weight: 600;
  min-height: 18px;
}

@keyframes pb-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  40%       { transform: translateX(7px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

.auth-input.do-shake {
  animation: pb-shake 0.4s ease-out;
}
