/* ==========================================================================
   DARK PARADISE — Tema
   Simsiyah zemin · beyaz monokrom tipografi · logodaki mavi-mor parıltı vurgu
   ========================================================================== */

:root {
  --bg: #050507;
  --bg-raise: #0b0b10;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.075);
  --border: rgba(255, 255, 255, 0.065);
  --border-2: rgba(255, 255, 255, 0.11);
  --border-3: rgba(255, 255, 255, 0.18);

  --text: #f4f4f6;
  --text-2: #a4a4ae;
  --text-3: #65656f;

  --accent: #93a0ff;
  --accent-strong: #6b7bff;
  --accent-soft: rgba(147, 160, 255, 0.11);
  --accent-line: rgba(147, 160, 255, 0.24);
  --accent-glow: rgba(107, 123, 255, 0.45);

  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.11);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.11);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.11);
  --info: #93a0ff;
  --info-soft: rgba(147, 160, 255, 0.11);

  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 6px;

  --sidebar-w: 256px;
  --sidebar-w-collapsed: 78px;
  --topbar-h: 64px;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  color-scheme: dark;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

/* Atmosfer: üstte mavi-mor ışık + silik ızgara */
body::before, body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  will-change: transform; transform: translateZ(0); /* ayrı katman: scroll'da yeniden çizilmez */
}
body::before {
  background:
    radial-gradient(900px 520px at 18% -12%, rgba(91, 108, 255, 0.11), transparent 62%),
    radial-gradient(700px 420px at 100% -5%, rgba(147, 160, 255, 0.05), transparent 60%);
}
body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 85% 60% at 50% 0%, #000 25%, transparent 75%);
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: rgba(147, 160, 255, 0.28); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); background-clip: padding-box; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.1) transparent; }

.hidden { display: none !important; }
.mono-text { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); letter-spacing: -0.01em; }
.text-muted { color: var(--text-3); }
.flex-1 { flex: 1; min-width: 0; }

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(13, 13, 19, 0.94), rgba(7, 7, 10, 0.94));

  border-right: 1px solid var(--border);
  transition: width 0.3s var(--ease), transform 0.3s var(--ease);
}

.sidebar-header {
  display: flex; align-items: center; gap: 10px;
  height: 72px; padding: 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.brand-logo {
  position: relative; width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 11px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--accent-line), 0 0 22px -4px var(--accent-glow);
  animation: logoGlow 4s ease-in-out infinite alternate;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; }
@keyframes logoGlow {
  from { box-shadow: 0 0 0 1px var(--accent-line), 0 0 16px -6px var(--accent-glow); }
  to   { box-shadow: 0 0 0 1px rgba(147, 160, 255, 0.4), 0 0 30px -2px var(--accent-glow); }
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-title {
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  background: linear-gradient(180deg, #fff, #c4c6d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sidebar-sub { font-size: 11px; color: var(--text-3); white-space: nowrap; letter-spacing: 0.02em; }
.sidebar-toggle-btn {
  display: none; place-items: center;
  width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0;
  color: var(--text-3); border: 1px solid var(--border);
  transition: color 0.2s, background 0.2s;
}
.sidebar-toggle-btn:hover { color: var(--text); background: var(--surface-2); }

.sidebar-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-section {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); padding: 16px 12px 8px; white-space: nowrap;
}
.nav-section:first-child { padding-top: 6px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.nav-item i { width: 18px; text-align: center; font-size: 14px; color: var(--text-3); flex-shrink: 0; transition: color 0.2s, filter 0.2s; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item:hover i { color: var(--text-2); }
.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(147, 160, 255, 0.14), rgba(147, 160, 255, 0.025));
  box-shadow: inset 0 0 0 1px rgba(147, 160, 255, 0.13);
}
.nav-item.active i { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.nav-item.active::before {
  content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.sidebar-footer { padding: 12px; border-top: 1px solid var(--border); flex-shrink: 0; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.user-avatar, .user-avatar-placeholder {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  box-shadow: 0 0 0 1px var(--border-2);
}
.user-avatar-placeholder { display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); font-size: 12px; }
.user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-id { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn {
  display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--radius-sm); color: var(--text-3); font-size: 13px;
  transition: color 0.2s, background 0.2s;
}
.logout-btn:hover { color: var(--danger); background: var(--danger-soft); }
.sidebar-sign { margin-top: 10px; text-align: center; font-size: 10.5px; color: var(--text-3); letter-spacing: 0.04em; white-space: nowrap; }
.sidebar-sign b { color: var(--text-2); font-weight: 600; }

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }

/* Masaüstünde daraltılmış sidebar */
@media (min-width: 861px) {
  .sidebar.collapsed { width: var(--sidebar-w-collapsed); }
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .nav-item span,
  .sidebar.collapsed .user-meta,
  .sidebar.collapsed .sidebar-sign { display: none; }
  .sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; }
  .sidebar.collapsed .brand { flex: 0; }
  .sidebar.collapsed .nav-section { font-size: 0; padding: 10px 0 6px; }
  .sidebar.collapsed .nav-section::after { content: ''; display: block; height: 1px; margin: 0 14px; background: var(--border); }
  .sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
  .sidebar.collapsed .user-card { flex-direction: column; padding: 8px 0; gap: 8px; background: none; border: none; }
}

/* ─── Main & Topbar ─────────────────────────────────────────────────────── */
.main-wrapper {
  position: relative; z-index: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left 0.3s var(--ease);
}
.main-wrapper.collapsed { margin-left: var(--sidebar-w-collapsed); }

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px;
  background: rgba(7, 7, 10, 0.97);

  border-bottom: 1px solid var(--border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 14px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-2); }
.icon-btn.active { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }

.breadcrumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; }
.breadcrumb i { color: var(--accent); font-size: 13px; }
.crumb-root { color: var(--text-3); font-weight: 500; }
.breadcrumb .crumb-sep { color: var(--text-3); font-size: 9px; }

.bot-status {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); }
.status-dot.online { background: var(--success); box-shadow: 0 0 10px var(--success); }
.status-dot.online::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--success); animation: ping 2s var(--ease) infinite;
}
.status-dot.connecting { background: var(--warning); animation: blink 1.2s ease-in-out infinite; }
.status-dot.offline { background: var(--danger); }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes blink { 50% { opacity: 0.3; } }

.notif-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: 9px; border: 2px solid var(--bg);
  background: var(--accent-strong); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Bildirim paneli (zil) */
