/**
 * OptionFinder - Scanner Styles: BASE
 *
 * Diese Datei enth&auml;lt die GRUNDSTRUKTUR des Scanners:
 * - Screener Wrapper (Layout wie Aktien-Scanner)
 * - Page Header (H1 Titel)
 * - Table Wrapper (weisser Container)
 * - Table Header (Titel, Suche, Stats)
 * - Search Field
 * - Column Section (&Uuml;berschrift Spaltenauswahl)
 * - Strategy Section (&Uuml;berschrift)
 * - Category Bar (Spalten-Dropdowns)
 * - Tabellen-Grundstruktur (thead, tbody, th, td)
 * - Sticky Header
 * - Resize Handle
 * - Drag &amp; Drop States
 * - Screener Footer (3-Spalten: Info | Pagination | Export)
 * - Loading Screen
 * - Toast Notifications
 * - Filter-Grundger&uuml;st (Dropdown-Basis, Range-Inputs)
 * - Filter Section &amp; Active Filter Tags
 * - No Data States
 * - Dark Mode (f&uuml;r alle Base-Elemente)
 * - Responsive Styles
 * 
 * NICHT hier: Spalten-spezifische Styles, Filter-Schnellauswahl
 * 
 * @package OptionFinder_Member_Area
 * @version 3.1.0
 * @since 3.1.0 - FIX: Doppelten th-Block entfernt (position:relative &uuml;berschrieb sticky)
 * @since 3.0.0 - Aufgeteilt aus dashboard-starter.css (5136 Zeilen)
 * 
 * Weitere CSS-Dateien:
 * @see dashboard-starter-underlying.css - Symbol, Sektor, Market Cap
 * @see dashboard-starter-strategies.css - Strategy Panel &amp; Badges
 * @see dashboard-starter-prices.css - DTE, Verfall, Spread Filter
 * @see dashboard-starter-scores.css - Score, POP, P(ITM), ROC Filter
 * @see dashboard-starter-volatility.css - IV Rank Heatmap
 * @see dashboard-starter-liquidity.css - Volume, Contango Filter
 */

/* =====================================================
   DASHBOARD MAIN - SCREENER VARIANTE
   ===================================================== */
.ofma-dashboard__main--screener {
    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, var(--ofma-color-slate-50));
}

/* =====================================================
   SCREENER WRAPPER (angelehnt an Aktien-Scanner)
   ===================================================== */
.screener-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--of-text-primary, var(--ofma-color-slate-900));
    min-height: 0;
    gap: 1.5rem;
}

/* =====================================================
   PAGE HEADER
   ===================================================== */
.page-header {
    margin-bottom: 0.5rem;
}

.page-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--of-text-primary, var(--ofma-color-slate-900));
    margin: 0 0 0.25rem 0;
}

/* =====================================================
   TABLE WRAPPER (weisser Container)
   ===================================================== */
.table-wrapper {
    background: var(--of-bg-card, #ffffff);
    border-radius: 16px;
    border: 1px solid var(--of-border, var(--ofma-color-slate-200));
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--of-border, var(--ofma-color-slate-200));
}

.table-header__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--of-text-primary, var(--ofma-color-slate-900));
    margin: 0;
}

.table-header__right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.table-header__stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.8125rem;
    color: var(--of-text-muted, var(--ofma-color-slate-500));
}

.table-header__stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.table-header__stat-value {
    font-weight: 600;
    color: var(--of-accent-teal, var(--ofma-color-primary));
}

/* =====================================================
   SEARCH FIELD
   ===================================================== */
.screener-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 32px;
    background: var(--of-bg-primary, var(--ofma-color-slate-50));
    border: 1px solid var(--of-border, var(--ofma-color-slate-200));
    border-radius: 8px;
    width: 180px;
    transition: border-color 0.15s ease;
}

.screener-search:focus-within {
    border-color: var(--of-accent-teal, var(--ofma-color-primary));
}

