/* kurye-core · Operasyon Ekranı
   Tasarım dili: SEVKİYAT KONSOLU. Katı yüzeyler (cam/blur yok — yalnız modal
   scrim'inde), düz dolgulu durum göstergeleri (parlama yok), mono-öne-çıkan
   manifesto tipografisi (sipariş no/mesafe/tutar hep tabular mono), tek marka
   rengi (indigo — hem birincil eylem hem "atandı" durumu). Gerçek açık/koyu
   tema çifti: biri diğerinin tersi değil, ikisi de kendi kimliğinde.

   TİPOGRAFİ: IBM Plex superfamily (self-host, web/static/fonts). Plex Sans =
   gövde/etiket (mühendislik/endüstriyel DNA, karakterli ama gürültüsüz), Plex
   Mono = tüm sayılar (lojistik alette tabular sayı için tematik). Tek aile =
   kasıtlı; "rastgele iki font" izlenimi yok. latin + latin-ext (Türkçe ş/ğ/İ). */

/* --- Plus Jakarta Sans (gövde metni) ---
   IBM Plex Sans'ın yerine geçti: Plex teknik ve sert bir yüz, gün boyu
   bakılan bir mutfak ekranında yoruyordu. Jakarta daha yuvarlak ve sıcak,
   küçük puntoda da okunaklı.

   VARIABLE FONT: 400-700 arası tüm ağırlıklar TEK dosyada. Eskiden ağırlık
   başına ayrı dosya vardı (8 istek, 236 KB); şimdi 2 dosya, 48 KB.
   İkiye bölünmesinin sebebi alfabe: "lat" temel Latin, "ext" ise Türkçe
   ğ/ş/ı/İ/ç/ö/ü'nün yaşadığı Latin-Ext bloğu. Tarayıcı yalnız gerekeni
   indirir, ama bizde ikisi de her zaman gerekiyor (Türkçe arayüz). */
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("fonts/pjs-lat.woff2") format("woff2");
  unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family:"Plus Jakarta Sans"; font-style:normal; font-weight:400 700; font-display:swap;
  src:url("fonts/pjs-ext.woff2") format("woff2");
  unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* IBM Plex Mono KALIYOR: rakamlar için. Tutar/adet sütunlarında sabit
   genişlikli rakam şart — hizasız kolonda göz toplam ararken kayıyor. */
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:500; font-display:swap;
  src:url(fonts/plex-mono-500.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:500; font-display:swap;
  src:url(fonts/plex-mono-ext-500.woff2) format("woff2");
  unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:600; font-display:swap;
  src:url(fonts/plex-mono-600.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"IBM Plex Mono"; font-style:normal; font-weight:600; font-display:swap;
  src:url(fonts/plex-mono-ext-600.woff2) format("woff2");
  unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* ---------- AÇIK TEMA (varsayılan) ---------- */
:root {
  --bg:        #EEF1F5;
  --surface:   #FFFFFF;
  --surface-2: #E1E5EC;   /* rail, toolbar, sheet başlığı */
  --surface-3: #F4F6F9;   /* hover tonu */
  --ink:       #12161F;
  --ink-2:     #454D5C;
  --ink-3:     #6B7383;
  --line:      #D9DEE6;
  --line-2:    #C5CBD6;

  --accent:       #2451D6;
  --accent-ink:   #1B3EAA;   /* koyu metin/ikon üstü accent (açık zeminde) */
  --accent-weak:  rgba(36,81,214,.10);

  --amber:      #B7791F;  --amber-bg:  #FBF1DD;  --amber-ink: #8A5A14;
  --green:      #1E8E4F;  --green-bg:  #E4F5EA;  --green-ink: #146238;
  --red:        #D23B2E;  --red-bg:    #FBE7E5;  --red-ink:   #A32A20;
  --blue:       var(--accent); --blue-bg: var(--accent-weak); --blue-ink: var(--accent-ink);
  /* Randevulu sipariş (JaviKurye'nin mor sekmesinden esinlenildi — bkz.
     db/025_randevulu_siparis.sql). Diğer durumlardan AYRI bir renk: randevu
     bir "durum" değil çapraz-kesen bir özellik, karıştırılmamalı. */
  --violet:     #6D42C7;  --violet-bg: #EFE7FB;  --violet-ink: #5A35A5;

  --shadow: 0 1px 2px rgba(20,24,32,.05), 0 10px 28px rgba(20,24,32,.08);
  --scrim:  rgba(10,12,16,.42);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #10141C;
    --surface:   #171C27;
    --surface-2: #0D1119;
    --surface-3: #212838;
    --ink:       #EAEDF3;
    --ink-2:     #B2B9C8;
    --ink-3:     #868E9F;
    --line:      rgba(255,255,255,.09);
    --line-2:    rgba(255,255,255,.15);

    --accent:      #3E63E0;
    --accent-ink:  #A9BBFF;
    --accent-weak: rgba(108,140,255,.16);

    --amber: #E8A23D; --amber-bg: rgba(232,162,61,.14); --amber-ink: #F0B85C;
    --green: #3FCB7A; --green-bg: rgba(63,203,122,.14); --green-ink: #6BDB9B;
    --red:   #F1584B; --red-bg:   rgba(241,88,75,.14);  --red-ink:   #FF8478;
    --blue:  var(--accent); --blue-bg: var(--accent-weak); --blue-ink: var(--accent-ink);
    --violet: #A78BFA; --violet-bg: rgba(167,139,250,.16); --violet-ink: #C7B6FF;

    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.4);
    --scrim:  rgba(4,5,8,.6);
  }
}
/* elle seçim, sistem tercihinin İKİ yönünü de ezer */
:root[data-theme="dark"] {
  --bg: #10141C; --surface: #171C27; --surface-2: #0D1119; --surface-3: #212838;
  --ink: #EAEDF3; --ink-2: #B2B9C8; --ink-3: #868E9F;
  --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.15);
  --accent: #3E63E0; --accent-ink: #A9BBFF; --accent-weak: rgba(108,140,255,.16);
  --amber: #E8A23D; --amber-bg: rgba(232,162,61,.14); --amber-ink: #F0B85C;
  --green: #3FCB7A; --green-bg: rgba(63,203,122,.14); --green-ink: #6BDB9B;
  --red:   #F1584B; --red-bg:   rgba(241,88,75,.14);  --red-ink:   #FF8478;
  --blue:  var(--accent); --blue-bg: var(--accent-weak); --blue-ink: var(--accent-ink);
  --violet: #A78BFA; --violet-bg: rgba(167,139,250,.16); --violet-ink: #C7B6FF;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.4);
  --scrim: rgba(4,5,8,.6);
}
:root[data-theme="light"] {
  --bg: #EEF1F5; --surface: #FFFFFF; --surface-2: #E1E5EC; --surface-3: #F4F6F9;
  --ink: #12161F; --ink-2: #454D5C; --ink-3: #6B7383;
  --line: #D9DEE6; --line-2: #C5CBD6;
  --accent: #2451D6; --accent-ink: #1B3EAA; --accent-weak: rgba(36,81,214,.10);
  --amber: #B7791F; --amber-bg: #FBF1DD; --amber-ink: #8A5A14;
  --green: #1E8E4F; --green-bg: #E4F5EA; --green-ink: #146238;
  --red:   #D23B2E; --red-bg:   #FBE7E5; --red-ink:   #A32A20;
  --blue:  var(--accent); --blue-bg: var(--accent-weak); --blue-ink: var(--accent-ink);
  --violet: #6D42C7; --violet-bg: #EFE7FB; --violet-ink: #5A35A5;
  --shadow: 0 1px 2px rgba(20,24,32,.05), 0 10px 28px rgba(20,24,32,.08);
  --scrim: rgba(10,12,16,.42);
}

:root {
  --r:   10px;
  --r-2: 8px;
  --r-3: 6px;
  --rail-w: 60px;
  --right-w: 380px;
  --ease: cubic-bezier(.32,.72,0,1);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.5;
  /* NETLİK: "antialiased" gövdeyi inceltip uzaktan soluk gösteriyordu; varsayılan
     render + optimizeLegibility daha kalın ve keskin bir kenar verir. */
  -webkit-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  transition: background-color .2s, color .2s;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }
h2, h3 { margin: 0; font-weight: 600; }

.ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.75;
      stroke-linecap: round; stroke-linejoin: round; display: block; flex: 0 0 auto; }
.ic--muted { color: var(--ink-3); }

/* ---------- düzen: rail | sahne(toolbar+harita) | sağ çekmece ---------- */
.app {
  position: relative;
  display: flex;
  height: 100vh;
  width: 100vw;
  background: var(--bg);
}
.stage { flex: 1 1 auto; position: relative; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- sol kontrol düğümü (nav) ----------
   Sabit rail yerine: haritanın üstünde yüzen camsı bir "kontrol düğümü".
   Glyph = 3×3 nokta ızgarası (harfsiz, kontrol-paneli dili); tıklanınca ×'e
   dönüşür ve camsı komut paneli açılır. Bağlantı durumu sağ-altta küçük SABİT
   bir rozette (yalnız canlı/hata belirir; bağlı değilken düğüm sade kalır). */
.nav { position: absolute; top: 16px; left: 16px; z-index: 31; }

.node {
  position: relative; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 76%, transparent);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
  transition: transform .18s var(--ease), box-shadow .2s, border-color .2s;
}
.node:hover { transform: scale(1.06); border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-weak); }
.node:active { transform: scale(.97); }

/* ızgara ↔ × geçişi */
.node__glyph { position: relative; width: 20px; height: 20px; display: grid; place-items: center; }
.node__grid, .node__x {
  grid-area: 1 / 1; transition: opacity .22s var(--ease), transform .28s var(--ease);
}
.node__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 3.5px;
  width: 18px; height: 18px; place-items: center;
}
.node__grid i { width: 3.5px; height: 3.5px; border-radius: 1.5px; background: var(--ink-2); transition: background .15s; }
.node:hover .node__grid i { background: var(--ink); }
.node__x { width: 20px; height: 20px; color: var(--ink); opacity: 0; transform: rotate(-30deg) scale(.7); }
.nav[data-open="true"] .node__grid { opacity: 0; transform: rotate(30deg) scale(.7); }
.nav[data-open="true"] .node__x { opacity: 1; transform: none; }

/* bağlantı rozeti (sağ-alt): sabit, dönmez. Canlı=yeşil, hata=kırmızı; off=gizli */
.node__live {
  position: absolute; right: 5px; bottom: 5px; width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--ink-3);
  opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .2s var(--ease), background .2s;
}
.nav[data-state="on"]  .node__live { opacity: 1; transform: none; background: var(--green); }
.nav[data-state="err"] .node__live { opacity: 1; transform: none; background: var(--red); }

/* komut paneli */
.navpanel {
  position: absolute; top: 60px; left: 0; width: 238px;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 8px;
  transform-origin: 26px -12px;
  opacity: 0; transform: scale(.9) translateY(-8px); pointer-events: none;
  transition: opacity .18s var(--ease), transform .26s var(--ease);
}
.nav[data-open="true"] .navpanel { opacity: 1; transform: none; pointer-events: auto; }

.navpanel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 9px;
}
.navpanel__brand { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: var(--ink); }
.navpanel__live { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); }
.navpanel__live .live__dot { margin: 0; }
.nav[data-state="on"]  .navpanel__live .live__dot { background: var(--green); }
.nav[data-state="err"] .navpanel__live .live__dot { background: var(--red); }
.navpanel__sep { height: 1px; background: var(--line); margin: 6px 6px; }
.navpanel__group { display: flex; flex-direction: column; gap: 2px; }

