/* Otomat Paneli — Bootstrap 5.3 üzerine tema */
:root {
  --app-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 256px;
  --sidebar-bg: #0f172a;
  --sidebar-fg: #cbd5e1;
  --sidebar-muted: #64748b;
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active: rgba(99, 140, 255, .16);
  --sidebar-active-fg: #ffffff;
  --accent: #2f5bea;
  --bs-primary: #2f5bea;
  --bs-primary-rgb: 47, 91, 234;
  --bs-link-color: #2f5bea;
  --bs-link-color-rgb: 47, 91, 234;
  --bs-body-font-family: var(--app-font);
  --bs-body-bg: #f4f6fb;
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: .75rem;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --chart-series: #2a78d6;
  --chart-series-soft: rgba(42, 120, 214, .14);
  --chart-grid: rgba(15, 23, 42, .07);
  --chart-text: #64748b;
  --good: #0a8a0a;
  --bad: #c02f2f;
}
[data-bs-theme="dark"] {
  --bs-body-bg: #0b1120;
  --bs-body-color: #e2e8f0;
  --bs-secondary-color: rgba(226, 232, 240, .65);
  --bs-tertiary-bg: #131c2e;
  --bs-border-color: #1f2a40;
  --bs-primary: #5b7ff0;
  --bs-primary-rgb: 91, 127, 240;
  --bs-link-color: #8ea6ff;
  --bs-link-color-rgb: 142, 166, 255;
  --card-bg: #111a2c;
  --card-shadow: 0 0 0 1px #1f2a40;
  --sidebar-bg: #070c18;
  --chart-series: #3987e5;
  --chart-series-soft: rgba(57, 135, 229, .2);
  --chart-grid: rgba(226, 232, 240, .08);
  --chart-text: #94a3b8;
  --good: #3fbf3f;
  --bad: #f07070;
  color-scheme: dark;
}

body { background: var(--bs-body-bg); font-feature-settings: "tnum" 1, "cv11" 1; }
.min-w-0 { min-width: 0; }
.tnum { font-variant-numeric: tabular-nums; }

/* Butonlar */
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: #2449c4; --bs-btn-hover-border-color: #2449c4; --bs-btn-active-bg: #1f3fae; --bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); }
.btn-outline-primary { --bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary); }
.btn-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--bs-body-color); border: 1px solid var(--bs-border-color); background: var(--card-bg); }
.btn-icon:hover { background: var(--bs-tertiary-bg); }
.btn-icon.spinning i { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-primary { color: var(--bs-primary) !important; }
.bg-primary { background-color: var(--bs-primary) !important; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .18); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }

/* Giriş */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(47, 91, 234, .18), transparent 60%),
              radial-gradient(900px 500px at 110% 110%, rgba(27, 175, 122, .14), transparent 60%), var(--bs-body-bg); }
.login-card { width: 100%; max-width: 420px; border-radius: 1.25rem; background: var(--card-bg); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2f5bea, #5b8cff); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex: none; box-shadow: 0 6px 16px rgba(47, 91, 234, .35); }

/* Yerleşim */
.sidebar { background-color: var(--sidebar-bg) !important; color: var(--sidebar-fg); width: var(--sidebar-w); display: flex; flex-direction: column; }
.sidebar .fw-bold { color: #fff; }
@media (min-width: 992px) {
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1030; }
  .main { margin-left: var(--sidebar-w); }
}
@media (max-width: 991.98px) { .sidebar.offcanvas-lg { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--sidebar-bg); } }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; }
.sidebar-sub { color: var(--sidebar-muted); font-size: .78rem; margin-top: 4px; }
.sidebar-nav { padding: 6px 12px; overflow-y: auto; flex: 1; }
.sidebar-nav .nav-section { text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; color: var(--sidebar-muted); padding: 16px 12px 6px; font-weight: 600; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--sidebar-fg); text-decoration: none; font-weight: 500; font-size: .92rem; margin-bottom: 2px; }
.sidebar-nav a i { font-size: 1.05rem; opacity: .85; width: 20px; text-align: center; }
.sidebar-nav a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav a.active { background: var(--sidebar-active); color: var(--sidebar-active-fg); box-shadow: inset 3px 0 0 #6f8fff; }
.sidebar-foot { color: var(--sidebar-muted); padding: 14px 22px; border-top: 1px solid rgba(255, 255, 255, .06); }

.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bs-body-bg) 82%, transparent); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--bs-border-color); }
.page-title { font-size: 1.2rem; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.content { padding: 24px; max-width: 1480px; }
@media (max-width: 575.98px) { .content { padding: 16px; } .topbar { padding: 10px 16px; } }

.user-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bs-border-color); background: var(--card-bg); border-radius: 999px; padding: 3px 12px 3px 3px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #2f5bea); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }

