/* =========================================================================
   Pazaryeri Fiyat Monitörü — ortak tasarım sistemi
   Açık/koyu tema, uygulama kabuğu (sidebar + topbar), bileşenler ve
   JS'in ürettiği işaretlemeler için sınıf karşılıkları.
   ========================================================================= */

:root {
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef2f7;
    --border: #e3e8ef;
    --border-strong: #cfd7e3;
    --text: #0f172a;
    --text-2: #334155;
    --muted: #64748b;
    --faint: #94a3b8;

    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-text: #3730a3;
    --on-primary: #ffffff;

    --success: #059669;
    --success-soft: #ecfdf5;
    --success-text: #047857;
    --warning: #d97706;
    --warning-soft: #fffbeb;
    --warning-text: #b45309;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fef2f2;
    --danger-text: #b91c1c;
    --info: #0284c7;
    --info-soft: #f0f9ff;
    --info-text: #0369a1;

    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --sidebar-muted: #64748b;
    --sidebar-hover: rgba(148, 163, 184, .12);
    --sidebar-active: rgba(99, 102, 241, .22);
    --sidebar-active-text: #ffffff;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 12px rgba(15, 23, 42, .04);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, .18);
    --ring: 0 0 0 3px rgba(79, 70, 229, .22);

    --sidebar-w: 248px;
    --topbar-h: 60px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1020; --surface: #121a2b; --surface-2: #172036; --surface-3: #1d2840;
        --border: #24304a; --border-strong: #33415f; --text: #e6ebf5; --text-2: #c3cbdb; --muted: #8b97ad; --faint: #64708a;
        --primary: #6366f1; --primary-hover: #818cf8; --primary-soft: rgba(99,102,241,.16); --primary-text: #a5b4fc;
        --success: #10b981; --success-soft: rgba(16,185,129,.14); --success-text: #6ee7b7;
        --warning: #f59e0b; --warning-soft: rgba(245,158,11,.14); --warning-text: #fcd34d;
        --danger: #ef4444; --danger-hover: #f87171; --danger-soft: rgba(239,68,68,.14); --danger-text: #fca5a5;
        --info: #38bdf8; --info-soft: rgba(56,189,248,.14); --info-text: #7dd3fc;
        --sidebar-bg: #080c18;
        --shadow: 0 1px 3px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0b1020; --surface: #121a2b; --surface-2: #172036; --surface-3: #1d2840;
    --border: #24304a; --border-strong: #33415f; --text: #e6ebf5; --text-2: #c3cbdb; --muted: #8b97ad; --faint: #64708a;
    --primary: #6366f1; --primary-hover: #818cf8; --primary-soft: rgba(99,102,241,.16); --primary-text: #a5b4fc;
    --success: #10b981; --success-soft: rgba(16,185,129,.14); --success-text: #6ee7b7;
    --warning: #f59e0b; --warning-soft: rgba(245,158,11,.14); --warning-text: #fcd34d;
    --danger: #ef4444; --danger-hover: #f87171; --danger-soft: rgba(239,68,68,.14); --danger-text: #fca5a5;
    --info: #38bdf8; --info-soft: rgba(56,189,248,.14); --info-text: #7dd3fc;
    --sidebar-bg: #080c18;
    --shadow: 0 1px 3px rgba(0,0,0,.35); --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
    color-scheme: dark;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; color: var(--text); letter-spacing: -.01em; }