.navitem {
  display: flex; align-items: center; gap: 11px; width: 100%;
  height: 42px; padding: 0 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px; font-weight: 500; text-align: left;
  transition: opacity .22s var(--ease), transform .24s var(--ease), background .14s, color .14s;
  opacity: 0; transform: translateY(6px);
}
.nav[data-open="true"] .navitem { opacity: 1; transform: none; transition-delay: calc(var(--d, 0) * 32ms); }
.navitem .ic { color: var(--ink-3); transition: color .14s; }
.navitem:hover { background: var(--surface-3); color: var(--ink); }
.navitem:hover .ic { color: var(--ink); }
.navitem__l { flex: 1; }
.navitem.is-active { color: var(--ink); background: var(--accent-weak); }
.navitem.is-active .ic { color: var(--accent-ink); }
.navitem__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 8px var(--accent); flex: 0 0 auto; }
.navitem__tag {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
  color: var(--ink-3); background: var(--surface-3); padding: 2px 7px; border-radius: 6px;
}
.navitem__meta { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* çıkış = kırmızı, bağlan = accent (JS ikisi arasında geçirir) */
.navitem--danger { color: var(--red-ink); }
.navitem--danger .ic { color: var(--red); }
.navitem--danger:hover { background: var(--red-bg); color: var(--red-ink); }
.navitem--danger:hover .ic { color: var(--red); }
.navitem--accent { color: var(--accent-ink); }
.navitem--accent .ic { color: var(--accent-ink); }
.navitem--accent:hover { background: var(--accent-weak); color: var(--accent-ink); }

/* menü açıkken haritayı hafifçe geri iten scrim (odak paneline) */
.navscrim {
  position: absolute; inset: 0; z-index: 20;
  background: transparent; background: color-mix(in srgb, black 12%, transparent);
  backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.nav[data-open="true"] ~ .navscrim { opacity: 1; pointer-events: auto; }

/* toast (yakında vb. kısa bildirim) */
.toast {
  position: absolute; left: 50%; bottom: 96px; z-index: 33;
  max-width: 78vw;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow);
  padding: 10px 15px; font-size: 13px; color: var(--ink); white-space: nowrap;
  opacity: 0; transform: translate(-50%, 8px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
/* Toast içi kısayol düğmesi (11 Eyl 2026) — "Bekleyene al"dan sonra sekmeye
   gitmek İSTEYEN için. Toast normalde pointer-events:none; düğme varken JS
   bunu açıyor. */
.toast__btn {
  margin-left: 10px; padding: 3px 9px;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg-soft, transparent); color: var(--accent);
  font: inherit; font-weight: 600; cursor: pointer;
}
.toast__btn:hover { background: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .navpanel, .navitem, .toast, .node__grid, .node__x, .node__live { transition-duration: .01ms; }
  .nav[data-open="true"] .navitem { transition-delay: 0s; }
}

/* ---------- toolbar (haritanın ÜSTÜNDE değil, üzerinde bir şerit) ---------- */
/* Harita üstü kurye sayaç göstergesi: kontrol düğümüyle aynı camsı dilde,
   tam-yuvarlak uçlu bir "gösterge okuması". Bağlantı durumu artık düğümün radar
   halkasında olduğu için buradaki eski bağlantı noktası KALDIRILDI — pill yalnız
   aktif/boşta kurye sayısını taşır (üstüne gelince başlıkta bağlantı metni). */
.mapkpi {
  position: absolute; top: 23px; left: 84px; z-index: 9;
  display: flex; align-items: center; height: 36px;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 74%, transparent);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06);
  white-space: nowrap;
}
/* .live__dot temel kuralı menü panelindeki canlı noktası için korunur */
.live__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3);
  flex: 0 0 auto; margin-right: 9px; }
.kpi { display: flex; align-items: center; gap: 7px; padding: 0 13px;
  font-size: 11.5px; color: var(--ink-3); }
.kpi::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-3); flex: 0 0 auto; }
.kpi--active::before { background: var(--accent);
  box-shadow: 0 0 6px var(--accent); box-shadow: 0 0 6px color-mix(in srgb, var(--accent) 60%, transparent); }
.kpi b { font-family: var(--mono); font-weight: 600; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.kpi--sep { border-left: 1px solid var(--line); }

/* ---------- harita alanı ---------- */
.mapwrap { flex: 1 1 auto; position: relative; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--bg); z-index: 1; }
/* HARİTA ZEMİNİ KISILDI (19 Eyl 2026, sahadan: "çok beyaz, göz yoruyor").
   Voyager'ın zemini ~#fafaf8 — gün boyu bakan operatör için parlak. Fayans
   değiştirilmedi (detay/anahtar iyi); YALNIZ fayans katmanı hafif
   karartılıp rengi biraz canlandırıldı → beyaz kırık griye iner, yollar/
   yeşil alanlar belirginleşir. Etiketler ve noktalar ayrı katmanda,
   ETKİLENMEZ. */
.leaflet-tile-pane { filter: brightness(.87) saturate(1.25) contrast(1.04); }
.leaflet-container { background: var(--bg); font-family: var(--font); }
.leaflet-control-attribution {
  background: var(--surface) !important; background: color-mix(in srgb, var(--surface) 82%, transparent) !important;
  color: var(--ink-3) !important; font-size: 10.5px !important;
}
.leaflet-control-attribution a { color: var(--ink-2) !important; }
/* Harita tile'ı artık koyu temada da Voyager (dark_all değil) — filtre
   dark_all'un neredeyse simsiyah tonunu telafi içindi, Voyager'a gerek yok. */
/* Leaflet tooltip/popup panel temasına uysun (beyaz kutu koyu temada sırıtıyordu). */
.leaflet-tooltip { background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: var(--r-3); font-family: var(--font); font-size: 12.5px; }
/* Kurye pini ipucu: tek satır, ufak (son konumun yaşı). */
.leaflet-tooltip.tip-kucuk { font-size: 11px; padding: 2px 7px; color: var(--ink-2); white-space: nowrap; }
.leaflet-tooltip-top:before { border-top-color: var(--surface); }
.leaflet-tooltip-bottom:before { border-bottom-color: var(--surface); }
.leaflet-tooltip-left:before { border-left-color: var(--surface); }
.leaflet-tooltip-right:before { border-right-color: var(--surface); }
.leaflet-popup-content-wrapper { background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font); font-size: 13.5px; line-height: 1.45; }
.leaflet-popup-close-button { color: var(--ink-3) !important; }
/* haritadan atama popup'ı */
.assignpop { min-width: 150px; }
.assignpop__t { font-weight: 600; margin-bottom: 2px; }
.assignpop__s { color: var(--ink-2); font-size: 12.5px; }
.assignpop .btn { height: 32px; width: 100%; margin-top: 8px; font-size: 14px; }

.mapctl { position: absolute; top: 82px; left: 16px; z-index: 9; display: flex; flex-direction: column; gap: 1px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); box-shadow: var(--shadow); overflow: hidden; }
.mapctl__btn {
  width: 38px; height: 38px; color: var(--ink); display: grid; place-items: center;
  transition: background .15s; border-bottom: 1px solid var(--line);
}
.mapctl__btn:last-child { border-bottom: 0; }
.mapctl__btn:hover { background: var(--surface-3); }
.mapctl__btn .ic { width: 18px; height: 18px; }
.mapctl__btn.is-active { color: var(--accent); background: var(--accent-weak); }

/* TAM EKRAN HARİTA (Javi'nin ⤢ deseni): sheet + sağ çekmece gizlenir, harita
   sahneyi kaplar. KPI pill'i haritada yüzdüğü için görünür kalır. */
#app[data-map="full"] .drawer--right,
#app[data-map="full"] .sheet,
#app[data-map="full"] .reopen,
#app[data-map="full"] .rscrim { display: none !important; }

/* Harita açıklaması (legend): sol-üstte, zoom kontrollerinin altında. Katlanır.
   top = mapctl (4 düğme × 38px + ayraçlar) + boşluk — kontrol sütununu ÖRTMEMELİ. */
/* Sağ-üst araç kolonu: Katmanlar üstte, Açıklama altında istifli. Açılınca
   aşağı doğru büyür, biri diğerini itmez (flex kolon). */
.maptools { position: absolute; top: 14px; right: 14px; z-index: 9;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  transition: right .3s var(--ease); }
#app[data-right="closed"] .maptools { right: 46px; }
.legend {
  width: 184px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2);
  box-shadow: var(--shadow); overflow: hidden;
}
.legend__head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 11px;
  font-weight: 600; font-size: 13.5px; color: var(--ink);
}
.legend__key { width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(135deg, var(--amber) 0 33%, var(--accent) 33% 66%, var(--green) 66%); }
.legend__head .ic { margin-left: auto; color: var(--ink-3); transform: rotate(90deg); transition: transform .2s var(--ease); }
.legend[data-open="true"] .legend__head .ic { transform: rotate(-90deg); }
.legend[data-open="false"] .legend__body { display: none; }
.legend__body { padding: 2px 11px 10px; }
.legend__grp { font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .4px; margin: 8px 0 4px; }
.legend__row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.sw { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); flex: none; }
.sw--dot { width: 11px; height: 11px; border-radius: 50%; }
.sw--amber { background: var(--amber); }
.sw--blue  { background: var(--accent); }
.sw--green { background: var(--green); }
.legend__store { width: 16px; text-align: center; font-size: 12px; flex: none; }

.maplayers {
  width: 184px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2);
  box-shadow: var(--shadow); overflow: hidden;
}
.maplayers__head {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px;
  font-weight: 600; font-size: 14px; color: var(--ink);
}
.maplayers__head .ic:last-child { margin-left: auto; color: var(--ink-3); transform: rotate(90deg); transition: transform .2s var(--ease); }
.maplayers[data-open="true"] .maplayers__head .ic:last-child { transform: rotate(-90deg); }
.maplayers__body { padding: 2px 6px 6px; display: flex; flex-direction: column; }
.maplayers[data-open="false"] .maplayers__body { display: none; }
.maplayers__body label {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: var(--r-3);
  font-size: 14px; color: var(--ink-2); cursor: pointer;
}
.maplayers__body label:hover { background: var(--surface-3); color: var(--ink); }
.maplayers__body input { accent-color: var(--accent); width: 14px; height: 14px; }

/* ---------- durum noktaları: DÜZ, parlamasız ---------- */
.dot { width: 7px; height: 7px; border-radius: 2px; display: inline-block; flex: 0 0 auto; }
.dot--amber  { background: var(--amber); }
.dot--blue   { background: var(--blue); }
.dot--green  { background: var(--green); }
.dot--red    { background: var(--red); }
.dot--violet { background: var(--violet); }

/* ---------- ALT SHEET: sipariş kuyruğu ---------- */
/* Yükseklik tek kaynaktan: --sheet-h. Tıklama (aç/kapa) bu değeri değiştirir,
   tutup sürükleme de — yani iki etkileşim aynı modeli paylaşır, çakışmaz. */
