/* ============================================
   TARAMA PAGES - Modular CSS
   index.html, hisse-tarama.html, kayitli-taramalar.html
   ============================================ */

/* === Tarama-specific Tokens (Dark defaults) === */
:root,
[data-theme="dark"] {
    --tarama-pro-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --tarama-pro-text: #000000;
    --tarama-warning-border: rgba(255, 171, 0, 0.25);
    --tarama-qr-bg: #FFFFFF;
    --tarama-qr-cell: #000000;
    --tarama-qr-cell-empty: #FFFFFF;
}

:root[data-theme="light"] {
    --tarama-pro-gradient: linear-gradient(135deg, #f59e0b, #d97706);
    --tarama-pro-text: #000000;
    --tarama-warning-border: rgba(255, 171, 0, 0.3);
    --tarama-qr-bg: #FFFFFF;
    --tarama-qr-cell: #000000;
    --tarama-qr-cell-empty: #FFFFFF;
}


/* =============================================
   SHARED COMPONENTS (breadcrumb, page header, toast)
   ============================================= */

/* === Breadcrumb === */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-lg);
}
.breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--color-accent-primary); }
.breadcrumb .separator { color: var(--color-text-muted); opacity: 0.5; }
.breadcrumb .current { color: var(--color-text-primary); font-weight: var(--font-weight-medium); }

/* === Page Header === */
.page-title-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}
.page-title-row h1 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}
.page-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-xl);
}


/* =============================================
   TARAMA MENU (index.html)
   ============================================= */

/* === Flutter AppBar-style Page Header === */
.tarama-page-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border-secondary);
}
.tarama-page-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

/* === Flutter ListTile Container === */
.tarama-list {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--card-elevation);
    overflow: hidden;
}

/* === Flutter ListTile Item === */
.tarama-list-tile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 14px var(--spacing-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-decoration: none;
    color: inherit;
    position: relative;
}
.tarama-list-tile:hover {
    background: var(--color-bg-card-hover);
}
.tarama-list-tile:active {
    background: var(--color-accent-glow);
}

/* === Themed Image (36x36, 8px border-radius) === */
.tarama-tile-img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

/* === ListTile Text Content === */
.tarama-tile-content {
    flex: 1;
    min-width: 0;
}
.tarama-tile-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tarama-tile-subtitle {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === Trailing Arrow Icon (Flutter: Icons.chevron_right) === */
.tarama-tile-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
}

/* === "Yakinda" badge for coming-soon features === */
.tarama-tile-badge-yakinda {
    flex-shrink: 0;
    padding: 2px 10px;
    background: var(--color-warning-bg);
    border: 1px solid var(--tarama-warning-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-warning);
    white-space: nowrap;
}

/* === Flutter Divider: 0.5px thickness, textSecondary color, 70px indent === */
.tarama-divider {
    margin: 0;
    margin-inline-start: 70px;
    border: none;
    border-top: 0.5px solid var(--color-text-secondary);
    opacity: 0.3;
}

/* === Flutter SnackBar (Menu) === */
.tarama-snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 14px 24px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-accent);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 400px;
}
.tarama-snackbar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.tarama-snackbar-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--color-text-warning);
}


/* =============================================
   HISSE TARAMA (hisse-tarama.html)
   ============================================= */

/* === PRO Badge === */
.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--tarama-pro-gradient);
    color: var(--tarama-pro-text);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-full);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.pro-badge svg { width: 12px; height: 12px; }

/* === Public/Private Toggle Row === */
.visibility-toggle-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}
.visibility-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}
.visibility-toggle {
    display: flex;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.visibility-btn {
    padding: 6px 16px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-family: var(--font-family);
}
.visibility-btn.active {
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
}
.visibility-btn:hover:not(.active) { color: var(--color-text-primary); }

/* === Wizard Section Cards === */
.wiz-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-elevation);
}
.wiz-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}
.wiz-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

/* === Dropdown with Flag === */
.wiz-field { margin-bottom: var(--spacing-md); }
.wiz-field:last-child { margin-bottom: 0; }
.wiz-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-sm);
}
.wiz-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.wiz-flag {
    position: absolute;
    left: 12px;
    font-size: 18px;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}
.wiz-select {
    width: 100%;
    padding: 12px 14px;
    padding-inline-start: 40px;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    cursor: pointer;
    background: var(--color-bg-section-input);
    transition: box-shadow var(--transition-fast);
}
.wiz-select:focus { box-shadow: 0 0 0 2px var(--color-accent-glow); }
.wiz-select.no-flag { padding-inline-start: 14px; }
.wiz-field-row {
    display: flex;
    gap: 12px;
}
.wiz-field-half { flex: 1; min-width: 0; }