.screener-search__icon {
    color: var(--of-text-muted, var(--ofma-color-slate-400));
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.screener-search__input {
    border: none !important;
    background: none !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 0.875rem;
    color: var(--of-text-primary, var(--ofma-color-slate-900));
    width: 100%;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.screener-search__input::placeholder {
    color: var(--of-text-muted, #94a3b8);
    opacity: 1;
}

.screener-search__input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* =====================================================
   SCREENER FOOTER (3-Spalten)
   ===================================================== */
.screener-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1.5rem;
    background: var(--of-bg-hover, var(--ofma-color-slate-50));
    border-top: 1px solid var(--of-border, var(--ofma-color-slate-200));
    flex-shrink: 0;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-info {
    font-size: 0.8125rem;
    color: var(--of-text-muted, var(--ofma-color-slate-500));
}

.footer-info strong {
    color: var(--of-accent-teal, var(--ofma-color-primary));
}

.footer-separator {
    margin: 0 0.5rem;
    color: var(--of-border-dark, var(--ofma-color-slate-300));
}

.footer-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--of-bg-card, #ffffff);
    border: 1px solid var(--of-border, var(--ofma-color-slate-200));
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--of-text-secondary, var(--ofma-color-slate-600));
    cursor: pointer;
    transition: all 0.15s;
}

.export-btn:hover {
    border-color: var(--of-accent-violet, #8b5cf6);
    color: var(--of-accent-violet, #8b5cf6);
}

/* =====================================================
   COLUMN SECTION (&Uuml;berschrift f&uuml;r Spaltenauswahl)
   ===================================================== */
.ofma-column-section {
    padding: 0.5rem 1.5rem 0.25rem 1.5rem;
    background: transparent;
    border-bottom: 1px solid var(--of-border, var(--ofma-color-slate-100));
}

.ofma-column-section__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ofma-color-slate-500);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   STRATEGY SECTION (Strategie Filter ein/ausblenden)
   ===================================================== */
.ofma-strategy-section {
    padding: 0.5rem 1.5rem;
    background: transparent;
    border-bottom: none;
}

.ofma-strategy-section__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0;
    user-select: none;
}

.ofma-strategy-section__header:hover {
    opacity: 0.8;
}

.ofma-strategy-section__title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ofma-color-slate-500);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ofma-strategy-section__toggle {
    font-size: 0.625rem;
    color: var(--ofma-color-slate-400);
    transition: transform 0.2s ease;
}

.ofma-strategy-section.open .ofma-strategy-section__toggle {
    transform: rotate(180deg);
}

.ofma-strategy-section__content {
    display: none;
    padding-top: 0.75rem;
}

.ofma-strategy-section.open .ofma-strategy-section__content {
    display: block;
}

/* =====================================================
   CATEGORY BAR (Spalten-Dropdowns)
   ===================================================== */
.ofma-category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #f8fafc;
    border: 1px solid var(--of-border, var(--ofma-color-slate-200));
    border-radius: 12px;
    flex-shrink: 0;
    align-items: center;
}

.ofma-cat-dropdown {
    position: relative;
}

.ofma-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--ofma-color-slate-200);
    border-radius: var(--ofma-radius-md);
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-600);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ofma-cat-btn:hover {
    border-color: var(--ofma-color-slate-300);
    background: var(--ofma-color-slate-50);
}

.ofma-cat-btn.active {
    border-color: var(--ofma-color-primary);
    background: #ecfdf5;
    color: #0f766e;
}

.ofma-cat-btn.has-selected {
    border-color: var(--ofma-color-primary);
}

.ofma-cat-btn__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ofma-cat-btn__name {
    font-weight: 500;
}

.ofma-cat-btn__count {
    font-size: 0.75rem;
    color: var(--ofma-color-slate-400);
}

.ofma-cat-btn.has-selected .ofma-cat-btn__count {
    color: var(--ofma-color-primary);
    font-weight: 600;
}

.ofma-cat-btn__arrow {
    margin-left: 0.125rem;
    transition: transform 0.2s;
}

.ofma-cat-btn.active .ofma-cat-btn__arrow {
    transform: rotate(180deg);
}

/* Category Menu Dropdown */
.ofma-cat-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    background: white;
    border: 1px solid var(--ofma-color-slate-200);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    padding: 0.5rem 0;
    animation: menuFadeIn 0.15s ease;
}

.ofma-cat-menu.visible {
    display: block;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ofma-cat-menu__item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background 0.1s;
}

.ofma-cat-menu__item:hover {
    background: var(--ofma-color-slate-50);
}

.ofma-cat-menu__checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--ofma-color-slate-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.ofma-cat-menu__item.selected .ofma-cat-menu__checkbox {
    background: var(--ofma-color-primary);
    border-color: var(--ofma-color-primary);
}

.ofma-cat-menu__check {
    display: none;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
}

