/* Lobby — çok müşterili izleme platformu.
   Tasarım dili BelWatch'tan alındı (sahada denenmiş): üst şerit, stat
   kartları, card/table/badge/btn ailesi. Marka rengi korundu. */
:root {
  --brand: #1ab394;
  --brand-dark: #17a085;
  --brand-darker: #0f7b6c;
  /* Admin (RETRA) şeridi: KOYU. Kullanıcı kararı — admin tüm filoya baktığını
     bir bakışta görsün, tek müşteride işlem yaptığını sanmasın. */
  --admin: #0f2f4a;
  --bg: #f3f4f6;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;
  --up: #16a34a;
  --down: #dc2626;
  --warn: #f59e0b;
  --unknown: #9ca3af;
  --maint: #3b82f6;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  /* Sayılar eşit genişlikte mono: canlı panelde değer değişince satır KAYMAZ. */
  --font-govde: "Chakra Petch";
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-govde), -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* hidden HER ZAMAN kazansın: .btn/.card gibi display taşıyan sınıflar
   tarayıcının [hidden] varsayılanını eziyor ve gizlenmesi gereken öğe boş
   kutu olarak görünüyordu (BelWatch'ta yaşandı). */
[hidden] { display: none !important; }

/* --- üst şerit ----------------------------------------------------------- */
.topbar {
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 52px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
/* Admin girişte şerit koyu + sol kenarda marka rengi çizgi. */
.topbar.admin { background: var(--admin); border-bottom: 3px solid var(--brand); }

.topbar .brand {
  font-weight: 700; font-size: 17px; letter-spacing: .3px;
  margin-right: 22px; display: flex; align-items: center; gap: 9px;
}
.topbar .brand .logo {
  width: 26px; height: 26px; background: #fff; color: var(--brand);
  border-radius: 5px; display: grid; place-items: center; font-weight: 800;
  flex: none;
}
.topbar.admin .brand .logo { color: var(--admin); }
.topbar .musteri-adi { font-weight: 500; opacity: .92; }

/* "Tüm müşteriler" rozeti — admin hangi kapsamda olduğunu görsün. */
.kapsam-rozet {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25);
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .3px; white-space: nowrap;
}

.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: rgba(255,255,255,.9); text-decoration: none;
  padding: 7px 14px; border-radius: var(--radius); font-weight: 500;
  transition: background .15s;
}
.topbar nav a:hover  { background: rgba(255,255,255,.14); color: #fff; }
.topbar nav a.active { background: rgba(0,0,0,.18); color: #fff; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.topbar .user a { color: rgba(255,255,255,.85); text-decoration: none; }
.topbar .user a:hover { color: #fff; text-decoration: underline; }

.wrap { max-width: 1920px; margin: 0 auto; padding: 20px 28px; }

/* --- özet kartları ------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 14px; margin-bottom: 20px;
  /* stretch DEĞİL: eşit yükseklik dayatmak boşluk üretiyordu (BelWatch'ta
     kullanıcı iki kez "boşluk çok" dedi). */
  align-items: start;
}
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--unknown); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
}
.stat .label { color: var(--text-muted); font-size: 12px; text-transform: uppercase;
               letter-spacing: .5px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 700; line-height: 1.15; margin-top: 4px;
               font-family: var(--font-mono); letter-spacing: -.5px; }
.stat .sub   { color: var(--text-muted); font-size: 12px; }
.stat.up    { border-left-color: var(--up); }     .stat.up .value   { color: var(--up); }
.stat.down  { border-left-color: var(--down); }   .stat.down .value { color: var(--down); }
.stat.warn  { border-left-color: var(--warn); }   .stat.warn .value { color: var(--warn); }
.stat.info  { border-left-color: var(--brand); }  .stat.info .value { color: var(--brand-darker); }