.sheet {
  /* sınırlar: kapalı 58px, tam açık min(62vh,600px) — app.js aynı değerleri kullanır */
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 12;
  display: flex; flex-direction: column;
  /* JS gelmeden önceki ilk kare de doğru yükseklikte olsun (açılışta zıplama yok) */
  height: var(--sheet-h, min(62vh, 365px)); overflow: hidden;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(10,14,20,.08);
  transition: height .34s var(--ease);
}
/* sürüklerken parmağı geciktirmesin */
.sheet.is-dragging { transition: none; }
.sheet__handle {
  /* İnce tutamaç (4 Eki 2026): tutma çizgisi + ok YAN YANA — sekme şeridi
     yukarı çıksın, kuyruğa yer kalsın. */
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 5px 0 2px; color: var(--ink-3);
  cursor: grab; touch-action: none; user-select: none;
}
.sheet.is-dragging .sheet__handle { cursor: grabbing; }
.sheet__handle:hover .sheet__grip { background: var(--ink-3); }
.sheet__grip { width: 42px; height: 4px; border-radius: 3px; background: var(--line-2); transition: background .15s; }
.sheet__chev { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.sheet[data-open="true"] .sheet__chev { transform: rotate(180deg); }
.sheet__bar { flex: 0 0 auto; padding: 0 12px 5px; display: flex; align-items: center; gap: 12px; }
.sheet__body { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 0 12px 8px; }

/* çoklu atama çubuğu: seçim varken kuyruğun üstünde belirir. */
.bulkbar {
  flex: 0 0 auto; margin: 0 16px 10px; padding: 8px 10px 8px 14px;
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-weak); border: 1px solid transparent; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-2); font-size: 14px; font-weight: 600; color: var(--accent-ink);
}
.bulkbar #bulkCount { flex: 1; }
.bulkbar .btn { height: 32px; padding: 0 12px; font-size: 13.5px; }

.segtabs { display: flex; gap: 4px; }
.segtab {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: var(--r-2); color: var(--ink-2);
  font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: background .15s, color .15s;
}
.segtab:hover { background: var(--surface-3); color: var(--ink); }
/* is-active eskiden --surface-3 kullanıyordu: açık temada --surface (beyaz)
   üstünde #F4F6F9 neredeyse ayırt edilemiyordu (koyu temada biraz daha
   belirgindi, ama o da zayıftı). accent-weak + accent metin, seçili sekmeyi
   her iki temada da net gösterir — .qcard.is-active'le aynı dil. */
.segtab.is-active { background: var(--accent-weak); color: var(--accent-ink); }
.seg-count { font-family: var(--mono); font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.segtab.is-active .seg-count { color: var(--accent-ink); }
/* Sorunlu sekmesi 0 iken kırmızı bağırmasın: nokta nötr griye düşer. */
.segtab[data-zero="1"] .dot--red { background: var(--ink-3); opacity: .55; }

.searchbar {
  flex: 1 1 auto; max-width: 320px; margin-left: auto;
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 11px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2);
}
.searchbar input { flex: 1; background: none; border: 0; color: var(--ink); outline: none; font-size: 14.5px; min-width: 0; }
.searchbar input::placeholder { color: var(--ink-3); }
/* Kurye listesi araması: süzgecin altında tam genişlik, dar ekranda da görünür. */
.searchbar--kurye { max-width: none; margin: 8px 0 0; }
/* Manuel paket formundaki işletme araması: başlık ile liste arasında. */
.searchbar--form { margin: 0 0 6px; }