.ofma-cat-menu__item.selected .ofma-cat-menu__check {
    display: block;
}

/* Fragezeichen Icon mit Tooltip */
.ofma-cat-menu__help {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--ofma-color-slate-100);
    border-radius: 50%;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--ofma-color-slate-400);
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.ofma-cat-menu__help:hover {
    background: var(--ofma-color-primary);
    color: white;
}

.ofma-cat-menu__tooltip {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    padding: 0.75rem;
    background: var(--ofma-color-slate-900);
    border-radius: var(--ofma-radius-md);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 100;
}

.ofma-cat-menu__help:hover .ofma-cat-menu__tooltip {
    display: block;
}

.ofma-cat-menu__tooltip::before {
    content: "";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--ofma-color-slate-900);
}

.ofma-cat-menu__tooltip-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.ofma-cat-menu__tooltip-desc {
    font-size: 0.6875rem;
    color: var(--ofma-color-slate-400);
    line-height: 1.4;
}

.ofma-cat-menu__label {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-700);
}

.ofma-cat-menu__item.selected .ofma-cat-menu__label {
    font-weight: 500;
    color: #0f766e;
}

.ofma-cat-menu__footer {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 1rem 0.25rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--ofma-color-slate-100);
}

.ofma-cat-menu__action {
    font-size: 0.6875rem;
    color: var(--ofma-color-primary);
    cursor: pointer;
    font-weight: 500;
}

.ofma-cat-menu__action:hover {
    text-decoration: underline;
}

/* Quick Actions (Standard, Anwenden) */
.ofma-category-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.ofma-quick-btn {
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid var(--ofma-color-slate-200);
    border-radius: var(--ofma-radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ofma-color-slate-500);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ofma-quick-btn:hover {
    border-color: var(--ofma-color-primary);
    color: var(--ofma-color-primary);
}

.ofma-quick-btn.primary {
    background: linear-gradient(135deg, var(--ofma-color-primary) 0%, var(--ofma-color-primary-dark) 100%);
    border-color: var(--ofma-color-primary);
    color: white;
}

.ofma-quick-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

/* =====================================================
   TABLE - GRUNDSTRUKTUR
   ===================================================== */
.ofma-scanner__body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ofma-table-scroll {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    min-height: 0;
    position: relative;
    /* Wichtig f&uuml;r Sticky Header: Container muss scrollbar sein */
    max-height: 100%;
}

#ofma-table-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* AJAX Loading Overlay (nur auf Tabelle, nicht gesamter Scanner) */
.ofma-ajax-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.6);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.ofma-ajax-overlay.active {
    display: flex;
}

.ofma-ajax-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--ofma-color-slate-300, #cbd5e1);
    border-top-color: var(--ofma-color-primary, #14b8a6);
    border-radius: 50%;
    animation: ofma-spin 0.6s linear infinite;
}

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

