/* Merkezi Atama Tercih Robotu — statik sürüm */

:root {
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem 2rem; }

.seo-block {
  font-size: 0.9375rem;
  color: #334155;
}
.seo-intro {
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0 0.5rem;
}
.seo-intro h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  color: var(--text);
}
.seo-intro p { margin: 0; max-width: 52rem; line-height: 1.6; }
.seo-faq {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.seo-faq h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  color: var(--text);
}
.seo-faq ol { margin: 0 0 1.5rem; padding-left: 1.25rem; }
.seo-faq li { margin-bottom: 0.35rem; }
.seo-faq details {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
}
.seo-faq summary { cursor: pointer; font-weight: 600; color: #1e293b; }
.seo-faq details p { margin: 0.5rem 0 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f1f5f9; }
.btn-danger { color: #dc2626; border-color: #fecaca; }

.input, .select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
}

.input:focus, .select:focus, textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.label { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.25rem; }

.grid-main {
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .grid-main { grid-template-columns: 280px 1fr; }
}

.sidebar { display: flex; flex-direction: column; gap: 1rem; }

.tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
}

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

.badge {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
}

.badge-active { background: var(--brand); color: #fff; }

.summary-box {
  background: #eff6ff;
  color: #1e40af;
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
}

.map-wrap { padding: 0.5rem; overflow: hidden; }

.map-wrap svg { width: 100%; height: auto; display: block; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.legend-bar { display: flex; gap: 2px; }
.legend-bar span { width: 1.5rem; height: 0.75rem; border-radius: 2px; }

.table-wrap { max-height: 480px; overflow: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { position: sticky; top: 0; background: #f8fafc; z-index: 1; }
th { text-align: left; padding: 0.5rem 0.75rem; font-size: 0.7rem; text-transform: uppercase; color: var(--muted); }
td { padding: 0.5rem 0.75rem; border-top: 1px solid #f1f5f9; vertical-align: top; }
tr:hover td { background: #f8fafc; }

.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.empty {
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.fav-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.footer-note {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Admin */
.admin-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.admin-login .card { width: 100%; max-width: 400px; padding: 1.5rem; }

.ilan-card { border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; margin-top: 1rem; }
.ilan-card.active { border-color: #93c5fd; background: #eff6ff55; }

.upload-grid { display: grid; gap: 0.75rem; margin-top: 1rem; }
@media (min-width: 640px) { .upload-grid { grid-template-columns: repeat(3, 1fr); } }

.upload-box {
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #fff;
  font-size: 0.875rem;
}

.upload-box:hover { border-color: #60a5fa; }

.upload-box-active {
  border-style: solid;
  border-color: #93c5fd;
  background: #fff;
  cursor: pointer;
  min-height: 130px;
}

.upload-box-active:hover { border-color: #2563eb; background: #eff6ff; }
.upload-ready-hint {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #166534;
}

.upload-box-active input[type="file"] {
  display: block;
  margin-top: 0.75rem;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1d4ed8;
  cursor: pointer;
  padding: 0.35rem 0;
}

.upload-nitelik { display: block; margin-top: 0.75rem; border-color: #86efac; background: #f0fdf4; }
.upload-nitelik:hover { border-color: #22c55e; background: #ecfdf5; }

.upload-hint { font-size: 0.75rem; color: #94a3b8; margin-top: 0.25rem; }
.upload-icon { font-size: 1.5rem; margin-bottom: 0.25rem; }

.upload-disabled .upload-box { opacity: 0.55; pointer-events: none; }

.upload-placeholder {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: #92400e;
}

.admin-step { position: relative; padding-left: 3.5rem !important; }
.step-badge {
  position: absolute; left: 1rem; top: 1.25rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #e2e8f0; color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.step-badge-blue { background: #dbeafe; color: #1d4ed8; }
.step-badge-green { background: #bbf7d0; color: #166534; }

.admin-step-excel { border-width: 2px !important; }

.status { font-size: 0.75rem; color: var(--brand); margin-top: 0.35rem; }
.error { color: #dc2626; font-size: 0.875rem; }
.success { color: #15803d; font-size: 0.875rem; }

.hidden { display: none !important; }

header h1,
header .app-title { margin: 0.25rem 0 0; font-size: 1.5rem; }
header .subtitle { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--muted); max-width: 48rem; }
header .brand { font-size: 0.875rem; font-weight: 600; color: var(--brand); }

.stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.stat-pill { font-size: 0.75rem; background: #fff; border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.25rem 0.5rem; }

.toolbar-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

.filter-title { font-size: 0.875rem; font-weight: 600; color: #334155; }
.filter-hint { font-size: 0.8rem; color: var(--muted); margin: 0.25rem 0 0.75rem; }
.section-title { margin: 1rem 0 0.5rem; font-size: 1rem; }

.sub { font-size: 0.75rem; color: #94a3b8; }

.nit-help-box {
  margin-top: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fafafa;
}
.nit-help-box summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d4ed8;
  list-style: none;
}
.nit-help-box summary::-webkit-details-marker { display: none; }
.nit-help-box[open] summary { margin-bottom: 0.25rem; }

.unvan-sonuc-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: 220px; overflow: auto; }
.unvan-sonuc-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  text-align: left;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.78rem;
}
.unvan-sonuc-item:hover { border-color: #93c5fd; background: #eff6ff; }
.unvan-sonuc-kod { font-weight: 700; color: #1d4ed8; font-variant-numeric: tabular-nums; }
.unvan-sonuc-text { color: #334155; line-height: 1.35; }
.unvan-sonuc-src { font-size: 0.68rem; color: #94a3b8; }

.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.ozet-card { padding: 1rem 1rem 0.5rem; }
.ozet-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}
.ozet-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.9rem;
}
.ozet-total-kont { color: #1d4ed8; }
.ozet-table tbody tr.ozet-row { cursor: pointer; }
.ozet-table tbody tr.ozet-row:hover { background: #eff6ff; }
.ozet-table .ozet-num { color: #94a3b8; font-size: 0.8rem; }
.ozet-table tfoot .ozet-footer { background: #f1f5f9; }
.ozet-table tfoot td { border-top: 2px solid var(--border); padding: 0.65rem 0.5rem; }

.btn-icon { background: none; border: 1px solid var(--border); border-radius: 0.35rem; padding: 0.1rem 0.35rem; cursor: pointer; font-size: 0.75rem; }
.btn-danger-text { color: #dc2626; border-color: #fecaca; }

.nit-cell { font-size: 0.75rem; }
.osym-cell { white-space: nowrap; }
.osym-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: #92400e;
}
.osym-copy:hover { background: #fef3c7; border-color: #f59e0b; }
.osym-copy.copied { background: #dcfce7; border-color: #86efac; color: #166534; }
.osym-code { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.copy-label { font-size: 0.7rem; font-weight: 500; opacity: 0.85; }

.nit-badge {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 0.35rem;
  padding: 0.1rem 0.4rem;
  margin: 0.1rem 0.15rem 0.1rem 0;
  font-size: 0.75rem;
  cursor: pointer;
}
.nit-badge.has-desc { background: #dbeafe; font-weight: 600; }
.nit-badge:hover { background: #3b82f6; color: #fff; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem;
}
.modal-card {
  background: #fff; border-radius: 1rem; max-width: 520px; width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15); overflow: hidden;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { margin: 0; font-size: 1rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #94a3b8; line-height: 1; }
.modal-body { padding: 1.25rem; font-size: 0.9rem; line-height: 1.6; }
.modal-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; margin: 0 0 0.5rem; }
.modal-text { margin: 0; white-space: pre-wrap; }
.modal-text.muted { color: var(--muted); }
.modal-footer { padding: 0 1.25rem 1.25rem; }
