/* Acn Solution LLC paneli. Harici kütüphane yok.
   Tek tasarım dili: bir düğme çifti (dolu / çizgili), bir kart, bir köşe ölçeği (6 / 10 / 14), bir bağlantı görünümü.
   Tema: renkler değişkenlerde; varsayılan sistem tercihi, üstteki düğme html[data-theme] ile zorlar (localStorage "theme"). */

:root {
    color-scheme: light;
    --bg: #f5f6f8; --panel: #ffffff; --panel-2: #f9fafb; --sunken: #f0f2f5;
    --ink: #1b2230; --ink-2: #3a4556; --muted: #667085; --line: #e7e9ee; --line-strong: #d5d9e0;
    --brand: #13786f; --brand-hover: #0e635b; --brand-ink: #ffffff; --brand-soft: #e6f3f1; --accent: #c2410c;
    --side: #fbfbfc; --side-2: #eef2f4; --side-ink: #4b5565; --side-ink-strong: #141a24; --side-line: #e7e9ee;
    --ok: #067647; --ok-bg: #e3f6ec; --bad: #b42318; --bad-bg: #fdecea; --warn: #93500a; --warn-bg: #fff2d9; --info: #1d4ed8; --info-bg: #e7eefe;
    --input: #ffffff; --hover: #f2f4f7; --row-hover: #f7f9fb; --focus: #0f766e;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04); --shadow-lift: 0 6px 18px rgba(16, 24, 40, .08); --shadow-pop: 0 16px 40px rgba(16, 24, 40, .16);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --chart-1: #0f766e; --chart-2: #c2410c; --chart-3: #1d4ed8; --chart-track: #e7eaef;
    --bb-us: #0a8a7a; --bb-comp: #c2410c; --bb-amazon: #1d4ed8; --bb-none: #9aa3af;
    --r-sm: 6px; --r: 10px; --r-lg: 14px;
    --side-w: 236px; --filter-w: 300px; --top-h: 56px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1017; --panel: #131a24; --panel-2: #171f2b; --sunken: #0f151e;
    --ink: #e6eaf0; --ink-2: #c3cad5; --muted: #8b96a8; --line: #232d3c; --line-strong: #324055;
    --brand: #2dbfa8; --brand-hover: #49d1bb; --brand-ink: #04211c; --brand-soft: #12332f; --accent: #f59e4b;
    --side: #080c12; --side-2: #111823; --side-ink: #97a3b6; --side-ink-strong: #ffffff; --side-line: #1a2331;
    --ok: #4cc99b; --ok-bg: #0f2f24; --bad: #ff8576; --bad-bg: #3a1815; --warn: #f3b860; --warn-bg: #36280f; --info: #86a8ff; --info-bg: #17234a;
    --input: #0e141d; --hover: #1a2331; --row-hover: #161e2a; --focus: #2dbfa8;
    --shadow: none; --shadow-lift: 0 8px 22px rgba(0, 0, 0, .35); --shadow-pop: 0 18px 44px rgba(0, 0, 0, .55);
    --chart-1: #2dbfa8; --chart-2: #f59e4b; --chart-3: #86a8ff; --chart-track: #222c3b; --bb-us: #1fa18c; --bb-comp: #d4752a; --bb-amazon: #6b8ff0; --bb-none: #5b6574;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0b1017; --panel: #131a24; --panel-2: #171f2b; --sunken: #0f151e;
        --ink: #e6eaf0; --ink-2: #c3cad5; --muted: #8b96a8; --line: #232d3c; --line-strong: #324055;
        --brand: #2dbfa8; --brand-hover: #49d1bb; --brand-ink: #04211c; --brand-soft: #12332f; --accent: #f59e4b;
        --side: #080c12; --side-2: #111823; --side-ink: #97a3b6; --side-ink-strong: #ffffff; --side-line: #1a2331;
        --ok: #4cc99b; --ok-bg: #0f2f24; --bad: #ff8576; --bad-bg: #3a1815; --warn: #f3b860; --warn-bg: #36280f; --info: #86a8ff; --info-bg: #17234a;
        --input: #0e141d; --hover: #1a2331; --row-hover: #161e2a; --focus: #2dbfa8;
        --shadow: none; --shadow-lift: 0 8px 22px rgba(0, 0, 0, .35); --shadow-pop: 0 18px 44px rgba(0, 0, 0, .55);
        --chart-1: #2dbfa8; --chart-2: #f59e4b; --chart-3: #86a8ff; --chart-track: #222c3b; --bb-us: #1fa18c; --bb-comp: #d4752a; --bb-amazon: #6b8ff0; --bb-none: #5b6574;
    }
}

