/**
 * Wheel Dashboard v1.0.0
 * CSS Styles — wd-* Prefix
 */

/* =========================================================================
   DESIGN SYSTEM — gleiche Variablen wie aktien-scanner.css
   Definiert unter .ofma-dashboard damit alle Module konsistente Werte nutzen.
   ========================================================================= */
.ofma-dashboard {
    /* Typography */
    --of-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --of-font-size-3xs: 8px;
    --of-font-size-2xs: 9px;
    --of-font-size-xs: 10px;
    --of-font-size-sm: 11px;
    --of-font-size-base: 12px;
    --of-font-size-md: 13px;
    --of-font-size-lg: 14px;
    --of-font-size-xl: 15px;
    --of-font-size-2xl: 16px;
    --of-font-size-3xl: 18px;
    --of-font-size-4xl: 20px;
    --of-font-size-5xl: 24px;
    --of-font-size-table: var(--of-font-size-md);
    --of-font-size-header: var(--of-font-size-sm);
    --of-font-weight-regular: 400;
    --of-font-weight-medium: 500;
    --of-font-weight-semibold: 600;
    --of-font-weight-bold: 700;
    --of-font-weight-black: 900;

    /* Colors */
    --of-bg-primary: #f8fafc;
    --of-bg-card: #ffffff;
    --of-bg-hover: #f1f5f9;
    --of-bg-subtle: #e2e8f0;
    --of-text-primary: #1e293b;
    --of-text-secondary: #475569;
    --of-text-muted: #94a3b8;
    --of-accent-teal: #14b8a6;
    --of-accent-violet: #8b5cf6;
    --of-border: #e2e8f0;
    --of-border-dark: #cbd5e1;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

    /* Score Colors */
    --score-excellent: #059669;
    --score-excellent-light: #10b981;
    --score-good: #4ade80;
    --score-medium: #d97706;
    --score-medium-light: #f59e0b;
    --score-weak: #dc2626;
    --score-weak-light: #ef4444;
    --score-warning: #eab308;
}

/* =========================================================================
   PAGE HEADER — zentrale Titel-Styles (identisch mit aktien-scanner.css)
   ========================================================================= */
.wd-wrap .page-header {
    margin-bottom: 0.5rem;
}

.wd-wrap .page-header__title {
    font-size: var(--of-font-size-5xl);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-primary);
    margin: 0 0 0.25rem 0;
}

.wd-wrap .page-header__subtitle {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-regular);
    color: var(--of-text-muted);
    margin: 0;
}

/* =========================================================================
   DASHBOARD INTEGRATION
   ========================================================================= */
.ofma-dashboard__main--wheel-dashboard {
    flex: 1 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 1.5rem !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--of-bg-primary);
}

.wd-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: var(--of-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    color: var(--of-text-primary);
    min-height: 0;
    gap: 0.75rem;
    overflow: hidden;
}

/* =========================================================================
   HEADER
   ========================================================================= */
.wd-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.wd-header__date {
    text-align: right;
    flex-shrink: 0;
}

.wd-header__date-lbl {
    display: block;
    font-size: var(--of-font-size-2xs);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--of-text-muted);
}

#wd-date {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-semibold);
    color: var(--of-text-secondary);
}

/* Chart Tooltip-Icon rechts oben */
.wd-chart-card--clickable {
    position: relative;
}
.wd-chart-help {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    font-size: 8px;
}

/* Hover-Highlight auf klickbaren Charts */
.wd-chart-card--clickable canvas {
    transition: filter 0.15s;
}
.wd-chart-card--clickable:hover canvas {
    filter: brightness(1.08);
}

/* =========================================================================
   CHART-KARTEN
   ========================================================================= */
.wd-charts {
    display: grid;
    grid-template-columns: 3fr 3fr 3fr 2fr 2fr 2fr;
    gap: 10px;
    margin-bottom: 16px;
}

.wd-chart-card {
    background: var(--of-bg-card);
    border: 1px solid var(--of-border);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    min-width: 0;
    overflow: hidden;
}

.wd-chart-card__title {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-primary);
    margin-bottom: 0.5rem;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid var(--of-border);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wd-chart-card canvas {
    display: block;
    width: 100% !important;
}

/* =========================================================================
   TOP 5 PRO STRATEGIE (innerhalb Chart-Karten)
   ========================================================================= */
.wd-chart-card--top5 {
    padding: 0.5rem 0;
}

.wd-chart-card__title--score     { color: #14b8a6; }
.wd-chart-card__title--warn      { color: #d97706; }
.wd-chart-card__title--yield     { color: #059669; }
.wd-chart-card__title--small     { color: #8b5cf6; }


.wd-chart-card--top5 .wd-chart-card__title {
    padding: 0 0.625rem 0.375rem;
    margin-bottom: 0;
    border-bottom-color: currentColor;
}

.wd-top5__list {
    padding: 0.125rem 0;
}

.wd-top5__row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
    position: relative;
}
.wd-top5__row:hover {
    background: var(--of-bg-hover);
}
.wd-top5__row--loading {
    pointer-events: none;
    opacity: 0.5;
}
.wd-top5__row--loading::after {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    margin-top: -8px;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(139,92,246,0.2);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: wd-spin 0.6s linear infinite;
}
@keyframes wd-spin {
    to { transform: rotate(360deg); }
}

.wd-top5__rank {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-bold);
    background: var(--of-bg-hover);
    color: var(--of-text-muted);
    flex-shrink: 0;
}

.wd-top5__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.wd-top5__ticker {
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-primary);
}

.wd-top5__name {
    font-size: var(--of-font-size-xs);
    color: var(--of-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Earnings-Warnung Badge (Tabelle) */
.wd-earnings-badge {
    display: inline-block;
    color: #d97706;
    font-size: 11px;
    margin-left: 2px;
    cursor: help;
}
.wd-earnings-badge--near {
    color: #eab308;
    opacity: 0.8;
}

/* Earnings-Warnung (Detail-Modal) */
.wd-det-warn {
    background: rgba(217, 119, 6, 0.1);
    border: 1px solid rgba(217, 119, 6, 0.3);
    color: #d97706;
    font-size: var(--of-font-size-2xs);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
}

.wd-top5__yield {
    font-size: var(--of-font-size-2xs);
    color: #059669;
    font-weight: var(--of-font-weight-semibold);
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.wd-top5__score {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-black);
    flex-shrink: 0;
}

.wd-top5__empty {
    padding: 0.75rem;
    text-align: center;
    font-size: var(--of-font-size-2xs);
    color: var(--of-text-muted);
}

.wd-wrap > .ofma-wf {
    flex-shrink: 0;
}

.wd-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0.75rem;
    overflow: hidden;
}

/* =========================================================================
   MAIN AREA (Sidebar + Table)
   ========================================================================= */
.wd-main {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

/* =========================================================================
   FILTER SIDEBAR
   ========================================================================= */
.wd-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--of-bg-card);
    border: 1px solid var(--of-border);
    border-radius: 12px;
    padding: 0.875rem;
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wd-sb-group {}

.wd-sb-label {
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--of-text-muted);
    margin-bottom: 0.3rem;
}

.wd-sb-btns {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

#wd-width-btns {
    justify-content: flex-start;
}

#wd-width-btns .wd-sb-btn {
    flex: 0 0 auto;
    min-width: 38px;
    text-align: center;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
}