.ofma-ajax-text {
    font-size: 0.75rem;
    color: var(--ofma-color-slate-500, #64748b);
    font-weight: 500;
}

[data-theme="dark"] .ofma-ajax-overlay {
    background: rgba(15, 23, 42, 0.6);
}

[data-theme="dark"] .ofma-ajax-spinner {
    border-color: var(--ofma-color-slate-600, #475569);
    border-top-color: var(--ofma-color-primary, #14b8a6);
}

[data-theme="dark"] .ofma-ajax-text {
    color: var(--ofma-color-slate-400, #94a3b8);
}

.ofma-scanner__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--of-font-size-table, 13px);
    font-family: var(--of-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Sticky Header */
.ofma-scanner__table thead {
    position: sticky;
    top: 0;
    z-index: 100;
}

.ofma-scanner__table th {
    position: sticky;
    top: 0;
    background: #eef2f6;
    background-color: #eef2f6;
    padding: 0.5rem !important;
    height: 40px;
    text-align: left;
    font-weight: var(--of-font-weight-semibold, 600);
    font-size: var(--of-font-size-header, 11px) !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--of-text-muted, var(--ofma-color-slate-500));
    border-bottom: 1px solid var(--of-border, var(--ofma-color-slate-200));
    border-right: 1px solid var(--of-border-dark, var(--ofma-color-slate-300));
    white-space: nowrap;
    z-index: 100;
    cursor: grab;
    vertical-align: middle;
    box-shadow: none;
}

.ofma-scanner__table th:last-child {
    border-right: none;
}

.ofma-scanner__table th:active {
    cursor: grabbing;
}

/* Header-Inhalt vertikal anordnen */
.ofma-scanner__table th .th-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ofma-scanner__table th a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ofma-scanner__table th a:hover {
    color: var(--ofma-color-primary);
}

.ofma-scanner__table th.sorted {
    color: var(--ofma-color-primary);
}

/* Spaltentrennlinien (jetzt via border-right auf th) */

.ofma-scanner__table td {
    padding: 0.5rem !important;
    height: 40px;
    border-bottom: 1px solid var(--of-border, var(--ofma-color-slate-100));
    vertical-align: middle;
    font-size: var(--of-font-size-table, 13px) !important;
}

.ofma-scanner__table td:last-child {
    border-right: none;
}

.ofma-scanner__table tbody tr {
    background: var(--of-bg-card, #ffffff);
    transition: background 0.15s;
}

.ofma-scanner__table tbody tr:nth-child(even) {
    background: var(--of-bg-primary, #f8fafc);
}

.ofma-scanner__table tbody tr:hover {
    background: rgba(13, 148, 136, 0.06);
}

/* Resize Handle - th braucht position f&uuml;r absolute Kinder (::after und .resize-handle) */
/* position: sticky funktioniert auch als containing block */

.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 15;
}

.resize-handle:hover,
.resize-handle.active {
    background: var(--ofma-color-primary);
}

.ofma-scanner__table th.resizing {
    user-select: none;
}

.ofma-scanner__table.resizing {
    cursor: col-resize;
    user-select: none;
}

.ofma-scanner__table.resizing th,
.ofma-scanner__table.resizing td {
    cursor: col-resize;
}

.sort-icon {
    font-size: 0.75rem;
    opacity: 0.5;
}

.ofma-scanner__table th.sorted .sort-icon {
    opacity: 1;
}

/* Tooltip Indikator (gestrichelte Unterlinie) */
.ofma-scanner__table th a,
.ofma-scanner__table th > span:first-child {
    position: relative;
}

.ofma-tooltip-indicator {
    display: inline;
    border-bottom: 1px dashed var(--ofma-color-slate-400);
    cursor: help;
}

/* Drag Handle */
.drag-handle {
    display: block;
    opacity: 0;
    color: var(--ofma-color-slate-400);
    font-size: 0.625rem;
    letter-spacing: 1px;
    line-height: 1;
    margin-top: 2px;
    transition: opacity 0.2s;
}

.ofma-scanner__table th:hover .drag-handle {
    opacity: 0.6;
}

/* Drag & Drop States */
.ofma-scanner__table th.dragging {
    opacity: 0.5;
    background: var(--ofma-color-primary-light);
}

.ofma-scanner__table th.drag-over {
    background: #d1fae5;
    border-left: 2px solid var(--ofma-color-primary);
}

/* =====================================================
   INLINE FILTER SYSTEM - GRUNDGER&Uuml;ST
   ===================================================== */

/* Header Content Layout */
.th-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.th-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.th-sort-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.th-sort-link:hover {
    color: var(--ofma-color-primary);
}

/* Filter Button im Header */
.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 3px;
    color: var(--ofma-color-slate-400);
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.filter-btn:hover {
    background: var(--ofma-color-slate-200);
    color: var(--ofma-color-slate-600);
}

.filter-btn.active {
    background: var(--ofma-color-primary);
    color: white;
}

.filter-btn.active:hover {
    background: var(--ofma-color-primary-dark);
}

.filter-icon {
    width: 12px;
    height: 12px;
}

/* Filtered Column State */
.ofma-scanner__table th.filtered {
    background: rgba(20, 184, 166, 0.08);
}

.ofma-scanner__table th.filtered .column-label {
    color: var(--ofma-color-primary);
}

/* Filter Dropdown */
.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    width: 280px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid var(--ofma-color-slate-200);
    z-index: 100;
    margin-top: 4px;
}

.filter-dropdown.visible {
    display: block;
}

.filter-dropdown__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--ofma-color-slate-100);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ofma-color-slate-600);
}

.filter-dropdown__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ofma-color-slate-400);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
}

.filter-dropdown__close:hover {
    background: var(--ofma-color-slate-100);
    color: var(--ofma-color-slate-600);
}

.filter-dropdown__body {
    padding: 0.75rem;
    overflow: hidden;
}

/* Filter Range Inputs */
.filter-range {
    display: flex;
    gap: 0.5rem;
}