/* === Piyasa Secim Pill'leri (Flutter ChoiceChip) === */
.market-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}
.market-pill {
    padding: 8px 18px;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    white-space: nowrap;
}
.market-pill:hover {
    border-color: var(--color-border-accent);
    color: var(--color-text-primary);
}
.market-pill.active {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-sm);
}

/* === Donem Secim Butonlari (Flutter ToggleButtons) === */
.period-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.period-btn {
    padding: 8px 16px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.period-btn:hover {
    border-color: var(--color-border-accent);
    color: var(--color-text-primary);
}
.period-btn.active {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-inverse);
}

/* === Mantik Operatoru Secici (AND/OR/NOT) - Flutter SegmentedButton === */
.logic-operator-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.logic-operator-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.logic-operator-group {
    display: flex;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.logic-op-btn {
    padding: 8px 18px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
    background: var(--color-bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    border-inline-end: 1px solid var(--color-border-primary);
    font-family: var(--font-family);
}
.logic-op-btn:last-child { border-inline-end: none; }
.logic-op-btn.active {
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
}
.logic-op-btn.active-not {
    background: var(--color-error);
    color: var(--color-text-inverse);
}
.logic-op-btn:hover:not(.active):not(.active-not) {
    color: var(--color-text-primary);
    background: var(--color-bg-card-hover);
}

/* === NOT Warning === */
.not-warning {
    padding: 4px 0 12px;
    font-size: var(--font-size-xs);
    font-style: italic;
    color: var(--color-error);
    display: none;
}
.not-warning.visible { display: block; }

/* === Indicator Parameter Widget (Flutter Card with params) === */
.indicator-section {
    background: var(--color-bg-section-indicator);
    border: 1px solid var(--color-accent-glow-strong);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
.indicator-section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}
.indicator-circle {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    flex-shrink: 0;
}

/* Indicator Dropdown Button */
.indicator-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    cursor: pointer;
    text-align: start;
    transition: all var(--transition-fast);
    background: var(--color-bg-section-input);
    border: 1px solid var(--color-border-light);
    margin-bottom: var(--spacing-md);
}
.indicator-btn:hover { opacity: 0.85; }
.indicator-btn.selected {
    border-color: var(--color-accent-primary);
    color: var(--color-text-accent-aa);
}
.indicator-btn svg {
    color: var(--color-text-muted);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Indicator Params Grid */
.indicator-params {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-md);
}
.param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}
.param-item label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}
.param-input {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    background: var(--color-bg-section-input);
    box-sizing: border-box;
    width: 100%;
}
.param-input:focus { box-shadow: 0 0 0 2px var(--color-accent-glow); }