/* ---------- kuyruk: manifesto listesi (kartlar değil, ince-ayraçlı satırlar) ---------- */
.queue { display: flex; flex-direction: column; }
.qcard {
  display: grid; grid-template-columns: 3px 1fr auto; align-items: center; gap: 14px;
  padding: 11px 4px 11px 12px; cursor: pointer; border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.qcard:last-child { border-bottom: 0; }
.qcard:hover { background: var(--surface-3); }
.qcard.is-active { background: var(--accent-weak); }
/* çoklu atama: yalnız "Bekleyen" sekmesinde işaretlenebilir → 4. sütun. */
.qcard[data-selectable="1"] { grid-template-columns: 20px 3px 1fr auto; }
.qcard__pick { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qcard__pick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.qcard__edge { align-self: stretch; border-radius: 2px; background: var(--edge, var(--ink-3)); }
.qcard[data-edge="amber"]  { --edge: var(--amber); }
.qcard[data-edge="blue"]   { --edge: var(--blue); }
.qcard[data-edge="green"]  { --edge: var(--green); }
.qcard[data-edge="red"]    { --edge: var(--red); }
.qcard__main { min-width: 0; }
/* Üst satır: kimlik · süre · işletme · müşteri · telefon · çipler. Dar
   ekranda sarar (responsive), genişte tek satır. */
.qcard__top { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.qcard__id { font-family: var(--mono); font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* Günlük paket no (036): firma geneli sayaç, "Adisyon No"nun yanında. */
.qcard__daily { color: var(--accent); font-weight: 700; margin-left: 3px; }
/* Bekleme süresi: sevkiyatta en kritik alan. 10 dk üstü amber, 20 dk üstü
   kırmızı — operatör geciken siparişi taramadan görsün. */
.qcard__age { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px;
  padding: 1px 6px; font-variant-numeric: tabular-nums; }
.qcard__age[data-late="1"] { color: var(--amber-ink); border-color: transparent; border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.qcard__age[data-late="2"] { color: var(--red-ink);   border-color: transparent; border-color: color-mix(in srgb, var(--red) 45%, transparent); }
/* Meta çipler: ödeme · kanal · gel-al. JaviKurye yoğunluğu, ince/nötr çiplerle.
   Süre rozetinin hemen yanında dururlar (sağa fırlatılmaz). */
.qcard__chips { display: inline-flex; gap: 5px; }
.chip { font-size: 11px; font-weight: 500; line-height: 1; padding: 3px 7px; border-radius: 5px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip--amber { color: var(--amber-ink); background: transparent; background: color-mix(in srgb, var(--amber) 12%, transparent);
  border-color: transparent; border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.chip--chan { color: var(--accent); background: transparent; background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: transparent; border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
/* Randevulu sipariş çipi — bkz. db/025_randevulu_siparis.sql. */
.chip--violet { color: var(--violet-ink); background: transparent; background: color-mix(in srgb, var(--violet) 12%, transparent);
  border-color: transparent; border-color: color-mix(in srgb, var(--violet) 35%, transparent); }
/* Ödeme yöntemi rengi (kart=mavi, online=yeşil; nakit chip--amber'i paylaşır). */
.chip--blue { color: var(--blue-ink); background: transparent; background: color-mix(in srgb, var(--blue) 12%, transparent);
  border-color: transparent; border-color: color-mix(in srgb, var(--blue) 35%, transparent); }
.chip--green { color: var(--green-ink); background: transparent; background: color-mix(in srgb, var(--green) 12%, transparent);
  border-color: transparent; border-color: color-mix(in srgb, var(--green) 35%, transparent); }
/* Atanan kurye adı — sağ sütunda, tutarın üstünde ("kim taşıyor" bir bakışta). */
.qcard__cour { font-size: 12.5px; font-weight: 500; color: var(--accent); }
/* JaviKurye satırında işletme adı renkli bir etiketti; aynı dil, kendi
   paletimizle. Müşteri adı yanına düşer (adres satırından ayrıldı). */
.bizchip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-weight: 600; font-size: 14px;
  color: var(--green-ink); background: var(--green-bg); }
.qcard__cust { font-size: 14px; color: var(--ink-2); }
/* Müşteri telefonu — satırda, adın yanında (10 Eyl 2026). Monospace: numara
   göz taramasıyla okunacak bir şey, orantılı fontta rakamlar kayıyor.
   Ad ile aynı ağırlıkta DEĞİL: asıl bilgi adres, numara ise gerektiğinde
   dokunulan bir kısayol. */
.qcard__tel { font-size: 13px; color: var(--ink-3);
  font-family: var(--mono); text-decoration: none; white-space: nowrap; }
.qcard__tel:hover { color: var(--blue-ink); text-decoration: underline; }
/* "Görüldü" (kuryenin telefonunda göründüğü an) ve atamayı yapan — JaviKurye
   satırındaki "Görüldü : 18:24:41" / "Kurye Atandı - Operator" karşılığı. */
.qcard__seen { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }
/* İletildi: kuryeye gönderildi ama HENÜZ KABUL ETMEDİ. Bilerek daha soluk —
   "Görüldü" ile aynı ağırlıkta olsaydı operatör ikisini ayırt etmezdi. */
.qcard__sent { font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); opacity: .72; }
.qcard__by { font-weight: 500; color: var(--ink-3); }
.chip--now { color: var(--ink-3); }
/* Alt satır: adres + (varsa) not yan yana; ikisi de kısalır. */
.qcard__line2 { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; min-width: 0; }
.qcard__addr { flex: 0 1 auto; min-width: 0; color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard__line2 .qcard__note { flex: 0 2 auto; min-width: 60px; max-width: 50%; margin-top: 0; }
/* Sipariş notu — JaviPos referansında satırda dikkat çeken (amber) bir
   renkte duruyordu. Yalnız not VARSA basılır (bkz. app.js renderQueue). */
.qcard__note { color: var(--amber-ink); font-size: 13px; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
/* Sağ blok iki satır: durum + kurye / görüldü + tutar. */
.qcard__srow { display: flex; align-items: baseline; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.qcard__status { font-size: 13px; font-weight: 600; }
.qcard__amt { font-family: var(--mono); font-size: 14.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* Detay panelde kurye adı vurgusu + satır-içi geçen süre. */
.drow__v--cour { color: var(--accent); font-weight: 600; }
.ageinline { font-family: var(--mono); font-size: 12.5px; }
.ageinline[data-late="1"] { color: var(--amber-ink); }
.ageinline[data-late="2"] { color: var(--red-ink); }

/* ---------- sağ çekmece ---------- */
.drawer {
  background: var(--surface);
  display: flex; flex-direction: column;
  transition: width .34s var(--ease);
}
.drawer--right { flex: 0 0 var(--right-w); width: var(--right-w); border-left: 1px solid var(--line); }
#app[data-right="closed"] .drawer--right { width: 0; flex-basis: 0; }
.drawer__head {
  flex: 0 0 auto; height: 50px; padding: 0 10px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line);
}
.iconbtn {
  width: 32px; height: 32px; border-radius: var(--r-2); color: var(--ink-3);
  display: grid; place-items: center; transition: color .15s, background .15s;
}
.iconbtn:hover { color: var(--ink); background: var(--surface-3); }

.reopen {
  position: absolute; top: 66px; right: 0; z-index: 30;
  width: 26px; height: 46px; color: var(--ink-2);
  display: none; place-items: center;
  background: var(--surface); border: 1px solid var(--line); border-right: 0;
  border-radius: var(--r-2) 0 0 var(--r-2); box-shadow: var(--shadow);
  transition: color .15s, background .15s;
}
.reopen:hover { color: var(--accent); background: var(--surface-3); }
.reopen .ic { width: 19px; height: 19px; }
#app[data-right="closed"] .reopen--right { display: grid; }

/* ---------- sağ panel modları ---------- */
/* Mod sekmeleri: soluk "gri hap" yerine canlı — aktif olan marka rengiyle dolu,
   altında kayan bir gösterge yok; net, tek okunur seçim. */
.modetabs { display: flex; gap: 3px; background: var(--bg); padding: 3px;
  border-radius: var(--r-2); border: 1px solid var(--line); }
.modetab {
  position: relative; padding: 7px 12px; border-radius: var(--r-3);
  font-size: 14px; font-weight: 600; color: var(--ink-2); letter-spacing: -.1px;
  transition: background .16s, color .16s, transform .1s;
}
.modetab:hover { color: var(--ink); background: var(--surface-3); }
.modetab:active { transform: scale(.96); }
.modetab.is-active {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 2px rgba(20,24,32,.12), 0 2px 8px var(--accent-weak);
}
.modetab.is-active:hover { background: var(--accent); color: #fff; filter: brightness(1.07); }
/* 062: Uyarılar sekmesindeki kırmızı nokta — sorunlu paket beklerken yanar.
   Beyaz halka, sekme etkinken (mavi zemin) noktanın erimesini önler. */
.modetab__dot {
  position: absolute; top: 3px; right: 3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--red);
  border: 1.5px solid var(--surface);
}
/* Sorunlu paket uyarısı: mesaj satırlarından ayrılsın diye kırmızı şerit. */
.alertrow--sorun { border-left: 3px solid var(--red); }
/* Detaydaki tek satırlık bilgi notu (kurye sorun gerekçesi gibi). */
.dnote { flex: 1 1 100%; font-size: 12.5px; color: var(--ink-2); padding: 2px 2px 0; }
/* Sorunlu paketin gerekçe satırı — sipariş notundan ayrılsın diye kırmızı. */
.qcard__note--sorun { color: var(--red-ink); background: var(--red-bg); }

.panes { flex: 1 1 auto; overflow: hidden; position: relative; }
.pane { position: absolute; inset: 0; overflow-y: auto; padding: 16px;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease); }
.pane.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* GLOBAL: hidden attribute HER ZAMAN gizlesin. .empty gibi display:flex kuralları
   aynı özgüllükte `[hidden]`i eziyordu → seçili siparişte boş-durum GİZLENMİYORDU
   (detay paneli hem boş metni hem içeriği aynı anda gösteriyordu). */
[hidden] { display: none !important; }
.empty { height: 100%; min-height: 320px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; gap: 10px; padding: 30px; }
/* İkon "tasarlanmış" bir çip içinde — placeholder değil, kasıtlı boş durum. */
.empty__ic { width: 26px; height: 26px; padding: 15px; box-sizing: content-box;
  border-radius: 16px; background: var(--surface-3); border: 1px solid var(--line);
  color: var(--ink-2); fill: none; stroke: currentColor;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty__t { font-weight: 600; font-size: 16.5px; margin: 4px 0 0; }
.empty__s { color: var(--ink-3); font-size: 14.5px; max-width: 250px; margin: 0; line-height: 1.55; }
/* Alt sheet daralınca kuyruk boş-durumu kırpılmasın: --empty-vis (app.js, sheet
   yüksekliğinden türetilir) 1→0 indikçe blok yumuşakça solup birkaç px aşağı
   kayar. Yalnız sheet içindeki boş-durum; sağ çekmecedeki "Sipariş seçili değil"
   bundan etkilenmez. */
.sheet__body .empty {
  opacity: var(--empty-vis, 1);
  transform: translateY(calc((1 - var(--empty-vis, 1)) * 6px));
  transition: opacity .26s var(--ease), transform .26s var(--ease);
  will-change: opacity, transform;
}
/* Sürüklerken görünürlük parmakla birebir aksın (geçiş gecikmesi = takılma hissi);
   yumuşak solma yalnız tıkla-aç/kapa'da. */
.sheet.is-dragging .empty { transition: none; }

/* ---------- form (manuel paket & login) ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form__lead { color: var(--ink-2); font-size: 14.5px; margin: 0 0 2px; line-height: 1.5; }
.form__lead b { color: var(--accent); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; color: var(--ink-3); font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.field input, .field select, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-2);
  padding: 9px 11px; color: var(--ink); outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* 🔴 IZGARA ÇOCUKLARINDA min-width:0 ŞART. Varsayılan `min-width:auto` bir
   ızgara sütununu içeriğin MIN-CONTENT genişliğinin altına indirmez ve bir
   <input>'un min-content'i tarayıcı varsayılanıyla ~180px'dir (UA `size`
   niteliği). 380px'lik sağ çekmecede iki sütun sığmıyor, satır taşıyor ve
   panel YATAY KAYIYORDU: manuel sipariş formunun sol sütunu (Telefon, Bina,
   Tutar…) ekranın dışında kalıyor, kullanıcı yalnız sağ yarıyı görüyordu.
   Kırpmak (overflow:hidden) alanı gizlerdi; doğru cevap sütunun küçülmesine
   izin vermek. */
.field-row > *, .field-row > * > * { min-width: 0; }
.field input, .field select, .field textarea { min-width: 0; width: 100%; }
.pickbtn {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: var(--r-2);
  background: var(--bg); border: 1px dashed var(--line-2); color: var(--ink-2); font-size: 15px;
  transition: border-color .15s, color .15s;
}
.pickbtn:hover { border-color: var(--accent); color: var(--ink); }
.pickbtn.is-set { border-style: solid; border-color: var(--green); color: var(--ink); }
/* 070: geocode işletmeden çok uzak bir nokta döndürdü — yeşil "bulundu"
   görünümü burada YANILTICI olurdu (canlıda telefon numarası/kişi adı
   yazılmış adresler 500 km öteye düşüyor ve kimse fark etmiyordu). Düğme
   seçili kalır ama uyarı rengine döner; karar operatörün. */
.pickbtn.is-set:has(#pickLabel.is-uzak) { border-color: var(--amber); }
#pickLabel.is-uzak { color: var(--amber); font-size: 13px; }
.chipset, .segpill { display: flex; gap: 6px; }
/* 047: dördüncü seçenek (Yemek kartı) eklenince dar sağ panelde tek satıra
   sığmıyor. Sarma açık ve her çipin bir alt genişliği var — sığmayan çip alt
   satıra iner, harfleri kırılıp okunmaz hâle gelmez. */
.chipset { flex-wrap: wrap; }
.paychip {
  flex: 1 1 auto; min-width: 84px; white-space: nowrap;
  padding: 8px; border-radius: var(--r-2); font-size: 14.5px; font-weight: 500;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); transition: all .15s;
}
.paychip.is-active { background: var(--accent-weak); border-color: var(--accent); color: var(--accent-ink); }
.form__msg { font-size: 14.5px; margin: 2px 0 0; min-height: 16px; }
.form__msg.ok  { color: var(--green); }
.form__msg.err { color: var(--red); }

/* ---------- kurye listesi (aynı manifesto satırı deseni) ---------- */
.pane__toolbar { margin-bottom: 12px; }
.segpill { background: var(--bg); padding: 3px; border-radius: var(--r-2); }
.segpill button { flex: 1; padding: 6px; border-radius: var(--r-3); font-size: 14px; color: var(--ink-2); transition: all .15s; }
.segpill button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.courierlist, .alertlist { display: flex; flex-direction: column; }
.crow {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px;
  border-bottom: 1px solid var(--line); transition: background .12s;
}
.crow:last-child { border-bottom: 0; }
.crow:hover { background: var(--surface-3); }
.crow__ava { width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-weight: 600; font-size: 14px; color: var(--ink); background: var(--surface-3);
  border: 1px solid var(--line-2); position: relative; }
.crow__pin { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--surface); }
.crow__pin[data-s="working"] { background: var(--green); }
.crow__pin[data-s="idle"]    { background: var(--ink-3); }
.crow__pin[data-s="break"]   { background: var(--amber); }
.crow__main { flex: 1; min-width: 0; }
.crow__name { font-weight: 600; font-size: 15px; }
.crow__meta { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.crow__load { font-family: var(--mono); font-size: 14px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.crow__load b { color: var(--ink); }
/* çoklu atama: kurye seçimi bekleniyor — tıklanabilir satırlar vurgulanır,
   müsait olmayan kurye (molada/boşta) atama alamayacağı için soluklaşır. */
.crow--pick { cursor: pointer; }
.crow--pick:hover { background: var(--accent-weak); }
.crow--disabled { opacity: .45; }

.bulkhint {
  display: flex; align-items: center; gap: 8px; margin: 2px 2px 10px; padding: 8px 10px;
  background: var(--accent-weak); border: 1px solid transparent; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--r-2); font-size: 14px; color: var(--accent-ink);
}
.bulkhint span { flex: 1; }

.arow { display: flex; gap: 11px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.arow:last-child { border-bottom: 0; }
.arow__ic { width: 28px; height: 28px; border-radius: var(--r-3); flex: 0 0 auto; display: grid; place-items: center; }
.arow__ic .ic { width: 15px; height: 15px; }
.arow__t { font-weight: 600; font-size: 14.5px; }
.arow__s { color: var(--ink-2); font-size: 13.5px; margin-top: 1px; }

/* ---------- butonlar: düz dolgu, gradyan yok ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; height: 38px;
  border-radius: var(--r-2); font-weight: 600; font-size: 15px; white-space: nowrap;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--ink);
  transition: filter .15s, transform .1s, background .15s;
}
.btn:hover { filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn .ic { width: 16px; height: 16px; }
.btn--accent { background: var(--accent); border-color: transparent; color: #fff; }
.btn--accent:hover { filter: brightness(1.08); }
.btn--full { width: 100%; }
/* btn--quiet: yikici ama sik kullanilan islem (Iptal Et) — gorunur ama one
   cikmayan; btn--danger: onay adiminda basilan kirmizi dugme. */
.btn--quiet { background: transparent; color: var(--ink-3); }
.btn--quiet:hover { background: var(--surface-3); color: var(--red-ink); }
.btn--danger { background: var(--red); border-color: transparent; color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }

/* ---------- detay kartı ---------- */
.dcard { display: flex; flex-direction: column; gap: 14px; }
.dcard__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dcard__id { font-family: var(--mono); font-size: 16px; font-weight: 600; }
.badge { padding: 4px 9px; border-radius: var(--r-3); font-size: 13.5px; font-weight: 700; letter-spacing: .1px; }
.badge--amber { background: var(--amber-bg); color: var(--amber-ink); }
.badge--blue  { background: var(--blue-bg);  color: var(--blue-ink); }
.badge--green { background: var(--green-bg); color: var(--green-ink); }
.badge--red   { background: var(--red-bg);   color: var(--red-ink); }
.badge--violet{ background: var(--violet-bg);color: var(--violet-ink); }
.drow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.drow:last-child { border-bottom: 0; }
.drow__k { color: var(--ink-3); flex: 0 0 auto; }
.drow__v { color: var(--ink); font-weight: 500; text-align: right; }
.drow__v a { color: var(--accent); text-decoration: none; }
.drow__v .muted { color: var(--ink-3); font-weight: 400; }
.rate { font-family: var(--mono); color: var(--amber-ink); letter-spacing: 1px; }
.badgeset { display: flex; gap: 6px; align-items: center; }

/* detay bölümü (sipariş içeriği / değerlendirme) */
.dsection { border-top: 1px solid var(--line); padding-top: 10px; }
.dsection__t { font-size: 13px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 8px; }
.lrow { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
  padding: 6px 0; font-size: 14.5px; }
.lrow__q { font-family: var(--mono); font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lrow__n { color: var(--ink); }
.lrow__m { display: block; font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.lrow__p { font-family: var(--mono); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ZAMAN ÇİZELGESİ (Javi 'Paket Durum Değişiklikleri' karşılığı): durum başına
   dikey akış — renkli nokta, kim yaptı, saat + bir önceki adımdan geçen süre.
   Operatörün "nerede takıldı" sorusu buradan okunur. */
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 12px;
  width: 1.5px; background: var(--line); }
.tl__row { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px;
  align-items: center; padding: 5px 0; }
.tl__dot { width: 9px; height: 9px; border-radius: 50%; position: relative; z-index: 1;
  border: 1.5px solid var(--surface); box-sizing: content-box; }
.tl__t { font-weight: 600; font-size: 13.5px; }
.tl__by { display: block; font-size: 11.5px; color: var(--ink-3); }
.tl__time { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
.tl__dur { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3);
  min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }

/* telefon → müşteri arama sonucu (manuel form) */
.lookup { border: 1px solid var(--line); border-radius: var(--r-2); padding: 8px; background: var(--surface-3);
  display: flex; flex-direction: column; gap: 4px; }
.lookup__t { font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 2px 4px; }
.lookup__a { text-align: left; padding: 7px 8px; border-radius: var(--r-3); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.lookup__a:hover { border-color: var(--accent); }

/* 3-kolon satır (bina/kapı/kat) + onay satırı */
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }
.field--check { justify-content: flex-end; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink-2);
  padding: 9px 0; cursor: pointer; }
.checkline input { accent-color: var(--accent); width: 15px; height: 15px; }
/* Durum basina 4 dugmeye kadar cikabiliyor (yolda: teslim / teslim edilemedi /
   kurye degistir / iptal) — dar detay sutununda tasmasin diye sarar. */
.dactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dactions .btn { flex: 1 1 42%; height: 40px; }
/* dform: dugmenin altinda acilan islem kutusu (teslim tahsilati, teslim
   edilemedi sebebi, iptal onayi). Oneri listesiyle AYNI slotu kullanir. */
.dform { display: flex; flex-direction: column; gap: 10px; padding: 12px;
  border-radius: var(--r-2); background: var(--bg); border: 1px solid var(--line); }
.dform__t { font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); }
.dform .field > span { font-size: 11px; }
.dform .dactions { margin-top: 2px; }
/* Sipariş sohbetinin kapat satırı — tek düğme, sağa yaslı. */
.dform__row { display: flex; justify-content: flex-end; }
.suggest { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.suggest__row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-2);
  background: var(--bg); border: 1px solid var(--line); }
.suggest__row b { font-family: var(--mono); }
/* öneri dışı kuryeler bölüm başlığı ("Diğer kuryeler") */
.suggest__sep {
  margin: 8px 2px 2px; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
}

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal__card { width: 372px; max-width: 92vw; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px; }
.modal__head h3 { font-size: 17px; }
.modal__card .form { padding: 12px 16px 18px; }

/* ---------- leaflet marker (İSİMLİ PILL — Javi deseni) ---------- */
/* Marker'lar artık ADLI etiket (kurye adı / restoran adı) — çıplak baş-harf/#no
   karışıktı. Katı yüzey-pill + durum-renkli nokta → hem renkli (Voyager) hem koyu
   haritada okunur. Renk dili sipariş durumuyla ORTAK. */
.mkp-wrap { width: 0; height: 0; overflow: visible; }
.mkp { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 3px 8px 3px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0,0,0,.28); font-size: 12px; font-weight: 600; color: var(--ink);
  cursor: pointer; }
.mkp__txt { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* Üstüne gelince öne çık (yoğun bölgede pill'ler çakışıyor — hover ile okunur). */
.mkp:hover { z-index: 600; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.leaflet-marker-icon:hover { z-index: 600 !important; }
.mkp__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface); box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 60%, transparent); }
.mkp__badge { min-width: 16px; height: 16px; padding: 0 3px; border-radius: 9px; flex: none;
  background: var(--ink); color: var(--surface); font-family: var(--mono); font-size: 10.5px;
  font-weight: 700; line-height: 16px; text-align: center; }
.mkp__ic { font-size: 12px; line-height: 1; }

/* --- SİPARİŞ: temiz durum-renkli NOKTA (etiketsiz) — restoran adı hover/seç --- */
.mkd { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; }
/* MAT PİN RENKLERİ (4 Eki 2026, kullanıcı: "renkleri biraz matlaştıralım").
   Durum rengi korunur, doygunluğu nötr griyle ~%25 kırılır: harita üstünde
   göz yormaz, kurye etiketleri ve seçili pin öne çıkar. İlk satır color-mix
   bilmeyen tarayıcının yedeği. Kuyruktaki renkler DEĞİŞMEDİ. */
.mkd--order { --pin-gri: #9AA0AA; border-color: rgba(255,255,255,.9); box-shadow: 0 1px 3px rgba(0,0,0,.28); }
.mkd--order[data-edge="amber"] { background: var(--amber); background: color-mix(in srgb, var(--amber) 84%, var(--pin-gri)); }
.mkd--order[data-edge="blue"]  { background: var(--accent); background: color-mix(in srgb, var(--accent) 74%, var(--pin-gri)); }
.mkd--order[data-edge="green"] { background: var(--green); background: color-mix(in srgb, var(--green) 74%, var(--pin-gri)); }
.mkd--order[data-edge="red"]   { background: var(--red); background: color-mix(in srgb, var(--red) 80%, var(--pin-gri)); }
/* NUMARALI PİN (13 Eyl 2026): nokta, içine paket no sığacak kadar büyür.
   Numarası olmayan sipariş (sözleşmesiz restoran, daily_no=0) eski küçük
   noktada kalır — boş bir baloncuk çizmenin anlamı yok.
   min-width + padding: iki haneli numara da tek haneli kadar rahat dursun,
   yuvarlak "hap" biçimi korunur. */
.mkd--no { width: auto; min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  color: #fff; font: 700 11px/1 var(--font, inherit); letter-spacing: .01em;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
.mkd:hover { transform: translate(-50%, -50%) scale(1.25); z-index: 600; }
/* Seçili sipariş: marka-rengi halka + büyüme. */
.mkd--order.is-sel { box-shadow: 0 1px 4px rgba(0,0,0,.35), 0 0 0 3px var(--accent), 0 0 0 6px var(--accent-weak);
  transform: translate(-50%, -50%) scale(1.3); z-index: 500; }
/* --- YAN YANA AÇILAN PİNLER (yayOrders): gerçek konuma ince çizgi + nokta --- */
.yay-cizgi { stroke: var(--ink-2); stroke-dasharray: 2 3; }
.yay-nokta { fill: var(--ink-2); }

/* KRİTİK GECİKME (>20 dk): nokta haritada da bağırsın — yavaş, dışa büyüyüp
   solan kırmızı halka. Kuyruktaki data-late diliyle aynı eşik. reduced-motion
   global kuralı animasyonu zaten kapatır. */
.mkd--order[data-late="2"]::after { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--red); animation: late-ring 1.6s ease-out infinite; pointer-events: none; }
@keyframes late-ring { 0% { transform: scale(.65); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
/* İLİŞKİ VURGUSU: kurye pill'i hover'da taşıdığı sipariş noktaları, sipariş
   hover'da restoranı + kuryesi öne çıkar ("hangi nokta kimin" tooltip'siz). */
.mkd.is-related { transform: translate(-50%, -50%) scale(1.35); z-index: 590;
  box-shadow: 0 1px 4px rgba(0,0,0,.35), 0 0 0 4px var(--accent-weak); }
.mkp--store.is-related { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }

/* KURYE = Javi-stil DOLU RENKLİ ETİKET (19 Eyl 2026, sahadan: "kuryeler çok
   belli olmuyor"). Eski hâl: --ink zemin + --surface yazı. Koyu temada ikisi
   yer değiştiriyor → açık haritanın üstünde AÇIK GRİ etiket; üstüne bayat
   konum %50 soluklaştırıyordu → etiket haritada kayboluyordu.
   Artık zemin = DURUM RENGİ (sabit, temaya bağlı DEĞİL — harita her iki
   temada da açık), yazı beyaz + kalın, beyaz kontur haritadan ayırır.
   Renkler beyaz yazıyla ≥4.5:1 kontrast verecek koyulukta seçildi. */
/* 19 Eyl 2026 (akşam): etiketler KÜÇÜLTÜLDÜ — üst üste binince haritayı
   kaplıyordu. Renk kuralı: boşta GRİ, atanmış paket MAVİ, yolda YEŞİL. */
.mkp--courier {
  --kc: #64748b;                                    /* boşta: gri */
  background: var(--kc); color: #fff; border: 1px solid #fff;
  transform: translate(-50%, calc(-100% - 6px));   /* etiket noktanın ÜSTÜNDE; uç tam noktada */
  padding: 1px 6px; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .01em;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
}
.mkp--courier .mkp__txt { max-width: 80px; }
.mkp--courier[data-status="busy"]  { --kc: #1d4ed8; }   /* atanmış, yola çıkmamış: mavi */
.mkp--courier[data-status="road"]  { --kc: #15803d; }   /* yolda: yeşil */
.mkp--courier[data-status="break"] { --kc: #b45309; }   /* molada: turuncu */
/* BAYAT KONUM: boşta artık gri olduğu için bayat konum KOYU LACİVERT +
   kesikli kontur. Opaklık düşürmek etiketi haritada kaybettiriyordu. */
.mkp--courier[data-stale="1"] { --kc: #1e293b; border-style: dashed; opacity: 1; filter: none; }
.mkp--courier::after {   /* callout ucu → tam konumu işaret eder */
  content: ""; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--kc); border-bottom: 0;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.25));
}
.mkp--courier .mkp__dot { display: none; }   /* renk artık zeminin kendisi */
.mkp--courier .mkp__badge { background: #fff; color: var(--kc);
  min-width: 13px; height: 13px; line-height: 13px; font-size: 9.5px; padding: 0 2px; }
.mkp--courier .mkp__eta { font-size: 9.5px; }
.mkp--courier .mkp__eta { background: #fff; color: #1d4ed8; }
/* ATAMA ÖNERİSİ: uygun kuryenin etiketine accent halka + ETA rozeti. */
.mkp--courier.is-suggest { box-shadow: 0 0 0 3px var(--accent), 0 3px 10px rgba(0,0,0,.35); }
.mkp--courier.is-related { box-shadow: 0 0 0 3px var(--accent-weak), 0 4px 12px rgba(0,0,0,.4); z-index: 600; }
.mk-drop .mkp--courier { animation: none; }  /* -100% transform, generic drop ile çakışmasın */
/* Restoran pini: KÜÇÜK + SOLUK ikon — sabit bağlam (alım noktası), kurye/siparişle
   yarışmaz, geri planda durur. Üstüne gelince belirginleşir. */
.mkp--store { width: 15px; height: 15px; padding: 0; border-radius: 50%; justify-content: center;
  background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(0,0,0,.15); opacity: .5; }
.mkp--store .mkp__ic { font-size: 8.5px; filter: grayscale(.5); }
.mkp--store:hover { opacity: 1; transform: translate(-50%,-50%) scale(1.4); z-index: 600; }
/* Manuel paket formunun müşteri noktası (divIcon('mk-order')). */
.mk { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.mk-order { background: var(--accent); color: #fff; border: 3px solid #fff; font: 700 18px/1 system-ui, sans-serif;
  box-shadow: 0 0 0 4px rgba(36,81,214,.25), 0 3px 10px rgba(0,0,0,.4); }
/* ZOOM'A DUYARLI RESTORAN ETİKETİ: mahalle bakışında (zoom ≥ 15) adlar açılır —
   geniş bakışta metin gürültüsü, yakın bakışta bilgi. app.js zoomend'de
   .zoom-labels sınıfını basar. */
.mkp__stxt { display: none; }
.zoom-labels .mkp--store { width: auto; height: auto; padding: 2px 8px 2px 6px; gap: 4px;
  border-radius: 999px; opacity: .92; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.zoom-labels .mkp--store .mkp__stxt { display: inline; font-size: 11px; font-weight: 600;
  color: var(--ink-2); max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* --- marker hareketi: kayma / düşüş / seçili vurgu --- */
.leaflet-marker-icon.mk-glide { transition: transform 1.1s cubic-bezier(.33,.1,.25,1); }
/* Glide'ı zoom/pan boyunca kapat: hem bizim .panning hem Leaflet'in kendi
   zoom-anim sınıfı (zoom sırasında marker transform'u Leaflet'e ait, transition
   yakalarsa "takılma" olur). */
.leaflet-container.panning .leaflet-marker-icon.mk-glide,
.leaflet-zoom-anim .leaflet-marker-icon.mk-glide { transition: none !important; }
@keyframes mkp-drop { 0% { transform: translate(-50%, calc(-50% - 9px)) scale(.6); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.mk-drop .mkp, .mk-drop .mkd { animation: mkp-drop .42s var(--ease); }

/* seçim + klavye odağı — sessiz kalite: fareyle görünmez, klavyeyle net. */
::selection { background: var(--accent-weak); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.iconbtn:focus-visible, .mapctl__btn:focus-visible { outline-offset: 1px; }
.node:focus-visible, .navitem:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible,
.searchbar input:focus-visible { outline: none; } /* bunlar zaten border-color ile odak gösteriyor */

/* scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); background-clip: padding-box; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ==================== RESPONSIVE ====================
   Masaüstü düzen = rail | sahne | sağ çekmece (3 sabit sütun). Dar ekranda sağ
   çekmece SÜTUN olmaktan çıkıp haritanın ÜSTÜNE overlay olur (transform ile
   kayar, genişlik tüketmez) → harita hiçbir zaman ekran dışına itilmez. Arkada
   tıkla-kapat scrim. Telefonda tam-ekran overlay + sıkışan toolbar/sheet. */

/* scrim: yalnız overlay modunda (dar ekran) devreye girer */
.rscrim {
  position: absolute; inset: 0; z-index: 35;
  background: var(--scrim); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease); display: none;
}

@media (max-width: 1079px) {
  /* çekmece = harita üstünde overlay; sütun genişliği çalmaz */
  .drawer--right {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(380px, 88vw); flex: none; z-index: 40;
    box-shadow: -10px 0 34px rgba(8,11,18,.22);
    transform: translateX(0);
    transition: transform .34s var(--ease), width .34s var(--ease);
  }
  #app[data-right="closed"] .drawer--right {
    width: min(380px, 88vw); flex: none;
    transform: translateX(100%);   /* ekranın dışına kayar */
  }
  .rscrim { display: block; }
  #app[data-right="open"] .rscrim { opacity: 1; pointer-events: auto; }
  /* araç kolonu çekmecenin altında kalmasın: hep kapalı-konum ofseti */
  .maptools, #app[data-right="closed"] .maptools { right: 46px; }
}

@media (max-width: 640px) {
  /* KATMAN + AÇIKLAMA kutuları dar haritayı yemesin: kapalıyken salt-ikon.
     Açınca normal genişliğine döner. */
  .maplayers[data-open="false"] { width: auto; }
  .maplayers[data-open="false"] .maplayers__head { padding: 10px 11px; }
  .maplayers[data-open="false"] .maplayers__t,
  .maplayers[data-open="false"] .maplayers__head .ic:last-child { display: none; }
  .legend[data-open="false"] { width: auto; }
  .legend[data-open="false"] .legend__head { padding: 10px 11px; }
  .legend[data-open="false"] .legend__t,
  .legend[data-open="false"] .legend__head .ic { display: none; }

  /* dar ekranda gösterge sıkışsın */
  .kpi { padding: 0 10px; gap: 6px; }

  /* Dar peek çubuğu: 4 durum sekmesi (asıl bakış noktası) öncelikli — arama
     gizlenir (gerekirse yatay kaydırma), böylece sekmeler kırpılmaz. */
  .sheet__bar { gap: 8px; padding: 0 12px 5px; }
  .searchbar { display: none; }
  .searchbar--kurye { display: flex; }
  .segtabs { flex: 1 1 auto; min-width: 0; justify-content: space-between;
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .segtabs::-webkit-scrollbar { display: none; }
  .segtab { padding: 5px 9px; }
}

@media (max-width: 560px) {
  /* dar ekranda kontrol düğümü biraz küçülür, panel daralır */
  .node { width: 48px; height: 48px; }
  .navpanel { width: 216px; }
  .segtab { padding: 5px 7px; }
  .seg-count { font-size: 13.5px; }
}

@media (max-width: 480px) {
  /* telefon: çekmece tam-ekran overlay (rail'in de üstünü kapar, kapatınca döner) */
  .drawer--right, #app[data-right="closed"] .drawer--right { width: 100vw; }
}

@media (max-width: 400px) {
  /* çok dar: live metnini bırak, durum yalnız renkli noktayla anlaşılsın */
  #liveText { display: none; }
  .live { padding-left: 0; border-left: 0; }
  .segtab { padding: 5px 7px; }
}

/* ---------- mutfak ilerlemesi (hazırlık penceresi) ----------
   "Hazırlanıyor" rozeti sürecin NERESİNDE olduğunu söylemiyordu; bu çubuk
   kartta ve detayda kalan süreyi canlı akıtır. Tahmin yoksa (manuel paket)
   belirsiz-ilerleme animasyonu döner. */
.qprep { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.qprep__bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--amber-bg); overflow: hidden; position: relative;
}
.qprep__bar i {
  display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), var(--amber-ink));
  transition: width .6s ease;
}
.qprep__t { font-size: 11px; font-weight: 600; color: var(--amber-ink); white-space: nowrap; }
/* tahminsiz: kayan parça (belirsiz ilerleme) */
.qprep[data-indet="1"] .qprep__bar i,
.dprep[data-indet="1"] .qprep__bar i {
  width: 30% !important;
  animation: prepslide 1.8s ease-in-out infinite;
}
@keyframes prepslide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(430%); }
}
/* detaydaki büyük hali */
.dprep { display: flex; align-items: center; gap: 10px; margin: 12px 0 4px; }
.dprep__bar { height: 6px; border-radius: 3px; }
.dprep__t { font-size: 12.5px; font-weight: 600; color: var(--amber-ink); white-space: nowrap; }

/* ===========================================================================
   032 — OPERASYONUN KURYE MÜDAHALESİ
   Kurye satırında iki yeni şey var: NEDEN önerilmediğini/molada ne kadar
   kaldığını söyleyen not, ve operatörün müdahale düğmeleri. İkisi de
   öncesinde hiç yoktu — operatör "molada" yazısına bakıp elinde hiçbir
   düğme olmadan bekliyordu.
   =========================================================================== */

/* Satır altı not: uygunluk sebebi ya da mola geri sayımı. Sessiz kalmalı —
   bilgi verir, dikkat çalmaz. */
.crow__note { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.35; }
/* Süresi dolmuş / uyarılmış mola: dikkat isteyen ama HATA OLMAYAN durum. */
.crow__note--warn { color: var(--amber-ink, #b45309); font-weight: 600; }

/* Müdahale düğmeleri: satırın sağında, yükün altında. Küçük ve sessiz —
   sık kullanılan değil, gerektiğinde bulunan düğmeler. */
.crow__acts { display: flex; flex-direction: column; gap: 4px; margin-left: 8px; }
.crow__act {
  font: inherit; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  padding: 3px 8px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2);
}
.crow__act:hover { background: var(--surface-3); color: var(--ink); }

/* --- sipariş detayı: atama geçmişi --- */
/* "Bu sipariş neden geri döndü" sorusunun cevabı. Yalnız anlatacak bir şey
   varsa (red, cevapsızlık, birden fazla deneme) görünür. */
.ahist { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px;
         background: var(--surface-2); border: 1px solid var(--line); }
.ahist__h { font-size: 12px; font-weight: 700; color: var(--ink-3);
            text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.ahist__row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
              font-size: 12.5px; padding: 3px 0; }
.ahist__t { font-family: var(--mono); color: var(--ink-3); font-size: 11.5px; }
.ahist__n { font-weight: 600; color: var(--ink); }
.ahist__r { color: var(--ink-2); font-style: italic; }

.apill { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px;
         font-weight: 700; background: var(--surface-3); color: var(--ink-2);
         border: 1px solid var(--line); }
.apill--ok   { color: var(--green, #15803d); border-color: currentColor; }
.apill--bad  { color: var(--red, #b91c1c); border-color: currentColor; }
.apill--wait { color: var(--amber-ink, #b45309); border-color: currentColor; }

/* Kurye telefonu tıklanabilir (032): operasyonun kuryeye ulaşması için
   paneli bırakıp rehbere bakması gerekiyordu. Numara zaten ekrandaydı —
   tek eksik onu bir bağlantı yapmaktı. Mobil/masaüstü telefon uygulaması
   yoksa link sessizce hiçbir şey yapmaz; zarar vermez. */
.crow__tel { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-2); }
.crow__tel:hover { color: var(--accent-ink, var(--ink)); border-bottom-color: currentColor; }

/* ================= JAVİKURYE SATIR DÜZENİ (4 Eyl 2026) =====================
   Satır artık üç eylem bölgesi taşır:
     SOL  → rota / randevu (mini düğmeler; eskiden burası checkbox'tı)
     ORTA → içerik
     SAĞ  → çoklu atama kutusu (büyütüldü, sağa dayalı) + eylem düğmeleri
   Satıra tıklamak ARTIK haritada rota çizmiyor (kullanıcı kararı) — rota
   yalnız soldaki rota düğmesiyle açılır/kapanır (app.js toggleRoute). */
.qcard, .qcard[data-selectable="1"] {
  grid-template-columns: auto 3px 1fr auto auto auto;
  padding: 6px 8px;
  gap: 10px;
}
.qcard__lead { display: flex; gap: 4px; }
/* Kuyruk DAR kalınca (sağ panel açık küçük ekran): üst satır zaten sarıyor,
   düğmeler de ikişer ikişer istiflenip metne yer açar. Ölçü ekranın değil
   kuyruğun kendi genişliği — sağ panel açılıp kapanınca da doğru çalışır. */
.sheet { container-type: inline-size; }
@container (max-width: 900px) {
  .qcard__lead { flex-direction: column; }
  .qcard__acts { display: grid; grid-template-columns: repeat(2, 30px); }
}
.qcard__acts { display: flex; align-items: center; gap: 4px; }
/* Mini eylem düğmesi: nötr durur, üstüne gelince rengini alır. Kırmızı/yeşil
   varyantlar YALNIZ hover'da renklenir — 40 satırlık bir kuyrukta sürekli
   yanan renkler operatörün gerçek uyarıları görmesini engelliyordu. */
.qbtn {
  width: 30px; height: 30px; display: grid; place-items: center; flex: none;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-3); cursor: pointer; transition: color .12s, background .12s, border-color .12s;
}
.qbtn .ic { width: 16px; height: 16px; }
.qbtn:hover { color: var(--ink); background: var(--surface-3); border-color: var(--line-2); }
.qbtn.is-on { color: var(--accent); border-color: transparent; border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.qbtn--ok:hover { color: var(--green-ink); border-color: transparent; border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: transparent; background: color-mix(in srgb, var(--green) 12%, transparent); }
.qbtn--danger:hover { color: var(--red-ink); border-color: transparent; border-color: color-mix(in srgb, var(--red) 45%, transparent);
  background: transparent; background: color-mix(in srgb, var(--red) 12%, transparent); }
/* Çoklu atama kutusu: sağa dayalı ve BÜYÜK (tıklama hedefi 22px). Seçilemeyen
   sekmelerde yeri boş bırakılır ki satırlar sekme değişince kaymasın. */
.qcard__pick { display: flex; align-items: center; justify-content: center; cursor: pointer;
  width: 30px; }
.qcard__pick input {
  appearance: none; width: 21px; height: 21px; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface-2);
  display: grid; place-items: center; transition: background .12s, border-color .12s;
}
.qcard__pick input:hover { border-color: var(--accent); }
.qcard__pick input:checked { background: var(--accent); border-color: var(--accent); }
.qcard__pick input:checked::after {
  content: ""; width: 11px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.qcard__pick--off { pointer-events: none; }

/* Rota bilgisi haritanın üstünde (detay kartında değil): rota seçili siparişe
   bağlı olmadığı için detay başka bir siparişi gösteriyor olabilir. */
.routepill {
  position: absolute; left: 50%; transform: translateX(-50%); top: 14px; z-index: 620;
  display: flex; align-items: center; gap: 9px; padding: 6px 8px 6px 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  box-shadow: 0 6px 22px rgba(0,0,0,.16); font-size: 13.5px; color: var(--ink-2);
}
.routepill b { font-family: var(--mono); color: var(--accent); }
.routepill__x { border: 0; background: none; color: var(--ink-3); cursor: pointer;
  width: 22px; height: 22px; border-radius: 50%; }
.routepill__x:hover { background: var(--surface-3); color: var(--ink); }

/* ================= ADİSYON KARTI (JaviPos bölüm dili) ======================
   Renkli başlık şeridi + altında etiket/değer satırları. Referanstaki bölüm
   sırası birebir korundu: Adisyon Detayları → Ürün Detayları → Adisyon
   Geçmişi → Ödeme Detayları → Paket Durum Değişiklikleri. */
.jsec { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.jsec__h { padding: 7px 12px; font-size: 13px; font-weight: 700; letter-spacing: .2px;
  color: #fff; background: var(--ink-3); }
.jsec--green  .jsec__h { background: var(--green); }
.jsec--blue   .jsec__h { background: var(--blue); }
.jsec--amber  .jsec__h { background: var(--amber); color: #2A1D00; }
.jsec--violet .jsec__h { background: var(--violet); }
.jsec--grey   .jsec__h { background: var(--ink-3); }
.jsec__b { padding: 4px 12px 8px; }
.jrow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: baseline;
  padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.jrow:last-child { border-bottom: 0; }
.jrow__k { color: var(--ink-3); font-size: 13px; }
.jrow__v { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.jrow__v a { color: var(--accent); text-decoration: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* jtab: bölüm içi tablo (ürün detayları / adisyon geçmişi / ödeme). */
.jtab { font-size: 13.5px; }
.jtab__head { display: grid; grid-template-columns: 1fr 1.2fr 2fr; gap: 8px;
  padding: 5px 0; color: var(--ink-3); font-size: 12px; border-bottom: 1px solid var(--line-2); }
.jtab__row { display: grid; grid-template-columns: 1fr 1.2fr 2fr; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.jtab__row:last-child { border-bottom: 0; }
.jtab__row--4, .jtab__head.jtab__row--4 { grid-template-columns: 46px 1fr 60px 72px; }
.jtab__q, .jtab__h { color: var(--ink-2); }
.jtab__p { text-align: right; font-weight: 600; }
.jtab__n { min-width: 0; overflow-wrap: anywhere; }
.jtab__u { color: var(--ink-2); font-weight: 500; overflow-wrap: anywhere; }
.jtab__d { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.jtab__w { color: var(--ink); overflow-wrap: anywhere; }
.jtab--hist .jtab__w { color: var(--ink-2); }

/* Paket Durum Değişiklikleri: durum · saat · o durumda geçen dakika. */
.pdrow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  padding: 7px 10px; margin: 5px 0; border-radius: 7px; font-size: 13.5px;
  background: var(--surface-2); }
.pdrow__s { font-weight: 700; }
.pdrow[data-edge="amber"] { background: var(--amber-bg); } .pdrow[data-edge="amber"] .pdrow__s { color: var(--amber-ink); }
.pdrow[data-edge="blue"]  { background: var(--blue-bg); }  .pdrow[data-edge="blue"]  .pdrow__s { color: var(--blue-ink); }
.pdrow[data-edge="green"] { background: var(--green-bg); } .pdrow[data-edge="green"] .pdrow__s { color: var(--green-ink); }
.pdrow[data-edge="red"]   { background: var(--red-bg); }   .pdrow[data-edge="red"]   .pdrow__s { color: var(--red-ink); }
.pdrow__t { color: var(--ink-2); }
.pdrow__d { color: var(--ink-3); min-width: 52px; text-align: right; }

/* ================= KURYE SEÇİMİ (sağ panel) ================================ */
.pkhead { display: flex; align-items: center; gap: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line); }
.pkhead__t { font-weight: 700; font-size: 15px; }
.pkhead__s { font-size: 12.5px; color: var(--ink-3); }
.pkgrp { margin-top: 12px; }
.pkgrp__h { font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pkgrp__h span { color: var(--accent); }
.pkgrp__empty { color: var(--ink-3); font-size: 13px; padding: 10px 0; }
.pkrow { display: grid; grid-template-columns: 30px 34px 1fr auto auto; gap: 9px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.pkrow:last-child { border-bottom: 0; }
.pkrow.is-off { opacity: .7; }
/* JaviKurye'de Çalışmayanlar sütunu KIRMIZI, paketi olan kurye ise mavi/mor
   dolguluydu ("kim yüklü" bir bakışta). Aynı bilgi, kendi paletimizle. */
.pkrow--off .pkrow__name { color: var(--red-ink); }
.pkrow--off .crow__ava { background: var(--red-bg); color: var(--red-ink); }
.pkrow--load { background: var(--blue-bg); border-radius: 8px; padding-left: 6px; padding-right: 6px; }
.pkrow--load .pkrow__name { color: var(--blue-ink); }
.pkrow__page { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-3); cursor: pointer; }
.pkrow__page:hover { color: var(--accent); border-color: transparent; border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pkrow__page .ic { width: 15px; height: 15px; }
.pkrow__main { min-width: 0; }
.pkrow__name { font-weight: 600; font-size: 14.5px; }
.pkrow__meta { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.pkrow__load { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.pkrow__load b { color: var(--ink); font-size: 15px; }
.pkrow__ata { height: 30px; padding: 0 12px; font-size: 13px; }
.pkrow__ata:disabled { opacity: .4; cursor: not-allowed; }

/* ================= KURYE TAM SAYFA ========================================
   JaviKurye'de kurye satırındaki liste ikonu tam sayfa bir harita + paket
   listesi açıyordu; aynısı. Kendi Leaflet örneği (ana haritanın kamerası
   bozulmasın). */
.cpage { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center;
  background: rgba(4,8,16,.55); backdrop-filter: blur(2px); padding: 22px; }
.cpage[hidden] { display: none; }
.cpage__card { width: min(1180px, 96vw); height: min(88vh, 900px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.cpage__head { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cpage__ava { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-weak); color: var(--accent); font-weight: 700; font-size: 14px; flex: none; }
.cpage__id { flex: 1; min-width: 0; }
.cpage__id h3 { font-size: 16px; font-weight: 700; }
.cpage__id p { font-size: 12.5px; color: var(--ink-3); }
.cpage__id p a { color: var(--accent); text-decoration: none; }
.cpage__kpi { display: flex; gap: 8px; }
.cpkpi { font-size: 12px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 9px; }
.cpkpi b { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.cpage__map { height: 46%; min-height: 220px; }
.cpage__list { flex: 1; overflow: auto; padding: 4px 14px 14px; }
.cprow { display: grid; grid-template-columns: 22px 26px 1fr auto auto auto; gap: 12px; align-items: center;
  padding: 10px 8px 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
  border-radius: 8px; background: var(--surface); }
.cprow:hover { background: var(--surface-3); }
/* Seçili paket: haritadaki iğnesiyle aynı vurgu. */
.cprow.is-sel { background: var(--accent-weak); }
.cprows__ipucu { font-size: 12px; color: var(--ink-3); margin: 6px 4px 2px; }
/* SÜRÜKLEME TUTAMACI (4 Eki 2026): altı nokta; yalnız buradan tutulur. */
.cprow__grip { width: 22px; height: 30px; display: grid; place-items: center; border-radius: 6px;
  color: var(--ink-3); cursor: grab; touch-action: none; user-select: none; opacity: .55;
  transition: opacity .12s, background .12s, color .12s; }
.cprow__grip svg { width: 10px; height: 16px; fill: currentColor; }
.cprow:hover .cprow__grip { opacity: 1; }
.cprow__grip:hover { background: var(--surface-2); color: var(--ink); }
/* Yola çıkmış paket: kilitli — tutamaç yerine kilit, satır hafif soluk. */
.cprow__grip--kilit { cursor: default; opacity: .45; }
.cprow__grip--kilit .ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.cprow__grip--kilit:hover { background: none; color: var(--ink-3); }
.cprow.is-kilitli .cprow__main { opacity: .78; }
/* Sürüklenen satır: yerinden kalkmış gibi. */
.cprow.is-drag { position: relative; z-index: 2; background: var(--surface); cursor: grabbing;
  box-shadow: 0 10px 28px rgba(10,14,20,.22), 0 0 0 1px var(--accent); border-bottom-color: transparent; }
.cprow.is-drag .cprow__grip { cursor: grabbing; opacity: 1; color: var(--accent); }
/* Sürüklerken: diğer satırlar yer açmak için kayar, sürüklenen imleci izler
   (geçişsiz — gecikme "takılma" gibi hissettiriyordu). Bırakınca yuvasına süzülür. */
.cprows.is-suruk .cprow { transition: transform .15s ease; will-change: transform; }
.cprows.is-suruk .cprow.is-drag { transition: none; }
.cprows.is-suruk .cprow.is-drag.is-birakti { transition: transform .15s ease; }
.cprows.is-suruk .cprow:hover { background: var(--surface); }
.cprows { user-select: none; }
.cprow__n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: #fff; background: var(--ink-3); }
.cprow[data-edge="amber"] .cprow__n { background: var(--amber); color: #2A1D00; }
.cprow[data-edge="blue"]  .cprow__n { background: var(--blue); }
.cprow[data-edge="green"] .cprow__n { background: var(--green); }
.cprow__main { min-width: 0; }
.cprow__top { display: flex; align-items: baseline; gap: 8px; }
.cprow__addr { font-size: 13.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cprow__st { font-size: 13px; font-weight: 600; }
.cprow__amt { font-size: 14px; font-weight: 600; min-width: 78px; text-align: right; }
/* tam sayfa harita işaretleri */
.cpm { display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cpm--drop { background: var(--accent); color: #fff; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.cpm--drop { cursor: pointer; transition: transform .15s; }
.cpm--drop.is-sel { box-shadow: 0 0 0 4px var(--accent-weak), 0 0 0 6px var(--accent), 0 2px 8px rgba(0,0,0,.4); }
.cpm--biz { background: var(--surface); border-radius: 7px; border: 1px solid var(--line-2);
  box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.cpm--cour i { display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--green); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }

/* Onay kutusu — satır düğmeleri seçim gerektirmeden çalıştığı için kendi
   modalını kullanır (tarayıcının confirm()'i değil). */
.modal__card--sm { width: 420px; }
.cf__text { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 4px; }
.cf__text b { color: var(--ink); }

/* Dar ekran: satırdaki eylem düğmeleri sığmıyor → sağ blok alta iner. */
@media (max-width: 720px) {
  .qcard, .qcard[data-selectable="1"] { grid-template-columns: auto 3px 1fr auto; }
  .qcard__side { grid-column: 3 / -1; flex-direction: row; justify-content: space-between; align-items: baseline; }
  .qcard__acts { grid-column: 3 / -1; display: flex; justify-content: flex-end; }
  .cpage { padding: 0; }
  .cpage__card { width: 100vw; height: 100vh; border-radius: 0; }
}


/* ============================================================
   ASILI KART PANELİ (.qrpanel) — operatör ekranı
   ============================================================
   Ekrana asılı, sipariş listesinden bağımsız duran küçük kart yığını.
   Bugün TEK kullanıcısı kurye onay panelidir (.onaypanel, 057).

   🔴 QR BEKLEME PANELİ OPERATÖRDE YOK (8 Eyl 2026, kullanıcı kararı):
   kurye/restoran arasındaki bekleme operasyonun ekranına sürekli bir kutu
   asıyordu. Operasyonun ihtiyacı akışı BAŞLATABİLMEK; o da sipariş
   detayındaki "Yemek Kartı QR" düğmesinde. Kurallar restoran ekranındaki
   ikiziyle (isletme.css) aynı kalsın — birini değiştirirken ötekine de bak. */
.qrpanel {
  position: fixed; right: 16px; top: 76px; z-index: 60;
  width: 320px; max-height: 68vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 10px;
}
.qrpanel__bas {
  font-size: 13px; font-weight: 700; color: var(--violet);
  padding: 2px 4px 8px;
}
.qrkart {
  border: 1px solid var(--line); border-left: 3px solid var(--violet);
  border-radius: 10px; padding: 8px 10px; margin-bottom: 8px;
  background: var(--surface-3);
}
.qrkart__ust { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.qrkart__kart { color: var(--violet); font-weight: 600; }
.qrkart__tutar { margin-left: auto; font-weight: 700; }
.qrkart__alt { font-size: 12px; color: var(--ink-2); margin: 6px 0; line-height: 1.35; }
.qrkart__saat { color: var(--ink-3); white-space: nowrap; }
/* QR görseli BEYAZ zeminli: koyu temada karanlık arkaplan üstündeki QR
   telefon kamerasınca okunmuyor. */
.qrkart__gorsel {
  background: #fff; border-radius: 8px; padding: 8px; text-align: center;
  font-size: 12px; color: #737B8B; min-height: 56px;
}
.qrkart__gorsel img { max-width: 100%; display: block; margin: 0 auto; }
.qrkart__is { display: flex; gap: 6px; margin-top: 8px; }
.qrbtn {
  flex: 1; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600;
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink);
}
.qrbtn--ana { background: var(--violet); border-color: var(--violet); color: #fff; }
.qrbtn:disabled { opacity: .55; cursor: default; }
.qrkart__msg { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; min-height: 0; }
.qrkart__msg.err { color: var(--red); }
.qrkart__msg:empty { display: none; }

/* KURYE ONAY PANELİ (057) — yukarıdaki asılı kart panelinin tek kullanıcısı.
   Sağ ALTTA durur (harita denetimlerinin üstünde değil, altında kalan boş
   alanda). Kenar rengi kehribar: "OPERATÖR karar versin" demek. */
.onaypanel { top: auto; bottom: 16px; }
.onaypanel .qrpanel__bas { color: var(--amber); }
.onaypanel .qrkart { border-left-color: var(--amber); }
.onaypanel .qrbtn--ana { background: var(--green); border-color: var(--green); }

/* Menüdeki okunmamış rozeti "yakında" etiketiyle aynı yeri kullanır ama
   bilgi taşır — o yüzden sayı ve dikkat rengi. Katmanın kendi kuralları
   sohbet.css'te (üç ekranın ortak dosyası). */
#navMesajRz { background:var(--red); color:#fff; border-color:transparent; font-weight:700; }

/* --- SATIR SOHBET BULUTU (061) ---
   Adisyon simgesinin solunda. Okunmamış varsa kırmızı nokta: sayı değil
   nokta, çünkü satırda yer yok ve operatörün sorusu "kaç tane" değil
   "bakmam gereken bir şey var mı". */
.qbtn--chat { position: relative; }
.qbtn__dot {
  position: absolute; top: 3px; right: 3px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--red);
  /* Kart zemininde erimesin: ince bir halka onu her temada ayırır. */
  box-shadow: 0 0 0 1.5px var(--surface);
}

/* --- UYARI SATIRI (061) — Uyarılar sekmesindeki mesaj bildirimi ---
   Okunduğu an listeden düşer; kapatma düğmesi YOK. Kapatılabilir bir uyarı,
   kapatılıp unutulan bir mesaj demekti. */
.alertrow {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  padding: 11px 13px; margin-bottom: 8px; cursor: pointer; font: inherit;
  transition: border-color .15s;
}
.alertrow:hover { border-color: var(--accent); }
.alertrow__ic { position: relative; flex: none; color: var(--violet); }
.alertrow__ic .ic { width: 22px; height: 22px; }
.alertrow__n {
  position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 16px;
  text-align: center; box-shadow: 0 0 0 1.5px var(--surface);
}
.alertrow__gv { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.alertrow__gv b { font-size: 13.5px; color: var(--ink); }
.alertrow__alt {
  font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.alertrow__st { flex: none; font-size: 11.5px; color: var(--ink-3); }

/* ---------- DİKKAT BİLDİRİMİ (063) ----------------------------------------
   Konum, kuralın kendisi: katman `.stage`'in içinde durur. Sağ panel
   `.stage`'in DIŞINDA, alt sayfa (`.sheet`) ise `.stage`'in dibinde — yani
   ikisi de sonuna kadar açıkken bile kutu hiçbirine değmez. Üst-orta, sol
   üstteki kurye sayacı (`.mapkpi`) ile sağ üstteki katman araçları
   (`.maptools`) arasında kalan boşluktur: ekranın en çok bakılan, en az dolu
   yeri.

   `pointer-events:none` katmanda, `auto` kutuda: kutunun yanından geçen
   tıklama haritaya ULAŞIR — operasyon durmaz. */
.dikkat {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 34; display: flex; flex-direction: column; gap: 8px;
  width: min(430px, calc(100% - 320px)); pointer-events: none;
}
.dikkat__kutu {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 13px;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent);
  border-radius: 12px; box-shadow: var(--shadow), 0 10px 30px rgba(10,14,20,.14);
  opacity: 0; transform: translateY(-10px);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.dikkat__kutu.is-in { opacity: 1; transform: translateY(0); }
/* Para kararı: kehribar. Mesaj: mavi. Renk tek başına da olayı ayırıyor. */
.dikkat__kutu--odeme { border-left-color: #C08A21; }
.dikkat__kutu--mesaj { border-left-color: var(--accent); }

.dikkat__ic {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: #fff;
  /* Nabız YALNIZ ikonda: kutunun tamamı yanıp sönseydi okumak zorlaşırdı,
     hiç hareket olmasaydı gözden kaçardı. */
  animation: dikkatNabiz 1.8s ease-in-out infinite;
}
.dikkat__kutu--odeme .dikkat__ic { background: #C08A21; }
.dikkat__kutu--mesaj .dikkat__ic { background: var(--accent); }
.dikkat__ic .ic { width: 17px; height: 17px; }
@keyframes dikkatNabiz {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,138,33,.42); }
  50%      { box-shadow: 0 0 0 7px rgba(192,138,33,0); }
}
.dikkat__kutu--mesaj .dikkat__ic { animation-name: dikkatNabizMavi; }
@keyframes dikkatNabizMavi {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36,81,214,.42); }
  50%      { box-shadow: 0 0 0 7px rgba(36,81,214,0); }
}

.dikkat__gv { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dikkat__gv b { font-size: 13px; color: var(--ink); line-height: 1.3; }
.dikkat__alt { font-size: 11.5px; line-height: 1.42; color: var(--ink-3); }

.dikkat__is { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.dikkat__btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  border-radius: 8px; padding: 5px 11px; font-size: 11.5px; cursor: pointer;
  white-space: nowrap; transition: background .15s, border-color .15s;
}
.dikkat__btn:hover { background: var(--surface-3); }
.dikkat__btn--ana { background: var(--accent); border-color: var(--accent); color: #fff; }
.dikkat__btn--ana:hover { filter: brightness(1.07); background: var(--accent); }

/* Uyarılar listesindeki online ödeme satırı — kehribar kenar, kutuyla aynı dil. */
.alertrow--odeme { border-left: 3px solid #C08A21; }
.alertrow--odeme .alertrow__ic { color: #C08A21; }

/* Uyarılar'dan onay paneline gidildiğinde panel bir kez vurgulanır: operatör
   "nereye baktım" diye aramasın. */
.qrpanel.is-vurgu { animation: onayVurgu 1.4s var(--ease); }
@keyframes onayVurgu {
  0%, 100% { box-shadow: var(--shadow); }
  30%      { box-shadow: 0 0 0 3px #C08A21, var(--shadow); box-shadow: 0 0 0 3px color-mix(in srgb, #C08A21 55%, transparent), var(--shadow); }
}

@media (prefers-reduced-motion: reduce) {
  .dikkat__kutu, .dikkat__ic, .qrpanel.is-vurgu { animation: none; transition-duration: .01ms; }
}

/* Dar ekranda kutu sağ/sol araçlarla çakışmasın: tam genişliğe yayılır ve
   düğmeler alta iner. */
@media (max-width: 1100px) {
  .dikkat { width: calc(100% - 32px); }
  .dikkat__kutu { flex-wrap: wrap; }
  .dikkat__is { flex-direction: row; width: 100%; justify-content: flex-end; }
}

/* "+N bildirim daha" şeridi — kutu tavanı (DIKKAT_MAX) aşıldığında çıkar.
   Canlıda dört okunmamış mesaj dört kutu açıp haritanın yarısını kapatmıştı;
   fazlası artık tek satıra iniyor. */
.dikkat__daha {
  pointer-events: auto; align-self: center;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 5px 14px; font-size: 11.5px; color: var(--ink-2); cursor: pointer;
  transition: background .15s;
}
.dikkat__daha:hover { background: var(--surface-3); color: var(--ink); }

/* SHIFT (15 Eyl 2026) — kurye satırında bugünkü planlı shift. İsmin yanında
   küçük bir hap: bilgi verir, uyarı olmadıkça dikkat çalmaz. */
.crow__shiftrow { margin-top: 4px; line-height: 1; }
.crow__shift { display: inline-block; padding: 2px 7px;
  border-radius: 999px; font-size: 11px; font-weight: 600; font-family: var(--mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--ink-2); background: var(--surface-2, rgba(127,127,127,.12)); }
.crow__shift--on    { color: var(--green-ink); background: var(--green-bg); }
.crow__shift--uyari { color: var(--red-ink);   background: var(--red-bg); }
.crow__shift--izin  { color: var(--ink-3); font-family: inherit; }
/* Planla gerçek ayrıştı (geç/erken çıktı/uzadı): kırmızı, çünkü operatörün
   aksiyon alması (aramak, yerine kurye çağırmak) gereken durum. */
.crow__note--shift { color: var(--red-ink); font-weight: 600; }

/* KURYE SATIRI DAR PANEL DÜZENİ (15 Eyl 2026, kullanıcı: "shift sıkışıyor,
   kaymalar var"). Üç sütun: avatar | bilgi (esner) | yük+düğme (sabit).
   Ad ve durum/telefon satırı TEK SATIR kalır, sığmazsa "…" ile kısalır —
   sarmak her satırı farklı yükseklikte bırakıyordu. Shift hapı kendi
   satırında. Avatar ve sağ sütun satırın ÜSTÜNE hizalanır. */
.crow { align-items: flex-start; }
.crow__ava { margin-top: 2px; }
.crow__name, .crow__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.crow__load { line-height: 1.2; }
/* Yükün solunda "paketleri ve rotası" düğmesi; paketi olan kuryede renkli. */
.crow__top { display: flex; align-items: center; gap: 8px; }
.pkrow__page.is-dolu { color: var(--accent); border-color: transparent; border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.crow__side .crow__acts { margin-left: 0; align-items: flex-end; }