.notif-wrap { position: relative; }
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 120;
  width: 360px; max-width: calc(100vw - 24px);
  background: rgba(13, 13, 19, 0.97);

  border: 1px solid var(--border-2); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right;
  pointer-events: none; visibility: hidden;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.notif-panel.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600;
}
.text-btn { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 4px 8px; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.text-btn:hover { color: var(--text); background: var(--surface-2); }
.notif-prefs { padding: 6px 16px; border-bottom: 1px solid var(--border); }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.pref-row i { width: 16px; color: var(--text-3); margin-right: 6px; }
.notif-history { max-height: 340px; overflow-y: auto; padding: 6px; }
.history-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; transition: background 0.15s; }
.history-item:hover { background: var(--surface-2); }
.history-item img, .history-icon { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.history-icon { display: grid; place-items: center; background: var(--warning-soft); color: var(--warning); font-size: 12px; }
.history-content { min-width: 0; flex: 1; }
.history-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.history-body { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-time { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.history-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; color: var(--text-3); font-size: 12.5px; }
.history-empty i { font-size: 18px; opacity: 0.5; }

/* ─── Sayfa ─────────────────────────────────────────────────────────────── */
.page-content { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 28px; }
.page-footer { padding: 8px 28px 28px; text-align: center; font-size: 11.5px; color: var(--text-3); letter-spacing: 0.03em; }
.page-footer b { color: var(--text-2); font-weight: 600; }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.page-title {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.3; padding-bottom: 2px;
  background: linear-gradient(180deg, #ffffff 30%, #b4b6c6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-subtitle { display: block; margin-top: 5px; font-size: 13px; color: var(--text-3); }
.page-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
}
.page-actions .toggle-label { margin-right: 6px; }

/* ─── Kart ──────────────────────────────────────────────────────────────── */
.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: border-color 0.25s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
}
.card:hover { border-color: var(--border-2); }
.card-header {
  display: flex; align-items: center; gap: 8px;
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.card-header > i, .card-header > span > i { color: var(--text-3); margin-right: 6px; font-size: 12.5px; }
.card-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 500; color: var(--text-3);
  transition: color 0.2s, background 0.2s;
}
.card-link i { font-size: 10px; margin: 0 !important; color: inherit !important; }
.card-link:hover { color: var(--text); background: var(--surface-2); }
.card-body { padding: 14px 18px; }
.card-desc { font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; }

/* ─── İstatistik ────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 22px;
}
a.stat-card { color: inherit; }
.stat-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.stat-card::after {
  content: ''; position: absolute; width: 150px; height: 150px; right: -60px; top: -70px; pointer-events: none;
  background: radial-gradient(circle, rgba(147, 160, 255, 0.16), transparent 70%);
  opacity: 0.55; transition: opacity 0.3s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: 0 16px 36px -16px rgba(0, 0, 0, 0.9); }
.stat-card:hover::after { opacity: 1; }
.stat-icon {
  width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: var(--radius); font-size: 15px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(147, 160, 255, 0.16);
}
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stat-sub { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub b { color: var(--success); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ─── Dashboard listeleri ───────────────────────────────────────────────── */
.header-meta { display: flex; align-items: center; gap: 12px; }
.header-meta .live-indicator { margin-left: 0; }
.last-update { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.dash-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-row > :only-child { grid-column: 1 / -1; }
.dash-row.quad { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-scroll { height: 480px; overflow-y: auto; padding: 2px 6px 6px; overscroll-behavior: contain; }
.dash-row.quad .card-scroll { height: 380px; }
.card-scroll > .empty-state, .card-scroll > .loading-state { height: 100%; }
.count-chip {
  padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.count-chip:empty { display: none; }

.ev-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 10px; border-bottom: 1px solid var(--border); transition: background 0.15s; }
.ev-row:last-child { border-bottom: none; }
.ev-row:hover { background: rgba(255, 255, 255, 0.022); }
.ev-row.compact { align-items: center; padding: 10px; gap: 10px; }
.ev-avatar, .ev-icon { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.ev-avatar { object-fit: cover; box-shadow: 0 0 0 1px var(--border-2); }
.ev-avatar.sm, .ev-icon.sm { width: 30px; height: 30px; }
.ev-avatar.xs { width: 26px; height: 26px; }
.ev-icon { display: grid; place-items: center; font-size: 13px; color: var(--danger); background: var(--danger-soft); }
.ev-icon.sm { font-size: 11px; }
.ev-icon.feed-yargi, .ev-icon.feed-warning { color: var(--warning); background: var(--warning-soft); }
.ev-icon.feed-success { color: var(--success); background: var(--success-soft); }
.ev-icon.feed-info { color: var(--info); background: var(--info-soft); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ev-name { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
a.ev-name { transition: color 0.15s; }
a.ev-name:hover { color: var(--accent); }
.ev-target { font-size: 13px; font-weight: 500; color: var(--text); }
.ev-arrow { font-size: 10px; color: var(--text-3); }
.ev-id {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 6px; border-radius: 5px; border: 1px solid transparent;
  font-family: var(--mono); font-size: 11px; color: var(--text-3); cursor: copy;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.ev-id i { font-size: 9.5px; opacity: 0; transition: opacity 0.15s; }
.ev-id:hover { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.ev-id:hover i { opacity: 1; }
.ev-cmd {
  display: block; max-width: 100%; padding: 7px 10px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.ev-mention { padding: 0 4px; border-radius: 4px; color: var(--accent); background: var(--accent-soft); font-weight: 500; white-space: nowrap; }
a.ev-mention:hover { background: rgba(147, 160, 255, 0.22); color: #fff; }
.ev-mention.m-r { color: #f0abfc; background: rgba(240, 171, 252, 0.1); }
.ev-mention.m-c { color: var(--text); background: var(--surface-3); }
.ev-mention.m-all { color: var(--warning); background: var(--warning-soft); }
.d-emoji { width: 1.45em; height: 1.45em; vertical-align: -0.35em; object-fit: contain; display: inline-block; }
.ev-text { font-size: 12.5px; color: var(--text-2); line-height: 1.55; word-break: break-word; }
.ev-text b { color: var(--text); font-weight: 600; }
.ev-text a { color: var(--text); font-weight: 500; }
.ev-text a:hover { color: var(--accent); }
.ev-text code { font-family: var(--mono); font-size: 11.5px; padding: 1px 5px; border-radius: 4px; background: var(--surface-3); color: var(--text); }
.ev-reason {
  padding: 6px 10px; border-radius: 0 8px 8px 0;
  border-left: 2px solid var(--accent-line); background: rgba(147, 160, 255, 0.04);
  font-size: 12px; color: var(--text-2); word-break: break-word;
}
.ev-reason b { color: var(--text-3); font-weight: 500; }
.ev-changes { font-size: 11.5px; color: var(--text-2); line-height: 1.6; word-break: break-word; }
.ev-sep { margin: 0 7px; color: var(--text-3); }
.ev-kv { color: var(--text); font-weight: 500; }
.ev-kv em { font-style: normal; font-weight: 400; color: var(--text-3); margin-right: 5px; }
.ev-time {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 11.5px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ev-time small { font-size: 10.5px; color: var(--text-3); }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; }
.rank-row .rank-num { width: 18px; text-align: right; }
.rank-row:first-child .rank-num { color: var(--accent); }
.rank-body { flex: 1; min-width: 0; }
.rank-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rank-top .ev-name { font-size: 12.5px; font-weight: 500; }
.rank-count { font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.rank-bar { height: 4px; margin-top: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rank-bar span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }

@media (max-width: 1280px) {
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .dash-row.quad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dash-row.quad { grid-template-columns: minmax(0, 1fr); }
  .card-scroll { height: 420px; }
  .dash-row.quad .card-scroll { height: auto; max-height: 360px; }
  .last-update { display: none; }
  .ev-row { gap: 10px; padding: 12px 6px; }
}

.rank-num { flex-shrink: 0; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: var(--text-3); }

.live-indicator { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--success); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); animation: blink 1.6s ease-in-out infinite; }

/* ─── Araç çubuğu & form ────────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar-filters { display: flex; align-items: center; gap: 12px; }
.result-count { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; padding: 0 4px; }

.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; transition: color 0.2s; }
.search-box input {
  width: 100%; height: 42px; padding: 0 14px 0 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13.5px; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-box input::placeholder { color: var(--text-3); }
.search-box input:focus { border-color: rgba(147, 160, 255, 0.45); background: var(--surface-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-box:focus-within > i { color: var(--accent); }
.search-box.large input { height: 50px; font-size: 15px; padding-left: 44px; border-radius: 14px; }
.search-box.large > i { left: 16px; font-size: 14px; }

.filter-select {
  height: 42px; padding: 0 38px 0 14px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2365656f' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; color: var(--text); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-select:hover { border-color: var(--border-2); }
.filter-select:focus { border-color: rgba(147, 160, 255, 0.45); box-shadow: 0 0 0 4px var(--accent-soft); }
.filter-select option { background: var(--bg-raise); color: var(--text); }

.filter-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-2); user-select: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent-strong); width: 15px; height: 15px; cursor: pointer; }

.form-group { margin-bottom: 16px; }
.form-group > label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.input-wrapper {
  position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input-wrapper:hover { border-color: var(--border-2); }
.input-wrapper:focus-within { border-color: rgba(147, 160, 255, 0.45); background: var(--surface-2); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-icon { position: absolute; left: 14px; color: var(--text-3); font-size: 12.5px; pointer-events: none; transition: color 0.2s; }
.input-wrapper:focus-within .input-icon { color: var(--accent); }
.input-wrapper input {
  flex: 1; width: 100%; height: 44px; padding: 0 14px 0 40px;
  background: transparent; border: none; font-size: 13.5px; color: var(--text);
}
.input-wrapper input::placeholder { color: var(--text-3); }
.input-wrapper input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px #0d0d12 inset;
  transition: background-color 9999s;
}
.pw-toggle { height: 44px; padding: 0 14px; color: var(--text-3); font-size: 13px; flex-shrink: 0; transition: color 0.2s; }
.pw-toggle:hover { color: var(--text); }
.input-hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.input-row { display: flex; gap: 8px; align-items: center; }

/* ─── Butonlar ──────────────────────────────────────────────────────────── */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.btn-primary {
  background: linear-gradient(180deg, #ffffff, #d8d9e4); color: #07070a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 24px -10px rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 30px -10px rgba(255, 255, 255, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary i { font-size: 12px; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-3); }
.btn-ghost i { font-size: 12px; }

.btn-icon, .btn-icon-sm {
  display: inline-grid; place-items: center; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.btn-icon { width: 44px; height: 44px; border-radius: var(--radius); font-size: 13px; }
.btn-icon-sm { width: 32px; height: 32px; border-radius: var(--radius-sm); font-size: 12px; }
.btn-icon:hover, .btn-icon-sm:hover { color: var(--text); background: var(--surface-3); border-color: var(--border-2); }
.btn-danger-sm:hover { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.3); }
.action-btns { display: flex; gap: 6px; }

/* ─── Tablo ─────────────────────────────────────────────────────────────── */
.table-container {
  position: relative; overflow: auto; margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; min-width: 680px; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.data-table thead th {
  position: sticky; top: 0; z-index: 1;
  padding: 12px 16px; text-align: left; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-3);
  background: rgba(11, 11, 15, 0.96); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.loading-cell, .empty-cell { text-align: center; padding: 48px 16px !important; color: var(--text-3); font-size: 13px; }

.table-row-animate { animation: rowIn 0.35s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.row-highlight { animation: rowGlow 2.2s var(--ease); }
@keyframes rowGlow {
  0% { background: rgba(147, 160, 255, 0.16); box-shadow: inset 3px 0 0 var(--accent); }
  100% { background: transparent; box-shadow: inset 3px 0 0 transparent; }
}

.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-cell > span { color: var(--text); font-weight: 500; }
.user-cell > div { min-width: 0; }
.user-cell > div > span { display: block; }
.user-cell > div > span:first-child { color: var(--text); font-weight: 500; }
.table-avatar, .table-avatar-placeholder { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; object-fit: cover; box-shadow: 0 0 0 1px var(--border-2); }
.table-avatar-placeholder { display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); font-size: 11px; }
.time-cell { font-size: 12px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.command-text { font-family: var(--mono); font-size: 12px; color: var(--text); padding: 3px 7px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); }
.target-name { color: var(--text); font-weight: 500; }
.reason-text { display: block; max-width: 260px; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-text { display: block; margin-top: 4px; font-size: 12px; color: var(--text-2); }
.changes-cell { max-width: 340px; }
.change-row { font-size: 11.5px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.change-key { font-family: var(--mono); color: var(--text-3); }
.change-before { color: var(--danger); }
.change-after { color: var(--success); }
.extra-row .change-after { color: var(--info); }

/* ─── Rozetler ──────────────────────────────────────────────────────────── */
.channel-badge, .mini-badge, .activity-badge, .action-badge, .duration-badge,
.badge-admin, .badge-custom, .badge-added, .badge-removed, .badge-deleted,
.badge-edited, .badge-live, .status-pill, .bot-badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: var(--radius-xs);
  font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
  border: 1px solid transparent; vertical-align: middle;
}
.channel-badge, .mini-badge, .activity-badge, .badge-custom { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.mini-badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }
.activity-badge i { font-size: 10px; }
.activity-message { color: var(--info); background: var(--info-soft); border-color: rgba(147, 160, 255, 0.18); }
.activity-voice_join, .activity-role_added { color: var(--success); background: var(--success-soft); border-color: rgba(74, 222, 128, 0.18); }
.activity-voice_leave, .activity-role_removed { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.18); }
.activity-voice_move, .activity-nickname_change, .activity-voice_state_change { color: var(--warning); background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.18); }
.action-danger, .badge-removed, .badge-deleted { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.2); }
.action-success, .badge-added { color: var(--success); background: var(--success-soft); border-color: rgba(74, 222, 128, 0.2); }
.action-warning, .badge-edited { color: var(--warning); background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.2); }
.action-info { color: var(--info); background: var(--info-soft); border-color: rgba(147, 160, 255, 0.2); }
.duration-badge { font-family: var(--mono); color: var(--warning); background: var(--warning-soft); }
.badge-admin { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.badge-deleted, .badge-edited { height: 19px; padding: 0 6px; font-size: 10px; }
.badge-live { height: 18px; padding: 0 6px; font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--success); background: var(--success-soft); }
.badge-live::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: blink 1.4s ease-in-out infinite; }
.status-pill { border-radius: 999px; }
.status-pill.active { color: var(--success); background: var(--success-soft); }
.status-pill.inactive { color: var(--danger); background: var(--danger-soft); }
.bot-badge { height: 17px; padding: 0 5px; margin-left: 6px; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* ─── Sayfalama ─────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 18px; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-grid; place-items: center;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  font-size: 12.5px; font-weight: 500; font-variant-numeric: tabular-nums;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.page-btn:hover:not(:disabled):not(.active) { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.page-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; cursor: default; }
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-btn i { font-size: 10px; }
.page-ellipsis { color: var(--text-3); padding: 0 2px; }

/* ─── Toggle ────────────────────────────────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border-2);
  transition: background 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.toggle-slider::before {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #8a8a95; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s var(--ease), background 0.25s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-strong); border-color: var(--accent); box-shadow: 0 0 16px -2px var(--accent-glow); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }
.toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle-label { font-size: 12.5px; color: var(--text-2); }

/* ─── Ayarlar ───────────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.settings-toggles { display: flex; flex-direction: column; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.toggle-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toggle-name { font-size: 13px; font-weight: 600; color: var(--text); }
.toggle-desc { font-size: 12px; color: var(--text-3); }
.bot-status-card { padding: 4px 0; }
.status-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; }
.bot-user { font-size: 12.5px; color: var(--text-2); }

/* ─── Chat ──────────────────────────────────────────────────────────────── */
.chat-container {
  min-height: 320px;
  padding: 8px; margin-bottom: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.chat-msg { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--radius); transition: background 0.15s; }
.chat-msg:hover { background: var(--surface-2); }
.chat-msg + .chat-msg { margin-top: 2px; }
.chat-msg-deleted { background: linear-gradient(90deg, rgba(248, 113, 113, 0.07), transparent 60%); box-shadow: inset 2px 0 0 rgba(248, 113, 113, 0.6); }
.chat-msg-deleted .chat-text { color: #fca5a5; text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, 0.45); }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border-2); }
.chat-content { flex: 1; min-width: 0; }
.chat-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.chat-author { font-size: 13.5px; font-weight: 600; color: var(--text); }
.chat-id { font-family: var(--mono); font-size: 10.5px; color: var(--text-3); }
.chat-time { margin-left: auto; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chat-text { font-size: 13.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.chat-header .ev-id { padding: 1px 5px; }
.chat-msg-deleted .msg-thumb { outline: 1px solid rgba(248, 113, 113, 0.35); }

/* Mesaj ekleri */
.msg-files { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.msg-media { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-thumb {
  position: relative; overflow: hidden; width: 220px; max-width: 100%; aspect-ratio: 16 / 10;
  border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-raise); cursor: zoom-in;
}
.msg-thumb img, .msg-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.msg-thumb:hover img, .msg-thumb:hover video { transform: scale(1.04); }
.msg-file-list { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-file-list .file-chip i { color: var(--accent); }
.file-chip.is-missing { opacity: 0.6; cursor: help; }
.file-chip.is-missing i { color: var(--text-3); }
.lightbox-bar { display: flex; align-items: center; gap: 12px; }
.lightbox-name { font-size: 12.5px; color: var(--text-2); max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Tracker ───────────────────────────────────────────────────────────── */
.tracker-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.tracked-users-panel {
  position: sticky; top: calc(var(--topbar-h) + 20px);
  max-height: calc(100vh - var(--topbar-h) - 40px); overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.034), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.panel-header {
  position: sticky; top: 0; z-index: 1;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  background: rgba(12, 12, 16, 0.96);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.tracked-user-item {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 6px; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.tracked-user-item:hover { background: var(--surface-2); }
.tracked-user-item.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tracked-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px var(--border-2); }
.tracked-info { display: flex; flex-direction: column; min-width: 0; }
.tracked-name { font-size: 12.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracked-meta { font-size: 11px; color: var(--text-3); }
.tracker-main { min-width: 0; }

/* ─── Kullanıcı sorgulama ───────────────────────────────────────────────── */
.query-box { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.query-box .search-box { flex: 1; }
.query-box .btn-primary { height: 50px; padding: 0 22px; border-radius: 14px; }
.user-result { animation: rowIn 0.35s var(--ease); }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--border-2), 0 0 24px -6px var(--accent-glow); }
.profile-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.result-tabs {
  display: flex; gap: 4px; width: fit-content; max-width: 100%;
  padding: 4px; margin-bottom: 16px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.tab-btn {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.tab-btn i { font-size: 11.5px; }
.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--text); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-2); }
.tab-btn.active i { color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: rowIn 0.25s var(--ease); }
.stat-pill {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.stat-pill i { color: var(--text-3); }
.stat-pill span { color: var(--text); font-weight: 600; }

/* ─── Admin & modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, rgba(20, 20, 28, 0.98), rgba(11, 11, 15, 0.98));
  border: 1px solid var(--border-2); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); color: var(--text-3); transition: color 0.2s, background 0.2s; }
.modal-close:hover { color: var(--text); background: var(--surface-3); }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--border); }

.perm-options { display: flex; gap: 10px; }
.radio-option {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.radio-option:hover { border-color: var(--border-2); }
.radio-option:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); color: var(--text); }
.radio-option i { color: var(--text-3); margin-right: 4px; }
.radio-option:has(input:checked) i { color: var(--accent); }
.perm-pages { margin-top: 4px; }
.perm-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.page-checkboxes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.checkbox-option {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.checkbox-option:hover { background: var(--surface-2); }
.checkbox-option:has(input:checked) { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.discord-preview {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 12px 14px;
  border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line);
  animation: rowIn 0.3s var(--ease);
}
.preview-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--border-2); }
.preview-name { display: block; font-size: 14px; font-weight: 600; }
.preview-id { font-size: 11px; }

/* ─── Bildirim (toast) ──────────────────────────────────────────────────── */
.notif-container {
  position: fixed; right: 24px; bottom: 24px; z-index: 500;
  display: flex; flex-direction: column-reverse; gap: 10px;
  width: 370px; max-width: calc(100vw - 32px);
  pointer-events: none;
}
.notif-item {
  --tone: var(--accent);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 40px 16px 16px; border-radius: var(--radius-lg);
  background: rgba(15, 15, 21, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.45s var(--ease) both;
}
.notif-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--tone); box-shadow: 0 0 16px var(--tone);
}
.notif-item.yargi, .notif-item.warning { --tone: var(--warning); }
.notif-item.success { --tone: var(--success); }
.notif-item.error { --tone: var(--danger); }
.notif-item.info { --tone: var(--accent); }
.notif-item.removing { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(28px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(28px) scale(0.96); } }
.notif-avatar, .notif-icon { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.notif-avatar { object-fit: cover; box-shadow: 0 0 0 2px var(--tone); }
.notif-icon { display: grid; place-items: center; font-size: 14px; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.notif-content { flex: 1; min-width: 0; padding-top: 1px; }
.notif-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.notif-body { margin-top: 2px; font-size: 12.5px; color: var(--text-2); word-break: break-word; }
.notif-meta { margin-top: 4px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.notif-close {
  position: absolute; top: 10px; right: 10px;
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  color: var(--text-3); font-size: 12px; transition: color 0.2s, background 0.2s;
}
.notif-close:hover { color: var(--text); background: var(--surface-3); }
.notif-progress {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--tone); opacity: 0.75; transform-origin: left;
  animation: toastProgress var(--dur, 6000ms) linear forwards;
}
.notif-item:hover .notif-progress { animation-play-state: paused; }
@keyframes toastProgress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ─── Flash, boş & yükleniyor ───────────────────────────────────────────── */
.flash-msg {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500; border: 1px solid;
  animation: rowIn 0.3s var(--ease); transition: opacity 0.4s;
}
.flash-error { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.25); }
.flash-success { color: var(--success); background: var(--success-soft); border-color: rgba(74, 222, 128, 0.25); }

.empty-state, .loading-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 40px 16px; color: var(--text-3); font-size: 13px; text-align: center;
}
.empty-state i, .loading-state i { font-size: 20px; opacity: 0.55; }
.fa-spin { animation-duration: 0.9s; }

/* ─── Giriş sayfası ─────────────────────────────────────────────────────── */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; overflow: hidden; }
.login-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-rays {
  position: absolute; left: 50%; top: 40%;
  width: 1600px; height: 1600px; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(107, 123, 255, 0.075) 0deg 1.6deg, transparent 1.6deg 12deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 52%);
          mask-image: radial-gradient(circle, #000 0%, transparent 52%);
  animation: spin 160s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.login-glow {
  position: absolute; left: 50%; top: 40%; width: 560px; height: 560px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(91, 108, 255, 0.3), transparent 65%);
  filter: blur(40px);
}
.login-container { position: relative; z-index: 1; width: 100%; max-width: 410px; }
.login-card {
  position: relative; overflow: hidden;
  padding: 40px 34px 28px; border-radius: 24px;
  background: linear-gradient(180deg, rgba(20, 20, 29, 0.82), rgba(9, 9, 13, 0.88));
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.6s var(--ease);
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(147, 160, 255, 0.6), transparent);
}
.login-logo {
  width: 78px; height: 78px; margin: 0 auto 22px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(147, 160, 255, 0.3), 0 0 44px -6px var(--accent-glow);
  animation: logoGlow 4s ease-in-out infinite alternate;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; }
.login-title {
  text-align: center; font-size: 25px; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 30%, #b4b6c6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-subtitle { margin: 6px 0 28px; text-align: center; font-size: 13px; color: var(--text-3); }
.login-form { display: flex; flex-direction: column; }
.btn-login { width: 100%; height: 48px; margin-top: 8px; font-size: 14px; border-radius: 14px; }
.login-footer { margin-top: 26px; text-align: center; font-size: 11.5px; color: var(--text-3); letter-spacing: 0.04em; }
.login-footer span { color: var(--text-2); font-weight: 600; }

/* ─── Duyarlı tasarım ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tracker-layout { grid-template-columns: minmax(0, 1fr); }
  .tracked-users-panel { position: static; max-height: 280px; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.mobile-open { transform: none; }
  .sidebar-toggle-btn { display: grid; }
  .sidebar-backdrop { display: block; }
  .main-wrapper, .main-wrapper.collapsed { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 20px 16px; }
  .page-footer { padding: 4px 16px 24px; }
  .bot-status { padding: 0 12px; }
  .bot-status #statusText { display: none; }
  .crumb-root, .breadcrumb .crumb-sep { display: none; }
  .page-title { font-size: 22px; }
  .page-header { align-items: flex-start; margin-bottom: 18px; }
}

@media (max-width: 560px) {
  html { font-size: 13.5px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .stat-icon { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
  .stat-value { font-size: 21px; }
  .toolbar .search-box { min-width: 100%; }
  .query-box { flex-direction: column; align-items: stretch; }
  .perm-options { flex-direction: column; }
  .page-checkboxes { grid-template-columns: 1fr; }
  .notif-container { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .chat-time { margin-left: 0; width: 100%; }
  .login-card { padding: 32px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================================================
   Moderasyon modülleri: uyarılar, notlar, olay sorgula, komut logları, bildirimler
   ========================================================================== */

@media (max-width: 1180px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-sub b.warn { color: var(--warning); }

/* Hızlı arama */
.quick-search {
  position: relative; display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 16px; margin-bottom: 18px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-2);
  background: linear-gradient(90deg, rgba(147, 160, 255, 0.07), rgba(255, 255, 255, 0.02));
  transition: border-color 0.2s, box-shadow 0.2s;
}
.quick-search:focus-within { border-color: rgba(147, 160, 255, 0.5); box-shadow: 0 0 0 4px var(--accent-soft); }
.quick-search > i { color: var(--accent); }
.quick-search input { flex: 1; min-width: 0; height: 100%; background: none; border: none; font-size: 14px; color: var(--text); }
.quick-search input::placeholder { color: var(--text-3); }
kbd {
  display: inline-block; padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--border-2); border-bottom-width: 2px; background: var(--surface-2);
  font-family: var(--mono); font-size: 10.5px; color: var(--text-2); line-height: 1.3;
}

/* Bildirim zili */
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); }
  45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); }
}
#notifBell.ring i { animation: bellRing 0.9s var(--ease); transform-origin: 50% 0; }
.notif-panel-actions { display: flex; align-items: center; gap: 4px; }
.notif-panel-actions .text-btn.active { color: var(--accent); background: var(--accent-soft); }
.pref-divider { height: 1px; background: var(--border); margin: 6px 0; }
.notif-prefs { max-height: 300px; overflow-y: auto; }
a.history-item { color: inherit; position: relative; }
.history-item.unread { background: rgba(147, 160, 255, 0.06); }
.history-item.unread::after {
  content: ''; position: absolute; top: 14px; right: 10px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}
.history-type { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.history-body { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.t-yargi, .t-punishment { color: var(--warning); }
.t-warning, .t-audit, .t-danger { color: var(--danger); }
.t-note, .t-appeal, .t-info { color: var(--info); }
.t-success { color: var(--success); }
.history-icon.t-yargi, .history-icon.t-punishment { background: var(--warning-soft); }
.history-icon.t-warning, .history-icon.t-audit { background: var(--danger-soft); }
.history-icon.t-note, .history-icon.t-appeal { background: var(--info-soft); }
.notif-item.note, .notif-item.appeal { --tone: var(--accent); }
.notif-item.audit, .notif-item.punishment { --tone: var(--danger); }

/* Satır ekleri */
.action-neutral { color: var(--text-2); background: var(--surface-2); border-color: var(--border); font-family: var(--mono); }
.ev-plain { color: var(--text); font-weight: 500; }
a.ev-plain:hover, a.ev-target:hover { color: var(--accent); }
.ev-title { font-size: 13px; font-weight: 600; color: var(--text); }
.ev-text.muted, .muted { color: var(--text-3); font-size: 11.5px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-link-row { color: inherit; cursor: pointer; }
.ev-row.is-resolved { opacity: 0.6; }
.ev-row.is-appeal { box-shadow: inset 3px 0 0 var(--accent); background: rgba(147, 160, 255, 0.035); }
.ev-row.is-deleted .ev-text { color: #fca5a5; }
.evidence-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 10.5px; color: var(--text-2);
}
.status-pill.pending { color: var(--warning); background: var(--warning-soft); }

/* Uyarı derecesi rozetleri (her zaman metin etiketiyle) */
.sev-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap;
}
.sev-hafif { color: var(--info); background: var(--info-soft); border-color: rgba(147, 160, 255, 0.22); }
.sev-orta { color: var(--warning); background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.22); }
.sev-agir { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.25); }
.sev-son { color: #fff; background: linear-gradient(90deg, #dc2626, #b91c1c); border-color: #ef4444; box-shadow: 0 0 14px -2px rgba(239, 68, 68, 0.55); }
.sev-note { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }

/* ─── Olay Sorgula ─── */
.candidate-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.candidate-title { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.candidate {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}
.candidate:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.candidate-name { flex: 1; font-weight: 600; color: var(--text); }
.big-empty { padding: 80px 16px; }
.big-empty i { font-size: 30px; }

.profile-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 16px; }
.profile-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 200px at 0% 0%, rgba(107, 123, 255, 0.12), transparent 70%);
}
.hero-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--accent-line), 0 0 30px -4px var(--accent-glow);
}
.hero-main { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hero-name-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.hero-name { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.hero-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 1; }

.case-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.case-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.case-stat:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.case-stat i { font-size: 12px; color: var(--accent); margin-bottom: 4px; }
.case-stat-value { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.case-stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tab-count {
  margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--surface-3);
  font-size: 10.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums;
}
.tab-btn.active .tab-count { background: var(--accent-soft); color: var(--accent); }
.card-scroll.tall { height: auto; max-height: 72vh; min-height: 300px; }
.tab-section + .tab-section { margin-top: 10px; border-top: 1px solid var(--border); }
.tab-section-title {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 12px 10px 8px; background: rgba(12, 12, 17, 0.97);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}

/* Zaman çizelgesi */
.timeline { position: relative; padding: 8px 4px 8px 0; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 0; bottom: 0; width: 1px; background: var(--border-2); }
.tl-entry { position: relative; display: flex; gap: 12px; }
.tl-marker {
  position: relative; z-index: 1; flex-shrink: 0; width: 28px; height: 28px; margin: 14px 0 0 8px;
  display: grid; place-items: center; border-radius: 50%; font-size: 11px;
  background: var(--bg-raise); border: 1px solid var(--border-2);
}
.tl-marker.t-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }
.tl-marker.t-warning, .tl-marker.t-yargi { color: var(--warning); border-color: rgba(251, 191, 36, 0.4); }
.tl-marker.t-info { color: var(--info); border-color: var(--accent-line); }
.tl-marker.t-success { color: var(--success); border-color: rgba(74, 222, 128, 0.4); }
.tl-body { flex: 1; min-width: 0; border-bottom: 1px solid var(--border); }
.tl-entry:last-child .tl-body { border-bottom: none; }
.tl-label { padding: 12px 10px 0; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.tl-body .ev-row { border-bottom: none; padding-top: 6px; }

/* ─── Uyarılar & Notlar ─── */
.record-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.mini-stat {
  display: flex; flex-direction: column; gap: 2px; min-width: 110px; padding: 12px 16px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.mini-stat-value { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.mini-stat.tone-warn .mini-stat-value { color: var(--warning); }
.mini-stat.sev-hafif, .mini-stat.sev-orta, .mini-stat.sev-agir, .mini-stat.sev-son { box-shadow: none; }
.mini-stat.sev-son { background: rgba(220, 38, 38, 0.12); color: inherit; border-color: rgba(239, 68, 68, 0.35); }
.mini-stat.sev-son .mini-stat-value { color: #fca5a5; }

.records-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 16px; align-items: start; }
.records-side { position: sticky; top: calc(var(--topbar-h) + 20px); }
.records-side .card-scroll { height: auto; max-height: calc(100vh - var(--topbar-h) - 110px); }
.target-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; text-align: left;
  border-radius: 10px; transition: background 0.15s, box-shadow 0.15s;
}
.target-row:hover { background: var(--surface-2); }
.target-row.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.target-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.target-info .ev-name { font-size: 12.5px; }
.target-counts { display: flex; gap: 4px; flex-shrink: 0; }
.count-chip.warn { color: var(--warning); background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.2); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 6px 8px 6px 12px;
  border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 12.5px; color: var(--text-2);
}
.filter-chip b { color: var(--text); }
.filter-chip button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--text-2); }
.filter-chip button:hover { background: var(--surface-3); color: var(--text); }

.record-list { display: flex; flex-direction: column; gap: 12px; }
.record-card {
  position: relative; padding: 18px 20px 14px 22px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  animation: rowIn 0.3s var(--ease) both; transition: border-color 0.2s;
}
.record-card::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-3); }
.record-card.sevc-hafif::before { background: var(--info); }
.record-card.sevc-orta::before { background: var(--warning); }
.record-card.sevc-agir::before { background: var(--danger); }
.record-card.sevc-son::before { background: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.7); }
.record-card.sevc-note::before { background: var(--accent); }
.record-card:hover { border-color: var(--border-2); }
.record-card.is-resolved { opacity: 0.72; }
.record-card.is-resolved::before { background: var(--success); box-shadow: none; }
.record-card.is-focused { border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.record-head { display: flex; align-items: flex-start; gap: 12px; }
.record-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.record-no { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.record-title { margin-top: 14px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.record-content { margin-top: 8px; font-size: 13.5px; line-height: 1.65; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.evidence { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.evidence-thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--border-2); background: var(--bg-raise); cursor: zoom-in;
}
.evidence-thumb img, .evidence-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease); }
.evidence-thumb:hover img, .evidence-thumb:hover video { transform: scale(1.05); }
.play-badge {
  position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12px;
}
.evidence-files, .evidence-links { display: flex; flex-wrap: wrap; gap: 6px; }
.evidence-links { margin-top: 10px; }
.file-chip, .link-chip {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.file-chip:hover, a.link-chip:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.file-chip i { color: var(--danger); }
.file-chip small, .link-chip span { color: var(--text-3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-chip i { color: var(--accent); font-size: 10.5px; }
.link-chip span { max-width: 260px; }
.link-chip.editable span { max-width: 340px; color: var(--text-2); }
.link-chip.editable button { color: var(--text-3); padding: 0 2px; }
.link-chip.editable button:hover { color: var(--danger); }
.record-resolution {
  display: flex; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--success-soft); border: 1px solid rgba(74, 222, 128, 0.2); font-size: 12.5px; color: var(--text-2);
}
.record-resolution > i { color: var(--success); margin-top: 2px; }
.record-resolution b { color: var(--text); }
.record-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
}
.record-author { font-size: 12px; color: var(--text-2); }
.record-author i { color: var(--text-3); margin-right: 4px; }
.record-actions { display: flex; align-items: center; gap: 6px; }
.btn-ghost.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: var(--radius-sm); }

/* Editör */
.modal-lg { max-width: 640px; }
.label-hint { font-weight: 400; color: var(--text-3); margin-left: 6px; font-size: 11.5px; }
.textarea {
  width: 100%; padding: 12px 14px; resize: vertical; min-height: 110px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13.5px; line-height: 1.6; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea::placeholder { color: var(--text-3); }
.textarea:focus { border-color: rgba(147, 160, 255, 0.45); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface-2); }
.sev-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sev-option {
  position: relative; display: grid; place-items: center; height: 42px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: all 0.2s;
}
.sev-option input { position: absolute; opacity: 0; }
.sev-option:hover { border-color: var(--border-3); }
.sev-option.sev-hafif:has(input:checked) { color: var(--info); background: var(--info-soft); border-color: var(--info); box-shadow: none; }
.sev-option.sev-orta:has(input:checked) { color: var(--warning); background: var(--warning-soft); border-color: var(--warning); }
.sev-option.sev-agir:has(input:checked) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.sev-option.sev-son { background: var(--surface); color: var(--text-2); border-color: var(--border); box-shadow: none; }
.sev-option.sev-son:has(input:checked) { color: #fff; background: linear-gradient(90deg, #dc2626, #b91c1c); border-color: #ef4444; box-shadow: 0 0 16px -4px rgba(239, 68, 68, 0.7); }
.sev-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.preview-badges { margin-left: auto; }
#targetPreview { margin: 10px 0 0; }
.link-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dropzone {
  display: flex; align-items: center; gap: 14px; padding: 18px; cursor: pointer;
  border-radius: var(--radius); border: 1.5px dashed var(--border-3); background: var(--surface);
  font-size: 12.5px; color: var(--text-2); transition: border-color 0.2s, background 0.2s;
}
.dropzone > i { font-size: 22px; color: var(--accent); }
.dropzone b { color: var(--text); }
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.file-grid:empty { display: none; }
.file-tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--border-2); background: var(--bg-raise);
}
.file-tile.is-new { border-color: var(--accent-line); }
.file-tile img, .file-tile video, .file-tile-icon { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.file-tile-icon { display: grid; place-items: center; font-size: 22px; color: var(--text-3); }
.file-tile-name { padding: 5px 7px; font-size: 10.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tile-rm {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 7px; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 11px;
}
.file-tile-rm:hover { background: var(--danger); }
.upload-progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.15s; }

/* Büyük önizleme */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 40px 20px; background: rgba(0, 0, 0, 0.9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
}
.lightbox-body { max-width: 100%; max-height: calc(100vh - 140px); display: grid; place-items: center; }
.lightbox-body img, .lightbox-body video { max-width: min(1200px, 100%); max-height: calc(100vh - 140px); border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 18px; right: 18px; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: var(--surface-3); color: var(--text); font-size: 16px;
}
.lightbox-close:hover { background: var(--danger); }

/* ─── Komut logları ─── */
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-family: var(--mono); font-size: 12px; color: var(--text-2);
  transition: all 0.2s;
}
.filter-pill:hover { border-color: var(--border-3); color: var(--text); }
.filter-pill.active { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.pill-count { font-family: var(--font); font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.filter-pill.active .pill-count { background: rgba(0, 0, 0, 0.12); color: var(--bg); }
.search-box.narrow { flex: 0 1 260px; min-width: 200px; }
.list-body { padding: 4px 8px; }

@media (max-width: 1280px) {
  .case-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .records-layout { grid-template-columns: minmax(0, 1fr); }
  .records-side { position: static; }
  .records-side .card-scroll { max-height: 260px; }
}
@media (max-width: 860px) {
  .profile-hero { flex-wrap: wrap; }
  .hero-actions { width: 100%; }
  .case-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sev-picker { grid-template-columns: repeat(2, 1fr); }
  .record-card { padding: 14px 14px 12px 18px; }
  .record-head .ev-time { display: none; }
  .quick-search kbd { display: none; }
  .search-box.narrow { flex: 1 1 100%; }
  .hero-avatar { width: 60px; height: 60px; }
}


/* ==========================================================================
   Etiketler, ayrıntılar, sohbet zenginleştirmeleri, canlı düğme, performans
   ========================================================================== */

/* Uzun listelerde ekran dışındaki satırlar çizilmez — scroll akıcı kalır */
.chat-msg, .ev-row, .record-card, .tl-entry { content-visibility: auto; contain-intrinsic-size: auto 84px; }
.card-scroll { overscroll-behavior: auto; }

/* Denetim ayrıntıları */
.ev-changes { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.change-item {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; max-width: 100%;
  padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; line-height: 1.45; color: var(--text-2); word-break: break-word;
}
.change-item .change-key { font-family: var(--font); font-weight: 600; color: var(--text-3); }
.change-arrow { font-size: 9px; color: var(--text-3); }
.change-info { color: var(--text); }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; box-shadow: 0 0 0 1px var(--border-3); }
.audit-table td { vertical-align: top; }
.audit-table .target-cell .ev-target { font-weight: 500; color: var(--text); }
.audit-table .target-cell .ev-id { margin-left: 4px; }
.user-cell > div > a, .user-cell > div > span:first-child { display: block; color: var(--text); font-weight: 500; }
.user-cell .bot-badge { display: inline-flex; margin: 2px 0 0; }
.time-cell small { display: block; font-size: 10.5px; color: var(--text-3); }

/* Sohbet: yanıt, embed, sticker */
.chat-reply {
  display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 4px;
  font-size: 12px; color: var(--text-3);
}
.chat-reply > i { font-size: 10px; transform: scaleX(-1); }
.chat-reply-author { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.chat-reply-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-text.muted { color: var(--text-3); }
.msg-embed {
  max-width: 520px; margin-top: 8px; padding: 10px 12px; border-radius: 8px;
  border-left: 3px solid var(--accent-line); background: var(--surface-2);
  font-size: 12.5px; color: var(--text-2);
}
.msg-embed-author { font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.msg-embed-title { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.msg-embed-title a:hover { color: var(--accent); }
.msg-embed-desc { white-space: pre-wrap; word-break: break-word; }
.msg-stickers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.msg-sticker { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 0; }
.msg-sticker img { width: 120px; height: 120px; object-fit: contain; }
.msg-sticker figcaption { font-size: 11px; color: var(--text-3); }

/* "N yeni kayıt" düğmesi */
.live-pill {
  position: fixed; top: calc(var(--topbar-h) + 14px); left: 50%; z-index: 80; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--accent-strong); color: #fff; font-size: 12.5px; font-weight: 600;
  box-shadow: 0 10px 30px -8px var(--accent-glow); animation: pillIn 0.3s var(--ease);
}
.live-pill:hover { background: var(--accent); }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 861px) { .live-pill { margin-left: calc(var(--sidebar-w) / 2); } }


/* ==========================================================================
   Üye kartı, Guard Log, Ceza Takibi, yetki/rol çipleri, mobil scroll
   ========================================================================== */

.member-trigger, [data-member] { cursor: pointer; }
img.member-trigger:hover { box-shadow: 0 0 0 2px var(--accent-line); }

/* Üye kartı: masaüstünde tıklanan yerin yanında, mobilde alttan açılan sayfa */
.member-card {
  position: fixed; z-index: 260; width: 360px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 18px; border-radius: var(--radius-lg);
  background: #0e0e14; border: 1px solid var(--border-2); box-shadow: var(--shadow-lg);
  animation: mcIn 0.16s var(--ease);
}
.member-card.as-sheet {
  left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 82vh;
  border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom));
  animation: mcSheet 0.22s var(--ease);
}
.member-card.as-sheet::before {
  content: ''; display: block; width: 40px; height: 4px; margin: -6px auto 12px; border-radius: 4px; background: var(--border-3);
}
@keyframes mcIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes mcSheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.member-card .loading-state { padding: 30px 0; }
.mc-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; color: var(--text-3); background: var(--surface-2);
}
.mc-close:hover { color: var(--text); background: var(--surface-3); }
.mc-head { display: flex; align-items: center; gap: 14px; padding-right: 30px; }
.mc-avatar { width: 58px; height: 58px; flex-shrink: 0; border-radius: 50%; object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 3px var(--surface-2); }
.mc-who { min-width: 0; }
.mc-name { font-size: 16px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.mc-tagname { font-size: 12px; color: var(--text-3); }
.mc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.mc-tag { height: 19px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--text-2); background: var(--surface-3); }
.mc-tag.is-live { color: var(--success); background: var(--success-soft); }
.mc-tag.is-out { color: var(--danger); background: var(--danger-soft); }
.mc-facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 4px; font-size: 12px; color: var(--text-2); }
.mc-facts i { width: 14px; color: var(--text-3); }
.mc-facts .is-voice, .mc-facts .is-voice i { color: var(--success); }
.mc-section { margin-top: 14px; }
.mc-label { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.mc-roles, .mc-perms { display: flex; flex-wrap: wrap; gap: 5px; font-size: 12px; }
.mc-roles .muted, .mc-perms .muted { color: var(--text-3); }
.mc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 16px; }
.mc-stats > div { padding: 8px 6px; border-radius: var(--radius-sm); background: var(--surface-2); text-align: center; }
.mc-stats b { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
.mc-stats b.is-warn { color: var(--warning); }
.mc-stats span { font-size: 10.5px; color: var(--text-3); }
.mc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mc-actions .btn-ghost { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

.role-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 24px; padding: 0 9px;
  border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface);
  font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.role-chip i { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; }
.perm-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: 11px; color: var(--text-2); white-space: nowrap;
}
.perm-chip.is-danger { color: var(--warning); border-color: rgba(251, 191, 36, 0.22); background: var(--warning-soft); }
.perm-chip.is-added { color: var(--success); border-color: rgba(74, 222, 128, 0.22); background: var(--success-soft); }
.perm-chip.is-added.is-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.3); background: var(--danger-soft); font-weight: 600; }
.perm-chip.is-removed { color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.25); }
.change-item.is-perms { display: flex; width: 100%; gap: 4px; }
.change-item.is-perms .change-key { margin-right: 2px; }

