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

:root {
    /* Light mode colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-header: transparent;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-inverse: #333333;
    --border-color: #dddddd;
    --hover-bg: #f8f9fa;
    --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: #2d2d2d;
    --bg-header: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-inverse: #ffffff;
    --border-color: #404040;
    --hover-bg: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Dark mode: All labels should be white */
[data-theme="dark"] label {
    color: #ffffff !important;
}

/* Header dark mode support */
[data-theme="dark"] header {
    background: transparent;
    border: none;
}

[data-theme="dark"] header .header-app-brand-text,
[data-theme="dark"] header .header-brand-name,
[data-theme="dark"] header .header-brand-subtitle,
[data-theme="dark"] header .header-context-title {
    color: var(--text-primary);
}

[data-theme="dark"] header .status-item {
    color: var(--text-primary);
}

/* Dark mode: Keep header right simple (no background separation needed) */
[data-theme="dark"] header .header-right {
    background: transparent;
    border-left: none;
    padding: 0;
}

[data-theme="dark"] header .user-menu-button {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: var(--text-primary) !important;
    box-shadow: none;
}

[data-theme="dark"] header .user-menu-button:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: none;
    transform: none;
}

[data-theme="dark"] header .user-menu-button #userInfo,
[data-theme="dark"] header .user-menu-button span,
[data-theme="dark"] header #userInfo,
[data-theme="dark"] #userInfo {
    color: var(--text-primary) !important;
}

[data-theme="dark"] header .user-menu-button {
    color: var(--text-primary) !important;
}

[data-theme="dark"] header .user-menu-button * {
    color: var(--text-primary) !important;
}

/* Dark mode: Theme toggle and help buttons */
[data-theme="dark"] header .theme-toggle-button,
[data-theme="dark"] header #themeToggle,
[data-theme="dark"] header .help-button,
[data-theme="dark"] header #helpMenuBtn,
[data-theme="dark"] header #jobStatusBell {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: var(--text-primary) !important;
    box-shadow: none;
}

[data-theme="dark"] header .theme-toggle-button:hover,
[data-theme="dark"] header #themeToggle:hover,
[data-theme="dark"] header .help-button:hover,
[data-theme="dark"] header #helpMenuBtn:hover,
[data-theme="dark"] header #jobStatusBell:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: none;
    transform: none;
}

/* Dark mode: Logout button */
[data-theme="dark"] header .logout-button {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: var(--text-primary) !important;
    box-shadow: none;
}

[data-theme="dark"] header .logout-button:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: none;
    transform: none;
}

/* Dark mode: Header right actions container */
[data-theme="dark"] header .header-right-actions {
    background: transparent;
}

/* Tab dark mode */
[data-theme="dark"] .tab {
    color: var(--text-secondary);
}

[data-theme="dark"] .tab:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

[data-theme="dark"] .tab.active {
    color: #8b9eff;
    background: #2a2d3a;
}

[data-theme="dark"] .tab-group-separator {
    background: #404040;
}

/* Stat card dark mode */
[data-theme="dark"] .stat-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-card.products .stat-icon {
    background: rgba(102, 126, 234, 0.2);
    color: #8b9eff;
}

[data-theme="dark"] .stat-card.alerts .stat-icon {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

[data-theme="dark"] .stat-card.price-check .stat-icon {
    background: rgba(102, 126, 234, 0.2);
    color: #8b9eff;
}

/* Action card dark mode */
[data-theme="dark"] .action-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

html {
    scroll-behavior: auto !important;
    height: 100%;
    overflow-y: scroll;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: var(--text-primary);
}

h2 {
    font-size: 20px;
    font-weight: 600;
}

h3 {
    font-size: 18px;
    font-weight: 600;
}

p {
    line-height: 1.6;
    margin-bottom: 1em;
    color: var(--text-primary);
}

small {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    flex: 1;
}

/* Improved spacing throughout */
.card + .card {
    margin-top: 0; /* Cards already have margin-bottom */
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Desktop: Keep filter forms horizontal - must come AFTER mobile styles to override */
@media (min-width: 769px) {
    /* Filter form containers - ensure horizontal layout, single row */
    .card > div[style*="display: flex"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure alerts and history filter sections don't overflow */
    #alerts .card > div[style*="display: flex"],
    #history .card > div[style*="display: flex"] {
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
        position: relative !important;
    }
    
    /* Ensure parent containers allow suggestions to show */
    #alerts .card > div[style*="background: #f8f9fa"],
    #history .card > div[style*="background: #f8f9fa"] {
        overflow: visible !important;
    }
    
    /* Labels - keep inline, preserve inline margins */
    .card > div[style*="display: flex"] label {
        display: inline !important;
        width: auto !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        /* Preserve inline margin-left if exists */
    }
    
    /* Inputs - preserve inline widths, remove forced full width */
    .card > div[style*="display: flex"] input[type="text"],
    .card > div[style*="display: flex"] input[type="date"],
    .card > div[style*="display: flex"] input[type="number"] {
        width: auto !important;
        min-width: 120px !important;
        max-width: 180px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        flex-shrink: 1 !important;
    }
    
    /* Search inputs - full width in their containers */
    #historySearch {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex-shrink: 1 !important;
    }
    
    #alertSearch {
        width: 100% !important;
    }
    
    /* Date inputs - full width in their containers */
    #historyStartDate,
    #historyEndDate,
    #alertStartDate,
    #alertEndDate {
        width: 100% !important;
        min-width: 140px !important;
    }
    
    /* Select inputs - fixed width */
    #alertCheckedFilter {
        width: auto !important;
        min-width: 140px !important;
        max-width: 160px !important;
    }
    
    /* Alerts specific - tighter spacing */
    #alerts .card > div[style*="display: flex"] {
        gap: 6px !important;
    }
    
    /* Alerts tag filter - same as products */
    #alerts #alertTagsFilterWrapper {
        flex: 1 !important;
        min-width: 300px !important;
    }
    
    /* Alerts search - full width in wrapper */
    #alerts #alertSearch {
        width: 100% !important;
    }
    
    /* Date inputs container - vertical layout */
    #alerts .card > div[style*="display: flex"] > div[style*="flex-direction: column"],
    #history .card > div[style*="display: flex"] > div[style*="flex-direction: column"] {
        flex-shrink: 0 !important;
        align-items: flex-start !important;
    }
    
    /* Date inputs - smaller */
    #alerts #alertStartDate,
    #alerts #alertEndDate,
    #history #historyStartDate,
    #history #historyEndDate {
        width: 130px !important;
        min-width: 130px !important;
        max-width: 130px !important;
    }
    
    /* Buttons - keep inline, preserve padding */
    .card > div[style*="display: flex"] button {
        width: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        padding: 8px 12px !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }
    
    /* Alerts and History buttons - smaller padding */
    #alerts .card > div[style*="display: flex"] button,
    #history .card > div[style*="display: flex"] button {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* Products search - desktop */
    #products .card > div[style*="margin-bottom"] {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    #products input[type="text"] {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    #products button {
        width: auto !important;
        margin-left: 10px !important;
        margin-bottom: 0 !important;
    }
}

/* Mobile Responsive Styles - comes first */
@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 10px;
    }
    
    header {
        padding: 12px 16px;
        margin-bottom: 16px;
        flex-direction: column;
        gap: 12px;
    }
    
    .header-left,
    .header-center,
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .header-center {
        order: -1;
    }
    
    .header-brand-name {
        font-size: 18px;
    }
    
    .header-brand-subtitle {
        font-size: 11px;
    }
    
    .header-context-title {
        font-size: 16px;
    }
    
    .status-bar {
        flex-direction: row;
        gap: 12px;
        font-size: 12px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-menu-container {
        width: 100%;
    }
    
    .user-menu-button {
        width: 100%;
        justify-content: center;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    /* Tabs - make horizontal scrollable on mobile */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 2px;
        padding: 0 2px;
    }
    
    .tabs .tab {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .tab-group-separator {
        display: none; /* Hide separators on mobile */
    }
    
    /* Stats cards - single column on mobile */
    .stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    /* Tables - make scrollable on mobile, but reduce minimum width */
    .table-wrapper,
    #productsTable,
    #alertsTable,
    #historyTable,
    #competitorsTable,
    #usersTable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    table {
        min-width: 520px;
        font-size: 13px;
    }
    
    th, td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    /* Prevent table overflow on desktop */
    #competitorsTable {
        overflow-x: auto;
        max-width: 100%;
    }
    
    #competitorsTable table {
        table-layout: auto;
        width: 100%;
    }
    
    #competitorsTable td {
        max-width: 200px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    #competitorsTable td code {
        display: inline-block;
        max-width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-all;
        white-space: normal;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 15px;
    }
    
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Buttons */
    button,
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group button {
        margin-right: 0;
    }
    
    /* Cards */
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }

    /* --- Products table mobile optimizations --- */
    /* Hide less important columns: internal ID and raw stock text */
    #productsTable table th:nth-child(2),
    #productsTable table td:nth-child(2),
    #productsTable table th:nth-child(7),
    #productsTable table td:nth-child(7) {
        display: none;
    }

    /* Make product name column wider & others more compact */
    /* Kod kolonu: daralt */
    #productsTable table td:nth-child(3),
    #productsTable table th:nth-child(3) {
        max-width: 90px;
        width: 90px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ürün adı kolonu: daha geniş alan */
    #productsTable table td:nth-child(4),
    #productsTable table th:nth-child(4) {
        min-width: 160px;
        max-width: 220px;
        width: 45%;
    }

    /* Etiket kolonu: daha kompakt */
    #productsTable table td:nth-child(5),
    #productsTable table th:nth-child(5) {
        max-width: 120px;
    }

    /* Make competitor column more compact */
    #productsTable table td:nth-child(8) {
        font-size: 11px;
        line-height: 1.3;
    }

    /* --- Competitors table mobile optimizations --- */
    /* Hide alert threshold and scraper type on very small screens */
    #competitorsTable table th:nth-child(4),
    #competitorsTable table td:nth-child(4),
    #competitorsTable table th:nth-child(7),
    #competitorsTable table td:nth-child(7) {
        display: none;
    }

    /* Long base URLs should wrap nicely */
    #competitorsTable td:nth-child(3) {
        word-break: break-all;
        font-size: 11px;
    }

    /* --- Alerts & History tables mobile optimizations --- */
    /* Hide internal ID column in alerts to gain space */
    #alertsTable table th:nth-child(1),
    #alertsTable table td:nth-child(1) {
        display: none;
    }

    /* Alerts: widen product code & name columns */
    /* Ürün Kodu (col 2 after hiding ID) */
    #alertsTable table th:nth-child(2),
    #alertsTable table td:nth-child(2) {
        min-width: 90px;
        max-width: 110px;
        width: 25%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ürün Adı (col 3) */
    #alertsTable table th:nth-child(3),
    #alertsTable table td:nth-child(3) {
        min-width: 160px;
        max-width: 220px;
        width: 40%;
    }

    /* Rakip Site (col 4) biraz daha kompakt */
    #alertsTable table th:nth-child(4),
    #alertsTable table td:nth-child(4) {
        max-width: 120px;
        font-size: 11px;
    }

    /* Alerts: widen price & diff columns */
    /* Bizim Fiyat (col 5), Rakip Fiyat (col 6), Fark % (col 7) */
    #alertsTable table th:nth-child(5),
    #alertsTable table td:nth-child(5),
    #alertsTable table th:nth-child(6),
    #alertsTable table td:nth-child(6),
    #alertsTable table th:nth-child(7),
    #alertsTable table td:nth-child(7) {
        min-width: 90px;
        max-width: 110px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Alerts: widen Linkler (col 8) */
    #alertsTable table th:nth-child(8),
    #alertsTable table td:nth-child(8) {
        min-width: 110px;
        max-width: 150px;
        font-size: 11px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Alerts: allow Bildirim (col 9) to wrap so it doesn't collide with Linkler */
    #alertsTable table th:nth-child(9),
    #alertsTable table td:nth-child(9) {
        /* Mobile'de yer kazanmak için tamamen gizle */
        display: none;
    }

    /* History: hide ID column to gain space */
    #historyTable table th:nth-child(1),
    #historyTable table td:nth-child(1) {
        display: none;
    }

    /* History: widen product code & name columns */
    /* Ürün Kodu (col 2 after hiding ID) */
    #historyTable table th:nth-child(2),
    #historyTable table td:nth-child(2) {
        min-width: 90px;
        max-width: 110px;
        width: 25%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Ürün Adı (col 3) */
    #historyTable table th:nth-child(3),
    #historyTable table td:nth-child(3) {
        min-width: 160px;
        max-width: 220px;
        width: 40%;
    }

    /* Rakip Site (col 4) biraz daha kompakt */
    #historyTable table th:nth-child(4),
    #historyTable table td:nth-child(4) {
        max-width: 120px;
        font-size: 11px;
    }

    /* History: widen price & diff columns */
    /* Bizim Fiyat (col 5), Rakip Fiyat (col 6), Fark (col 7) */
    #historyTable table th:nth-child(5),
    #historyTable table td:nth-child(5),
    #historyTable table th:nth-child(6),
    #historyTable table td:nth-child(6),
    #historyTable table th:nth-child(7),
    #historyTable table td:nth-child(7) {
        min-width: 90px;
        max-width: 110px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* History: widen Linkler (col 8) */
    #historyTable table th:nth-child(8),
    #historyTable table td:nth-child(8) {
        min-width: 110px;
        max-width: 150px;
        font-size: 11px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* History: allow Stok (col 9) / Anomali (col 10) to wrap a bit daha rahat */
    #historyTable table th:nth-child(9),
    #historyTable table td:nth-child(9),
    #historyTable table th:nth-child(10),
    #historyTable table td:nth-child(10) {
        white-space: normal;
        font-size: 11px;
    }
    
    /* Dashboard stats */
    .stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px;
        padding: 20px;
    }
    
    /* Footer */
    footer {
        padding: 15px 10px;
        font-size: 12px;
    }
    
    /* Search and filter forms */
    .filter-form {
        flex-direction: column;
    }
    
    .filter-form .form-group {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-form button {
        width: 100%;
    }
    
    /* Fix inline filter forms in alerts, history, products - MOBILE ONLY */
    /* These rules only apply on mobile screens (max-width: 768px) */
    .card > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .card > div[style*="display: flex"] > * {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .card > div[style*="display: flex"] label {
        display: block !important;
        width: 100% !important;
        margin-bottom: 5px !important;
        font-weight: 500;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .card > div[style*="display: flex"] input[type="text"],
    .card > div[style*="display: flex"] input[type="date"],
    .card > div[style*="display: flex"] input[type="number"] {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 10px !important;
    }
    
    .card > div[style*="display: flex"] button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 5px !important;
        padding: 12px !important;
    }
    
    /* Mobile: override inline widths for history search */
    #historySearch {
        width: 100% !important;
    }
    
    /* Mobile: override inline widths for alert search */
    #alertSearch {
        width: 100% !important;
    }
    
    /* Mobile: ensure filter containers don't overflow */
    #alerts .card > div[style*="display: flex"],
    #history .card > div[style*="display: flex"] {
        overflow-x: visible !important;
        overflow-y: visible !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Products search - MOBILE ONLY */
    #products .card > div[style*="margin-bottom"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    
    #products .card > div[style*="margin-bottom"] > * {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #products input[type="text"] {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    #products button {
        width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 5px !important;
    }

    /* Alerts filter bar - ensure each widget full width stacked */
    #alerts .card > div[style*="background: #f8f9fa"] > div[style*="display: flex"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #alerts .card > div[style*="background: #f8f9fa"] > div[style*=\"display: flex\"] > * {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* History filter bar - ensure each widget full width stacked */
    #history .card > div[style*=\"background: #f8f9fa\"] > div[style*=\"display: flex\"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #history .card > div[style*=\"background: #f8f9fa\"] > div[style*=\"display: flex\"] > * {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    header {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    table {
        min-width: 500px;
        font-size: 12px;
    }
    
    th, td {
        padding: 6px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        border-radius: 0;
    }
}

