/* gcslink paneli — ortak stil */

:root,
:root[data-theme='dark'] {
  --bg: #141517;
  --text: #ecedee;
  --sub: #a1a5ab;
  --line: #26282c;
  --btn-border: #33363b;
  --field: #1b1d20;
  --track: #2b2e33;
  --accent: #7fa7d9;
  --flying: #8db4e4;
  --online: #7dbf9e;
  --warn: #d9a066;
  --danger: #e58a8a;
  --overlay: rgba(20, 21, 23, 0.72);
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #ffffff;
  --text: #16181a;
  --sub: #5f646b;
  --line: #e4e5e7;
  --btn-border: #c9ccd0;
  --field: #ffffff;
  --track: #e4e5e7;
  --accent: #2f6fb5;
  --flying: #245c99;
  --online: #2a7a57;
  --warn: #9a5b14;
  --danger: #b3261e;
  --overlay: rgba(20, 21, 23, 0.72);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
h1 { margin: 0; font-size: 24px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---- Üst bar ---- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line);
}
.topbar .left, .topbar .right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-size: 17px; font-weight: 600; }
.crumb { font-size: 14px; color: var(--sub); text-decoration: none; }
.crumb:hover { color: var(--text); }
.sep { color: var(--btn-border); }
.who { font-size: 14px; color: var(--sub); margin-right: 8px; }

/* ---- Üst bar: otomatik gizlenme ----
   HTML'de <header class="topbar" data-autohide> olan sayfalarda, fareli cihazlarda app.js body'ye
   "topbar-autohide" sınıfını ekler. Bar sayfanın akışından çıkar (içerik en üstten başlar), ekranın üstüne
   saklanır; fare en üste gelince "topbar-shown" sınıfıyla aşağı kayar, içeriğin üstünde görünür. */
