@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* —— Kurumsal palet —— */
  --sp-primary: #1e40af;
  --sp-primary-hover: #1d4ed8;
  --sp-primary-soft: #eff6ff;
  --sp-primary-ring: rgba(37, 99, 235, 0.2);

  --sidebar: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #334155;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #e2e8f0;
  --sidebar-width: 240px;

  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --head: #1e293b;
  --green: #16a34a;

  --bg: #f1f5f9;
  --bg-subtle: #f8fafc;
  --surface: #ffffff;
  --surface-raised: #ffffff;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-soft: #64748b;
  --text-muted: #94a3b8;

  --line: #e2e8f0;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --badge-bg: #f1f5f9;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --transition: 0.15s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: var(--badge-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

/* —— Ortak form & buton —— */
.sp-label,
label.sp-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 6px;
}

.sp-input,
input.sp-input,
textarea.sp-input,
select.sp-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.sp-input:focus,
input.sp-input:focus,
textarea.sp-input:focus,
select.sp-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--sp-primary-ring);
}

textarea.sp-input { min-height: 88px; resize: vertical; font-family: inherit; }

.sp-field { margin-bottom: 16px; }

.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.sp-btn:hover { border-color: var(--border-strong); background: var(--bg-subtle); }

.sp-btn-primary,
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sp-btn-primary:hover,
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.sp-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.sp-btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.sp-btn-muted {
  background: var(--text-soft);
  border-color: var(--text-soft);
  color: #fff;
}

.sp-btn-sm { padding: 5px 10px; font-size: 12px; }

.sp-msg { font-size: 13px; margin-top: 10px; }
.sp-msg.is-ok { color: #166534; }
.sp-msg.is-err { color: #b91c1c; }

/* —— Sayfa düzeni (hesap / yönetim) —— */
.sp-page {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
  max-width: 1080px;
}

.sp-page-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}

.sp-page-sub {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.sp-panel,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.sp-panel h2,
.panel h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.sp-panel h3,
.panel h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 18px 0 8px;
}

.sp-grid-2,
.row2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.sp-table,
table.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sp-table th,
.sp-table td,
table.sp-table th,
table.sp-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.sp-table th,
table.sp-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
  background: var(--bg-subtle);
}

.sp-table tbody tr:hover,
table.sp-table tbody tr:hover {
  background: var(--bg-subtle);
}

/* —— Giriş sayfası —— */
body.sp-auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #334155 100%);
  padding: 24px;
}

.sp-auth-card,
.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
}

.sp-auth-card h1,
.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text);
}

.sp-auth-card h1 span,
.login-card h1 span { color: var(--accent); }

.sp-auth-card p,
.login-card p {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 24px;
}

.sp-auth-card .sp-input,
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}

.sp-auth-card label,
.login-card label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.sp-auth-card .sp-btn-primary,
.login-card .btn-primary {
  width: 100%;
  padding: 11px;
  margin-top: 4px;
}

.sp-auth-err,
.login-card .err {
  color: #b91c1c;
  font-size: 13px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  display: none;
}

/* —— Oturum kartları (hesap) —— */
.sess-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  font-size: 13px;
  background: var(--surface);
}

.sess-row.is-current {
  border-color: #86efac;
  background: #f0fdf4;
}

.sess-meta { color: var(--text-soft); font-size: 12px; margin-top: 6px; }
.sess-actions { margin-top: 10px; }
.sess-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

/* —— Sidebar —— */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-brand {
  padding: 24px 22px 18px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.sidebar-brand span { font-weight: 500; color: #94a3b8; }

.sidebar-site {
  margin: 0 16px 20px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--sidebar-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-site strong {
  color: #f8fafc;
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  text-transform: none;
  letter-spacing: 0;
}

.nav { list-style: none; padding: 8px 12px; flex: 1; }

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 2px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav a:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-hover);
  text-decoration: none;
}

.nav a.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav .ico {
  width: 20px;
  text-align: center;
  font-size: 15px;
  opacity: 0.9;
  flex-shrink: 0;
}

.sidebar-foot {
  padding: 16px 22px;
  font-size: 11px;
  color: #64748b;
  border-top: 1px solid var(--sidebar-border);
}

/* —— Main —— */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: 28px 32px 48px;
  max-width: 1600px;
}

.view { display: none; }
.view.active { display: block; }

.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-toolbar h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  text-transform: none;
}

