/* Ayarlar → Sistem performansı (system.js). Kart / tablo temelleri styles.css ve workers.css'ten (wk-facts, wk-head-actions). */
.sys-host { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -4px 0 14px; font-size: 12px; color: var(--muted); }
.sys-host b { color: var(--ink); font-weight: 600; margin-right: 3px; }
#sysInterval { height: 34px; padding: 0 9px; border: 1px solid #e9eaf1; border-radius: 7px; color: #64687a; background: #fff; font-size: 12px; }

.sys-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sys-kpi { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; border-top: 3px solid #d9dbe5; }
.sys-kpi.ok { border-top-color: var(--green); }
.sys-kpi.warn { border-top-color: #d2873e; }
.sys-kpi.crit { border-top-color: #c0392b; }
.sys-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; }
.sys-kpi-value { font: 700 24px Manrope, sans-serif; color: var(--ink); line-height: 1.1; }
.sys-kpi-sub { font-size: 11.5px; color: #676b7f; min-height: 16px; }
.sys-spark { width: 100%; height: 34px; display: block; margin-top: 2px; }
.sys-spark .line { fill: none; stroke: var(--purple); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.sys-spark .area { fill: rgba(104, 87, 223, .1); stroke: none; }
.sys-kpi.warn .sys-spark .line { stroke: #d2873e; }
.sys-kpi.crit .sys-spark .line { stroke: #c0392b; }

.sys-bar { display: inline-block; position: relative; width: 100%; height: 6px; border-radius: 4px; background: #eef0f5; overflow: hidden; vertical-align: middle; }
.sys-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--green); transition: width .4s ease; }
.sys-bar.warn i { background: #d2873e; }
.sys-bar.crit i { background: #c0392b; }
@media (prefers-reduced-motion: reduce) { .sys-bar i { transition: none; } }

.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 14px; margin-bottom: 14px; }
.sys-grid > .panel, .sys-panel { margin-bottom: 0; }
.sys-panel { margin-bottom: 14px; }
.sys-body { padding: 0 19px 16px; }
.sys-facts { margin-top: 4px; }
.sys-facts dd.ok, td.ok, b.ok { color: #278b65; }
.sys-facts dd.warn, td.warn, b.warn { color: #b9770e; font-weight: 600; }
.sys-facts dd.crit, td.crit, b.crit { color: #c0392b; font-weight: 700; }
.sys-facts .muted { color: var(--muted); }

.sys-cores { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; margin-bottom: 12px; }
.sys-core { display: grid; grid-template-columns: 74px 1fr 46px; align-items: center; gap: 8px; font-size: 11.5px; color: #676b7f; }
.sys-core b { text-align: right; font-weight: 600; color: var(--ink); }

.sys-stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef0f5; margin-bottom: 8px; }
.sys-stack i { display: block; height: 100%; }
.sys-stack .used, .sys-legend .used { background: var(--purple); }
.sys-stack .cache, .sys-legend .cache { background: #b7aef5; }
.sys-stack .free, .sys-legend .free { background: #eef0f5; }
.sys-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 11.5px; color: #676b7f; margin-bottom: 10px; }
.sys-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.sys-legend .free { border: 1px solid #d9dbe5; }

.sys-table td.num, .sys-table th.num { text-align: right; }
.sys-bar-cell { min-width: 150px; }
.sys-bar-cell .sys-bar { width: calc(100% - 52px); }
.sys-bar-cell b { display: inline-block; width: 46px; text-align: right; font-weight: 600; }
.sys-unit { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.sys-off td { opacity: .65; }
.sys-state { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sys-state:before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.sys-state.ok { color: #278b65; background: #eaf7f0; }
.sys-state.warn { color: #b9770e; background: #fff4e7; }
.sys-state.crit { color: #c0392b; background: #fdecec; }
.sys-state.off { color: #86899a; background: #f1f2f5; }
.sys-state.idle { color: #5b6b8c; background: #eef2f8; }
.sys-wrap { white-space: normal; overflow-wrap: anywhere; }
.sys-query { max-width: 520px; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.sys-sub-title { margin: 16px 19px 6px; font: 700 12px Manrope, sans-serif; color: #303449; }
.sys-note { margin: 0 19px 10px; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .sys-grid { grid-template-columns: minmax(0, 1fr); }
  .sys-kpis { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