.filter-range__input {
    flex: 1;
}

.filter-range__input label {
    display: block;
    font-size: 0.6875rem;
    color: var(--ofma-color-slate-500);
    margin-bottom: 0.25rem;
}

.filter-range__input input {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--ofma-color-slate-300);
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-700);
}

.filter-range__input input:focus {
    outline: none;
    border-color: var(--ofma-color-primary);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

/* Filter Select */
.filter-select {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--ofma-color-slate-300);
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-700);
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--ofma-color-primary);
}

/* Filter Text Input */
.filter-text {
    width: 100%;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--ofma-color-slate-300);
    border-radius: 4px;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-700);
}

.filter-text:focus {
    outline: none;
    border-color: var(--ofma-color-primary);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

/* Filter Dropdown Footer */
.filter-dropdown__footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    border-top: 1px solid var(--ofma-color-slate-100);
    background: var(--ofma-color-slate-50);
    border-radius: 0 0 8px 8px;
}

.filter-btn-clear,
.filter-btn-select-all,
.filter-btn-apply {
    flex: 1;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn-clear,
.filter-btn-select-all {
    background: white;
    border: 1px solid var(--ofma-color-slate-300);
    color: var(--ofma-color-slate-600);
}

.filter-btn-clear:hover,
.filter-btn-select-all:hover {
    background: var(--ofma-color-slate-100);
}

.filter-btn-apply {
    background: var(--ofma-color-primary);
    border: 1px solid var(--ofma-color-primary);
    color: white;
}

.filter-btn-apply:hover {
    background: var(--ofma-color-primary-dark);
}

/* =====================================================
   FILTER SECTION &amp; ACTIVE FILTER TAGS
   ===================================================== */
.ofma-filter-section {
    padding: 0.75rem 1rem;
    background: var(--ofma-color-slate-50);
    border-bottom: 1px solid var(--ofma-color-slate-200);
}

.ofma-filter-section__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ofma-color-slate-700);
    margin: 0 0 0.25rem 0;
}

.ofma-filter-section__hint {
    font-size: 0.75rem;
    color: var(--ofma-color-slate-500);
    margin: 0;
}

.ofma-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0 1rem 0;
}

.ofma-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 6px;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-700);
}

.ofma-filter-tag__name {
    font-weight: 600;
    color: #0d9488;
}

.ofma-filter-tag__value {
    color: var(--ofma-color-slate-600);
}

.ofma-filter-tag__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin-left: 0.25rem;
    border: none;
    background: rgba(20, 184, 166, 0.2);
    color: #0d9488;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s;
}

.ofma-filter-tag__remove:hover {
    background: #ef4444;
    color: white;
}

/* Alle Filter loeschen - identisch mit .table-header__reset-btn (Aktien-Scanner) */
.ofma-active-filters__clear {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 2px 10px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.ofma-active-filters__clear:hover {
    background: #dc2626;
    color: #fff;
    text-decoration: none;
}

/* =====================================================
   TABLE CELL FORMATS - BASIS
   ===================================================== */

/* Null Value */
.null-value {
    color: var(--ofma-color-slate-300);
}

/* Boolean */
.bool-yes {
    color: var(--ofma-color-success);
}

.bool-no {
    color: var(--ofma-color-slate-300);
}

/* High Values */
.high-value {
    font-weight: 600;
    color: var(--ofma-color-success);
}

/* Option Type Badges */
.badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
}

.badge--put {
    background: #dc2626;
    color: #fff;
}

.badge--call {
    background: #059669;
    color: #fff;
}

/* DTE */
.dte {
    font-weight: 400;
}

.dte strong {
    font-weight: 600;
}

/* Score mit Dot */
.score {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
}

.score-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.score-dot--high {
    background: var(--ofma-color-success);
}

.score-dot--medium {
    background: var(--ofma-color-warning);
}

.score-dot--low {
    background: var(--ofma-color-danger);
}

/* IV Rank Basic */
.ivrank--high {
    color: var(--ofma-color-success);
    font-weight: 600;
}

.ivrank--medium {
    color: var(--ofma-color-warning);
}

.ivrank--low {
    color: var(--ofma-color-slate-500);
}

/* =====================================================
   PAGINATION
   ===================================================== */

.ofma-pagination {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.ofma-pagination__per-page {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--ofma-color-slate-500);
}

