/* Ecom Asistan Connect — sıkı, premium arayüz ölçeği (taban 13px) */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e8eaf0;
  --border-strong: #d7dbe4;
  --text: #14182a;
  --text-2: #5a6174;
  --text-3: #8b91a3;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef0ff;
  --success: #12a150;
  --success-50: #e9f8ef;
  --warning: #b86e00;
  --warning-50: #fff7e3;
  --danger: #d92d3f;
  --danger-50: #fdeef0;
  --sidebar: #0f1224;
  --sidebar-text: #a9aec6;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 12px rgba(16, 24, 40, .05);
  --shadow-lg: 0 18px 48px rgba(16, 24, 40, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 13px; line-height: 1.45; letter-spacing: -.003em; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 19px; letter-spacing: -.022em; }
h2 { font-size: 15px; }
h3 { font-size: 13.5px; }
p { margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 11.5px; color: var(--text-2); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.num, .stat .value { font-variant-numeric: tabular-nums; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 216px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); color: var(--text-2); padding: 16px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 650; font-size: 13px; line-height: 1.25; padding: 2px 8px 18px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, #6d63ff, #22c3a6); color: #fff; display: grid; place-items: center; font-size: 13px; flex: none; box-shadow: 0 4px 10px rgba(79, 70, 229, .25); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 9px; color: var(--text-2); padding: 7px 10px; border-radius: 7px; font-weight: 500; font-size: 12.5px; }
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav svg { width: 15px; height: 15px; flex: none; opacity: .85; }
.nav-section { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 16px 10px 5px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; }
.main-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text); }
.main-chip:hover { text-decoration: none; }
.main-chip img { width: 22px; height: 22px; border-radius: 50%; }
.main-chip span { color: var(--text-3); display: block; font-size: 10.5px; font-weight: 500; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-weight: 650; font-size: 11px; }
.page { padding: 20px 24px 56px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 3px; font-size: 12.5px; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 16px 18px; }
.card-head { padding: 11px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .app { grid-template-columns: 1fr; } .sidebar { display: none; } .page { padding: 16px; } }