small { color: var(--muted); font-size: 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-primary { color: var(--primary); }

.icon { width: 18px; height: 18px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }

/* ---------- Uygulama kabuğu ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
    background: var(--sidebar-bg); color: var(--sidebar-text);
    display: flex; flex-direction: column; z-index: 40;
    transition: transform .2s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; text-decoration: none; }
.sidebar-brand:hover { text-decoration: none; }
.brand-logo {
    width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.brand-name { font-weight: 700; font-size: 15px; line-height: 1.15; }
.brand-sub { font-size: 11px; color: var(--sidebar-muted); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 10px 12px; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-muted); padding: 0 10px 6px; font-weight: 600; }
.nav-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; margin: 1px 0; border-radius: 8px; border: 0; background: transparent;
    color: var(--sidebar-text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; text-decoration: none;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-active-text); font-weight: 600; }
.nav-item.active .icon { color: #a5b4fc; }
.nav-item .nav-badge { margin-left: auto; font-size: 10.5px; background: rgba(148,163,184,.18); color: var(--sidebar-text); border-radius: 999px; padding: 1px 7px; }
.nav-item .nav-lock { margin-left: auto; opacity: .55; }
.sidebar-footer { border-top: 1px solid rgba(148,163,184,.12); padding: 12px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; border: 0; background: transparent; width: 100%; color: inherit; font: inherit; text-align: left; }
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who-role { font-size: 11.5px; color: var(--sidebar-muted); }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
    background: linear-gradient(135deg, #22d3ee, #6366f1); color: #fff; font-weight: 700; font-size: 12.5px; text-transform: uppercase;
}
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; gap: 12px; padding: 0 24px;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title .crumb { font-size: 12px; color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.menu-toggle { display: none; }
.page { padding: 24px; max-width: 1600px; width: 100%; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-header h2 { font-size: 20px; font-weight: 700; }
.page-header p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.sidebar-backdrop { display: none; }

.user-menu { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.user-menu-btn:hover { background: var(--surface-2); }
.user-menu-btn .avatar { width: 28px; height: 28px; font-size: 11px; }
.user-menu-btn .um-name { font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; z-index: 60;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
    display: none;
}
.dropdown.open { display: block; animation: pop .12s ease-out; }
.dropdown-head { padding: 10px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-head .n { font-weight: 600; }
.dropdown-head .r { font-size: 12px; color: var(--muted); }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; color: var(--text-2); font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; text-decoration: none; }
.dropdown-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Kart ---------- */
.card, .settings-card, .products-section {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 18px;
}
.card-header, .settings-header, .section-header {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.card-title, .settings-title, .settings-header h3, .section-header h2 { font-size: 15.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-subtitle, .settings-subtitle, .settings-header p { color: var(--muted); font-size: 13px; margin: 3px 0 0; max-width: 820px; }
.card-actions, .settings-actions, .button-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.section-title { font-size: 13px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Butonlar ---------- */
.btn, .btn-save, .btn-reset, .btn-test, .btn-test-telegram, .btn-add, .btn-delete, .btn-secondary, .btn-add-category {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid transparent;
    font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
    background: var(--surface); color: var(--text-2); border-color: var(--border-strong);
    transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
    text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible { outline: 0; box-shadow: var(--ring); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn-save, .btn-add, .btn-test { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn-primary:hover, .btn-save:hover, .btn-add:hover, .btn-test:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-secondary, .btn-reset, .btn-test-telegram { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-secondary:hover, .btn-reset:hover, .btn-test-telegram:hover { background: var(--surface-2); color: var(--text); }
.btn-danger, .btn-delete { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover, .btn-delete:hover { background: var(--danger-hover); border-color: var(--danger-hover); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger-text); border-color: transparent; }
.btn-danger-soft:hover { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(1.05); background: var(--success); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(1.05); background: var(--warning); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-close { width: 32px; height: 32px; padding: 0; border-radius: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.btn-close:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Form ---------- */
.settings-grid, .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-group.full-width, .full-width { grid-column: 1 / -1; }
label, .form-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form-hint, .form-group small { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="url"], input[type="number"], input[type="password"], input[type="email"], input[type="search"],
select, textarea, .input, .settings-input, .select {
    width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
    transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
textarea.mono, textarea.code { font-family: var(--mono); font-size: 12.5px; }
select { padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--primary); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; margin: 0; }
.checkbox-row, .check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group > input { flex: 1; }
.input-sm, .toolbar input, .toolbar select { height: 34px; font-size: 13px; }
.toolbar, .comparator-toolbar, .ti-filters, .notification-queue-toolbar {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px;
}
.toolbar > input[type="text"], .toolbar > input[type="search"], .comparator-toolbar > input[type="text"], .ti-filters > input[type="text"] { width: auto; flex: 1 1 220px; min-width: 180px; max-width: 360px; height: 34px; }
.toolbar > select, .comparator-toolbar > select, .ti-filters > select, .notification-queue-toolbar > select { width: auto; height: 34px; font-size: 13px; }
.ti-filters label, .toolbar label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12.5px; color: var(--text-2); }
.ti-filters input[type="number"] { width: 72px; height: 34px; }
.toolbar .spacer { flex: 1; }
.search-input { position: relative; flex: 1 1 240px; max-width: 380px; }
.search-input .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; }
.search-input input { padding-left: 34px; height: 34px; }
fieldset.edit-scope { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Anahtar (switch) */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; cursor: pointer; background: var(--border-strong); border-radius: 999px; transition: .18s; }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.mini-switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.mini-switch input { opacity: 0; width: 0; height: 0; }
.mini-slider { position: absolute; inset: 0; cursor: pointer; background: var(--border-strong); border-radius: 999px; transition: .18s; }
.mini-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .18s; }
.mini-switch input:checked + .mini-slider { background: var(--success); }
.mini-switch input:checked + .mini-slider::before { transform: translateX(14px); }

/* ---------- Tablo ---------- */
.table-wrap, .table-wrapper, .table-container, #notificationQueueList, #scrapesContainer, #failedPagesContainer {
    overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.table-wrap.scroll { max-height: 70vh; overflow-y: auto; }
table.table, .notification-queue-table, .data-table, .products-table, .ti-table, .ti-summary, .kv-table, .scrape-table {
    width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px;
}
.table th, .notification-queue-table th, .data-table th, .products-table th, .ti-table th, .ti-summary th, .scrape-table th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
    text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td, .notification-queue-table td, .data-table td, .products-table td, .ti-table td, .ti-summary td, .scrape-table td {
    padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2);
}
.table tr:last-child td, .notification-queue-table tr:last-child td, .data-table tr:last-child td, .products-table tr:last-child td,
.ti-table tr:last-child td, .ti-summary tr:last-child td, .scrape-table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td, .notification-queue-table tbody tr:hover td, .data-table tbody tr:hover td, .products-table tbody tr:hover td,
.ti-table tbody tr:hover td, .scrape-table tbody tr:hover td { background: var(--surface-2); }
.table td.num, .table th.num, .ti-num, .scrape-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.scrape-table .center { text-align: center; }
.row-actions, .comparator-actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.empty, .notification-queue-empty, .empty-state, .ti-empty {
    padding: 36px 16px; text-align: center; color: var(--muted); font-size: 13.5px;
}
.table-empty-cell { padding: 36px 16px !important; text-align: center; color: var(--muted) !important; }
.kv-table td { padding: 9px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv-table td:first-child { color: var(--muted); font-weight: 600; width: 34%; padding-right: 12px; }
.kv-table tr:last-child td { border-bottom: 0; }

.pagination, .comparator-pagination, .pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; font-size: 13px; }
.pagination button {
    min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer;
}
.pagination button:hover { background: var(--surface-2); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .dots { color: var(--faint); padding: 0 4px; }
.comparator-pagination-info, .pager-info { color: var(--muted); min-width: 160px; text-align: center; }

/* ---------- Rozetler ---------- */
.badge, .queue-badge, .serper-badge, .status-badge, .pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; line-height: 1.6; white-space: nowrap;
    background: var(--surface-3); color: var(--text-2);
}
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-success, .queue-badge.sent, .serper-badge.active, .status-active { background: var(--success-soft); color: var(--success-text); }
.badge-warning, .queue-badge.processing { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger, .queue-badge.failed, .serper-badge.inactive, .status-inactive { background: var(--danger-soft); color: var(--danger-text); }
.badge-info, .queue-badge.pending { background: var(--info-soft); color: var(--info-text); }
.queue-badge.skipped, .badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.comparator-reason { max-width: 320px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.comparator-price-cell { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; color: var(--text); }

/* ---------- Bilgi satırı / istatistik ---------- */
.info-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.info-label { color: var(--muted); font-weight: 600; }
.stats-row, .kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-item, .kpi {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat-label, .kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value, .kpi-value { font-size: 24px; font-weight: 700; color: var(--text); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-item .stat-value#lastAutoMaxPages { font-size: 14px; font-weight: 600; }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Bildirim (alert) ---------- */
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.callout .icon { margin-top: 1px; }
.callout-info { background: var(--info-soft); border-color: transparent; color: var(--info-text); }
.callout-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning-text); }
.callout-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.callout-success { background: var(--success-soft); border-color: transparent; color: var(--success-text); }
.readonly-banner { display: none; margin-bottom: 14px; }
.tab-content.readonly .readonly-banner { display: flex; }
.tab-content.readonly .edit-only, .readonly-scope .edit-only { display: none !important; }

/* ---------- Toast ---------- */
.toast-area { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
    display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    font-size: 13.5px; animation: toastIn .18s ease-out; white-space: pre-line; word-break: break-word;
}
.toast .t-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.toast.success .t-icon { background: var(--success-soft); color: var(--success); }
.toast.error .t-icon { background: var(--danger-soft); color: var(--danger); }
.toast.warning .t-icon { background: var(--warning-soft); color: var(--warning); }
.toast.info .t-icon { background: var(--info-soft); color: var(--info); }
.toast .t-body { flex: 1; min-width: 0; }
.toast .t-title { font-weight: 650; margin-bottom: 2px; }
.toast .t-time { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.toast .t-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.toast.leaving { animation: toastOut .18s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal ---------- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 900; padding: 24px;
    background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    align-items: center; justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg);
    width: 100%; max-width: 640px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden;
    animation: pop .14s ease-out; position: relative;
}
.modal-content.wide { max-width: 980px; }
.modal-content.narrow { max-width: 440px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; font-weight: 650; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.close-btn { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; cursor: pointer; font-size: 22px; color: var(--muted); z-index: 2; }
.close-btn:hover { background: var(--surface-3); color: var(--text); }

/* ---------- Sekme içerikleri ---------- */
.tab-content { display: none; animation: fadeIn .15s ease-out; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 10px; margin-bottom: 16px; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Pazaryerleri ---------- */
.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; align-items: start; }
fieldset.edit-scope > .marketplace-grid { margin: 0; }
.marketplace-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.marketplace-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; cursor: pointer; user-select: none; }
.marketplace-header:hover { background: var(--surface-2); }
.marketplace-header h3 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.marketplace-header h3::before { content: ''; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.marketplace-card.expanded .marketplace-header h3::before { transform: rotate(45deg); }
.marketplace-header h3 small { color: var(--muted); font-weight: 500; font-size: 12px; }
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.marketplace-card.collapsed .marketplace-body { display: none; }
.marketplace-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.marketplace-info { padding: 12px 0; }
.number-input { width: 90px !important; height: 32px !important; }
.url-section { margin-top: 4px; }
.url-label { display: block; margin-bottom: 8px; }
.categories-container { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.store-accordion { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.store-accordion > summary { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 13px; list-style: none; }
.store-accordion > summary::-webkit-details-marker { display: none; }
.store-accordion-count, .group-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.group-label { text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; display: block; }
.store-categories { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.store-categories[data-store-group="__general__"] { padding: 4px 0; }
.category-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.category-header { display: flex; align-items: center; gap: 8px; }
.category-header .category-name-input { flex: 1; height: 32px; font-weight: 600; }
.category-url-input { height: 32px; font-family: var(--mono); font-size: 12px; }
.category-product-input { height: 30px; font-size: 12px; }
.category-meta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.category-meta-row:empty { display: none; }
.category-meta-pill { font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.category-footer { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.category-pages-input { width: 76px !important; height: 30px !important; }
.category-call-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; color: var(--text-2); cursor: pointer; }
.btn-remove-category { width: 32px; height: 32px; border-radius: 8px; border: 1px solid transparent; background: var(--danger-soft); color: var(--danger-text); cursor: pointer; display: grid; place-items: center; font-size: 14px; }
.btn-remove-category:hover { background: var(--danger); color: #fff; }
.btn-calculate-pages { margin-left: auto; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-calculate-pages:hover { background: var(--surface-2); }
.btn-calculate-pages.calculating { opacity: .7; cursor: progress; }
.btn-calculate-pages.limit-warning { background: var(--danger); color: #fff; border-color: var(--danger); animation: blink .5s 6 alternate; }
@keyframes blink { to { opacity: .55; } }
.btn-add-category { width: 100%; margin-top: 10px; border-style: dashed; color: var(--primary); background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-add-category:hover { background: var(--primary); color: #fff; }
.marketplace-body > .button-group { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.url-export-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 16px; max-height: 320px; overflow-y: auto; font-size: 12.5px; }
.url-export-item { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.url-export-item a { font-family: var(--mono); font-size: 11.5px; word-break: break-all; }
.category-add-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.category-add-form input { flex: 1 1 220px; width: auto; }

/* ---------- Canlı döngüler ---------- */
.cycle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cycle-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.cycle-card .cc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.cycle-card .cc-name { font-weight: 700; font-size: 14px; text-transform: capitalize; }
.cycle-card .cc-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; font-size: 12.5px; }
.cycle-card .cc-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cycle-card .cc-v { font-weight: 600; color: var(--text); }
.progress { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--primary); transition: width .3s; }
.progress-meta { text-align: right; font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }
.status-text { font-weight: 600; white-space: nowrap; }
.status-running { color: var(--info); }
.status-ok { color: var(--success); }
.status-partial { color: var(--warning); }
.status-fail { color: var(--danger); }
.status-done { color: var(--muted); }
.err-chip { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--danger-soft); color: var(--danger-text); font-size: 11px; font-weight: 600; }
.err-msg { font-size: 11.5px; color: var(--muted); margin-top: 3px; max-width: 420px; }

/* ---------- Proxy ---------- */
.proxy-test-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.proxy-test-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proxy-test-header h3 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.proxy-status { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.proxy-status.testing { background: var(--warning-soft); color: var(--warning-text); }
.proxy-status.success { background: var(--success-soft); color: var(--success-text); }
.proxy-status.error { background: var(--danger-soft); color: var(--danger-text); }
.proxy-info-item { display: flex; gap: 8px; font-size: 12.5px; }
.proxy-label { color: var(--muted); font-weight: 600; }
.proxy-value { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--text-2); }
.proxy-result { font-size: 12.5px; display: none; padding: 10px 12px; border-radius: var(--radius); line-height: 1.7; }
.proxy-result.success { display: block; background: var(--success-soft); color: var(--success-text); }
.proxy-result.error { display: block; background: var(--danger-soft); color: var(--danger-text); }
.metric-card { border-radius: var(--radius-lg); padding: 18px; color: #fff; position: relative; overflow: hidden; }
.metric-card.m-primary { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.metric-card.m-failback { background: linear-gradient(135deg, #ea580c, #f59e0b); }
.metric-card.m-total { background: linear-gradient(135deg, #0f766e, #0891b2); }
.metric-card .m-title { font-size: 13px; opacity: .9; font-weight: 600; }
.metric-card .m-value { font-size: 30px; font-weight: 750; margin: 6px 0 12px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.metric-card .m-value small { font-size: 14px; color: rgba(255,255,255,.8); font-weight: 600; }
.metric-card .m-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 12px; }
.metric-card .m-split strong { display: block; font-size: 18px; }
.metric-card .m-rows { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.22); font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.metric-card .m-rows div { display: flex; justify-content: space-between; }
.metric-card .m-bar { height: 6px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.metric-card .m-bar > div { height: 100%; background: #a7f3d0; width: 0; transition: width .3s; }
.diag-panel { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; font-size: 12.5px; }
.diag-grid span { color: var(--muted); }
#proxyDiagHealth { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.inline-setting { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.inline-setting input[type="number"] { width: 64px; height: 28px; padding: 0 6px; text-align: center; }

/* ---------- Serper ---------- */
.serper-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.serper-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.serper-stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.serper-stat-value { font-size: 20px; font-weight: 700; margin-top: 2px; }
#serperLastTest { font-size: 13px; }
.serper-key-form { display: flex; gap: 8px; margin-bottom: 14px; }
.serper-key-form input { flex: 1; font-family: var(--mono); }
.serper-key-mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Etiket kontrolü ---------- */
.ti-progress { font-size: 13px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.ti-progress:empty { display: none; }
.ti-section-title { font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 22px 0 10px; }
.ti-row { cursor: pointer; }
.ti-row.selected td { background: var(--primary-soft) !important; }
.ti-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.ti-missing { background: var(--danger-soft); color: var(--danger-text); }
.ti-partial, .ti-todo { background: var(--warning-soft); color: var(--warning-text); }
.ti-integrated, .ti-handled { background: var(--success-soft); color: var(--success-text); }
.ti-ignored { background: var(--surface-3); color: var(--muted); }
.ti-eff-price { background: var(--danger-soft); color: var(--danger-text); }
.ti-eff-price_cond { background: var(--warning-soft); color: var(--warning-text); }
.ti-eff-info { background: var(--info-soft); color: var(--info-text); }
.ti-eff-noise { background: var(--surface-3); color: var(--muted); }
.ti-unverified { background: var(--primary-soft); color: var(--primary-text); }
.ti-src { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ti-ctx { font-size: 11.5px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.ti-crit { color: var(--danger); font-weight: 650; }
.ti-img { max-width: 120px; max-height: 60px; border-radius: 6px; border: 1px solid var(--border); cursor: zoom-in; background: #fff; }
.ti-small-btn { margin-top: 4px; font: inherit; font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.ti-note { height: 28px !important; font-size: 11.5px !important; padding: 0 8px !important; min-width: 140px; }
.ti-table select { height: 28px; font-size: 11.5px; padding: 0 26px 0 8px; background-position: right 7px center; }
.ti-chip { display: inline-block; margin: 2px 3px 2px 0; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; border: 1px solid var(--border); }
.ti-chip.ok { background: var(--success-soft); color: var(--success-text); border-color: transparent; }
.ti-chip.bad { background: var(--danger-soft); color: var(--danger-text); border-color: transparent; }
.ti-chip.price { font-weight: 700; }
.ti-out { font-size: 12px; color: var(--text-2); margin-bottom: 3px; }
.ti-html { font-family: var(--mono); font-size: 11px; white-space: pre-wrap; word-break: break-all; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px; max-height: 260px; overflow: auto; margin-top: 4px; }
.ti-unparsed-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }

/* ---------- Ana sayfa (genel bakış) ---------- */
.system-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
.sys-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow-sm); min-width: 0; }
.sys-tile .label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sys-tile strong { display: block; font-size: 14px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s, border-color .12s; position: relative;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.stat-card.selected { border-color: var(--primary); box-shadow: var(--ring); }
.stat-card h3 { font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-card .stat-count { font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.stat-card .stat-update { font-size: 12px; color: var(--muted); display: inline-flex; gap: 4px; margin-right: 10px; }
.stat-card .stat-update b { color: var(--text-2); font-weight: 600; }
.stat-card.scraping::after { content: 'Taranıyor'; position: absolute; top: 12px; right: 12px; font-size: 10.5px; font-weight: 700; color: var(--info-text); background: var(--info-soft); border-radius: 999px; padding: 1px 8px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.filters-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters-bar select, .filters-bar input { width: auto; height: 36px; }
.filters-bar #filterName { flex: 1 1 220px; min-width: 180px; }
.filters-bar #filterMin, .filters-bar #filterMax { width: 120px; }
.products-table th.sortable, .products-table th.sorted-asc, .products-table th.sorted-desc { cursor: pointer; user-select: none; }
.products-table th.sortable:hover { color: var(--text); }
.products-table th.sorted-asc::after { content: ' ▲'; color: var(--primary); }
.products-table th.sorted-desc::after { content: ' ▼'; color: var(--primary); }
.products-table tr.row-muted td { background: var(--danger-soft); }
.product-name { font-weight: 600; color: var(--text); display: block; max-width: 460px; }
.product-name:hover { color: var(--primary); }
.product-actions { margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.detail-btn { font: inherit; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.detail-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.price { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.change-positive { color: var(--danger); font-weight: 600; white-space: nowrap; }
.change-negative { color: var(--success); font-weight: 600; white-space: nowrap; }
.change-flat { color: var(--muted); white-space: nowrap; }
.cmp-akakce { color: #ea580c; font-weight: 600; }
.cmp-cimri { color: var(--success); font-weight: 600; }
.cmp-cheap { color: var(--success); font-weight: 600; }
.cmp-exp { color: var(--danger); font-weight: 600; }
.cmp-flat { color: var(--muted); font-weight: 600; }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stock-check-form { display: flex; gap: 8px; margin-bottom: 12px; }
.stock-check-form input { flex: 1; }
.stock-result-box { padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.stock-result-box.success { background: var(--success-soft); border-color: transparent; color: var(--text); }
.stock-result-box.error { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 4px; }
.stock-grid .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stock-grid .v { font-weight: 700; font-size: 15px; }
.trendyol-stock-check.collapsed { display: none; }
.product-detail-head { padding-right: 40px; }
.product-detail-head h2 { font-size: 17px; line-height: 1.35; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 16px 0; }
.detail-grid .d { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }
.detail-grid .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.detail-grid .v { font-weight: 650; margin-top: 2px; word-break: break-word; }
.time-filters { display: flex; gap: 4px; padding: 3px; background: var(--surface-3); border-radius: 10px; width: max-content; margin: 8px 0 12px; }
.time-filter-btn { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.time-filter-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.chart-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 16px 10px; background: var(--surface); }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-title { font-weight: 700; font-size: 15px; }
.chart-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.chart-head .time-filters { margin: 0; }
.chart-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0 10px; }
.chart-stats .cs { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.chart-stats .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chart-stats .v { font-size: 17px; font-weight: 750; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-stats .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.chart-stats .down, .chart-tip em.down { color: var(--success); }
.chart-stats .up, .chart-tip em.up { color: var(--danger); }
.chart-legend { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.chart-legend .lg:first-child { cursor: default; }
.chart-legend .lg b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-legend .lg.off { opacity: .45; }
.chart-legend .lg.off b { text-decoration: line-through; }
.chart-legend .lg i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }
.chart-legend .lg i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
.chart-container { position: relative; height: 320px; }
.chart-tip { position: absolute; pointer-events: none; opacity: 0; transition: opacity .12s, left .08s, top .08s; z-index: 5; min-width: 170px;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 9px 11px; font-size: 12px; }
.chart-tip .tip-date { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.chart-tip .tip-price { font-size: 16px; font-weight: 750; margin: 1px 0 2px; font-variant-numeric: tabular-nums; }
.chart-tip .tip-refs { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.chart-tip .tip-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.chart-tip .tip-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart-tip .tip-row i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chart-tip .tip-row b { font-variant-numeric: tabular-nums; }
.chart-tip .tip-row em { font-style: normal; font-weight: 700; min-width: 48px; text-align: right; }
@media (max-width: 560px) { .chart-container { height: 260px; } .chart-card { padding: 12px 10px 6px; } }

/* ---------- Kullanıcılar ---------- */
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.user-cell .uc-name { font-weight: 650; color: var(--text); }
.user-cell .uc-sub { font-size: 12px; color: var(--muted); }
.perm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.perm-matrix th, .perm-matrix td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.perm-matrix th { background: var(--surface-2); color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.perm-matrix tr:last-child td { border-bottom: 0; }
.perm-matrix .pm-group td { background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 12px; }
.perm-matrix .pm-desc { font-size: 11.5px; color: var(--muted); }
.perm-levels { display: inline-flex; background: var(--surface-3); border-radius: 8px; padding: 2px; gap: 2px; }
.perm-levels label { margin: 0; cursor: pointer; }
.perm-levels input { display: none; }
.perm-levels span { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.perm-levels input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.perm-levels input:checked + span.lv-none { color: var(--muted); }
.perm-levels input:checked + span.lv-view { color: var(--info-text); }
.perm-levels input:checked + span.lv-edit { color: var(--success-text); }
.perm-levels input:disabled + span { cursor: not-allowed; opacity: .6; }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.role-card { position: relative; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; background: var(--surface); margin: 0; font-weight: 400; }
.role-card input { position: absolute; opacity: 0; }
.role-card .rc-title { font-weight: 700; color: var(--text); font-size: 13.5px; }
.role-card .rc-desc { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.role-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.role-card:has(input:disabled) { cursor: not-allowed; opacity: .6; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; }
.perm-chip { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); color: var(--muted); font-weight: 600; white-space: nowrap; }
.perm-chip.view { background: var(--info-soft); color: var(--info-text); }
.perm-chip.edit { background: var(--success-soft); color: var(--success-text); }
.audit-action { font-family: var(--mono); font-size: 12px; }
.pw-meter { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.pw-meter > span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------- Giriş sayfası ---------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-hero {
    position: relative; overflow: hidden; color: #e2e8f0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(1200px 600px at -10% -10%, rgba(99,102,241,.45), transparent 60%),
                radial-gradient(900px 500px at 110% 110%, rgba(34,211,238,.28), transparent 60%), #0b1020;
}
.auth-hero h1 { color: #fff; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; max-width: 460px; }
.auth-hero p { color: #94a3b8; max-width: 440px; font-size: 15px; }
.auth-features { display: grid; gap: 14px; max-width: 440px; }
.auth-feature { display: flex; gap: 12px; align-items: flex-start; }
.auth-feature .af-icon { width: 34px; height: 34px; border-radius: 9px; background: rgba(148,163,184,.12); display: grid; place-items: center; color: #a5b4fc; flex: 0 0 auto; }
.auth-feature b { color: #fff; display: block; font-size: 14px; }
.auth-feature span { color: #94a3b8; font-size: 13px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; letter-spacing: -.02em; }
.auth-card .sub { color: var(--muted); margin: 6px 0 24px; }
.auth-card .form-group { margin-bottom: 14px; }
.auth-card input[type="text"], .auth-card input[type="password"] { height: 44px; font-size: 14.5px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { background: var(--surface-3); color: var(--text); }
.auth-row { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 18px; }
.auth-foot { margin-top: 28px; font-size: 12px; color: var(--faint); text-align: center; }
.auth-error { display: none; margin-bottom: 14px; }
.auth-error.show { display: flex; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1080px) {
    .marketplace-grid { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
    .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 35; }
    .main { margin-left: 0; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: 0 16px; }
    .page { padding: 16px; }
    .user-menu-btn .um-name { display: none; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
}
@media (max-width: 560px) {
    .card, .settings-card, .products-section { padding: 16px; border-radius: 12px; }
    .stats-row, .kpi-grid { grid-template-columns: 1fr 1fr; }
    .stat-value, .kpi-value { font-size: 20px; }
    .modal { padding: 10px; }
    .toast-area { right: 12px; left: 12px; bottom: 12px; max-width: none; }
    .serper-key-form, .stock-check-form { flex-direction: column; }
    /* Kullanıcılar & Yetkiler */
    #usersSegment { display: flex; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
    #usersSegment::-webkit-scrollbar { display: none; }
    #usersSegment button { flex: 0 0 auto; white-space: nowrap; padding: 7px 11px; }
    #tab-users .settings-header { flex-direction: column; align-items: stretch; }
    #tab-users .settings-actions .btn { flex: 1 1 auto; justify-content: center; }
    #tab-users .toolbar > input, #tab-users .toolbar > select, #tab-users .toolbar .search-input { width: 100%; max-width: none; flex: 1 1 100%; }
    #tab-users .table-wrap table { min-width: 640px; }
    #rolesMatrix .perm-matrix { min-width: 560px; }
    .user-cell { min-width: 160px; }
    .perm-chips { max-width: 300px; }
    .perm-matrix th, .perm-matrix td { padding: 8px; }
    .perm-levels span { padding: 4px 8px; }
    .modal-content { max-height: calc(100vh - 20px); border-radius: 12px; }
    .modal-header, .modal-footer { padding: 12px 14px; }
    .modal-body { padding: 14px; }
    .modal-footer { flex-wrap: wrap; }
    .modal-footer .btn { flex: 1 1 auto; justify-content: center; }
    .form-grid, .settings-grid { grid-template-columns: 1fr; }
    .role-cards { grid-template-columns: 1fr 1fr; }
}

/* ---------- Telegram bildirim kartları (eşik bantları: low < eşik ≤ mid < +5 ≤ high < +10 ≤ hot) ---------- */
:root {
    --band-low: #64748b;  --band-low-soft: #f1f5f9;
    --band-mid: #d97706;  --band-mid-soft: #fffbeb;
    --band-high: #ea580c; --band-high-soft: #fff7ed;
    --band-hot: #dc2626;  --band-hot-soft: #fef2f2;
    --band-info: #4f46e5; --band-info-soft: #eef2ff;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --band-low: #94a3b8;  --band-low-soft: rgba(148,163,184,.12);
        --band-mid: #fbbf24;  --band-mid-soft: rgba(251,191,36,.12);
        --band-high: #fb923c; --band-high-soft: rgba(251,146,60,.14);
        --band-hot: #f87171;  --band-hot-soft: rgba(248,113,113,.15);
        --band-info: #818cf8; --band-info-soft: rgba(129,140,248,.14);
    }
}
:root[data-theme="dark"] {
    --band-low: #94a3b8;  --band-low-soft: rgba(148,163,184,.12);
    --band-mid: #fbbf24;  --band-mid-soft: rgba(251,191,36,.12);
    --band-high: #fb923c; --band-high-soft: rgba(251,146,60,.14);
    --band-hot: #f87171;  --band-hot-soft: rgba(248,113,113,.15);
    --band-info: #818cf8; --band-info-soft: rgba(129,140,248,.14);
}
.band-low { --bc: var(--band-low); --bs: var(--band-low-soft); }
.band-mid { --bc: var(--band-mid); --bs: var(--band-mid-soft); }
.band-high { --bc: var(--band-high); --bs: var(--band-high-soft); }
.band-hot { --bc: var(--band-hot); --bs: var(--band-hot-soft); }
.band-info { --bc: var(--band-info); --bs: var(--band-info-soft); }

.notif-stack { position: fixed; top: calc(var(--topbar-h) + 12px); right: 20px; z-index: 950; display: flex; flex-direction: column; gap: 12px; width: min(440px, calc(100vw - 32px)); }
.notif-card {
    position: relative; display: flex; overflow: hidden; cursor: pointer;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--shadow-lg); animation: ncIn .22s cubic-bezier(.2,.8,.2,1);
}
.notif-card:hover { border-color: var(--bc); }
.notif-card:focus-visible { outline: 0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 35%, transparent), var(--shadow-lg); }
.notif-card.band-hot { box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 40%, transparent), 0 14px 40px color-mix(in srgb, var(--bc) 30%, transparent); }
.notif-card.leaving { animation: ncOut .2s ease-in forwards; }
.nc-stripe { width: 5px; flex: 0 0 auto; background: var(--bc); }
.nc-body { flex: 1; min-width: 0; padding: 12px 14px 14px; }
.nc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nc-band { font-size: 12px; font-weight: 700; color: var(--bc); background: var(--bs); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.nc-mp { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-time { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.nc-close { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; border-radius: 6px; }
.nc-close:hover { color: var(--text); background: var(--surface-3); }
.nc-title { font-size: 14.5px; font-weight: 650; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 8px 0 2px; }
.nc-old { color: var(--muted); text-decoration: line-through; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.nc-arrow { color: var(--faint); }
.nc-new { font-size: 21px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nc-drop { font-size: 12.5px; font-weight: 700; color: var(--bc); background: var(--bs); padding: 2px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.nc-refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; }
.nc-ref { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 9px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.nc-ref:hover { text-decoration: none; border-color: var(--border-strong); }
.nc-ref .k { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-ref b { font-size: 13px; font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center; }
.nc-ref em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.nc-ref.good em { color: var(--success); }
.nc-ref.bad em { color: var(--danger); }
.nc-desc { margin-top: 8px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 6px 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nc-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.nc-thr { font-size: 11px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-go { margin-left: auto; font-size: 12.5px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.notif-card:hover .nc-go { text-decoration: underline; }
.nc-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.nc-progress span { display: block; height: 100%; background: var(--bc); opacity: .55; transform-origin: left; animation: ncTimer linear forwards; }
.notif-card.paused .nc-progress span { animation-play-state: paused; }
@keyframes ncTimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes ncIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ncOut { to { opacity: 0; transform: translateX(24px); } }

.notif-bell { position: relative; }
.bell-count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-panel { width: min(420px, calc(100vw - 24px)); padding: 0; right: -46px; }
.np-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px 6px; font-size: 13.5px; }
.np-head .muted { font-size: 11.5px; }
.np-legend { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; border-bottom: 1px solid var(--border); }
.np-legend span { font-size: 11px; font-weight: 600; color: var(--bc); background: var(--bs); border-radius: 999px; padding: 1px 8px; }
.np-list { max-height: min(460px, 70vh); overflow-y: auto; padding: 4px; }
.np-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.np-row:hover { background: var(--surface-2); }
.np-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bc); flex: 0 0 auto; box-shadow: 0 0 0 3px var(--bs); }
.np-main { flex: 1; min-width: 0; }
.np-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-meta { font-size: 11.5px; color: var(--muted); }
.np-price { text-align: right; flex: 0 0 auto; }
.np-price b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.np-price span { font-size: 11.5px; font-weight: 700; color: var(--bc); }
@media (max-width: 560px) { .notif-stack { right: 12px; left: 12px; width: auto; } .notif-panel { right: -90px; } }

/* ---------- Stok sorgu ---------- */
.row-tools { white-space: nowrap; text-align: right; }
.row-tools .btn + .btn { margin-left: 4px; }
.row-tools-head { text-align: right !important; }
.sc-progress { padding: 8px 2px; }
.sc-progress-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sc-progress-head .muted { margin-left: auto; font-variant-numeric: tabular-nums; }
.sc-supported { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; }

.row-tools { display: table-cell; }
.row-tools .btn { min-width: 30px; }
.row-tools .lbl { display: none; }
.products-table td:first-child { min-width: 240px; }
@media (min-width: 1680px) { .row-tools .lbl { display: inline; } }

/* ---------- İşlem dışı ürünler ---------- */
.ex-bulkbar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-text); font-size: 13px; font-weight: 600; }
.ex-bulkbar.empty-sel { background: var(--surface-2); color: var(--muted); }
.ex-listings { display: flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.ex-listing { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); font-size: 11.5px; color: var(--text-2); text-decoration: none; white-space: nowrap; }
.ex-listing:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.ex-listing b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ex-listing.off { opacity: .55; text-decoration: line-through; }
.ex-src { display: inline-flex; flex-direction: column; gap: 2px; }
.ex-src small { font-size: 11px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.segmented .badge { margin-left: 4px; font-size: 10.5px; padding: 0 6px; }

/* ---------------- Entegrasyonlar ---------------- */
.int-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.int-tile { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.int-tile-head { display: flex; align-items: center; gap: 8px; }
.int-tile-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.int-tile-desc { font-size: 12.5px; color: var(--muted); min-height: 32px; }
.int-tile-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; }
.int-tile-foot .spacer { flex: 1; }
.int-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: 0 0 auto; }
.int-ok .int-dot { background: var(--success); }
.int-warn .int-dot { background: var(--warning); }
.int-section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 13px; color: var(--text-2); margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .04em; }
.int-section-title .muted { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.int-key-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.int-key-form input { flex: 1 1 220px; min-width: 0; }
.int-key-form input#gmKeyLabel { flex: 0 1 220px; }
.int-env-toggle { margin: 4px 0 10px; font-size: 13px; flex-wrap: wrap; }
.int-row-off td { opacity: .6; }
.int-small { font-size: 11.5px; }
.int-stat-sm { font-size: 14px; }
.int-usage { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); min-width: 0; }
.int-usage-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.int-usage-result { margin-top: 8px; font-size: 12.5px; overflow-wrap: anywhere; }
.int-usage-result:empty { display: none; }
.int-params { max-width: 340px; }
.int-param { display: inline-block; font-family: var(--mono); font-size: 11.5px; background: var(--surface-3); border-radius: 6px; padding: 1px 6px; margin: 1px 2px 1px 0; }
.int-usage small { overflow-wrap: anywhere; }
.int-runtime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.int-runtime-grid > div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.int-runtime-grid > div span { font-size: 11.5px; }
.int-runtime-grid > div b { overflow-wrap: anywhere; font-size: 13px; }
#tab-proxy-test .settings-grid small, #pxActive { overflow-wrap: anywhere; }
.int-param { overflow-wrap: anywhere; max-width: 100%; }
.form-group, .settings-grid > * { min-width: 0; }

/* ---------------- Tarama Ayarları ---------------- */
.scan-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scan-src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.scan-src::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--faint); }
.scan-src-marketplace::before { background: var(--primary); }
.scan-src-global::before { background: var(--info); }
.scan-src-env::before { background: var(--warning); }
.scan-src-default::before { background: var(--border-strong); }
.scan-progress { margin-top: 6px; height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.scan-progress > div { height: 100%; width: 0; background: var(--primary); transition: width .4s; }
.scan-shares { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 18px; }
.scan-share-row { display: grid; grid-template-columns: 110px 1fr 64px; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.scan-share-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-share-bar { position: relative; height: 10px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.scan-share-demand { position: absolute; inset: 0 auto 0 0; background: var(--warning-soft); border-right: 2px solid var(--warning); }
.scan-share-got { position: absolute; inset: 0 auto 0 0; background: var(--success); border-radius: 5px; }
.scan-share-got.limited { background: var(--warning); }
.scan-share-num { text-align: right; }
.scan-matrix-wrap { overflow-x: auto; }
table.scan-matrix { min-width: 100%; }
table.scan-matrix th { white-space: normal; min-width: 96px; vertical-align: bottom; font-size: 11.5px; }
table.scan-matrix td { padding: 6px 6px; }
.scan-mp-col { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 140px; }
.scan-all-row td { background: var(--surface-2); }
.scan-all-row .scan-mp-col { background: var(--surface-2); }
.scan-row-off td { opacity: .55; }
.scan-cell input, .scan-cell select { width: 100%; min-width: 72px; padding: 6px 8px; font-size: 13px; border-left: 3px solid transparent; }
.scan-cell.scan-src-env input, .scan-cell.scan-src-env select { border-left-color: var(--warning); }
.scan-cell.scan-src-global input, .scan-cell.scan-src-global select { border-left-color: var(--info); }
.scan-cell.scan-src-marketplace input, .scan-cell.scan-src-marketplace select { border-left-color: var(--primary); }
.scan-cell.scan-src-default input, .scan-cell.scan-src-default select { border-left-color: var(--border-strong); }
.scan-cell.scan-dirty input, .scan-cell.scan-dirty select, .scan-dirty-input { background: var(--warning-soft); border-color: var(--warning); }
.scan-na { color: var(--faint); text-align: center; }
.scan-help { display: inline-flex; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); color: var(--muted); font-size: 10px; align-items: center; justify-content: center; cursor: help; }
.scan-unit { text-transform: none; font-weight: 500; color: var(--faint); font-size: 11px; letter-spacing: 0; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted, inherit); white-space: nowrap; }
.products-table th .sort-order { margin-left: 2px; font-size: 10px; color: var(--primary); }