header {
    background: var(--bg-header);
    color: var(--text-inverse);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: none;
}

.header-app-brand-link {
    text-decoration: none;
    display: inline-block;
}
.header-app-brand-text {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

/* Light mode: Header text should be dark */
header .header-brand-name,
header .header-brand-subtitle,
header .header-context-title {
    color: var(--text-primary);
}

header .status-item {
    color: var(--text-primary);
}

/* Light mode: Header right section - make it more visible */
header .header-right {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 8px;
    border-left: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Status bar in header right */
header .header-right .status-bar {
    margin-top: 0;
    gap: 16px;
}

header .header-right .status-item {
    color: var(--text-primary);
    font-weight: 500;
}

header .user-menu-button {
    background: #f0f2ff;
    border: 1px solid #ddd;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

header .user-menu-button:hover {
    background: #ffffff;
    border-color: #667eea;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* User info text should be dark in light mode */
header .user-menu-button #userInfo,
header .user-menu-button span,
header #userInfo,
#userInfo {
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Ensure all text in user menu button is dark */
header .user-menu-button {
    color: var(--text-primary) !important;
}

header .user-menu-button * {
    color: var(--text-primary) !important;
}

/* Header right actions container (for partials/header.html) */
header .header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme toggle button - make it more visible in light mode */
header .theme-toggle-button,
header #themeToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f0f2ff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

header .theme-toggle-button:hover,
header #themeToggle:hover {
    background: #ffffff !important;
    border-color: #667eea !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Job status bell button styling */
header #jobStatusBell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f0f2ff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: relative;
}

header #jobStatusBell:hover {
    background: #ffffff !important;
    border-color: #667eea !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

header #jobStatusBadge {
    display: none;
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* Dark mode: Job status bell */
[data-theme="dark"] header #jobStatusBell {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    color: var(--text-primary) !important;
    box-shadow: none;
}

[data-theme="dark"] header #jobStatusBell:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.3) !important;
    box-shadow: none;
    transform: none;
}

/* Help button styling */
header .help-button,
header #helpMenuBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f0f2ff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px;
    color: var(--text-primary) !important;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

header .help-button:hover,
header #helpMenuBtn:hover {
    background: #ffffff !important;
    border-color: #667eea !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Logout button styling */
header .logout-button {
    background: #f0f2ff !important;
    border: 1px solid #ddd !important;
    color: var(--text-primary) !important;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

header .logout-button:hover {
    background: #ffffff !important;
    border-color: #667eea !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

/* Status dot - use brand color (#667eea) */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #667eea;
    flex-shrink: 0;
}

.status-dot.active {
    background: #667eea;
    border-color: #667eea;
}

h1 {
    margin-bottom: 10px;
}

.status-bar {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 14px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid #667eea;
}

.status-dot.active {
    background: #667eea;
    border-color: #667eea;
}

.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 30px;
    background: var(--bg-secondary);
    padding: 5px;
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: background-color 0.3s ease;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-secondary);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
}

.tab:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab.active {
    background: #f0f2ff;
    color: #667eea;
    font-weight: 600;
}

.tab-content {
    display: none;
    overflow: visible !important;
}

.tab-content.active {
    display: block;
    overflow: visible !important;
}

.card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.card h2 {
    margin-bottom: 15px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease;
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

button:hover {
    background: #2980b9;
}

button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
}

.btn-success:hover {
    background: #229954;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Competitors table - prevent overflow */
#competitorsTable {
    overflow-x: auto;
    max-width: 100%;
}

#competitorsTable table {
    table-layout: auto;
    width: 100%;
}

#competitorsTable td {
    max-width: 200px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Alerts and Price History tables - prevent overflow on desktop */
#alertsTable,
#historyTable {
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
}

#alertsTable table,
#historyTable table {
    table-layout: auto;
    width: 100%;
    min-width: 800px; /* Ensure minimum width for all columns */
}

#alertsTable td,
#historyTable td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

#competitorsTable td code {
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    font-size: 11px;
    background: #f4f4f4;
    color: #333;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Dark mode for competitors table code */
[data-theme="dark"] #competitorsTable td code {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border: 1px solid var(--border-color);
}

