/* Runnex Admin — uygulamayla aynı koyu tema ve limon yeşili vurgu. */
:root {
  --bg: #0b0c0f;
  --card: #16171c;
  --card-2: #1d1f25;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f4f5f7;
  --muted: rgba(255, 255, 255, 0.58);
  --faint: rgba(255, 255, 255, 0.35);
  --accent: #c6f432;
  --on-accent: #0b0c0f;
  --run: #c6f432;
  --walk: #5ac8fa;
  --cycle: #ff9f0a;
  --danger: #ff453a;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* --- Üst bar --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: rgba(11, 12, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.2px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; font-weight: 900; font-size: 15px;
}
.brand small { color: var(--faint); font-weight: 600; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.active { background: var(--accent); color: var(--on-accent); }
.who { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; white-space: nowrap; }

/* --- Sayfa --- */
main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
h1 { font-size: 30px; line-height: 1.1; margin: 0; letter-spacing: -0.5px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 6px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.card { background: var(--card); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: grid; gap: 14px; }

/* --- Sayılar --- */
.metric-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.metric {
  font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-top: 4px;
  font-variant-numeric: tabular-nums; font-stretch: condensed;
}
.metric small { font-size: 15px; color: var(--muted); font-weight: 700; letter-spacing: 0; margin-left: 3px; }
.metric-sub { color: var(--faint); font-size: 13px; margin-top: 2px; }
.metric-sub b { color: var(--accent); font-weight: 700; }

/* --- 30 günlük grafik (sadece CSS) --- */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: 8px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; position: relative; }
.chart .bar span {
  display: block; background: var(--accent); border-radius: 4px 4px 2px 2px; min-height: 2px; opacity: 0.9;
}
.chart .bar.empty span { background: var(--line); }
.chart .bar:hover span { opacity: 1; filter: brightness(1.1); }
.chart .bar .tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--card-2); border: 1px solid var(--line); padding: 6px 10px; border-radius: 10px;
  font-size: 12px; white-space: nowrap; z-index: 2;
}
.chart .bar:hover .tip { display: block; }
.chart-axis { display: flex; justify-content: space-between; color: var(--faint); font-size: 12px; margin-top: 8px; }

/* --- Türlere göre dağılım --- */
.split-row { display: grid; gap: 6px; }
.split-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; }
.track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 999px; }

/* --- Tablolar --- */
.table-card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; letter-spacing: 0.6px;
  text-transform: uppercase; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--card-2); }
td.num, th.num { text-align: right; }
.empty-row td { text-align: center; color: var(--muted); padding: 40px 16px; white-space: normal; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--card-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.run { color: var(--run); }
.badge.walk { color: var(--walk); }
.badge.cycle { color: var(--cycle); }
.badge.ok { color: var(--accent); }
.badge.bad { color: var(--danger); }

/* --- Filtre çipleri ve sayfalama --- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--card); color: var(--muted); font-weight: 600; font-size: 14px; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--text); color: var(--bg); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: var(--muted); font-size: 14px; }

/* --- Butonlar ve formlar --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--card-2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px;
}
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: rgba(255, 69, 58, 0.14); color: var(--danger); }
.btn.ghost { background: transparent; color: var(--muted); padding: 0 10px; height: 32px; }
.btn.ghost:hover { color: var(--text); }
.btn.block { width: 100%; height: 48px; font-size: 15px; }

label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="password"] {
  width: 100%; height: 48px; padding: 0 16px; border-radius: 14px;
  background: var(--card-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 16px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.alert { padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.alert.error { background: rgba(255, 69, 58, 0.12); color: #ff7a72; }
.alert.success { background: rgba(198, 244, 50, 0.1); color: var(--accent); }

/* --- Giriş sayfası --- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { justify-content: center; margin-bottom: 28px; font-size: 20px; }
.login-card .brand-mark { width: 36px; height: 36px; font-size: 19px; border-radius: 10px; }
.login-card form { display: grid; gap: 16px; }
.login-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 18px; }

/* --- Detay sayfaları --- */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
#map { height: 420px; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.map-note { display: grid; place-items: center; height: 200px; color: var(--muted); }
.danger-zone { border: 1px solid rgba(255, 69, 58, 0.25); }
.back { color: var(--muted); font-size: 14px; font-weight: 600; display: inline-block; margin-bottom: 14px; }
.back:hover { color: var(--text); }

.check { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: none; }

/* --- Telefon --- */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .nav { order: 3; flex-basis: 100%; }
  .who span { display: none; }
  .who { margin-left: auto; }
  main { padding: 20px 16px 48px; }
  h1 { font-size: 26px; }
  .metric { font-size: 28px; }
  .card { padding: 16px; }
  .chart { gap: 2px; height: 120px; }
  #map { height: 320px; }
}
