/* Geliştirici Araçları — birleşik sekmeli sayfa */
.dt-app { display: flex; flex-direction: column; min-height: 600px; }
.dt-header { padding: 8px 0 14px; }
.dt-header h1 { margin: 0; font-size: 22px; }
.dt-tabs {
  display: flex; gap: 2px; padding: 0 2px;
  border-bottom: 2px solid var(--border); background: white;
  border-radius: 8px 8px 0 0; overflow-x: auto;
}
.dt-tab {
  padding: 10px 16px; background: transparent; border: none;
  border-bottom: 3px solid transparent; cursor: pointer;
  font-size: 13px; font-family: inherit; color: var(--text-secondary);
  font-weight: 600; white-space: nowrap; transition: all 0.15s;
}
.dt-tab:hover { color: var(--text); background: var(--surface-hover); }
.dt-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: white; }

.dt-body {
  flex: 1; background: white; border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 12px 12px;
  min-height: 600px; overflow: hidden;
}
.dt-iframe {
  display: block; width: 100%; height: calc(100vh - 220px); min-height: 600px;
  border: 0; background: white;
}
.dt-native { padding: 18px; min-height: 600px; }
.dt-empty, .dt-error { padding: 60px 20px; text-align: center; color: var(--text-tertiary); }
.dt-error { color: #c62828; }

/* === Akış Durumu sekmesi === */
.flow-wrap { padding: 18px 22px; }
.flow-loading { padding: 60px; text-align: center; color: var(--text-tertiary); }
.flow-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.flow-kpi { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.flow-kpi .kpi-l { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; font-weight: 700; letter-spacing: 0.4px; }
.flow-kpi .kpi-v { font-size: 26px; font-weight: 700; color: var(--text); margin-top: 4px; }
.flow-kpi .kpi-s { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }

.flow-section { font-size: 13px; font-weight: 700; color: var(--text); margin: 24px 0 10px; text-transform: uppercase; letter-spacing: 0.4px; }

.flow-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.flow-slot { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: white; }
.flow-slot.busy { border-left: 4px solid #f59e0b; background: #fffbeb; }
.flow-slot.free { border-left: 4px solid #16a34a; background: #f0fdf4; opacity: 0.75; }
.slot-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.slot-num { font-size: 11px; font-weight: 700; color: var(--text-secondary); letter-spacing: 0.5px; }
.slot-prio { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 700; text-transform: uppercase; }
.prio-heavy { background: #fee2e2; color: #991b1b; }
.prio-medium { background: #fef3c7; color: #92400e; }
.prio-light { background: #dcfce7; color: #166534; }
.prio-critical { background: #f3e8ff; color: #6b21a8; }
.slot-free-label { font-size: 11px; color: #16a34a; font-weight: 700; }
.slot-job { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.slot-run { font-size: 12px; color: var(--text-secondary); }
.slot-cmd { font-size: 11px; color: var(--text-tertiary); font-family: ui-monospace, Menlo, monospace; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.flow-log { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 8px 0; max-height: 400px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 70px 60px 140px 1fr; gap: 8px; padding: 5px 14px; font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; border-bottom: 1px solid var(--border); }
.log-row:last-child { border-bottom: 0; }
.log-row.raw { display: block; color: var(--text-tertiary); }
.log-t { color: var(--text-tertiary); }
.log-lvl { font-weight: 700; }
.log-row.ok .log-lvl { color: #16a34a; }
.log-row.err .log-lvl { color: #c62828; }
.log-row.dim .log-lvl { color: var(--text-tertiary); }
.log-job { color: var(--primary); font-weight: 600; }
.log-msg { color: var(--text); }
.flow-empty { padding: 30px; text-align: center; color: var(--text-tertiary); font-size: 13px; }

/* === Topbar RAM/CPU chip === */
.sys-stats-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 16px; font-size: 12px; font-weight: 600;
  cursor: pointer; user-select: none; margin-left: 12px;
  background: #dcfce7; color: #166534; border: 1px solid #86efac;
  transition: all 0.2s;
}
.sys-stats-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.sys-stats-chip.mid { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
.sys-stats-chip.high { background: #fee2e2; color: #991b1b; border-color: #f87171; animation: chipBlink 2s infinite; }
.sys-stats-chip .chip-i { font-size: 13px; }
.sys-stats-chip .chip-sep { opacity: 0.5; margin: 0 2px; }
@keyframes chipBlink { 50% { opacity: 0.7; } }

@media (max-width: 900px) {
  .dt-tab { padding: 8px 10px; font-size: 11.5px; }
  .dt-iframe { height: calc(100vh - 180px); }
}