.ofma-pagination__per-page select {
    padding: 3px 20px 3px 6px !important;
    border: 1px solid var(--ofma-color-slate-200) !important;
    border-radius: 4px !important;
    background-color: white !important;
    color: #1e293b !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;
}

.ofma-pagination__nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ofma-pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--ofma-color-slate-200);
    border-radius: var(--ofma-radius-sm);
    background: white;
    color: var(--ofma-color-slate-600);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
}

.ofma-pagination__btn:hover:not(.disabled):not(:disabled) {
    border-color: var(--ofma-color-primary);
    color: var(--ofma-color-primary);
}

.ofma-pagination__btn.disabled,
.ofma-pagination__btn:disabled {
    color: var(--ofma-color-slate-300);
    cursor: not-allowed;
}

.ofma-pagination__current {
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--ofma-color-slate-500);
}

.ofma-pagination__current strong {
    color: var(--ofma-color-slate-900);
}

/* No Data */
.ofma-scanner__no-data {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--ofma-color-slate-400);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ofma-scanner__no-data-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.ofma-scanner__no-data-hint {
    font-size: 0.875rem;
    color: var(--ofma-color-slate-500);
    margin-top: 0.5rem;
}

.ofma-no-data-cell {
    padding: 3rem 2rem !important;
    border: none !important;
    background: transparent !important;
}

.ofma-no-data-row {
    background: transparent !important;
}

.ofma-no-data-row:hover {
    background: transparent !important;
}

/* =====================================================
   LOADING SCREEN MIT CHECKLISTE
   ===================================================== */
.ofma-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--ofma-color-slate-900) 0%, var(--ofma-color-slate-800) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.ofma-loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.ofma-loading__content {
    text-align: center;
    color: white;
}

/* Spinner */
.ofma-loading__spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--ofma-color-primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: ofma-spin 1s linear infinite;
}

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

/* Titel */
.ofma-loading__title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: white;
    letter-spacing: -0.02em;
}

/* Untertitel */
.ofma-loading__subtitle {
    font-size: 1rem;
    color: var(--ofma-color-slate-400);
    margin: 0 0 2rem 0;
}

/* Checkliste Container */
.ofma-loading__checklist {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

/* Einzelner Schritt */
.ofma-loading__step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.25rem;
    color: var(--ofma-color-slate-500);
    transition: all 0.3s ease;
    border-radius: 6px;
}

.ofma-loading__step.active {
    color: var(--ofma-color-slate-200);
}

.ofma-loading__step.done {
    color: var(--ofma-color-slate-300);
}

/* Step Icon - Kreis */
.ofma-loading__step-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border-radius: 50%;
    background: var(--ofma-color-slate-700);
    color: var(--ofma-color-slate-500);
    transition: all 0.3s ease;
}

/* Aktiver Schritt - Gelber Hintergrund */
.ofma-loading__step.active .ofma-loading__step-icon {
    background: #f59e0b;
    color: white;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

/* Fertiger Schritt - Gr&uuml;ner Haken */
.ofma-loading__step.done .ofma-loading__step-icon {
    background: #10b981;
    color: white;
}

/* Step Text */
.ofma-loading__step-text {
    font-size: 0.9375rem;
}

.ofma-loading__step.active .ofma-loading__step-text {
    font-weight: 500;
}

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
.ofma-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--ofma-color-slate-900);
    color: white;
    border-radius: var(--ofma-radius-md);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
}

.ofma-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ofma-toast__icon {
    color: var(--ofma-color-primary);
}

/* =====================================================
   EXPORT BUTTONS
   ===================================================== */
.ofma-export-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ofma-export-hint {
    font-size: 0.75rem;
    color: var(--ofma-color-slate-400);
}

/* =====================================================
   DARK MODE - BASE
   ===================================================== */