.wd-sb-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--of-border);
    border-radius: 5px;
    background: var(--of-bg-card);
    font-size: 0.75rem;
    font-weight: var(--of-font-weight-semibold);
    color: var(--of-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.wd-sb-btn:hover {
    border-color: var(--of-accent-teal);
    color: var(--of-text-primary);
}

.wd-sb-btn--active {
    background: var(--of-accent-teal);
    color: #fff;
    border-color: var(--of-accent-teal);
}

.wd-sb-btn--auto.wd-sb-btn--active { background: var(--of-accent-violet, #8b5cf6); border-color: var(--of-accent-violet, #8b5cf6); }
.wd-sb-btn--bps.wd-sb-btn--active { background: var(--score-excellent); border-color: var(--score-excellent); }
.wd-sb-btn--bcs.wd-sb-btn--active { background: var(--score-weak); border-color: var(--score-weak); }
.wd-sb-btn--ic.wd-sb-btn--active  { background: var(--score-medium); border-color: var(--score-medium); }

.wd-sidebar .wd-sb-select,
.wd-sidebar .wd-sb-input {
    width: 100%;
    padding: 0.25rem 0.375rem;
    border: 1px solid var(--of-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: var(--of-font-weight-medium);
    color: var(--of-text-primary);
    background: var(--of-bg-card);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    height: auto;
    line-height: 1.4;
}

.wd-sidebar .wd-sb-select {
    cursor: pointer;
}

.wd-sidebar .wd-sb-input {
    -moz-appearance: textfield;
}

.wd-sidebar .wd-sb-select:focus,
.wd-sidebar .wd-sb-input:focus {
    border-color: var(--of-accent-teal);
}

.wd-sb-input::-webkit-outer-spin-button,
.wd-sb-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wd-sb-input::placeholder {
    color: var(--of-text-muted);
}

/* Slider Value Display */
.wd-sb-val {
    font-weight: var(--of-font-weight-bold);
    color: var(--of-accent-teal);
}

.wd-sb-label .wd-sb-val {
    float: right;
}

/* Range Min–Max Werte-Zeile */
.wd-sb-range-vals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.wd-sb-range-vals .wd-sb-val {
    float: none;
}

.wd-sb-range-sep {
    color: var(--of-text-muted);
    font-size: var(--of-font-size-xs);
}

/* Range Slider */
.wd-sb-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--of-border);
    outline: none;
    cursor: pointer;
}

.wd-sb-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--of-accent-teal);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s;
}

.wd-sb-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.wd-sb-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--of-accent-teal);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
}

.wd-sb-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--of-border);
}

.wd-sb-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wd-sb-slider--half {
    width: 50%;
}

.wd-sb-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--of-font-size-xs);
    color: var(--of-text-secondary);
    cursor: pointer;
}
.wd-sb-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--of-primary);
    cursor: pointer;
    margin: 0;
}

.wd-sb-reset {
    width: 100%;
    padding: 2px 10px;
    border: none;
    border-radius: 4px;
    background: #ef4444;
    color: #fff;
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-semibold);
    cursor: pointer;
    transition: background 0.15s;
    margin-top: auto;
}

.wd-sb-reset:hover {
    background: #dc2626;
}

.wd-sb-width-custom {
    width: 100%;
    padding: 0.2rem 0.375rem;
    border: 1px solid var(--of-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-medium);
    color: var(--of-text-primary);
    background: var(--of-bg-card);
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    -moz-appearance: textfield;
    margin-top: 3px;
}

.wd-sb-width-custom::-webkit-outer-spin-button,
.wd-sb-width-custom::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wd-sb-width-custom:focus {
    border-color: var(--of-accent-teal);
}

/* =========================================================================
   TABLE AREA
   ========================================================================= */
.wd-table-area {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--of-bg-card);
    border: 1px solid var(--of-border);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.wd-table-wrap {
    flex: 1;
    overflow: auto;
    min-height: 0;
}

/* Footer — identisches Design wie Aktienscanner, sticky am unteren Bildschirmrand */
.wd-footer {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.5rem;
    background: var(--of-bg-hover);
    border-top: 1px solid var(--of-border);
    gap: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.wd-footer__left {
    flex: 1;
}

.wd-footer__center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.wd-footer__right {
    flex: 1;
}

.wd-footer__info {
    font-size: var(--of-font-size-md);
    color: var(--of-text-muted);
    white-space: nowrap;
}

.wd-footer__info strong {
    color: var(--of-accent-teal);
}

.wd-footer__per-page {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: var(--of-font-size-sm);
    color: var(--of-text-muted);
}

.wd-footer__per-page select {
    padding: 3px 20px 3px 6px !important;
    border: 1px solid var(--of-border) !important;
    border-radius: 4px !important;
    background-color: var(--of-bg-card) !important;
    color: var(--of-text-primary) !important;
    font-size: 0.75rem !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
    height: 24px !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 5px center !important;
}

.wd-footer__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wd-footer__btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--of-border);
    border-radius: 4px;
    background: var(--of-bg-card);
    font-size: var(--of-font-size-sm);
    color: var(--of-text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.wd-footer__btn:hover:not(:disabled) {
    border-color: var(--of-accent-teal);
    color: var(--of-accent-teal);
}

.wd-footer__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.wd-footer__page-info {
    font-size: var(--of-font-size-sm);
    color: var(--of-text-muted);
    white-space: nowrap;
}

/* =========================================================================
   TABLE
   ========================================================================= */
.wd-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--of-font-size-table, 13px);
    font-weight: var(--of-font-weight-medium);
}

.wd-table thead tr {
    position: sticky;
    top: 0;
    z-index: 10;
}

.wd-table th {
    padding: 0.5rem 0.625rem;
    height: 40px;
    text-align: left;
    font-weight: var(--of-font-weight-semibold);
    font-size: var(--of-font-size-header, 11px);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--of-text-muted);
    background: #eef2f6;
    border-bottom: 1px solid var(--of-border);
    border-right: 1px solid var(--of-border);
    white-space: nowrap;
    user-select: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.wd-table th:last-child {
    border-right: none;
}

.wd-th-content {
    vertical-align: middle;
}

.wd-th--sort {
    cursor: pointer;
    transition: color 0.15s;
}

.wd-th--sort:hover {
    color: var(--of-accent-teal);
    background: var(--of-bg-subtle);
}

/* Sort Icons — wie Aktien-Scanner */
.wd-sort-icon {
    font-size: var(--of-font-size-xs);
    opacity: 0.5;
    min-width: 14px;
    text-align: center;
    color: var(--of-text-muted);
    margin-left: 4px;
    vertical-align: middle;
}

.wd-sort-neutral {
    font-size: var(--of-font-size-3xs);
    letter-spacing: -1px;
    opacity: 0.5;
}

.wd-sort-icon--active {
    opacity: 1;
    color: var(--of-accent-teal);
    font-weight: var(--of-font-weight-bold);
}

.wd-table td {
    padding: 0.5rem 0.625rem;
    height: 40px;
    border-bottom: 1px solid var(--of-border);
    white-space: nowrap;
    font-size: var(--of-font-size-md);
    vertical-align: middle;
}