body.topbar-autohide .topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3000;
  background: var(--bg);
  transform: translateY(-100%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
body.topbar-autohide .topbar.topbar-shown { transform: translateY(0); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
body.topbar-autohide .notify-stack { top: 16px; } /* bar gizliyken bildirimler en üstte */

/* ---- Butonlar ---- */
.btn {
  min-height: 40px; padding: 0 14px; border-radius: 6px;
  border: 1px solid var(--btn-border); background: transparent; color: var(--text);
  font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.btn:hover { border-color: var(--sub); }
.btn-lg { min-height: 44px; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.btn-primary:hover { opacity: 0.9; }
.btn[disabled] { opacity: 0.5; cursor: default; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--btn-border);
  background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }
.overlay-btn { border: 0; background: var(--overlay); color: #fff; }
.theme-light-icon { display: none; }
:root[data-theme='light'] .theme-light-icon { display: block; }
:root[data-theme='light'] .theme-dark-icon { display: none; }

/* ---- Durum ---- */
.state { display: inline-flex; align-items: center; gap: 8px; }
.state .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.state-flying { color: var(--flying); font-weight: 600; }
.state-flying .dot { background: var(--flying); }
.state-online { color: var(--online); font-weight: 600; }
.state-online .dot { background: var(--online); }
.state-offline { color: var(--sub); }
.state-offline .dot { border: 1.5px solid var(--sub); }
.warn { color: var(--warn); }

/* ---- Liste sayfaları ---- */
.page { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head .titles { display: flex; flex-direction: column; gap: 6px; }
.table { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
.table-inner { min-width: 960px; }
.trow { display: grid; gap: 16px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow.thead { padding: 12px 20px; font-size: 13px; color: var(--sub); }
.platform-grid { grid-template-columns: minmax(170px, 1.7fr) 0.7fr 1.1fr 1fr 0.7fr 0.7fr 1fr 210px; }
.flight-grid { grid-template-columns: minmax(170px, 1.6fr) 0.9fr 0.9fr 0.9fr 1.3fr 112px; }
.namecell { display: flex; flex-direction: column; gap: 2px; }
.namecell a, .namecell .name { color: var(--text); font-weight: 600; text-decoration: none; }
.actions { display: flex; justify-content: flex-end; gap: 8px; }
.empty { padding: 32px 20px; color: var(--sub); text-align: center; }
.chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--btn-border); font-size: 12px; color: var(--sub); }

/* ---- Giriş ---- */
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 96px; }
.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 28px; }
.login .head { display: flex; flex-direction: column; gap: 6px; }
.login h1 { font-size: 26px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input {
  height: 44px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--btn-border);
  background: var(--field); color: var(--text); font: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-error { color: var(--danger); font-size: 14px; min-height: 20px; }
.login .foot { font-size: 14px; color: var(--sub); border-top: 1px solid var(--line); padding-top: 18px; }

/* ---- İzleme ekranları ---- */
.split { flex: 1; display: flex; flex-wrap: wrap; align-items: stretch; }
.split > section { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.split > aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; }
.video { position: relative; aspect-ratio: 16 / 9; background: #0d0e0f; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.video .placeholder { color: #a1a5ab; text-align: center; display: flex; flex-direction: column; gap: 6px; padding: 24px; }
.video .placeholder strong { color: #ecedee; font-weight: 600; }
.video .tl { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.video .bl { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: #fff; }
.video .tag { padding: 4px 10px; border-radius: 6px; background: var(--overlay); }

.block { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.block:last-child { border-bottom: 0; }
.section-title { font-size: 15px; font-weight: 600; }
.label { font-size: 14px; color: var(--sub); }
.big { font-size: 26px; font-weight: 600; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bar { display: block; height: 4px; border-radius: 2px; background: var(--track); }
.bar > span { display: block; height: 4px; border-radius: 2px; background: var(--text); width: 0; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stats > div { padding: 16px 24px; }
.stats > div:nth-child(odd) { border-right: 1px solid var(--line); }
.stats > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.stat-value { font-size: 22px; font-weight: 600; margin-top: 2px; }
.stat-value .unit { font-size: 14px; font-weight: 400; color: var(--sub); }
.kv { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.kv > span:first-child { color: var(--sub); }

.mapbox { position: relative; border-bottom: 1px solid var(--line); height: 300px; }
.mapbox .map { position: absolute; inset: 0; }
.mapbox .map-label { position: absolute; top: 12px; left: 16px; z-index: 500; font-size: 13px; padding: 2px 8px; border-radius: 4px; background: var(--bg); color: var(--sub); }
.mapbox .map-btn { position: absolute; top: 8px; right: 8px; z-index: 500; background: var(--bg); }
.mapbox:fullscreen { height: 100%; border: 0; }
.map-tools { position: absolute; top: 8px; right: 8px; z-index: 500; display: flex; gap: 6px; }
.map-tools .icon-btn { width: 36px; height: 36px; background: var(--bg); }
.map-tools .icon-btn[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Canlı izleme: video ile harita iki yuva arasında yer değiştirir */
.slot { position: relative; }
.slot-main { aspect-ratio: 16 / 9; }
.slot-side { height: 300px; border-bottom: 1px solid var(--line); }
.slot > .video, .slot > .mapbox { position: absolute; inset: 0; height: auto; aspect-ratio: auto; border: 0; }
.video .swap-btn { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; }
.slot-side .video .placeholder span { display: none; }
.leaflet-container { background: var(--field); font: inherit; }
:root[data-theme='dark'] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9); }
.map-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--sub); font-size: 14px; z-index: 400; pointer-events: none; }

.notice { padding: 10px 14px; border-radius: 6px; border: 1px solid var(--btn-border); font-size: 14px; color: var(--sub); }
.notice.warn { border-color: var(--warn); color: var(--warn); }

/* ---- Tekrar oynatma ---- */
.player { padding: 16px 24px 18px; display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); }
.play-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.play-btn svg { width: 16px; height: 16px; }
.timeline { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.track { position: relative; height: 28px; }
.track .gap { position: absolute; top: 8px; height: 12px; border-radius: 2px; border: 1px solid var(--warn); background: repeating-linear-gradient(135deg, var(--warn) 0 3px, transparent 3px 6px); pointer-events: none; }
.track input[type='range'] { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.track input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p, 0%), var(--track) var(--p, 0%)); }
.track input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); }
.track input[type='range']::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.track input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.track input[type='range']::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); }
.track input[type='range']:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend .swatch { width: 14px; height: 10px; border-radius: 2px; border: 1px solid var(--warn); background: repeating-linear-gradient(135deg, var(--warn) 0 3px, transparent 3px 6px); display: inline-block; }
.speed-btn { min-width: 56px; height: 44px; flex: none; font-weight: 600; }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; }
  .page { padding: 20px 16px 40px; }
  .split > section { border-right: 0; border-bottom: 1px solid var(--line); }
  .block, .player { padding-left: 16px; padding-right: 16px; }
}

/* ---- Harita (ana sayfa) ---- */
body.fill { height: 100vh; }
.map-page { min-height: 0; flex-wrap: nowrap; }
.map-page > section { flex: 1 1 auto; }
.map-page > section { position: relative; min-height: 420px; }
.map-page > section .mapbox { position: absolute; inset: 0; height: auto; border: 0; }
.map-page > aside { overflow-y: auto; flex: 0 0 380px; }
.map-notice { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 500; background: var(--bg); }
.pick-row {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  padding: 14px 24px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.pick-row:hover { background: var(--field); }
.pick-row .name { font-weight: 600; }
.d-actions { display: flex; gap: 8px; margin-top: 6px; }
.d-actions .btn { flex: 1; }

/* Platform işareti: üstte isim, altta dron simgesi */
.pmark-wrap { background: none; border: 0; }
.pmark { position: relative; width: 36px; height: 36px; color: var(--online); cursor: pointer; }
.pmark-flying { color: var(--flying); }
.pmark-icon { display: block; width: 36px; height: 36px; filter: drop-shadow(0 0 1.5px var(--bg)) drop-shadow(0 0 1.5px var(--bg)); }
.pmark-icon svg { display: block; width: 100%; height: 100%; }
.pmark-name {
  position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%);
  padding: 1px 7px; border-radius: 4px; background: var(--bg); color: var(--text); border: 1px solid var(--btn-border);
  font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
}
.pmark.selected .pmark-name { background: var(--accent); border-color: var(--accent); color: #fff; }
.pmark.selected::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent); pointer-events: none; }