/* === Kosul Olusturucu (Condition Builder) === */
.condition-section {
    background: var(--color-bg-section-condition);
    border: 1px solid var(--color-accent-glow-strong);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
.condition-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}
.condition-select {
    height: 40px;
    padding: 0 32px 0 var(--spacing-sm);
    background: var(--color-bg-section-input);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239E9E9E' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    min-width: 160px;
    transition: all var(--transition-fast);
}
.condition-select:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
    
}
.condition-value {
    height: 40px;
    width: 100px;
    padding: 0 var(--spacing-sm);
    background: var(--color-bg-section-input);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    transition: all var(--transition-fast);
}
.condition-value:focus {
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
    
}
.condition-value::placeholder { color: var(--color-text-muted); }
.condition-logic-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-primary);
    min-width: 32px;
    text-align: center;
}
.condition-delete {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.condition-delete:hover {
    background: var(--color-error-bg);
    color: var(--color-error);
}
.condition-delete svg { width: 16px; height: 16px; }

/* Add Condition Button */
.btn-add-condition {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-accent-glow);
    border: 1px dashed var(--color-accent-primary);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.btn-add-condition:hover { background: var(--color-accent-glow-strong); }
.btn-add-condition svg { width: 14px; height: 14px; }

/* === Added Condition Cards (Flutter Card) === */
.added-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    background: var(--color-bg-section-card);
    border: 1px solid var(--color-border-accent);
}
.added-card-content { flex: 1; min-width: 0; }
.added-card-main {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    margin-bottom: 4px;
}
.added-card-sub {
    font-size: 11px;
    color: var(--color-text-accent-aa);
}
.added-card-del {
    background: none;
    border: none;
    color: var(--color-error);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.added-card-del:hover { background: var(--color-error-bg); }

/* === Bottom Actions (Flutter Row with 2 Expanded ElevatedButton) === */
.wiz-bottom-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: var(--spacing-lg);
}
.wiz-btn-save {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    flex: 1;
    height: 50px;
    background: transparent;
    border: 1px solid var(--color-accent-primary);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.wiz-btn-save:hover { background: var(--color-accent-glow); }
.wiz-btn-run {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    flex: 1;
    height: 50px;
    background: var(--color-accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.wiz-btn-run:hover { box-shadow: var(--shadow-glow); opacity: 0.9; }

/* === Results Section === */
.results-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--card-elevation);
}
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-primary);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}
.results-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}
.results-count strong {
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-semibold);
}
.results-actions {
    display: flex;
    gap: var(--spacing-sm);
}
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 6px var(--spacing-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-export:hover {
    border-color: var(--color-border-accent);
    color: var(--color-accent-primary);
}
.btn-export svg { width: 14px; height: 14px; }
.btn-save-scan {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 6px var(--spacing-md);
    background: var(--color-accent-glow);
    border: 1px solid var(--color-accent-primary);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-save-scan:hover { background: var(--color-accent-glow-strong); }
.btn-save-scan svg { width: 14px; height: 14px; }

/* Results Table */
.results-table-wrapper { overflow-x: auto; }
.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}
.results-table thead { background: var(--color-bg-elevated); }
.results-table th {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: start;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid var(--color-border-primary);
}
.results-table th:hover { color: var(--color-text-secondary); }
.results-table th.sorted { color: var(--color-accent-primary); }
.results-table th .sort-icon {
    display: inline-block;
    width: 12px; height: 12px;
    margin-inline-start: 4px; opacity: 0.4;
    vertical-align: middle;
}
.results-table th.sorted .sort-icon { opacity: 1; }
.results-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-primary);
    white-space: nowrap;
}
.results-table tbody tr {
    transition: background var(--transition-fast);
    cursor: pointer;
}
.results-table tbody tr:hover { background: var(--color-bg-card-hover); }
.results-table tbody tr:last-child td { border-bottom: none; }
.stock-symbol { font-weight: var(--font-weight-semibold); color: var(--color-accent-primary); }
.stock-sector { color: var(--color-text-muted); font-size: var(--font-size-xs); }
.change-positive { color: var(--color-success); font-weight: var(--font-weight-semibold); }
.change-negative { color: var(--color-error); font-weight: var(--font-weight-semibold); }
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}
.score-high { background: var(--color-success-bg); color: var(--color-success); }
.score-medium { background: var(--color-warning-bg); color: var(--color-text-warning); }
.score-low { background: var(--color-error-bg); color: var(--color-error); }

/* === Toast / SnackBar (Hisse Tarama) === */
.scan-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-accent);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: var(--z-toast);
    pointer-events: none;
}
.scan-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }


/* =============================================
   KAYITLI TARAMALAR (kayitli-taramalar.html)
   ============================================= */

/* === Flutter Tab Controller (2 tabs) === */
.tab-bar {
    display: flex;
    gap: 0;
    margin-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--color-border-secondary);
    position: relative;
}
.tab-btn {
    flex: 1;
    padding: 14px var(--spacing-lg);
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    position: relative;
    font-family: var(--font-family);
    transition: color var(--transition-fast);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}
.tab-btn:hover { color: var(--color-text-primary); }
.tab-btn.active { color: var(--color-accent-primary); }
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}
.tab-btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--radius-full);
    background: var(--color-bg-tertiary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
}
.tab-btn.active .tab-btn-count {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === Collapsible Scan Cards (Flutter ExpansionTile) === */
.scan-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    box-shadow: var(--card-elevation);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.scan-card:hover {
    border-color: var(--color-border-accent);
}
.scan-card.expanded {
    border-color: var(--color-accent-glow-strong);
    box-shadow: var(--shadow-md);
}

/* Card Header (always visible, clickable) */
.scan-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: background var(--transition-fast);
    user-select: none;
}
.scan-card-header:hover {
    background: var(--color-bg-card-hover);
}
.scan-card-expand-icon {
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.scan-card.expanded .scan-card-expand-icon {
    transform: rotate(180deg);
}
.scan-card-title-area {
    flex: 1;
    min-width: 0;
}
.scan-card-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    line-height: var(--line-height-tight);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scan-card-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}
.scan-card-result-badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Card Body (collapsible) */
.scan-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 var(--spacing-lg);
}
.scan-card.expanded .scan-card-body {
    max-height: 600px;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

/* Criteria tags inside card body */
.scan-card-criteria {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--spacing-md);
}
.criteria-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
}

