/* ═══════════════════════════════════════════════════════════════════════════════════════
   ARGUS UEM — Yönetim Paneli stil katmanı
   Koyu, teknolojik, "ağ kablosu" diline sahip modern arayüz. Türkçe/İngilizce uyumlu.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #070a12;
  --bg-1: #0b1220;
  --bg-2: #101a2e;
  --bg-3: #16233c;
  --surface: rgba(18, 28, 48, 0.72);
  --surface-solid: #121c30;
  --surface-2: #17243d;
  --border: rgba(120, 145, 190, 0.16);
  --border-strong: rgba(130, 160, 210, 0.32);

  --text: #eaf0fb;
  --text-dim: #a7b5cf;
  --text-mute: #6f7f9c;

  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-glow: rgba(99, 102, 241, 0.45);
  --accent: #22d3ee;

  --ok: #22c55e;
  --warn: #f59e0b;
  --crit: #ef4444;
  --info: #38bdf8;
  --off: #64748b;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 18px 48px -20px rgba(0, 0, 0, 0.85);
  --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, 0.7);
  --mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --sidebar-w: 250px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(1200px 700px at 12% -8%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(900px 600px at 108% 0%, rgba(34, 211, 238, 0.10), transparent 55%),
    var(--bg-0);
  overflow: hidden;
}

.hidden { display: none !important; }
::selection { background: var(--brand-glow); }

/* Kaydırma çubuğu */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 145, 190, 0.22); border-radius: 20px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 145, 190, 0.4); background-clip: content-box; }

