:root {
  --ink: #122033;
  --mute: #66758a;
  --line: #e6ebf2;
  --bg: #f3f5f9;
  --card: #ffffff;
  --navy: #0f1c2e;
  --orange: #ff6a1a;
  --orange-deep: #e2550c;
  --green: #16a34a;
  --red: #dc3d3d;
  --blue: #2563eb;
  --amber: #f59e0b;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: var(--blue); }
.hidden { display: none !important; }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 56px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 16px;
}
.project-select {
  width: auto;
  min-width: 200px;
  max-width: 280px;
  background: #1b2b44;
  color: #fff;
  border: 1px solid #3a4d6a;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
.topbar .logo { font-weight: 800; letter-spacing: -0.04em; font-size: 18px; }
.topbar .logo span { color: var(--orange); }
.topbar nav { display: flex; gap: 18px; font-size: 13px; }
.topbar nav a { color: #cdd6e4; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.topbar .who-chip { font-size: 12px; color: #cdd6e4; }
.topbar .btn { background: var(--orange); color: #fff; border-color: transparent; }

.layout { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 56px); }
.side {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px 12px 32px;
}
.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mute);
  padding: 14px 10px 6px;
}
.nav a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
}
.nav a.on, .nav a:hover { background: #fff4ec; color: var(--orange-deep); }
.scan-btn { width: 100%; margin: 0 0 8px; }
#scan-meta { padding: 0 10px 8px; }

.main { padding: 28px 32px 72px; max-width: 1240px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0 0 20px; }
.kpi, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.kpi b { display: block; font-size: 26px; letter-spacing: -0.03em; }
.kpi span, .lead { color: var(--mute); font-size: 13px; }
h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.03em; }
h2 { margin: 0 0 12px; font-size: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; }

.btn, button.btn {
  appearance: none;
  border: 0;
  background: var(--orange);
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  display: inline-block;
}
button.ghost, a.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: 0.55; cursor: wait; }

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 10px;
}
label { display: block; font-size: 12px; margin: 0 0 6px; color: var(--mute); }
.row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.row button { flex: 0 0 auto; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--mute); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.up { color: var(--green); font-weight: 700; }
.down { color: var(--red); font-weight: 700; }
.pill { display: inline-block; font-size: 12px; padding: 4px 8px; border-radius: 999px; background: #eef6ff; }
.pill.warn { background: #fff4e5; color: #9a5b00; }
.pill.ok { background: #e9f8ee; color: var(--green); }
.pill.bad { background: #fdecec; color: var(--red); }

.insight { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.insight:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer; }
.chip.on { background: #fff4ec; border-color: #ffd2b3; color: var(--orange-deep); font-weight: 700; }
.geo-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; font-size: 12px; color: var(--mute); }
.geo-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; }
.geo-chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-top: 8px; }
.geo-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.geo-stack { flex: 1; width: 100%; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.geo-stack b { display: block; width: 100%; min-height: 0; }
.geo-col span { font-size: 10px; color: var(--mute); margin-top: 6px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.bar-row em { flex: 0 0 36px; font-style: normal; color: var(--mute); }
.bar-row u { flex: 1; height: 8px; background: #eef2f7; border-radius: 99px; text-decoration: none; }
.bar-row u i { display: block; height: 8px; border-radius: 99px; background: var(--orange); }

.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.dl dt { color: var(--mute); }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 10px; }
.alert.warn { background: #fff4e5; }
.alert.ok { background: #e9f8ee; }

.comp-card { margin-bottom: 12px; cursor: pointer; }
.comp-card:hover { border-color: #ffd2b3; }
.comp-meta { display: flex; gap: 24px; margin: 12px 0; }
.comp-meta b { display: block; font-size: 22px; }
.comp-pages { color: var(--mute); font-size: 12px; }
.comp-pages div { margin-top: 2px; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin: 8px 0 4px; }
.bars i { display: block; width: 18px; background: #ffd2b3; border-radius: 4px 4px 0 0; }

.issue { cursor: pointer; }
.issue.done h3 { text-decoration: line-through; color: var(--mute); }
.issue h3 { margin: 0 0 6px; font-size: 16px; }
.issue-detail .imp, .check-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 10px 0;
  background: #fff;
}
.check-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.check-row.ok { background: #e9f8ee; }
.check-row.fail { background: #fff8e8; }
.check-row.bad { background: #fdecec; }
.why, .next { font-size: 13px; color: var(--mute); margin: 6px 0; }
.probe { font-family: Consolas, monospace; font-size: 12px; background: var(--navy); color: #e7f8ea; padding: 10px; border-radius: 10px; white-space: pre-wrap; }
.warn { background: #fff4e5; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-top: 8px; }
.steps { color: var(--mute); line-height: 1.55; }
.group-title { margin: 18px 0 8px; font-size: 16px; }
.plan { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.plan ul { margin: 8px 0; padding-left: 18px; }
.plan .pill { margin: 0 6px 6px 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 13px; }
.check { display: flex; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--navy);
}
.login-copy {
  padding: 48px 40px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.login-copy-inner { width: min(460px, 100%); }
.login-copy h1 {
  font-size: 40px;
  line-height: 1.15;
  max-width: none;
  color: #fff;
  margin: 0 0 28px;
}
.login-copy .kicker {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  margin-bottom: 18px;
}
.login-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.login-features li {
  width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
  animation: feature-glow 2.8s ease-in-out infinite;
}
.login-features li:nth-child(1) { animation-delay: 0s; }
.login-features li:nth-child(2) { animation-delay: 0.35s; }
.login-features li:nth-child(3) { animation-delay: 0.7s; }
.login-features li:nth-child(4) { animation-delay: 1.05s; }
.login-features li:nth-child(5) { animation-delay: 1.4s; }
@keyframes feature-glow {
  0%, 100% { opacity: 0.45; box-shadow: none; border-color: rgba(255, 255, 255, 0.14); }
  50% {
    opacity: 1;
    border-color: rgba(255, 106, 26, 0.85);
    box-shadow: 0 0 18px rgba(255, 106, 26, 0.45);
  }
}
.login-box { display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg); }
.login-box form {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.login-box h2 { margin: 0; }
.err { color: var(--red); font-size: 13px; min-height: 18px; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 28, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}
.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  max-height: 90vh;
  overflow: auto;
}
.modal-card .chip { margin: 0 8px 8px 0; }

.scan-h { margin: 22px 0 10px; font-size: 16px; }
.scan-live {
  background: #0f1c2e;
  color: #fff;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  min-height: 72px;
}
.scan-live p { margin: 6px 0; opacity: 0.4; }
.scan-live p.on { opacity: 1; color: #ffd7bf; }
.scan-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  animation: scan-in 0.45s ease both;
}
.scan-card.kritik { border-left: 4px solid var(--red); }
.scan-card.uyari { border-left: 4px solid var(--amber); }
.scan-card.firsat { border-left: 4px solid var(--green); }
.scan-card.pulse { animation: scan-in 0.45s ease both, feature-glow 2.4s ease-in-out 1; }
@keyframes scan-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.scan-card .why, .scan-card .next { margin: 6px 0 0; font-size: 13px; color: var(--mute); }
.scan-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .layout, .kpis, .split, .login-wrap, .checks, .plan-grid { grid-template-columns: 1fr; }
  .main { padding: 20px 14px; }
  .login-copy { padding: 28px 20px; }
  .login-copy h1 { font-size: 28px; }
}