/* Card actions inside body */
.scan-card-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border-secondary);
    flex-wrap: wrap;
}
.btn-card-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 8px var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
    border: none;
}
.btn-card-action svg { width: 14px; height: 14px; }

.btn-card-run {
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
}
.btn-card-run:hover {
    box-shadow: var(--shadow-glow);
    opacity: 0.9;
}
.btn-card-edit {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary) !important;
    color: var(--color-text-secondary);
}
.btn-card-edit:hover {
    border-color: var(--color-border-accent) !important;
    color: var(--color-text-primary);
}
.btn-card-share {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
}
.btn-card-share:hover {
    background: var(--color-accent-glow-strong);
}
.btn-card-qr {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary) !important;
    color: var(--color-text-secondary);
}
.btn-card-qr:hover {
    border-color: var(--color-border-accent) !important;
    color: var(--color-accent-primary);
}
.btn-card-delete {
    background: transparent;
    color: var(--color-text-muted);
    margin-inline-start: auto;
}
.btn-card-delete:hover {
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* Autorun toggle inside card body */
.scan-card-autorun {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border-secondary);
}
.autorun-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.autorun-label svg { width: 14px; height: 14px; }
.autorun-frequency {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    padding: 2px 8px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--color-text-muted);
    border-radius: 50%;
    transition: all var(--transition-fast);
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
    background: var(--color-text-inverse);
    transform: translateX(18px);
}

/* === Community Tab Cards === */
.community-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-elevation);
    transition: all var(--transition-fast);
}
.community-card:hover {
    border-color: var(--color-border-accent);
}
.community-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}
.community-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-inverse);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}
.community-card-user {
    flex: 1;
    min-width: 0;
}
.community-card-username {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}
.community-card-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.community-card-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-xs);
}
.community-card-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
}
.community-card-stats {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}
.community-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}
.community-stat svg { width: 14px; height: 14px; }
.community-card-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--color-border-secondary);
}

/* === QR Code Dialog (256x256) === */
.qr-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--color-bg-overlay);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: overlayFadeIn 0.2s ease;
}
.qr-overlay.show { display: flex; }
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.qr-dialog {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-xl);
    animation: dialogSlideIn 0.25s ease;
    overflow: hidden;
}
@keyframes dialogSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.qr-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-secondary);
}
.qr-dialog-header h3 {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0;
}
.qr-dialog-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: all var(--transition-fast);
}
.qr-dialog-close:hover {
    background: var(--color-accent-glow);
    color: var(--color-text-primary);
}
.qr-dialog-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xl);
    gap: var(--spacing-md);
}
.qr-code-canvas {
    width: 256px;
    height: 256px;
    background: var(--tarama-qr-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* QR code placeholder pattern */
.qr-code-placeholder {
    width: 256px;
    height: 256px;
    background: var(--tarama-qr-bg);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    grid-template-rows: repeat(16, 1fr);
    padding: 16px;
    gap: 2px;
}
.qr-code-placeholder .qr-cell {
    background: var(--tarama-qr-cell);
    border-radius: 1px;
}
.qr-code-placeholder .qr-cell.empty {
    background: var(--tarama-qr-cell-empty);
}
.qr-scan-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    text-align: center;
}
.qr-scan-name {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    text-align: center;
}
.qr-dialog-footer {
    display: flex;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-border-secondary);
}
.qr-btn-copy {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 10px;
    background: var(--color-accent-glow);
    border: 1px solid var(--color-accent-primary);
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.qr-btn-copy:hover { background: var(--color-accent-glow-strong); }
.qr-btn-share {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 10px;
    background: var(--color-accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--color-text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.qr-btn-share:hover { box-shadow: var(--shadow-glow); opacity: 0.9; }

/* === CTA Card: Yeni Tarama === */
.scan-card-cta {
    background: var(--color-bg-card);
    border: 2px dashed var(--color-border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}
.scan-card-cta:hover {
    border-color: var(--color-accent-primary);
    background: var(--color-accent-glow);
}
.scan-card-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-primary);
    flex-shrink: 0;
}
.scan-card-cta-icon svg { width: 22px; height: 22px; }
.scan-card-cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.scan-card-cta-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-primary);
}
.scan-card-cta-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
}

/* === Empty State === */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4xl) var(--spacing-xl);
    text-align: center;
    gap: var(--spacing-md);
}
.empty-state.visible { display: flex; }
.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
}
.empty-state-icon svg { width: 28px; height: 28px; }
.empty-state-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}
.empty-state-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    max-width: 360px;
}

/* === SnackBar (Kayitli Taramalar) === */
.scan-snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    padding: 14px 24px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border-accent);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scan-snackbar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* =============================================
   Light Theme Refinements
   ============================================= */

