/* 🗂️ Work Desk — sağdan açılan iş masası çekmecesi (her sayfada). Tüm sınıflar wd- önekli.
   Üst çubuk düğmesi (#wdBtn) topbar.css'in .gta-btn kurallarını kimlik özgüllüğüyle genişletir: ikon + "Work" etiketi + satır içi rozet. */

/* ───────── üst çubuk düğmesi ───────── */
#global-top-actions #wdBtn.gta-btn { width: auto !important; padding: 0 10px 0 9px !important; gap: 6px; font: 600 11.5px 'Montserrat', sans-serif !important; letter-spacing: .03em; }
#global-top-actions #wdBtn .wd-btn-l { font-size: 11.5px; line-height: 1; pointer-events: none; }
#global-top-actions #wdBtn[aria-expanded="true"] { background: rgba(186,133,166,.22) !important; color: #fff !important; }
#global-top-actions #wdBtn .gta-badge { position: static !important; margin-left: 1px; box-shadow: none; pointer-events: none; }
#global-top-actions #wdBtn .gta-badge.wd-badge-run { background: var(--p, #ba85a6); }
#global-top-actions #wdBtn.wd-live svg { color: var(--p, #ba85a6); }
html[data-theme="light"] #global-top-actions #wdBtn[aria-expanded="true"] { background: rgba(147,90,126,.16) !important; color: #2a1f2e !important; }
html[data-theme="light"] #global-top-actions #wdBtn .gta-badge.wd-badge-run { background: #935a7e; }
html[data-theme="light"] #global-top-actions #wdBtn.wd-live svg { color: #935a7e; }

/* ───────── çekmece ───────── */
.wd-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; height: 100vh; height: 100dvh; z-index: 100003; display: flex; flex-direction: column;
  background: rgba(14,13,17,.985); color: #ece7ef; border-left: 1px solid rgba(255,255,255,.09); box-shadow: -24px 0 70px rgba(0,0,0,.55);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-family: 'Montserrat', sans-serif;
  transform: translateX(105%); visibility: hidden; transition: transform .26s cubic-bezier(.2,.8,.2,1), visibility 0s linear .26s; }
.wd-drawer.wd-on { transform: none; visibility: visible; transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.wd-drawer, .wd-drawer * { box-sizing: border-box; }
.wd-drawer svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; flex: none; }