th {
    background: var(--hover-bg);
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background: var(--hover-bg);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

[data-theme="dark"] .badge-success {
    background: #1e4620;
    color: #90ee90;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

[data-theme="dark"] .badge-danger {
    background: #4a1f1f;
    color: #ff6b6b;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .badge-warning {
    background: #4a3f1f;
    color: #ffd93d;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

[data-theme="dark"] .alert-success {
    background: #1e4620;
    color: #90ee90;
    border-color: #2d5a2f;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

[data-theme="dark"] .alert-error {
    background: #4a1f1f;
    color: #ff6b6b;
    border-color: #5a2f2f;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.text-success {
    color: #27ae60;
    font-weight: bold;
}

.text-danger {
    color: #e74c3c;
    font-weight: bold;
}

.anomaly {
    background-color: #fff3cd;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.not-clickable {
    cursor: default;
}

/* Stat Card Header Structure */
.stat-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-card.products .stat-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.stat-card.alerts .stat-icon {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.stat-card.price-check .stat-icon {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.stat-label {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    transition: color 0.3s ease;
}

.stat-description {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    opacity: 0.85;
}

.stat-action {
    color: #667eea;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card.clickable:hover .stat-action {
    opacity: 1;
}

[data-theme="dark"] .stat-action {
    color: #8b9eff;
}

/* Fiyat Kontrolü Widget */
.stat-card.price-check .stat-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card.price-check .stat-label {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.stat-card.price-check .price-check-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    transition: all 0.2s ease;
}

.stat-card.price-check .price-check-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.stat-card.price-check .price-check-date {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
}

.stat-card.price-check .price-check-date span {
    font-weight: 500;
    color: var(--text-primary);
}

/* Status Message */
.status-message {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.status-message-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.status-text {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.status-message.success {
    background: #f0f9ff;
    border-color: #27ae60;
}

.status-message.success .status-icon {
    color: #27ae60;
}

.status-message.warning {
    background: #fffbf0;
    border-color: #f39c12;
}

.status-message.warning .status-icon {
    color: #f39c12;
}

.status-message.info {
    background: #f0f2ff;
    border-color: #667eea;
}

.status-message.info .status-icon {
    color: #667eea;
}

[data-theme="dark"] .status-message.success {
    background: rgba(39, 174, 96, 0.1);
    border-color: #27ae60;
}

[data-theme="dark"] .status-message.warning {
    background: rgba(243, 156, 18, 0.1);
    border-color: #f39c12;
}

[data-theme="dark"] .status-message.info {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

/* ============================================
   PRODUCTS SCREEN - REVISED B2B STYLE
   ============================================ */

/* Products Card Header - h2 + Ekle button */
.products-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.products-card-header h2 {
    margin: 0;
}
.products-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    background: #667eea;
    color: white !important;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.products-add-btn:hover {
    background: #5568d3;
    color: white !important;
}

/* Products Filter — enterprise toolbar (8/12/16 spacing) */
.products-filter-section {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.products-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.products-filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.products-filter-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.products-filter-right .products-bulk-codes-btn,
.products-filter-right .products-action-btn,
.products-filter-right .bulk-actions-menu-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0 14px;
    vertical-align: middle;
    flex-shrink: 0;
}

.products-filter-right .bulk-actions-menu {
    display: flex;
    align-items: center;
}

.products-filter-bar .products-search-wrapper {
    min-width: 360px;
    position: relative;
}

.products-filter-bar .products-search-wrapper .products-filter-input {
    width: 100%;
}

.products-filter-input {
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e5e9;
    min-width: 200px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.products-filter-input:hover {
    border-color: #d1d5db;
}

.products-filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.products-tags-filter-wrapper {
    min-width: 220px;
    position: relative;
}

.products-tags-filter-wrapper .products-filter-input {
    min-width: 220px;
}

.products-filter-no-tags {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    font-size: 14px;
    color: var(--text-secondary, #666);
    cursor: pointer;
}

.products-filter-no-tags input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

.products-filter-queue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    font-size: 14px;
    color: var(--text-secondary, #666);
    cursor: default;
}

.products-filter-queue-select {
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e5e9;
    min-width: 140px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    cursor: pointer;
    box-sizing: border-box;
}

.products-bulk-codes-btn,
.products-action-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
}

.products-bulk-codes-btn {
    background: #fff;
    color: var(--text-secondary, #555);
    border-color: #e2e5e9;
}

.products-bulk-codes-btn:hover {
    background: #f1f3f5;
    color: var(--text-primary, #333);
    border-color: #d1d5db;
}

[data-theme="dark"] .products-filter-section {
    background: var(--bg-secondary, #25262b);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .products-filter-input,
[data-theme="dark"] .products-filter-queue-select {
    background: var(--bg-primary, #1e1f23);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .products-bulk-codes-btn {
    background: var(--bg-primary, #1e1f23);
    border-color: #4b5563;
    color: var(--text-secondary, #9ca3af);
}

[data-theme="dark"] .products-bulk-codes-btn:hover {
    background: var(--hover-bg, #374151);
    color: var(--text-primary, #e5e7eb);
    border-color: #6b7280;
}

/* Alerts search wrapper - same style as products */
.alerts-search-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.alerts-search-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary, #ffffff);
    color: var(--text-primary, #333);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-sizing: border-box;
}

.alerts-search-input:hover {
    background: var(--hover-bg, #f8f9fa);
}

.alerts-search-input:focus {
    outline: none;
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary, #ffffff);
}

/* Toplu etiket modalı: chip alanı (ürün güncelleme ile aynı görünüm) */
.products-tags-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    min-height: 36px;
    padding: 10px 0;
}

.products-tags-chips:empty {
    min-height: 0;
    padding: 0;
}

.products-tags-filter-container {
    position: relative;
}

.products-tags-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Excel Dışa Aktar - Primary button */
.products-action-btn.btn-success {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.products-action-btn.btn-success:hover:not(:disabled) {
    background: #5568d3;
    border-color: #5568d3;
}

/* Filtreleri Temizle - Secondary/Outline button */
.products-action-btn.btn-secondary {
    background: transparent;
    color: var(--text-primary, #374151);
    border-color: #e5e7eb;
}

.products-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #f3f4f6);
    border-color: #d1d5db;
}

[data-theme="dark"] .products-action-btn.btn-secondary {
    color: var(--text-primary, #e5e7eb);
    border-color: #4b5563;
}

[data-theme="dark"] .products-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #374151);
    border-color: #6b7280;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: 2px solid #667eea;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    border-color: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Products Info Bar (Toplam ürün — toolbar ile tutarlı boşluk) */
.products-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.products-info-left {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.products-info-main {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.products-info-count {
    font-weight: 600;
    color: var(--text-primary);
}

.products-info-sub {
    font-size: 13px;
    color: #94a3b8;
}

[data-theme="dark"] .products-info-sub {
    color: #9ca3af;
}

.products-info-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.products-sort-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.products-sort-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 200px;
}

.products-sort-select:focus {
    outline: none;
    border-color: #667eea;
}

.products-page-size-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.products-page-size-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.products-page-size-select:focus {
    outline: none;
    border-color: #667eea;
}

/* Products Table Container - Card Row Style */
.products-table-container {
    margin-bottom: 24px;
    overflow: visible;
}

.products-table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    overflow: visible;
}

.products-table-container tbody {
    overflow: visible;
}

.products-table-container thead {
    display: none; /* Hide header for card-style rows */
}

.products-table-container tbody tr {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    display: block;
    margin-bottom: 12px;
    padding: 20px;
    position: relative;
    overflow: visible;
    z-index: 1;
}

.products-table-container tbody tr:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    z-index: 100;
}

/* When dropdown menu is open, keep row on top */
.products-table-container tbody tr.has-open-dropdown {
    z-index: 100;
}

/* Row Status Accent Borders */
.products-table-container tbody tr.row-status-alert {
    border-left-color: #e74c3c;
}

.products-table-container tbody tr.row-status-success {
    border-left-color: #27ae60;
}

.products-table-container tbody tr.row-status-warning {
    border-left-color: #f39c12;
}

.products-table-container tbody tr td {
    display: block;
    padding: 8px 0;
    border: none;
    overflow: visible;
    position: relative;
}

.products-table-container tbody tr td:first-child {
    padding-top: 0;
}

/* Product Card Content */
.product-card-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: visible;
}

@media (max-width: 1200px) {
    .product-card-content {
        flex-direction: column;
        gap: 16px;
    }
    
    .product-info-column,
    .product-price-stock,
    .product-competitors,
    .product-actions {
        flex: 1;
        width: 100%;
    }
}

/* Product Info Column */
.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 2;
    min-width: 0;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

.product-name-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
    display: inline;
}

.product-name-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.product-code {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
}

.product-code:hover {
    color: #667eea;
    text-decoration: underline;
}

.product-created-at {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.product-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.product-tag-more {
    background: var(--hover-bg);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.product-tag-more:hover {
    background: #667eea;
    color: white;
}

.hidden-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Price & Stock Column */
.product-price-stock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.product-ranking {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-our-price-line {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.product-purchase-price-line {
    font-size: 12px;
    color: var(--text-secondary, #666);
    font-weight: 500;
    margin-top: 2px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.product-stock {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    width: fit-content;
}

.product-stock.in-stock {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.product-stock.out-of-stock {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

/* Competitors Column */
.product-competitors {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1.5;
    min-width: 0;
}

.competitors-summary {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.competitors-status {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.competitors-detail-link {
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}

.competitors-detail-link:hover {
    text-decoration: underline;
}

.competitors-detail-link .detail-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.competitors-detail-link.active .detail-arrow {
    transform: rotate(90deg);
}

.competitor-price-sort-btn {
    padding: 8px 16px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.competitor-price-sort-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.competitor-price-sort-btn #competitorPriceSortIcon {
    font-size: 16px;
    font-weight: bold;
}

.competitors-details {
    display: none;
    margin-top: 12px;
    padding: 12px;
    background: var(--hover-bg);
    border-radius: 8px;
    font-size: 13px;
}

.competitors-details.show {
    display: block;
}

/* Ürün kartında satıcı listesi (bizim fiyat + rakipler aynı formatta) */
.product-competitors-list {
    margin: 6px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.product-competitors-list .competitor-item {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
}
.product-competitors-list .competitor-item:last-child {
    border-bottom: none;
}
.product-competitors-list .competitor-item.our-price-row {
    margin: 0;
}

.competitor-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.competitor-item:last-child {
    border-bottom: none;
}

/* Bizim fiyat satırı: rakipler arasında farklı arka plan */
.competitor-item.our-price-row {
    background: rgba(102, 126, 234, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 4px 0;
    border-bottom: none;
}
[data-theme="dark"] .competitor-item.our-price-row {
    background: rgba(102, 126, 234, 0.15);
}

/* Detayları gör: dikey rakip listesi */
.competitors-details-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary, #f8f9fa);
}
.competitors-details-list .competitor-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    gap: 6px;
}
.competitors-details-list .competitor-item:last-child {
    border-bottom: none;
}
.competitors-details-list .competitor-item.our-price-row {
    margin: 0;
}
.competitors-details-list .competitor-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.competitors-details-list .competitor-row-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
}
.competitors-details-list .competitor-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
}
.competitors-details-list .competitor-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}
.competitors-details-list .competitor-row-bottom .competitor-row-price-block {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.competitors-details-list .competitor-row-bottom .competitor-price-updated {
    margin-left: auto;
    flex-shrink: 0;
}
.competitors-details-list .competitor-row-bottom .competitor-price-updated::before {
    content: none;
}
.competitors-details-list .competitor-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.competitor-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.competitor-badge--broken {
    background: var(--color-danger, #dc2626);
    color: white;
}
.competitor-badge--noprice {
    background: var(--text-secondary, #6b7280);
    color: white;
}
.competitors-details-list .marketplace-group {
    gap: 2px;
}
.competitors-details-list .competitor-mp-subrow {
    margin-left: 8px;
    padding: 8px 8px 8px 10px;
    border-left: 3px solid var(--border-color, #e5e7eb);
    background: var(--bg-primary, #fff);
}
.competitors-details-list .competitor-mp-url {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    word-break: break-all;
    line-height: 1.35;
}
.competitor-action-btn--small {
    padding: 4px 8px;
    font-size: 11px;
}

.competitor-name-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.competitor-name {
    font-weight: 500;
    color: var(--text-primary);
}

.competitor-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.competitor-price-row .competitor-price {
    flex-shrink: 0;
}
.competitor-price-updated {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: auto;
    white-space: nowrap;
}
.competitor-price-updated::before {
    content: '· ';
    color: var(--text-secondary);
    margin-right: 2px;
}

.competitor-price {
    font-size: 12px;
    color: var(--text-secondary);
}

.competitor-price-diff {
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}
/* Ucuz = kırmızı (bizden ucuz, dikkat); Pahalı = yeşil (bizden pahalı, iyi) */
.competitor-price-diff--cheaper {
    color: var(--color-danger, #dc2626);
}
.competitor-price-diff--expensive {
    color: var(--color-success, #16a34a);
}

/* Kırık linkte gösterilen son bilinen fiyat (tarih ile, daha küçük) */
.competitor-last-known {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: normal;
}

.competitor-actions {
    display: flex;
    gap: 8px;
}

.competitor-action-btn {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.competitor-action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.competitor-screenshot-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.competitor-screenshot-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Actions Column */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow: visible;
    position: relative;
}

.product-actions-dropdown {
    position: relative;
    z-index: 10001;
}

.product-actions-btn {
    width: 100%;
    padding: 10px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.product-actions-btn:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.product-actions-btn .detail-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.product-actions-btn.active .detail-arrow {
    transform: rotate(90deg);
}

.product-actions-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 10000;
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-actions-menu {
        min-width: 160px;
        font-size: 13px;
    }
    
    .product-actions-menu-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.product-actions-menu.show {
    display: block;
}

.product-actions-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.product-actions-menu-item:hover {
    background: var(--hover-bg);
}

.product-actions-menu-item.danger {
    color: #e74c3c;
}

.product-actions-menu-item.danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Empty State */
.products-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.products-empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.products-empty-state-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.products-empty-state-cta {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.products-empty-state-cta:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Checkbox styling */
.product-checkbox-wrapper {
    flex-shrink: 0;
    padding-top: 4px;
    z-index: 100;
    pointer-events: auto;
}

.product-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    position: relative;
    z-index: 101;
    pointer-events: auto;
    margin: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .products-table-container tbody tr {
    background: var(--bg-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .competitors-details {
    background: var(--bg-primary);
}

[data-theme="dark"] .product-actions-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Bulk actions menu button (filtre barında sağ blokla aynı hizada) */
.bulk-actions-menu-btn {
    height: 40px;
    padding: 0 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    transition: all 0.2s ease;
}

.bulk-actions-menu-btn:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.bulk-actions-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
}

.bulk-actions-icon span {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 1px;
}

/* Products filter: mobil — toolbar column, sağ blok ve butonlar full width */
@media (max-width: 768px) {
    .products-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .products-filter-left {
        width: 100%;
    }
    .products-filter-right {
        width: 100%;
        justify-content: stretch;
        flex-wrap: wrap;
    }
    .products-filter-bar .products-search-wrapper,
    .products-tags-filter-wrapper,
    .products-filter-no-tags,
    .products-filter-queue {
        width: 100%;
        min-width: 0;
    }
    .products-filter-queue-select {
        flex: 1;
        min-width: 0;
    }
    .products-filter-right .products-bulk-codes-btn,
    .products-filter-right .products-action-btn,
    .products-filter-right .bulk-actions-menu {
        width: 100%;
    }
    
    .products-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-card-content {
        grid-template-columns: 1fr;
    }
    
    .product-checkbox-wrapper {
        position: static;
        margin-bottom: 12px;
    }
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #333;
}

/* Dark mode for code elements */
[data-theme="dark"] code {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border: 1px solid var(--border-color);
}

:root {
    --modal-backdrop-z: 2147483000;
    --modal-content-z: 2147483001;
}

.modal-backdrop,
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: var(--modal-backdrop-z) !important;
    display: none;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    color: #333;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px var(--shadow);
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: var(--modal-content-z) !important;
}

/* Inline style ile gelen z-index değerlerini de ez */
#jobLogModal {
    z-index: var(--modal-backdrop-z) !important;
}

#jobLogModal .modal-content {
    z-index: var(--modal-content-z) !important;
}

/* Dark mode for modal content */
[data-theme="dark"] .modal-content {
    background: #2d2d2d !important;
    color: #e0e0e0 !important;
}

[data-theme="dark"] .modal-content h2,
[data-theme="dark"] .modal-content h3,
[data-theme="dark"] .modal-content p,
[data-theme="dark"] .modal-content span,
[data-theme="dark"] .modal-content div,
[data-theme="dark"] .modal-content strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-content small {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .modal-content hr {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-content label {
    color: var(--text-primary) !important;
}

input[type="text"], 
input[type="number"], 
input[type="email"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #3498db;
}

small {
    color: var(--text-secondary);
    font-size: 12px;
    display: block;
    margin-top: 5px;
    transition: color 0.3s ease;
}

.footer-wrapper {
    margin-top: auto;
    width: 100%;
}

footer {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Filter form containers - override inline styles for dark mode */
[data-theme="dark"] .card > div[style*="background: #f8f9fa"],
[data-theme="dark"] .card > div[style*="background:#f8f9fa"],
[data-theme="dark"] div[style*="background: #f8f9fa"],
[data-theme="dark"] div[style*="background:#f8f9fa"] {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Filter form labels in dark mode */
[data-theme="dark"] .card > div[style*="background"] label,
[data-theme="dark"] div[style*="background"] label {
    color: var(--text-primary) !important;
}

/* Filter form inputs in dark mode */
[data-theme="dark"] .card > div[style*="background"] input[type="text"],
[data-theme="dark"] .card > div[style*="background"] input[type="date"],
[data-theme="dark"] .card > div[style*="background"] input[type="number"],
[data-theme="dark"] div[style*="background"] input[type="text"],
[data-theme="dark"] div[style*="background"] input[type="date"],
[data-theme="dark"] div[style*="background"] input[type="number"] {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Products search input in dark mode */
[data-theme="dark"] #products input[type="text"] {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Modal inputs in dark mode - override inline styles */
[data-theme="dark"] .modal-content input[type="text"],
[data-theme="dark"] .modal-content input[type="number"],
[data-theme="dark"] .modal-content input[type="email"],
[data-theme="dark"] .modal-content input[type="password"],
[data-theme="dark"] .modal-content input[type="date"],
[data-theme="dark"] .modal-content select,
[data-theme="dark"] .modal-content textarea {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Override specific inline styles in modal inputs */
[data-theme="dark"] .modal-content input[style*="border: 1px solid #ddd"],
[data-theme="dark"] .modal-content input[style*="border:1px solid #ddd"],
[data-theme="dark"] .modal-content select[style*="border: 1px solid #ddd"],
[data-theme="dark"] .modal-content select[style*="border:1px solid #ddd"] {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-content input[type="text"]::placeholder,
[data-theme="dark"] .modal-content input[type="number"]::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.7;
}

/* Import page dark mode styles */
[data-theme="dark"] #import-tab h2[style*="color: #2c3e50"] {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-theme="dark"] #import-tab h3[style*="color: #2c3e50"] {
    color: #333 !important;
}

[data-theme="dark"] #import-tab p[style*="color: #666"] {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Specific override for the description text in import tab header */
[data-theme="dark"] #import-tab .card > div:first-child p[style*="color: #666"] {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Import tab label (Dosya Seç button) - same color as other text in dark mode */
[data-theme="dark"] #import-tab label[for="excelFile"] {
    color: #333 !important;
}

/* Import tab upload section with #f0f2ff background - dark mode */
[data-theme="dark"] #import-tab div[style*="background: #f0f2ff"],
[data-theme="dark"] #import-tab div[style*="background:#f0f2ff"] {
    background: #f0f2ff !important;
    padding: 40px !important;
    border-radius: 12px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    color: #333 !important;
}

/* Force text color #333 for all text inside #f0f2ff background div in dark mode */
[data-theme="dark"] #import-tab div[style*="background: #f0f2ff"] h3,
[data-theme="dark"] #import-tab div[style*="background:#f0f2ff"] h3,
[data-theme="dark"] #import-tab div[style*="background: #f0f2ff"] p,
[data-theme="dark"] #import-tab div[style*="background:#f0f2ff"] p {
    color: #333 !important;
}

/* Info boxes with #f8f9fa background */
[data-theme="dark"] div[style*="background: #f8f9fa"],
[data-theme="dark"] div[style*="background:#f8f9fa"] {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Warning boxes with #fff3cd background */
[data-theme="dark"] div[style*="background: #fff3cd"],
[data-theme="dark"] div[style*="background:#fff3cd"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #fff3cd"] {
    background: linear-gradient(135deg, #4a3f1f 0%, #5a4f2f 100%) !important;
    border-color: #6a5f3f !important;
}

[data-theme="dark"] div[style*="background: linear-gradient(135deg, #fff3cd"] strong[style*="color: #856404"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #fff3cd"] ul[style*="color: #856404"],
[data-theme="dark"] div[style*="background: linear-gradient(135deg, #fff3cd"] li {
    color: #ffd93d !important;
}

/* Table rows with white background */
[data-theme="dark"] tr[style*="background: white"] {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
}

/* Table rows with #f8f9fa background */
[data-theme="dark"] tr[style*="background: #f8f9fa"],
[data-theme="dark"] tr[style*="background:#f8f9fa"] {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* Table rows with #fff3cd background */
[data-theme="dark"] tr[style*="background: #fff3cd"],
[data-theme="dark"] tr[style*="background:#fff3cd"] {
    background: #4a3f1f !important;
    border-color: #6a5f3f !important;
}

/* Table cells - ensure text is readable */
[data-theme="dark"] #import-tab td,
[data-theme="dark"] #import-tab th {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Code elements in import page */
[data-theme="dark"] #import-tab code {
    background: var(--bg-primary) !important;
    color: #667eea !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
}

/* Table header with #667eea background - keep it visible but darker */
[data-theme="dark"] th[style*="background: #667eea"],
[data-theme="dark"] th[style*="background:#667eea"] {
    background: #4a5a8a !important;
    color: var(--text-inverse) !important;
}

/* Pagination info text (Toplam / Sayfa / Sayfa başına) in dark mode */
[data-theme="dark"] #productsPaginationTop,
[data-theme="dark"] #alertsPaginationTop,
[data-theme="dark"] #historyPaginationTop,
[data-theme="dark"] #logsPaginationTop {
    color: var(--text-inverse) !important;
}

[data-theme="dark"] #productsPaginationTop span,
[data-theme="dark"] #productsPaginationTop label,
[data-theme="dark"] #productsPaginationTop strong,
[data-theme="dark"] #productsPaginationTop div,
[data-theme="dark"] #alertsPaginationTop span,
[data-theme="dark"] #alertsPaginationTop label,
[data-theme="dark"] #alertsPaginationTop strong,
[data-theme="dark"] #alertsPaginationTop div,
[data-theme="dark"] #historyPaginationTop span,
[data-theme="dark"] #historyPaginationTop label,
[data-theme="dark"] #historyPaginationTop strong,
[data-theme="dark"] #historyPaginationTop div,
[data-theme="dark"] #logsPaginationTop span,
[data-theme="dark"] #logsPaginationTop label,
[data-theme="dark"] #logsPaginationTop strong,
[data-theme="dark"] #logsPaginationTop div {
    color: #ffffff !important;
}

/* Pagination select elements in dark mode */
[data-theme="dark"] #productsPaginationTop select,
[data-theme="dark"] #alertsPaginationTop select,
[data-theme="dark"] #historyPaginationTop select,
[data-theme="dark"] #logsPaginationTop select,
[data-theme="dark"] #productsPagination select,
[data-theme="dark"] #alertsPagination select,
[data-theme="dark"] #historyPagination select,
[data-theme="dark"] #logsPagination select {
    color: #ffffff !important;
    background-color: #2d2d2d !important;
}

/* Pagination bottom containers */
[data-theme="dark"] #productsPagination span,
[data-theme="dark"] #productsPagination label,
[data-theme="dark"] #productsPagination strong,
[data-theme="dark"] #productsPagination div,
[data-theme="dark"] #alertsPagination span,
[data-theme="dark"] #alertsPagination label,
[data-theme="dark"] #alertsPagination strong,
[data-theme="dark"] #alertsPagination div,
[data-theme="dark"] #historyPagination span,
[data-theme="dark"] #historyPagination label,
[data-theme="dark"] #historyPagination strong,
[data-theme="dark"] #historyPagination div,
[data-theme="dark"] #logsPagination span,
[data-theme="dark"] #logsPagination label,
[data-theme="dark"] #logsPagination strong,
[data-theme="dark"] #logsPagination div {
    color: #ffffff !important;
}

/* Desktop: Keep filter forms horizontal - MUST come AFTER mobile styles */
@media (min-width: 769px) {
    /* Filter form containers - ensure horizontal layout */
    .card > div[style*="display: flex"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    /* Labels - keep inline, preserve inline margins */
    .card > div[style*="display: flex"] label {
        display: inline !important;
        width: auto !important;
        margin-bottom: 0 !important;
        white-space: nowrap !important;
    }
    
    /* Inputs - preserve inline widths, remove forced full width */
    .card > div[style*="display: flex"] input[type="text"],
    .card > div[style*="display: flex"] input[type="date"],
    .card > div[style*="display: flex"] input[type="number"] {
        width: auto !important;
        min-width: 150px !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* History search input - 100% width */
    #historySearch {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        flex-shrink: 1 !important;
    }
    
    /* Date inputs should have reasonable width */
    #historyStartDate,
    #historyEndDate,
    #alertStartDate,
    #alertEndDate {
        width: auto !important;
        min-width: 150px !important;
    }
    
    /* Buttons - keep inline, preserve padding */
    .card > div[style*="display: flex"] button {
        width: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        padding: 8px 15px !important;
    }
    
    /* Products search - desktop */
    #products .card > div[style*="margin-bottom"] {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
    }
    
    #products input[type="text"] {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    #products button {
        width: auto !important;
        margin-left: 10px !important;
        margin-bottom: 0 !important;
    }
}

/* TourGuide JS Styles */
.tg-backdrop {
    z-index: 999998 !important;
}

.tg-dialog {
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

.tg-dialog h3 {
    color: var(--text-primary) !important;
    margin-bottom: 8px !important;
}

.tg-dialog p {
    color: var(--text-secondary) !important;
}

/* Dark mode için tour stilleri */
[data-theme="dark"] .tg-dialog {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .tg-dialog h3 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .tg-dialog p {
    color: var(--text-secondary) !important;
}

/* Yardım menüsü stilleri */
#helpMenu {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#helpMenu button {
    font-family: inherit;
}

#helpMenu button:hover {
    background: var(--hover-bg) !important;
}

/* Tag filter suggestions - Now using autoComplete.js styles */
/* Old .tag-suggestion-item styles removed - using .auto-complete_result_item instead */

/* Tag filter wrapper */
#productTagsFilterWrapper,
#productEditTagsFilterWrapper,
#productAddTagsFilterWrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--bg-secondary, #ffffff);
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Override autoComplete wrapper styles for tag filter */
#productTagsFilterWrapper .autoComplete_wrapper,
#productEditTagsFilterWrapper .autoComplete_wrapper,
#productAddTagsFilterWrapper .autoComplete_wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative !important;
}

#productTagsFilterWrapper .autoComplete_wrapper > input,
#productEditTagsFilterWrapper .autoComplete_wrapper > input,
#productAddTagsFilterWrapper .autoComplete_wrapper > input {
    flex: 1;
    min-width: 120px;
    height: 100%;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    color: var(--text-primary, #333) !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#productTagsFilterWrapper .autoComplete_wrapper > input::placeholder,
#productEditTagsFilterWrapper .autoComplete_wrapper > input::placeholder,
#productAddTagsFilterWrapper .autoComplete_wrapper > input::placeholder {
    color: var(--text-secondary, #999) !important;
}

#productTagsFilterWrapper .autoComplete_wrapper > input:focus,
#productEditTagsFilterWrapper .autoComplete_wrapper > input:focus,
#productAddTagsFilterWrapper .autoComplete_wrapper > input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Product row refreshing state */
tr.product-refreshing {
    opacity: 0.6 !important;
    pointer-events: none !important;
    position: relative;
}

tr.product-refreshing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.05);
    z-index: 1;
    pointer-events: none;
}

.product-refresh-status {
    color: #667eea;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

[data-theme="dark"] tr.product-refreshing::before {
    background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .product-refresh-status {
    color: #8b9aff;
}

/* Selected tags should be inside the wrapper, before input */
#productTagsFilterWrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#selectedTagsDisplayInline {
    order: -1; /* Show tags before input */
}

#productTagsFilterWrapper:hover,
#productEditTagsFilterWrapper:hover,
#productAddTagsFilterWrapper:hover {
    background: var(--hover-bg, #f8f9fa);
}

#productTagsFilterWrapper:focus-within,
#productEditTagsFilterWrapper:focus-within,
#productAddTagsFilterWrapper:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary, #ffffff);
}

/* Responsive: allow shrinking on smaller screens */
@media (max-width: 768px) {
    #productTagsFilterWrapper {
        flex: 0 1 400px !important;
        width: 100%;
        max-width: 400px;
    }
}

/* Selected tags display - inside input wrapper, on the left */
#selectedTagsDisplayInline,
#productEditSelectedTagsDisplayInline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    order: -1; /* Show tags before input */
}

#selectedTagsDisplayInline::-webkit-scrollbar,
#productEditSelectedTagsDisplayInline::-webkit-scrollbar {
    display: none;
}

/* Input field - takes remaining space */
#productTagsFilter {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    color: var(--text-primary, #333);
    font-size: 14px;
    box-sizing: border-box;
    height: 100%;
}

#productTagsFilter::placeholder {
    color: var(--text-secondary, #999);
}

/* Tag chip styles */
.product-tag-chip {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 400;
    border: 1px solid #e5e7eb;
    line-height: 1.4;
}

.product-tag-chip-remove {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    color: #6b7280;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.product-tag-chip-remove:hover {
    color: #374151;
}

[data-theme="dark"] .product-tag-chip {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}

[data-theme="dark"] .product-tag-chip-remove {
    color: #9ca3af;
}

[data-theme="dark"] .product-tag-chip-remove:hover {
    color: #e5e7eb;
}

/* Toplu etiket modalı: tüm modalda scroll olmasın */
.modal-content:has(.tag-selection-modal-wrapper) {
    overflow-y: visible;
    max-height: none;
}
/* Wrapper overflow: visible olsun ki autoComplete sonuç listesi kesilmesin; scroll sadece chip container'da */
.tag-selection-modal-wrapper {
    flex: 1;
    min-width: 300px;
    overflow: visible;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--bg-secondary, #ffffff);
    padding: 8px 12px;
    min-height: 40px;
    display: flex;
    align-items: flex-start;
    align-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.tag-selection-modal-wrapper:hover {
    background: var(--hover-bg, #f8f9fa);
}
.tag-selection-modal-wrapper:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary, #ffffff);
}
/* Scroll sadece chip container'da; son eklenen görünsün, autoComplete listesi wrapper dışında görünsün */
.tag-selection-modal-wrapper .products-tags-chips {
    order: -1;
    flex-shrink: 0;
    min-height: 0;
    max-height: 72px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    align-content: flex-start;
}
.tag-selection-modal-wrapper .products-tags-chips:empty {
    display: none;
}
/* autoComplete sonuç listesi modal içinde görünsün, kesilmesin */
.tag-selection-modal-wrapper .autoComplete_wrapper {
    position: relative !important;
    overflow: visible !important;
}
.tag-selection-modal-wrapper .autoComplete_wrapper > ul,
.tag-selection-modal-wrapper [id^="tagSelectionDropdown_"] {
    position: absolute !important;
    z-index: 10001 !important;
    opacity: 1 !important;
    transform: none !important;
}
.tag-selection-modal-wrapper .products-tags-input,
.tag-selection-modal-wrapper input[type="text"] {
    flex: 1;
    min-width: 120px;
    min-height: 24px;
    align-self: center;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    color: var(--text-primary, #333) !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.tag-selection-modal-wrapper .products-tags-input::placeholder,
.tag-selection-modal-wrapper input[type="text"]::placeholder {
    color: var(--text-secondary, #999) !important;
}
.tag-selection-modal-wrapper .products-tags-input:focus,
.tag-selection-modal-wrapper input[type="text"]:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}
.tag-selection-modal-hint {
    color: var(--text-secondary, #666) !important;
    font-size: 12px !important;
    display: block;
    margin-top: 8px;
}
[data-theme="dark"] .tag-selection-modal-wrapper {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: #4b5563;
}
[data-theme="dark"] .tag-selection-modal-wrapper:hover {
    background: var(--hover-bg, #374151) !important;
}
[data-theme="dark"] .tag-selection-modal-wrapper:focus-within {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .tag-selection-modal-wrapper .products-tags-input,
[data-theme="dark"] .tag-selection-modal-wrapper input[type="text"] {
    color: var(--text-primary, #e5e7eb) !important;
}
[data-theme="dark"] .tag-selection-modal-wrapper .products-tags-input::placeholder,
[data-theme="dark"] .tag-selection-modal-wrapper input[type="text"]::placeholder {
    color: var(--text-secondary, #999) !important;
}
[data-theme="dark"] .tag-selection-modal-hint {
    color: var(--text-secondary, #999) !important;
}

/* Suggestions dropdown - autoComplete.js styles */
.auto-complete_result {
    position: absolute !important;
    top: calc(100% + 2px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--bg-secondary, #ffffff) !important;
    border: 1px solid var(--border-color, #ddd) !important;
    border-radius: 4px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 10000 !important;
    margin-top: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

/* Fix dropdown positioning for tag filter - should appear below wrapper, not in center */
#productTagsFilterWrapper {
    position: relative !important;
    overflow: visible !important;
}

#productTagsFilterWrapper .autoComplete_wrapper,
#productEditTagsFilterWrapper .autoComplete_wrapper,
#productAddTagsFilterWrapper .autoComplete_wrapper {
    position: relative !important;
    overflow: visible !important;
}

/* Override autoComplete.js default ul positioning - dropdown should be below wrapper */
#productTagsFilterWrapper .autoComplete_wrapper > ul,
#productTagsFilterWrapper .auto-complete_result,
#productTagsFilterWrapper #productTagsFilterSuggestions,
#productEditTagsFilterWrapper .autoComplete_wrapper > ul,
#productEditTagsFilterWrapper .auto-complete_result,
#productEditTagsFilterWrapper #productEditTagsFilterSuggestions,
#productAddTagsFilterWrapper .autoComplete_wrapper > ul,
#productAddTagsFilterWrapper .auto-complete_result,
#productAddTagsFilterWrapper #productAddTagsFilterSuggestions,
#alertTagsFilterWrapper .autoComplete_wrapper > ul,
#alertTagsFilterWrapper .auto-complete_result,
#alertTagsFilterWrapper #alertTagsFilterSuggestions,
#historyTagsFilterWrapper .autoComplete_wrapper > ul,
#historyTagsFilterWrapper .auto-complete_result,
#historyTagsFilterWrapper #historyTagsFilterSuggestions {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin-top: 2px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    z-index: 10000 !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Ensure dropdown is visible when not empty */
#productTagsFilterWrapper .autoComplete_wrapper > ul:not(:empty):not([hidden]),
#productEditTagsFilterWrapper .autoComplete_wrapper > ul:not(:empty):not([hidden]),
#productAddTagsFilterWrapper .autoComplete_wrapper > ul:not(:empty):not([hidden]),
#alertTagsFilterWrapper .autoComplete_wrapper > ul:not(:empty):not([hidden]),
#historyTagsFilterWrapper .autoComplete_wrapper > ul:not(:empty):not([hidden]) {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
}

[data-theme="dark"] .auto-complete_result {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: var(--border-color, #404040) !important;
}

/* Dark mode: Hide autoComplete dropdowns */
[data-theme="dark"] #productTagsFilterWrapper .autoComplete_wrapper > ul,
[data-theme="dark"] #productTagsFilterWrapper .auto-complete_result,
[data-theme="dark"] #productTagsFilterWrapper #productTagsFilterSuggestions,
[data-theme="dark"] #productEditTagsFilterWrapper .autoComplete_wrapper > ul,
[data-theme="dark"] #productEditTagsFilterWrapper .auto-complete_result,
[data-theme="dark"] #productEditTagsFilterWrapper #productEditTagsFilterSuggestions,
[data-theme="dark"] #productAddTagsFilterWrapper .autoComplete_wrapper > ul,
[data-theme="dark"] #productAddTagsFilterWrapper .auto-complete_result,
[data-theme="dark"] #productAddTagsFilterWrapper #productAddTagsFilterSuggestions,
[data-theme="dark"] #alertTagsFilterWrapper .autoComplete_wrapper > ul,
[data-theme="dark"] #alertTagsFilterWrapper .auto-complete_result,
[data-theme="dark"] #alertTagsFilterWrapper #alertTagsFilterSuggestions,
[data-theme="dark"] #historyTagsFilterWrapper .autoComplete_wrapper > ul,
[data-theme="dark"] #historyTagsFilterWrapper .auto-complete_result,
[data-theme="dark"] #historyTagsFilterWrapper #historyTagsFilterSuggestions {
    opacity: 0 !important;
}

.auto-complete_result_item {
    padding: 8px 12px !important;
    cursor: pointer !important;
    border-bottom: 1px solid var(--border-color, #eee) !important;
    transition: background-color 0.2s !important;
    color: var(--text-primary, #333) !important;
}

.auto-complete_result_item:hover,
.auto-complete_result_item_selected {
    background-color: #f0f2ff !important;
}

/* autoComplete.js hover for list items */
.autoComplete_wrapper > ul > li:hover {
    background-color: #f0f2ff !important;
}

/* autoComplete.js mark (highlighted text) color */
.autoComplete_wrapper > ul > li mark {
    color: #667eea !important;
    background: transparent !important;
    font-weight: 600 !important;
}

/* autoComplete.js hover for list items - override default styles */
.autoComplete_wrapper > ul > li:hover {
    background-color: #f0f2ff !important;
    cursor: pointer !important;
}

[data-theme="dark"] .auto-complete_result_item {
    border-bottom-color: var(--border-color, #404040) !important;
    color: var(--text-primary, #e0e0e0) !important;
}

[data-theme="dark"] .auto-complete_result_item:hover,
[data-theme="dark"] .auto-complete_result_item_selected {
    background-color: var(--hover-bg, #3a3a3a) !important;
}

/* Dark mode styles */
[data-theme="dark"] #productTagsFilterWrapper,
[data-theme="dark"] #productEditTagsFilterWrapper,
[data-theme="dark"] #productAddTagsFilterWrapper {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: #4b5563;
}

[data-theme="dark"] #productTagsFilterWrapper:hover,
[data-theme="dark"] #productEditTagsFilterWrapper:hover,
[data-theme="dark"] #productAddTagsFilterWrapper:hover {
    background: var(--hover-bg, #374151) !important;
}

[data-theme="dark"] #productTagsFilterWrapper:focus-within,
[data-theme="dark"] #productEditTagsFilterWrapper:focus-within,
[data-theme="dark"] #productAddTagsFilterWrapper:focus-within {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #productTagsFilter {
    color: var(--text-primary, #e5e7eb) !important;
}

[data-theme="dark"] #productTagsFilter::placeholder {
    color: var(--text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .products-search-input {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .products-search-input:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .products-search-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Dark mode for alerts search input - same as products */
[data-theme="dark"] .alerts-filter-section {
    background: var(--bg-secondary, #25262b);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .alerts-filter-section .alerts-search-input,
[data-theme="dark"] .alerts-filter-section .alerts-tags-input,
[data-theme="dark"] .alerts-filter-section .alerts-status-select,
[data-theme="dark"] .alerts-filter-section .alerts-date-input-inline {
    background: var(--bg-primary, #1e1f23);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .alerts-search-input {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .alerts-search-input:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .alerts-search-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Dark mode for alerts status select */
[data-theme="dark"] .alerts-status-select {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .alerts-status-select:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .alerts-status-select:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Dark mode for alerts date inputs */
[data-theme="dark"] .alerts-date-input-inline {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .alerts-date-input-inline:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .alerts-date-input-inline:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Alerts and History Tag Filters - Same styles as product tags filter */
/* Alert tags filter wrapper - same style as products */
#alertTagsFilterWrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
    box-sizing: border-box;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--bg-secondary, #ffffff);
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Override autoComplete wrapper styles for alert tag filter */
#alertTagsFilterWrapper .autoComplete_wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative !important;
}

#alertTagsFilterWrapper .autoComplete_wrapper > input {
    flex: 1;
    min-width: 120px;
    height: 100%;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    color: var(--text-primary, #333) !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#alertTagsFilterWrapper .autoComplete_wrapper > input::placeholder {
    color: var(--text-secondary, #999) !important;
}

#alertTagsFilterWrapper .autoComplete_wrapper > input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#alertTagsFilterWrapper:hover {
    background: var(--hover-bg, #f8f9fa);
}

#alertTagsFilterWrapper:focus-within {
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary, #ffffff);
}

/* Selected tags display - inside input wrapper, on the left */
#alertSelectedTagsDisplayInline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    order: -1; /* Show tags before input */
}

#alertSelectedTagsDisplayInline::-webkit-scrollbar {
    display: none;
}

/* Input field - takes remaining space */
#alertTagsFilter {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
    color: var(--text-primary, #333);
    font-size: 14px;
    box-sizing: border-box;
    height: 100%;
}

#alertTagsFilter::placeholder {
    color: var(--text-secondary, #999);
}

/* Alert tag chip styles - same as product tag chips */
.alert-tag-chip {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 400;
    border: 1px solid #e5e7eb;
    line-height: 1.4;
}

.alert-tag-chip-remove {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    color: #6b7280;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.alert-tag-chip-remove:hover {
    color: #374151;
}

[data-theme="dark"] .alert-tag-chip {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}

[data-theme="dark"] .alert-tag-chip-remove {
    color: #9ca3af;
}

[data-theme="dark"] .alert-tag-chip-remove:hover {
    color: #e5e7eb;
}

/* Responsive: allow shrinking on smaller screens */
@media (max-width: 768px) {
    #alertTagsFilterWrapper {
        flex: 0 1 400px !important;
        width: 100%;
        max-width: 400px;
    }
}

/* History tags filter wrapper - same as alerts and products (removed old conflicting styles) */

/* Remove alertTagsFilterContainer styles as we're using the same structure as products */
#historyTagsFilterContainer {
    position: relative;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    padding: 4px;
    background: var(--bg-secondary, #ffffff);
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    transition: border-color 0.2s;
    flex-shrink: 1;
}

#alertTagsFilterContainer:focus-within,
#historyTagsFilterContainer:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* History selected tags display - keep old styles for history */
/* Removed old historySelectedTagsDisplayInline styles - using new ones below */

#historyTagsFilter {
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 50%;
    width: auto;
    border: none;
    outline: none;
    padding: 4px;
    background: transparent;
    color: var(--text-primary, #333);
    font-size: 14px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    #alertTagsFilter,
    #historyTagsFilter {
        min-width: 80px;
        max-width: 100%;
        flex: 1 1 auto;
    }
    
    #alertSelectedTagsDisplayInline,
    #historySelectedTagsDisplayInline {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-bottom: 10px;
    }
}

#alertTagsFilterSuggestions,
#historyTagsFilterSuggestions {
    display: none !important;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10001 !important;
    margin-top: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    visibility: visible;
    opacity: 1;
}

#alertTagsFilterSuggestions[style*="block"],
#alertTagsFilterSuggestions.show,
#historyTagsFilterSuggestions[style*="block"],
#historyTagsFilterSuggestions.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tag-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #eee);
    transition: background-color 0.2s;
}

.tag-suggestion-item:hover,
.tag-suggestion-item.selected {
    background-color: var(--bg-hover, #f0f0f0);
}

/* Dark mode for alert tags filter wrapper - same as products */
[data-theme="dark"] #alertTagsFilterWrapper {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: #4b5563 !important;
}

[data-theme="dark"] #alertTagsFilterWrapper:hover {
    background: var(--hover-bg, #374151) !important;
}

[data-theme="dark"] #alertTagsFilterWrapper:focus-within {
    border-color: #6b7280 !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] #alertTagsFilter {
    color: var(--text-primary, #e5e7eb) !important;
}

[data-theme="dark"] #alertTagsFilter::placeholder {
    color: var(--text-secondary, #9ca3af) !important;
}

/* History tags filter container dark mode */
[data-theme="dark"] #historyTagsFilterContainer {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: var(--border-color, #404040);
}

[data-theme="dark"] #historyTagsFilterContainer * {
    background: transparent !important;
}

[data-theme="dark"] #historyTagsFilter {
    color: var(--text-primary, #e0e0e0) !important;
    background: transparent !important;
}

[data-theme="dark"] #alertTagsFilter::placeholder,
[data-theme="dark"] #historyTagsFilter::placeholder {
    color: var(--text-secondary, #666) !important;
}

/* Dark mode for alert selected tags display */
[data-theme="dark"] #alertSelectedTagsDisplayInline {
    background: transparent !important;
}

/* Dark mode for history selected tags display */
[data-theme="dark"] #historySelectedTagsDisplayInline {
    background: transparent !important;
}

[data-theme="dark"] #historySelectedTagsDisplayInline::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] #historySelectedTagsDisplayInline::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] #alertTagsFilterSuggestions,
[data-theme="dark"] #historyTagsFilterSuggestions {
    background: var(--bg-secondary, #2d2d2d) !important;
    border-color: var(--border-color, #404040) !important;
}

[data-theme="dark"] .tag-suggestion-item {
    border-bottom-color: var(--border-color, #404040);
}

[data-theme="dark"] .tag-suggestion-item:hover,
[data-theme="dark"] .tag-suggestion-item.selected {
    background-color: var(--bg-hover, #404040);
}

/* Bulk Actions Menu Dropdown */
.bulk-actions-menu {
    position: relative;
}

.bulk-actions-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-actions-dropdown button {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.bulk-actions-dropdown button:first-child {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.bulk-actions-dropdown button:first-child:hover {
    background: #5568d3;
    border-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.bulk-actions-dropdown button:last-child {
    background: #f39c12;
    color: white;
    border-color: #f39c12;
}

.bulk-actions-dropdown button:last-child:hover {
    background: #e67e22;
    border-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.bulk-actions-dropdown button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .bulk-actions-dropdown {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .bulk-actions-dropdown button {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .bulk-actions-dropdown button:first-child {
    background: #667eea;
    border-color: #667eea;
}

[data-theme="dark"] .bulk-actions-dropdown button:last-child {
    background: #f39c12;
    border-color: #f39c12;
}

/* ============================================
   COMPETITORS SCREEN - REVISED B2B STYLE
   ============================================ */

/* Competitors Info Bar */
.competitors-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.competitors-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competitors-info-main {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.competitors-info-sub {
    font-size: 13px;
    color: var(--text-secondary);
}

.competitors-info-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.competitors-filter-btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid;
    transition: all 0.2s ease;
    font-weight: 500;
    cursor: pointer;
}

/* Secondary button style - matches other pages */
.competitors-filter-btn.btn-secondary {
    background: transparent;
    color: var(--text-primary, #374151);
    border-color: #e5e7eb;
}

.competitors-filter-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #f3f4f6);
    border-color: #d1d5db;
}

[data-theme="dark"] .competitors-filter-btn.btn-secondary {
    background: transparent;
    color: var(--text-primary, #e5e7eb);
    border-color: #4b5563;
}

[data-theme="dark"] .competitors-filter-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #374151);
    border-color: #6b7280;
}

.competitors-filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.competitors-filter-btn.active:hover:not(:disabled) {
    background: #5568d3;
    border-color: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.competitors-add-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
}

/* Competitors Table */
.competitors-table-container {
    margin-top: 16px;
    position: relative;
    overflow: visible !important;
}

.competitors-table-container table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    position: relative;
    overflow: visible !important;
}

.competitors-table-container thead {
    background: var(--bg-secondary);
}

.competitors-table-container thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.competitors-table-container tbody tr.competitor-row {
    background: var(--bg-card);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: visible !important;
}

.competitors-table-container tbody tr.competitor-row:hover {
    background: var(--hover-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.competitors-table-container tbody tr.competitor-row td {
    padding: 16px;
    border: none;
    position: relative;
    overflow: visible !important;
}

.competitors-table-container tbody tr.competitor-row td:last-child {
    overflow: visible !important;
    position: relative;
}

/* When dropdown menu is open, keep row on top */
.competitors-table-container tbody tr.competitor-row.has-open-dropdown {
    z-index: 10007;
    position: relative;
}

.competitors-table-container tbody tr.competitor-row.has-open-dropdown td:last-child {
    z-index: 1001;
    position: relative;
}

.competitors-table-container tbody tr.competitor-row.has-open-dropdown .competitor-actions-dropdown {
    z-index: 10002;
    position: relative;
}

.competitors-table-container tbody tr.competitor-row.has-open-dropdown .competitor-actions-btn {
    z-index: 10003;
    position: relative;
}

.competitors-table-container tbody tr.competitor-row.has-open-dropdown .competitor-actions-menu {
    z-index: 10005;
    position: absolute;
}

.competitors-table-container tbody tr.competitor-details-row td {
    padding: 0;
    border: none;
}

/* Competitor Site Column */
.competitor-site {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competitor-site-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.competitor-site-domain {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Competitor Status Badge */
.competitor-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.competitor-status-badge.status-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.competitor-status-badge.status-warning {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.competitor-status-badge.status-error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.competitor-status-badge.status-inactive {
    background: var(--hover-bg);
    color: var(--text-secondary);
}

/* Scraper Type Badge */
.scraper-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.scraper-type-badge.scraper-generic {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.scraper-type-badge.scraper-custom {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

/* Last Check Time */
.last-check-time {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Competitor Actions Dropdown */
.competitor-actions-dropdown {
    position: relative;
    z-index: 10001;
}

.competitor-actions-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10002;
}

.competitor-actions-btn:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Arrow icon animation when dropdown is open */
.competitor-actions-btn .detail-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 4px;
}

.competitor-actions-btn.active .detail-arrow {
    transform: rotate(90deg);
}

.competitor-actions-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 10004;
    overflow: visible;
}

.competitor-actions-menu.show {
    display: block;
}

.competitor-actions-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.competitor-actions-menu-item:hover {
    background: var(--hover-bg);
}

.competitor-actions-menu-item.danger {
    color: #e74c3c;
}

.competitor-actions-menu-item.danger:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* Competitor Details */
.competitor-details-content {
    padding: 20px;
    background: var(--hover-bg);
    border-radius: 8px;
    margin: 8px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.competitor-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competitor-detail-item strong {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.competitor-detail-item span,
.competitor-detail-item code {
    font-size: 14px;
    color: var(--text-primary);
}

.competitor-detail-item code {
    background: var(--bg-card);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.competitor-detail-item.error {
    grid-column: 1 / -1;
}

.competitor-detail-item.error span {
    color: #e74c3c;
}

/* Empty State */
.competitors-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border-color);
}

.competitors-empty-state-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.competitors-empty-state-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.competitors-empty-state-cta {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.competitors-empty-state-cta:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Dark mode adjustments */
[data-theme="dark"] .competitors-table-container thead {
    background: var(--bg-primary);
}

[data-theme="dark"] .competitor-actions-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .competitors-info-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .competitors-info-right {
        width: 100%;
        flex-direction: column;
    }
    
    .competitors-filter-btn,
    .competitors-add-btn {
        width: 100%;
    }
    
    .competitor-details-content {
        grid-template-columns: 1fr;
    }
}

/* Alerts Filter — enterprise toolbar (ürünler ile aynı yapı) */
.alerts-filter-section {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.alerts-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.alerts-filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.alerts-filter-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.alerts-filter-right .alerts-action-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0 14px;
    vertical-align: middle;
    flex-shrink: 0;
}

.alerts-search-wrapper {
    min-width: 360px;
    position: relative;
}

.alerts-search-wrapper .alerts-search-input {
    width: 100%;
}

.alerts-search-input {
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e5e9;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alerts-search-input:hover {
    border-color: #d1d5db;
}

.alerts-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.alerts-tags-filter-wrapper {
    min-width: 220px;
    position: relative;
}

.alerts-tags-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alerts-tags-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.alerts-tags-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.alerts-status-select {
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e5e9;
    min-width: 140px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alerts-status-select:hover {
    border-color: #d1d5db;
}

.alerts-status-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.alerts-critical-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-secondary, #666);
}

.alerts-critical-toggle input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

.alerts-advanced-filters {
    position: relative;
}

.alerts-advanced-toggle {
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.alerts-advanced-toggle:hover {
    background: var(--hover-bg);
}

.alerts-advanced-content {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 300px;
}

/* Inline date filters - same style as other inputs */
.alerts-date-filters-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 140px;
}

.alerts-date-label-inline {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #666);
    white-space: nowrap;
}

.alerts-date-input-inline {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    min-width: 140px;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.alerts-date-input-inline:hover {
    background: var(--hover-bg, #f8f9fa);
}

.alerts-date-input-inline:focus {
    outline: none;
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
    background: var(--bg-secondary, #ffffff);
}

/* Old date filters (kept for backward compatibility if needed) */
.alerts-date-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alerts-date-filters label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.alerts-date-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.alerts-action-btn {
    padding: 0 14px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

/* Excel Dışa Aktar - Primary button */
.alerts-action-btn.btn-success {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.alerts-action-btn.btn-success:hover:not(:disabled) {
    background: #5568d3;
    border-color: #5568d3;
}

/* Filtreleri Temizle - Secondary/Outline button */
.alerts-action-btn.btn-secondary {
    background: transparent;
    color: var(--text-primary, #374151);
    border-color: #e5e7eb;
}

.alerts-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #f3f4f6);
    border-color: #d1d5db;
}

[data-theme="dark"] .alerts-action-btn.btn-secondary {
    color: var(--text-primary, #e5e7eb);
    border-color: #4b5563;
}

[data-theme="dark"] .alerts-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #374151);
    border-color: #6b7280;
}

/* Bulk Actions Bar */
.alerts-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.alerts-bulk-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.alerts-bulk-buttons {
    display: flex;
    gap: 12px;
}

.alerts-bulk-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Products Bulk Actions Bar */
.products-bulk-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
}

.products-bulk-info {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.products-bulk-buttons {
    display: flex;
    gap: 12px;
}

.products-bulk-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    border: none;
}

.products-bulk-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .products-bulk-actions {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .products-bulk-btn:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Alerts Info Bar */
.alerts-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.alerts-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alerts-info-main {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.alerts-info-sub {
    font-size: 13px;
    color: var(--text-secondary);
}

.alerts-info-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.alerts-page-size-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.alerts-page-size-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.alerts-sort-select-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.alerts-sort-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Alerts Table Container - Card Row Style */
.alerts-table-container {
    margin-top: 16px;
}

.alerts-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Uyarılar: ürün koduna göre gruplanmış liste */
.alerts-grouped-list {
    gap: 20px;
}
.alerts-group-card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.alerts-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--hover-bg, #f8f9fa);
    border-bottom: 1px solid var(--border-color);
}
.alerts-group-title-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.alerts-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.alerts-group-summary {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: normal;
}
.alerts-group-summary .alerts-group-count { display: none; }
.alerts-group-th {
    white-space: nowrap;
}
.alerts-group-th-prices {
    text-align: left;
}
.alert-group-row-date,
.alert-group-row-competitor,
.alert-group-row-prices,
.alert-group-row-diff,
.alert-group-row-links,
.alert-group-row-status {
    min-width: 0;
}
.alert-group-competitor-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}
.alert-group-competitor-link:hover {
    text-decoration: underline;
}
[data-theme="dark"] .alerts-group-table-header {
    background: rgba(255,255,255,0.05);
}
[data-theme="dark"] .alert-group-competitor-link {
    color: #8b9aff;
}
.alerts-group-product-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    text-decoration: none;
}
a.alerts-group-product-name {
    color: #667eea;
}
a.alerts-group-product-name:hover {
    text-decoration: underline;
}
.alerts-group-code {
    font-size: 13px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.05);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-family: ui-monospace, monospace;
}
.alerts-group-code:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}
.alerts-group-count {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.alerts-group-rows {
    display: grid;
    grid-template-columns: 28px 1fr 1.2fr 1.4fr 1fr 1fr auto auto;
    gap: 0 12px;
    align-items: center;
}
.alerts-group-table-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 8px 0;
    background: rgba(0,0,0,0.04);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}
.alert-group-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
}
.alert-group-row:last-child {
    border-bottom: none;
}
.alert-group-row:hover {
    background: var(--hover-bg, #f8f9fa);
}
.alert-group-row.alert-criticality-critical { border-left: 4px solid #e74c3c; padding-left: 6px; padding-right: 12px; }
.alert-group-row.alert-criticality-medium { border-left: 4px solid #f39c12; padding-left: 6px; padding-right: 12px; }
.alert-group-row.alert-criticality-low { border-left: 4px solid #27ae60; padding-left: 6px; padding-right: 12px; }
.alert-group-row-checkbox { display: flex; align-items: center; }
.alert-group-row-date {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}
.alert-group-row-competitor { font-weight: 500; color: var(--text-primary); font-size: 14px; }
.alert-group-competitor-name { font-weight: 500; }
.alert-group-row-prices {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.alert-group-our-price { color: var(--text-primary); }
.alert-group-sep { color: var(--text-secondary); font-size: 12px; }
.alert-group-comp-price { color: var(--text-secondary); }
.alert-group-row-diff {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.alert-group-row-links { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-group-row-links .alert-link { font-size: 12px; }
.alert-group-row-status { font-size: 12px; }
.alert-group-row-actions { flex-shrink: 0; }

[data-theme="dark"] .alerts-group-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}
[data-theme="dark"] .alerts-group-header {
    background: var(--hover-bg);
    border-color: var(--border-color);
}
[data-theme="dark"] .alerts-group-code {
    background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .alerts-group-code:hover {
    background: rgba(102, 126, 234, 0.25);
    color: #8b9aff;
}
[data-theme="dark"] .alert-group-row:hover {
    background: var(--hover-bg);
}

@media (max-width: 900px) {
    .alerts-group-rows {
        grid-template-columns: 28px 1fr 1fr;
    }
    .alerts-group-table-header {
        font-size: 10px;
    }
    .alert-group-row {
        grid-template-rows: auto auto auto auto;
    }
    .alert-group-row-date { grid-column: 2; }
    .alert-group-row-competitor { grid-column: 3; }
    .alert-group-row-prices { grid-column: 2; grid-row: 2; }
    .alert-group-row-diff { grid-column: 3; grid-row: 2; }
    .alert-group-row-links { grid-column: 2; grid-row: 3; }
    .alert-group-row-status { grid-column: 3; grid-row: 3; }
    .alert-group-row-actions { grid-column: 1 / -1; grid-row: 4; justify-self: start; }
}

.alert-card-row {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.alert-card-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Criticality Border */
.alert-card-row.alert-criticality-critical {
    border-left: 4px solid #e74c3c;
}

.alert-card-row.alert-criticality-medium {
    border-left: 4px solid #f39c12;
}

.alert-card-row.alert-criticality-low {
    border-left: 4px solid #27ae60;
}

.alert-card-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    position: relative;
}

.alert-checkbox-wrapper {
    flex-shrink: 0;
    padding-top: 4px;
    z-index: 100;
    pointer-events: auto;
}

.alert-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 100;
    pointer-events: auto;
}

.alert-main-content {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Alert date info - spans full width below status */
.alert-date-info {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.alert-date-label {
    font-weight: 500;
    color: var(--text-secondary, #666);
}

.alert-date-value {
    color: var(--text-primary, #333);
    font-family: 'Courier New', monospace;
}

.alert-product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert-product-name-link {
    font-weight: 600;
    font-size: 15px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.alert-product-name-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.alert-product-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.alert-product-code {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.alert-product-code:hover {
    color: #667eea;
    text-decoration: underline;
}

.alert-competitor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.alert-competitor-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.alert-price-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-price-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-price-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
}

.alert-price-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-price-diff {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.alert-criticality-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.alert-criticality-badge.alert-criticality-critical {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.alert-criticality-badge.alert-criticality-medium {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.alert-criticality-badge.alert-criticality-low {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.alert-diff-percent {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.alert-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.alert-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.alert-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.alert-status-info {
    display: flex;
    align-items: center;
}

.alert-date-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary, #666);
    margin-top: 4px;
}

.alert-date-label {
    font-weight: 500;
    color: var(--text-secondary, #666);
}

.alert-date-value {
    color: var(--text-primary, #333);
    font-family: 'Courier New', monospace;
}

.alert-sent-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

/* Özel tooltip: badge üzerine gelince açıklama */
.alert-sent-badge[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    padding: 8px 12px;
    background: var(--text-primary, #333);
    color: var(--bg-card, #fff);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    white-space: nowrap;
    max-width: 280px;
    white-space: normal;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}
.alert-sent-badge[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    margin-left: -6px;
    bottom: calc(100% + 2px);
    border: 6px solid transparent;
    border-top-color: var(--text-primary, #333);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}
.alert-sent-badge[data-tooltip]:hover::after,
.alert-sent-badge[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}
.alert-sent-badge[data-tooltip]:hover::before {
    transform: translateY(-4px);
}

/* Aynı tooltip stili: index.html'deki Gönderildi/Gönderilmedi badge'leri */
.alert-sent-tooltip[data-tooltip] {
    cursor: pointer;
    position: relative;
}
.alert-sent-tooltip[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(100% + 8px);
    padding: 8px 12px;
    background: var(--text-primary, #333);
    color: var(--bg-card, #fff);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    max-width: 280px;
    white-space: normal;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}
.alert-sent-tooltip[data-tooltip]::before {
    content: '';
    position: absolute;
    left: 50%;
    margin-left: -6px;
    bottom: calc(100% + 2px);
    border: 6px solid transparent;
    border-top-color: var(--text-primary, #333);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}
.alert-sent-tooltip[data-tooltip]:hover::after,
.alert-sent-tooltip[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
}
.alert-sent-tooltip[data-tooltip]:hover::before {
    transform: translateY(-4px);
}

.alert-sent-yes {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.alert-sent-no {
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
}

.alert-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.alert-action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
}

/* Empty State */
.alerts-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.alerts-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.alerts-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.alerts-empty-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1200px) {
    .alert-main-content {
        grid-template-columns: 2fr 1.5fr 2fr 1fr;
    }
    
    .alert-status-info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .alerts-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .alerts-filter-left {
        width: 100%;
    }
    .alerts-filter-right {
        width: 100%;
        justify-content: stretch;
    }
    .alerts-filter-bar .alerts-search-wrapper,
    .alerts-tags-filter-wrapper,
    .alerts-status-select,
    .alerts-date-filters-inline,
    .alerts-critical-toggle {
        width: 100%;
        min-width: 0;
    }
    .alerts-filter-right .alerts-action-btn {
        width: 100%;
    }
    
    .alert-main-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .alert-actions {
        flex-direction: row;
        width: 100%;
    }
    
    .alert-action-btn {
        flex: 1;
    }
}

/* History Filter — enterprise toolbar (ürünler ile aynı yapı) */
.history-filter-section {
    background: #f8f9fb;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.history-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.history-filter-left {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.history-filter-right {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.history-filter-right .history-bulk-codes-btn,
.history-filter-right .history-action-btn {
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin: 0;
    padding: 0 14px;
    vertical-align: middle;
    flex-shrink: 0;
}

.history-search-wrapper {
    min-width: 360px;
    position: relative;
}

.history-search-wrapper .history-search-input {
    width: 100%;
}

.history-search-input {
    height: 40px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #e2e5e9;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-search-input:hover {
    border-color: #d1d5db;
}

.history-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.history-bulk-codes-btn {
    background: #fff;
    color: var(--text-secondary, #555);
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-bulk-codes-btn:hover {
    background: #f1f3f5;
    color: var(--text-primary, #333);
    border-color: #d1d5db;
}

/* History tags filter wrapper — toolbar uyumlu */
#historyTagsFilterWrapper {
    min-width: 220px;
    position: relative;
    box-sizing: border-box;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    background: #fff;
    padding: 0 12px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Override autoComplete wrapper styles for history tag filter */
#historyTagsFilterWrapper .autoComplete_wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative !important;
}

#historyTagsFilterWrapper .autoComplete_wrapper > input {
    flex: 1;
    min-width: 120px;
    height: 100%;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    color: var(--text-primary, #333) !important;
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#historyTagsFilterWrapper .autoComplete_wrapper > input::placeholder {
    color: var(--text-secondary, #999) !important;
}

#historyTagsFilterWrapper .autoComplete_wrapper > input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#historyTagsFilterWrapper:hover {
    border-color: #d1d5db;
}

#historyTagsFilterWrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

/* Selected tags display - inside input wrapper, on the left */
/* Selected tags display - inside input wrapper, on the left */
#historySelectedTagsDisplayInline {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
    order: -1; /* Show tags before input */
}

#historySelectedTagsDisplayInline::-webkit-scrollbar {
    display: none;
}

/* History tag chip styles - same as alert tag chips */
.history-tag-chip {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 400;
    border: 1px solid #e5e7eb;
    line-height: 1.4;
}

.history-tag-chip-remove {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    color: #6b7280;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.history-tag-chip-remove:hover {
    color: #374151;
}

.history-tags-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.history-tags-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.history-date-filters-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
}

.history-date-label-inline {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-date-input-inline {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e5e9;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: var(--text-primary, #333);
    box-sizing: border-box;
    min-width: 140px;
    flex-shrink: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.history-date-input-inline:hover {
    border-color: #d1d5db;
}

.history-date-input-inline:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}

.history-action-btn {
    padding: 0 14px;
    height: 40px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Excel Dışa Aktar - Primary button */
.history-action-btn.btn-success {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.history-action-btn.btn-success:hover:not(:disabled) {
    background: #5568d3;
    border-color: #5568d3;
}

/* Filtreleri Temizle - Secondary/Outline button */
.history-action-btn.btn-secondary {
    background: transparent;
    color: var(--text-primary, #374151);
    border-color: #e5e7eb;
}

.history-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #f3f4f6);
    border-color: #d1d5db;
}

[data-theme="dark"] .history-action-btn.btn-secondary {
    color: var(--text-primary, #e5e7eb);
    border-color: #4b5563;
}

[data-theme="dark"] .history-action-btn.btn-secondary:hover:not(:disabled) {
    background: var(--hover-bg, #374151);
    border-color: #6b7280;
}

/* History Info Bar */
.history-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.history-info-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-info-main {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-info-sub {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-info-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.history-sort-select-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.history-sort-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

.history-page-size-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

.history-page-size-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text-primary);
}

/* History Table Container - Card Row Style */
.history-table-container {
    margin-top: 16px;
}

.history-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Fiyat geçmişi: ürün kodu + rakip bazlı gruplu görünüm */
.history-grouped-list {
    gap: 20px;
}
.history-group-card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.history-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--hover-bg, #f8f9fa);
    border-bottom: 1px solid var(--border-color);
}
.history-group-title-block { display: flex; flex-direction: column; gap: 4px; }
.history-group-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-group-product-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
a.history-group-product-name { color: #667eea; text-decoration: none; }
a.history-group-product-name:hover { text-decoration: underline; }
.history-group-code {
    font-size: 13px; color: var(--text-secondary);
    background: rgba(0,0,0,0.05);
    padding: 4px 8px; border-radius: 6px;
    cursor: pointer; font-family: ui-monospace, monospace;
}
.history-group-code:hover { background: rgba(102, 126, 234, 0.15); color: #667eea; }
.history-group-summary { font-size: 12px; color: var(--text-secondary); }
.history-group-count { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.history-group-rows {
    display: grid;
    grid-template-columns: 140px 1.4fr 1fr 80px 1fr;
    gap: 0 12px;
    align-items: center;
}
.history-group-table-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0,0,0,0.04);
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
}
.history-group-th { white-space: nowrap; }
.history-group-th-prices { text-align: left; }
.history-group-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    min-width: 0;
}
.history-group-row:last-child { border-bottom: none; }
.history-group-row:hover { background: var(--hover-bg, #f8f9fa); }
.history-group-row.history-diff-decrease { border-left: 4px solid #e74c3c; padding-left: 12px; }
.history-group-row.history-diff-increase { border-left: 4px solid #27ae60; padding-left: 12px; }
.history-group-row.history-diff-stable { border-left: 4px solid var(--text-secondary); padding-left: 12px; }
.history-group-row-date { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.history-group-row-prices { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.history-group-our-price { color: var(--text-primary); }
.history-group-sep { color: var(--text-secondary); font-size: 12px; }
.history-group-comp-price { color: var(--text-secondary); }
.history-group-row-diff { font-size: 13px; font-weight: 500; }
.history-group-row-anomaly { font-size: 12px; }
.history-group-row-links { display: flex; gap: 8px; flex-wrap: wrap; }
.history-group-row-links .history-link { font-size: 12px; }
[data-theme="dark"] .history-group-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .history-group-header { background: var(--hover-bg); border-color: var(--border-color); }
[data-theme="dark"] .history-group-code { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .history-group-code:hover { background: rgba(102, 126, 234, 0.25); color: #8b9aff; }
[data-theme="dark"] .history-group-row:hover { background: var(--hover-bg); }

.history-card-row {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.history-card-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.history-card-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    position: relative;
}

.history-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.history-product-name-link {
    font-weight: 600;
    font-size: 15px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.history-product-name-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.history-product-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.history-product-code {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.history-product-code:hover {
    color: #667eea;
    text-decoration: underline;
}

.history-competitor-badge {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.history-price-comparison {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.history-price-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-price-label {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
}

.history-price-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.history-diff-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.history-diff-amount {
    font-size: 16px;
    font-weight: 600;
}

.history-diff-percent {
    font-size: 13px;
    font-weight: 500;
}

.history-anomaly-info {
    display: flex;
    align-items: center;
    min-width: 100px;
}

.history-anomaly-badge {
    padding: 4px 10px;
    background: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: help;
}

.history-anomaly-none {
    font-size: 13px;
    color: var(--text-secondary);
}

.history-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 100px;
}

.history-link {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s ease;
}

.history-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.history-date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 100px;
}

.history-date {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.history-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.history-actions {
    display: flex;
    flex-shrink: 0;
}

.history-action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Empty State */
.history-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.history-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.history-empty-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.history-empty-cta {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-empty-cta:hover {
    background: #5568d3;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 1200px) {
    .history-card-content {
        flex-wrap: wrap;
    }
    
    .history-product-info,
    .history-price-comparison,
    .history-diff-info {
        flex: 1 1 200px;
    }
}

@media (max-width: 768px) {
    .history-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .history-filter-left {
        width: 100%;
    }
    .history-filter-right {
        width: 100%;
        justify-content: stretch;
    }
    .history-filter-bar .history-search-wrapper,
    #historyTagsFilterWrapper,
    .history-date-filters-inline {
        width: 100%;
        min-width: 0;
    }
    .history-filter-right .history-bulk-codes-btn,
    .history-filter-right .history-action-btn {
        width: 100%;
    }
    
    .history-date-filters {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .history-card-content {
        flex-direction: column;
    }
    
    .history-actions {
        width: 100%;
    }
    
    .history-action-btn {
        flex: 1;
    }
}

/* Dark mode */
[data-theme="dark"] .history-filter-section {
    background: var(--bg-secondary, #25262b);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .history-filter-section .history-search-input,
[data-theme="dark"] .history-filter-section .history-date-input-inline,
[data-theme="dark"] .history-filter-section .history-bulk-codes-btn {
    background: var(--bg-primary, #1e1f23);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] #historyTagsFilterWrapper {
    background: var(--bg-primary, #1e1f23);
    border-color: #4b5563;
}

[data-theme="dark"] .history-bulk-codes-btn:hover {
    background: var(--hover-bg, #374151);
    color: var(--text-primary, #e5e7eb);
    border-color: #6b7280;
}

[data-theme="dark"] .history-search-input {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .history-search-input:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .history-search-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .history-date-input-inline {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
    color: var(--text-primary, #e5e7eb);
}

[data-theme="dark"] .history-date-input-inline:hover {
    background: var(--hover-bg, #374151);
}

[data-theme="dark"] .history-date-input-inline:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] #historyTagsFilterWrapper {
    background: var(--bg-secondary, #2d2d2d);
    border-color: #4b5563;
}

[data-theme="dark"] #historyTagsFilterWrapper:hover {
    border-color: #6b7280;
}

[data-theme="dark"] #historyTagsFilterWrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

[data-theme="dark"] .history-tag-chip {
    background: #374151;
    color: #e5e7eb;
    border-color: #4b5563;
}

[data-theme="dark"] .history-tag-chip-remove {
    color: #9ca3af;
}

[data-theme="dark"] .history-tag-chip-remove:hover {
    color: #e5e7eb;
}

[data-theme="dark"] .history-card-row {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .history-card-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ============================================
   SCRAPING LOGS STYLES
   ============================================ */

/* Log Row - Card Style */
.log-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.log-row:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.success {
    background: #27ae60;
    color: white;
}

.status-badge.failed {
    background: #e74c3c;
    color: white;
}

/* Sortable Column */
.sortable-column {
    transition: color 0.2s ease;
}

.sortable-column:hover {
    color: #667eea;
}

/* Log Filter Inputs */
.log-filter-input,
.log-filter-select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.log-filter-input:focus,
.log-filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dark Mode Log Styles */
[data-theme="dark"] .log-row {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .status-badge.success {
    background: #27ae60;
    color: white;
}

[data-theme="dark"] .status-badge.failed {
    background: #e74c3c;
    color: white;
}

/* =========================================================
   Scraping Logları – Stat Widget Styles
   Light + Dark Mode Compatible (B2B Dashboard)
   ========================================================= */

/* Base stat card */
.stat-card {
    background-color: var(--stat-bg);
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid var(--stat-border);
    transition: background-color .2s ease, border-color .2s ease;
    position: relative;
}

/* Title */
.stat-card .stat-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--stat-title);
    margin-bottom: 6px;
}

/* Value */
.stat-card .stat-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--stat-value);
}

/* =========================================================
   Semantic Variants
   ========================================================= */

.stat-card.is-total {
    --stat-accent: var(--neutral-accent);
}

.stat-card.is-success {
    --stat-accent: var(--success-accent);
}

.stat-card.is-failed {
    --stat-accent: var(--danger-accent);
}

.stat-card.is-ratio {
    --stat-accent: var(--primary-accent);
}

.stat-card.is-duration {
    --stat-accent: var(--muted-accent);
}

/* Accent line (left) */
.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 3px;
    background-color: var(--stat-accent);
}

/* =========================================================
   Light Theme Variables
   ========================================================= */

:root {
    --stat-bg: #f9fafb;
    --stat-border: #e5e7eb;

    --stat-title: #6b7280;
    --stat-value: #111827;

    --neutral-accent: #9ca3af;
    --success-accent: #22c55e;
    --danger-accent: #ef4444;
    --primary-accent: #3b82f6;
    --muted-accent: #64748b;
}

/* =========================================================
   Dark Theme Overrides
   ========================================================= */

[data-theme="dark"] {
    --stat-bg: #111827;
    --stat-border: #1f2937;

    --stat-title: #9ca3af;
    --stat-value: #f9fafb;

    --neutral-accent: #6b7280;
    --success-accent: #22c55e;
    --danger-accent: #f87171;
    --primary-accent: #60a5fa;
    --muted-accent: #94a3b8;
}

/* Job log modal - wider for better content display */
#appModal .modal-content:has(#jobLogContent),
#appModal .modal-content > div[style*="width: 900px"] {
    max-width: 95vw !important;
    width: 900px !important;
}

/* Fallback for browsers that don't support :has() */
#appModal .modal-content > div[style*="900px"] {
    max-width: 95vw !important;
    width: 900px !important;
}

/* Ensure job log content doesn't overflow */
#jobLogContent {
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-x: hidden !important;
}

#jobLogContent > div {
    box-sizing: border-box;
    max-width: 100%;
}