[data-theme="light"] .tarama-list-tile {
    border-bottom-color: #E6E6E6;
}

[data-theme="light"] .tarama-list-tile:hover {
    background: #F8F4EC;
}

[data-theme="light"] .wiz-section-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #E6E6E6;
}

[data-theme="light"] .condition-card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    border-color: #E6E6E6;
}

[data-theme="light"] .scan-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #E6E6E6;
}

[data-theme="light"] .scan-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .results-table thead th {
    border-bottom-color: #E6E6E6;
}

[data-theme="light"] .results-table tbody td {
    border-bottom-color: #E6E6E6;
}

[data-theme="light"] .tab-btn {
    border-color: #E6E6E6;
}

[data-theme="light"] .community-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-color: #E6E6E6;
}


/* =============================================
   METASTOCK PERIOD SELECTOR POPUP
   ============================================= */
.meta-period-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    animation: metaFadeIn 0.2s ease forwards;
}

.meta-period-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    width: 360px;
    max-width: 90vw;
    max-height: 80vh;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: metaScaleIn 0.2s ease forwards;
}

@keyframes metaFadeIn {
    to { opacity: 1; }
}

@keyframes metaScaleIn {
    to { transform: translate(-50%, -50%) scale(1); }
}

.meta-period-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #E6E6E6);
}