/* ─────────────────────────────── Açılış katmanı */
.boot-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(700px 500px at 50% 40%, rgba(99, 102, 241, 0.18), transparent 70%), var(--bg-0);
  transition: opacity .45s ease, visibility .45s ease;
}
.boot-screen.done { opacity: 0; visibility: hidden; }
.boot-logo {
  width: 74px; height: 74px; border-radius: 22px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 60px var(--brand-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.boot-logo span { font-size: 38px; font-weight: 800; color: #fff; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.boot-name { font-size: 22px; font-weight: 800; letter-spacing: 4px; }
.boot-bar { width: 220px; height: 4px; border-radius: 4px; background: var(--bg-3); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--accent)); animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.boot-hint { color: var(--text-mute); font-size: 12.5px; letter-spacing: .5px; }

/* ─────────────────────────────── Giriş ekranı */
.auth-screen { position: fixed; inset: 0; z-index: 900; display: grid; grid-template-columns: 1.1fr .9fr; background: var(--bg-0); }
.auth-visual {
  position: relative; overflow: hidden;
  background:
    radial-gradient(800px 600px at 20% 20%, rgba(99, 102, 241, 0.28), transparent 65%),
    radial-gradient(700px 700px at 90% 90%, rgba(34, 211, 238, 0.16), transparent 60%),
    linear-gradient(160deg, #0a1020, #05070d);
  display: grid; place-items: center;
}
.auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 145, 190, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 145, 190, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 40% 40%, #000 30%, transparent 78%);
}
.auth-visual-inner { position: relative; max-width: 480px; padding: 40px; }
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.auth-brand-mark {
  width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center;
  font-size: 30px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 44px var(--brand-glow);
}
.auth-brand h1 { margin: 0; font-size: 27px; letter-spacing: 2px; }
.auth-brand p { margin: 4px 0 0; color: var(--text-dim); font-size: 13px; }
.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.auth-features li { position: relative; padding-left: 30px; display: flex; flex-direction: column; gap: 3px; }
.auth-features li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 4px;
  background: linear-gradient(140deg, var(--brand), var(--accent)); box-shadow: 0 0 14px var(--brand-glow);
}
.auth-features b { font-size: 14px; }
.auth-features span { color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.auth-foot { margin-top: 36px; color: var(--text-mute); font-size: 12px; }
.dot-sep { margin: 0 8px; }

.auth-panel { display: grid; place-items: center; padding: 30px; background: linear-gradient(180deg, var(--bg-1), var(--bg-0)); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; box-shadow: var(--shadow); }
.auth-card-head { margin-bottom: 22px; }
.auth-card-head h2 { margin: 14px 0 4px; font-size: 22px; }
.auth-card-head p { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.lang-switch { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px; padding: 2px; }
.lang-switch button { border: 0; background: transparent; color: var(--text-dim); padding: 5px 12px; border-radius: 7px; cursor: pointer; font-size: 11.5px; font-weight: 700; letter-spacing: .5px; transition: .15s; }
.lang-switch button.active { background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; }
.lang-switch.small button { padding: 4px 9px; font-size: 11px; }

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.field input, .field select, .select, input[type="text"], input[type="password"], select, textarea {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field select:focus, .select:focus, input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.field-pw { position: relative; }
.field-pw .pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--text-mute); cursor: pointer; font-size: 15px; padding: 6px; }
.field.checkbox { flex-direction: row; align-items: center; gap: 9px; color: var(--text-dim); font-size: 12.5px; }
.field.checkbox.row { flex-direction: row; }
.field.checkbox input { width: auto; }
.auth-error { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); color: #fecaca; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 12.5px; }
.otp-target { margin: 0 0 8px; color: var(--text-dim); font-size: 12.5px; }
.auth-card-foot { margin-top: 18px; text-align: center; }
.badge-soft { font-size: 11px; color: var(--text-mute); background: var(--bg-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: 20px; }

/* ─────────────────────────────── Butonlar */
.btn { border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 22px -10px var(--brand-glow); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-2); border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.btn-danger { background: rgba(239, 68, 68, 0.14); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.24); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.link-btn { background: transparent; border: 0; color: var(--accent); cursor: pointer; font-size: 12.5px; font-weight: 600; padding: 2px 4px; }
.link-btn:hover { text-decoration: underline; }
.icon-btn { background: var(--bg-2); border: 1px solid var(--border); color: var(--text-dim); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 15px; display: grid; place-items: center; transition: .15s; }
.icon-btn:hover { border-color: var(--border-strong); color: var(--text); }

/* ─────────────────────────────── Uygulama kabuğu */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, rgba(12, 19, 34, 0.96), rgba(7, 10, 18, 0.98));
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 10px;
  position: relative; z-index: 20;
}
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(400px 200px at 0% 0%, rgba(99, 102, 241, 0.12), transparent 70%); }
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; position: relative; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #fff; background: linear-gradient(140deg, var(--brand), var(--brand-2)); box-shadow: 0 0 24px var(--brand-glow); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 15px; letter-spacing: 1.5px; }
.brand-text small { color: var(--text-mute); font-size: 10.5px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; position: relative; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px;
  background: transparent; border: 1px solid transparent; color: var(--text-dim);
  cursor: pointer; font-size: 13px; font-weight: 600; font-family: inherit; text-align: left;
  transition: .15s; position: relative;
}
.nav-item .ni-icon { width: 20px; text-align: center; font-size: 15px; opacity: .9; }
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: linear-gradient(140deg, rgba(99, 102, 241, 0.22), rgba(139, 92, 246, 0.12)); border-color: rgba(99, 102, 241, 0.4); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; border-radius: 3px; background: var(--brand); box-shadow: 0 0 12px var(--brand-glow); }
.nav-badge { margin-left: auto; background: var(--crit); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; }

.sidebar-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.agent-health { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 11.5px; color: var(--text-dim); }
.ah-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off); box-shadow: 0 0 8px currentColor; color: var(--off); }
.agent-health.ok .ah-dot { background: var(--ok); color: var(--ok); }
.agent-health.warn .ah-dot { background: var(--warn); color: var(--warn); }
.agent-health.crit .ah-dot { background: var(--crit); color: var(--crit); }
.version-line { text-align: center; color: var(--text-mute); font-size: 10.5px; font-family: var(--mono); }

