/* Dashboard GewinnSparen — dark island, scoped entirely under .dash-dark.
   The surrounding app shell (sidebar, light cards) is unaffected. */
.dash-dark {
    background: var(--sidebar-bg);
    color: #fff;
    border-radius: 14px;
    padding: 24px 28px;
    font-family: Montserrat, Arial, sans-serif;
}
.dash-dark .dd-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.dash-dark .dd-title { font-size: 34px; font-weight: 700; line-height: 1.1; }
.dash-dark .dd-sub { color: #fff; margin-top: 4px; font-size: 13px; }
.dash-dark .dd-hint { font-size: 13px; color: #fff; }
.dash-dark .dd-hint-link { color: #F5B200; text-decoration: none; margin-left: 6px; }

.dash-dark .dd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.dash-dark .dd-btn { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; text-decoration: none; font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.12); }
.dash-dark .dd-btn small { color: #fff; }
.dash-dark .dd-btn-gold { background: #F5B200; color: var(--sidebar-bg); border-color: #F5B200; }
.dash-dark .dd-btn-gold small { color: rgba(28, 43, 58, 0.7); }
.dash-dark .dd-btn-ghost { background: rgba(255, 255, 255, 0.04); color: #fff; }
.dash-dark .dd-btn-icon { font-size: 22px; }

.dash-dark .dd-section-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; color: #fff; margin: 8px 0 10px; }
.dash-dark .dd-kpi-row,
.dash-dark .dd-fin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-dark .dd-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 16px; }
.dash-dark .dd-card-eyebrow { font-size: 11px; color: #fff; text-transform: uppercase; letter-spacing: 0.05em; }
.dash-dark .dd-card-value { font-size: 30px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.dash-dark .dd-card-value-fin { font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.dash-dark .dd-card-unit { font-size: 12px; color: #fff; }
.dash-dark .dd-gold { color: #F5B200; }
.dash-dark .dd-card-deltas { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.dash-dark .dd-delta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.dash-dark .dd-delta-lbl { color: #fff; }
.dash-dark .dd-pill { font-variant-numeric: tabular-nums; }
.dash-dark .dd-pill-pos, .dash-dark .dd-pos { color: #46d17f; }
.dash-dark .dd-pill-neg, .dash-dark .dd-neg { color: #ff6b6b; }
.dash-dark .dd-pill-neu, .dash-dark .dd-neu { color: #fff; }

/* Neuanmeldungen: two metric blocks (Neue Kunden / Neue Abo-Lose) stacked in one card. */
.dash-dark .dd-anm { margin-top: 10px; }
.dash-dark .dd-anm + .dd-anm { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.dash-dark .dd-chart-card { position: relative; margin-bottom: 20px; }
.dash-dark .dd-chart { position: relative; }
.dash-dark .dd-chart-svg { display: block; overflow: visible; }
.dash-dark .dd-chart-empty { color: #fff; text-align: center; padding: 40px; font-size: 13px; }
.dash-dark .dd-chart-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.dash-dark .dd-chart-ytick, .dash-dark .dd-chart-xtick { fill: #fff; font-size: 6px; font-family: Montserrat, Arial, sans-serif; }
.dash-dark .dd-chart-line { stroke: #F5B200; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dash-dark .dd-chart-dot { fill: #F5B200; stroke: var(--sidebar-bg); stroke-width: 2; cursor: pointer; }
.dash-dark .dd-chart-tip { position: absolute; pointer-events: none; background: rgba(20, 28, 45, 0.95); border: 1px solid rgba(245, 178, 0, 0.5); border-radius: 6px; padding: 6px 10px; font-size: 12px; white-space: nowrap; z-index: 5; }
.dash-dark .dd-chart-tip[hidden] { display: none; }
.dash-dark .dd-chart-tip-label { color: #F5B200; font-weight: 600; font-size: 11px; margin-bottom: 2px; }
.dash-dark .dd-chart-tip-val { font-variant-numeric: tabular-nums; }

.dash-dark .dd-perf-panel { margin-bottom: 14px; }
.dash-dark .dd-perf-panel-title { font-size: 12px; color: #fff; margin-bottom: 8px; }
.dash-dark .dd-mover-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-dark .dd-mover-card { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; padding: 12px; }
.dash-dark .dd-mover-head { font-size: 12px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.dash-dark .dd-mover-head-pos { color: #46d17f; }
.dash-dark .dd-mover-head-neg { color: #ff6b6b; }
.dash-dark .dd-mover-item { display: grid; grid-template-columns: 20px 1fr 52px 64px; gap: 8px; align-items: center; font-size: 12px; padding: 3px 0; }
.dash-dark .dd-mover-rank { color: #fff; }
.dash-dark .dd-mover-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-dark .dd-mover-pct { font-variant-numeric: tabular-nums; text-align: right; }
.dash-dark .dd-mover-abs { color: #fff; font-variant-numeric: tabular-nums; text-align: right; }
.dash-dark .dd-mover-empty { color: #fff; font-size: 12px; }

.dash-dark .dd-accordion { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 10px; margin-bottom: 20px; }
.dash-dark .dd-accordion > summary { cursor: pointer; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; list-style: none; }
.dash-dark .dd-accordion > summary::-webkit-details-marker { display: none; }
.dash-dark .dd-inst-wrap { padding: 0 16px 16px; overflow-x: auto; }
.dash-dark .dd-acc-body { padding: 4px 16px 16px; }
.dash-dark .dd-acc-body .dd-kpi-row { margin-bottom: 0; }
/* Every th/td carries an explicit background: the app shell's global light-theme
   `th { background:#f8fafc }` would otherwise leak in and render the header + group-label
   rows white-on-white. Values mirror the customer original's .dd-inst-table rules. */
.dash-dark .dd-inst-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 700px; }
.dash-dark .dd-inst-table th { background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; padding: 8px 12px; text-align: right; white-space: nowrap; }
.dash-dark .dd-inst-table th:first-child, .dash-dark .dd-inst-namecol { text-align: left; }
.dash-dark .dd-inst-table td { padding: 7px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); background: transparent; color: #fff; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dash-dark .dd-inst-table td:first-child { text-align: left; font-weight: 500; }
.dash-dark .dd-inst-table tr:last-child td { border-bottom: none; }
.dash-dark .dd-inst-table tr.inst-group th { background: rgba(245, 178, 0, 0.08); color: rgba(245, 178, 0, 0.7); font-size: 9px; }
.dash-dark .dd-inst-table tr.inst-sum td { font-weight: 600; background: rgba(255, 255, 255, 0.04); border-top: 1px solid rgba(255, 255, 255, 0.1); }
.dash-dark .dd-inst-table tr.inst-grand td { color: #F5B200; background: rgba(245, 178, 0, 0.12); border-top: 2px solid rgba(245, 178, 0, 0.4); }
.dash-dark .dd-inst-empty { color: #fff; padding: 20px; text-align: center; font-size: 13px; }

/* ===== JAHRESVERGLEICH (Losverkauf per Geschäftsjahr — SVG bar chart) ===== */
.dash-dark .dd-yc { padding: 8px 4px 4px; }
.dash-dark .dd-yc-svg { width: 100%; display: block; overflow: visible; }
.dash-dark .dd-yc-grid { stroke: rgba(255, 255, 255, 0.10); stroke-width: 1; }
.dash-dark .dd-yc-axis { stroke: rgba(255, 255, 255, 0.25); stroke-width: 1; }
.dash-dark .dd-yc-ytick { fill: #fff; font-size: 5px; font-variant-numeric: tabular-nums; }
.dash-dark .dd-yc-axis-title { fill: #fff; font-size: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.dash-dark .dd-yc-xtick { fill: #fff; font-size: 6px; font-weight: 600; }
.dash-dark .dd-yc-bar { fill: #F5B200; }
.dash-dark .dd-yc-bar-laufend { fill: url(#ycStripe); }
.dash-dark .dd-yc-val { fill: #fff; font-size: 6.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-dark .dd-yc-delta { fill: #fff; font-size: 6px; font-variant-numeric: tabular-nums; }
/* `fill`, not `color`: SVG text cannot reuse the .dd-pos family. Order beats the base rule. */
.dash-dark .dd-yc-delta-pos { fill: #46d17f; }
.dash-dark .dd-yc-delta-neg { fill: #ff6b6b; }
.dash-dark .dd-yc-delta-neu { fill: #fff; }
.dash-dark .dd-yc-laufend-tag { fill: rgba(255, 255, 255, 0.7); font-size: 5px; font-weight: 700; letter-spacing: 0.5px; }

/* ===== INFO ICON + TOOLTIP (dark dashboard) ===== */
.dash-dark .dd-info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); color: #fff; font-size: 10px; font-weight: 700; font-style: normal; line-height: 1; cursor: help; vertical-align: middle; }
.dash-dark .dd-info:focus-visible { outline: 2px solid #F5B200; outline-offset: 1px; }
.dash-dark [data-tooltip] { position: relative; }
.dash-dark [data-tooltip]:hover::after,
.dash-dark [data-tooltip]:focus-visible::after {
    content: attr(data-tooltip);
    position: absolute; left: 0; top: 100%; margin-top: 6px;
    padding: 6px 10px; background: rgba(20, 28, 45, 0.97); color: #fff;
    border: 1px solid rgba(245, 178, 0, 0.5); border-radius: 6px;
    font-size: 12px; font-weight: 400; font-style: normal; text-transform: none; letter-spacing: normal;
    white-space: nowrap; z-index: 20; pointer-events: none;
}