.meta-period-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.meta-period-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary, #666);
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.meta-period-close:hover {
    background: var(--bg-secondary, #f5f5f5);
}

.meta-period-body {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow-y: auto;
    max-height: 300px;
}

.meta-period-item {
    padding: 8px 16px;
    border: 1.5px solid var(--border-color, #E6E6E6);
    border-radius: 8px;
    background: var(--bg-primary, #fff);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #1a1a2e);
    transition: all 0.15s;
    user-select: none;
}

.meta-period-item:hover {
    border-color: var(--primary-color, #6C5CE7);
    background: rgba(108, 92, 231, 0.05);
}

.meta-period-item.selected {
    background: var(--primary-color, #6C5CE7);
    border-color: var(--primary-color, #6C5CE7);
    color: #fff;
}

.meta-period-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color, #E6E6E6);
    gap: 8px;
}

.meta-period-apply {
    padding: 8px 24px;
    background: var(--primary-color, #6C5CE7);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.meta-period-apply:hover {
    background: var(--primary-hover, #5a4bd1);
}

/* MetaStock Form Enhancements */
.meta-form-card .wiz-field-row {
    margin-bottom: 12px;
}

.meta-form-card .wiz-field-label {
    min-width: 120px;
}

.meta-public-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.meta-public-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color, #6C5CE7);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .condition-row { flex-wrap: wrap; }
}

@media (max-width: 768px) {
    /* Menu */
    .tarama-list-tile {
        padding: 12px var(--spacing-sm);
    }
    .tarama-divider {
        margin-inline-start: 60px;
    }

    /* Hisse Tarama */
    .wiz-field-row { flex-direction: column; }
    .market-pills { gap: 6px; }
    .period-buttons { gap: 4px; }
    .logic-operator-row { flex-direction: column; align-items: flex-start; }
    .wiz-bottom-actions { flex-direction: column; }
    .results-header { flex-direction: column; align-items: flex-start; }

    /* Kayitli Taramalar */
    .scan-card-actions { flex-wrap: wrap; }
    .qr-dialog { max-width: 100%; margin: var(--spacing-sm); }
    .qr-code-placeholder { width: 200px; height: 200px; }
    .tab-btn { padding: 12px var(--spacing-sm); font-size: var(--font-size-xs); }
}

@media (max-width: 480px) {
    /* Hisse Tarama */
    .market-pills { flex-direction: column; }
    .visibility-toggle-row { justify-content: flex-start; }

    /* Kayitli Taramalar */
    .scan-card-header { padding: var(--spacing-sm) var(--spacing-md); }
    .community-card-stats { flex-wrap: wrap; gap: var(--spacing-sm); }
}


/* =============================================
   HISSE TARAMA — MAIN TABS (Wizard/Pine/MetaStock/Saved)
   ============================================= */

.scan-main-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border-secondary);
    margin-bottom: var(--spacing-xl);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.scan-main-tab {
    padding: 14px 24px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    position: relative;
    font-family: var(--font-family);
    transition: color var(--transition-fast);
    white-space: nowrap;
}
.scan-main-tab:hover { color: var(--color-text-primary); }
.scan-main-tab.active { color: var(--color-accent-primary); }
.scan-main-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}
.scan-main-content { display: none; }
.scan-main-content.active { display: block; }


/* =============================================
   WIZARD — Form Elements
   ============================================= */

.wiz-input, .wiz-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    background: var(--color-bg-secondary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}
.wiz-input:focus, .wiz-textarea:focus {
    
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
}
.wiz-input::placeholder, .wiz-textarea::placeholder {
    color: var(--color-text-muted);
}
.wiz-input-sm {
    padding: 8px 12px;
    font-size: var(--font-size-xs);
}
.wiz-textarea {
    resize: vertical;
    min-height: 60px;
}

.wiz-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-elevation);
}

.wiz-card-title {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0;
}

.wiz-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.wiz-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.wiz-selector-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: start;
}
.wiz-selector-btn:hover {
    border-color: var(--color-border-accent);
}
.wiz-selector-btn svg {
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.wiz-selector-badge {
    margin-inline-start: auto;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.wiz-field-lg { margin-bottom: var(--spacing-lg); }

.wiz-sublabel {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.wiz-label-muted {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* === Wizard Indicator Section === */
.wiz-section-indicator {
    background: var(--color-bg-section-indicator, rgba(108, 92, 231, 0.05));
    border: 1px solid var(--color-accent-glow-strong, rgba(108, 92, 231, 0.2));
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.wiz-indicator-btn, .wiz-data-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-family: var(--font-family);
    cursor: pointer;
    text-align: start;
    transition: all var(--transition-fast);
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-secondary);
}
.wiz-indicator-btn:hover, .wiz-data-btn:hover {
    border-color: var(--color-border-accent);
    color: var(--color-text-primary);
}
.wiz-indicator-btn.selected {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
}

.wiz-params-grid {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.wiz-param-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
    flex: 1;
}
.wiz-param-item label {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-medium);
}

.wiz-info-box {
    padding: 10px 14px;
    background: var(--color-accent-glow);
    border: 1px solid var(--color-accent-glow-strong, rgba(108, 92, 231, 0.25));
    border-radius: var(--radius-md);
    color: var(--color-accent-primary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    margin-top: var(--spacing-sm);
}

.wiz-action-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 10px 20px;
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-family);
}
.wiz-action-btn-primary:hover { box-shadow: var(--shadow-glow); opacity: 0.9; }
.wiz-action-btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}
.wiz-action-btn-primary svg { width: 16px; height: 16px; }

/* === Wizard Condition Section === */
.wiz-section-condition {
    background: var(--color-bg-section-condition, rgba(108, 92, 231, 0.03));
    border: 1px solid var(--color-accent-glow-strong, rgba(108, 92, 231, 0.15));
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.wiz-circle-badge {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    flex-shrink: 0;
}

.wiz-logic-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.wiz-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
}
.wiz-radio input[type="radio"] {
    accent-color: var(--color-accent-primary);
}

.wiz-not-warning {
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    color: var(--color-error);
    font-size: var(--font-size-xs);
    font-style: italic;
    margin-bottom: var(--spacing-sm);
}

.wiz-warning-box {
    padding: 12px;
    background: var(--color-bg-elevated);
    border: 1px dashed var(--color-border-primary);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    text-align: center;
}

.wiz-fixed-input {
    padding: 12px 14px;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.wiz-checkbox-row {
    margin-bottom: var(--spacing-md);
}

.wiz-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
}
.wiz-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent-primary);
}

.wiz-row-2 {
    display: flex;
    gap: var(--spacing-md);
}
@media (max-width: 640px) {
    .wiz-row-2 { flex-direction: column; }
}


/* =============================================
   CODE EDITOR (Pine Script & MetaStock)
   ============================================= */

.code-editor-wrap {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--card-elevation);
}

.code-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--spacing-md);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border-secondary);
}

.code-lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.code-clear-btn {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}
.code-clear-btn:hover {
    border-color: var(--color-error);
    color: var(--color-error);
}

.code-editor {
    width: 100%;
    min-height: 280px;
    padding: var(--spacing-md);
    background: var(--color-bg-primary, #0d1117);
    color: var(--color-text-primary);
    border: none;
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    tab-size: 4;
    box-sizing: border-box;
}
.code-editor:focus {  }
.code-editor-sm { min-height: 140px; }

.code-output {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border-secondary);
    font-size: var(--font-size-xs);
    min-height: 36px;
    display: flex;
    align-items: center;
}
.code-output-muted { color: var(--color-text-muted); }
.code-output-ok { color: var(--color-success); font-weight: var(--font-weight-semibold); }


/* =============================================
   METASTOCK 4-COLUMN GRID
   ============================================= */