.live-pill {
  font-size: 10px;
  font-weight: 600;
  background: #dcfce7;
  color: #15803d;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

/* —— NOW dashboard —— */
.now-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.now-main { min-width: 0; }

.now-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Üst şerit: KPI + timeline eşit yükseklik */
.now-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: stretch;
}

.now-kpi-card,
.now-timeline-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.now-kpi-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 18px;
  position: relative;
  text-align: center;
}

.now-kpi-body canvas {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  width: 200px !important;
  height: 112px !important;
}

.now-kpi-primary { margin-top: 48px; }

.now-kpi-primary .gauge-num {
  font-size: 48px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
}

.now-kpi-primary .gauge-lbl {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 4px;
}

.now-kpi-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  margin-top: 16px;
}

.now-kpi-mini {
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.now-kpi-mini.is-highlight {
  background: var(--sp-primary-soft);
  border-color: #bfdbfe;
}

.now-kpi-mini b {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.now-kpi-mini.is-highlight b { color: var(--sp-primary); }

.now-kpi-mini span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.now-kpi-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

.now-kpi-footer em {
  display: block;
  font-style: normal;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.now-kpi-footer b { font-size: 15px; font-weight: 600; color: var(--text); }

.now-kpi-cal.gauge-calibration {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  border-radius: 0;
}

.now-timeline-card .timeline-chart-wrap {
  flex: 1;
  min-height: 180px;
  padding: 12px 16px 8px;
}

.now-timeline-card .timeline-foot {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
  background: var(--bg-subtle);
}

.now-timeline-card .timeline-foot strong {
  color: var(--text);
  font-weight: 600;
}

/* Bölüm ızgaraları */
.now-section {
  display: grid;
  gap: 16px;
}

.now-section--split {
  grid-template-columns: 1fr 1fr;
}

.now-section--quad {
  grid-template-columns: repeat(4, 1fr);
}

.now-section--two {
  grid-template-columns: 1fr 1fr;
}

.now-section .widget {
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.now-section--split .widget { min-height: 320px; }

.now-scroll-list {
  flex: 1;
  min-height: 0;
  max-height: 260px;
  overflow-y: auto;
}

.now-section--split .now-scroll-list,
.now-section--split .active-pages-list {
  max-height: 240px;
}

.now-metrics {
  padding: 16px 18px 8px;
}

.now-dur-wrap {
  padding: 0 18px 16px;
  flex: 1;
}

.now-section .widget-foot {
  margin-top: auto;
}

.now-section .active-pages-list {
  min-height: 0;
  flex: 1;
}

.now-section .widget-devices .dev-panel {
  flex: 1;
  padding: 12px 14px 14px;
  overflow: auto;
}

.now-section .tabs {
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
}

.now-section .list {
  padding: 4px 0;
}

.now-section.entry-report-bar,
.now-section .entry-report-bar {
  min-height: auto;
}

/* Eski sınıflar — geriye uyumluluk */
.top-strip {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
}

.top-strip > .widget {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.widget-h {
  background: var(--head);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 12px 16px;
  letter-spacing: 0.02em;
}

.widget-h .widget-sub {
  font-weight: 400;
  opacity: 0.8;
  font-size: 11px;
  margin-left: 8px;
}

.widget-h.light {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--line);
}

/* Gauge (GoSquared) */
.gauge-card.gs-gauge {
  text-align: center;
  padding: 18px 20px 16px;
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.gauge-card canvas {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  width: 200px !important;
  height: 112px !important;
  max-width: 200px;
  max-height: 112px;
}

.gauge-num {
  font-size: 52px;
  font-weight: 300;
  color: #1e293b;
  line-height: 1;
  margin-top: 52px;
  position: relative;
  letter-spacing: -0.02em;
}

.gauge-num.is-loading {
  color: #94a3b8;
  font-size: 40px;
}

.gauge-lbl {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 400;
}

.gauge-focus-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 12px 4px 0;
}

.gauge-focus-card {
  flex: 1;
  max-width: 108px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-align: center;
}

.gauge-focus-card.is-primary {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.gauge-focus-card b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #334155;
  line-height: 1.1;
}

.gauge-focus-card.is-primary b {
  color: #0284c7;
}

.gauge-focus-card em {
  display: block;
  margin-top: 3px;
  font-style: normal;
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gauge-range {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  padding: 14px 8px 0;
  margin-top: auto;
  border-top: none;
}

.gauge-range em {
  display: block;
  font-style: normal;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.gauge-range b {
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.gauge-calibration {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  padding: 10px 8px 0;
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.gauge-calibration em {
  display: block;
  font-style: normal;
  font-size: 9px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.gauge-calibration b {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.gauge-calibration .is-main em {
  color: #0ea5e9;
}

.gauge-calibration .is-main b {
  color: #0284c7;
  font-size: 16px;
}

/* Timeline (GoSquared) */
.timeline-card.gs-timeline {
  padding-bottom: 0;
  overflow: visible;
}

.timeline-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 22px 6px;
  background: #fff;
}

.timeline-title {
  font-size: 15px;
  font-weight: 500;
  color: #64748b;
}

.timeline-compare {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 400;
}

.timeline-foot {
  padding: 10px 22px 14px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
}

.timeline-foot strong { color: #475569; font-weight: 600; }

canvas.chart {
  width: 100% !important;
  max-width: 100%;
  height: var(--chart-h, 148px) !important;
  max-height: var(--chart-h, 148px) !important;
  display: block;
  cursor: crosshair;
}

.timeline-chart-wrap {
  position: relative;
  width: 100%;
  overflow: visible;
  padding: 0 16px 4px;
  box-sizing: border-box;
}

.timeline-chart-inner {
  width: 100%;
  height: var(--chart-h, 148px);
  max-height: var(--chart-h, 148px);
  overflow: hidden;
}

#nowTimelineWrap {
  --chart-h: 148px;
}

.trends-timeline-wrap {
  --chart-h: 220px;
  padding: 8px 20px 16px;
  overflow: visible;
}

.trends-timeline-wrap .timeline-chart-inner {
  height: var(--chart-h, 220px);
  max-height: var(--chart-h, 220px);
  overflow: visible;
}

.trends-chart-widget {
  overflow: visible;
}

.trends-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.trends-chart-hint {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
}

.trends-grid .widget.span-all .timeline-chart-wrap {
  flex: none;
}

.timeline-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 12;
  display: none;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 14px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, calc(-100% - 10px));
}

.timeline-tooltip.is-visible {
  display: block;
}

.timeline-tooltip .tl-main { font-weight: 500; color: #fff; }

.timeline-tooltip .tl-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.timeline-tooltip .tl-up { color: #86efac; }
.timeline-tooltip .tl-down { color: #fca5a5; }

/* Widget grid */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-width: 0;
}

.widget-grid > * {
  min-width: 0;
}

.widget-grid .span2 { grid-column: span 2; }

/* Content — GoSquared bar list */
.widget-content {
  grid-column: span 1;
}

.widget-live-pair {
  grid-column: span 2;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  min-width: 0;
}

.live-pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  height: 100%;
  min-width: 0;
}

.live-pair-grid > * {
  min-width: 0;
}

.live-pair-stack {
  grid-template-columns: 1fr;
}

.live-pair-stack .widget-content-campaign {
  min-height: 0;
}

.live-pair-stack .widget-active-pages {
  min-height: 280px;
}

.widget-content-campaign,
.widget-active-pages {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  min-height: 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.widget-content-main {
  grid-column: span 2;
}

.active-pages-list {
  list-style: none;
  flex: 1;
  max-height: 480px;
  min-height: 280px;
  overflow-y: auto;
}

.active-pages-list li {
  position: relative;
  border-bottom: 1px solid var(--line);
  min-height: 44px;
  min-width: 0;
  overflow: hidden;
}

.active-pages-list li:last-child { border-bottom: none; }

.active-pages-list .live-item-enter {
  transform: translateY(8px);
}

.active-pages-list .bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(16, 185, 129, 0.12);
  z-index: 0;
  pointer-events: none;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.active-page-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  min-width: 0;
}

.active-page-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.active-page-count {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.campaign-bars {
  flex: 1;
}

.content-bars {
  list-style: none;
  max-height: 520px;
  min-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
}

.content-bars li {
  position: relative;
  border-bottom: 1px solid var(--line);
  min-height: 50px;
  min-width: 0;
  overflow: hidden;
}

.content-bars li:last-child { border-bottom: none; }

.content-bars .bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(74, 144, 226, 0.14);
  z-index: 0;
  pointer-events: none;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-bars .content-inner {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 14px;
  min-width: 0;
}

.content-bars .content-text {
  flex: 1;
  min-width: 0;
}

.content-bars .content-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-bars .content-path {
  font-size: 11px;
  color: var(--text-soft);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-bars .content-count {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.content-count-dual {
  flex-shrink: 0;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  text-align: right;
}

.content-count-dual .count-pair {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 42px;
}

.content-count-dual .content-count-main {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.content-count-dual .content-count-lbl {
  font-size: 9px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.content-bars .empty {
  padding: 16px 14px;
  color: var(--text-soft);
  font-size: 13px;
}

.widget-foot {
  padding: 8px 14px 10px;
  font-size: 11px;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.entry-report-bar {
  margin-top: 16px;
  min-width: 0;
  overflow: hidden;
}

/* Link reports */
.link-reports-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.link-reports-list,
.link-reports-detail {
  min-width: 0;
}

.link-entry-list li {
  cursor: pointer;
  transition: background 0.12s;
}

.link-entry-list li:hover {
  background: #f8fafc;
}

.link-entry-list li.is-selected {
  background: #eff6ff;
}

.link-entry-list li.is-selected .content-title {
  color: #0284c7;
}

.content-bars.entry-link-rows li {
  cursor: pointer;
  transition: background 0.12s;
}

.content-bars.entry-link-rows li:hover {
  background: #f8fafc;
}

.link-detail-body {
  padding: 16px 18px 20px;
}

.link-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.link-kpi {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  text-align: center;
}

.link-kpi b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #334155;
  line-height: 1.2;
}

.link-kpi.is-highlight {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.link-kpi.is-highlight b {
  color: #0284c7;
}

.link-kpi-row--traffic {
  margin-bottom: 12px;
}

.link-kpi em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.link-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 10px;
}

.link-exit-bars .bar-row {
  margin-bottom: 6px;
}

.link-pages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.link-pages-table th,
.link-pages-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.link-pages-table th {
  color: var(--text-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.link-pages-table .path-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
  max-width: 320px;
}

.link-pages-table .num {
  white-space: nowrap;
  text-align: right;
}

.link-detail-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 14px;
  line-height: 1.5;
}

.link-detail-meta code {
  font-size: 11px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 3px;
}

@media (max-width: 1100px) {
  .link-reports-layout { grid-template-columns: 1fr; }
  .link-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* Fraud */
.fraud-pane { padding: 0 4px 20px; }

.fraud-hint {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0 0 12px;
  line-height: 1.5;
}

.fraud-live-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.fraud-results { display: flex; flex-direction: column; gap: 12px; }

.fraud-ip-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.fraud-ip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
}

.fraud-ip-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
}

.fraud-ip-visitors {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fraud-visitor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.fraud-visitor-row:last-child { border-bottom: none; }

.fraud-vid {
  font-size: 11px;
  color: #475569;
}

.fraud-entered { color: var(--text-soft); font-size: 11px; }

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
}

.fraud-watch-btn { margin-left: auto; }

/* IP search */
.ip-search-panel { padding: 16px 18px 20px; }

.ip-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ip-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.ip-all-sites {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  user-select: none;
}

.ip-search-hint {
  font-size: 12px;
  color: var(--text-soft);
  margin: 0 0 16px;
  line-height: 1.5;
}

.ip-search-results { display: flex; flex-direction: column; gap: 12px; }

.ip-session-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ip-session-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.ip-session-head:hover { background: #f1f5f9; }

.ip-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--text-soft);
}

.ip-session-meta strong { color: var(--text); }

.ip-session-site {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 2px 8px;
  border-radius: 4px;
}

.ip-session-body {
  padding: 12px 14px 14px;
  display: none;
}

.ip-session-card.is-open .ip-session-body { display: block; }

.ip-pages-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ip-pages-table th,
.ip-pages-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #eef2f7;
  text-align: left;
}

.ip-pages-table th.num,
.ip-pages-table td.num { text-align: right; width: 72px; }

.ip-pages-table .path-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
}

.link-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.link-audience-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 8px;
  background: #fafbfc;
  min-width: 0;
}

.link-audience-h {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.link-audience-hint {
  font-size: 11px;
  color: var(--text-soft);
  margin: -4px 0 6px;
  line-height: 1.4;
}

.link-audience-list {
  max-height: 180px;
  margin: 0;
}

.link-audience-list .badge {
  font-size: 11px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .link-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .link-audience-grid { grid-template-columns: 1fr; }
}

/* Lists */
.list { list-style: none; max-height: 200px; overflow-y: auto; }

.widget-sources {
  align-self: start;
  display: flex;
  flex-direction: column;
}

.widget-sources .list {
  flex: 1;
  max-height: 520px;
  overflow-y: auto;
}

.widget-sources .list li {
  padding: 12px 14px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

.list li:last-child { border-bottom: none; }

.list .lbl { flex: 1; min-width: 0; }
.list .sub { font-size: 11px; color: var(--text-soft); margin-top: 3px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge {
  flex-shrink: 0;
  background: var(--badge-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  min-width: 22px;
  text-align: center;
}

/* Tabs */
.tabs { display: flex; gap: 0; padding: 0 14px; background: #f8fafc; border-bottom: 1px solid var(--line); }

.tab {
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* Devices — GoSquared */
.widget-devices { min-height: 280px; }

.dev-tab-bar {
  display: flex;
  margin: 0 10px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.dev-tab-bar .dev-tab {
  flex: 1;
  padding: 7px 4px;
  border: none;
  background: #fff;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  text-transform: capitalize;
}

.dev-tab-bar .dev-tab.active {
  background: var(--head);
  color: #fff;
}

.dev-panel {
  padding: 0 10px 12px;
  max-height: 320px;
  overflow-y: auto;
}

.dev-overview-row {
  display: flex;
  justify-content: space-around;
  padding: 12px 4px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.dev-ico { font-size: 22px; margin-bottom: 6px; opacity: 0.75; }
.dev-n { font-size: 22px; font-weight: 400; color: var(--text); }
.dev-l { font-size: 10px; color: var(--text-soft); margin-top: 2px; text-transform: uppercase; }

.dev-pies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 4px;
}

.dev-pie-box { text-align: center; }

.dev-pie {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 1px solid var(--line);
}

.dev-pie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: center;
  font-size: 9px;
  color: var(--text-soft);
}

.dev-pie-legend span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dev-list { list-style: none; }

.dev-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  min-height: 0;
  cursor: default;
}

.dev-list li:last-child { border-bottom: none; }

.dev-list .dev-li-ico {
  width: 22px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
}

.dev-list .dev-li-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.dev-list .dev-li-count {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.dev-screen li {
  position: relative;
  padding-right: 48px;
}

.dev-screen .dev-bar {
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  background: rgba(74, 144, 226, 0.12);
  z-index: 0;
  border-radius: 2px;
}

.dev-screen .dev-li-name,
.dev-screen .dev-li-count { position: relative; z-index: 1; }

/* Engagement */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding: 16px 8px;
  border-bottom: 1px solid var(--line);
}

.metrics .v { font-size: 22px; font-weight: 400; color: var(--text); }
.metrics .l { font-size: 11px; color: var(--text-soft); margin-top: 4px; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-soft);
}

.bar-bg { flex: 1; height: 8px; background: #edf2f7; border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1); }

/* Live dashboard — yumuşak güncelleme */
@keyframes liveFlash {
  0% { color: inherit; }
  40% { color: #2563eb; }
  100% { color: inherit; }
}

.live-flash {
  animation: liveFlash 0.55s ease;
}

.live-num {
  transition: color 0.2s ease;
}

.feed li.feed-row,
.list li[data-live-key],
.content-bars li[data-live-key] {
  transition:
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    background 0.12s ease;
}

.live-item-enter {
  opacity: 0;
  transform: translateY(-7px);
}

.live-item-enter.live-item-in {
  opacity: 1;
  transform: translateY(0);
}

.live-item-leave {
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
}

.vis-chip .n {
  transition: transform 0.25s ease, color 0.2s ease;
}

.vis-chip .n.live-flash {
  transform: scale(1.06);
}

.feed .time.live-muted {
  transition: opacity 0.25s ease;
}

#viewNow.active .widget {
  contain: layout style;
}

@media (prefers-reduced-motion: reduce) {
  .live-flash { animation: none; }
  .feed li.feed-row,
  .list li[data-live-key],
  .content-bars li[data-live-key],
  .content-bars .bar-fill,
  .bar-fill {
    transition: none !important;
  }
  .live-item-enter,
  .live-item-leave {
    opacity: 1;
    transform: none;
  }
}

/* Map */
.map-ph {
  height: 72px;
  margin: 10px 14px;
  background: #f0f4f8 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50" opacity="0.15"><ellipse cx="50" cy="28" rx="45" ry="20"/></svg>') center/contain no-repeat;
  border-radius: 3px;
  border: 1px solid var(--line);
}

/* Visitors panel (right column) */
.visitors-panel {
  position: sticky;
  top: 20px;
}

.visitors-panel .widget,
.visitors-widget {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  min-height: 0;
}

.vis-summary {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
}

.vis-ip-search {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.vis-ip-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
}

.vis-ip-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.vis-ip-clear {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.vis-ip-clear:hover { background: #f1f5f9; color: #334155; }

.vis-ip-hint {
  margin: 0;
  padding: 6px 12px 0;
  font-size: 11px;
  color: #64748b;
}

.vis-list-hint {
  margin: 0;
  padding: 6px 12px 4px;
  font-size: 11px;
  color: #64748b;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.vis-ip-results {
  flex: 1;
  min-height: 0;
  max-height: none;
}

.vis-ip-results .feed-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #475569;
}

.feed-row .feed-ip-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #64748b;
}

.vis-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vis-chip {
  flex: 1;
  min-width: 72px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.vis-chip:hover { background: #f1f5f9; }

.vis-chip.vis-chip-main,
.vis-chip.is-active {
  background: var(--head);
  border-color: var(--head);
  color: #fff;
}

.vis-chip.vis-chip-main:hover,
.vis-chip.is-active:hover {
  background: #364a5e;
}

.vis-chip .n { display: block; font-size: 18px; font-weight: 600; line-height: 1.2; }
.vis-chip .l { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.85; }
.vis-chip.vis-chip-main .l,
.vis-chip.is-active .l { opacity: 0.9; }

.visitors-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.visitors-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#visitorListWrap[hidden],
.visitor-detail[hidden] {
  display: none !important;
}

.visitors-widget.is-detail #visitorListWrap {
  display: none !important;
}

.visitors-widget:not(.is-detail) #visitorDetail {
  display: none !important;
}

.visitors-stage .feed-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  scrollbar-width: thin;
}

.feed li.feed-row {
  flex-direction: column;
  align-items: stretch;
  padding: 11px 14px;
  min-height: 50px;
  cursor: pointer;
  transition: background 0.12s;
}

.feed li.feed-row:hover { background: #f8fafc; }
.feed li.feed-row.active { background: #eef4fc; }

.feed .feed-chevron {
  margin-left: auto;
  color: #cbd5e1;
  font-size: 14px;
  flex-shrink: 0;
}

.feed .feed-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-soft);
}

.feed .feed-icons .fi-dev { font-size: 13px; }

.feed .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }

.feed .page-title {
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.feed .sub {
  font-size: 11px;
  color: var(--text-soft);
  line-height: 1.4;
  word-break: break-word;
}

.feed .time { font-size: 11px; color: var(--text-soft); white-space: nowrap; }

.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
}

.tag.new { background: #e8f5e9; color: #2e7d32; }
.tag.ret { background: #e3f2fd; color: #1565c0; }

.tag.visitor-new { background: transparent; color: #2e7d32; padding: 0; font-size: 11px; text-transform: none; font-weight: 600; }
.tag.visitor-ret { background: transparent; color: #1565c0; padding: 0; font-size: 11px; text-transform: none; font-weight: 600; }

/* Visitor detail (GoSquared) */
.visitor-detail {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}


.vd-back {
  margin: 10px 12px 0;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.vd-id {
  padding: 8px 14px 4px;
  font-size: 11px;
  color: var(--text-soft);
  word-break: break-all;
}

.vd-icons {
  padding: 0 14px 10px;
  display: flex;
  gap: 10px;
  font-size: 16px;
  align-items: center;
}

.vd-tabs {
  display: flex;
  flex-shrink: 0;
  margin: 0 12px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: visible;
  gap: 0;
}

.vd-tab {
  flex: 1;
  margin: 0;
  padding: 10px 8px;
  border: none;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  box-sizing: border-box;
}

.vd-tab.active {
  background: var(--head);
  color: #fff;
}

.vd-pane {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 14px 16px;
  font-size: 12px;
}

.vd-pane[hidden] { display: none !important; }

.vd-loading,
.vd-empty {
  padding: 16px 0;
  color: var(--text-soft);
  font-size: 13px;
  margin: 0;
}

.vd-entry {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.vd-entry-ico { font-size: 18px; line-height: 1; }

.vd-entry strong { display: block; font-size: 13px; margin-bottom: 2px; }

.vd-session-dur {
  margin: 0 0 10px;
  padding: 8px 10px;
  font-size: 11px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.vd-session-dur strong { color: var(--text); }

.visitor-detail .vd-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 8px;
  border-left: 2px solid #e2e8f0;
}

.visitor-detail .vd-timeline li {
  position: relative;
  display: block;
  padding: 0 0 14px 14px;
  border: none;
  min-height: 0;
  cursor: default;
  justify-content: flex-start;
  align-items: stretch;
}

.visitor-detail .vd-timeline .tl-time {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.visitor-detail .vd-timeline .tl-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.35;
  white-space: normal;
}

.visitor-detail .vd-timeline .tl-path {
  font-size: 11px;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.35;
}

.vd-timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e2e8f0;
}

.vd-timeline li:first-child::before { background: #64748b; }

.vd-timeline .tl-time {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 2px;
}

.vd-timeline .tl-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.35;
}

.vd-timeline .tl-path {
  font-size: 11px;
  color: var(--accent);
  word-break: break-all;
}

.vd-kv { width: 100%; border-collapse: collapse; }

.vd-kv th,
.vd-kv td {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-weight: 400;
}

.vd-kv th {
  width: 42%;
  color: var(--text-soft);
  padding-right: 10px;
}

/* Trends */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filters .btn,
.btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.filters .btn:hover,
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--sp-primary-soft);
}

.filters .btn.active,
.btn.active,
.btn-blue {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filters .btn.active:hover,
.btn-blue:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.filters input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
}

.trends-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.trends-kpi {
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}

.trends-kpi:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.trends-kpi.is-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6, 0 4px 12px rgba(59, 130, 246, 0.12);
}

.trends-kpi-lbl {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.trends-kpi-val {
  display: block;
  font-size: 28px;
  font-weight: 300;
  color: #1e293b;
  line-height: 1.1;
}

.trends-kpi.is-active .trends-kpi-val { color: #1e40af; }

.trends-kpi-sub {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .trends-kpi-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .trends-kpi-row { grid-template-columns: 1fr; }
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px 20px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.kpi .lbl { font-size: 12px; color: var(--text-soft); margin-bottom: 8px; }
.kpi .val { font-size: 32px; font-weight: 300; color: var(--text); }

.trends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.trends-grid .span-all { grid-column: 1 / -1; }

.err-banner {
  background: #fef2f2;
  color: #b91c1c;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
  border: 1px solid #fecaca;
}

.empty { padding: 20px 16px; color: var(--text-soft); font-size: 13px; text-align: center; }

/* —— Kurumsal uyum (manage eski sınıflar) —— */
.manage-main { margin-left: var(--sidebar-width); padding: 28px 32px 48px; max-width: 1080px; }
.acc-main { margin-left: var(--sidebar-width); padding: 28px 32px 48px; max-width: 560px; }

.panel.is-success {
  background: #f0fdf4;
  border-color: #86efac;
}

.panel pre {
  white-space: pre-wrap;
  font-size: 13px;
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--text-secondary);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.list { list-style: none; margin: 0; padding: 0; }

@media (max-width: 1400px) {
  .now-section--quad { grid-template-columns: repeat(2, 1fr); }
  .now-layout { grid-template-columns: 1fr 340px; }
}

@media (max-width: 1100px) {
  .now-layout { grid-template-columns: 1fr; }
  .now-hero { grid-template-columns: 1fr; }
  .now-section--split,
  .now-section--two { grid-template-columns: 1fr; }
  .now-section--quad { grid-template-columns: repeat(2, 1fr); }
  .visitors-panel { position: static; }
  .widget-grid { grid-template-columns: repeat(2, 1fr); }
  .top-strip { grid-template-columns: 1fr; }
  .live-pair-grid { grid-template-columns: 1fr; }
  .widget-live-pair { grid-column: span 2; }
}

@media (max-width: 700px) {
  .sidebar { width: 56px; }
  .sidebar-brand, .sidebar-site, .nav .lbl, .sidebar-foot { display: none; }
  .main, .sp-page, .manage-main, .acc-main { margin-left: 56px; padding: 16px; }
  .now-hero,
  .now-section--split,
  .now-section--quad,
  .now-section--two { grid-template-columns: 1fr; }
  .widget-grid, .trends-grid { grid-template-columns: 1fr; }
  .sp-grid-2, .row2 { grid-template-columns: 1fr; }
}
