/* =====================================================
   SARMAL - Yonetim Paneli stilleri ("Harman" tasarimi)
   Dosya: C:\SARMAL\web\style.css
   Surum: 0.4.0
   ===================================================== */

:root {
  --bg: #060A13;
  --panel: #0B1427;
  --panel-2: #0C162B;
  --panel-3: #0E1A33;
  --line: #1F3157;
  --line-2: #1A2844;
  --line-3: #16233F;
  --text: #F1F5FB;
  --text-2: #D3DDEB;
  --text-3: #C5D0E0;
  --muted: #A9B9D0;
  --link: #7DB4FF;
  --green: #2EE6A6;
  --yellow: #F5C451;
  --red: #FF6B7D;
  --violet: #B18CFF;
  --blue: #5AA2FF;
  --cyan: #38D3F5;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  color: var(--text);
  font-family: 'Geist', system-ui, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
a:hover { color: #B9D6FF; }
.mono { font-family: 'Geist Mono', ui-monospace, Consolas, monospace; }
/* Rakamlar: panelin geri kalaniyla ayni yazi tipi, esit genislikte rakamlar */
.num { font-family: 'Geist', system-ui, 'Segoe UI', sans-serif; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.accent { color: var(--link); }
.sr-only { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

.app {
  min-height: 100vh;
  background: radial-gradient(70% 45% at 70% -10%, #13284F 0%, rgba(6, 10, 19, 0) 70%), var(--bg);
  display: flex;
  flex-wrap: wrap;
}

/* ---------------- Sol menu ---------------- */
.sidebar {
  flex: 1 1 250px;
  max-width: 100%;
  background: linear-gradient(180deg, #0A1224 0%, #080E1C 100%);
  border-right: 1px solid var(--line-2);
}
.sidebar-inner { display: flex; flex-direction: column; min-height: 100%; }
@media (min-width: 900px) {
  .sidebar { flex: 0 0 264px; }
  .sidebar-inner { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; border-bottom: 1px solid var(--line-2); }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 14px rgba(61, 139, 255, 0.45); }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong { font-size: 18px; letter-spacing: 3px; }
.brand-text span { font-size: 10px; color: var(--muted); letter-spacing: 0.6px; white-space: nowrap; }
.role-title { padding: 18px 14px 8px; font-size: 11px; letter-spacing: 2.5px; color: var(--muted); text-align: center; }

.nav { padding: 4px 12px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav > a, .nav-group > button {
  display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 12px;
  border-radius: 9px; font-size: 13.5px; text-decoration: none;
}
.nav-active {
  background: linear-gradient(90deg, #1D4FB8 0%, #163C8C 100%);
  box-shadow: 0 0 0 1px #3B73E0 inset, 0 8px 24px rgba(45, 110, 255, 0.28);
  color: #FFFFFF !important; font-weight: 600;
}
.nav-group { display: flex; flex-direction: column; }
.nav-group > button {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13.5px;
  text-align: left; cursor: pointer; width: 100%;
}
.nav-group > button:hover { background: rgba(29, 79, 184, 0.15); }
.nav-group > button span { flex: 1; }
.nav-group .chev { transition: transform .15s; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-kids { display: none; flex-direction: column; margin: 2px 0 6px 21px; border-left: 1px solid #23406F; }
.nav-group.open .nav-kids { display: flex; }
.nav-kids a {
  display: flex; align-items: center; justify-content: space-between; min-height: 32px;
  padding: 0 12px 0 20px; color: #B9C7DB; text-decoration: none; font-size: 13px;
}
.nav-kids a:hover { color: #FFFFFF; }
.nav-kids .tag { font-family: 'Geist Mono', monospace; font-size: 10px; color: var(--link); }

.license {
  margin: 0 12px 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel-2); display: flex; flex-direction: column; gap: 8px;
}
.license-title { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.license-row { display: flex; justify-content: space-between; font-size: 13px; }
.license-note { font-size: 11px; color: var(--muted); }
.bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.bar-fill { height: 6px; background: linear-gradient(90deg, #3D8BFF, var(--cyan)); }

.user-card { border-top: 1px solid var(--line-2); padding: 14px 16px 18px; display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #2F6BFF, #22B8E6);
  color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 6px 18px rgba(47, 107, 255, 0.35);
}
.user-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-text strong { font-size: 14px; }
.user-text span { font-size: 12px; color: var(--muted); }
.logout-btn {
  width: 34px; height: 34px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer;
}
.logout-btn:hover { color: #FFB3BE; border-color: #5A2433; background: #2A1018; }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ---------------- Ana alan ---------------- */
.main {
  flex: 999 1 560px; min-width: 0; padding: 14px 22px 22px;
  display: flex; flex-direction: column; gap: 12px;
}
@media (max-width: 600px) { .main { padding: 16px; } }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.spacer { flex: 1; }
.search {
  position: relative; flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; gap: 10px;
  height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(12, 22, 43, 0.8);
}
.search:focus-within { border-color: #3B73E0; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; }
.kbd { font-family: 'Geist Mono', monospace; font-size: 11px; color: #9FB0C8; padding: 2px 6px; border: 1px solid #2A3E66; border-radius: 5px; }
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; z-index: 20; max-height: 360px; overflow-y: auto;
  border: 1px solid #2B4A80; border-radius: 12px; background: #08101F; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  padding: 6px;
}
.sr-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; }
.sr-item:hover { background: #10203F; }
.sr-item .sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sr-item .sr-sub { font-size: 11px; color: var(--muted); }
.sr-item .sr-metrics { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.sr-empty { padding: 12px; font-size: 13px; color: var(--muted); }
.clock {
  display: flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 999px; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--text-2);
}

.banner {
  padding: 10px 14px; border: 1px solid #5A2433; border-radius: 12px; background: #2A1018; color: #FFB3BE; font-size: 13px;
}

.headline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.headline-text { display: flex; flex-direction: column; gap: 2px; }
.headline h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.headline h1 span { color: var(--link); }
#headlineSub { font-size: 13px; color: var(--text-3); }
#headlineSub strong { color: #FF8A9A; font-weight: 600; }
#headlineSub .ok { color: var(--green); font-weight: 600; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 10px;
  background: linear-gradient(90deg, #2F6BFF, #1FA9E0); color: #FFFFFF; font: inherit; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.35); cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); }

/* KPI */
/* Kart dizilisi pencere genisligine gore degisir, hicbir kart tek basina asagida kalmaz:
   genis ekran  : 5 kart tek satirda
   orta ekran   : solda buyuk "Toplam Cihaz", saginda 2 x 2 durum kartlari
   dar ekran    : ustte "Toplam Cihaz", altinda 2 x 2
   telefon      : alt alta */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1339px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi-total { grid-row: span 2; justify-content: center; }
}
@media (max-width: 979px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-total { grid-row: auto; grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
}
.kpi-cards-wrap { display: contents; }
.kpi-total {
  position: relative; overflow: hidden; border: 1px solid #23406F; border-radius: 14px;
  background: linear-gradient(135deg, #12264A 0%, var(--panel-2) 100%); padding: 9px 14px 15px;
  display: flex; flex-direction: column; justify-content: center;
}
.kpi-label { font-size: 12px; color: var(--text-3); }
.kpi-total-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex: 1; }
.kpi-total-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi-total-num { display: flex; align-items: baseline; gap: 6px; }
.kpi-total-num strong { font-size: 24px; line-height: 1; }
.up { font-size: 12px; color: #6FF0C0; }
.kpi-note { font-size: 11px; color: var(--muted); position: relative; z-index: 1; }
.spark { position: absolute; left: 0; right: 0; bottom: 0; height: 11px; opacity: 0.5; pointer-events: none; }
.kpi {
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); padding: 7px 12px;
  display: flex; align-items: center; gap: 10px;
}
.ring { position: relative; width: 40px; height: 40px; flex: 0 0 auto; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace; font-size: 9.5px; font-weight: 600;
}
.ring circle { transition: stroke-dasharray .6s ease; }
.kpi-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.kpi-name { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.kpi-num { font-size: 22px; line-height: 1; }
.kpi-text .kpi-note { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kartlar */
.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row > .pulse { grid-column: span 2; }
.card {
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 12px 16px;
  min-width: 0;
}
.card h2 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; gap: 10px; }
.card-head a { font-size: 12px; }

/* Uc nokta nabzi */
.pulse { flex: 2.1 1 520px; position: relative; overflow: hidden; padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.grid-bg {
  position: absolute; inset: 0; opacity: 0.45; pointer-events: none;
  background-image: linear-gradient(#14213B 1px, transparent 1px), linear-gradient(90deg, #14213B 1px, transparent 1px);
  background-size: 40px 40px;
}
.pulse-head { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pulse-title { display: flex; flex-direction: column; gap: 2px; }
.eyebrow { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; }
.eyebrow-sm { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.pulse-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pulse-big strong.num { font-size: 22px; line-height: 1.2; }
.pulse-big small { font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.pulse-cpu { font-size: 12px; color: var(--text-3); }
.pulse-cpu strong { color: #7FE7FF; font-weight: 500; }
.tabs { display: flex; padding: 3px; border: 1px solid #23406F; border-radius: 9px; background: #08101F; }
.tabs button {
  min-height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-3);
  font: inherit; font-size: 11.5px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: #2F6BFF; color: #FFFFFF; font-weight: 600; }
.chart { position: relative; height: 150px; }
.chart svg { display: block; height: 100%; }
.peak-dot {
  position: absolute; transform: translate(-50%, -50%); width: 11px; height: 11px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 0 0 4px rgba(56, 211, 245, 0.35), 0 0 22px var(--cyan); pointer-events: none;
}
.peak-label, .hover-tip {
  position: absolute; top: 0; transform: translateX(-50%); padding: 5px 9px; border: 1px solid #2B4A80;
  border-radius: 8px; background: rgba(8, 16, 31, 0.92); display: flex; flex-direction: column; gap: 1px; max-width: calc(100% - 8px);
  white-space: nowrap; pointer-events: none; font-size: 12px;
}
.hover-tip { z-index: 3; }
.peak-label.peak-inline { position: static; transform: none; flex-direction: row; align-items: baseline; gap: 6px; padding: 2px 8px;
  font-size: 11.5px; max-width: none; border-radius: 6px; }
.chart-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
}
.pulse-foot {
  position: relative; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 11.5px; color: var(--text-3);
}
.legend-inline { display: flex; gap: 16px; }
.legend-inline > span { display: flex; align-items: center; gap: 7px; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #2F6BFF, var(--cyan)); }
.lg-dash { width: 18px; border-top: 2px dashed var(--violet); }

/* Durum dagilimi */
.dist { flex: 1 1 300px; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.dist-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut { position: relative; width: 118px; height: 118px; flex: 0 0 auto; }
.donut svg { width: 100%; height: 100%; display: block; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 24px; line-height: 1; }
.donut-center span { font-size: 10.5px; color: var(--muted); }
.dist-legend { flex: 0 1 190px; min-width: 140px; display: flex; flex-direction: column; gap: 7px; }
.lg-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) 28px 46px; gap: 8px; align-items: center; font-size: 12.5px; }
.lg-row .dot { width: 8px; height: 8px; }
.lg-row .lg-name { color: var(--text-2); }
.lg-row strong { font-family: 'Geist Mono', monospace; font-weight: 500; text-align: right; }
.lg-row .lg-pct { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--muted); text-align: right; }
.health {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-3); cursor: help;
}
.health strong.num { font-size: 20px; line-height: 1; color: #7FE7FF; min-width: 34px; }
.health-text { display: flex; flex-direction: column; gap: 2px; }
.health-title { font-size: 12.5px; font-weight: 600; }
.health .muted { font-size: 11px; }

/* Uclu satir */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) {
  .row, .three { grid-template-columns: minmax(0, 1fr); }
  .row > .pulse { grid-column: auto; }
}
.list-card { display: flex; flex-direction: column; gap: 0; }
.alert-row {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 0; border-top: 1px solid var(--line-3);
  color: var(--text); font-size: 12.5px;
}
.alert-bar { width: 3px; align-self: stretch; border-radius: 2px; }
.alert-row .grow { flex: 1; }
.badge {
  min-width: 24px; height: 21px; padding: 0 7px; border-radius: 6px; font-family: 'Geist Mono', monospace;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.act-row { display: flex; align-items: center; gap: 10px; min-height: 34px; border-top: 1px solid var(--line-3); }
.act-icon { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.act-row .grow { flex: 1; font-size: 12.5px; color: #E4EAF3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-row .when { font-size: 11px; color: var(--muted); white-space: nowrap; }
.todo-card { background: linear-gradient(160deg, #10224A 0%, var(--panel) 60%); }
.todo-row {
  display: flex; align-items: center; gap: 10px; min-height: 34px; border-top: 1px solid var(--line-3);
  font-size: 12.5px; cursor: pointer;
}
.todo-row input { width: 15px; height: 15px; accent-color: #2F6BFF; margin: 0; }
.todo-row.done { color: var(--muted); }
.todo-row.done span { text-decoration: line-through; }
.empty-row { display: flex; align-items: center; gap: 10px; min-height: 34px; border-top: 1px solid var(--line-3); font-size: 12.5px; color: var(--muted); }

/* Musteriler */
.firms { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 4px; }
.firm {
  display: flex; flex-direction: column; gap: 8px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--panel-3); color: var(--text);
}
.firm-top { display: flex; align-items: center; gap: 10px; }
.firm-ring { position: relative; width: 36px; height: 36px; flex: 0 0 auto; }
.firm-ring svg { width: 100%; height: 100%; display: block; }
.firm-ring span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Geist Mono', monospace; font-size: 9.5px; font-weight: 600;
}
.firm-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.firm-name strong { font-size: 13px; }
.firm-name span { font-size: 11px; color: var(--muted); }
.firm-stats { display: flex; gap: 10px; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--text-2); }
.firm-stats span { display: flex; align-items: center; gap: 5px; }
.firm-stats .dot { width: 7px; height: 7px; }

.foot { font-size: 11px; text-align: center; padding-top: 2px; }

/* Pencere ve bildirim */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 12, 0.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-box {
  width: 100%; max-width: 480px; border: 1px solid #2B4A80; border-radius: 16px; background: var(--panel);
  padding: 22px 24px; font-size: 14px; color: var(--text-2); line-height: 1.5;
}
.modal-box h2 { margin: 0 0 8px; color: var(--text); font-size: 18px; }
.modal-box ol { padding-left: 20px; }
.modal-box li { margin-bottom: 6px; }
.agent-box { max-width: 540px; }
.agent-head { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.agent-head h2 { margin: 0 0 2px; }
.agent-head p { margin: 0; }
.agent-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.agent-select { width: 100%; height: 40px; border-radius: 10px; border: 1px solid #2B4A80; background: var(--panel-3, #0b1424); color: var(--text); padding: 0 10px; font-size: 14px; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.agent-dl { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; height: 40px; padding: 0 18px; font-weight: 700; }
.agent-dl.disabled { opacity: .45; pointer-events: none; }
.agent-actions .btn-ghost { height: 40px; }
.agent-steps { margin: 12px 0 4px; }
.agent-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 10px 16px;
  border: 1px solid #2B4A80; border-radius: 10px; background: #08101F; color: var(--text-2); font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* =====================================================
   TEK EKRAN DUZENI (bilgisayar ekranlari)
   Pencere yeterince genis ve yuksekse sayfa kaydirilmaz:
   - Uc Nokta Nabzi grafigi kalan bos yere gore uzar/kisalir
   - Uyari / Aktivite / Oncelik listeleri kendi icinde kaydirilir
   - Musteriler en altta tek, yana kayan bir serit olur
   Kucuk pencerelerde ve telefonda normal (asagi kayan) duzen gecerlidir.
   ===================================================== */
@media (min-width: 1100px) and (min-height: 560px) {
  .app { height: 100vh; overflow: hidden; }
  .main { height: 100vh; overflow-y: auto; padding-bottom: 12px; }
  .topbar, .banner, .headline, .kpis, .firms-card, .foot { flex: none; }

  /* Grafik + durum dagilimi satiri */
  .row { flex: 1.3 1 0; min-height: 236px; flex-wrap: nowrap; }
  .pulse { min-height: 0; }
  .chart { flex: 1 1 auto; height: auto; min-height: 90px; }
  .dist { min-height: 0; justify-content: flex-start; overflow: hidden; gap: 8px; }
  .dist h2 { flex: none; }
  .dist-body { flex: 1 1 auto; min-height: 0; flex-wrap: nowrap; gap: 14px; justify-content: center; }
  .dist .health { flex: none; }
  .dist-legend { flex: 1 1 0; min-width: 0; max-width: 220px; }

  /* Uclu liste satiri */
  .three { flex: 1 1 0; min-height: 130px; grid-template-rows: minmax(0, 1fr); }
  .list-card { min-height: 0; overflow: hidden; }
  .list-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

  /* Musteriler: tek serit */
  .firms-card { padding-top: 10px; padding-bottom: 10px; }
  .firms { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(210px, 250px); overflow-x: auto; padding-bottom: 2px; }
  .foot { padding-top: 0; }

  /* Halka grafik ekran yuksekligine gore buyur */
  .donut { width: clamp(96px, 16vh, 190px); height: clamp(96px, 16vh, 190px); }
  .donut-center strong { font-size: clamp(24px, 3.4vh, 34px); }
}
/* Orta genislikte de 5 kart tek satirda (yer kazanmak icin) */
@media (min-width: 1200px) and (max-width: 1339px) and (min-height: 560px) {
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpi-total { grid-row: auto; }
  .kpi { gap: 8px; padding: 7px 10px; }
}
/* Alcak ekranlar (ornek 1280 x 720) */
@media (min-width: 1100px) and (min-height: 560px) and (max-height: 780px) {
  .main { gap: 10px; padding-top: 10px; }
  .row { min-height: 200px; }
  .three { min-height: 112px; }
  .headline h1 { font-size: 21px; }
  .firms-card { padding-top: 8px; padding-bottom: 8px; }
  .firm { padding: 7px 10px; gap: 6px; }
}

/* Ince, koyu kaydirma cubuklari */
.list-body, .firms, .main { scrollbar-width: thin; scrollbar-color: #23406F transparent; }
.list-body::-webkit-scrollbar, .firms::-webkit-scrollbar, .main::-webkit-scrollbar { width: 6px; height: 6px; }
.list-body::-webkit-scrollbar-thumb, .firms::-webkit-scrollbar-thumb, .main::-webkit-scrollbar-thumb { background: #23406F; border-radius: 3px; }

/* =====================================================
   SOL MENU DA TEK EKRANA SIGAR
   Menu, ana ekranla ayni yukseklikte durur. Lisans karti ve
   kullanici karti her zaman gorunur; menu maddeleri sigmazsa
   sadece menu listesi kendi icinde kayar.
   ===================================================== */
@media (min-width: 1100px) and (min-height: 560px) {
  .sidebar-inner { height: 100vh; overflow: hidden; }
  .nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #23406F transparent; }
  .nav::-webkit-scrollbar { width: 6px; }
  .nav::-webkit-scrollbar-thumb { background: #23406F; border-radius: 3px; }
  .brand, .role-title, .license, .user-card { flex: none; }
}
/* Alcak ekranlar: menu ve ana ekran birlikte sikilasir */
@media (min-width: 1100px) and (min-height: 560px) and (max-height: 780px) {
  .brand { padding: 12px 18px; }
  .brand-logo { width: 34px; height: 34px; }
  .role-title { padding: 10px 14px 4px; }
  .nav { padding-bottom: 8px; }
  .nav > a, .nav-group > button { min-height: 34px; font-size: 13px; }
  .license { margin: 0 12px 10px; padding: 10px 12px; gap: 6px; }
  .user-card { padding: 10px 16px; }
  .avatar { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
}
@media (min-width: 1100px) and (min-height: 560px) and (max-height: 690px) {
  .main { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .row { min-height: 180px; }
  .three { min-height: 96px; }
  .headline h1 { font-size: 19px; }
  #headlineSub { font-size: 12px; }
  .search, .btn-primary { height: 34px; }
  .clock { height: 30px; }
  .nav > a, .nav-group > button { min-height: 31px; }
  .license-note { display: none; }
  .role-title { padding: 8px 14px 2px; }
  .foot { display: none; }
}

/* =====================================================
   ORTAK PARCALAR (Modul 6)
   ===================================================== */
a.brand { color: inherit; text-decoration: none; }
.nav-link { color: var(--text-2) !important; }
.nav-link:hover { background: rgba(29, 79, 184, 0.15); }
.nav-kids a.kid-active { color: #FFFFFF; font-weight: 600; background: rgba(29, 79, 184, 0.22); border-radius: 0 8px 8px 0; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: none;
}
.btn-ghost:hover { border-color: #3B73E0; color: #FFFFFF; background: rgba(29, 79, 184, 0.15); }
.btn-danger {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid #7A2B3C; border-radius: 9px; background: #3A1622; color: #FFB3BE;
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.btn-danger:hover { background: #4D1B2C; color: #FFFFFF; }
.btn-ghost:disabled, .btn-danger:disabled, .btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.confirm-box { max-width: 420px; }
.confirm-box p { margin: 0 0 16px; color: var(--text); font-size: 14px; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-actions .btn-primary { height: 34px; font-size: 12.5px; padding: 0 14px; }

/* Ana ekrandaki tiklanabilir satirlar ve kartlar (Modul 7) */
a.alert-row, a.firm, a.sr-item { text-decoration: none; color: var(--text); }
a.alert-row:hover .grow { color: #B9D6FF; }
a.firm:hover { border-color: #3B73E0; }
a.sr-item { cursor: pointer; }
#headlineSub a { color: inherit; text-decoration: none; }
#headlineSub a:hover { text-decoration: underline; }

/* Sifremi degistir penceresi ve kullanici karti (Modul 10) */
.user-card { gap: 8px; }
.user-card .avatar { margin-right: 2px; }
.user-card .logout-btn { width: 30px; height: 30px; }
.pw-modal { max-width: 400px; }
.pw-modal h2 { margin: 0 0 12px; font-size: 16px; color: var(--text); }
.pw-modal form { display: flex; flex-direction: column; gap: 10px; }
.pw-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-3); }
.pw-field em { font-style: normal; color: var(--muted); }
.pw-field input {
  height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #08101F;
  color: var(--text); font: inherit; font-size: 13px; outline: none;
}
.pw-field input:focus { border-color: #3B73E0; box-shadow: 0 0 0 3px rgba(59, 115, 224, 0.22); }
.pw-error { padding: 8px 11px; border: 1px solid #5A2433; border-radius: 9px; background: #2A1018; color: #FFB3BE; font-size: 12.5px; }
.pw-note { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* =====================================================
   Dil secici: sag ust kosede TR | EN (0.15.0)
   ===================================================== */
.lang-switch {
  display: inline-flex; align-items: center; height: 34px; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 22, 43, 0.8); flex: none;
}
.lang-switch button {
  height: 26px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent;
  color: var(--muted); font: inherit; font-family: 'Geist Mono', monospace; font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer;
}
.lang-switch button:hover:not([aria-pressed="true"]) { color: var(--text); background: #12264A; }
.lang-switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, #2F6BFF, #2456D6); color: #fff; box-shadow: 0 0 10px rgba(47, 107, 255, 0.45); cursor: default;
}
.lang-switch button:disabled { opacity: 0.7; }
.lang-switch-fixed { position: fixed; top: 16px; right: 16px; z-index: 50; }
/* Iki dilde ayri yazilmis bloklar: sadece secili dildeki gorunur */
html:not([lang="en"]) .only-en { display: none !important; }
html[lang="en"] .only-tr { display: none !important; }

/* ===================================================== */
/* Olağandışı Ağ Hareketi karti (Genel Bakış, 0.17.0)    */
/* ===================================================== */
.netalert-card {
  margin: 0 0 18px; border-radius: 16px; padding: 16px 18px;
  background: linear-gradient(180deg, #2A1016, #1C0E13);
  border: 1px solid #6A2230; box-shadow: 0 10px 30px rgba(120,20,40,.2), inset 0 0 0 1px rgba(255,80,110,.05);
  animation: netalert-pulse 2.4s ease-in-out infinite;
}
@keyframes netalert-pulse {
  0%, 100% { border-color: #6A2230; }
  50% { border-color: #A6384C; }
}
.netalert-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.netalert-icon { color: #FF6B7D; flex: none; margin-top: 1px; }
.netalert-head-text h2 { margin: 0; font-size: 16px; font-weight: 700; color: #FFD3D9; letter-spacing: .2px; }
.netalert-head-text p { margin: 3px 0 0; font-size: 13px; color: #E7A9B2; line-height: 1.45; }
.netalert-list { display: flex; flex-direction: column; gap: 8px; }
.netalert-row {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: rgba(255,80,110,.06); border: 1px solid #5A1E2A; border-radius: 11px;
  padding: 10px 14px; transition: background .15s, border-color .15s, transform .06s;
}
.netalert-row:hover { background: rgba(255,80,110,.13); border-color: #8A3040; transform: translateX(2px); }
.netalert-dot { width: 9px; height: 9px; border-radius: 50%; background: #FF4D6A; box-shadow: 0 0 8px #FF4D6A; flex: none; }
.netalert-host { font-weight: 600; color: #FFE4E8; font-size: 14px; }
.netalert-amount { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: #FFB3BE; font-weight: 600; }
.netalert-tenant { color: #C58A93; font-size: 12.5px; margin-left: auto; }
.netalert-go { color: #FF9AA8; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
  .netalert-tenant { display: none; }
  .netalert-row { flex-wrap: wrap; gap: 8px; }
}

/* Cihaz sayfasi ag trafigi karti (0.17.0) */
.net-card .net-totals { display: flex; align-items: center; font-size: 13px; font-weight: 600; white-space: nowrap; }
.net-card #netYAxis span { font-size: 10px; }

/* ===================================================== */
/* Uç Beyi nabız logosu (sol menü, 0.18.0)                */
/* ===================================================== */
.brand-text strong { letter-spacing: .3px !important; font-weight: 800; }
.brand-text span { font-size: 8.6px !important; letter-spacing: 1.6px !important; color: #2EE6A6 !important; font-weight: 600; }
.ub-logo { --ub-a: #2EE6A6; --ub-b: #1E7BD8; --ub-node: #2EE6A6; --ub-glow: rgba(46,230,166,.35);
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; transition: transform .5s ease, filter .5s ease; }
.ub-logo svg { overflow: visible; }
.ub-rot { transform-origin: 50px 50px; transform-box: view-box; transition: transform 1.4s cubic-bezier(.65,0,.35,1); }
.ub-hex { fill: none; stroke: var(--ub-b); stroke-width: 4; opacity: .5; transition: stroke .5s; }
.ub-spoke { stroke: var(--ub-b); stroke-width: 5.5; stroke-linecap: round; fill: none; transition: stroke .5s; }
.ub-node { fill: var(--ub-node); transition: fill .5s; }
.ub-core { fill: #fff; filter: drop-shadow(0 0 4px var(--ub-glow)); }
.ub-halo { fill: var(--ub-a); opacity: 0; transform-origin: 50px 50px; transform-box: view-box; }
/* Zayif sinyaller: birkac saniyede bir merkezden uclara */
.ub-sig { fill: #fff; opacity: 0; animation: ubSig 3.6s ease-out infinite; }
@keyframes ubSig {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: .38; }
  70% { opacity: .38; }
  85%, 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
/* Guclu sinyal: parlak + merkez halkasi */
.ub-strong .ub-sig { animation: ubSigStrong 1.4s ease-out 1; }
@keyframes ubSigStrong {
  0% { transform: translate(0, 0); opacity: 0; r: 3.4; }
  10% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
.ub-strong .ub-halo { animation: ubHalo 1.2s ease-out 1; }
@keyframes ubHalo { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.2); } }
.ub-strong .ub-node { animation: ubNode 1.6s ease-out 1; }
@keyframes ubNode { 0%, 55% { fill: var(--ub-node); } 70% { fill: #E6FFF6; } 100% { fill: var(--ub-node); } }
/* Kritik alarm: buyur, kirmizimsi turuncu, 30 sn surekli doner */
.ub-logo.ub-alarm { --ub-a: #FF7A45; --ub-b: #FF4D4D; --ub-node: #FF8A3D; --ub-glow: rgba(255,90,60,.7);
  transform: scale(1.18); filter: drop-shadow(0 0 10px rgba(255,90,60,.65)); }
.ub-alarm .ub-rot { animation: ubSpin 2.2s linear infinite; transition: none; }
@keyframes ubSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.ub-alarm .ub-sig { animation: ubSigStrong 1.1s ease-out infinite; }
.ub-alarm .ub-halo { animation: ubHalo 1.1s ease-out infinite; }
.ub-alarm .ub-core { fill: #FFE7DC; }
a.brand.brand-alarm { cursor: pointer; }
a.brand.brand-alarm .brand-text span { color: #FF8A3D !important; }
@media (prefers-reduced-motion: reduce) {
  .ub-sig, .ub-strong .ub-sig, .ub-alarm .ub-sig, .ub-halo { animation: none !important; opacity: 0 !important; }
  .ub-rot, .ub-alarm .ub-rot { animation: none !important; transition: none !important; }
  .ub-logo.ub-alarm { transform: none; }
}

/* Ag trafigi: normal durumda tek satirlik, lacivert, sakin serit */
.netalert-card.netcard-ok { background: var(--panel); border-color: var(--line, #1B2A47); animation: none; box-shadow: none;
  padding: 7px 14px; margin: 0; border-radius: 12px; }
.netcard-ok .netalert-head { align-items: center; margin: 0; gap: 10px; min-width: 0; }
.netcard-ok .netalert-icon { color: #2EE6A6; margin: 0; display: flex; }
.netcard-ok .netalert-icon svg { width: 17px; height: 17px; }
.netcard-ok .netalert-head-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 auto; }
.netcard-ok .netalert-head-text h2 { color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.netcard-ok .netalert-head-text p { margin: 0; color: var(--text-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.netcard-ok .netalert-head-text p b { color: var(--text-2); font-weight: 600; }
.netcard-ok .netalert-head-text p .mono { color: var(--text-2); }
.net-sep { color: #3A4C6E; margin: 0 2px; }
.netcard-ok .net-total { color: var(--text-3); font-size: 12px; }
.net-more { flex: none; height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid #23406F; background: transparent; color: var(--text-3);
  font: inherit; font-size: 12px; cursor: pointer; }
.net-more:hover { color: var(--text); border-color: #2F6BFF; }
.netcard-ok .netalert-list { display: none; }
.netcard-ok.net-open .netalert-list { display: flex; margin-top: 8px; }
.netalert-head { position: relative; }
.net-total { margin-left: auto; font-size: 12.5px; color: #8FBFAE; white-space: nowrap; align-self: center; }
.netcard-alert .net-total { color: #E7A9B2; }
.nettop { display: flex; flex-direction: column; gap: 6px; }
.nettop-row { display: grid; grid-template-columns: 170px 1fr 90px 160px; align-items: center; gap: 12px; padding: 5px 12px; border-radius: 9px;
  text-decoration: none; color: inherit; background: rgba(47,107,255,.05); border: 1px solid #1B2A47; transition: background .15s; }
.nettop-row:hover { background: rgba(47,107,255,.12); }
.nettop-host { font-weight: 600; font-size: 13px; color: var(--text); }
.nettop-bar { height: 6px; background: rgba(255,255,255,.06); border-radius: 3px; overflow: hidden; }
.nettop-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1E7BD8, #2EE6A6); border-radius: 3px; }
.nettop-val { font-size: 12.5px; color: var(--text-2); text-align: right; }
.nettop-tenant { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .nettop-row { grid-template-columns: 1fr 80px; } .nettop-bar, .nettop-tenant { display: none; } }