/* --- kart ---------------------------------------------------------------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.card > header {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; font-weight: 600;
  letter-spacing: .2px;
}
.card > header .spacer { flex: 1; }
.card .body { padding: 16px; }
.card .body.flush { padding: 0; }

/* --- tablo --------------------------------------------------------------- */
.sar { overflow-x: auto; }           /* dar ekranda tabloyu tek başına kaydır */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 10px 14px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-muted); font-weight: 600;
  border-bottom: 1px solid var(--border); background: #fafafa; white-space: nowrap;
}
td { padding: 9px 14px; border-bottom: 1px solid #f3f4f6; }
tbody tr:hover { background: #f9fafb; }
tbody tr.row-down { background: #fef2f2; }
tbody tr.row-down:hover { background: #fee2e2; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.mono  { font-family: var(--font-mono); font-size: 12.5px; }

/* --- durum rozeti -------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 11px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
                 background: currentColor; }
.badge.up          { background: #dcfce7; color: #15803d; }
.badge.down        { background: #fee2e2; color: #b91c1c; }
.badge.unknown     { background: #f3f4f6; color: #4b5563; }
.badge.maintenance { background: #dbeafe; color: #1d4ed8; }

/* Olay önem rozetleri. Renk dili tek: aynı önem her yerde aynı hex. */
.onem { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px;
        white-space: nowrap; }
.onem-critical { background: #fee2e2; color: #b91c1c; }
.onem-warn     { background: #fef3c7; color: #92400e; }
.onem-info     { background: #e0f2fe; color: #0369a1; }

/* --- düğme --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: #fff; border: none; border-radius: var(--radius);
  padding: 7px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
  text-decoration: none; font-family: inherit; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); }
.btn.sec { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.sec:hover { background: #f9fafb; }
/* Düğme rengi = işlemin GERİ ALINABİLİRLİĞİ (BelWatch'ta kanıtlandı):
     yeşil   = geri kazandırır (Başlat, Aç)
     turuncu = yıkıcı ama geri alınabilir (Durdur, Kapat, Kaldır)
     kırmızı = geri alınamaz (makine kapat, silme) */
.btn.ok     { background: #16a34a; }  .btn.ok:hover    { background: #15803d; }
.btn.uyari  { background: #f59e0b; }  .btn.uyari:hover { background: #d97706; }
.btn.danger { background: var(--down); } .btn.danger:hover { background: #b91c1c; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- form ---------------------------------------------------------------- */
.field { margin-bottom: 13px; }
label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 5px;
        text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; font-size: 14px; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand);
}
.hint { font-size: 11px; color: var(--text-muted); margin-top: 3px;
        text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Kart içi bilgi notu — .alert KIRMIZI olduğu için nötr bilgiler alarm gibi
   görünüyordu (BelWatch dersi). Mavi = bilgi, sarı = dikkat. */
.not { background: #eff6ff; color: #1e40af; border-left: 3px solid #3b82f6;
       padding: 10px 13px; border-radius: 6px; font-size: 13px; line-height: 1.5; }
.not.uyarili { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }
.alert { background: #fee2e2; color: #b91c1c; padding: 9px 12px;
         border-radius: var(--radius); font-size: 13px; margin-bottom: 14px; }
.alert.ok { background: #dcfce7; color: #15803d; }

.empty { text-align: center; padding: 38px; color: var(--text-muted); }

/* --- bildirim balonu ----------------------------------------------------- */
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  background: var(--text); color: #fff; padding: 11px 17px;
  border-radius: var(--radius); box-shadow: 0 5px 18px rgba(0,0,0,.28);
  font-size: 13px; opacity: 0; transform: translateY(9px);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err  { background: var(--down); }
.toast.ok   { background: var(--up); }

/* --- giriş ekranı -------------------------------------------------------- */
.giris-zemin {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: linear-gradient(160deg, #0f2f4a 0%, #0f7b6c 100%);
}
.giris-kart {
  background: #fff; width: 100%; max-width: 380px; padding: 30px 32px 26px;
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.giris-logo {
  width: 46px; height: 46px; background: var(--brand); color: #fff;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 24px; font-weight: 800; margin: 0 auto 12px;
}
.giris-baslik { text-align: center; font-size: 21px; font-weight: 700;
                letter-spacing: -.3px; }
.giris-alt { text-align: center; color: var(--text-muted); font-size: 12.5px;
             margin-bottom: 22px; }
.giris-kart .btn { width: 100%; justify-content: center; padding: 10px;
                   font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.giris-dip { text-align: center; margin-top: 18px; font-size: 11.5px;
             color: var(--text-muted); }

/* --- dar ekran ----------------------------------------------------------- */
@media (max-width: 640px) {
  .wrap { padding: 14px 16px; }
  .topbar { height: auto; padding: 10px 16px; }
  .topbar nav { order: 3; width: 100%; }
}

/* ===========================================================================
   KOYU TEMA
   Renkler yalnızca token olarak yeniden tanımlanır; hiçbir bileşen kuralı
   tekrarlanmaz. Böylece yeni bir ekran eklerken koyu temayı ayrıca düşünmek
   gerekmez — token kullandığı sürece iki temada da doğru görünür.
   =========================================================================== */
:root[data-tema="koyu"] {
  --bg: #0a0e14;              /* mürekkep-siyah (Graylog NOC zemini) */
  --card: #131a24;
  --border: #223041;
  --text: #e6edf3;
  --text-muted: #8b9bb0;
  --brand: #2dd4bf;           /* teal aksan */
  --brand-dark: #14b8a6;
  --brand-darker: #5eead4;    /* koyuda "daha koyu" değil, daha PARLAK olmalı */
  --admin: #060a10;
  --shadow: 0 1px 3px rgba(0,0,0,.5);
  --up: #34d399;
  --down: #f87171;
  --warn: #fbbf24;
  --unknown: #64748b;
  --maint: #60a5fa;
}
:root[data-tema="koyu"] th { background: #0f1620; }
:root[data-tema="koyu"] tbody tr:hover { background: #18212e; }
:root[data-tema="koyu"] tbody tr.row-down { background: #2a1517; }
:root[data-tema="koyu"] tbody tr.row-down:hover { background: #3a1c1f; }
:root[data-tema="koyu"] td { border-bottom-color: #1b2531; }
:root[data-tema="koyu"] input, :root[data-tema="koyu"] select,
:root[data-tema="koyu"] textarea { background: #0f1620; color: var(--text); }
:root[data-tema="koyu"] .btn.sec { background: #18212e; color: var(--text); }
:root[data-tema="koyu"] .btn.sec:hover { background: #202b3a; }
:root[data-tema="koyu"] .topbar .brand .logo { background: var(--brand); color: #06231f; }
/* Koyu temada rozet zeminleri: açık pastel tonlar okunmuyor, koyulaştırılır. */
:root[data-tema="koyu"] .badge.up       { background: #0d2f22; color: #4ade80; }
:root[data-tema="koyu"] .badge.down     { background: #331416; color: #fca5a5; }
:root[data-tema="koyu"] .badge.unknown  { background: #1b2531; color: #94a3b8; }
:root[data-tema="koyu"] .onem-critical  { background: #331416; color: #fca5a5; }
:root[data-tema="koyu"] .onem-warn      { background: #332611; color: #fcd34d; }
:root[data-tema="koyu"] .onem-info      { background: #0d2436; color: #7dd3fc; }
:root[data-tema="koyu"] .not { background: #0d1c2e; color: #93c5fd; }
:root[data-tema="koyu"] .not.uyarili { background: #2a2110; color: #fcd34d; }
:root[data-tema="koyu"] .alert { background: #331416; color: #fca5a5; }
:root[data-tema="koyu"] .alert.ok { background: #0d2f22; color: #86efac; }

/* --- tema düğmesi ---------------------------------------------------------
   Simge CSS ile çizilir (emoji DEĞİL): eski Windows'ta emoji kutu çıkıyor. */
.tema-dugme {
  background: rgba(255,255,255,.14); border: 0; border-radius: 6px;
  width: 30px; height: 30px; cursor: pointer; display: grid; place-items: center;
  padding: 0; flex: none;
}
.tema-dugme:hover { background: rgba(255,255,255,.24); }
/* Açık temadayken: dolu daire (güneş). Koyu temadayken: hilal. */
.tema-ikon {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; display: block; transition: box-shadow .15s;
}
:root[data-tema="koyu"] .tema-ikon {
  background: transparent;
  box-shadow: inset -4px 2px 0 0 #fff;   /* hilal: iç gölgeyle ay kesiti */
}
.topbar .user .kul-ad { opacity: .9; }

/* --- NOC özet şeridi ------------------------------------------------------ */
.noc-serit {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 12px; margin-bottom: 18px; align-items: start;
}
.noc-kutu {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--unknown); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
  cursor: default; transition: transform .12s;
}
.noc-kutu .nk-etiket { color: var(--text-muted); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.noc-kutu .nk-deger { font-size: 27px; font-weight: 700; line-height: 1.15;
  margin-top: 2px; font-family: var(--font-mono); letter-spacing: -.5px; }
.noc-kutu.ok   { border-left-color: var(--up); }   .noc-kutu.ok .nk-deger   { color: var(--up); }
.noc-kutu.err  { border-left-color: var(--down); } .noc-kutu.err .nk-deger  { color: var(--down); }
.noc-kutu.warn { border-left-color: var(--warn); } .noc-kutu.warn .nk-deger { color: var(--warn); }
.noc-kutu.info { border-left-color: var(--brand); }.noc-kutu.info .nk-deger { color: var(--brand-darker); }

/* --- canlı olay akışı ----------------------------------------------------- */
.canli-nokta {
  width: 8px; height: 8px; border-radius: 50%; background: var(--up);
  display: inline-block; flex: none;
  animation: nabiz 2.4s ease-in-out infinite;
}
/* opacity animasyonu: box-shadow animasyonu 33 satırda aynı anda dönünce
   CPU'yu yiyor (BelWatch ölçümü). */
@keyframes nabiz { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) { .canli-nokta { animation: none } }

.olay-akis { max-height: 420px; overflow-y: auto; }
.olay-satir {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--border); font-size: 13px;
}
.olay-satir:last-child { border-bottom: 0; }
.olay-satir .o-zaman { font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text-muted); white-space: nowrap; flex: none; }
.olay-satir .o-baslik { flex: 1; min-width: 0; }
.olay-satir .o-cihaz { color: var(--text-muted); font-size: 12px;
  white-space: nowrap; flex: none; }

/* Müşteri sütunu yalnız admin panelinde görünür. */
.musteri-etiket {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px;
  background: #ede9fe; color: #6d28d9; white-space: nowrap;
}
:root[data-tema="koyu"] .musteri-etiket { background: #241b3d; color: #c4b5fd; }

/* --- araç çubuğu ---------------------------------------------------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
           margin-bottom: 14px; }
.toolbar input[type=text], .toolbar select { width: auto; min-width: 170px; }
.toolbar .spacer { flex: 1; }

/* --- agent kurulum komutu --- */
.komut-satir { display:flex; gap:8px; align-items:center; margin-bottom:10px; }
.komut-satir code {
  flex:1; font-family:var(--font-mono); font-size:12.5px;
  background:#0f1620; color:#7dd3fc; padding:9px 12px; border-radius:6px;
  overflow-x:auto; white-space:nowrap;
}
:root[data-tema="koyu"] .komut-satir code { background:#060a10; }
.anahtar-satir { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.anahtar-satir code { color:var(--text-muted); }

/* --- cihaz detayi --- */
.bilgi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:12px 24px; }
.bilgi-grid > div { display:flex; flex-direction:column; gap:2px;
  border-bottom:1px solid var(--border); padding-bottom:8px; }
.bg-et { font-size:11px; color:var(--text-muted); text-transform:uppercase;
  letter-spacing:.4px; font-weight:600; }
.bg-dg { font-size:14px; }
.port-liste { display:flex; flex-wrap:wrap; gap:6px; }
.port-etiket { font-family:var(--font-mono); font-size:12px; padding:3px 9px;
  border-radius:5px; background:#e0f2fe; color:#0369a1; }
:root[data-tema="koyu"] .port-etiket { background:#0d2436; color:#7dd3fc; }
/* tıklanabilir satır */
tr.tikla { cursor:pointer; }

/* --- çark menüsü --- */
.cark-menu { position:relative; display:inline-flex; }
.cark-dugme { background:rgba(255,255,255,.14); border:0; border-radius:6px;
  width:30px; height:30px; cursor:pointer; display:grid; place-items:center; padding:0; }
.cark-dugme:hover { background:rgba(255,255,255,.26); }
/* Dişli simgesi CSS ile: dış halka + iç delik (emoji DEĞİL). */
.cark-ikon { width:16px; height:16px; border-radius:50%;
  border:2.5px solid #fff; position:relative; }
.cark-ikon::before { content:""; position:absolute; inset:3px; border-radius:50%;
  border:2px solid #fff; }
.cark-liste { position:absolute; top:calc(100% + 8px); right:0; z-index:60;
  min-width:200px; padding:6px; background:var(--card); color:var(--text);
  border:1px solid var(--border); border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,.18); display:flex; flex-direction:column; gap:2px; }
.cark-liste button { background:none; border:0; text-align:left; padding:9px 12px;
  border-radius:6px; cursor:pointer; font:inherit; color:var(--text); }
.cark-liste button:hover { background:var(--bg); }
.cark-ayrac { height:1px; background:var(--border); margin:4px 0; }

/* --- modal --- */
.modal-bg { position:fixed; inset:0; background:rgba(10,14,20,.55);
  display:none; align-items:flex-start; justify-content:center;
  z-index:80; overflow-y:auto; padding:48px 16px; }
.modal-bg.open { display:flex; }
.modal { background:var(--card); color:var(--text); border-radius:10px;
  width:100%; max-width:560px; box-shadow:0 20px 50px rgba(0,0,0,.35); }
.modal header { padding:14px 18px; border-bottom:1px solid var(--border);
  display:flex; align-items:center; font-weight:600; font-size:15px; }
.modal header .spacer { flex:1; }
.modal .body { padding:18px; }
.modal footer { padding:13px 18px; border-top:1px solid var(--border);
  display:flex; align-items:center; gap:9px; }
.modal footer .spacer { flex:1; }
.close { background:none; border:0; font-size:22px; cursor:pointer;
  color:var(--text-muted); line-height:1; padding:0 4px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.checkbox { display:flex; align-items:center; gap:8px; }
.checkbox input { width:auto; }
.checkbox label { margin:0; text-transform:none; letter-spacing:0; font-size:14px;
  font-weight:400; color:var(--text); }
.sys-satir { display:flex; align-items:center; gap:12px; padding:12px 0;
  border-bottom:1px solid var(--border); }
.sys-satir:last-child { border-bottom:0; }
.sys-satir > div { flex:1; }

/* --- agent OS sekmesi --- */
.os-sekme { display:flex; gap:4px; margin-bottom:12px; }
.os-btn { padding:6px 16px; border:1px solid var(--border); background:var(--card);
  color:var(--text-muted); border-radius:7px; cursor:pointer; font:inherit;
  font-size:13px; font-weight:600; }
.os-btn:hover { border-color:var(--brand); color:var(--brand); }
.os-btn.aktif { background:var(--brand); border-color:var(--brand); color:#fff; }

/* --- komut hedef şeridi (onaydan önce hangi cihaz) --- */
.hedef-serit { background:#eff6ff; border-left:3px solid #3b82f6;
  padding:10px 13px; border-radius:6px; display:flex; flex-direction:column; gap:2px; }
:root[data-tema="koyu"] .hedef-serit { background:#0d1c2e; }
.hedef-serit b { font-size:15px; }

/* ===========================================================================
   ZENGIN NOC PANELI — donutlar, nabiz, canli akis
   Tum ikonlar CSS ile cizili (emoji DEGIL — eski Windows'ta kutu cikar).
   =========================================================================== */

/* --- durum kutusu ikonlari (kucuk yuvarlak isaretler) --- */
.nk-ust { display:flex; align-items:center; gap:7px; }
.nk-ikon { width:9px; height:9px; border-radius:50%; flex:none; }
.ni-cihaz { background:var(--brand); }
.ni-ok    { background:var(--up); }
.ni-err   { background:var(--down); box-shadow:0 0 0 0 var(--down);
            animation:puls-err 2s ease-out infinite; }
.ni-bekle { background:var(--warn); }
.ni-uyari { background:var(--warn); border-radius:2px; transform:rotate(45deg); }
@keyframes puls-err {
  0%{box-shadow:0 0 0 0 rgba(220,38,38,.5)} 70%{box-shadow:0 0 0 7px rgba(220,38,38,0)} 100%{box-shadow:0 0 0 0 rgba(220,38,38,0)}
}
@media (prefers-reduced-motion:reduce){ .ni-err{animation:none} }
.noc-tik { cursor:pointer; }
.noc-tik:hover { transform:translateY(-1px); }

/* --- orta bolum: donutlar solda, olay akisi sagda --- */
.noc-orta { display:grid; grid-template-columns:1fr 1fr; gap:18px; align-items:start; }
@media (max-width:900px){ .noc-orta{ grid-template-columns:1fr; } }

/* --- donut grafik --- */
.donut-satir { display:flex; gap:22px; justify-content:space-around; flex-wrap:wrap; }
.donut { position:relative; width:120px; height:120px; }
.donut svg { transform:rotate(-90deg); width:120px; height:120px; }
.donut-arka { fill:none; stroke:var(--border); stroke-width:11; }
.donut-on   { fill:none; stroke:var(--brand); stroke-width:11; stroke-linecap:round;
  transition:stroke-dashoffset .6s ease, stroke .3s; }
.donut-mid  { position:absolute; inset:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; }
.donut-deger { font-family:var(--font-mono); font-size:24px; font-weight:700; }
.donut-et { font-size:11px; color:var(--text-muted); text-transform:uppercase;
  letter-spacing:.5px; font-weight:600; }

/* --- nabiz serit (veri akisi gorseli) --- */
.nabiz-serit { display:flex; align-items:flex-end; gap:2px; height:26px;
  margin-top:16px; padding-top:6px; border-top:1px solid var(--border); }
.nb-cubuk { flex:1; min-width:2px; background:var(--brand); border-radius:1px;
  opacity:.75; transition:height .3s; }

/* --- canli olay akisi --- */
.olay-card .body { max-height:340px; }
.olay-akis { max-height:340px; overflow-y:auto; }
.olay-satir { display:flex; align-items:baseline; gap:9px; padding:8px 14px;
  border-bottom:1px solid var(--border); font-size:13px; }
.olay-satir:last-child { border-bottom:0; }
.olay-satir .o-zaman { font-family:var(--font-mono); font-size:11px;
  color:var(--text-muted); white-space:nowrap; flex:none; }
.olay-satir .o-baslik { flex:1; min-width:0; }
.olay-satir .o-cihaz { color:var(--text-muted); font-size:11.5px;
  white-space:nowrap; flex:none; }
/* Yeni gelen olay yukaridan kayarak girer; kritik olan hafifce parlar. */
.olay-satir.yeni { animation:olay-gir .4s ease; }
@keyframes olay-gir { from{opacity:0; transform:translateY(-8px)} to{opacity:1; transform:none} }
.olay-satir.s-critical { background:rgba(220,38,38,.06); }
@media (prefers-reduced-motion:reduce){ .olay-satir.yeni{animation:none} }

/* olay akisindaki reboot/disk/saldiri vb. renk ipuclari onem sinifindan gelir */