/* ─────────────────────────────── Üst çubuk */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; position: relative; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 16px;
  padding: 0 22px; border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.82); backdrop-filter: blur(14px); position: relative; z-index: 15;
}
.sidebar-toggle { display: none; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h2 { margin: 0; font-size: 18px; }
.topbar-title p { margin: 2px 0 0; color: var(--text-mute); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.live-toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-dim); background: var(--bg-2); border: 1px solid var(--border); padding: 6px 11px; border-radius: 10px; cursor: pointer; }
.live-toggle input { display: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.live-toggle input:checked + .live-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: livepulse 1.6s infinite; }
@keyframes livepulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); cursor: pointer; transition: .15s; }
.user-chip:hover { border-color: var(--border-strong); }
.uc-avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(140deg, var(--brand), var(--brand-2)); }
.uc-meta { display: flex; flex-direction: column; line-height: 1.15; max-width: 130px; }
.uc-meta b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-meta small { font-size: 10.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-caret { color: var(--text-mute); font-size: 10px; }

.user-menu { position: absolute; right: 22px; top: calc(var(--topbar-h) - 6px); width: 240px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 60; animation: pop .16s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.um-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 5px; display: flex; flex-direction: column; gap: 3px; }
.um-head b { font-size: 13px; }
.um-head small { color: var(--text-mute); font-size: 11.5px; }
.um-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text-dim); padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-family: inherit; }
.um-item:hover { background: var(--bg-2); color: var(--text); }
.um-item.danger:hover { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }

/* ─────────────────────────────── İçerik */
.content { flex: 1; overflow-y: auto; padding: 22px; }
.view { display: flex; flex-direction: column; gap: 18px; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-title-sm { color: var(--text-dim); font-size: 12.5px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--text-dim); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; font-family: inherit; transition: .15s; }
.seg button.active { background: linear-gradient(140deg, var(--brand), var(--brand-2)); color: #fff; }
.select { width: auto; min-width: 130px; font-size: 12.5px; padding: 8px 11px; }
.search { position: relative; }
.search input { padding-right: 34px; min-width: 210px; font-size: 12.5px; padding-top: 9px; padding-bottom: 9px; }
.search-icon { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--text-mute); }

/* ─────────────────────────────── Kartlar */
.card { background: var(--surface); backdrop-filter: blur(12px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-hint { color: var(--text-mute); font-size: 11.5px; margin-left: auto; }
.card-head .search { margin-left: auto; }
.card-body { padding: 16px 18px; }
.card-body.scroll { overflow-y: auto; max-height: calc(100vh - 260px); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ─────────────────────────────── KPI şeridi */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi-strip.small { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; overflow: hidden; transition: .2s;
}
.kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kc, var(--brand)); }
.kpi.k-ok { --kc: var(--ok); } .kpi.k-warn { --kc: var(--warn); } .kpi.k-crit { --kc: var(--crit); }
.kpi.k-info { --kc: var(--info); } .kpi.k-brand { --kc: var(--brand); } .kpi.k-off { --kc: var(--off); }
.kpi-label { color: var(--text-mute); font-size: 11.5px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; }
.kpi-value { font-size: 26px; font-weight: 800; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--text-dim); font-size: 11.5px; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--text-mute); margin-left: 3px; }

/* ─────────────────────────────── Mini gauge + sparkline */
.mini-gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-gauge { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mg-ring { --val: 0; --col: var(--brand); width: 92px; height: 92px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--col) calc(var(--val) * 1%), rgba(120, 145, 190, 0.14) 0);
  display: grid; place-items: center; transition: --val .6s ease; }