.stat { padding: 14px 16px; }
.stat .label { color: var(--text-2); font-size: 11.5px; font-weight: 500; }
.stat .value { font-size: 22px; font-weight: 650; margin-top: 4px; letter-spacing: -.025em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 12.5px var(--font); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); background: var(--success); }
.btn-danger { color: var(--danger); border-color: #f1c4ca; }
.btn-danger:hover { background: var(--danger-50); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ai { background: linear-gradient(135deg, #6d63ff, #a855f7); border: 0; color: #fff; }
.btn-ai:hover { filter: brightness(1.06); background: linear-gradient(135deg, #6d63ff, #a855f7); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-xs { height: 24px; padding: 0 7px; font-size: 11.5px; border-radius: 6px; }
.btn-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; line-height: 16px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge-success { background: var(--success-50); color: var(--success); border-color: #c4e8d3; }
.badge-warning { background: var(--warning-50); color: var(--warning); border-color: #f1dcaa; }
.badge-danger { background: var(--danger-50); color: var(--danger); border-color: #f4c9cf; }
.badge-primary { background: var(--primary-50); color: var(--primary); border-color: #d8dcff; }
.badge-ai { background: #f5f0ff; color: #7c3aed; border-color: #e4d7ff; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

.alert { padding: 10px 14px; font-size: 12.5px; border-radius: var(--radius-sm); border: 1px solid; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.alert-success { background: var(--success-50); border-color: #c4e8d3; color: #0b6b36; }
.alert-error { background: var(--danger-50); border-color: #f4c9cf; color: #a3212f; }
.alert-info { background: var(--primary-50); border-color: #d8dcff; color: #3730a3; }
.alert-warning { background: var(--warning-50); border-color: #f1dcaa; color: #7f4c00; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-weight: 550; font-size: 12px; color: var(--text-2); }
.field .hint { color: var(--text-3); font-size: 11px; }
.input, select.input, textarea.input { height: 34px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 13px var(--font); color: var(--text); background: #fff; width: 100%; outline: none; transition: border-color .12s, box-shadow .12s; }
textarea.input { height: auto; padding: 9px 11px; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.input-sm { height: 28px; font-size: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--text-3); }
.search .input { padding-left: 29px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.tab { display: flex; align-items: center; gap: 7px; padding: 10px 12px 11px; color: var(--text-2); font-weight: 550; font-size: 12.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); border-bottom-color: var(--primary); }
.tab img { width: 18px; height: 18px; border-radius: 50%; }
.tab .count { font-size: 10.5px; background: var(--surface-2); border: 1px solid var(--border); padding: 0 6px; border-radius: 99px; color: var(--text-2); line-height: 16px; font-variant-numeric: tabular-nums; }
.tab .count.warn { background: var(--warning-50); color: var(--warning); border-color: #f1dcaa; }
.tab .star { color: #f5a524; font-size: 12px; }
.subtabs { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--border); background: #fff; color: var(--text-2); font-size: 11.5px; font-weight: 500; }
.chip:hover { text-decoration: none; border-color: var(--border-strong); color: var(--text); }
.chip.active { background: var(--text); color: #fff; border-color: var(--text); }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar .left, .toolbar .right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.infobar { padding: 7px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--text-2); font-size: 11.5px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.infobar b { color: var(--text); font-weight: 600; }

/* Table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 10.5px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbff; }
.table .check { width: 30px; }
.table .num { text-align: right; white-space: nowrap; }
.prod { display: flex; gap: 10px; align-items: center; min-width: 240px; }
.thumb { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.thumb svg { width: 16px; height: 16px; }
.thumb-empty { display: grid; place-items: center; color: var(--text-3); }
.prod .t { font-weight: 550; font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .m { color: var(--text-3); font-size: 11px; margin-top: 1px; }

.logos { display: flex; gap: 5px; align-items: center; }
.logo { width: 22px; height: 22px; border-radius: 50%; display: block; position: relative; }
.logo img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.logo.off img { filter: grayscale(1); opacity: .25; }
.logo.off { cursor: pointer; }
.logo.off:hover img { opacity: .6; }
.logo .q { position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: #7c3aed; border: 2px solid #fff; }
.logo .q.failed { background: var(--danger); }
.logo.main::after { content: '★'; position: absolute; top: -7px; right: -5px; font-size: 9px; color: #f5a524; }

.suggest { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border: 1px dashed #e4d7ff; background: #fcfaff; border-radius: 8px; min-width: 250px; }
.suggest img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.suggest .st { font-size: 12px; font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.note { font-size: 11.5px; color: var(--text-3); }
.note.warn { color: var(--warning); }

.pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; padding: 9px 14px; border-top: 1px solid var(--border); }

/* Empty / steps */
.empty { text-align: center; padding: 48px 20px; }
.empty .icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; }
.empty .icon svg { width: 20px; height: 20px; }
.empty h3 { margin-bottom: 5px; }
.empty p { color: var(--text-2); font-size: 12.5px; max-width: 500px; margin: 0 auto 16px; line-height: 1.55; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.steps .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 11px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-2); flex: none; }
.steps li.done .n { background: var(--success); border-color: var(--success); color: #fff; }
.steps li.done .t { color: var(--text-3); text-decoration: line-through; }

/* Channel cards (settings) */
.chan { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.chan > img { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.chan .info { flex: 1; min-width: 0; }
.chan .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chan.is-main { background: linear-gradient(90deg, var(--primary-50), transparent 60%); }
.add-tile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 12.5px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: #fff; color: var(--text); }
.add-tile:hover { border-color: var(--primary); background: var(--primary-50); text-decoration: none; }
.add-tile img { width: 28px; height: 28px; border-radius: 50%; }
.add-tile svg { width: 15px; height: 15px; }
.add-tile.disabled { opacity: .5; pointer-events: none; }
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 7px 11px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 12.5px; border: 1px solid transparent; }
.settings-nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); border-color: var(--border); }
.settings-nav a:hover { text-decoration: none; color: var(--text); }
.settings-layout { display: grid; grid-template-columns: 190px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .settings-layout { grid-template-columns: 1fr; } }

/* Main-channel picker */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.picker form { margin: 0; }
.picker button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; padding: 11px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.picker button:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.picker img { width: 32px; height: 32px; border-radius: 50%; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 18, 38, .42); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 600px; animation: pop .18s ease; }
.modal.lg { max-width: 1000px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 10px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 0 0 12px 12px; }
.x { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--text-3); padding: 2px 4px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }

.match-grid { display: grid; grid-template-columns: 290px 1fr; gap: 16px; }
@media (max-width: 900px) { .match-grid { grid-template-columns: 1fr; } }
.pane { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pane-head { padding: 8px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 11.5px; display: flex; align-items: center; gap: 7px; }
.pane-head img { width: 18px; height: 18px; border-radius: 50%; }
.pane-body { padding: 12px; }
.big-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.cand-list { max-height: 340px; overflow-y: auto; }
.cand { display: flex; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.cand:hover { background: #fafbff; }
.cand.sel { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.cand .t { font-weight: 550; font-size: 12.5px; line-height: 1.3; }
.score { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--text-2); font-variant-numeric: tabular-nums; }
.score.hi { background: var(--success-50); color: var(--success); }
.score.mid { background: var(--warning-50); color: var(--warning); }
.vtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.vtable th { text-align: left; color: var(--text-3); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.vtable td { padding: 5px 8px; border-bottom: 1px solid var(--border); }
.attrs { display: flex; gap: 3px; flex-wrap: wrap; }
.attr { font-size: 10.5px; padding: 0 5px; line-height: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; }

.sugg-card { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.sugg-card img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }

/* Toast + job dock */
.toasts { position: fixed; top: 64px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { background: var(--text); color: #fff; padding: 9px 13px; border-radius: 9px; box-shadow: var(--shadow-lg); font-size: 12.5px; animation: pop .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: #0f7d40; }
.jobs-dock { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: flex; flex-direction: column; gap: 8px; width: 330px; }
.job { background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); padding: 10px 12px; }
.job .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job .msg { font-size: 11.5px; color: var(--text-2); margin-top: 5px; }
.bar { height: 5px; background: #eef0f4; border-radius: 99px; overflow: hidden; margin-top: 7px; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .3s; }
.bar.indet > i { width: 35% !important; animation: indet 1.2s infinite ease-in-out; }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: radial-gradient(1100px 560px at 0% 0%, #2a2470, #0f1224 62%); color: #cfd3ea; padding: 40px 44px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-size: 26px; line-height: 1.2; margin: 18px 0 12px; letter-spacing: -.025em; }
.auth-side p { font-size: 13px; }
.auth-side .logos { gap: 8px; flex-wrap: wrap; }
.auth-side .logos img { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.auth-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.auth-form .box { width: 100%; max-width: 340px; }
.auth-form h1 { font-size: 21px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Gelişmiş filtre ---------- */
.filter-wrap { position: static; }
.toolbar .left { position: relative; }
.fcount { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; }
.filter-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: min(780px, calc(100vw - 270px)); background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(16, 24, 40, .14); padding: 14px; animation: pop .15s ease; }
.filter-panel .empty-note { color: var(--text-2); font-size: 12.5px; padding: 6px 2px 14px; }
.frow { display: grid; grid-template-columns: 190px 130px 1fr 30px; gap: 8px; align-items: start; margin-bottom: 8px; }
.frow .del { width: 30px; height: 32px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 7px; display: grid; place-items: center; }
.frow .del:hover { background: var(--danger-50); color: var(--danger); }
.frow .del svg { width: 15px; height: 15px; }
.frow .pair { display: flex; gap: 6px; align-items: center; }
.frow .pair .input { min-width: 0; }
.frow .pair span { color: var(--text-3); font-size: 11.5px; }
.frow .hint { grid-column: 1 / -1; margin-top: -2px; font-size: 11px; color: var(--text-3); padding-left: 2px; }
.fpanel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.link-btn { border: 0; background: none; color: var(--primary); font: 500 12.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; }
.link-btn svg { width: 14px; height: 14px; }
.link-btn.muted { color: var(--text-2); }

.dd { position: relative; }
.dd-btn { width: 100%; height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; font: 12.5px var(--font); color: var(--text); cursor: pointer; text-align: left; }
.dd-btn .ph { color: var(--text-3); }
.dd-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn svg { width: 14px; height: 14px; flex: none; color: var(--text-3); transition: transform .15s; }
.dd.open .dd-btn { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 320px; z-index: 70; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); padding: 5px; }
.dd-menu .dd-search { margin: 2px 2px 6px; }
.dd-list { max-height: 260px; overflow-y: auto; }
.dd-group { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 8px 9px 4px; }
.dd-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; border-radius: 7px; font-size: 12.5px; cursor: pointer; color: var(--text); }
.dd-item:hover { background: var(--surface-2); }
.dd-item.sel { background: var(--primary-50); color: var(--primary); font-weight: 550; }
.dd-item .ck { width: 14px; height: 14px; flex: none; color: var(--primary); opacity: 0; }
.dd-item.sel .ck { opacity: 1; }
.dd-item .box { width: 15px; height: 15px; border: 1.5px solid var(--border-strong); border-radius: 4px; flex: none; display: grid; place-items: center; background: #fff; }
.dd-item.sel .box { background: var(--primary); border-color: var(--primary); }
.dd-item.sel .box::after { content: ''; width: 7px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.dd-multi .dd-item { justify-content: flex-start; }
.dd-empty { padding: 10px; font-size: 12px; color: var(--text-3); }

.presets { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.active-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--border); background: #fcfcfe; }
.fchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 99px; background: var(--primary-50); border: 1px solid #d8dcff; color: #3c3591; font-size: 11.5px; }
.fchip:hover { text-decoration: none; border-color: var(--primary); }
.fchip i { font-style: normal; color: #7b76c4; }
.fchip b { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fchip span { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; line-height: 1; color: #6b66b8; }
.fchip:hover span { background: #fff; color: var(--danger); }
#tableArea.loading { opacity: .5; pointer-events: none; transition: opacity .15s; }
@media (max-width: 900px) { .frow { grid-template-columns: 1fr 1fr; } .frow .del { justify-self: end; } .filter-panel { width: calc(100vw - 40px); } }

/* ---------- Kâr hesaplama ayarları ---------- */
.model-formula { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text); font-size: 11.5px; }
.rule { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.rule span { color: var(--text-2); line-height: 1.45; }
.auto-note { display: flex; gap: 10px; align-items: flex-start; background: var(--success-50); border: 1px solid #c4e8d3; color: #0b5f31; border-radius: 8px; padding: 9px 12px; font-size: 12px; line-height: 1.5; }
.auto-note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.auto-params { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; }
.auto-params summary { cursor: pointer; font-size: 12px; font-weight: 550; color: var(--text-2); }
.auto-params .field { margin: 0; }
.suffix { position: relative; }
.suffix .input { padding-right: 28px; }
.suffix span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 12px; pointer-events: none; }
.extras { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border-strong); }
.extras-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; font-size: 12.5px; }
.xrow { display: grid; grid-template-columns: minmax(0, 1fr) 190px 130px 30px; gap: 8px; margin-bottom: 6px; align-items: center; }
.xrow .del { width: 30px; height: 28px; border: 0; background: none; color: var(--text-3); cursor: pointer; border-radius: 7px; display: grid; place-items: center; }
.xrow .del:hover { background: var(--danger-50); color: var(--danger); }
.xrow .del svg { width: 14px; height: 14px; }
.save-bar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); }
@media (max-width: 760px) { .xrow { grid-template-columns: 1fr 1fr; } }

/* ---------- Kâr gösterimi ---------- */
.profit { font-weight: 600; font-variant-numeric: tabular-nums; }
.profit.pos { color: var(--success); }
.profit.neg { color: var(--danger); }
.profit-sub { font-size: 10.5px; color: var(--text-3); }
.breakdown { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.breakdown td { padding: 6px 4px; border-bottom: 1px solid var(--border); }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown tr.minus td:last-child { color: var(--text-2); }
.breakdown tr.total td { font-weight: 650; font-size: 13.5px; border-bottom: 0; padding-top: 10px; }
.breakdown .src { font-size: 10.5px; color: var(--text-3); margin-left: 6px; }
.linklike { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: right; }
.cost-fill { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.actuals { margin-top: 10px; border: 1px solid #d8dcff; background: #fbfbff; border-radius: 8px; padding: 10px 12px; }
.actuals-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.actuals-head > div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.actuals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.actuals-grid > div { background: #fff; border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.actuals-grid span { font-size: 11px; color: var(--text-2); }
.actuals-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.actuals-grid i { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.src.actual { color: var(--success); font-weight: 600; }
.auth-side .brand { color: #fff; }

/* Sipariş satırı ürün önizlemesi: üst üste binen yuvarlak görseller */
.pstack { display: inline-flex; align-items: center; padding-left: 6px; }
.pthumb { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -8px; background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border); display: inline-grid; place-items: center; font-size: 10px; font-weight: 650; color: var(--text-2); flex: none; }
.pthumb.ph { background: #eef0f6; letter-spacing: .02em; }
.pthumb.more { background: var(--text); color: #fff; font-size: 10.5px; }
.pstack:hover .pthumb { box-shadow: 0 0 0 1px var(--primary); }
.cost { font-variant-numeric: tabular-nums; }

/* Marka logosu */
.sidebar .brand { padding: 4px 8px 18px; }
.sidebar .brand img { height: 52px; width: auto; max-width: 100%; display: block; }
.sidebar .brand:hover { text-decoration: none; }
.auth-side .brand img { height: 64px; width: auto; display: block; }
.auth-logo { height: 58px; width: auto; display: block; margin-bottom: 26px; }

/* Sidebar alt menü */
/* Alt menülü başlık: düğme (sayfaya gitmez, yalnız alt menüyü açar / kapatır) — bağlantıyla aynı görünüm */
.nav .nav-parent { display: flex; align-items: center; gap: 9px; width: 100%; color: var(--text-2); padding: 7px 10px; border-radius: 7px; font-weight: 500;
  font-size: 12.5px; font-family: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.nav .nav-parent:hover { background: var(--surface-2); color: var(--text); }
.nav .nav-parent.active { background: var(--primary-50); color: var(--primary); font-weight: 600; }
.nav .nav-parent:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav .caret { width: 13px; height: 13px; margin-left: auto; opacity: .6; transition: transform .15s; }
.nav .nav-parent.open .caret { transform: rotate(180deg); }
.subnav { display: none; flex-direction: column; gap: 1px; margin: 1px 0 4px 18px; padding-left: 10px; border-left: 1px solid var(--border); }
.subnav.open { display: flex; }
.subnav a { padding: 6px 10px; font-size: 12px; }
.subnav a.active { background: transparent; color: var(--primary); font-weight: 600; }
.nav-dot { margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--warning); color: #fff; font-size: 10px; font-weight: 700; display: inline-grid; place-items: center; }

/* Yeni ürün formu */
.np-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.np-grid .span-2 { grid-column: span 2; }
.np-grid .span-4 { grid-column: 1 / -1; }
@media (max-width: 900px) { .np-grid { grid-template-columns: 1fr 1fr; } }
.np-section { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; margin-bottom: 8px; }
.np-section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; font-size: 12.5px; }
.dropzone { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 16px;
  color: var(--text-2); font-size: 12.5px; cursor: pointer; background: var(--surface-2); transition: border-color .12s, background .12s; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.dropzone svg { width: 18px; height: 18px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs .t { position: relative; width: 74px; height: 74px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.thumbs .t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .t .main-tag { position: absolute; left: 4px; bottom: 4px; font-size: 9.5px; font-weight: 700; background: var(--primary); color: #fff; padding: 1px 5px; border-radius: 4px; }
.thumbs .t .rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(15,18,36,.7); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.thumbs .t .mv { position: absolute; bottom: 3px; right: 3px; display: flex; gap: 2px; }
.thumbs .t .mv button { width: 18px; height: 18px; border: 0; border-radius: 4px; background: rgba(255,255,255,.9); cursor: pointer; font-size: 10px; padding: 0; }
.attr-row { display: grid; grid-template-columns: 200px 1fr 30px; gap: 8px; margin-bottom: 6px; }
.gen-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.gen-row .field { margin: 0; min-width: 180px; }
.gen-inputs { display: flex; gap: 10px; flex-wrap: wrap; }
.gen-inputs .field { margin: 0; min-width: 200px; }
.np-variants th, .np-variants td { white-space: nowrap; }
.np-variants .input { min-width: 80px; }
.np-variants td.rm-cell { width: 30px; }
.count-pill { font-size: 11px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); padding: 0 7px; border-radius: 99px; color: var(--text-2); }
.img-btn { position: relative; }
.img-count { position: absolute; right: -4px; bottom: -4px; background: var(--text); color: #fff; font-size: 9.5px; font-weight: 700; border-radius: 99px; padding: 0 5px; border: 2px solid #fff; }
.add-img { color: var(--primary); border-style: dashed; }
.np-msg { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }

/* Gönderim paneli (konuşma) */
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.5; white-space: pre-line; }
.bubble.ai { align-self: flex-start; background: #f4f2ff; border: 1px solid #e4dcff; border-top-left-radius: 4px; }
.bubble.user { align-self: flex-end; background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.bubble.system { align-self: center; max-width: 92%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 11.5px; }
.bubble .who { display: block; font-size: 10.5px; font-weight: 600; opacity: .7; margin-bottom: 2px; }
.conflict-card { display: flex; gap: 10px; align-items: center; border: 1px solid #f1dcaa; background: var(--warning-50); border-radius: 10px; padding: 9px 12px; margin: 6px 0; font-size: 12.5px; }
.conflict-card img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.decision-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.reply-box textarea { min-height: 84px; }

/* Yeni ürün: listede satır içi düzenleme */
#npTable tr.editing td { background: var(--primary-50); }
#npTable tr.edit-row > td { padding: 0 10px 14px; background: var(--primary-50); }
.np-form.inline-edit { margin: 0; box-shadow: 0 6px 18px rgba(79, 70, 229, .12); border-color: #d8dcff; }

/* Toplu güncelleme */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td.right, th.right { text-align: right; }
.logo-xs { width: 15px; height: 15px; border-radius: 50%; vertical-align: -3px; }
.back-link { display: inline-block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.chip-main { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 5px 12px 5px 6px; white-space: nowrap; }
.chip-main img { width: 20px; height: 20px; border-radius: 50%; }
.check-label { display: flex; align-items: center; gap: 7px; margin-top: 8px; cursor: pointer; flex-wrap: wrap; }
.bu-upload { margin-bottom: 14px; }
.bu-steps { display: grid; grid-template-columns: 1fr 1.15fr 1.3fr; }
.bu-step { display: flex; gap: 12px; padding: 16px 18px; }
.bu-step + .bu-step { border-left: 1px solid var(--border); }
.bu-step b { font-size: 13px; }
.bu-step p { margin: 3px 0 10px; line-height: 1.5; }
.bu-step-no { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.bu-rules { margin: 6px 0 0; padding-left: 16px; color: var(--text-2); line-height: 1.75; }
.bu-step .btn svg { width: 14px; height: 14px; }
.bu-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.bu-confirm { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; margin-bottom: 14px; border-color: #d8dcff; background: linear-gradient(0deg, var(--primary-50), var(--surface)); }
.bu-confirm p { margin: 3px 0 0; line-height: 1.5; max-width: 760px; }
.bu-product { display: flex; align-items: center; gap: 9px; }
.bu-product .thumb { width: 30px; height: 30px; border-radius: 50%; }
.bu-old { color: var(--text-3); text-decoration: line-through; font-size: 11.5px; }
.bu-arrow { color: var(--text-3); margin: 0 5px; font-size: 11px; }
.bu-new { color: var(--primary); }
.bu-new.done { color: var(--success); }
.bu-new.fail { color: var(--danger); }
.bu-table td svg { width: 13px; height: 13px; vertical-align: -2px; }
.bu-reason { color: var(--text-2); max-width: 360px; line-height: 1.45; }
@media (max-width: 1100px) { .bu-steps { grid-template-columns: 1fr; } .bu-step + .bu-step { border-left: 0; border-top: 1px solid var(--border); } .bu-stats { grid-template-columns: 1fr 1fr; } .bu-confirm { flex-direction: column; align-items: stretch; } }

/* Etiket ayarları */
.lbl-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.lbl-papers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lbl-paper { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.lbl-paper:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
.lbl-paper input { margin-top: 2px; }
.lbl-paper b { display: block; font-size: 12.5px; font-weight: 600; }
.lbl-paper small { color: var(--text-2); font-size: 11px; }
.lbl-preview iframe { width: 100%; height: 640px; border: 0; display: block; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 1100px) { .lbl-layout { grid-template-columns: 1fr; } }

/* Sipariş toplu işlem */
.o-bulk { display: none; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--primary-50); font-size: 12.5px; }
.o-bulk.on { display: flex; }
.o-bulk .sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.oa-table td { vertical-align: middle; }
.oa-table .reason { color: var(--text-2); font-size: 11.5px; }
.oa-warn { margin-bottom: 10px; }
.ship-box { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12px; }
.ship-box span { color: var(--text-2); }
.hist { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.hist li { padding: 6px 0; border-bottom: 1px solid var(--border); display: flex; gap: 8px; align-items: baseline; }
.hist li:last-child { border-bottom: 0; }

/* Alış kaydı */
.pu-new { margin-bottom: 14px; }
.pu-scan { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1.5px dashed var(--primary); border-radius: 10px; background: var(--primary-50); margin-bottom: 12px; }
.pu-scan svg { width: 22px; height: 22px; color: var(--primary); flex: none; }
.pu-scan .input { flex: 1; font-size: 15px; height: 40px; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.pu-lines tfoot td { border-top: 1px solid var(--border); background: var(--surface-2); }
.pu-lines td .xs { margin-top: 2px; }
.pu-flash { animation: puflash 1.2s ease-out; }
@keyframes puflash { from { background: #e7f8ee; } to { background: transparent; } }
.pu-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.pu-pay { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.pu-pay-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pu-pay-rows label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.pu-quick { margin-top: 6px; }
.pu-remain { margin-top: 8px; font-size: 12.5px; font-weight: 600; }
.pu-remain.ok { color: var(--success); }
.pu-remain.bad { color: var(--danger); }
.pu-detail td { background: var(--surface-2); }
@media (max-width: 1100px) { .pu-grid { grid-template-columns: 1fr; } }
.pu-search { position: relative; flex: 1; }
.pu-search .input { width: 100%; }
.pu-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 18, 36, .14); max-height: 380px; overflow-y: auto; padding: 4px; }
.pu-sg { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.pu-sg:hover, .pu-sg.active { background: var(--primary-50); }
.pu-sg .thumb { width: 32px; height: 32px; border-radius: 50%; }
.pu-sg .info { flex: 1; min-width: 0; }
.pu-sg .info div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pu-sg .meta { text-align: right; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.pu-sg mark { background: #fff1b8; color: inherit; padding: 0; border-radius: 2px; }
.pu-sg-empty { padding: 10px 12px; font-size: 12px; color: var(--text-2); }
.pu-cancelled td { color: var(--text-3); }
.pu-cancelled td b, .pu-cancelled td .num { text-decoration: line-through; }
.pu-payin { display: flex; gap: 4px; }
.pu-payin .input { flex: 1; min-width: 0; }
.pu-payin .btn { flex: none; }
.pu-stock { display: inline-flex; gap: 3px; text-decoration: none; }
.page-tabs { margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 10px; }
.sm-ai { margin-top: 4px; padding: 4px 7px; border-radius: 6px; background: #f5f0ff; color: #5b21b6; }
.sm-ai svg { width: 12px; height: 12px; vertical-align: -2px; }
.sm-actions { display: flex; flex-direction: column; gap: 4px; align-items: stretch; min-width: 118px; }
.sm-actions .btn { justify-content: center; }
.ss-today { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ss-today div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.ss-today span { display: block; font-size: 11px; color: var(--text-2); }
.ss-today b { font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .ss-today { grid-template-columns: repeat(3, 1fr); } }
.ss-today .ss-today-profit { border-color: var(--success, #16a34a); }
.ss-today .ss-today-profit b { color: var(--success, #16a34a); }
.ss-profit { margin: 8px 0 0; padding: 8px 10px; background: var(--surface-2, #f8fafc); border: 1px solid var(--border); border-radius: 8px; white-space: pre-wrap; font-family: inherit; max-width: 420px; }
.ss-store-ico { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2, #f1f5f9); display: inline-flex; align-items: center; justify-content: center; }
.ss-store-ico svg { width: 15px; height: 15px; }
.ss-warn { color: var(--danger); font-weight: 600; }
.rp-filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 14px; margin-bottom: 12px; align-items: flex-start; }
.rp-filters .field { margin: 0; }
.rp-sum { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-sum div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.rp-sum span { display: block; font-size: 11px; color: var(--text-2); }
.rp-sum b { font-size: 14px; font-variant-numeric: tabular-nums; }
@media (max-width: 1100px) { .rp-sum { grid-template-columns: repeat(2, 1fr); } }

/* Raporlar: satış, kâr / zarar, komisyon, iade */
.text-warning { color: var(--warning); }
.rp-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.rp-sum .delta { display: inline-block; font-size: 11px; margin-left: 6px; font-weight: 600; }
.rp-sum .delta.up { color: var(--success); }
.rp-sum .delta.down { color: var(--danger); }
.rp-sum .rp-net { border-color: var(--success); background: var(--success-50); }
.rp-sum .rp-net b { color: var(--success); font-size: 15px; }
.rp-sum .rp-net.neg { border-color: var(--danger); background: var(--danger-50); }
.rp-sum .rp-net.neg b { color: var(--danger); }
.rp-logo { width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; margin-right: 6px; }
.rp-share { display: inline-block; width: 38px; height: 4px; border-radius: 2px; background: var(--surface-2); margin-right: 6px; vertical-align: middle; overflow: hidden; }
.rp-share i { display: block; height: 100%; background: var(--primary); border-radius: 2px; }
.rp-chart { width: 100%; height: auto; max-height: 260px; display: block; overflow: visible; }
.rp-chart .rp-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rp-chart .rp-axis { fill: var(--text-3); font-size: 10px; }
.rp-chart .rp-fill { fill: var(--primary); opacity: .85; }
.rp-chart .rp-hit { fill: transparent; }
.rp-chart .rp-bar:hover .rp-fill { opacity: 1; }
.rp-chart .rp-bar:hover .rp-hit { fill: var(--primary-50); opacity: .5; }
.rp-details summary { padding: 11px 14px; cursor: pointer; }
.rp-pl-grid { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1100px) { .rp-pl-grid { grid-template-columns: 1fr; } }
.rp-pl td:first-child { white-space: nowrap; }
.rp-pl .rp-tot { background: var(--surface-2); font-weight: 600; }
.rp-pl .rp-strong td { font-weight: 600; }
.rp-pl .rp-sub td { border-top: 1px solid var(--border-strong); font-weight: 600; }
.rp-pl .rp-net-row td { border-top: 2px solid var(--text); font-weight: 700; font-size: 13.5px; }
.rp-notes dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; margin: 0; }
.rp-notes dt { color: var(--text-2); font-size: 12px; }
.rp-notes dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rp-exp-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.rp-exp-form .field { margin: 0; }
.rp-ch-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-ch { padding: 12px 14px; }
.rp-ch-head { display: flex; align-items: center; gap: 4px; }
.rp-ch-head .xs { margin-left: auto; }
.rp-ch-rate { font-size: 22px; font-weight: 700; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.rp-reason { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 8px; font-size: 12.5px; }
.rp-reason i { grid-column: 1 / -1; height: 5px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.rp-reason em { display: block; height: 100%; background: var(--danger); opacity: .7; border-radius: 3px; }
.rp-why { margin: 6px 0 6px 18px; padding: 0; }
.rp-why li { margin: 2px 0; }

/* Ayarlar → Stok ve fiyat kuralları */
.rl-intro ul { margin: 6px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--text-2); }
.rl-intro li { margin: 4px 0; }
.rl-table td { vertical-align: middle; }
.rl-table .rl-off > * { visibility: hidden; }
.rl-table .center { text-align: center; }
.settings-layout > div { min-width: 0; }
.rl-table select[name$="[mode]"] { min-width: 210px; }
.rl-table select[name$="[source]"] { min-width: 140px; }
.rl-table select[name$="[rounding]"] { min-width: 150px; }

/* Ayarlar → Otomatik senkron (cron) */
.cron-cmd { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.cron-cmd code { flex: 1; font-size: 11.5px; word-break: break-all; }
.cron-plan { margin: 0 0 10px 18px; padding: 0; color: var(--text-2); }
.cron-plan li { margin: 3px 0; }

/* Raporlar → Ürün kârlılığı */
.rp-head-wrap { flex-wrap: wrap; gap: 8px; }
.pp-table tr.pp-loss td { background: var(--danger-50); }
.pp-note { max-width: 170px; }

/* Raporlar → Stok devir / ölü stok */
.sr-table tr.sr-dead td { background: var(--danger-50); }
.rp-sum .rp-alert { border-color: var(--danger); }

/* Kenar çubuğu: Yönetim / Ayarlar altta sabit; üst menü uzarsa kendi içinde kayar */
.sidebar > .nav:not(.nav-bottom) { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.sidebar-foot .nav-bottom { margin-bottom: 10px; }
.sidebar-foot .nav-bottom .nav-section { padding-top: 0; }

/* Raporlar → Kanal karşılaştırma */
.ch-table td:first-child { white-space: nowrap; color: var(--text-2); }
.ch-table .ch-strong td { font-weight: 600; color: var(--text); }
.ch-best { background: var(--success-50); color: var(--success); }
.ch-best b { color: var(--success); }
.ch-matrix .ch-group { border-left: 1px solid var(--border); }
.ch-matrix th.center { text-align: center; }

/* Sağ üst: mağaza logosu (büyütülmüş yuvarlak) */
.topbar { height: 60px; }
.avatar.store-logo { width: 42px; height: 42px; font-size: 14px; overflow: hidden; border: 1px solid var(--border); background: #fff; color: var(--primary); text-decoration: none; }
.avatar.store-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.avatar.store-logo:not(:has(img)) { background: var(--primary-50); }

/* Kenar çubuğu: dikey reklam alanı */
.side-ad { display: block; margin-bottom: 10px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.side-ad img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: cover; }
.side-ad-empty { height: 200px; border: 1.5px dashed var(--border-strong); background: var(--surface-2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.side-ad-empty small { font-weight: 500; font-size: 10.5px; }
@media (max-height: 760px) { .side-ad { display: none; } }

/* Ayarlar → Mağaza logosu */
.logo-body { display: flex; gap: 16px; align-items: center; }
.logo-preview { width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--border); background: #fff; overflow: hidden; display: grid; place-items: center; flex: none; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview span { font-size: 26px; font-weight: 700; color: var(--primary); }
.logo-upload label { cursor: pointer; margin: 0; }

/* Satış fiyatı belirle */
.pr-form { padding: 14px 16px; margin-bottom: 14px; }
.pr-step { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 10px 0 6px; display: flex; align-items: center; gap: 7px; }
.pr-step:first-of-type { margin-top: 0; }
.pr-step b { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; font-size: 11px; }
.pr-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.pr-row .field, .pr-form > .field { margin: 0; }
.pr-form > .field select { max-width: 280px; }
.pr-table tr.pr-off td { background: var(--surface-2); }
.pr-price input { width: 100px; text-align: right; font-weight: 600; }
.pr-break { min-width: 240px; max-width: 360px; }
/* Fiyat tablosu: kutu ekran yüksekliğiyle sınırlı → yatay kaydırma çubuğu hep görünür, başlık sabit */
.pr-scroll { max-height: calc(100vh - 230px); overflow: auto; }
.pr-scroll thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); box-shadow: inset 0 -1px 0 var(--border); }
.pr-table .pr-reason { white-space: normal; display: inline-block; max-width: 160px; text-align: left; }
.pr-table .pr-prod { min-width: 170px; max-width: 230px; }
.pr-table .pr-title { font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1280px) { .pr-table th, .pr-table td { padding-left: 8px; padding-right: 8px; } .pr-price input { width: 84px; } }
/* Gider dökümü: her gider ayrı etiket, sığmayan alt satıra */
.cost-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.cost-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); font-size: 11px; line-height: 1.5; white-space: nowrap; }
.cost-chip span { color: var(--text-2); }
.cost-chip b { font-weight: 600; color: var(--text); }
.cost-chip.is-credit { border-color: #bfe3cf; background: var(--success-50, #ecf8f1); }
.cost-chip.is-credit b { color: var(--success); }

/* Kenar çubuğu: SuSoftech ev reklamı — yazısız görsel üstte, gerçek logo + HTML yazı altta koyu zeminde */
.side-ad-house { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 196px; padding: 12px 13px 11px;
  background: #030b2c center top / 100% auto no-repeat; border-color: rgba(25, 195, 200, .25); color: #fff; text-decoration: none;
  box-shadow: 0 6px 18px rgba(11, 18, 64, .18); transition: transform .2s ease, box-shadow .2s ease; }
.side-ad-house::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3, 11, 44, .30) 0%, rgba(3, 11, 44, 0) 22%, rgba(3, 11, 44, 0) 46%, rgba(3, 11, 44, .85) 68%, #030b2c 80%); }
.side-ad-house:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 18, 64, .26); text-decoration: none; }
.side-ad-house > * { position: relative; z-index: 1; }
.side-ad-house .side-ad-logo { width: 84px; height: auto; max-height: none; object-fit: contain; opacity: .95; }
.side-ad-copy { display: flex; flex-direction: column; gap: 4px; }
.side-ad-copy b { font-size: 14px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
.side-ad-copy small { font-size: 11px; font-weight: 500; color: #8ff0f2; letter-spacing: .01em; }

/* Satış fiyatı belirle: canlı ürün arama + seçilen ürün etiketleri */
.pr-search { flex: none; }
.pr-picker { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 34px; padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; cursor: text; }
.pr-picker:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); }
.pr-q { flex: 1; min-width: 160px; border: 0; outline: 0; font: inherit; font-size: 12.5px; padding: 3px 2px; background: transparent; }
.pr-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 260px; padding: 2px 4px 2px 9px; border-radius: 99px; background: var(--primary-50); color: var(--primary);
  font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-chip button { border: 0; background: transparent; color: inherit; font-size: 14px; line-height: 1; cursor: pointer; padding: 0 4px; opacity: .7; }
.pr-chip button:hover { opacity: 1; }
.pu-sg.picked { opacity: .65; }

/* Canlı seçim (cari / tedarikçi / müşteri) */
.ls { flex: 1; min-width: 0; }
.ls-box { position: relative; }
.ls-input { width: 100%; padding-right: 30px; }
.ls-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 16px; line-height: 1; color: var(--text-3); cursor: pointer; padding: 2px 6px; }
.ls-clear:hover { color: var(--text); }
.ls-opt { font-size: 12.5px; }
.ls-opt.picked { font-weight: 600; color: var(--primary); opacity: 1; }

/* Ürünler: eşleşme / anlık kâr seçimi, fiyat rozetleri */
.pp-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.pp-switch .chip b { font-weight: 600; margin-left: 2px; }
.pp-sep { width: 1px; height: 16px; background: var(--border); margin: 0 6px; }
.pp-bb { margin-left: auto; }
.pp-badge { font-size: 10px; padding: 1px 6px; margin-top: 3px; }
