:root {
  --bg-1: #1a1a1a;
  --bg-2: #282828;
  --card: #3a3a3a;
  --muted: #a0a0a0;
  --accent: #ffb300; /* Canlı Turuncu/Sarı tonu */
  --glass: rgba(255,255,255,0.05);
}

html, body { height:100%; margin:0; }
body {
  font-family: Inter, "Segoe UI", Roboto, system-ui, Arial;
  background: radial-gradient(900px 400px at 10% 10%, rgba(255,179,0,0.07), transparent),
              linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: #f0f0f0;
  -webkit-font-smoothing: antialiased;
}

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--bg-1), #333333);
  padding: 20px;
  box-shadow: 8px 0 30px rgba(0,0,0,0.7);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .22s ease;
}
.sidebar-large-logo {
    width: 150px; /* Daha büyük logo boyutu */
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    padding: 5px;
    background-color: rgba(255,179,0,0.15);
    box-shadow: 0 0 15px rgba(255,179,0,0.5);
}
.sidebar .brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.sidebar .brand h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .6px;
}
.nav-link {
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s ease;
  text-decoration: none;
}
.nav-link:hover {
  background: rgba(255,255,255,0.03);
  color: #fff;
  transform: translateX(6px);
}
.nav-link.active {
  background: var(--accent) !important;
  color: var(--bg-1) !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(255,179,0,0.45) !important;
}
.nav-section {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  padding: 6px 4px;
}

/* Main */
.main { flex: 1; padding: 28px; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}
.card-ui {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.03));
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.85);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all .2s ease-out;
}
.card-ui:hover {
  box-shadow: 0 18px 45px rgba(0,0,0,0.95);
  transform: translateY(-2px);
}
.card-ui h6 { margin: 0; color: var(--muted); font-weight: 600; font-size: 13px; }
.card-ui .value { font-size: 28px; font-weight: 700; margin-top: 6px; }

/* Charts grid */
.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 12px;
  align-items: stretch;
}
.chart-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  height: 100%;
}
.chart-card h6 { margin-bottom: 10px; color: var(--muted); }
.chart-container {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}
.center-total {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  text-align: center;
  pointer-events: none;
  color: #fff;
  font-weight: 700;
}

/* Controls */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  transition: all .2s ease;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.2) !important;
  border-color: rgba(255,255,255,0.3) !important;
  color: #fff !important;
}

/* Responsive */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 72px; overflow: hidden; }
  .sidebar .label { display: none; }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 18px; }
  .chart-container { height: 280px; }
}

.muted {
  color: var(--muted);
  font-size: 13px;
}
.chip {
  background: rgba(255,255,255,0.05);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.04);
}
/* === DataTables Dark Theme === */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    color: #fff !important;
}

/* Modern table tweaks */
.table-modern.table {
  background: transparent;
  border-collapse: separate;
  border-spacing: 0 10px; /* vertical space between rows */
}
.table-modern.table thead th {
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-size: 12px;
}
.table-modern.table tbody tr { background: transparent; }
.table-modern.table tbody tr:hover { background: transparent; }
.isp-chip {
  display: inline-block;
  background: rgba(233,69,96,0.15);
  color: #f7a0b0;
  border: 1px solid rgba(233,69,96,0.25);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* Status chips (non-button, soft look) */
.status-chip {
  display: inline-inline;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}
.status-chip.status-ok {
  background: linear-gradient(180deg, rgba(16,185,129,0.20), rgba(16,185,129,0.14));
  border-color: rgba(16,185,129,0.4);
  color: #c0f5e1;
}
.status-chip.status-blocked {
  background: linear-gradient(180deg, rgba(239,68,68,0.22), rgba(239,68,68,0.16));
  border-color: rgba(239,68,68,0.4);
  color: #fecaca;
}

/* Table header polish */
.table-modern.table thead th {
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border-bottom: 1px solid rgba(255,255,255,0.1);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-size: 12px;
}
.table-modern.table td, .table-modern.table th {
  vertical-align: middle;
}
.table-modern .country-cell, .table-modern .device-cell, .table-modern .status-cell {
  white-space: nowrap;
}

/* Row card look inside table */
.row-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 12px 14px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.table-modern.table tbody tr:hover .row-card {
  box-shadow: 0 16px 40px rgba(0,0,0,0.85);
  transform: translateY(-1px);
}
.flag-badge {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  font-size: 16px;
}
.country-name { font-weight: 700; }

/* Rich visitor cell */
.visitor-cell strong {
  font-weight: 700;
}
.muted-sub {
  color: var(--muted);
  font-size: 12px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 2px 6px;
  border-radius: 6px;
}
.os-chip {
  display: inline-block;
  background: rgba(34,197,94,0.25);
  color: #e6ffec;
  border: 1px solid rgba(34,197,94,0.45);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.device-chip {
  display: inline-block;
  background: rgba(148,163,184,0.25);
  color: #f7f9fa;
  border: 1px solid rgba(148,163,184,0.45);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.link-chip {
  display: inline-block;
  background: rgba(255,179,0,0.2);
  color: #fff9e6;
  border: 1px solid rgba(255,179,0,0.4);
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
}
.link-chip a { color: inherit; text-decoration: none; }
.truncate {
  max-width: 360px;
  display: inline-block;
  vertical-align: bottom;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-modern.table td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.code-block {
  background-color: #333333; /* Yeni kart arkaplanına uygun */
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 15px;
  overflow-x: auto; /* Enable horizontal scrolling for long lines */
  margin-top: 20px;
}

.code-block code {
  font-family: 'Fira Code', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.9em;
  color: #e6eef8; /* Light text color for readability */
  line-height: 1.6;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    background-color: #3a3a3a; /* Kart arkaplanı ile uyumlu */
    border: 1px solid #777777;
    color: #fff;
    border-radius: 6px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background-color: #3a3a3a !important;
    border: 1px solid #777777 !important;
    color: #fff !important;
    border-radius: 4px;
    margin: 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--bg-1) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #ffc107 !important; /* Vurgu renginin açık tonu */
    color: var(--bg-1) !important;
}

.header-section .logo {
    height: 60px; /* Logo boyutunu büyütüldü */
    width: auto;
}