/* Screener Wrapper */
[data-theme="dark"] .table-wrapper {
    background: var(--ofma-color-slate-800);
    border-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .table-header {
    border-bottom-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .table-header__title {
    color: var(--ofma-color-slate-200);
}

[data-theme="dark"] .table-header__stats {
    color: var(--ofma-color-slate-400);
}

[data-theme="dark"] .page-header__title {
    color: var(--ofma-color-slate-200);
}

[data-theme="dark"] .screener-search {
    background: var(--ofma-color-slate-700);
    border-color: var(--ofma-color-slate-600);
}

[data-theme="dark"] .screener-search__input {
    color: var(--ofma-color-slate-200);
}

[data-theme="dark"] .screener-search__input::placeholder {
    color: var(--ofma-color-slate-500);
}

[data-theme="dark"] .screener-footer {
    background: var(--ofma-color-slate-900);
    border-top-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .footer-info {
    color: var(--ofma-color-slate-400);
}

[data-theme="dark"] .export-btn {
    background: var(--ofma-color-slate-700);
    border-color: var(--ofma-color-slate-600);
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-column-section {
    background: transparent;
    border-bottom-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-column-section__title {
    color: var(--ofma-color-slate-400);
}

[data-theme="dark"] .ofma-strategy-section {
    background: transparent;
    border-bottom-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-strategy-section__title {
    color: var(--ofma-color-slate-400);
}

[data-theme="dark"] .ofma-strategy-section__toggle {
    color: var(--ofma-color-slate-500);
}

[data-theme="dark"] .ofma-category-bar {
    background: var(--ofma-color-slate-900);
    border-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-cat-btn {
    background: var(--ofma-color-slate-700);
    border-color: var(--ofma-color-slate-600);
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-cat-btn:hover {
    background: var(--ofma-color-slate-600);
}

[data-theme="dark"] .ofma-cat-menu {
    background: var(--ofma-color-slate-800);
    border-color: var(--ofma-color-slate-600);
}

[data-theme="dark"] .ofma-cat-menu__item:hover {
    background: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-cat-menu__label {
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-quick-btn {
    background: var(--ofma-color-slate-700);
    border-color: var(--ofma-color-slate-600);
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-scanner__table th {
    background: #0f172a;
    background-color: #0f172a;
    color: var(--ofma-color-slate-400);
    border-bottom-color: var(--ofma-color-slate-700);
    border-right-color: var(--ofma-color-slate-600);
}

[data-theme="dark"] .ofma-scanner__table th:hover {
    background: var(--ofma-color-slate-800);
}

[data-theme="dark"] .ofma-scanner__table td {
    color: #94a3b8;
    border-bottom-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-scanner__table tbody tr {
    background: var(--ofma-color-slate-800);
}

[data-theme="dark"] .ofma-scanner__table tbody tr:nth-child(even) {
    background: var(--ofma-color-slate-900);
}

[data-theme="dark"] .ofma-scanner__table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* (ofma-scanner__footer removed - now using screener-footer) */

[data-theme="dark"] .ofma-pagination__btn {
    background: var(--ofma-color-slate-700);
    border-color: var(--ofma-color-slate-600);
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-pagination__btn:hover:not(.disabled):not(:disabled) {
    border-color: var(--ofma-color-primary);
    color: var(--ofma-color-primary);
}

[data-theme="dark"] .ofma-pagination__btn.disabled,
[data-theme="dark"] .ofma-pagination__btn:disabled {
    background: var(--ofma-color-slate-800);
    color: var(--ofma-color-slate-600);
}

[data-theme="dark"] .ofma-tooltip-indicator {
    border-bottom-color: var(--ofma-color-slate-500);
}

[data-theme="dark"] .ofma-filter-tag {
    background: rgba(20, 184, 166, 0.15);
    border-color: rgba(20, 184, 166, 0.3);
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-filter-tag__name {
    color: #2dd4bf;
}

[data-theme="dark"] .ofma-filter-tag__value {
    color: var(--ofma-color-slate-400);
}

[data-theme="dark"] .ofma-active-filters__clear {
    color: #f87171;
}

[data-theme="dark"] .ofma-active-filters__clear:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

[data-theme="dark"] .ofma-filter-section {
    background: var(--ofma-color-slate-800);
    border-bottom-color: var(--ofma-color-slate-700);
}

[data-theme="dark"] .ofma-filter-section__title {
    color: var(--ofma-color-slate-300);
}

[data-theme="dark"] .ofma-filter-section__hint {
    color: var(--ofma-color-slate-500);
}

/* =====================================================
   RESPONSIVE - SCANNER
   ===================================================== */
@media (max-width: 1200px) {
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .table-header__right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .screener-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-center {
        justify-content: center;
    }

    .footer-right {
        justify-content: flex-end;
    }

    .ofma-pagination {
        justify-content: center;
    }

    .ofma-category-bar {
        padding: 0.5rem 1rem;
    }

    .ofma-category-bar__actions {
        width: 100%;
        margin-top: 0.5rem;
        justify-content: flex-end;
    }
}