/* AI-RepoRadar — Seçenek B: Koyu Analitik Radar Ana Stil Dosyası */

:root {
  /* Yüzey hiyerarşisi (Koyu — Varsayılan) */
  --bg: #070b14;
  --surface: #0e1525;
  --surface-2: #151f35;
  --surface-hover: #1a2640;
  --border: #1e2d4a;
  --border-strong: #2d4269;

  /* Tipografi renkleri (WCAG AA güvenli) */
  --text: #e8eefc;
  --text-2: #9db0d1;
  --text-3: #7d92b8;

  /* Marka / Etkileşim vurgusu */
  --cyan: #38bdf8;
  --cyan-text-on: #061220;
  --cyan-bg: rgba(56, 189, 248, 0.12);
  --cyan-border: rgba(56, 189, 248, 0.35);

  /* Durum renkleri: Lisans & Skor */
  --green: #34d399;
  --green-bg: rgba(16, 185, 129, 0.14);
  --green-border: rgba(52, 211, 153, 0.35);

  --teal: #2dd4bf;
  --teal-bg: rgba(45, 212, 191, 0.12);
  --teal-border: rgba(45, 212, 191, 0.35);

  --amber: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(251, 191, 36, 0.35);

  --red: #fb7185;
  --red-bg: rgba(244, 63, 94, 0.14);
  --red-border: rgba(251, 113, 133, 0.38);

  /* Gölgeler & Katmanlar */
  --shadow-dock: 0 12px 32px rgba(0, 0, 0, 0.50);
  --shadow-modal: 0 20px 48px rgba(0, 0, 0, 0.65);
  --backdrop: rgba(2, 6, 15, 0.74);

  /* Tipografi */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;

  --text-xs: 0.72rem;
  --text-sm: 0.80rem;
  --text-base: 0.875rem;
  --text-md: 1.05rem;
  --text-lg: 1.35rem;
  --text-xl: 1.65rem;

  /* Boşluk & Köşe */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-pill: 999px;

  --container-max: 1520px;
  --rail-w: 240px;
  --inspector-w: 390px;
  --topbar-h: 58px;

  --z-topbar: 40;
  --z-dock: 60;
  --z-drawer: 75;
  --z-modal: 80;
  --z-toast: 90;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-hover: #f1f5f9;
  --border: #cbd5e1;
  --border-strong: #94a3b8;

  --text: #0f172a;
  --text-2: #334155;
  --text-3: #475569;

  --cyan: #0284c7;
  --cyan-text-on: #ffffff;
  --cyan-bg: #e0f2fe;
  --cyan-border: #7dd3fc;

  --green: #047857;
  --green-bg: #d1fae5;
  --green-border: #6ee7b7;

  --teal: #0f766e;
  --teal-bg: #ccfbf1;
  --teal-border: #5eead4;

  --amber: #b45309;
  --amber-bg: #fef3c7;
  --amber-border: #fcd34d;

  --red: #be123c;
  --red-bg: #ffe4e6;
  --red-border: #fda4af;

  --shadow-dock: 0 12px 28px rgba(15, 23, 42, 0.16);
  --shadow-modal: 0 20px 44px rgba(15, 23, 42, 0.22);
  --backdrop: rgba(15, 23, 42, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

/* ===== Üst Komut Çubuğu ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-topbar);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.radar-dot {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--green-border);
  background: var(--green-bg);
  color: var(--green);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.live-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  padding: 2px 6px;
  border-radius: 4px;
}

.search-box {
  flex: 1 1 200px;
  min-width: 180px;
  max-width: 380px;
  position: relative;
}

.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.84rem;
}

.search-box input:focus {
  border-color: var(--cyan);
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 0.85rem;
  pointer-events: none;
}

.seg {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.seg button, .seg a {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.seg button:hover, .seg a:hover {
  color: var(--text);
}

.seg button.active, .seg a.active {
  background: var(--surface-2);
  color: var(--cyan);
}

.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

/* ===== Düğmeler & Rozetler ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}

.btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.btn-cyan {
  background: var(--cyan);
  color: var(--cyan-text-on);
  border-color: var(--cyan);
  font-weight: 700;
}

.btn-cyan:hover:not(:disabled) {
  background: var(--cyan);
  border-color: var(--cyan);
  filter: brightness(1.08);
}

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.btn-danger:hover:not(:disabled) {
  background: var(--red-bg);
  filter: brightness(1.1);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.badge {
  background: var(--red);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  line-height: 1.4;
}

.badge-cyan {
  background: var(--cyan-bg);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-name {
  font-size: 0.8rem;
  color: var(--text-2);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== Telemetri KPI Şeridi ===== */
.kpi-strip {
  max-width: var(--container-max);
  margin: 14px auto 0;
  padding: 0 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-k {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  font-weight: 700;
}

.kpi-v {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-top: 3px;
  color: var(--text);
}

.kpi-v-sm {
  font-size: var(--text-md);
}

.kpi-v-green {
  color: var(--green);
}

.kpi-sub {
  font-size: 0.74rem;
  color: var(--text-2);
  margin-top: 2px;
}

.kpi-sub-cyan {
  color: var(--cyan);
}

.kpi-sub-green {
  color: var(--green);
}

.kpi-sub-amber {
  color: var(--amber);
}

.kpi-sub-red {
  color: var(--red);
}

/* ===== 3 Sütunlu Çalışma Alanı ===== */
.workspace {
  max-width: var(--container-max);
  margin: 14px auto 80px;
  padding: 0 16px;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--inspector-w);
  gap: 14px;
  align-items: start;
}

.page-container {
  max-width: var(--container-max);
  margin: 16px auto 80px;
  padding: 0 16px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.page-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 4px 0 0;
  font-size: var(--text-sm);
  color: var(--text-2);
}

/* ===== Sol Filtre Rayı ===== */
.filter-rail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 70px;
}

.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.rail-title {
  font-size: 0.84rem;
  font-weight: 700;
}

.f-head {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  font-weight: 700;
  margin-bottom: 6px;
}

.f-select, .f-input, .f-textarea {
  width: 100%;
  padding: 0 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: var(--text-sm);
  color: var(--text);
}

.f-select, .f-input {
  height: 38px;
}

.f-textarea {
  padding: 10px;
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.f-select:focus, .f-input:focus, .f-textarea:focus {
  border-color: var(--cyan);
}

.f-select-inline {
  width: auto;
  min-width: 170px;
}

.f-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.81rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
}

.f-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--cyan);
  margin: 0;
  flex-shrink: 0;
}