.meta-grid {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
}
@media (max-width: 768px) {
    .meta-grid {
        flex-wrap: wrap;
    }
    .meta-col { min-width: calc(50% - 6px) !important; }
}

.meta-col {
    min-width: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-elevation);
}

.meta-col-header {
    padding: 10px var(--spacing-md);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border-secondary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-col-body {
    padding: var(--spacing-sm);
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.meta-item {
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-family: var(--font-family);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: start;
    white-space: nowrap;
}
.meta-item:hover {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
}


/* =============================================
   SCAN DIALOGS (Overlay + Dialog)
   ============================================= */

.scan-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    animation: overlayFadeIn 0.2s ease;
}

.scan-dialog {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-xl, 16px);
    width: 100%;
    max-width: 550px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: dialogSlideIn 0.25s ease;
}
.scan-dialog-sm { max-width: 360px; }

.scan-dialog-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--color-border-secondary);
}
.scan-dialog-header h3 {
    flex: 1;
    font-size: var(--font-size-md, 16px);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin: 0;
}
.scan-dialog-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    line-height: 1;
    transition: all var(--transition-fast);
}
.scan-dialog-close:hover {
    background: var(--color-accent-glow);
    color: var(--color-text-primary);
}

.scan-dialog-body {
    padding: var(--spacing-md) var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

.scan-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border-top: 1px solid var(--color-border-secondary);
}

/* Dialog internals */
.dialog-filter-row {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}
.dialog-filter-row .wiz-select { padding-inline-start: 14px; }

.dialog-stock-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
}
.dialog-stock-info {
    padding: 10px var(--spacing-md);
    background: var(--color-bg-elevated);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    font-weight: var(--font-weight-semibold);
    border-bottom: 1px solid var(--color-border-secondary);
}
.dialog-stock-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 8px var(--spacing-md);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border-secondary);
}
.dialog-stock-check {
    color: var(--color-success);
    font-weight: var(--font-weight-bold);
    width: 20px;
    text-align: center;
}
.dialog-stock-sym {
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-primary);
    min-width: 60px;
}
.dialog-stock-name {
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}
.dialog-stock-more {
    padding: 10px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
}

/* Period dialog chips */
.period-cat-section { margin-bottom: var(--spacing-md); }
.period-cat-header {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}
.period-cat-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.period-chip {
    padding: 6px 14px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-full);
    background: var(--color-bg-secondary);
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
}
.period-chip:hover { border-color: var(--color-border-accent); color: var(--color-text-primary); }
.period-chip.selected {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: var(--color-text-inverse);
}

/* Indicator dialog */
.ind-dialog-layout {
    display: flex;
    gap: var(--spacing-sm);
    min-height: 300px;
}
.ind-cat-list {
    width: 200px;
    flex-shrink: 0;
    border-inline-end: 1px solid var(--color-border-secondary);
    overflow-y: auto;
}
.ind-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: var(--font-size-xs);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    text-align: start;
}
.ind-cat-item:hover { background: var(--color-bg-card-hover); color: var(--color-text-primary); }
.ind-cat-item.active {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-semibold);
}
.ind-cat-name { flex: 1; }
.ind-cat-count {
    font-size: 10px;
    background: var(--color-bg-elevated);
    padding: 1px 6px;
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
}
.ind-item-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-xs);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ind-item {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    font-family: var(--font-family);
    transition: all var(--transition-fast);
    text-align: start;
}
.ind-item:hover {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
}

/* Data source options */
.ds-option {
    display: block;
    width: 100%;
    padding: 12px var(--spacing-md);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border-secondary);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    font-family: var(--font-family);
    text-align: start;
    transition: all var(--transition-fast);
}
.ds-option:hover { background: var(--color-bg-card-hover); color: var(--color-text-primary); }
.ds-option.selected {
    background: var(--color-accent-glow);
    color: var(--color-accent-primary);
    font-weight: var(--font-weight-semibold);
}
.ds-option:last-child { border-bottom: none; }


/* =============================================
   SCAN RESULTS TABLE
   ============================================= */

.scan-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
}
.scan-results-table thead { background: var(--color-bg-elevated); }
.scan-results-table th {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: start;
    white-space: nowrap;
    border-bottom: 1px solid var(--color-border-primary);
}
.scan-results-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-secondary);
    white-space: nowrap;
}
.scan-result-row { cursor: pointer; transition: background var(--transition-fast); }
.scan-result-row:hover { background: var(--color-bg-card-hover); }

.change-up { color: var(--color-success); font-weight: var(--font-weight-semibold); }
.change-down { color: var(--color-error); font-weight: var(--font-weight-semibold); }
.muted-cell { color: var(--color-text-muted); font-size: var(--font-size-xs); }