/* Senkron göstergesi */
.sync-pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--bs-border-color); background: var(--card-bg); border-radius: 999px; padding: 6px 12px; font-size: .82rem; color: var(--bs-secondary-color); white-space: nowrap; }
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.sync-pill.ok .dot { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.sync-pill.busy .dot { background: #2f5bea; animation: pulse 1s ease-in-out infinite; }
.sync-pill.err .dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); }
.sync-pill.err { color: #dc2626; border-color: rgba(220, 38, 38, .35); }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 575.98px) { .sync-pill .txt { display: none; } }

/* Kartlar */
.card { --bs-card-bg: var(--card-bg); --bs-card-border-width: 0; box-shadow: var(--card-shadow); border-radius: 14px; }
.card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color); padding: 14px 18px; }
.card-title-sm { font-size: .95rem; font-weight: 650; margin: 0; }
.card-sub { font-size: .8rem; color: var(--bs-secondary-color); }

.kpi { padding: 18px; height: 100%; }
.kpi .label { font-size: .82rem; color: var(--bs-secondary-color); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .meta { font-size: .8rem; color: var(--bs-secondary-color); margin-top: 6px; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; flex: none; }
.kpi-icon.blue { background: rgba(47, 91, 234, .12); color: #2f5bea; }
.kpi-icon.green { background: rgba(22, 163, 74, .12); color: #16a34a; }
.kpi-icon.amber { background: rgba(234, 160, 0, .14); color: #b97c00; }
.kpi-icon.violet { background: rgba(124, 58, 237, .12); color: #7c3aed; }
[data-bs-theme="dark"] .kpi-icon.blue { color: #8ea6ff; }
[data-bs-theme="dark"] .kpi-icon.green { color: #4ade80; }
[data-bs-theme="dark"] .kpi-icon.amber { color: #fbbf24; }
[data-bs-theme="dark"] .kpi-icon.violet { color: #a78bfa; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

/* Tablolar */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .7rem .9rem; border-bottom-color: var(--bs-border-color); }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--bs-secondary-color); font-weight: 600; background: var(--bs-tertiary-bg); white-space: nowrap; border-bottom: 0; }
.table thead th:first-child { border-top-left-radius: 8px; }
.table thead th:last-child { border-top-right-radius: 8px; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: rgba(var(--bs-primary-rgb), .04); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--bs-border-color); border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.prod-name { font-weight: 550; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; color: var(--bs-secondary-color); }
.thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--bs-tertiary-bg); flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--bs-secondary-color); }

.share-bar { height: 6px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; min-width: 60px; }
.share-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--chart-series); }

.stock-bar { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.stock-bar .track { flex: 1; height: 8px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; }
.stock-bar .fill { height: 100%; border-radius: 999px; background: #16a34a; }
.stock-bar .fill.low { background: #eaa000; }
.stock-bar .fill.empty { background: #dc2626; }
.stock-bar .lbl { font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; min-width: 42px; text-align: right; }

.status-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status-badge.ok { background: rgba(22, 163, 74, .12); color: #15803d; }
.status-badge.warn { background: rgba(234, 160, 0, .16); color: #a16207; }
.status-badge.bad { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.status-badge.muted { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
[data-bs-theme="dark"] .status-badge.ok { color: #4ade80; }
[data-bs-theme="dark"] .status-badge.warn { color: #fbbf24; }
[data-bs-theme="dark"] .status-badge.bad { color: #f87171; }

/* Filtre çubuğu */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--bs-border-color); background: var(--card-bg); color: var(--bs-body-color); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 500; }
.chip:hover { border-color: rgba(var(--bs-primary-rgb), .5); }
.chip.active { background: rgba(var(--bs-primary-rgb), .12); border-color: rgba(var(--bs-primary-rgb), .55); color: var(--bs-primary); }
.date-range { display: inline-flex; align-items: center; gap: 6px; }
.date-range input { max-width: 160px; }

.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

.empty-state { text-align: center; padding: 40px 16px; color: var(--bs-secondary-color); }
.empty-state i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .6; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--bs-border-color); }
.list-row:last-child { border-bottom: 0; }

.nav-tabs-modern { border-bottom: 1px solid var(--bs-border-color); gap: 4px; }
.nav-tabs-modern .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--bs-secondary-color); font-weight: 550; padding: 10px 14px; border-radius: 0; background: none; }
.nav-tabs-modern .nav-link.active { color: var(--bs-primary); border-bottom-color: var(--bs-primary); background: none; }

.erp-input { min-width: 140px; }
.erp-input.saved { border-color: #16a34a; }
.erp-input.failed { border-color: #dc2626; }

.img-drop { border: 2px dashed var(--bs-border-color); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: var(--bs-secondary-color); }
.img-drop:hover { border-color: rgba(var(--bs-primary-rgb), .6); }
.img-drop img { max-height: 140px; border-radius: 8px; }

.skeleton { background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, color-mix(in srgb, var(--bs-tertiary-bg) 60%, var(--card-bg)) 50%, var(--bs-tertiary-bg) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

.toast { border: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.modal-content { border-radius: 16px; background: var(--card-bg); }
.dropdown-menu { --bs-dropdown-bg: var(--card-bg); border-radius: 12px; }
.pw-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; background: var(--bs-tertiary-bg); padding: 10px 14px; border-radius: 8px; user-select: all; word-break: break-all; }
.btn-ghost { --bs-btn-color: var(--bs-body-color); --bs-btn-bg: var(--bs-tertiary-bg); --bs-btn-border-color: var(--bs-border-color); --bs-btn-hover-bg: rgba(var(--bs-primary-rgb), .1); --bs-btn-hover-border-color: rgba(var(--bs-primary-rgb), .45); --bs-btn-hover-color: var(--bs-primary); --bs-btn-disabled-bg: var(--bs-tertiary-bg); --bs-btn-disabled-border-color: var(--bs-border-color); --bs-btn-disabled-opacity: .45; }
.badge.text-bg-light { background: var(--bs-tertiary-bg) !important; color: var(--bs-body-color) !important; }
.thumb-lg { width: 56px; height: 56px; border-radius: 10px; }
.thumb-xl { width: 160px; height: 160px; border-radius: 14px; }
img.thumb, img.thumb-lg { object-fit: cover; border: 1px solid var(--bs-border-color); background: #fff; }
details > summary { cursor: pointer; }
.slot-badges { min-width: 150px; }
.slot-badges .badge { margin: 1px 2px 1px 0; font-weight: 600; }

/* ---- Otomat görünümü ---- */
.vm-wrap { overflow-x: auto; padding-bottom: 6px; }
.vm-cabinet { min-width: 900px; max-width: 1280px; margin: 0 auto; background: linear-gradient(180deg, #273244, #151c2a); border-radius: 26px; padding: 16px 18px 18px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.06), 0 24px 48px rgba(15,23,42,.28); }
.vm-top { display: flex; align-items: center; justify-content: space-between; color: #cbd5e1; font-weight: 600; font-size: .9rem; padding: 2px 6px 12px; }
.vm-led { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.vm-glass { background: linear-gradient(135deg, rgba(186,230,253,.10), rgba(255,255,255,.03) 40%, rgba(186,230,253,.07)); border-radius: 16px; padding: 10px 12px 4px 34px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.vm-shelf { position: relative; margin-bottom: 10px; }
.vm-shelf-no { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); color: #64748b; font-weight: 700; font-size: .8rem; }
.vm-row { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; padding: 8px 6px 10px; border-bottom: 7px solid #94a3b8; border-image: linear-gradient(180deg, #cbd5e1, #64748b) 1; }
.vm-shelf-empty .vm-row { display: block; padding: 6px; }
.vm-empty-note { color: #64748b; font-size: .78rem; }
.vm-gap { border: 1px dashed rgba(148,163,184,.25); border-radius: 10px; min-height: 60px; }
.vm-slot { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px 6px 0; border: 0; border-radius: 10px; background: #f8fafc; color: #0f172a; text-align: left; overflow: hidden; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 2px 6px rgba(0,0,0,.25); }
.vm-slot:hover, .vm-slot:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px #60a5fa, 0 8px 16px rgba(0,0,0,.35); outline: none; }
.vm-no { position: absolute; top: 4px; left: 5px; z-index: 2; font: 700 .66rem ui-monospace, Menlo, Consolas, monospace; background: rgba(15,23,42,.78); color: #fff; padding: 1px 5px; border-radius: 6px; }
.vm-img { display: flex; align-items: center; justify-content: center; height: 86px; color: #94a3b8; font-size: 1.6rem; }
.vm-img img { max-width: 100%; max-height: 86px; object-fit: contain; }
.vm-name { font-size: .7rem; font-weight: 600; line-height: 1.2; height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.vm-stock { display: flex; align-items: center; gap: 5px; font-size: .7rem; color: #475569; font-variant-numeric: tabular-nums; }
.vm-stock b { color: #0f172a; }
.vm-bar { flex: 1; height: 5px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.vm-bar > span { display: block; height: 100%; background: #16a34a; border-radius: 999px; }
.vm-tag { margin: 2px -6px 0; padding: 4px 6px; background: #0b1220; color: #fde047; text-align: center; font: 700 .82rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.vm-low .vm-bar > span { background: #eaa000; }
.vm-low { box-shadow: 0 0 0 2px #eaa000, 0 2px 6px rgba(0,0,0,.25); }
.vm-empty .vm-img img { filter: grayscale(1); opacity: .45; }
.vm-empty { box-shadow: 0 0 0 2px #dc2626, 0 2px 6px rgba(0,0,0,.25); }
.vm-off { background: repeating-linear-gradient(135deg, #e5e7eb, #e5e7eb 8px, #f1f5f9 8px, #f1f5f9 16px); }
.vm-off .vm-img img { filter: grayscale(1); opacity: .4; }
.vm-ribbon { position: absolute; top: 40px; left: 50%; transform: translateX(-50%) rotate(-8deg); background: #dc2626; color: #fff; font-weight: 800; font-size: .66rem; letter-spacing: .08em; padding: 2px 8px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.vm-off .vm-ribbon { background: #475569; }
.vm-bottom { margin: 14px auto 0; width: 46%; height: 46px; border-radius: 10px; background: linear-gradient(180deg, #0b1220, #1e293b); box-shadow: inset 0 4px 10px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; color: #475569; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.vm-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--bs-secondary-color); }
.vm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vm-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.vm-dot.ok { background: #16a34a; } .vm-dot.low { background: #eaa000; } .vm-dot.empty { background: #dc2626; } .vm-dot.off { background: #64748b; }
.vm-modal-img { max-height: 180px; max-width: 100%; object-fit: contain; border-radius: 12px; }

/* bildirimler */
#alerts-panel { --bs-offcanvas-bg: var(--card-bg); }
.alert-item { display: flex; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--bs-border-color); }
.alert-item.unread { background: rgba(var(--bs-primary-rgb), .06); }
.alert-item > i { font-size: 1.1rem; margin-top: 2px; }
#alert-badge { font-size: .62rem; }

/* canlıya al */
.publish-btn { font-weight: 600; border-radius: 999px; padding: 6px 14px; display: inline-flex; align-items: center; white-space: nowrap; box-shadow: 0 0 0 3px rgba(234,160,0,.25); }
.publish-btn .pub-sub { font-weight: 500; font-size: .72rem; opacity: .85; margin-left: 8px; }
.vm-pending { position: absolute; top: 4px; right: 5px; z-index: 2; background: #eaa000; color: #fff; border-radius: 6px; padding: 0 5px; font-size: .7rem; }
@media (max-width: 575.98px) { .publish-btn .pub-sub { display: none; } }

/* ürün kartı */
.clickable { cursor: pointer; }
tr.clickable:hover > *, .list-row.clickable:hover { background: rgba(var(--bs-primary-rgb), .05); }
.product-drawer { --bs-offcanvas-width: min(760px, 100vw); --bs-offcanvas-bg: var(--card-bg); display: flex; flex-direction: column; }
.pd-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--bs-border-color); }
.pd-title { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.3; }
.pd-img { width: 112px; height: 112px; border-radius: 14px; border: 1px solid var(--bs-border-color); background: #fff; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; flex: none; color: #94a3b8; font-size: 2rem; margin: 0; }
.pd-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pd-img.editable { cursor: pointer; }
.pd-img-edit { position: absolute; right: 6px; bottom: 6px; background: rgba(15,23,42,.75); color: #fff; border-radius: 8px; padding: 2px 6px; font-size: .8rem; }
.pd-img.editable:hover { box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .35); }
.pd-chip { font-size: .75rem; background: var(--bs-tertiary-bg); border-radius: 999px; padding: 2px 9px; color: var(--bs-secondary-color); font-family: ui-monospace, Menlo, Consolas, monospace; }
.pd-chip b { color: var(--bs-body-color); }
.pd-chip.warn { background: rgba(234,160,0,.16); color: #a16207; }
.product-drawer .nav-tabs-modern { padding-top: 6px; }
.pd-body { flex: 1; overflow-y: auto; padding: 18px 20px 90px; }
.pd-savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: color-mix(in srgb, var(--card-bg) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--bs-border-color); box-shadow: 0 -8px 20px rgba(0,0,0,.08); }
.pd-slot { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 14px; margin-bottom: 12px; transition: box-shadow .2s; }
.pd-slot.focus { box-shadow: 0 0 0 2px var(--bs-primary); }
.pd-slot.dirty { border-color: #eaa000; }
.pd-slotno { font: 700 .95rem ui-monospace, Menlo, Consolas, monospace; background: #0f172a; color: #fff; border-radius: 8px; padding: 2px 8px; }
.pd-kpi { background: var(--bs-tertiary-bg); border-radius: 10px; padding: 10px 12px; }

/* marka */
.sidebar-logo { height: 30px; width: auto; display: block; }
.sidebar-brand { padding: 22px 20px 16px; }
.login-logo { height: 40px; width: auto; }
.logo-on-dark { display: none; }
[data-bs-theme="dark"] .login-logo.logo-on-light { display: none; }
[data-bs-theme="dark"] .login-logo.logo-on-dark { display: inline-block; }

/* makine seçici */
.machine-select { border: 1px solid var(--bs-border-color); background: var(--card-bg); border-radius: 999px; padding: 6px 12px; font-size: .85rem; font-weight: 600; max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#machine-select-menu { min-width: 280px; }
#machine-select-menu .dropdown-item { display: flex; align-items: center; gap: 10px; }
#machine-select-menu .dropdown-item .sub { font-size: .75rem; color: var(--bs-secondary-color); }
.m-dot { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; flex: none; }
.m-dot.on { background: #16a34a; } .m-dot.off { background: #dc2626; }
.vm-cabinet + .vm-cabinet { margin-top: 24px; }
.vm-cab-head { display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: .9rem; }
.vm-cab-head .city { color: #64748b; }
/* ürün seçici */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.pk-card { border: 2px solid var(--bs-border-color); border-radius: 12px; padding: 8px; background: var(--card-bg); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 4px; position: relative; }
.pk-card:hover { border-color: rgba(var(--bs-primary-rgb), .5); }
.pk-card.sel { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .18); }
.pk-card .img { height: 84px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 1.6rem; }
.pk-card .img img { max-height: 84px; max-width: 100%; object-fit: contain; }
.pk-card .nm { font-size: .78rem; font-weight: 600; line-height: 1.2; height: 2.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pk-card .pr { font-weight: 700; font-size: .85rem; }
.pk-card .tag { position: absolute; top: 6px; right: 6px; font-size: .62rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(15,23,42,.8); color: #fff; }
.pk-card .tag.here { background: #eaa000; }
.pk-sel { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 12px; background: var(--bs-tertiary-bg); }
.fleet-card { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 14px; }
/* üst çubuk sıkışması */
.topbar .page-title { white-space: nowrap; }
@media (max-width: 1600px) { #sync-pill .txt { display: none; } .publish-btn .pub-sub { display: none; } }
@media (max-width: 1300px) { #machine-pill .txt { display: none; } }
.pk-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .12em; background: var(--bs-tertiary-bg); border: 1px dashed var(--bs-border-color); border-radius: 8px; padding: 2px 8px; }
.pk-code.big { font-size: 1.4rem; padding: 6px 14px; background: #fff; color: #0f172a; }

/* sıralanabilir tablo başlıkları */
.table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sortable::after { content: "\2195"; display: inline-block; margin-left: .3rem; opacity: .35; font-size: .8em; }
.table th.sortable:hover::after { opacity: .7; }
.table th.sortable[data-dir="asc"]::after { content: "\2191"; opacity: 1; color: var(--bs-primary); }
.table th.sortable[data-dir="desc"]::after { content: "\2193"; opacity: 1; color: var(--bs-primary); }
.table th.num.text-start { text-align: left; }
/* onay kutusu açık bir modal'ın üstüne gelir */
#confirm { z-index: 1075; }
.modal-backdrop + .modal-backdrop { z-index: 1070; }

/* ürün detay görselleri */
.pd-gal { display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-gal-item { position: relative; width: 84px; height: 84px; border: 1px solid var(--bs-border-color); border-radius: 10px; overflow: hidden; background: var(--bs-tertiary-bg); }
.pd-gal-item img { width: 100%; height: 100%; object-fit: cover; }
.pd-gal-item.new { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.pd-gal-new { position: absolute; left: 4px; bottom: 4px; font-size: .65rem; background: var(--bs-primary); color: #fff; border-radius: 4px; padding: 0 4px; }
.pd-gal-x { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; line-height: 1; padding: 0; }
.pd-gal-x:hover { background: var(--bs-danger); }

/* ürün etiketleri */
.tg-img { width: 48px; height: 28px; object-fit: contain; border-radius: 6px; background: var(--bs-tertiary-bg); flex: 0 0 auto; }
.tg-img.lg { width: 96px; height: 48px; }
.pk-card.static { cursor: default; position: relative; }
.pk-card.static .pd-gal-x { top: 4px; right: 4px; }

/* teslim kodu seçici: Haloo'nun 30 karakter sınırı */
.pk-card.toolong { cursor: not-allowed; border-style: dashed; }
.pk-card.toolong .nm { opacity: .6; }
.pk-warn { font-size: .7rem; color: #a16207; }

/* ürün kartı: üstte görseller + fiyat */
.pd-img.sm { width: 56px; height: 56px; border-radius: 10px; font-size: 1.3rem; }
.pd-media { display: flex; gap: 18px; align-items: flex-start; }
.pd-media-left { flex: 0 0 200px; max-width: 200px; }
.pd-media-right { flex: 1; min-width: 0; }
.pd-mainimg { display: flex; align-items: center; justify-content: center; width: 200px; height: 200px; border-radius: 14px; border: 1px solid var(--bs-border-color); background: #fff; overflow: hidden; position: relative; margin: 0; color: #94a3b8; font-size: 2.4rem; }
.pd-mainimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pd-mainimg.editable { cursor: pointer; }
.pd-mainimg.editable:hover { box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .35); }
.pd-mainimg .pd-img-edit { right: 8px; bottom: 8px; }
.pd-media-left .pd-gal-item { width: 60px; height: 60px; border-radius: 8px; }
.pd-section { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.pd-section-title { font-weight: 600; font-size: .9rem; margin-bottom: 8px; cursor: default; }
details.pd-section > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.pd-section > summary::-webkit-details-marker { display: none; }
details.pd-section > summary::before { content: "\25B8"; display: inline-block; width: 14px; color: var(--bs-secondary-color); }
details.pd-section[open] > summary::before { content: "\25BE"; }
details.pd-section[open] > summary { margin-bottom: 6px; }
@media (max-width: 575.98px) { .pd-media { flex-direction: column; } .pd-media-left { max-width: 100%; flex-basis: auto; } }
.pd-media-left label[for="pd-dfile"] { white-space: nowrap; }

/* dizilim editörü: toplu seçim */
.vm-slot.vm-pick { cursor: copy; }
.vm-slot.vm-selected { outline: 3px solid #f59e0b; outline-offset: -3px; box-shadow: 0 0 0 4px rgba(245,158,11,.35); }
.vm-slot.vm-free { opacity: .75; border-style: dashed; }
.vm-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #0f172a; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.pk-card.lane.free { border-color: #16a34a; }
.pk-card.lane.same { opacity: .45; cursor: not-allowed; }
.pk-card.lane.sel { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25); }

/* ürün tepsisi + boya modu + sürükle-bırak */
.vm-layout { display: flex; gap: 16px; align-items: flex-start; }
.vm-layout .vm-wrap { flex: 1; min-width: 0; }
.vm-tray { flex: 0 0 300px; position: sticky; top: 72px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; background: var(--card-bg); border: 1px solid var(--bs-border-color); border-radius: 14px; padding: 12px; }
.vm-tray-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.vm-tray-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.vm-tray-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--bs-border-color); border-radius: 10px; cursor: grab; background: var(--bs-body-bg); }
.vm-tray-item:hover { border-color: var(--bs-primary); }
.vm-tray-item.active { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25); }
.vm-tray-item:active { cursor: grabbing; }
.vm-slot.vm-drop { outline: 3px dashed #22c55e; outline-offset: -3px; transform: scale(1.03); }
.vm-paint-chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 10px 2px 2px; margin-right: 8px; }
.thumb-sm { width: 28px; height: 28px; border-radius: 6px; }
.vm-shelf-copy { position: absolute; left: -2px; top: 16px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: #334155; color: #cbd5e1; font-size: .7rem; padding: 0; opacity: 0; transition: opacity .15s; }
.vm-shelf:hover .vm-shelf-copy { opacity: 1; }
.vm-shelf-no { overflow: visible; }
@media (max-width: 1099.98px) { .vm-layout { flex-direction: column; } .vm-tray { position: static; flex-basis: auto; width: 100%; max-height: 50vh; } }

/* kampanyalar */
.camp-pct { font-size: 1.6rem; font-weight: 800; color: #dc2626; background: rgba(220,38,38,.08); border-radius: 12px; padding: 8px 12px; line-height: 1; white-space: nowrap; }

/* Satış detayı kartı ve POS */
.sale-drawer { --bs-offcanvas-width: 560px; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 6px 14px; font-size: .9rem; }
.kv dt { color: var(--bs-secondary-color); font-weight: 500; margin: 0; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sd-section { border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.sd-section h3 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.sd-amount { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card-chip { display: inline-flex; align-items: center; gap: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; background: var(--bs-tertiary-bg); border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.card-chip .brand { font-weight: 700; font-family: var(--bs-body-font-family); }
.filter-pills .btn { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .6rem; --bs-btn-font-size: .8rem; }

/* Yazı boyutu (üst çubuktaki Aa düğmesi) */
html[data-text="lg"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 128%; }
html[data-text] .table > :not(caption) > * > * { padding: .8rem 1rem; }
html[data-text] .status-badge { font-size: .84rem; }
html[data-text] .code { font-size: .9rem; }
.btn-icon.active { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 91, 234, .15); }

/* Otomat önü (hareket sensörü) kartı */
.presence-card { position: relative; overflow: hidden; transition: box-shadow .5s, background .5s; }
.presence-card.near { box-shadow: 0 0 0 1px rgba(22, 163, 74, .35), 0 10px 30px rgba(22, 163, 74, .12); background: linear-gradient(115deg, rgba(22, 163, 74, .12), transparent 52%), var(--card-bg); }
.presence-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(280px, 40%); gap: 18px 26px; align-items: center; padding: 16px 22px; }
@media (max-width: 1199.98px) { .presence-grid { grid-template-columns: 150px minmax(0, 1fr); } .presence-stats { grid-column: 1 / -1; } }
@media (max-width: 575.98px) { .presence-grid { grid-template-columns: 1fr; } .presence-scene { margin: 0 auto; } }
.presence-scene { position: relative; width: 170px; height: 132px; flex: none; }
.presence-scene .floor { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 14px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(15, 23, 42, .22), transparent 70%); }
[data-bs-theme="dark"] .presence-scene .floor { background: radial-gradient(ellipse at center, rgba(0, 0, 0, .5), transparent 70%); }
.presence-scene .vm { position: absolute; right: 18px; bottom: 16px; width: 66px; height: 104px; filter: drop-shadow(0 8px 14px rgba(15, 23, 42, .25)); }
.vm .vm-body { fill: #1e293b; }
.vm .vm-glass { fill: rgba(148, 163, 184, .22); stroke: rgba(255, 255, 255, .25); stroke-width: .8; }
.vm .vm-screen { fill: #334155; transition: fill .4s; }
.presence-card.near .vm .vm-screen { fill: #4ade80; filter: drop-shadow(0 0 4px rgba(74, 222, 128, .9)); animation: vm-screen 1.6s ease-in-out infinite; }
@keyframes vm-screen { 50% { opacity: .55; } }
.vm .vm-reader { fill: #0ea5e9; }
.vm .vm-tray { fill: #0f172a; stroke: rgba(255, 255, 255, .18); stroke-width: .8; }
.vm .vm-base { fill: #0f172a; }
.vm .vm-led { fill: #22c55e; }
.presence-card.offline .vm .vm-led { fill: #ef4444; }
.presence-scene .walker { position: absolute; left: 26px; bottom: 18px; width: 54px; height: 70px; display: flex; align-items: flex-end; justify-content: center; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s, filter .7s; transform: translateX(-22px); opacity: .22; filter: grayscale(1); }
.presence-card.near .presence-scene .walker { transform: translateX(0); opacity: 1; filter: none; }
.presence-scene .walker i { font-size: 54px; line-height: 1; color: #15803d; position: relative; z-index: 2; }
[data-bs-theme="dark"] .presence-scene .walker i { color: #4ade80; }
.presence-scene .sonar { position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; margin: -35px 0 0 -35px; border-radius: 50%; border: 2px solid rgba(22, 163, 74, .55); opacity: 0; }
.presence-card.near .presence-scene .sonar { animation: sonar 2.1s ease-out infinite; }
.presence-scene .sonar:nth-child(2) { animation-delay: .7s; }
.presence-scene .sonar:nth-child(3) { animation-delay: 1.4s; }
@keyframes sonar { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.presence-info { min-width: 0; }
.presence-info .live { display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bs-secondary-color); }
.presence-info .live .dot { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); animation: pulse 1.6s ease-in-out infinite; }
.presence-card.offline .presence-info .live .dot { background: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .18); animation: none; }
.presence-info .headline { font-size: 1.35rem; font-weight: 750; letter-spacing: -.015em; line-height: 1.2; margin-top: 6px; }
.presence-card.near .presence-info .headline { color: #15803d; }
[data-bs-theme="dark"] .presence-card.near .presence-info .headline { color: #4ade80; }
.presence-info .sub { color: var(--bs-secondary-color); margin-top: 4px; font-size: .92rem; }
.presence-info .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.presence-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.pstat .n { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pstat .l { font-size: .76rem; color: var(--bs-secondary-color); font-weight: 500; margin-top: 2px; }
.pstat .d { font-size: .74rem; color: var(--bs-secondary-color); margin-top: 1px; }
.hourstrip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 34px; margin-top: 4px; }
.hourstrip span { display: block; min-height: 3px; border-radius: 3px 3px 1px 1px; background: rgba(100, 116, 139, .28); transition: height .4s; }
.hourstrip span.has { background: #16a34a; opacity: .75; }
.hourstrip span.now { outline: 2px solid var(--accent); outline-offset: 1px; }
.hourticks { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: .68rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; margin-top: -4px; }

/* Ürünler tablosu: slot rozetleri (ilk sütun) */
.slot-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 120px; max-width: 260px; }
.slot-pill { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; padding: 5px 11px; border-radius: 9px; background: rgba(47, 91, 234, .09); color: var(--accent); border: 1px solid rgba(47, 91, 234, .22); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .08em; line-height: 1.1; cursor: pointer; transition: background .12s, transform .12s; }
.slot-pill:hover { background: rgba(47, 91, 234, .16); transform: translateY(-1px); }
.slot-pill small { font-family: var(--app-font); font-size: .58rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .7; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 1px; }
.slot-pill.off { color: var(--bs-secondary-color); background: var(--bs-tertiary-bg); border-color: var(--bs-border-color); text-decoration: line-through; }
.slot-pill.more { font-size: .9rem; min-width: 40px; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border-color: var(--bs-border-color); }
[data-bs-theme="dark"] .slot-pill { color: #9db3ff; background: rgba(99, 140, 255, .14); border-color: rgba(99, 140, 255, .3); }
.slot-pills.grouped { flex-direction: column; gap: 5px; min-width: 210px; }
.slot-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.slot-group small { flex: 0 0 100%; font-size: .66rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--bs-secondary-color); line-height: 1; margin-top: 2px; }
.slot-none { color: var(--bs-secondary-color); padding-left: 10px; }
.table td.slot-cell { padding-top: .45rem; padding-bottom: .45rem; }

/* Toplu stok girişi */
.st-edit .st-in { width: 68px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-edit .btn { line-height: 1; }