.mg-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--bg-1); box-shadow: inset 0 2px 8px rgba(0,0,0,.5); }
.mg-ring b { position: relative; font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mg-label { font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.net-spark { margin-top: 16px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
.net-spark-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.net-spark-row b { color: var(--text); font-family: var(--mono); }

/* ─────────────────────────────── Tablolar */
.table-host { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.grid th { text-align: left; padding: 10px 12px; color: var(--text-mute); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.grid td { padding: 11px 12px; border-bottom: 1px solid rgba(120, 145, 190, 0.08); vertical-align: middle; }
table.grid tbody tr { transition: .12s; }
table.grid tbody tr:hover { background: rgba(99, 102, 241, 0.06); }
table.grid tbody tr.clickable { cursor: pointer; }
.cell-name { display: flex; flex-direction: column; gap: 2px; }
.cell-name b { font-size: 13px; }
.cell-name small { color: var(--text-mute); font-family: var(--mono); font-size: 11px; }
.row-actions { display: flex; gap: 6px; }
.empty-state { color: var(--text-mute); font-size: 12.5px; text-align: center; padding: 34px 12px; }

/* ─────────────────────────────── Etiketler */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.tag.t-ok { background: rgba(34, 197, 94, 0.14); color: #86efac; }
.tag.t-warn { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
.tag.t-crit { background: rgba(239, 68, 68, 0.16); color: #fca5a5; }
.tag.t-info { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.tag.t-off { background: rgba(100, 116, 139, 0.18); color: #cbd5e1; }
.tag.t-brand { background: rgba(99, 102, 241, 0.16); color: #a5b4fc; }
.tag.t-plain { background: var(--bg-2); color: var(--text-dim); border: 1px solid var(--border); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.kind-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: var(--bg-2); border: 1px solid var(--border); flex-shrink: 0; }

/* Bar göstergesi */
.bar { height: 6px; border-radius: 6px; background: rgba(120, 145, 190, 0.14); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--ok); transition: width .4s; }
.bar.warn > i { background: var(--warn); }
.bar.crit > i { background: var(--crit); }
.bar.info > i { background: var(--info); }
.meter-cell { display: flex; align-items: center; gap: 8px; }
.meter-cell .mv { font-family: var(--mono); font-size: 12px; min-width: 42px; text-align: right; }

/* ─────────────────────────────── Performans görünümü */
.monitor-split { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
.pane { min-height: 300px; }
.list-host { display: flex; flex-direction: column; gap: 6px; }
.mon-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid transparent; cursor: pointer; transition: .15s; }
.mon-item:hover { border-color: var(--border-strong); }
.mon-item.active { border-color: var(--brand); background: linear-gradient(140deg, rgba(99,102,241,.16), rgba(139,92,246,.08)); }
.mon-item .mi-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mon-item .mi-main b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-item .mi-main small { color: var(--text-mute); font-size: 11px; font-family: var(--mono); }
.mon-item .mi-metrics { display: flex; gap: 10px; }
.metric-chip { display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--text-mute); }
.metric-chip b { font-size: 12.5px; color: var(--text); font-family: var(--mono); }

.detail-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dm { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.dm-label { color: var(--text-mute); font-size: 11px; }
.dm-value { font-size: 20px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.dm-value small { font-size: 12px; color: var(--text-mute); }
.chart-host { position: relative; height: 220px; }
.chart-host.tall { height: 280px; }

/* ─────────────────────────────── Topoloji */
.topo-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 18px; height: calc(100vh - 210px); }
.topo-canvas-host { position: relative; background: radial-gradient(700px 500px at 50% 30%, rgba(99,102,241,.08), transparent 70%), var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.topo-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.topo-canvas.panning { cursor: grabbing; }
.topo-canvas.linking { cursor: crosshair; }
.topo-tree { overflow-y: auto; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.topo-inspector { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow-y: auto; }
.topo-legend { position: absolute; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; background: rgba(7,10,18,.7); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 11px; color: var(--text-dim); max-width: calc(100% - 28px); }
.topo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.topo-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.topo-hint { position: absolute; right: 14px; top: 14px; background: rgba(7,10,18,.7); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; font-size: 11px; color: var(--text-mute); max-width: 320px; }

/* SVG düğüm ve kablo stilleri */
.topn { cursor: pointer; }
.topn .node-box { fill: var(--surface-solid); stroke: var(--border-strong); stroke-width: 1.4; transition: .15s; }
.topn:hover .node-box { stroke: var(--brand); }
.topn.selected .node-box { stroke: var(--brand); stroke-width: 2.4; filter: drop-shadow(0 0 10px var(--brand-glow)); }
.topn .node-label { fill: var(--text); font-size: 11.5px; font-weight: 600; font-family: var(--sans); }
.topn .node-sub { fill: var(--text-mute); font-size: 9.5px; font-family: var(--mono); }
.topn .node-glyph { fill: var(--text-dim); font-size: 16px; }
.topn.online .node-box { stroke: rgba(34,197,94,.5); }
.topn.degraded .node-box { stroke: rgba(245,158,11,.6); }
.topn.critical .node-box { stroke: rgba(239,68,68,.7); }
.topn.offline .node-box { stroke: rgba(100,116,139,.5); }
.topn .health-dot { r: 4.5; }

.cable { stroke: rgba(148, 163, 184, 0.55); stroke-width: 2; fill: none; }
.cable.auto { stroke-dasharray: 6 5; opacity: .7; }
.cable.active { stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(34,211,238,.6)); }
.cable-hit { stroke: transparent; stroke-width: 16; fill: none; cursor: pointer; }
.cable-packet { fill: var(--accent); opacity: .9; }

.tree-node { display: flex; flex-direction: column; }
.tree-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 12.5px; }
.tree-item:hover { background: var(--bg-2); }
.tree-item b { font-weight: 600; }
.tree-children { margin-left: 16px; border-left: 1px dashed var(--border); padding-left: 8px; }
.tree-item .ti-count { margin-left: auto; color: var(--text-mute); font-size: 11px; }
.tree-caret { width: 12px; color: var(--text-mute); font-size: 10px; }
.pager { display: flex; gap: 6px; justify-content: center; padding: 14px 0; flex-wrap: wrap; }

.insp-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.insp-block h4 { margin: 0 0 6px; font-size: 13px; }
.insp-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px solid rgba(120,145,190,.08); }
.insp-row span { color: var(--text-mute); }
.insp-link { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: var(--bg-2); border-radius: 8px; font-size: 12px; margin-bottom: 5px; }
.insp-link .cable-mini { width: 22px; height: 12px; }

/* ─────────────────────────────── Çekmece */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(3,6,12,.6); backdrop-filter: blur(3px); z-index: 200; animation: fadein .2s; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(480px, 94vw); background: var(--surface-solid); border-left: 1px solid var(--border-strong); z-index: 201; display: flex; flex-direction: column; box-shadow: -20px 0 60px -20px rgba(0,0,0,.9); animation: slidein .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { transform: translateX(30px); opacity: .6; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.drawer-head h3 { margin: 0; font-size: 16px; flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.detail-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-mute); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.detail-kv { display: flex; flex-direction: column; gap: 2px; }
.detail-kv span { color: var(--text-mute); font-size: 11px; }
.detail-kv b { font-size: 12.5px; font-weight: 600; word-break: break-word; }

/* ─────────────────────────────── Bildirimler (toast) */
.toast-host { position: fixed; right: 20px; bottom: 20px; z-index: 500; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 260px; max-width: 380px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); padding: 12px 15px; box-shadow: var(--shadow); animation: toastin .28s cubic-bezier(.2,.8,.2,1); }
@keyframes toastin { from { transform: translateX(40px); opacity: 0; } }
.toast.ok { border-left-color: var(--ok); } .toast.warn { border-left-color: var(--warn); }
.toast.crit { border-left-color: var(--crit); } .toast.info { border-left-color: var(--info); }
.toast b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.toast span { font-size: 12px; color: var(--text-dim); }

/* ─────────────────────────────── SweetAlert2 uyumu (koyu tema) */
.swal2-popup.argus-swal { background: var(--surface-solid) !important; border: 1px solid var(--border-strong); border-radius: var(--radius-lg) !important; color: var(--text) !important; font-family: var(--sans) !important; }
.swal2-popup.argus-swal .swal2-title { color: var(--text) !important; font-size: 19px !important; }
.swal2-popup.argus-swal .swal2-html-container { color: var(--text-dim) !important; font-size: 13px !important; }
.swal2-popup.argus-swal .swal2-input, .swal2-popup.argus-swal .swal2-select, .swal2-popup.argus-swal .swal2-textarea {
  background: var(--bg-2) !important; border: 1px solid var(--border) !important; color: var(--text) !important; border-radius: var(--radius-sm) !important;
}
.swal2-popup.argus-swal .swal2-label, .swal2-popup.argus-swal label { color: var(--text-dim) !important; font-size: 12.5px !important; }
.swal2-styled.swal2-confirm { background: linear-gradient(140deg, var(--brand), var(--brand-2)) !important; }
.swal2-styled.swal2-cancel { background: var(--bg-3) !important; }
.swal2-popup.argus-swal .swal2-validation-message { background: rgba(239,68,68,.14) !important; color: #fca5a5 !important; }
.argus-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.argus-form-grid .full { grid-column: 1 / -1; }
.argus-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }
.argus-form-grid input, .argus-form-grid select { font-size: 13px; padding: 9px 11px; }

/* ─────────────────────────────── Duyarlı */
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
  .monitor-split { grid-template-columns: 1fr; }
  .topo-wrap { grid-template-columns: 1fr; height: auto; }
  .topo-canvas-host { height: 60vh; }
  .topo-inspector { max-height: 40vh; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px -20px #000; }
  .sidebar-toggle { display: grid; }
  .uc-meta { display: none; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
