/* DSP ERP — ortak stiller (Tailwind yardımcılarına ek) */
:root { --bar: rgba(246,246,248,.92); --accent: #0a84ff; }
* { -webkit-tap-highlight-color: transparent; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif; }
body { font-size: 13px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.18); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(0,0,0,.32); }

/* Mac trafik ışıkları */
.lights { display: flex; gap: 8px; align-items: center; }
.lights button { width: 12px; height: 12px; border-radius: 50%; border: .5px solid rgba(0,0,0,.18); position: relative; padding: 0; cursor: default; display: grid; place-items: center; }
.lights .l-close { background: #ff5f57; } .lights .l-min { background: #febc2e; } .lights .l-max { background: #28c840; }
.lights button svg { width: 8px; height: 8px; opacity: 0; stroke: rgba(0,0,0,.6); stroke-width: 1.6; fill: none; }
.lights:hover button svg { opacity: 1; }
.win:not(.active) .lights button { background: #d6d6d8; border-color: rgba(0,0,0,.08); }
.win:not(.active) .lights:hover .l-close { background: #ff5f57; } .win:not(.active) .lights:hover .l-min { background: #febc2e; } .win:not(.active) .lights:hover .l-max { background: #28c840; }

/* Pencere */
.win { position: absolute; display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.25), 0 22px 70px rgba(0,0,0,.28), 0 6px 18px rgba(0,0,0,.12); transition: box-shadow .2s; min-width: 320px; min-height: 200px; }
.win.active { box-shadow: 0 0 0 .5px rgba(0,0,0,.3), 0 30px 90px rgba(0,0,0,.38), 0 8px 24px rgba(0,0,0,.18); }
.win-bar { height: 38px; flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 12px; background: linear-gradient(#f6f6f8, #ececee); border-bottom: .5px solid rgba(0,0,0,.14); user-select: none; touch-action: none; }
.win:not(.active) .win-bar { background: #f6f6f6; color: #9a9a9e; }
.win-title { text-align: center; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #3a3a3c; }
.win:not(.active) .win-title { color: #a0a0a4; }
.win-nick { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; margin-right: 6px; vertical-align: 1px; }
.win iframe { flex: 1; width: 100%; border: 0; background: #fbfbfd; }
.win-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
.win.max { border-radius: 0; }
.win.minimizing { transition: transform .32s cubic-bezier(.4,0,.2,1), opacity .32s; opacity: 0; }
.win.opening { animation: winOpen .22s cubic-bezier(.2,.8,.2,1); }
@keyframes winOpen { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.desk.dragging iframe { pointer-events: none; }
.win-btn { width: 26px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: #6e6e73; font-size: 13px; }
.win-btn:hover { background: rgba(0,0,0,.07); }

/* Dock */
.dock { backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6); background: rgba(255,255,255,.38); border: .5px solid rgba(255,255,255,.55); box-shadow: 0 10px 40px rgba(0,0,0,.25), inset 0 0 0 .5px rgba(0,0,0,.08); }
.dock-item { position: relative; transition: transform .18s cubic-bezier(.3,.7,.4,1.4); transform-origin: bottom center; }
.dock-item:hover { transform: scale(1.32) translateY(-6px); }
.dock-item:hover + .dock-item, .dock-item:has(+ .dock-item:hover) { transform: scale(1.12) translateY(-2px); }
.dock-item .tip { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, -14px); background: rgba(30,30,32,.86); color: #fff; padding: 3px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.dock-item:hover .tip { opacity: 1; }
.dock-item .dot { position: absolute; bottom: -6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(0,0,0,.65); }
.app-icon { display: grid; place-items: center; border-radius: 22%; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.22); }

/* Menü çubuğu */
.menubar { backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); background: rgba(246,246,248,.72); box-shadow: 0 .5px 0 rgba(0,0,0,.18); }
.mb-item { padding: 2px 10px; border-radius: 5px; cursor: default; }
.mb-item:hover, .mb-item.open { background: rgba(0,0,0,.09); }
.mb-menu { backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); background: rgba(246,246,248,.92); box-shadow: 0 0 0 .5px rgba(0,0,0,.2), 0 12px 36px rgba(0,0,0,.2); border-radius: 9px; padding: 5px; }
.mb-menu a, .mb-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 5px; text-align: left; }
.mb-menu a:hover, .mb-menu button:hover { background: var(--accent); color: #fff; }

/* Bağımsız sayfa (pencere dışında açıldığında) */
.standalone-bar { position: sticky; top: 0; z-index: 40; }

/* Form öğeleri */
.inp { width: 100%; border: 1px solid #d2d2d7; background: #fff; border-radius: 7px; padding: 6px 9px; font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10,132,255,.2); }
.inp[readonly], .inp:disabled { background: #f5f5f7; color: #6e6e73; }
select.inp { padding-right: 26px; }
.lbl { display: block; font-size: 11.5px; font-weight: 600; color: #6e6e73; margin-bottom: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 13px; border-radius: 7px; font-weight: 500; font-size: 13px; border: 1px solid transparent; white-space: nowrap; transition: filter .12s, background .12s; cursor: pointer; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-p { background: var(--accent); color: #fff; } .btn-p:hover:not(:disabled) { filter: brightness(1.08); }
.btn-s { background: #fff; border-color: #d2d2d7; color: #1d1d1f; } .btn-s:hover:not(:disabled) { background: #f5f5f7; }
.btn-d { background: #ff3b30; color: #fff; } .btn-g { background: #34c759; color: #fff; } .btn-w { background: #ff9f0a; color: #fff; }
.btn-sm { padding: 3px 9px; font-size: 12px; border-radius: 6px; }
.seg { display: inline-flex; background: #e8e8ed; border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { padding: 4px 12px; border-radius: 6px; font-weight: 500; color: #3a3a3c; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); color: #000; }

/* Tablo */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { position: sticky; top: 0; background: #f5f5f7; font-weight: 600; font-size: 11.5px; color: #6e6e73; text-align: left; padding: 7px 10px; border-bottom: 1px solid #e5e5ea; white-space: nowrap; z-index: 1; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid #f0f0f3; vertical-align: middle; }
.tbl tbody tr:nth-child(even) td { background: #f4f5f7; }
.tbl tbody tr:hover td { background: #eaf2ff; }
.tbl tbody tr.sel td { background: #e5f0ff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06); }

/* Rozet */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* Modal (Mac sheet) */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 28px 12px; overflow: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 12px; box-shadow: 0 0 0 .5px rgba(0,0,0,.2), 0 24px 80px rgba(0,0,0,.35); width: 100%; max-width: 640px; animation: sheet .2s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; max-height: calc(100vh - 56px); }
.modal.lg { max-width: 980px; } .modal.xl { max-width: 1240px; } .modal.sm { max-width: 420px; }
@keyframes sheet { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Toast */
#toasts { position: fixed; top: 12px; right: 12px; z-index: 200; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 240px; max-width: 420px; padding: 10px 14px; border-radius: 10px; background: rgba(255,255,255,.96); backdrop-filter: blur(20px); box-shadow: 0 0 0 .5px rgba(0,0,0,.15), 0 10px 30px rgba(0,0,0,.18); display: flex; gap: 10px; align-items: flex-start; animation: sheet .2s; font-size: 13px; }

/* Kantar dijital gösterge */
.lcd { font-family: "DSEG7 Classic", "Consolas", "SF Mono", monospace; font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Etiket tasarım tuvali */
.lbl-canvas { position: relative; background: #fff; box-shadow: 0 0 0 1px #c7c7cc, 0 8px 30px rgba(0,0,0,.15); background-image: linear-gradient(#f2f2f7 1px, transparent 1px), linear-gradient(90deg, #f2f2f7 1px, transparent 1px); }
.lbl-el { position: absolute; outline: 1px dashed transparent; cursor: move; overflow: hidden; touch-action: none; }
.lbl-el:hover { outline-color: #8e8e93; }
.lbl-el.sel { outline: 1.5px solid var(--accent); z-index: 5; }
.lbl-el .rz { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; background: var(--accent); cursor: nwse-resize; display: none; }
.lbl-el.sel .rz { display: block; }
.lbl-el svg { width: 100%; height: 100%; display: block; }

/* Terminal: dokunmatik */
.tap { min-height: 52px; font-size: 16px; }
@media print { .no-print { display: none !important; } body { background: #fff !important; } }

/* Sağ tık (context) menüsü — macOS */
.ctx-kok { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.ctx-panel { position: fixed; pointer-events: auto; min-width: 230px; max-width: 340px; padding: 5px; border-radius: 9px; background: rgba(246,246,248,.88);
  backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); box-shadow: 0 0 0 .5px rgba(0,0,0,.22), 0 12px 32px rgba(0,0,0,.24);
  font-size: 13px; color: #1d1d1f; animation: fade .08s; user-select: none; }
.ctx-it { display: flex; align-items: center; gap: 8px; padding: 3px 10px 3px 6px; border-radius: 5px; cursor: default; white-space: nowrap; line-height: 20px; }
.ctx-it.on { background: #0a84ff; color: #fff; }
.ctx-it.dis { color: #b0b0b5; }
.ctx-it.tehlike { color: #e5342a; } .ctx-it.tehlike.on { background: #ff3b30; color: #fff; }
.ctx-ik { width: 20px; text-align: center; font-size: 13px; flex: none; }
.ctx-kbd { margin-left: auto; padding-left: 18px; color: #8e8e93; font-size: 12px; }
.ctx-it.on .ctx-kbd { color: rgba(255,255,255,.85); }
.ctx-sep { height: 1px; background: rgba(0,0,0,.1); margin: 5px 8px; }
.ctx-bas { padding: 3px 10px 4px 10px; font-size: 11px; color: #8e8e93; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Masaüstü kısayolları */
#ikonlar { position: absolute; inset: 0; z-index: 1; }
.ks { position: absolute; width: 88px; padding: 6px 2px 4px; border-radius: 10px; text-align: center; cursor: default; user-select: none; transition: left .18s, top .18s; }
.ks .app-icon { width: 54px; height: 54px; margin: 0 auto; font-size: 28px; box-shadow: 0 4px 12px rgba(0,0,0,.28), inset 0 0 0 .5px rgba(255,255,255,.35); }
.ks-ad { margin-top: 5px; display: inline-block; max-width: 86px; padding: 1px 5px; border-radius: 5px; color: #fff; font-size: 12px; line-height: 1.25; text-shadow: 0 1px 3px rgba(0,0,0,.7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.ks.sel { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.ks.sel .ks-ad { background: #0a84ff; text-shadow: none; }
.ks.surukleniyor { opacity: .35; }
#ks-hedef { position: absolute; width: 88px; height: 92px; border-radius: 12px; border: 2px dashed rgba(255,255,255,.75); background: rgba(255,255,255,.12); pointer-events: none; display: none; z-index: 2; }
body.ks-surukle #spot, body.ks-surukle #launch { pointer-events: none; opacity: .2; transition: opacity .15s; }
[draggable="true"] { -webkit-user-drag: element; }

/* Veri ızgarası (kategorili stok listesi) */
.dg-grupbar { background: #5b2a86; color: rgba(255,255,255,.85); font-size: 12px; padding: 7px 10px; min-height: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; border-radius: 8px 8px 0 0; transition: background .15s; }
.dg-grupbar.dg-uzerinde { background: #7c3aed; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.dg-chip { background: rgba(255,255,255,.95); color: #3b1a5a; border-radius: 6px; padding: 2px 4px 2px 9px; font-weight: 600; cursor: grab; display: inline-flex; align-items: center; gap: 4px; }
.dg-chip button { width: 18px; height: 18px; border-radius: 4px; color: #6b21a8; } .dg-chip button:hover { background: #f3e8ff; }
.dg-ok2 { color: rgba(255,255,255,.6); }
.dg-sar { overflow: auto; outline: none; flex: 1; min-height: 0; background: #fff; }
.dg { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.dg thead th { position: sticky; top: 0; background: #f3f4f6; color: #374151; font-weight: 700; text-align: left; padding: 6px 8px; border-bottom: 1px solid #d1d5db; border-right: 1px solid #e5e7eb; white-space: nowrap; z-index: 2; cursor: pointer; user-select: none; }
.dg thead tr.dg-filtre th { top: 30px; background: #eef2ff; padding: 3px 4px; font-weight: 400; cursor: default; z-index: 2; }
.dg-filtre input, .dg-filtre select { width: 100%; min-width: 50px; border: 1px solid #c7d2fe; border-radius: 4px; padding: 2px 5px; font-size: 12px; background: #fff; }
.dg-filtre-ac { text-align: center !important; color: #6b7280; font-style: italic; cursor: pointer !important; }
.dg-filtre-ac:hover { background: #e0e7ff !important; color: #3730a3; }
.dg td { padding: 4px 8px; border-bottom: 1px solid #eceef2; border-right: 1px solid #f1f2f5; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.dg tbody tr.dg-r { background: #fff; cursor: default; }
.dg tbody tr.dg-zebra { background: #eef0f4; }
.dg tbody tr.dg-r:hover td { background-color: rgba(10,132,255,.07); }
.dg td.dg-yesil { background: #4ade80; color: #052e16; font-weight: 700; }
.dg tbody tr.dg-sec td { background: #8b1c2c !important; color: #fff !important; font-weight: 700; }
.dg-n { text-align: right !important; } .dg-c { text-align: center !important; }
.dg .dg-gosterge { width: 22px; min-width: 22px; text-align: center; color: #6b7280; padding: 4px 2px; }
.dg tr.dg-grp td { background: #ede9fe; color: #3b0764; font-weight: 600; cursor: pointer; border-bottom: 1px solid #ddd6fe; }
.dg-grp-say { color: #7c3aed; font-weight: 400; } .dg-grp-oz { float: right; font-weight: 400; color: #5b21b6; } .dg-ok { display: inline-block; width: 12px; }
.dg tfoot td { position: sticky; bottom: 0; background: #67e8f9; color: #083344; padding: 6px 8px; border-top: 2px solid #22d3ee; z-index: 2; }
.dg-bos { text-align: center; color: #9ca3af; padding: 40px !important; }
.dg input[type=checkbox] { width: 15px; height: 15px; accent-color: #2563eb; }
.amb-sekme { padding: 4px 14px; border-radius: 7px 7px 0 0; font-weight: 700; font-size: 13px; background: #9ca3af; color: #fff; border: 1px solid rgba(0,0,0,.08); border-bottom: 0; white-space: nowrap; }
.amb-sekme.on { background: #ef4444; box-shadow: 0 -2px 6px rgba(239,68,68,.35); }
.amb-sekme:hover:not(.on) { background: #6b7280; }
.amb-sekme .say { font-weight: 500; opacity: .8; font-size: 11px; margin-left: 4px; }
.kat-oge { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; cursor: pointer; user-select: none; color: #1e3a5f; font-weight: 600; }
.kat-oge:hover { background: #e0ecff; } .kat-oge.on { background: #0a84ff; color: #fff; }
.kat-oge.pasif { opacity: .45; } .kat-oge.surukle-hedef { box-shadow: inset 0 2px 0 #0a84ff; }
@media print { .dg-grupbar, .dg-filtre { display: none !important; } .dg-sar { overflow: visible; } .dg thead th, .dg tfoot td { position: static; } }

/* Kolon gizle/göster menüsü (assets/kolon.js) */
.kv-gizli { display: none !important; }
.kv-dugme { border: 0; background: transparent; color: #8e8e93; font-size: 13px; line-height: 1; padding: 0 5px 0 0; margin-right: 2px; cursor: pointer; border-radius: 4px; }
.kv-dugme:hover, .kv-dugme.kv-var { color: #0a64d8; }
.kv-dugme.kv-var { font-weight: 700; }
.kv-menu { position: fixed; z-index: 100000; width: 250px; background: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.08); font-size: 13px; color: #1d1d1f; overflow: hidden; }
.kv-bas { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid #ececf0; background: #f7f7fa; }
.kv-bas span { margin-left: auto; font-size: 11px; color: #8e8e93; }
.kv-liste { overflow: auto; padding: 4px 0; }
.kv-satir { display: flex; align-items: center; gap: 9px; padding: 5px 12px; cursor: pointer; user-select: none; }
.kv-satir:hover { background: #eef4ff; }
.kv-satir input { position: absolute; opacity: 0; pointer-events: none; }
.kv-sw { width: 28px; height: 16px; border-radius: 8px; background: #c7c7cc; position: relative; flex: none; transition: background .15s; }
.kv-sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.kv-satir input:checked + .kv-sw { background: #0a84ff; }
.kv-satir input:checked + .kv-sw::after { transform: translateX(12px); }
.kv-satir input:focus-visible + .kv-sw { outline: 2px solid #0a84ff; outline-offset: 2px; }
.kv-ad { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-alt { display: flex; gap: 6px; padding: 8px 10px; border-top: 1px solid #ececf0; background: #f7f7fa; }
.kv-alt button { flex: 1; border: 1px solid #d1d1d6; background: #fff; border-radius: 6px; padding: 4px 6px; font-size: 12px; cursor: pointer; }
.kv-alt button:hover { background: #eef4ff; border-color: #0a84ff; }
@media print { .kv-dugme, .kv-menu { display: none !important; } }
.dg .dg-kolon-dugme { cursor: pointer; font-size: 14px; } .dg .dg-kolon-dugme:hover { color: #0a64d8; background: rgba(10,100,216,.1); }

/* Kolon sürükle-bırak sıralama */
th[data-kv-key] { cursor: grab; }
th[data-kv-key]:active { cursor: grabbing; }
.kv-th-surukleniyor, .dg-th-surukle { opacity: .45; }
.kv-hedef-sol, .dg-hedef-sol { box-shadow: inset 3px 0 0 #0a84ff; }
.kv-hedef-sag, .dg-hedef-sag { box-shadow: inset -3px 0 0 #0a84ff; }
.kv-ipucu { padding: 5px 12px; font-size: 11px; color: #8e8e93; background: #fbfbfd; border-bottom: 1px solid #f0f0f3; }
.kv-tut { color: #aeaeb2; cursor: grab; letter-spacing: -2px; font-size: 12px; padding-right: 2px; }
.kv-satir:hover .kv-tut { color: #0a64d8; }
.kv-satir.kv-sol { box-shadow: inset 0 2px 0 #0a84ff; }
.kv-satir.kv-sag { box-shadow: inset 0 -2px 0 #0a84ff; }
.kv-satir.kv-surukleniyor { opacity: .4; }
.dg th[data-k] { cursor: grab; }

/* Kolon menüsü: arama, yönetim */
.kv-arabox { padding: 6px 10px; border-bottom: 1px solid #f0f0f3; }
.kv-ara { width: 100%; border: 1px solid #d1d1d6; border-radius: 7px; padding: 5px 9px; font-size: 12.5px; outline: none; background: #fff; }
.kv-ara:focus { border-color: #0a84ff; box-shadow: 0 0 0 3px rgba(10,132,255,.15); }
.kv-eleme { display: none !important; }
.kv-bosmsg { padding: 12px; text-align: center; color: #8e8e93; font-size: 12px; }
.kv-alt button[data-yonetim] { flex: none; }
.kv-menu { width: 268px; }
.kv-alt button { white-space: nowrap; font-size: 11.5px; padding: 4px 4px; }