@media (max-width: 720px) {
  body.fill { height: auto; }
  .map-page { flex-wrap: wrap; }
  .map-page > section { flex: 1 1 100%; min-height: 60vh; }
  .map-page > aside { flex: 1 1 100%; }
}

/* Harita sayfası: sağ panel aç/kapa, seçili platformun videosu */
.panel-toggle {
  position: absolute; top: 50%; right: 0; z-index: 500; transform: translateY(-50%);
  width: 28px; height: 56px; border: 1px solid var(--btn-border); border-right: 0; border-radius: 6px 0 0 6px;
  background: var(--bg); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.panel-toggle svg { width: 18px; height: 18px; }
.map-page.panel-closed > aside { display: none; }
.map-page.panel-closed > section { border-right: 0; }
.map-page.panel-closed .panel-toggle svg { transform: rotate(180deg); }
#detail:not(.hidden) { display: flex; flex-direction: column; min-height: 100%; }
.d-video { margin-top: auto; border-top: 1px solid var(--line); }
.d-video .video .placeholder span { display: none; }
.video:fullscreen { aspect-ratio: auto; }
.video:fullscreen .placeholder span { display: block; }

/* ---- Yönetim ---- */
.admin-section { display: flex; flex-direction: column; gap: 14px; }
.admin-section + .admin-section { margin-top: 18px; }
.device-grid { grid-template-columns: minmax(170px, 1.5fr) 0.7fr 0.9fr 1.3fr 0.9fr 330px; }
.user-grid { grid-template-columns: minmax(130px, 1fr) 0.6fr 0.6fr 0.7fr 1.3fr 470px; }
.trow.dim { opacity: 0.6; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }

.modal {
  width: min(460px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--btn-border); border-radius: 10px;
  background: var(--bg); color: var(--text);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.55); }