/* ------------------------------------------------------------------ temel */
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--bg); font-feature-settings: "tnum" 1; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }
h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.015em; font-weight: 650; }
h2 { font-size: 16px; margin: 28px 0 12px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 14px; margin: 0 0 10px; font-weight: 650; }
p { margin: 0 0 10px; }
code { background: var(--sunken); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 10px; }

/* ------------------------------------------------------------------ iskelet: yan menü + üst çubuk */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column;
    padding: max(14px, env(safe-area-inset-top)) 12px 16px; border-right: 1px solid var(--side-line); scrollbar-width: thin; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: var(--side-ink-strong); text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: var(--brand-ink); font-size: 13px; font-weight: 800; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--side-ink); letter-spacing: 0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { margin: 0; }
.nav-group > summary { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 8px; cursor: pointer; list-style: none;
    color: var(--side-ink); font-size: 13.5px; font-weight: 600; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { background: var(--side-2); color: var(--side-ink-strong); }
.nav-group > summary svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-group > summary .chev { width: 14px; height: 14px; margin-left: auto; transition: transform .15s; opacity: .6; }
.nav-group[open] > summary .chev { transform: rotate(90deg); }
.nav-group > summary .count { font-size: 11px; padding: 0 7px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.nav-group > summary .count + .chev { margin-left: 6px; }
.nav-group > summary span:first-of-type { flex: 1; }
.nav-group[open] > summary .count { display: none; }   /* açıkken sayaç alt öğede görünür */
.nav-group .nav-items { padding: 2px 0 6px 14px; margin-left: 9px; border-left: 1px solid var(--side-line); overflow: hidden; }
.nav-group > summary { transition: background .18s var(--ease), color .18s var(--ease); }
.nav-group > summary .chev { transition: transform .25s var(--ease) !important; }
.nav-group.closing > summary .chev { transform: rotate(0deg) !important; }
.nav-group .nav-items a.nav { min-height: 32px; font-size: 13px; }
.sidebar a.nav { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--side-ink); text-decoration: none; font-size: 13.5px;
    transition: background .15s, color .15s; }
.sidebar a.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.sidebar a.nav:hover { background: var(--side-2); color: var(--side-ink-strong); }
.sidebar a.nav.active { background: var(--side-2); color: var(--side-ink-strong); box-shadow: inset 3px 0 0 var(--brand); }
.sidebar a.nav .count { margin-left: auto; font-size: 11px; padding: 0 7px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 700; }
.sidebar .side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--side-line); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 20px;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .page-name { font-weight: 600; color: var(--ink-2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }
.topbar .tools { display: flex; gap: 6px; align-items: center; margin: 0; }
.icon-button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line);
    background: var(--panel); color: var(--ink-2); cursor: pointer; font: inherit; font-size: 13px; transition: background .15s, border-color .15s, transform .1s; }
.icon-button:hover { background: var(--hover); border-color: var(--line-strong); color: var(--ink); }
.icon-button:active { transform: translateY(1px); }
.icon-button svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.user-chip { font-size: 12px; color: var(--muted); padding: 0 4px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Geniş ekranda da menü düğmesi var: sol menüyü gizler (body.nav-collapsed, tarayıcı hatırlar). */
@media (min-width: 1101px) {
    .shell { transition: grid-template-columns .28s var(--ease); }
    .sidebar { transition: opacity .2s var(--ease), padding .28s var(--ease); }
    body.nav-collapsed .shell { grid-template-columns: 0 minmax(0, 1fr); }
    body.nav-collapsed .sidebar { opacity: 0; overflow: hidden; padding-left: 0; padding-right: 0; pointer-events: none; border-right-width: 0; }
}
.scrim { display: none; }

.container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 22px 24px 64px; }

/* ------------------------------------------------------------------ menüler (zil, açılır) */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-items { position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
    padding: 6px; box-shadow: var(--shadow-pop); z-index: 40; }
.menu-items a { display: block; padding: 8px 10px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; }
.menu-items a:hover { background: var(--hover); }
.bell-items { min-width: 340px; max-height: 70vh; overflow-y: auto; }
.bell-items a { border-bottom: 1px solid var(--line); }
.badge { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; line-height: 18px; }
/* Üst çubuk: pazar seçici (tek pazar), kur ve saatler, kısa uyarı düğmeleri */
.market-pick > summary.market-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px 6px 10px; border: 1px solid var(--line-strong);
    border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.market-pick > summary.market-btn:hover { background: var(--hover); }