/* Risk seviyeleri */
.risk-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.risk-badge.risk-3 { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.28); }
.risk-badge.risk-2 { color: var(--warning); background: var(--warning-soft); border-color: rgba(251, 191, 36, 0.24); }
.risk-badge.risk-1 { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.guard-table tr.risk-row-3 td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.guard-table tr.risk-row-2 td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.guard-table .changes-cell { max-width: 420px; }
.guard-table .ev-reason { margin-top: 6px; }
.legend-body { padding: 4px 16px 16px; display: grid; gap: 10px; font-size: 12px; line-height: 1.55; color: var(--text-2); }
.legend-body .risk-badge { margin-right: 4px; }

/* Küçük istatistik kutucukları (tıklanınca filtre) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  font: inherit; color: inherit; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.kpi:hover { border-color: var(--border-3); }
.kpi.active { border-color: var(--accent); background: var(--accent-soft); }
.kpi-value { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-label { font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kpi-label i { width: 14px; color: var(--text-3); }
.kpi-label small { color: var(--danger); }
.kpi-sub { font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.kpi-grid.mod-stats { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cell-stack .channel-badge { font-size: 11px; }
.mod-table .reason-col { min-width: 200px; }
.kpi.is-critical .kpi-value { color: var(--danger); }
.kpi.is-high .kpi-value { color: var(--warning); }

/* Tablo + yan panel */
.page-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.page-main { min-width: 0; }
.page-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--topbar-h) + 20px); }
.page-aside .card-scroll { height: auto; max-height: 380px; }
.mod-table .reason-col { max-width: 320px; }
.mod-table .reason-col .ev-cmd { margin-top: 5px; font-size: 11px; padding: 4px 8px; overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  .page-split { grid-template-columns: minmax(0, 1fr); }
  .page-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* Mobil scroll: iç içe kaydırılan kutular parmağı yakalayıp sayfayı kilitlemiş gibi hissettiriyordu.
   Mobilde kartlar iç scroll yapmaz (ilk satırlar görünür), görünmez katmanlar dokunuşu almaz. */
body { overflow-x: clip; }
.sidebar-backdrop:not(.show) { visibility: hidden; }
@media (max-width: 860px) {
  .sidebar-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .card-scroll, .dash-row.quad .card-scroll, .page-aside .card-scroll, .records-side .card-scroll {
    height: auto; max-height: none; overflow: visible;
  }
  .dash-row .card-scroll > :nth-child(n+9), .page-aside .card-scroll > :nth-child(n+9) { display: none; }
  .tracked-users-panel { position: static; max-height: none; overflow: visible; }
  .modal-overlay, .lightbox { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: 19px; }
  .mc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Ceza/yargı doğrulama durumu */
.cmd-status {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; vertical-align: middle;
}
.cmd-status.is-ok { color: var(--success); background: var(--success-soft); border-color: rgba(74, 222, 128, 0.22); }
.cmd-status.is-fail { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.26); }
.cmd-status.is-wait { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.cmd-status.is-unknown { color: var(--text-3); background: var(--surface); border-color: var(--border); }
.ev-line .cmd-status { margin-left: 2px; }
tr.row-failed > td { opacity: 0.55; }
tr.row-failed > td .cmd-status { opacity: 1; }