/* Zebra-Stripes + Hover — wie Aktien-Scanner */
.wd-table tbody tr {
    background: var(--of-bg-card);
    transition: background 0.15s;
}

.wd-table tbody tr:nth-child(even) {
    background: var(--of-bg-primary);
}

.wd-row {
    cursor: pointer;
}

.wd-row:hover {
    background: rgba(13, 148, 136, 0.06) !important;
}

/* Detail-Button in Name-Spalte */
.wd-detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--of-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.wd-detail-btn:hover {
    background: var(--of-bg-subtle);
    color: var(--of-accent-teal);
}
.wd-detail-btn--loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}
.wd-detail-btn--loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid var(--of-border, #e2e8f0);
    border-top-color: var(--of-accent-teal, #14b8a6);
    border-radius: 50%;
    animation: wd-spin 0.6s linear infinite;
}
@keyframes wd-spin {
    to { transform: rotate(360deg); }
}

/* Name Cell — Ticker + Icons */
.wd-name-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.wd-name-cell__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
    flex: 1;
}

.wd-name-cell__ticker {
    font-weight: var(--of-font-weight-semibold);
    color: var(--of-accent-teal);
    font-size: var(--of-font-size-md);
}

.wd-name-cell__company {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-regular);
    color: var(--of-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wd-name-cell__actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.wd-row:hover .wd-name-cell__actions {
    opacity: 1;
}

.wd-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--of-text-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    transition: all 0.15s;
}

.wd-action-icon:hover {
    background: var(--of-bg-hover);
    color: var(--of-accent-teal);
}

.wd-action-icon--builder:hover {
    color: var(--of-accent-violet);
}

/* Loading-Spinner im Icon-Button */
.wd-icon-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid var(--of-border);
    border-top-color: var(--of-accent-teal);
    border-radius: 50%;
    animation: wd-spin 0.6s linear infinite;
}

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

/* =========================================================================
   HEADER TOOLTIP — wie Aktien-Scanner (Violet)
   ========================================================================= */
.wd-th-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: transparent;
    border: 1px solid var(--of-accent-violet);
    border-radius: 50%;
    font-size: var(--of-font-size-2xs);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-accent-violet);
    cursor: help;
    margin-left: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
    vertical-align: middle;
}

.wd-th-help:hover {
    background: var(--of-accent-violet);
    color: #fff;
}

.wd-th-tooltip {
    position: fixed;
    width: 240px;
    padding: 0.625rem 0.875rem;
    background: var(--of-accent-violet, #6d28d9);
    color: #fff;
    font-size: 11px;
    font-weight: var(--of-font-weight-regular);
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
    border-radius: 6px;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    display: none;
}

/* =========================================================================
   VIZ-BADGE — identisch mit aktien-scanner.css
   ========================================================================= */
.viz-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 24px;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-semibold);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.025em;
    white-space: nowrap;
    text-align: center;
    color: #ffffff;
    cursor: default;
}

.viz-badge--green {
    background: linear-gradient(135deg, var(--score-excellent) 0%, var(--score-excellent-light) 100%);
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}

.viz-badge--lightgreen {
    background: linear-gradient(135deg, var(--score-good) 0%, var(--score-good-light, #86efac) 100%);
    box-shadow: 0 1px 2px rgba(74, 222, 128, 0.3);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.viz-badge--yellow {
    background: linear-gradient(135deg, var(--score-warning) 0%, var(--score-warning-light, #fde047) 100%);
    box-shadow: 0 1px 2px rgba(253, 224, 71, 0.3);
}

.viz-badge--orange {
    background: linear-gradient(135deg, var(--score-medium) 0%, var(--score-medium-light) 100%);
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
}

.viz-badge--red {
    background: linear-gradient(135deg, var(--score-weak) 0%, var(--score-weak-light) 100%);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
}

.viz-badge--neutral {
    background: var(--of-border);
    color: var(--of-text-muted);
    box-shadow: none;
}

/* =========================================================================
   TABLE CELL STYLES
   ========================================================================= */

.wd-rank--top {
    background: var(--of-accent-teal);
    color: #fff;
}

/* Strategy badge — basiert auf zentralem viz-badge System */
.wd-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: var(--badge-height);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-semibold);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #fff;
}

.wd-badge--BPS {
    background: linear-gradient(135deg, var(--score-excellent) 0%, var(--score-excellent-light) 100%);
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.3);
}
.wd-badge--BCS {
    background: linear-gradient(135deg, var(--score-weak) 0%, var(--score-weak-light) 100%);
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.3);
}
.wd-badge--IC {
    background: linear-gradient(135deg, var(--score-medium) 0%, var(--score-medium-light) 100%);
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
}

/* Width-Tag bei Auto-Modus */
.wd-width-tag {
    display: inline-block;
    font-size: 10px;
    color: var(--of-text-muted, #94a3b8);
    background: var(--of-bg-secondary, #f1f5f9);
    border-radius: 3px;
    padding: 0 3px;
    vertical-align: middle;
}
.wd-trend-warn {
    color: #d97706;
    font-size: var(--of-font-size-sm);
    cursor: help;
}

/* Strikes */
.wd-strikes {
    font-weight: var(--of-font-weight-medium);
    color: var(--of-text-primary);
    letter-spacing: -0.02em;
}
.wd-strike-label {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    margin-right: 2px;
    vertical-align: baseline;
}
.wd-strike-label--sell { background: #ef4444; }
.wd-strike-label--buy  { background: #10b981; }
.wd-strike-sep {
    display: inline-block;
    margin: 0 3px;
    color: var(--of-text-muted);
    font-weight: 400;
}

/* Value colors */
.wd-val--pos  { color: var(--score-excellent); font-weight: var(--of-font-weight-semibold); }
.wd-val--good { color: var(--score-good); font-weight: var(--of-font-weight-semibold); }
.wd-val--mid  { color: #ca8a04; font-weight: var(--of-font-weight-semibold); }
.wd-val--warn { color: var(--score-medium); font-weight: var(--of-font-weight-semibold); }
.wd-val--neg  { color: var(--score-weak); font-weight: var(--of-font-weight-semibold); }

/* IV Rank Progress-Bar in Tabelle */
.wd-ivr-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
}
.wd-ivr-bar {
    flex: 1;
    height: 6px;
    background: var(--of-bg-hover);
    border-radius: 3px;
    overflow: hidden;
}
.wd-ivr-bar__fill {
    height: 100%;
    border-radius: 3px;
    opacity: 0.6;
    transition: width 0.3s;
}
.wd-ivr-val {
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: right;
}

/* Trend */
.wd-trend--bullish  { color: var(--score-excellent); font-weight: var(--of-font-weight-bold); }
.wd-trend--bearish  { color: var(--score-weak); font-weight: var(--of-font-weight-bold); }
.wd-trend--sideways { color: var(--score-medium); font-weight: var(--of-font-weight-bold); }

/* Sector — keine eigene Klasse mehr noetig, Text direkt in td */

/* =========================================================================
   LOADING / EMPTY
   ========================================================================= */
.wd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px;
    color: var(--of-text-muted);
    font-size: var(--of-font-size-md);
}

.wd-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--of-border);
    border-top-color: var(--of-accent-teal);
    border-radius: 50%;
    animation: wd-spin 0.6s linear infinite;
}

.wd-empty {
    padding: 60px;
    text-align: center;
    color: var(--of-text-muted);
    font-size: var(--of-font-size-md);
}

/* =========================================================================
   DETAIL OVERLAY
   ========================================================================= */
.wd-detail-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: auto;
}

.wd-detail {
    background: var(--of-bg-card);
    border-radius: 16px;
    width: 90vw;
    max-width: 900px;
    min-width: 700px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    margin: 5vh auto;
    min-height: 300px;
}

.wd-detail__close {
    position: absolute;
    top: 10px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--of-border);
    border-radius: 6px;
    background: #f1f5f9;
    font-size: 18px;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
    transition: all 0.15s;
}