.date-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 310px;
  overflow-y: auto;
}

.cat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  background: transparent;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  min-height: 34px;
  width: 100%;
}

.cat-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.cat-btn.active {
  background: var(--cyan-bg);
  color: var(--cyan);
  font-weight: 700;
}

.cat-count {
  font-size: var(--text-xs);
  opacity: 0.78;
}

/* ===== Ana Veri Paneli & Tablo ===== */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface-2);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-filter-btn {
  display: none;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.data-table tbody tr:hover {
  background: var(--surface-hover);
}

.data-table tbody tr.selected {
  background: var(--cyan-bg);
}

.repo-cell-title {
  font-weight: 700;
  color: var(--text);
}

.repo-cell-owner {
  color: var(--text-3);
  font-weight: 500;
}

.repo-cell-sum {
  font-size: 0.75rem;
  color: var(--text-2);
  margin-top: 2px;
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-cell-meta {
  font-size: 0.71rem;
  color: var(--text-3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stars-total {
  font-weight: 700;
  color: var(--text);
}

.stars-vel {
  color: var(--green);
  font-size: 0.75rem;
}

.verdict-sub {
  font-size: 0.69rem;
  color: var(--text-3);
  margin-top: 2px;
}

.actions-cell {
  white-space: nowrap;
}

.actions-wrap {
  display: inline-flex;
  gap: 5px;
}

/* ===== Skor & Lisans Rozetleri ===== */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  border: 1px solid transparent;
  white-space: nowrap;
}

.score-pill.high {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.score-pill.mid {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}

.score-pill.low {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.lic-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}

.lic-tag.permissive {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.lic-tag.weak_copyleft {
  background: var(--teal-bg);
  color: var(--teal);
  border-color: var(--teal-border);
}

.lic-tag.copyleft, .lic-tag.agpl {
  background: var(--amber-bg);
  color: var(--amber);
  border-color: var(--amber-border);
}

.lic-tag.restricted, .lic-tag.unknown {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-border);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-size: 0.69rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}

.status-tag.firsat {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}

.status-tag.incelenecek {
  background: var(--cyan-bg);
  color: var(--cyan);
  border-color: var(--cyan-border);
}

.status-tag.pas {
  background: var(--surface-2);
  color: var(--text-3);
  border-color: var(--border);
}

.group-banner {
  background: var(--bg);
  padding: 9px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.group-banner:first-child {
  border-top: 0;
}

/* ===== Sağ Canlı Split Inspector ===== */
.inspector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 86px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ins-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.ins-cat {
  font-size: var(--text-xs);
  color: var(--cyan);
}

.ins-title {
  margin: 3px 0 0;
  font-size: var(--text-md);
  font-weight: 700;
  word-break: break-word;
}

.ins-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ins-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.ins-score-label {
  font-size: 0.7rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ins-score-num {
  font-size: var(--text-xl);
  font-weight: 800;
  line-height: 1.15;
}

.ins-score-num.high { color: var(--green); }
.ins-score-num.mid { color: var(--amber); }
.ins-score-num.low { color: var(--red); }

.ins-score-denom {
  font-size: 0.85rem;
  color: var(--text-3);
  font-weight: 500;
}

.ins-score-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.ins-sec {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 12px;
}

.ins-sec h4 {
  margin: 0 0 6px;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.ins-sec p, .ins-sec li {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.5;
}

.ins-sec p + p, .ins-sec p + ul {
  margin-top: 6px;
}

.ins-sec ul {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 4px;
}

.ins-strong {
  color: var(--text);
  font-weight: 600;
}

.bar-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  margin-bottom: 6px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-track {
  height: 7px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
}

.bar-fill.high { background: var(--green); }
.bar-fill.mid { background: var(--amber); }
.bar-fill.low { background: var(--red); }

.bar-val {
  text-align: right;
  color: var(--text-2);
}

.warn-box {
  padding: 9px 11px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red);
  line-height: 1.45;
}

.warn-box.amber {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber);
}

.info-box {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  background: var(--cyan-bg);
  border: 1px solid var(--cyan-border);
  color: var(--text);
}

.disclaimer-box {
  font-size: 0.74rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  line-height: 1.45;
}

.chart-svg {
  width: 100%;
  height: 76px;
  display: block;
}

.spark-svg {
  display: block;
}

.note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

/* ===== İkon Düğmeler ===== */
.icon-btn {
  min-width: 34px;
  min-height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 0.84rem;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-btn.on {
  border-color: var(--amber-border);
  color: var(--amber);
  background: var(--amber-bg);
}

.icon-btn.cmp {
  border-color: var(--cyan-border);
  color: var(--cyan);
  background: var(--cyan-bg);
}

/* ===== Mobil Kartlar ===== */
.mobile-cards {
  display: none;
}

.m-card {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.m-card:hover {
  background: var(--surface-hover);
}

.m-card.selected {
  background: var(--cyan-bg);
}

.m-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.m-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  word-break: break-word;
}

.m-card-sum {
  font-size: 0.81rem;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.76rem;
}

.m-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Sayfalama & Durumlar ===== */
.pagination {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: var(--text-sm);
}

.state-box {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-box.error {
  color: var(--red);
}

.skeleton-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.skeleton-row {
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  animation: radar-pulse 1.3s ease-in-out infinite;
}

@keyframes radar-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

/* ===== Karşılaştırma Alt Çubuğu ===== */
.compare-dock {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: var(--z-dock);
  background: var(--surface-2);
  border: 1px solid var(--cyan);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-dock);
}

.compare-dock.show {
  display: flex;
}

/* ===== Overlay Modallar & Çekmece Arka Planı ===== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  z-index: 70;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.overlay {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(3px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.overlay.open {
  display: flex;
}

.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-modal);
}

.modal-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.quota-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.muted-note {
  font-size: 0.76rem;
  color: var(--text-3);
  margin: 0;
}

/* ===== Tam Sayfa Depo Detay (/repo/{owner}/{name}) ===== */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}

.detail-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.detail-card h3 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3);
}

.detail-card p, .detail-card li {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

.detail-card p + p, .detail-card p + ul {
  margin-top: 8px;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  font-size: var(--text-sm);
  color: var(--text-2);
}

/* ===== Karşılaştırma Tablosu (/karsilastir) ===== */
.compare-scroll {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: var(--text-sm);
}

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

.compare-table th:first-child, .compare-table td:first-child {
  position: sticky;
  left: 0;
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  width: 170px;
  z-index: 2;
}

.compare-best {
  border-top: 3px solid var(--green) !important;
}

/* ===== İzleme Listesi (/izleme) ===== */
.bookmark-list {
  display: grid;
  gap: 12px;
}

.bookmark-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: grid;
  gap: 10px;
}

.bookmark-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Toast Bildirimi ===== */
.toast-region {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-dock);
  pointer-events: auto;
}

.toast.success {
  border-color: var(--green-border);
  color: var(--green);
}

.toast.error {
  border-color: var(--red-border);
  color: var(--red);
}

/* ===== Duyarlı Tasarım (Tablet & Mobil 390px) ===== */
@media (max-width: 1199px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inspector {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    max-height: 100vh;
    width: min(440px, 100%);
    z-index: var(--z-drawer);
    border-radius: 0;
    display: none;
  }
  .inspector.mobile-open {
    display: flex;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .topbar-inner {
    padding: 8px 12px;
    gap: 8px;
  }
  .search-box {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }
  .period-seg {
    order: 4;
    width: 100%;
  }
  .period-seg button {
    flex: 1;
  }
  .kpi-strip {
    padding: 0 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .workspace, .page-container {
    padding: 0 12px;
    grid-template-columns: 1fr;
  }
  .filter-rail {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: var(--z-drawer);
    border-radius: 0;
    overflow-y: auto;
  }
  .filter-rail.mobile-open {
    display: flex;
  }
  .mobile-filter-btn {
    display: inline-flex;
  }
  .data-table {
    display: none;
  }
  .mobile-cards {
    display: block;
  }
  .inspector {
    inset: 0;
    width: 100%;
    max-width: 100%;
  }
  .btn, .icon-btn, .seg button, .cat-btn {
    min-height: 44px;
  }
  .icon-btn {
    min-width: 44px;
  }
  .compare-dock {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }
}