.market-pick > summary .chev { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.market-pick[open] > summary .chev { transform: rotate(180deg); }
.market-items { left: 0; right: auto; min-width: 220px; }
.market-items a { display: flex; align-items: center; gap: 8px; }
.market-items a .small { margin-left: auto; }
.market-items a.active { background: var(--brand-soft); font-weight: 600; }
.market-items .tick { width: 15px; height: 15px; stroke: var(--brand); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
svg.flag { width: 21px; height: 14px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
.topinfo { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; padding: 0 4px; }
.topinfo b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 2px; }
.topinfo .sep { width: 1px; height: 18px; background: var(--line-strong); }
.top-alert { position: relative; color: var(--warn); }
.top-alert .badge { position: absolute; top: -6px; right: -6px; background: var(--warn); color: var(--panel); }
@media (max-width: 1280px) { .topinfo .sep, .topinfo span:has(> .clock) { display: none; } }
@media (max-width: 900px) { .topinfo { display: none; } .market-pick .mk-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 640px) { .market-pick .mk-name { display: none; } .topbar .page-name { display: none; } }

/* Bildirim merkezi (ortak popup): sabit genişlik, liste kendi içinde kayar. */
.notif-center > summary { position: relative; }
.notif-center > summary .badge { position: absolute; top: -6px; right: -6px; }
.notif-items { width: min(420px, calc(100vw - 16px)); padding: 0; display: flex; flex-direction: column; max-height: min(75vh, 640px); }
.notif-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.notif-scroll { overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.notif-group { padding: 4px 0 6px; border-bottom: 1px solid var(--line); }
.notif-group:last-child { border-bottom: none; }
.notif-group-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.notif-group-link { display: inline-flex !important; align-items: center; gap: 6px; padding: 0 !important; font-weight: 650; color: var(--ink) !important; }
.notif-group-link:hover { background: none !important; text-decoration: underline; }
.notif-group-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notif-item { display: flex !important; gap: 10px; align-items: flex-start; padding: 8px 12px !important; border-radius: 0 !important; }
.notif-item img, .notif-noimg { width: 40px; height: 40px; flex: none; object-fit: contain; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.notif-noimg { background: var(--sunken); }
.notif-text { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.notif-title { font-size: 13px; color: var(--ink); }
.notif-item.unread .notif-title { font-weight: 650; }
.notif-item.unread { box-shadow: inset 3px 0 0 var(--brand); }
.notif-body { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-more { display: block !important; padding: 4px 12px 6px !important; }
.notif-all { display: block !important; text-align: center; padding: 10px !important; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r) !important; font-weight: 600; }
@media (max-width: 760px) { .notif-items { position: fixed; left: 8px; right: 8px; top: calc(var(--top-h) + env(safe-area-inset-top) + 4px); width: auto; } }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-vars button { font-size: 12px; padding: 3px 8px; min-height: 0; }
.tpl-preview { width: 100%; min-height: 720px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
/* Sürükle-bırak e-posta düzenleyici */
.email-editor { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.ee-right { position: sticky; top: calc(var(--top-h) + 12px); }
.ee-colors { display: flex; gap: 16px; margin: 10px 0; }
.ee-colors label { display: inline-flex; align-items: center; gap: 6px; }
.ee-colors input[type=color] { width: 36px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.ee-blocks { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ee-block { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.ee-block.off .ee-name { color: var(--muted); text-decoration: line-through; }
.ee-block.dragging { opacity: .4; }
.ee-block.drop-before { box-shadow: 0 -3px 0 var(--brand); }
.ee-block.drop-after { box-shadow: 0 3px 0 var(--brand); }
.ee-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px; }
.ee-grip { cursor: grab; color: var(--muted); letter-spacing: -2px; padding: 0 6px 0 2px; user-select: none; }
.ee-name { flex: 1; text-align: left; background: none !important; border: none !important; color: var(--ink) !important; font-weight: 600; padding: 4px !important; min-height: 0 !important; justify-content: flex-start; }
.ee-tool { background: none !important; border: 1px solid transparent !important; color: var(--ink-2) !important; padding: 2px 7px !important; min-height: 28px !important; font-size: 13px; }
.ee-tool:hover { border-color: var(--line) !important; }
.ee-fields { padding: 4px 12px 12px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.ee-fields label:not(.check) { display: grid; gap: 4px; }
@media (max-width: 1100px) { .email-editor { grid-template-columns: minmax(0, 1fr); } .ee-right { position: static; } .tpl-preview { min-height: 560px; } }
.countdown { font-variant-numeric: tabular-nums; color: var(--info); font-weight: 600; }
.countdown.live { color: var(--ok); }
.countdown-big { font-size: 15px; margin-top: 6px; }
.campaign-card.active { border-color: var(--ok); }

/* ------------------------------------------------------------------ sayfa başı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 720px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.flash { padding: 11px 14px; border-radius: var(--r); margin-bottom: 16px; border: 1px solid transparent; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.segmented { display: inline-flex; padding: 3px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); gap: 2px; }
.segmented a { padding: 6px 12px; border-radius: 7px; color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; }
.segmented a.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.segmented a:not(.active):hover { color: var(--ink); }

/* ------------------------------------------------------------------ kartlar ve sayılar */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow); }
.card .label { color: var(--muted); font-size: 12px; font-weight: 500; }
.card .value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.card .value.sm { font-size: 17px; }
.card .value small { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 3px; }
.card a { text-decoration: none; color: inherit; }
.card.link, a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card.link:hover, a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--line-strong); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 0 0 16px; overflow: hidden; box-shadow: var(--shadow); }
.stat-row > a, .stat-row > div { padding: 13px 16px; border-right: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; transition: background .15s; }
.stat-row > :last-child { border-right: none; }
.stat-row > a:hover { background: var(--row-hover); }
.stat-row b { font-size: 20px; letter-spacing: -.02em; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 16px; overflow-x: auto; box-shadow: var(--shadow); }
.panel > h3:first-child { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel.flush { padding: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ------------------------------------------------------------------ tablolar */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; background: var(--panel-2); position: sticky; top: 0; z-index: 1; text-transform: none; }
tbody tr { transition: background .12s; }
/* Kayan sütun başlığı (_Layout betiği): sayfa aşağı kayınca tablonun başlık kopyası üst çubuğun altında sabit durur. */
.sticky-head { position: fixed; z-index: 20; display: none; overflow: hidden; pointer-events: none; box-shadow: 0 2px 6px rgba(16, 24, 40, .10); }
.sticky-head table { table-layout: fixed; margin: 0; }
.sticky-head th { position: static; border-bottom: 1px solid var(--line-strong, var(--line)); pointer-events: auto; }
@media print { .sticky-head { display: none !important; } }
tbody tr:hover td { background: var(--row-hover); }
tbody tr.selected td { background: var(--brand-soft); }
tbody tr:last-child td { border-bottom: none; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.thumb { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 8px; border: 1px solid var(--line); display: inline-block; vertical-align: middle; cursor: zoom-in; transition: transform .15s; }
.thumb:hover { transform: scale(1.03); }
.thumb-empty { background: var(--sunken); cursor: default; }
.order-item { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.order-item .thumb { width: 36px; height: 36px; }
.zoom-pop { position: fixed; z-index: 100; width: 340px; padding: 10px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
    box-shadow: var(--shadow-pop); pointer-events: none; display: none; }
.zoom-pop img { width: 100%; height: 320px; object-fit: contain; display: block; }
.zoom-pop .cap { font-size: 12px; color: #344054; margin-top: 6px; max-height: 3.2em; overflow: hidden; }
.title-cell { max-width: 340px; }
.title-cell .asin { font-weight: 650; text-decoration: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 12px; white-space: nowrap; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.kv dd.strong { font-weight: 700; }
table.inventory td { font-size: 13px; }
/* Kategori uzun ("Automotive › Replacement Parts …"): iki satırla sınırlı, tamamı imleçte. Tablo 1440 px'te sağa taşmasın. */
table.inventory td.cat { max-width: 130px; }
table.inventory td.src { white-space: normal; max-width: 150px; }
table.inventory td.cat .clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.inventory .asin { font-weight: 650; }
td.check, th.check { width: 36px; padding-right: 0; }

/* ------------------------------------------------------------------ etiketler */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--sunken); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; line-height: 18px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.tag.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.tag.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.tag.muted { color: var(--muted); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tabs a { padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 13px; font-weight: 500;
    transition: border-color .15s, background .15s, color .15s; }
.tabs a:hover { border-color: var(--line-strong); color: var(--ink); }
.tabs a.active { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.tabs a .count { opacity: .65; margin-left: 5px; font-variant-numeric: tabular-nums; }

/* Ürün arama sonuçları: uygunluk sekmeleri (Tümü / Uygun / Uygun değil...) tek kart içinde, etkin olan marka renginde çerçeveli. */
.results-head { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 4px; margin: 0 0 14px; }
.fit-tabs { margin: 0 0 6px; gap: 4px; }
.fit-tabs a { background: transparent; border-color: transparent; border-radius: 8px; padding: 7px 12px; font-weight: 600; }
.fit-tabs a:hover { background: var(--panel-2); border-color: var(--line); }
.fit-tabs a.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.fit-tabs a .count { font-weight: 500; }
.fit-tabs a.fit-ok:not(.active) .count { color: var(--ok); opacity: 1; }
.fit-tabs a.fit-bad:not(.active) .count { color: var(--bad); opacity: 1; }
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 6px; padding: 6px 0 0; border-top: 1px solid var(--line); }
.subtabs a { padding: 4px 10px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); text-decoration: none; border: 1px solid transparent; }
.subtabs a:hover { border-color: var(--line); }
.subtabs a.active { background: var(--sunken); border-color: var(--line-strong); color: var(--ink); font-weight: 600; }
.subtabs a .count { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.results-sum { margin: 2px 2px 8px; }

/* ------------------------------------------------------------------ formlar ve düğmeler */
.inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 8px 8px 0; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
label.check { display: inline-flex; gap: 8px; align-items: center; color: var(--ink); font-size: 13px; font-weight: 400; margin: 2px 0; cursor: pointer; }
input, select, textarea { font: inherit; font-size: 13.5px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--input); color: var(--ink);
    transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--line-strong) 60%, var(--ink)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=number] { width: 120px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; min-height: 0; padding: 0; }
input[type=file] { padding: 6px; }
input.wide, select.wide { width: 100%; }
textarea { width: 100%; min-height: 160px; font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; align-items: end; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

button, .button { font: inherit; font-size: 13.5px; min-height: 36px; padding: 7px 14px; border-radius: var(--r-sm); border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink);
    cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; }
button:hover, .button:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button.secondary, .button.secondary, button.ghost, .button.ghost { background: var(--panel); color: var(--ink); border-color: var(--line-strong); font-weight: 500; }
button.secondary:hover, .button.secondary:hover, button.ghost:hover, .button.ghost:hover { background: var(--hover); color: var(--ink); border-color: color-mix(in srgb, var(--line-strong) 60%, var(--ink)); }
button.danger, .button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.danger:hover { filter: brightness(1.08); background: var(--bad); }
button.small, .button.small { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
button.link { background: none; border: none; color: var(--muted); padding: 0; min-height: 0; font-weight: 500; }
button.link:hover { color: var(--ink); background: none; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.validation, .field-validation-error { color: var(--bad); font-size: 12px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 12px; }

/* ------------------------------------------------------------------ filtre paneli (envanter ve ürün arama ortak) */
.with-filters { display: grid; grid-template-columns: minmax(0, 1fr) var(--filter-w); gap: 18px; align-items: start; }
.with-filters .results { order: 1; }
.with-filters .filter-side { order: 2; }
.with-filters.collapsed { grid-template-columns: minmax(0, 1fr); }
.with-filters.collapsed .filter-side { display: none; }
.filter-side { position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); display: flex; flex-direction: column;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.filter-side .fs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.filter-side .fs-head strong { font-size: 14px; }
.filter-side .fs-body { overflow-y: auto; padding: 6px 14px 10px; scrollbar-width: thin; }
.filter-side .fs-foot { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--panel-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.filter-side .fs-foot > * { flex: 1; }
.fgroup { border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: none; }
.fgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 650; font-size: 13.5px; }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
.fgroup[open] > summary::after { transform: rotate(-135deg); }
.fgroup > summary .on { font-size: 11px; font-weight: 700; color: var(--brand-ink); background: var(--brand); border-radius: 10px; padding: 0 7px; margin-left: auto; margin-right: 10px; }
.fgroup .fields { display: grid; gap: 10px; padding-bottom: 14px; }
.fgroup .fields input:not([type=checkbox]), .fgroup .fields select { width: 100%; }
.fgroup .pair { display: flex; gap: 6px; }
.fgroup .pair input { min-width: 0; flex: 1; width: auto; }
.fgroup .checks { display: grid; gap: 2px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; margin-top: 12px; }
.filters input, .filters select { width: 100%; }
.filters .pair, .pair { display: flex; gap: 6px; }
.filters .pair input { width: 50%; min-width: 0; flex: 1; }
.filter-group { margin: 16px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.filter-actions { display: flex; gap: 8px; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--ink); font-size: 12px; font-weight: 500; text-decoration: none; }
.chip span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--brand) 20%, transparent); font-size: 11px; }
.save-filter .chip { padding: 3px 10px; }
.chip.active { background: var(--brand); color: #fff; }
.chip:hover span { background: var(--brand); color: var(--brand-ink); }

/* Seçim çubuğu: seçili sayısı + filtredeki toplam + toplu işlemler */
.selbar { position: sticky; top: calc(var(--top-h) + 8px); z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.selbar.has { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lift); }
.selbar .sel-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.selbar .sel-count b { font-size: 16px; }
.selbar .sel-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.selbar .divider { width: 1px; align-self: stretch; background: var(--line); }
/* Kargo tablosu: ürün ve son hareket iki satırla sınırlı (tamamı imleçte), tarih sütunları tek satır. */
table.shipments td.title-cell { max-width: 230px; }
table.shipments td.title-cell .small:first-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.shipments td { font-size: 13px; }
/* Seçim yokken toplu işlem düğmeleri gizli: yalnız sayaç, ipucu ve "tümünü seç" görünür. */
.selbar:not(.has) .sel-actions, .selbar:not(.has) #push-panel { display: none; }
.selbar.has .sel-hint { display: none; }
.tabs .more-views > summary { padding: 6px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; font-weight: 500; }
.tabs .more-views > summary:hover { border-color: var(--line-strong); color: var(--ink); }
.tabs .more-views > summary.active { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.tabs .more-views .menu-items { left: 0; right: auto; min-width: 230px; }
.tabs .more-views .menu-items a { border: none; border-radius: var(--r-sm); background: none; padding: 8px 10px; }
.tabs .more-views .menu-items a.active { background: var(--brand-soft); color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ ilerleme ve adımlar */
.progress { height: 8px; background: var(--chart-track); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .4s; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 12px 14px 12px 46px; position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; color: var(--ink-2); }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.steps li b { display: block; color: var(--ink); }

/* ------------------------------------------------------------------ grafikler (saf CSS) */
.donut { --p: 0; width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(var(--c, var(--chart-1)) calc(var(--p) * 1%), var(--chart-track) 0); display: grid; place-items: center; margin: 6px auto; }
.donut::before { content: attr(data-label); width: 80px; height: 80px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; font-weight: 700; }
.donuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; text-align: center; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.bars .bar { flex: 1; background: var(--chart-1); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; transition: background .15s; }
.bars .bar:hover { background: var(--chart-2); }
.bar-labels { display: flex; gap: 4px; font-size: 10px; color: var(--muted); }
.bar-labels span { flex: 1; text-align: center; overflow: hidden; white-space: nowrap; }
.meter { height: 6px; background: var(--chart-track); border-radius: 3px; overflow: hidden; min-width: 60px; }
.meter > span { display: block; height: 100%; background: var(--chart-1); }

/* ------------------------------------------------------------------ giriş */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth { width: 100%; max-width: 380px; }
.auth .brand-line { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 18px; color: var(--ink); }
.auth .panel { padding: 26px; }
.auth input { width: 100%; margin-bottom: 12px; }
.auth button { width: 100%; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ PWA / dar ekran */
body { padding-bottom: env(safe-area-inset-bottom); }
.zoom-pop.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(92vw, 420px); pointer-events: auto; }
.zoom-pop.center img { height: min(70vh, 420px); }

@media (max-width: 1180px) {
    :root { --filter-w: 270px; }
}
@media (max-width: 1020px) {
    .with-filters { grid-template-columns: minmax(0, 1fr); }
    .filter-side { position: fixed; inset: 0 0 0 auto; width: min(92vw, 360px); max-height: none; border-radius: 0; z-index: 60; transform: translateX(104%); transition: transform .25s var(--ease); }
    .with-filters.collapsed .filter-side { display: flex; }
    body.filters-open .filter-side { transform: none; }
    body.filters-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; }
    .filter-side .fs-foot { border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
@media (max-width: 1100px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px); z-index: 70; transform: translateX(-104%); transition: transform .28s var(--ease); box-shadow: var(--shadow-pop); }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 65; }
    .nav-toggle { display: inline-flex; }
    .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--top-h) + env(safe-area-inset-top)); gap: 6px; }
    .user-chip, .theme-text, .bell-text { display: none; }
    .bell-items { position: fixed; left: 8px; right: 8px; top: calc(var(--top-h) + env(safe-area-inset-top) + 4px); min-width: 0; }
    .container { padding: 14px 12px 56px; }
    h1 { font-size: 19px; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .page-head { align-items: flex-start; }
    .page-head > .inline, .page-head form.inline { width: 100%; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .card { padding: 12px; }
    .card .value { font-size: 20px; }
    .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-row > a, .stat-row > div { border-right: none; border-bottom: 1px solid var(--line); }
    .filters, .grid-form { grid-template-columns: 1fr; }
    .panel { padding: 14px; -webkit-overflow-scrolling: touch; }
    th, td { padding: 8px 7px; }
    .title-cell { max-width: 220px; }
    input, select, textarea, button { font-size: 16px; }
    .button, button, .icon-button, input, select { min-height: 44px; }
    button.small, .button.small { min-height: 40px; }
    input[type=checkbox] { min-height: 0; width: 20px; height: 20px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
    .tabs a { flex: none; padding: 9px 14px; }
    .selbar { top: calc(var(--top-h) + env(safe-area-inset-top) + 6px); }
    .selbar .sel-actions { margin-left: 0; width: 100%; }
    .zoom-pop:not(.center) { display: none !important; }
    .sidebar a.nav, .nav-group > summary { min-height: 44px; }
    /* Telefonda: tablolu paneller kendi içinde kayar (sayfa yana taşmaz); uzun düğme yazısı alt satıra iner. */
    .panel:has(> table), .panel:has(> form > table) { overflow-x: auto; }
    .button:not(.small), button:not(.small):not(.icon-button) { white-space: normal; text-align: center; }
}
@media (max-width: 420px) {
    .stat-row { grid-template-columns: 1fr; }
}
.filter-form { display: contents; }
.results { min-width: 0; }
[hidden] { display: none !important; }
code { overflow-wrap: anywhere; }

/* ---- Yeni arama sihirbazı (4 adım) */
.wizard { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 18px; align-items: start; }
.wiz-steps { padding: 16px; position: sticky; top: 16px; }
.wiz-steps ol { list-style: none; margin: 0; padding: 0; counter-reset: w; }
.wiz-steps li { counter-increment: w; position: relative; padding: 4px 0 22px 44px; cursor: pointer; border-radius: var(--r); }
.wiz-steps li:last-child { padding-bottom: 4px; }
.wiz-steps li::before { content: counter(w); position: absolute; left: 4px; top: 2px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.wiz-steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 32px; bottom: 2px; width: 1px; background: var(--line); }
.wiz-steps li b { display: block; font-size: 13.5px; color: var(--ink); }
.wiz-steps li span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.wiz-steps li.active::before { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.wiz-steps li.done::before { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.wiz-steps li:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wiz-body { display: grid; gap: 14px; min-width: 0; }
.wiz-pane h2 { margin: 0 0 4px; font-size: 18px; }
.wizard:not(.js) .wiz-nav #wiz-prev, .wizard:not(.js) .wiz-nav #wiz-next { display: none; }
.wiz-nav { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.wiz-nav #wiz-pos { margin-right: auto; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px 18px; margin-top: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 22px; margin: 10px 0 6px; }
.opt-card { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; max-height: 260px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); }
.cat-list label[hidden] { display: none; }
@media (max-width: 1100px) {
    .wizard { grid-template-columns: 1fr; }
    .wiz-steps { position: static; }
}

/* ---- Geri bildirim */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip-btn { background: var(--brand-soft); color: var(--brand); border: 1px solid transparent; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); }
.preview-box { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; min-height: 200px; }
.feedback-alert { display: inline-flex; gap: 6px; align-items: center; border-color: var(--warn); color: var(--warn); }
.feedback-alert svg { fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 640px) { .feedback-alert span { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Yasaklı liste: satır içi ihlal etiketi seçimi */
.tag-select { padding: 3px 8px; font-size: 12.5px; min-width: 150px; }
.tag-select.untagged { color: var(--muted); }

/* Desi listesi: eksik satırın ASIN'leri */
.desi-asins { margin-top: 4px; }
.desi-asins summary { cursor: pointer; color: var(--brand); }
.desi-asins > div:first-of-type { display: flex; flex-wrap: wrap; gap: 4px 10px; max-height: 160px; overflow: auto; margin-top: 4px; max-width: 360px; font-family: ui-monospace, Consolas, monospace; }
.save-filter .bot-strip { width:100%; }
.save-filter .bot-strip tr.current td { background: var(--info-bg, rgba(59,130,246,.08)); }
.job-msg { margin: 4px 0 0; padding-left: 18px; }
.job-msg li { margin: 1px 0; }
tr.row-bad td { background: var(--bad-bg); }
.job-summary td, .job-runs td { vertical-align: top; }

/* Buy Box analizi (renkler doğrulandı: renk körlüğü ayrımı ve karşıtlık, açık ve koyu tema) */
.bb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.bb-chart { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bb-chart svg { flex: 0 0 auto; }
.bb-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; flex: 1; min-width: 200px; }
/* Kutu bir <button>: genel düğme stilini (tek satır, ortalı, marka rengi) ezer; yazı kaydırılır. */
.bb-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; min-height: 0; min-width: 0;
    text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px;
    background: var(--panel); cursor: pointer; font: inherit; font-weight: 500; color: var(--ink); user-select: none; }
.bb-card:hover { background: var(--panel-2); border-color: var(--muted); color: var(--ink); }
.bb-card .lbl { display: block; }
.bb-card.selected { outline: 2px solid var(--info); outline-offset: 1px; }
.bb-card .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bb-card b { display: block; font-size: 1.25rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bb-detail .bar-row { display: grid; grid-template-columns: minmax(120px, 34%) 1fr 64px; gap: 8px; align-items: center; margin: 4px 0; }
.bb-detail .bar-row .track { height: 10px; background: var(--chart-track); border-radius: 0 4px 4px 0; overflow: hidden; }
.bb-detail .bar-row .fill { height: 100%; border-radius: 0 4px 4px 0; }
.bb-days td .meter { display: inline-block; vertical-align: middle; width: 90px; }
.reason-list { margin: 0; padding-left: 16px; }

/* Tablo başlığından sıralama */
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover { text-decoration: underline; }


/* ------------------------------------------------------------------ 2026-12-02: sakin arayüz eklemeleri */
.panel { border-radius: var(--r-lg); }
h2 { color: var(--ink-2); }

/* Bilgi simgesi ve ipucu baloncuğu (data-tip / title; _Layout betiği) */
.info { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: 600 10px/1 var(--font); font-style: normal;
    color: var(--muted); border: 1px solid var(--line-strong); background: var(--panel); cursor: help; vertical-align: 1px; margin-left: 3px; text-transform: none; }
.info:hover { color: var(--brand); border-color: var(--brand); }
.tip { position: fixed; z-index: 300; max-width: 320px; padding: 8px 11px; border-radius: 8px; background: var(--ink); color: var(--panel);
    font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-pop); pointer-events: none; opacity: 0; transform: translateY(3px);
    transition: opacity .14s var(--ease), transform .14s var(--ease); }
.tip.on { opacity: 1; transform: none; }

/* Sayfa açıklaması (PageGuide) */
.page-guide { margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); font-size: 13px; color: var(--ink-2); }
.page-guide > summary { list-style: none; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; }
.page-guide > summary::-webkit-details-marker { display: none; }
.page-guide .pg-icon { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; margin-top: 1px; }
.page-guide .pg-what { flex: 1; }
.page-guide .pg-more { flex: none; color: var(--brand); font-size: 12px; font-weight: 600; white-space: nowrap; }
.page-guide[open] .pg-more { color: var(--muted); }
.page-guide[open] .pg-more::before { content: "Gizle "; }
.page-guide[open] .pg-more { font-size: 0; }
.page-guide[open] .pg-more::before { font-size: 12px; }
.page-guide dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; padding: 2px 14px 12px 44px; }
.page-guide dt { color: var(--muted); font-weight: 600; font-size: 12px; }
.page-guide dd { margin: 0; }
@media (max-width: 760px) { .page-guide dl { grid-template-columns: 1fr; padding-left: 14px; } .page-guide dd { margin-bottom: 6px; } }

/* Özelleştirilebilir panel ızgarası ([data-layout]) */
.layout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.layout-grid > [data-panel] { margin-bottom: 0; min-width: 0; }
.layout-grid > [data-span="2"] { grid-column: 1 / -1; }
[data-layout]:not(.layout-grid) > [data-panel] + [data-panel] { margin-top: 16px; }
[data-layout]:not(.layout-grid) > [data-panel] > .panel { margin-bottom: 0; }
.layout-bar { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin: 0 0 10px; }
.layout-bar:not(.editing) [data-act="reset"], .layout-bar:not(.editing) [data-act="done"], .layout-bar:not(.editing) .layout-hint { display: none; }
.layout-bar.editing [data-act="edit"] { display: none; }
.layout-bar .layout-hint { margin-right: auto; }
.panel-hidden { display: none !important; }
[data-layout].editing > .panel-hidden { display: block !important; opacity: .45; }
[data-layout].editing > [data-panel] { position: relative; outline: 1.5px dashed var(--line-strong); outline-offset: 3px; cursor: grab; }
[data-layout].editing > [data-panel].dragging { opacity: .5; outline-color: var(--brand); }
.panel-tools { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin: -4px 0 8px; }
.panel-tools .grip { margin-right: auto; color: var(--muted); font-size: 16px; letter-spacing: -1px; user-select: none; }
.panel-tools button { min-height: 26px !important; padding: 2px 8px !important; }
@media (max-width: 1100px) { .layout-grid { grid-template-columns: minmax(0, 1fr); } .layout-bar { display: none; } }

/* Fiyatlandırma: akış adımları, bağlantı kartları, grup kârı alanları */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: f; }
.flow li { counter-increment: f; position: relative; padding: 12px 14px 12px 44px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.flow li::before { content: counter(f); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 12px; }
.flow li > b { display: block; color: var(--ink); margin-bottom: 2px; }
.flow li span b { color: var(--ink); }
.flow li span { color: var(--ink-2); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.link-grid .card { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; }
.profit-fields { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px 12px; margin: 10px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.profit-fields legend { padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.profit-fields label { display: grid; gap: 3px; margin: 0; }
.profit-fields input, .profit-fields select { width: 100%; min-width: 0; }
.group-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 4px; max-width: 560px; }
.group-edit > label { display: grid; gap: 3px; margin: 0; }
.group-edit .profit-fields { grid-column: 1 / -1; margin: 0; }
.group-edit > button { justify-self: start; }
@media (max-width: 640px) { .profit-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } .group-edit { grid-template-columns: 1fr; } }

/* Hareket: yalnız kısa, yumuşak geçişler; azaltılmış hareket tercihinde kapalı (dosya başındaki kural). */
.card.link, a.card, .button, button, .icon-button, .tabs a { transition-timing-function: var(--ease); }