.wd-detail__close:hover {
    background: #e2e8f0;
    color: var(--of-text-primary);
}

/* Detail content */
#wd-detail-content {
    padding: 1rem 1.25rem 1.25rem;
}

.wd-det-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--of-border);
}

.wd-det-head__left {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.wd-det-head__right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 40px;
}

/* Detail: Action-Buttons */
.wd-det-actions {
    display: flex;
    gap: 6px;
}
.wd-det-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--of-text-muted);
    background: var(--of-bg-hover);
    border: 1px solid var(--of-border);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.wd-det-action:hover {
    color: var(--of-accent-teal);
    border-color: var(--of-accent-teal);
    background: rgba(20, 184, 166, 0.08);
}
.wd-det-action--os {
    color: #059669;
}
.wd-det-action--os:hover {
    color: #047857;
    border-color: #059669;
    background: rgba(5, 150, 105, 0.08);
}
.wd-det-action--order {
    color: var(--of-accent-violet, #8b5cf6);
}
.wd-det-action--order:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.08);
}
.wd-det-ticker {
    font-size: var(--of-font-size-4xl);
    font-weight: var(--of-font-weight-black);
    color: var(--of-text-primary);
}
.wd-det-price {
    font-size: var(--of-font-size-lg);
    color: var(--of-text-muted);
}
.wd-det-sector {
    font-size: var(--of-font-size-sm);
    color: var(--of-text-muted);
}
.wd-det-trend__dir {
    font-weight: var(--of-font-weight-bold);
}
.wd-det-trend__val {
    color: var(--of-text-muted);
    font-variant-numeric: tabular-nums;
}
.wd-det-trend__rec {
    color: var(--of-text-secondary);
    font-weight: var(--of-font-weight-semibold);
}

/* Detail: 3-Spalten Layout */
.wd-det-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.wd-det-col {
    min-width: 0;
}
.wd-det-col__title {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--of-text-primary);
    padding-bottom: 0.375rem;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid var(--of-accent-teal);
}
.wd-det-num {
    display: inline-flex;
    flex-direction: column;
    background: var(--of-bg-hover);
    border-radius: 6px;
    padding: 4px 8px;
    min-width: 70px;
}
.wd-det-num small {
    font-size: var(--of-font-size-2xs);
    color: var(--of-text-muted);
    line-height: 1.2;
}
.wd-det-num b {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-primary);
}
.wd-det-nums {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wd-det-company {
    font-size: var(--of-font-size-sm);
    color: var(--of-text-muted);
}

/* Detail: SQS Breakdown Progress Bars */
.wd-det-sqs-total {
    margin-top: 0.5rem;
    font-size: var(--of-font-size-sm);
    color: var(--of-text-secondary);
    text-align: right;
}
.wd-det-pbar {
    margin-bottom: 10px;
}
.wd-det-pbar__label {
    display: flex;
    justify-content: space-between;
    font-size: var(--of-font-size-sm);
    color: var(--of-text-secondary);
    margin-bottom: 4px;
}
.wd-det-pbar__track {
    height: 10px;
    background: var(--of-bg-hover);
    border-radius: 5px;
    overflow: hidden;
}
.wd-det-pbar__fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s;
}

/* Detail: Sections (Score Breakdown, Projektion) */
.wd-det-section {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--of-border);
}
.wd-det-section__title {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--of-text-primary);
    margin-bottom: 0.5rem;
}
.wd-det-sb {
    margin-bottom: 0.5rem;
}
.wd-det-projection {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Detail: Wheel-Rad + SQS Row */
.wd-det-wheel-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.wd-det-wheel-canvas-wrap {
    flex-shrink: 0;
    margin-top: -30px;
}
.wd-det-wheel-canvas-wrap canvas {
    display: block;
}
.wd-det-sqs-col {
    flex: 1;
    min-width: 0;
    padding-top: 20px;
}
.wd-det-sqs-total {
    margin-top: 0.5rem;
    font-size: 12px;
    color: var(--of-text-muted);
}

@media (max-width: 700px) {
    .wd-det-wheel-row { flex-direction: column; align-items: center; }
}

/* Detail: Erkl\u00E4rende Texte */
.wd-det-explain {
    font-size: 13px;
    line-height: 1.6;
    color: var(--of-text-secondary);
    margin: 0 0 0.75rem;
}
.wd-det-explain strong {
    color: var(--of-text-primary);
}
.wd-det-explain--subtle {
    font-size: 12px;
    color: var(--of-text-muted);
    margin-top: 0.5rem;
    padding: 8px 12px;
    background: var(--of-bg-hover);
    border-radius: 6px;
    border-left: 3px solid var(--of-border);
}

/* Detail: Aktienqualit\u00E4t Ampel-Items */
.wd-det-quality {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 0.5rem;
}
.wd-det-qitem {
    font-size: 13px;
    color: var(--of-text-secondary);
    white-space: nowrap;
}
.wd-det-qsummary {
    font-size: 12px;
    color: var(--of-text-muted);
    margin-top: 4px;
}

/* Detail: Key-Metriken (horizontal) */
.wd-det-keymetrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0.75rem 0;
}

/* Detail: Jahresprojektion Grid */
.wd-det-projection-grid {
    max-width: 400px;
}
.wd-det-proj-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: var(--of-text-secondary);
    border-bottom: 1px solid var(--of-bg-hover);
}
.wd-det-proj-row--total {
    border-bottom: none;
    padding-top: 8px;
    font-size: 14px;
}
.wd-det-proj-row--total:first-of-type {
    border-top: 2px solid var(--of-border);
    margin-top: 4px;
}