.signal-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}
.signal-badge.strong-buy { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.signal-badge.buy { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.signal-badge.neutral { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }

.match-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 100px;
}
.match-bar span {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    min-width: 32px;
}
.match-fill {
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--color-accent-primary);
    flex: 1;
    max-width: 60px;
}


/* =============================================
   SAVED TAB — Subtabs & Alpha Scans
   ============================================= */

.saved-subtabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--color-border-secondary);
    margin-bottom: var(--spacing-lg);
}
.saved-subtab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    position: relative;
    font-family: var(--font-family);
    transition: color var(--transition-fast);
}
.saved-subtab:hover { color: var(--color-text-primary); }
.saved-subtab.active { color: var(--color-accent-primary); }
.saved-subtab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 2px;
    background: var(--color-accent-primary);
    border-radius: var(--radius-full) var(--radius-full) 0 0;
}
.saved-subcontent { display: none; }
.saved-subcontent.active { display: block; }

/* Alpha Scans Grid */
.alpha-scans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.alpha-scan-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--card-elevation);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}
.alpha-scan-card:hover {
    border-color: var(--color-border-accent);
    box-shadow: var(--shadow-md);
}

.alpha-scan-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}
.alpha-scan-top h4 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-primary);
    margin: 0;
}

.risk-tag {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}
.risk-düşük, .risk-tag.risk-düşük { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.risk-orta, .risk-tag.risk-orta { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.risk-yüksek, .risk-tag.risk-yüksek { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.alpha-scan-desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: var(--line-height-relaxed, 1.6);
    margin-bottom: var(--spacing-sm);
    flex: 1;
}

.alpha-scan-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}
.alpha-periods {
    display: flex;
    gap: 4px;
}
.period-mini {
    padding: 2px 8px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 10px;
    color: var(--color-text-muted);
    font-weight: var(--font-weight-semibold);
}
.alpha-profit {
    font-size: var(--font-size-xs);
    color: var(--color-success);
    font-weight: var(--font-weight-semibold);
}

.alpha-cond-box {
    padding: 8px 12px;
    background: var(--color-bg-primary, rgba(0, 0, 0, 0.2));
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    overflow-x: auto;
}
.alpha-cond-box code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 11px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.alpha-scan-btns {
    display: flex;
    gap: var(--spacing-sm);
}
.alpha-scan-btns .wiz-btn-run,
.alpha-scan-btns .wiz-btn-save {
    font-size: var(--font-size-xs);
    height: 36px;
    padding: 0 14px;
}

/* Saved empty state */
.saved-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-4xl, 60px) var(--spacing-xl);
    text-align: center;
    color: var(--color-text-muted);
    gap: var(--spacing-sm);
}
.saved-empty svg { opacity: 0.3; margin-bottom: var(--spacing-sm); }
.saved-empty p { margin: 0; font-size: var(--font-size-sm); }
.saved-empty-hint { font-size: var(--font-size-xs) !important; color: var(--color-text-muted); }

/* Result count badge */
.result-count {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-primary);
    background: var(--color-accent-glow);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}


/* =============================================
   SKELETON LOADING
   ============================================= */

.skeleton-line {
    background: linear-gradient(90deg, var(--color-surface-secondary, #2a2a2a) 25%, var(--color-surface-tertiary, #333) 50%, var(--color-surface-secondary, #2a2a2a) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-card {
    pointer-events: none;
}

.skeleton-card .scan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}


/* =============================================
   SPIN ICON (loading state)
   ============================================= */

.spin-icon {
    animation: spin-rotate 1s linear infinite;
}

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


/* =============================================
   SCAN RESULTS OVERLAY / MODAL
   ============================================= */

.scan-results-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

.scan-results-overlay.show {
    display: flex;
}

.scan-results-modal {
    background: var(--color-surface-primary, #1a1a1a);
    border: 1px solid var(--color-border-primary, #333);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.scan-results-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-primary, #333);
}

.scan-results-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary, #e0e0e0);
    margin: 0;
}

.scan-results-close {
    background: none;
    border: none;
    color: var(--color-text-muted, #888);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.scan-results-close:hover {
    color: var(--color-text-primary, #e0e0e0);
}

.scan-results-modal-body {
    overflow-y: auto;
    padding: 16px 20px;
    flex: 1;
}

/* Snackbar type variants */
.scan-snackbar.snackbar-success { background: #10b981; }
.scan-snackbar.snackbar-error { background: #ef4444; }
.scan-snackbar.snackbar-warning { background: #f59e0b; color: #000; }