.modal h2 { margin: 0; font-size: 20px; font-weight: 600; }
.label-strong { font-size: 14px; font-weight: 500; }
.segmented { display: flex; border: 1px solid var(--btn-border); border-radius: 6px; overflow: hidden; }
.segmented label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; cursor: pointer; font-size: 14px; }
.segmented label + label { border-left: 1px solid var(--btn-border); }
.segmented label:has(input:checked) { background: var(--field); font-weight: 600; }
.segmented input { accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check .muted { margin-left: auto; }
.checklist { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.secret { display: flex; gap: 8px; align-items: stretch; }
.secret code {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--btn-border); background: var(--field);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; user-select: all;
}
.stats-2 > div { border-bottom: 0 !important; }
.pmark-offline { color: var(--sub); }
.pmark-offline .pmark-name { color: var(--sub); }
.device-grid > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Komut menüsü (harita) ---- */
.cmd-toast {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 700; max-width: min(520px, calc(100% - 32px));
  padding: 10px 14px; border-radius: 6px; background: var(--bg); border: 1px solid var(--btn-border); font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}
.cmd-toast.ok { border-color: var(--online); color: var(--online); }
.cmd-toast.err { border-color: var(--danger); color: var(--danger); }
.pick-banner {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 700; padding: 10px 14px; border-radius: 6px;
  background: var(--warn); color: #141517; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.picking .leaflet-container { cursor: crosshair; }
/* Nest adı simgenin altında: drone nest'in içindeyken iki isim de görünsün, nest adına tıklanarak seçilebilsin */
.pmark-nest .pmark-name { bottom: auto; top: calc(100% + 4px); }
.segmented label.hidden { display: none; }
#d-source:empty { display: none; }

/* ---- İşlemler (nest'e iniş / kalkış) ---- */
.pmark.reserved .pmark-icon { outline: 2px dashed var(--warn); outline-offset: 3px; border-radius: 6px; }

/* ---- Komut menüsü (harita): koyu, sade ---- */
.cmd-popup .leaflet-popup-content-wrapper { background: #111214; color: #ecedee; border: 1px solid #26282c; border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); padding: 0; }
.cmd-popup .leaflet-popup-tip { background: #111214; border: 1px solid #26282c; box-shadow: none; }
.cmd-popup .leaflet-popup-content { margin: 10px; font: inherit; font-size: 13px; line-height: 1.3; }
.cmd-menu { display: flex; flex-direction: column; gap: 8px; width: 196px; }
.cmd-head { display: flex; align-items: center; gap: 7px; padding: 0 2px; }
.cmd-head .name { font-weight: 600; font-size: 14px; }
.cmd-dot { width: 7px; height: 7px; border-radius: 50%; background: #5f646b; flex: none; }
.cmd-dot.dot-flying { background: var(--flying); }
.cmd-dot.dot-online { background: var(--online); }
.cmd-sub { margin-left: auto; color: #8b9097; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: #1f2124; color: #ecedee;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.cmd:hover:not(:disabled) { background: #2a2d31; }
.cmd:disabled { opacity: 0.35; cursor: default; }
.cmd-primary { background: #ecedee; color: #111214; font-weight: 600; }
.cmd-primary:hover:not(:disabled) { background: #ffffff; }
.cmd-ghost { background: transparent; color: #8b9097; }
.cmd-block { width: 100%; }
.cmd.confirm, .cmd.confirm:hover { background: var(--warn); color: #141517; font-weight: 600; }
.cmd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cmd-row-3 { grid-template-columns: repeat(3, 1fr); }
.cmd-row-3 .cmd-span2 { grid-column: span 2; }
.cmd-row-alt { grid-template-columns: 1fr auto; }
.cmd-alt { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px; border-radius: 8px; background: #1f2124; color: #8b9097; font-size: 12px; }
.cmd-alt input { width: 34px; border: 0; background: transparent; color: #ecedee; font: inherit; font-size: 13px; text-align: right; -moz-appearance: textfield; }
.cmd-alt input::-webkit-outer-spin-button, .cmd-alt input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cmd-alt input:focus { outline: none; }
.cmd-list { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.cmd-choice { justify-content: space-between; width: 100%; }
.cmd-choice .cmd-sub { margin-left: 0; }
.cmd-op { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; background: #1f2124; }
.cmd-op-step { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-x { width: 26px; height: 26px; flex: none; border: 0; border-radius: 6px; background: transparent; color: #8b9097; font-size: 12px; cursor: pointer; }
.cmd-x:hover:not(:disabled) { background: #2a2d31; color: var(--danger); }

/* ---- Sağ paneldeki işlem satırı: koyu, tek satır ---- */
.op-row {
  margin: 14px 16px 2px; padding: 10px 8px 10px 12px; border-radius: 10px; background: #0c0d0e; border: 1px solid #26282c; color: #ecedee;
  display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: 'main count x' 'bar bar bar'; align-items: center; gap: 8px 10px;
}
.op-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.op-title { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; min-width: 0; }
.op-route { color: #8b9097; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-label { font-size: 12px; color: #a1a5ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 14px; }
.op-count { grid-area: count; font-size: 12px; color: #8b9097; }
.op-row .cmd-x { grid-area: x; }
.op-bar { grid-area: bar; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.seg { height: 3px; border-radius: 2px; background: #2a2d31; }
.seg-done { background: var(--online); }
.seg-active { background: var(--flying); animation: seg-pulse 1.2s ease-in-out infinite; }
.seg-failed { background: var(--danger); }
@keyframes seg-pulse { 50% { opacity: 0.4; } }
.op-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--flying); flex: none; animation: seg-pulse 1.2s ease-in-out infinite; }
.op-icon { width: 7px; flex: none; text-align: center; font-size: 12px; }
.op-done .op-icon { color: var(--online); }
.op-failed .op-icon, .op-cancelled .op-icon { color: var(--warn); }
.op-done .op-label { color: var(--online); }
.op-failed .op-label, .op-cancelled .op-label { color: var(--warn); }

/* ---- Cihaz mesajları (üstte 5 sn) ---- */
.notify-stack { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 6px; width: min(460px, calc(100vw - 32px)); pointer-events: none; }
.notify {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px;
  background: #111214; color: #ecedee; border: 1px solid #26282c; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); font-size: 13px;
  animation: notify-in 0.2s ease-out; transition: opacity 0.3s, transform 0.3s;
}
.notify.out { opacity: 0; transform: translateY(-6px); }
@keyframes notify-in { from { opacity: 0; transform: translateY(-6px); } }
.notify-badge { flex: none; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: #2a2d31; color: #a1a5ab; }
.notify-dev { flex: none; font-weight: 600; }
.notify-text { min-width: 0; color: #c9ccd0; overflow-wrap: anywhere; }
.notify-p3 .notify-badge { background: #2c3a4d; color: var(--flying); }
.notify-p4 { border-color: #6b4f2a; }
.notify-p4 .notify-badge { background: var(--warn); color: #141517; }
.notify-p5 { border-color: var(--danger); }
.notify-p5 .notify-badge { background: var(--danger); color: #141517; }
.notify-p5 .notify-text { color: #ecedee; }
.prio-pick label { flex-direction: column; gap: 0; min-height: 52px; }
.prio-pick input { position: absolute; opacity: 0; pointer-events: none; }
.prio-pick span { font-weight: 600; font-size: 15px; }
.prio-pick small { font-size: 11px; color: var(--sub); }
.prio-pick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.prio-pick label:has(input:checked) { background: var(--accent); color: #fff; }
.prio-pick label:has(input:checked) small { color: rgba(255, 255, 255, 0.85); }