.wd-head { display: flex; align-items: center; gap: 6px; padding: 16px 14px 12px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.wd-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wd-head-t b { font: 700 15px 'Unbounded', 'Montserrat', sans-serif; color: #f6f1f8; letter-spacing: .01em; }
.wd-head-t small { font-size: 11px; color: #9a93a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-ic { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #c9c3cc; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin: 0; transition: background .15s, color .15s; }
.wd-ic:hover, .wd-ic:focus-visible { background: rgba(186,133,166,.16); color: #fff; outline: none; }
.wd-ic svg { width: 18px; height: 18px; }
.wd-spin svg { animation: wd-rot .8s linear infinite; }

/* özet şeridi: 4 sayaç → bölüme atla */
.wd-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 12px 14px 4px; }
.wd-sum-b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 9px; margin: 0; border-radius: 11px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.03); color: inherit; cursor: pointer; text-align: left; min-width: 0; transition: border-color .15s, background .15s; font-family: inherit; }
.wd-sum-b:hover, .wd-sum-b:focus-visible { border-color: rgba(186,133,166,.45); background: rgba(186,133,166,.08); outline: none; }
.wd-sum-b b { font: 700 17px 'Unbounded', 'Montserrat', sans-serif; color: #f6f1f8; line-height: 1.1; }
.wd-sum-b small { font-size: 10px; color: #9a93a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wd-sum-b.wd-hot { border-color: rgba(186,133,166,.5); background: rgba(186,133,166,.1); }
.wd-sum-b.wd-hot b { color: var(--p, #ba85a6); }
.wd-sum-b[data-sec="ready"].wd-hot { border-color: rgba(245,158,11,.5); background: rgba(245,158,11,.08); }
.wd-sum-b[data-sec="ready"].wd-hot b { color: #fbbf24; }

.wd-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 28px; scrollbar-width: thin; scrollbar-color: rgba(186,133,166,.3) transparent; }
.wd-body::-webkit-scrollbar { width: 6px; } .wd-body::-webkit-scrollbar-thumb { background: rgba(186,133,166,.3); border-radius: 6px; }
.wd-alert { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; font-size: 11.5px; line-height: 1.45; color: #fcd34d; background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.28); }

/* ───────── bölümler ───────── */
.wd-sec { margin-top: 16px; scroll-margin-top: 8px; }
.wd-sh { width: 100%; display: flex; align-items: center; gap: 8px; padding: 4px 2px; margin: 0; border: 0; background: transparent; color: #b9b1bf; cursor: pointer; font: 700 10.5px 'Montserrat', sans-serif; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
.wd-sh:hover .wd-sh-l, .wd-sh:focus-visible .wd-sh-l { color: #fff; } .wd-sh:focus-visible { outline: none; }
.wd-sh-em { font-size: 13px; letter-spacing: 0; }
.wd-sh-l { flex: 0 1 auto; }
.wd-n { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: rgba(255,255,255,.07); color: #d8d2db; font-size: 10px; line-height: 18px; text-align: center; letter-spacing: 0; }
.wd-pulse { width: 7px; height: 7px; border-radius: 50%; background: #60a5fa; box-shadow: 0 0 0 0 rgba(96,165,250,.6); animation: wd-pulse 1.6s ease-out infinite; }
.wd-chev { margin-left: auto; width: 14px !important; height: 14px !important; opacity: .55; transition: transform .2s; }
.wd-sec.wd-collapsed .wd-chev { transform: rotate(-90deg); }
.wd-sec.wd-collapsed .wd-list, .wd-sec.wd-collapsed .wd-search, .wd-sec.wd-collapsed .wd-pager { display: none; }
.wd-list { transition: opacity .15s; } .wd-list.wd-dim { opacity: .45; }

/* ───────── kart ───────── */
.wd-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-top: 8px; padding: 11px 11px 11px 12px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); transition: border-color .15s, background .15s; }
.wd-card:hover { border-color: rgba(186,133,166,.32); background: rgba(255,255,255,.05); }
.wd-card.wd-tone-ready { box-shadow: inset 3px 0 0 #f59e0b; }
.wd-card.wd-tone-bad { box-shadow: inset 3px 0 0 #ef4444; }
.wd-card.wd-tone-run { box-shadow: inset 3px 0 0 #60a5fa; }
.wd-em { width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; background: rgba(186,133,166,.13); }
.wd-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wd-row1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.wd-t { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; color: #f6f1f8; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.wd-time { flex: none; font-size: 10.5px; color: #8f8895; white-space: nowrap; }
.wd-st { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: 11.5px; color: #b9b1bf; line-height: 1.35; }
.wd-st > span:first-of-type { min-width: 0; word-break: break-word; }
.wd-meta { color: #8f8895; font-size: 10.5px; }
.wd-meta::before { content: '·'; margin-right: 6px; opacity: .6; }
.wd-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #a1a1aa; }
.wd-tone-run .wd-dot { background: #60a5fa; animation: wd-pulse 1.6s ease-out infinite; }
.wd-tone-ready .wd-dot { background: #f59e0b; }
.wd-tone-ok .wd-dot { background: #10b981; }
.wd-tone-bad .wd-dot { background: #ef4444; }
.wd-tone-mute .wd-dot { background: #71717a; }
.wd-tone-saved .wd-dot { background: var(--p, #ba85a6); }

.wd-prog { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.wd-bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.wd-bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #ba85a6, #8b5cf6); transition: width .4s ease; }
.wd-prog-live .wd-bar span { background-image: linear-gradient(90deg, #ba85a6, #8b5cf6), repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); background-blend-mode: overlay; background-size: 100% 100%, 24px 24px; animation: wd-stripe 1s linear infinite; }
.wd-prog small { font-size: 10.5px; color: #9a93a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1px; }
.wd-chip { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 7px; background: rgba(255,255,255,.06); color: #cfc8d4; }
.wd-chip-held { background: rgba(245,158,11,.12); color: #fbbf24; }
.wd-chip-done { background: rgba(16,185,129,.12); color: #34d399; }
.wd-err { font-size: 11px; line-height: 1.4; color: #fca5a5; background: rgba(239,68,68,.08); border-radius: 8px; padding: 5px 8px; word-break: break-word; }

.wd-open { align-self: center; padding: 6px 12px; margin: 0; border-radius: 9px; border: 1px solid rgba(186,133,166,.45); background: transparent; color: var(--p, #ba85a6); font: 700 11px 'Montserrat', sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.wd-open:hover, .wd-open:focus-visible { background: var(--p, #ba85a6); border-color: var(--p, #ba85a6); color: #1a0f17; outline: none; }
.wd-open:disabled { opacity: .6; cursor: progress; }
.wd-sec[data-sec="ready"] .wd-open { background: var(--p, #ba85a6); border-color: var(--p, #ba85a6); color: #1a0f17; }
.wd-sec[data-sec="ready"] .wd-open:hover { filter: brightness(1.08); }

/* ───────── boş durum, iskelet ───────── */
.wd-empty { margin-top: 8px; padding: 14px; border-radius: 13px; border: 1px dashed rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 11.5px; color: #9a93a0; line-height: 1.45; }
.wd-empty b { color: #d8d2db; font-size: 12px; font-weight: 600; }
.wd-cta { margin: 6px 0 0; padding: 6px 12px; border-radius: 9px; border: 1px solid rgba(186,133,166,.45); background: rgba(186,133,166,.1); color: var(--p, #ba85a6); font: 700 11px 'Montserrat', sans-serif; cursor: pointer; }
.wd-cta:hover, .wd-cta:focus-visible { background: var(--p, #ba85a6); color: #1a0f17; outline: none; }
.wd-skel { height: 60px; margin-top: 8px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.035) 100%); background-size: 200% 100%; animation: wd-shimmer 1.3s ease-in-out infinite; }

/* ───────── arşiv: arama + sayfalama ───────── */
.wd-search { position: relative; margin-top: 8px; }
.wd-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px !important; height: 14px !important; color: #8f8895; }
.wd-drawer .wd-search input { width: 100%; margin: 0; padding: 9px 12px 9px 32px; font: 500 12.5px 'Montserrat', sans-serif; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); color: #f6f1f8; box-shadow: none; }
.wd-drawer .wd-search input:focus { border-color: var(--p, #ba85a6); box-shadow: 0 0 0 3px rgba(186,133,166,.15); outline: none; }
.wd-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.wd-pager:empty { display: none; }
.wd-pg { padding: 6px 11px; margin: 0; border-radius: 9px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #d8d2db; font: 600 11px 'Montserrat', sans-serif; cursor: pointer; }
.wd-pg:hover:not(:disabled), .wd-pg:focus-visible { border-color: var(--p, #ba85a6); color: #fff; outline: none; }
.wd-pg:disabled { opacity: .35; cursor: default; }
.wd-pg-i { flex: 1; text-align: center; font-size: 10.5px; color: #9a93a0; }

@keyframes wd-pulse { 0% { box-shadow: 0 0 0 0 rgba(96,165,250,.55); } 70% { box-shadow: 0 0 0 6px rgba(96,165,250,0); } 100% { box-shadow: 0 0 0 0 rgba(96,165,250,0); } }
@keyframes wd-stripe { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 24px 0; } }
@keyframes wd-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes wd-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .wd-drawer, .wd-drawer.wd-on { transition: none; }
  .wd-pulse, .wd-tone-run .wd-dot, .wd-prog-live .wd-bar span, .wd-skel, .wd-spin svg { animation: none; }
}

/* ───────── açık tema ───────── */
html[data-theme="light"] .wd-drawer { background: rgba(255,255,255,.985); color: #1b171e; border-left-color: rgba(60,40,70,.12); box-shadow: -18px 0 50px rgba(60,40,70,.18); }
html[data-theme="light"] .wd-head { border-bottom-color: rgba(60,40,70,.1); }
html[data-theme="light"] .wd-head-t b, html[data-theme="light"] .wd-sum-b b, html[data-theme="light"] .wd-t { color: #1b171e; }
html[data-theme="light"] .wd-head-t small, html[data-theme="light"] .wd-sum-b small, html[data-theme="light"] .wd-time, html[data-theme="light"] .wd-meta,
html[data-theme="light"] .wd-prog small, html[data-theme="light"] .wd-pg-i, html[data-theme="light"] .wd-empty, html[data-theme="light"] .wd-search svg { color: #5f5866; }
html[data-theme="light"] .wd-ic { color: #4b4350; }
html[data-theme="light"] .wd-ic:hover, html[data-theme="light"] .wd-ic:focus-visible { background: rgba(147,90,126,.12); color: #2a1f2e; }
html[data-theme="light"] .wd-sum-b, html[data-theme="light"] .wd-card { background: #faf8fb; border-color: rgba(60,40,70,.1); }
html[data-theme="light"] .wd-sum-b:hover, html[data-theme="light"] .wd-card:hover { border-color: rgba(147,90,126,.38); background: #fff; }
html[data-theme="light"] .wd-sum-b.wd-hot { border-color: rgba(147,90,126,.45); background: rgba(147,90,126,.08); }
html[data-theme="light"] .wd-sum-b.wd-hot b { color: #935a7e; }
html[data-theme="light"] .wd-sum-b[data-sec="ready"].wd-hot { border-color: rgba(180,110,0,.45); background: rgba(245,158,11,.1); }
html[data-theme="light"] .wd-sum-b[data-sec="ready"].wd-hot b { color: #8a5a00; }
html[data-theme="light"] .wd-sh { color: #5f5866; }
html[data-theme="light"] .wd-sh:hover .wd-sh-l { color: #1b171e; }
html[data-theme="light"] .wd-n { background: rgba(60,40,70,.08); color: #3b3340; }
html[data-theme="light"] .wd-st, html[data-theme="light"] .wd-chip { color: #4b4350; }
html[data-theme="light"] .wd-em { background: rgba(147,90,126,.1); }
html[data-theme="light"] .wd-bar { background: rgba(60,40,70,.1); }
html[data-theme="light"] .wd-chip { background: rgba(60,40,70,.07); }
html[data-theme="light"] .wd-chip-held { background: rgba(245,158,11,.14); color: #8a5a00; }
html[data-theme="light"] .wd-chip-done { background: rgba(16,185,129,.12); color: #0a7f57; }
html[data-theme="light"] .wd-err { color: #b42318; background: rgba(204,47,55,.07); }
html[data-theme="light"] .wd-alert { color: #8a5a00; background: rgba(245,158,11,.1); border-color: rgba(180,110,0,.3); }
html[data-theme="light"] .wd-open, html[data-theme="light"] .wd-cta { color: #935a7e; border-color: rgba(147,90,126,.5); background: transparent; }
html[data-theme="light"] .wd-open:hover, html[data-theme="light"] .wd-open:focus-visible, html[data-theme="light"] .wd-cta:hover,
html[data-theme="light"] .wd-sec[data-sec="ready"] .wd-open { background: #935a7e; border-color: #935a7e; color: #fff; }
html[data-theme="light"] .wd-empty { border-color: rgba(60,40,70,.16); }
html[data-theme="light"] .wd-empty b { color: #2a1f2e; }
html[data-theme="light"] .wd-skel { background: linear-gradient(90deg, rgba(60,40,70,.05) 0%, rgba(60,40,70,.1) 50%, rgba(60,40,70,.05) 100%); background-size: 200% 100%; }
html[data-theme="light"] .wd-drawer .wd-search input { background: #fff !important; border-color: rgba(60,40,70,.16); color: #1b171e; }
html[data-theme="light"] .wd-drawer .wd-search input:focus { border-color: #935a7e; box-shadow: 0 0 0 3px rgba(147,90,126,.14); }
html[data-theme="light"] .wd-pg { background: #fff; border-color: rgba(60,40,70,.16); color: #3b3340; }
html[data-theme="light"] .wd-pg:hover:not(:disabled) { border-color: #935a7e; color: #1b171e; }

/* ───────── mobil ───────── */
@media (max-width: 640px) {
  .wd-drawer { width: 100vw; border-left: 0; box-shadow: none; }
  .wd-head { padding: 12px 10px 10px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
  .wd-sum { padding: 10px 12px 2px; gap: 5px; }
  .wd-sum-b { padding: 7px 7px; }
  .wd-sum-b b { font-size: 15px; }
  .wd-body { padding: 2px 12px calc(24px + env(safe-area-inset-bottom)); }
  .wd-card { grid-template-columns: 32px minmax(0, 1fr); }
  .wd-em { width: 32px; height: 32px; font-size: 16px; border-radius: 10px; }
  .wd-open { grid-column: 2; justify-self: start; padding: 7px 14px; }
  #global-top-actions #wdBtn.gta-btn { width: 32px !important; padding: 0 !important; }
  #global-top-actions #wdBtn .wd-btn-l { display: none; }
  #global-top-actions #wdBtn .gta-badge { position: absolute !important; margin: 0; }
}

/* ↻ Yeniden çalıştır + otomatik rozet (1 Kasım 2026) */
.wd-acts { display: flex; flex-direction: column; align-items: stretch; gap: 6px; align-self: center; }
.wd-acts .wd-open { align-self: stretch; text-align: center; }
.wd-rerun { border-style: dashed; }
.wd-sec[data-sec="ready"] .wd-rerun { background: transparent; color: var(--p, #ba85a6); }
.wd-badge { font: 600 10px 'Montserrat', sans-serif; color: #f59e0b; text-align: center; white-space: nowrap; }
@media (max-width: 520px) { .wd-acts { flex-direction: row; align-self: flex-end; } }