/* Dark Mode: Detail Story */
[data-theme="dark"] .wd-det-explain { color: #94a3b8; }
[data-theme="dark"] .wd-det-explain strong { color: #94a3b8; }
[data-theme="dark"] .wd-det-explain--subtle { background: #1e293b; border-left-color: #334155; color: #64748b; }
[data-theme="dark"] .wd-det-qitem { color: #94a3b8; }
[data-theme="dark"] .wd-det-qsummary { color: #64748b; }
[data-theme="dark"] .wd-det-proj-row { color: #94a3b8; border-bottom-color: #1e293b; }
[data-theme="dark"] .wd-det-proj-row--total:first-of-type { border-top-color: #334155; }

/* Detail: 4 Schritt-Karten */
.wd-det-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 0.75rem;
}
.wd-det-step {
    background: var(--of-bg-card);
    border: 1px solid var(--of-border);
    border-top: 4px solid #94a3b8;
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}
.wd-det-step[style*="#14b8a6"] { border-top: 4px solid transparent; border-image: linear-gradient(90deg, #0d9488, #5eead4, #14b8a6) 1; }
.wd-det-step[style*="#f59e0b"] { border-top: 4px solid transparent; border-image: linear-gradient(90deg, #d97706, #fde68a, #f59e0b) 1; }
.wd-det-step[style*="#8b5cf6"] { border-top: 4px solid transparent; border-image: linear-gradient(90deg, #7c3aed, #c4b5fd, #8b5cf6) 1; }
.wd-det-step[style*="#3b82f6"] { border-top: 4px solid transparent; border-image: linear-gradient(90deg, #2563eb, #93c5fd, #3b82f6) 1; }
.wd-det-step__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.wd-det-step__nr {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}
.wd-det-step__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--of-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.wd-det-step__sublabel {
    font-size: 11px;
    color: var(--of-text-muted);
    margin: -4px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--of-bg-hover);
}
.wd-det-step .wd-det-keymetrics {
    margin: 0 0 8px;
}
.wd-det-step .wd-det-num {
    min-width: 0;
    padding: 3px 6px;
}
.wd-det-step .wd-det-explain--subtle {
    font-size: 11px;
    padding: 6px 8px;
    margin: 0;
}
.wd-det-step .wd-det-warn {
    margin-bottom: 8px;
}
.wd-det-warn-inline {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    background: rgba(245,158,11,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.wd-det-warn-inline--danger {
    color: #dc2626;
    background: rgba(220,38,38,0.1);
}

/* Detail: Alternativen-Tabelle in Schritt-Karten */
.wd-det-alts {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 8px;
}
.wd-det-alts th {
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: var(--of-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 3px 4px;
    border-bottom: 1px solid var(--of-border);
    white-space: nowrap;
}
.wd-det-alts td {
    padding: 4px 3px;
    color: var(--of-text-secondary);
    border-bottom: 1px solid var(--of-bg-hover);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.wd-det-alts tbody tr:last-child td {
    border-bottom: none;
}
.wd-det-alts__badge {
    font-weight: 700;
    font-size: 11px;
    white-space: nowrap;
}

/* OptionFinder Empfehlung — hervorgehoben */
.wd-det-alts__of {
    background: linear-gradient(90deg, rgba(20,184,166,0.08), rgba(20,184,166,0.03));
}
.wd-det-alts__of td {
    font-weight: 600;
    border-bottom: 2px solid var(--of-accent-teal);
}
.wd-det-alts__badge--of {
    color: #14b8a6;
    background: rgba(20,184,166,0.1);
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid rgba(20,184,166,0.3);
}

.wd-det-alts__row--of { background: linear-gradient(90deg, rgba(20,184,166,0.08), rgba(20,184,166,0.02)); }
.wd-det-alts__row--of td { border-bottom: 2px solid rgba(20,184,166,0.3); font-weight: 500; }
[data-theme="dark"] .wd-det-alts th { color: #64748b; border-bottom-color: #334155; }
[data-theme="dark"] .wd-det-alts td { color: #94a3b8; border-bottom-color: #1e293b; }
[data-theme="dark"] .wd-det-alts__row--of { background: linear-gradient(90deg, rgba(20,184,166,0.12), rgba(20,184,166,0.04)); }
[data-theme="dark"] .wd-det-alts__row--of td { border-bottom-color: rgba(20,184,166,0.4); }
[data-theme="dark"] .wd-det-alts__badge--of { background: rgba(20,184,166,0.15); border-color: rgba(20,184,166,0.3); }

/* Detail: Margin Schiebeschalter */
.wd-det-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
    cursor: pointer;
    user-select: none;
}
.wd-det-switch--disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.wd-det-switch__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--of-text-muted);
    transition: color 0.2s;
}
.wd-det-switch__input { display: none; }
.wd-det-switch__slider {
    position: relative;
    width: 36px;
    height: 20px;
    background: #cbd5e1;
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}
.wd-det-switch__slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.wd-det-switch__input:checked + .wd-det-switch__slider {
    background: var(--of-accent-teal);
}
.wd-det-switch__input:checked + .wd-det-switch__slider::after {
    transform: translateX(16px);
}
.wd-det-switch__input:checked ~ .wd-det-switch__label:last-child { color: var(--of-accent-teal); }
.wd-det-switch:not(:has(:checked)) .wd-det-switch__label:first-of-type { color: var(--of-text-primary); }
[data-theme="dark"] .wd-det-switch__slider { background: #334155; }
[data-theme="dark"] .wd-det-switch__slider::after { background: #94a3b8; }
[data-theme="dark"] .wd-det-switch__input:checked + .wd-det-switch__slider::after { background: #fff; }

/* Detail: Rollen Canvas-Button (positioniert an gestrichelter Linie) */
.wd-det-wheel-canvas-wrap { position: relative; }
.wd-det-roll-canvas-btn {
    position: absolute;
    top: 28px;
    right: 50px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
/* Safe (grün): Delta < 0.35 — kein Handlungsbedarf */
.wd-det-roll-canvas-btn--safe {
    background: rgba(5,150,105,0.1);
    border: 1px solid rgba(5,150,105,0.3);
    color: #059669;
}
.wd-det-roll-canvas-btn--safe:hover { background: rgba(5,150,105,0.2); }
/* Watch (orange): Delta 0.35-0.50 — beobachten */
.wd-det-roll-canvas-btn--watch {
    background: rgba(217,119,6,0.12);
    border: 1px solid rgba(217,119,6,0.4);
    color: #d97706;
}
.wd-det-roll-canvas-btn--watch:hover { background: rgba(217,119,6,0.22); }
/* Critical (rot): Delta > 0.50 — Rollen prüfen! */
.wd-det-roll-canvas-btn--critical {
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(220,38,38,0.4);
    color: #dc2626;
    animation: wd-roll-pulse 2s ease-in-out infinite;
}
.wd-det-roll-canvas-btn--critical:hover { background: rgba(220,38,38,0.2); }
@keyframes wd-roll-pulse {
    0%, 100% { box-shadow: 0 1px 4px rgba(220,38,38,0.1); }
    50% { box-shadow: 0 1px 8px rgba(220,38,38,0.3); }
}

/* Detail: Rollen-Panel */
.wd-det-roll-panel {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(20,184,166,0.04), rgba(245,158,11,0.02));
    border: 1px solid rgba(20,184,166,0.2);
    border-radius: 8px;
    font-size: 12px;
}
.wd-det-roll-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.wd-det-roll-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--of-accent-teal);
}
.wd-det-roll-panel__close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--of-border);
    border-radius: 4px;
    background: transparent;
    color: var(--of-text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.wd-det-roll-panel__close:hover { background: var(--of-bg-hover); color: var(--of-text-primary); }

/* Rolling-Regeln (2 Spalten) */
.wd-det-roll-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 11px;
}
.wd-det-roll-rules__col {
    padding: 8px 10px;
    border-radius: 6px;
}
.wd-det-roll-rules__col--yes { background: rgba(5,150,105,0.06); border: 1px solid rgba(5,150,105,0.15); }
.wd-det-roll-rules__col--no { background: rgba(220,38,38,0.04); border: 1px solid rgba(220,38,38,0.12); }
.wd-det-roll-rules ul { margin: 4px 0 0; padding-left: 16px; color: var(--of-text-secondary); }
.wd-det-roll-rules li { margin-bottom: 2px; }

[data-theme="dark"] .wd-det-roll-canvas-btn--safe { background: rgba(5,150,105,0.15); border-color: rgba(5,150,105,0.3); }
[data-theme="dark"] .wd-det-roll-canvas-btn--watch { background: rgba(217,119,6,0.15); border-color: rgba(217,119,6,0.35); }
[data-theme="dark"] .wd-det-roll-canvas-btn--critical { background: rgba(220,38,38,0.15); border-color: rgba(220,38,38,0.35); }
[data-theme="dark"] .wd-det-roll-panel { background: linear-gradient(135deg, rgba(20,184,166,0.06), rgba(245,158,11,0.02)); border-color: rgba(20,184,166,0.15); }
[data-theme="dark"] .wd-det-roll-panel__close { border-color: #334155; }
[data-theme="dark"] .wd-det-roll-rules__col--yes { background: rgba(5,150,105,0.08); border-color: rgba(5,150,105,0.2); }
[data-theme="dark"] .wd-det-roll-rules__col--no { background: rgba(220,38,38,0.06); border-color: rgba(220,38,38,0.15); }

/* Detail: Jahresprojektion Leiste */
.wd-det-proj {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0fdf4, #f0f9ff);
    border: 1px solid #d1fae5;
    border-radius: 8px;
}
.wd-det-proj__title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--of-text-muted);
    margin-bottom: 10px;
}
.wd-det-proj__metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.wd-det-proj__result {
    margin-left: auto;
    padding-left: 12px;
    text-align: right;
    flex-shrink: 0;
}
.wd-det-proj__yield {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}
.wd-det-proj__rating {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* Dark Mode: Step-Karten + Projektion */
[data-theme="dark"] .wd-det-step { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .wd-det-proj { background: linear-gradient(135deg, #0f2920, #0f1d2e); border-color: #134e3a; }
[data-theme="dark"] .wd-det-proj__title { color: #64748b; }
[data-theme="dark"] .wd-det-action { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .wd-det-action:hover { background: rgba(20, 184, 166, 0.15); }

/* Strategie-Gruppen im Detail */
.wd-det-strat-group {
    margin: 0.75rem 0 0.5rem;
}

.wd-det-strat-group__lbl {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--of-text-primary);
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--of-accent-teal);
}
.wd-det-trend-warn {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-semibold);
    color: #d97706;
    text-transform: none;
    letter-spacing: normal;
    margin-left: 0.5rem;
}

.wd-det-strat-cards {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.wd-det-trade__width {
    font-size: var(--of-font-size-sm);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-secondary);
}
.wd-det-trade__width-label {
    font-weight: var(--of-font-weight-regular);
    color: var(--of-text-muted);
}

/* Wasserzeichen */
.wd-det-watermark {
    text-align: center;
    font-size: var(--of-font-size-base);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-border-dark);
    letter-spacing: 0.12em;
    text-transform: lowercase;
    user-select: none;
    pointer-events: none;
    margin-bottom: 0.25rem;
}

/* Empfohlene Trades — Rahmen in Strategiefarbe */
/* Card Action Icons rechts unten */
.wd-det-card-actions {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: flex;
    gap: 2px;
}
.wd-det-card-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    outline: none;
    border-radius: 5px;
    color: var(--of-text-secondary);
    background: var(--of-bg-hover);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}
.wd-det-card-action:hover {
    color: var(--of-accent-violet);
    background: var(--of-bg-subtle);
}
.wd-det-card-action--os {
    color: #059669;
}
.wd-det-card-action--os:hover {
    color: #047857;
}

.wd-det-trade {
    border: 1px solid var(--of-border);
    border-radius: 10px;
    padding: 0.75rem;
    flex: 0 0 373px;
    width: 373px;
    position: relative;
}

.wd-det-trade__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.wd-det-legs { display: flex; gap: 4px; margin-bottom: 0.5rem; }

.wd-det-leg {
    flex: 1;
    background: var(--of-bg-primary);
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
    text-align: center;
    min-width: 0;
}

.wd-det-leg__lbl {
    font-size: var(--of-font-size-2xs);
    font-weight: var(--of-font-weight-bold);
    text-transform: uppercase;
    color: var(--of-text-muted);
    margin-bottom: 2px;
}

.wd-det-leg__strike {
    font-size: var(--of-font-size-md);
    font-weight: var(--of-font-weight-bold);
    color: var(--of-text-primary);
}

.wd-det-leg__info {
    font-size: var(--of-font-size-xs);
    color: var(--of-text-muted);
}

.wd-det-nums { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 0.5rem; }

.wd-det-nums > span {
    flex: 1; min-width: 70px; text-align: center;
    background: var(--of-bg-primary); border-radius: 5px; padding: 0.25rem 0.375rem;
}

.wd-det-nums small {
    display: block; font-size: var(--of-font-size-2xs);
    color: var(--of-text-muted); font-weight: var(--of-font-weight-semibold); text-transform: uppercase;
}

.wd-det-nums b {
    display: block; font-size: var(--of-font-size-base); color: var(--of-text-primary);
}

/* =========================================================================
   SPREAD BUILDER IFRAME OVERLAY
   ========================================================================= */
.wd-sb-iframe-overlay {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.wd-sb-iframe-wrap {
    position: relative;
    width: 95vw;
    height: 92vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.wd-sb-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #0f172a;
}
.wd-sb-iframe-close {
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.wd-sb-iframe-close:hover {
    background: rgba(220, 38, 38, 0.8);
}

/* Spread Builder Link */
.wd-det-sblink {
    margin-left: auto;
    font-size: var(--of-font-size-xs);
    font-weight: var(--of-font-weight-semibold);
    color: var(--of-accent-teal);
    text-decoration: none;
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--of-accent-teal);
    border-radius: 4px;
    transition: all 0.15s;
}
.wd-det-sblink:hover {
    background: var(--of-accent-teal);
    color: #fff;
}

/* Greeks row */
.wd-det-nums--greeks {
    border-top: 1px dashed var(--of-border);
    padding-top: 0.375rem;
}

/* Earnings-Warnung */
.wd-det-earnings {
    font-size: var(--of-font-size-xs);
    color: var(--of-text-muted);
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    background: var(--of-bg-primary);
}
.wd-det-earnings--danger {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
    font-weight: var(--of-font-weight-semibold);
}

/* P/L Diagramm */
.wd-det-pl {
    margin-top: 0.375rem;
    border-radius: 6px;
    overflow: hidden;
}
.wd-det-pl canvas {
    width: 100%;
    height: auto;
}

.wd-det-sb { margin-bottom: 0.375rem; }

.wd-sb { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }

.wd-sb__l {
    font-size: var(--of-font-size-xs); color: var(--of-text-muted);
    width: 55px; text-align: right; flex-shrink: 0;
}

.wd-sb__bar {
    flex: 1; height: 6px; background: var(--of-bg-subtle);
    border-radius: 3px; overflow: hidden;
}

.wd-sb__fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

.wd-sb__v {
    font-size: var(--of-font-size-xs); font-weight: var(--of-font-weight-semibold);
    color: var(--of-text-secondary); width: 45px;
}

/* =========================================================================
   RESPONSIVE — Charts auf kleineren Bildschirmen
   ========================================================================= */
@media (max-width: 1600px) {
    .wd-charts { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1100px) {
    .wd-charts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .wd-charts { grid-template-columns: repeat(2, 1fr); }
    .wd-main { flex-direction: column; }
    .wd-sidebar { width: 100%; }
}

/* =========================================================================
   DARK MODE — [data-theme="dark"]
   ========================================================================= */
[data-theme="dark"].ofma-dashboard {
    --of-bg-primary: #0f172a;
    --of-bg-card: #1e293b;
    --of-bg-hover: #334155;
    --of-bg-subtle: #334155;
    --of-text-primary: #94a3b8;
    --of-text-secondary: #94a3b8;
    --of-text-muted: #64748b;
    --of-border: #334155;
    --of-border-dark: #475569;
}

/* Header */
[data-theme="dark"] .wd-wrap .page-header__title { color: #94a3b8; }
[data-theme="dark"] .wd-wrap .page-header__subtitle { color: #94a3b8; }
[data-theme="dark"] #wd-date { color: #94a3b8; }

/* Charts */
[data-theme="dark"] .wd-chart-card {
    background: #1e293b; border-color: #334155;
}
[data-theme="dark"] .wd-chart-card__title { color: #94a3b8; border-bottom-color: #334155; }

/* Top 5 */
[data-theme="dark"] .wd-top5__rank { background: #334155; }
[data-theme="dark"] .wd-top5__ticker { color: #94a3b8; }

/* Sidebar */
[data-theme="dark"] .wd-sidebar {
    background: #1e293b; border-color: #334155;
}

[data-theme="dark"] .wd-sb-btn {
    background: #0f172a; border-color: #334155; color: #94a3b8;
}

[data-theme="dark"] .wd-sb-btn:hover {
    border-color: var(--of-accent-teal); color: #94a3b8;
}

[data-theme="dark"] .wd-sb-btn--active {
    background: var(--of-accent-teal); color: #fff; border-color: var(--of-accent-teal);
}

[data-theme="dark"] .wd-sb-select,
[data-theme="dark"] .wd-sb-input,
[data-theme="dark"] .wd-sb-width-custom {
    background: #0f172a; border-color: #334155; color: #94a3b8;
}

[data-theme="dark"] .wd-sb-slider {
    background: #334155;
}

[data-theme="dark"] .wd-sb-slider::-webkit-slider-thumb {
    border-color: #1e293b;
}

[data-theme="dark"] .wd-sb-slider::-moz-range-track {
    background: #334155;
}

[data-theme="dark"] .wd-sb-select:focus,
[data-theme="dark"] .wd-sb-input:focus,
[data-theme="dark"] .wd-sb-width-custom:focus {
    border-color: var(--of-accent-teal);
}

/* Table area */
[data-theme="dark"] .wd-table-area {
    background: #1e293b; border-color: #334155; box-shadow: none;
}

[data-theme="dark"] .wd-table th {
    background: #0f172a; color: #94a3b8; border-bottom-color: #334155;
}

[data-theme="dark"] .wd-th--sort:hover {
    color: var(--of-accent-teal); background: #1e293b;
}

[data-theme="dark"] .wd-table th { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .wd-table td { border-bottom-color: #334155; }
[data-theme="dark"] .wd-table tbody tr { background: #1e293b; }
[data-theme="dark"] .wd-table tbody tr:nth-child(even) { background: #0f172a; }
[data-theme="dark"] .wd-row:hover { background: rgba(20, 184, 166, 0.08) !important; }

/* Cells */
[data-theme="dark"] .wd-rank { background: #334155; color: #94a3b8; }
[data-theme="dark"] .wd-name-cell__ticker { color: var(--of-accent-teal); }
[data-theme="dark"] .wd-name-cell__company { color: #64748b; }
[data-theme="dark"] .wd-action-icon { color: #64748b; }
[data-theme="dark"] .wd-action-icon:hover { background: #334155; }

/* Badges nutzen Gradient — funktioniert in Light + Dark */

[data-theme="dark"] .wd-strikes { color: #94a3b8; }

/* Footer */
[data-theme="dark"] .wd-footer { background: #0f172a; border-top-color: #334155; }
[data-theme="dark"] .wd-footer__info { color: #64748b; }
[data-theme="dark"] .wd-footer__per-page { color: #64748b; }
[data-theme="dark"] .wd-footer__per-page select { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .wd-footer__btn { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .wd-footer__page-info { color: #64748b; }

/* Detail overlay */
[data-theme="dark"] .wd-detail-overlay { background: rgba(0, 0, 0, 0.6); }
[data-theme="dark"] .wd-detail { background: #0f172a; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .wd-detail__close { background: #1e293b; border-color: #334155; color: #64748b; }
[data-theme="dark"] .wd-detail__close:hover { background: #334155; color: #f8fafc; }
[data-theme="dark"] .wd-det-num { background: #1e293b; }
[data-theme="dark"] .wd-det-num b { color: #94a3b8; }
[data-theme="dark"] .wd-det-pbar__track { background: #334155; }
[data-theme="dark"] .wd-det-section { border-top-color: #334155; }

[data-theme="dark"] .wd-det-head { border-bottom-color: #334155; }
[data-theme="dark"] .wd-det-ticker { color: #94a3b8; }
[data-theme="dark"] .wd-det-price { color: #94a3b8; }
[data-theme="dark"] .wd-det-trade__width { color: #94a3b8; }
[data-theme="dark"] .wd-det-watermark { color: #334155; }
[data-theme="dark"] .wd-det-card-action { color: #94a3b8; background: #1e293b; }
[data-theme="dark"] .wd-det-card-action:hover { color: var(--of-accent-violet); background: #334155; }
[data-theme="dark"] .wd-det-trade { border-color: #334155; }
[data-theme="dark"] .wd-det-leg { background: #1e293b; }
[data-theme="dark"] .wd-det-leg__strike { color: #94a3b8; }
[data-theme="dark"] .wd-det-nums > span { background: #1e293b; }
[data-theme="dark"] .wd-det-nums b { color: #94a3b8; }
[data-theme="dark"] .wd-det-nums--greeks { border-top-color: #334155; }
[data-theme="dark"] .wd-det-earnings { background: #1e293b; }
[data-theme="dark"] .wd-det-earnings--danger { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .wd-sb__bar { background: #334155; }
[data-theme="dark"] .wd-sb__v { color: #94a3b8; }

/* Loading/empty */
[data-theme="dark"] .wd-loading { color: #94a3b8; }
[data-theme="dark"] .wd-loading .spinner { border-color: #334155; border-top-color: var(--of-accent-teal); }
[data-theme="dark"] .wd-empty { color: #64748b; }

/* ========================================
   Kontextmenü (Rechtsklick auf Profil-Zeilen)
   ======================================== */
.wd-order-row { cursor: context-menu; }
.wd-order-row:hover { background: rgba(20, 184, 166, 0.04); }

.wd-ctx-menu {
    position: fixed;
    z-index: 1000001;
    background: var(--of-bg-card, #ffffff);
    border: 1px solid var(--of-border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(-10px);
    transition: all 0.15s ease;
}
.wd-ctx-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}
.wd-ctx-menu__header {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--of-border, #e2e8f0);
}
.wd-ctx-menu__symbol {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--of-text-primary, #1e293b);
}
.wd-ctx-menu__details {
    display: block;
    font-size: 12px;
    color: var(--of-text-muted, #94a3b8);
    margin-top: 2px;
}
.wd-ctx-menu__divider {
    height: 1px;
    background: var(--of-border, #e2e8f0);
    margin: 0.25rem 0;
}
.wd-ctx-menu__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--of-text-primary, #1e293b);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.1s ease;
}
.wd-ctx-menu__item:hover {
    background: var(--of-bg-hover, #f1f5f9);
    color: var(--of-accent-teal, #0d9488);
}
.wd-ctx-menu__icon {
    font-size: 15px;
    width: 1.25rem;
    text-align: center;
    font-style: normal;
}

/* ========================================
   Order Modal
   ======================================== */
.wd-order-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
}
.wd-order-modal {
    background: var(--of-bg-card, #ffffff);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 380px;
    max-width: 95vw;
    overflow: hidden;
}
.wd-order-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--of-border, #e2e8f0);
}
.wd-order-modal__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--of-text-primary, #1e293b);
}
.wd-order-modal__close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: var(--of-text-muted, #94a3b8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wd-order-modal__close:hover { background: var(--of-bg-hover, #f1f5f9); }
.wd-order-modal__body { padding: 16px 18px; }
.wd-order-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--of-border, #e2e8f0);
}
.wd-order-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-bottom: 14px;
}
.wd-order-info__row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--of-text-muted, #94a3b8);
}
.wd-order-info__val {
    font-weight: 600;
    color: var(--of-text-primary, #1e293b);
}
.wd-order-metrics {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: var(--of-bg-hover, #f8fafc);
    border-radius: 8px;
    margin-bottom: 14px;
}
.wd-order-metrics__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    color: var(--of-text-muted, #94a3b8);
    gap: 2px;
}
.wd-order-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.wd-order-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wd-order-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--of-text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.wd-order-field input,
.wd-order-field select {
    padding: 7px 10px;
    border: 1px solid var(--of-border, #e2e8f0);
    border-radius: 6px;
    font-size: 13px;
    background: var(--of-bg-card, #fff);
    color: var(--of-text-primary, #1e293b);
}
.wd-order-field input:focus,
.wd-order-field select:focus {
    outline: none;
    border-color: var(--of-accent-teal, #14b8a6);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}
.wd-order-error {
    display: none;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 6px;
    font-size: 12px;
}
.wd-order-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.wd-order-btn--cancel {
    background: transparent;
    color: var(--of-text-muted, #94a3b8);
}
.wd-order-btn--cancel:hover { background: var(--of-bg-hover, #f1f5f9); }
.wd-order-btn--primary {
    background: var(--of-accent-teal, #14b8a6);
    color: #fff;
}
.wd-order-btn--primary:hover { background: #0d9488; }
.wd-order-btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dark Mode */
[data-theme="dark"] .wd-order-modal { background: #1e293b; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .wd-order-modal__header { border-bottom-color: #334155; }
[data-theme="dark"] .wd-order-modal__title { color: #94a3b8; }
[data-theme="dark"] .wd-order-modal__footer { border-top-color: #334155; }
[data-theme="dark"] .wd-order-info__val { color: #94a3b8; }
[data-theme="dark"] .wd-order-metrics { background: #0f172a; }
[data-theme="dark"] .wd-order-field input,
[data-theme="dark"] .wd-order-field select { background: #0f172a; border-color: #334155; color: #94a3b8; }

[data-theme="dark"] .wd-ctx-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .wd-ctx-menu__header { border-bottom-color: #334155; }
[data-theme="dark"] .wd-ctx-menu__symbol { color: #94a3b8; }
[data-theme="dark"] .wd-ctx-menu__divider { background: #334155; }
[data-theme="dark"] .wd-ctx-menu__item { color: #94a3b8; }
[data-theme="dark"] .wd-ctx-menu__item:hover { background: #334155; }
[data-theme="dark"] .wd-order-row:hover { background: rgba(20, 184, 166, 0.08); }

/* =====================================================
   DARK MODE: Ergänzungen Detail-Panel
   ===================================================== */

/* Wheel-Rad + SQS Area */
[data-theme="dark"] .wd-det-wheel-row { color: #94a3b8; }
[data-theme="dark"] .wd-det-sqs-total { color: #64748b; }

/* Quality Items */
[data-theme="dark"] .wd-det-quality { color: #94a3b8; }

/* Step-Karten: Titel + Sublabel */
[data-theme="dark"] .wd-det-step__title { color: #94a3b8; }
[data-theme="dark"] .wd-det-step__sublabel { color: #64748b; }

/* Jahresprojektion: Metriken + Ergebnis */
[data-theme="dark"] .wd-det-proj__metrics { color: #94a3b8; }
[data-theme="dark"] .wd-det-proj__result { color: #94a3b8; }
[data-theme="dark"] .wd-det-proj__yield { color: #94a3b8; }

/* Earnings-Warnungen */
[data-theme="dark"] .wd-det-warn-inline { background: rgba(245,158,11,0.15); }
[data-theme="dark"] .wd-det-warn-inline--danger { background: rgba(220,38,38,0.15); }
[data-theme="dark"] .wd-earnings-badge--near { color: #fbbf24; }

/* Order-Modal: fehlende Elemente */
[data-theme="dark"] .wd-order-modal__close { color: #64748b; }
[data-theme="dark"] .wd-order-modal__close:hover { background: #334155; color: #f8fafc; }
[data-theme="dark"] .wd-order-info__row { color: #64748b; }
[data-theme="dark"] .wd-order-metrics__item { color: #64748b; }
[data-theme="dark"] .wd-order-field label { color: #64748b; }
[data-theme="dark"] .wd-order-error { background: rgba(220,38,38,0.15); color: #f87171; }
[data-theme="dark"] .wd-order-btn--cancel { color: #64748b; }
[data-theme="dark"] .wd-order-btn--cancel:hover { background: #334155; color: #e2e8f0; }

/* Kontext-Menü: fehlende Elemente */
[data-theme="dark"] .wd-ctx-menu__details { color: #64748b; }
[data-theme="dark"] .wd-ctx-menu__icon { color: #94a3b8; }

/* Chart-Iframe Overlay */
[data-theme="dark"] .wd-chart-overlay { background: rgba(0, 0, 0, 0.7); }
[data-theme="dark"] .wd-chart-overlay__close { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-theme="dark"] .wd-chart-overlay__close:hover { background: #334155; color: #f8fafc; }

/* Key-Metriken */
[data-theme="dark"] .wd-det-keymetrics span { color: #94a3b8; }
