:root {
  --navy-900: #0F172A;   /* ana lacivert */
  --navy-800: #0B1220;   /* koyu yüzey */
  --navy-700: #111827;   /* ikincil yüzey */
  --blue-500: #2563EB;   /* vurgu */
  --blue-400: #3B82F6;
  --text: #E5E7EB;       /* ana metin */
  --text-dim: #9CA3AF;   /* ikincil metin */
  --border: #1F2937;     /* sınır */
  --success: #22C55E;
  --warning: #F59E0B;
  --danger: #EF4444;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body.theme-dark {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 90% -20%, rgba(37,99,235,0.10), transparent 60%),
              radial-gradient(800px 400px at -20% 20%, rgba(2,6,23,0.7), transparent 60%),
              var(--navy-900);
  color: var(--text);
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header.glass { background: rgba(11,18,32,0.7); }
.header-content {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; background: #0b1a38; object-fit: contain; }
.brand-meta h1 { font-weight: 800; font-size: 18px; line-height: 1; }
.brand-meta span { color: var(--text-dim); font-size: 12px; }

.nav { display: flex; gap: 8px; }
.nav-btn {
  color: var(--text-dim); background: transparent; border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  transition: .2s ease; font-weight: 600;
}
.nav-btn:hover { color: #fff; border-color: #2b3a55; background: rgba(37,99,235,0.08); }
.nav-btn.active { color: #fff; background: linear-gradient(135deg, #1b2a4a, #13203c); border-color: #2b3a55; }

/* Main */
.main { padding: 28px 0 60px; display: grid; gap: 24px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(180deg, rgba(19,32,60,0.8), rgba(11,18,32,0.8));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 24px;
  box-shadow: var(--shadow);
}
.hero h2 { font-size: 24px; font-weight: 800; letter-spacing: 0.2px; }
.hero p { margin-top: 8px; color: var(--text-dim); }
.hero-actions { display: flex; gap: 10px; }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.stat {
  background: linear-gradient(180deg, rgba(17,24,39,0.85), rgba(15,23,42,0.85));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow);
}
.stat-label { color: var(--text-dim); font-size: 13px; }
.stat-value { display: block; margin-top: 8px; font-size: 28px; font-weight: 800; }

/* Section header */
.section-header { display: flex; align-items: center; justify-content: space-between; }
.section-header h3 { font-size: 18px; font-weight: 700; }
.muted { color: var(--text-dim); }
.center { text-align: center; }

/* Card */
.card {
  background: linear-gradient(180deg, rgba(15,23,42,0.9), rgba(11,18,32,0.9));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow);
}

/* Table */
.table-scroll { overflow: auto; border-radius: calc(var(--radius) - 6px); }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em;
  padding: 14px; border-bottom: 1px solid var(--border); background: rgba(2,6,23,0.6);
  position: sticky; top: 0; backdrop-filter: blur(6px);
}
.table tbody td { padding: 14px; border-bottom: 1px solid rgba(31,41,55,0.6); }
.table tbody tr:hover { background: rgba(37,99,235,0.06); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; border: 1px solid transparent;
}
.badge.active { color: var(--success); background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.25); }
.badge.inactive { color: var(--danger); background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.25); }

.score {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px;
  background: rgba(37,99,235,0.08); border: 1px solid #223155;
}
.score .value { font-weight: 800; }
.score .bar { width: 70px; height: 8px; background: #13203c; border-radius: 5px; overflow: hidden; }
.score .fill { height: 100%; border-radius: 5px; transition: width .3s; }
.fill.high { background: var(--success); }
.fill.medium { background: var(--warning); }
.fill.low { background: var(--danger); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-weight: 700; cursor: pointer; border: 1px solid transparent;
  transition: .2s ease; color: #fff;
}
.btn-primary {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  border-color: #2b3a55;
  box-shadow: 0 8px 25px rgba(37,99,235,0.25);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(37,99,235,0.08); border: 1px solid #223155; color: var(--text);
}
.btn-ghost:hover { background: rgba(37,99,235,0.16); }

/* Search & Filters */
.search-bar {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 12px;
}
.search-bar input {
  background: #0d162b; border: 1px solid #23314f; color: var(--text);
  padding: 12px 14px; border-radius: 12px; outline: none; transition: .2s;
}
.search-bar input:focus { border-color: #37569c; box-shadow: 0 0 0 4px rgba(37,99,235,0.15); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.filters select, .filters input {
  background: #0d162b; border: 1px solid #23314f; color: var(--text);
  padding: 10px 12px; border-radius: 10px; outline: none;
}

/* Modal */
.modal { position: fixed; inset: 0; display: none; z-index: 60; background: rgba(2,6,23,0.65); backdrop-filter: blur(3px); }
.modal.show { display: grid; place-items: center; padding: 20px; }
.modal-dialog {
  width: 100%; max-width: 860px; border-radius: 16px; border: 1px solid #24314e; overflow: hidden;
  background: linear-gradient(180deg, rgba(17,24,39,0.96), rgba(11,18,32,0.96));
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal-close {
  position: absolute; margin: 12px; right: 20px; top: 14px; background: transparent; border: none; color: var(--text-dim);
  font-size: 22px; cursor: pointer;
}
#modal-body { padding: 28px; }

/* Switch */
.switch { display: inline-flex; align-items: center; gap: 10px; margin: 8px 0; }
.switch input { display: none; }
.switch .slider {
  width: 46px; height: 26px; background: #23314f; border-radius: 20px; position: relative; transition: .25s;
  border: 1px solid #2a3a5f;
}
.switch .slider::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #e5e7eb; transition: .25s;
}
.switch input:checked + .slider { background: #1e3a8a; }
.switch input:checked + .slider::after { transform: translateX(20px); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Toasts */
#toast-container { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 70; }
.toast {
  padding: 12px 16px; border-radius: 12px; background: #0d162b; border: 1px solid #223155; color: var(--text);
  box-shadow: var(--shadow); animation: slideIn .25s ease;
}
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error { border-color: rgba(239,68,68,0.3); }
.toast.info { border-color: rgba(37,99,235,0.35); }

@keyframes slideIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 960px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav { overflow-x: auto; }
  .nav-btn { white-space: nowrap; }
}