/**
 * Zyron CRM — SEO Sıra Takip (/sira-takip)
 *
 * Klasik SEO aracı görünümü: beyaz zemin, ince satır çizgileri, sıkı yerleşim.
 * Tablo kartı istenen "beyaz zemin" için temadan bağımsız kendi açık paletini
 * kullanır; modallar uygulama temasını izler. Grafik/gradient/animasyon yok.
 */

.srt-page { padding-top: var(--space-4); }

.srt {
  --srt-bg: #ffffff;
  --srt-head: #f8f9fa;
  --srt-border: #e5e7eb;
  --srt-line: #eef0f2;
  --srt-hover: #f7f8f9;
  --srt-text: #111827;
  --srt-sub: #4b5563;
  --srt-muted: #6b7280;
  --srt-faint: #9ca3af;
  --srt-up: #16a34a;
  --srt-down: #dc2626;
  --srt-link: #2563eb;

  background: var(--srt-bg);
  color: var(--srt-text);
  border: 1px solid var(--srt-border);
  border-radius: 8px;
  font-size: 13px;
  overflow: hidden;
}

/* ── Başlık ─────────────────────────────────────────────────────────────── */
.srt__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 14px 16px 4px;
}
.srt__title { margin: 0; font-size: 15px; font-weight: 600; color: var(--srt-text); }
.srt__meta { font-size: 11.5px; color: var(--srt-muted); }

/* ── Araç çubuğu ────────────────────────────────────────────────────────── */
.srt__toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 16px 12px;
}
.srt__tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-wrap: wrap;
}

.srt-seg {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 6px;
  padding: 2px;
}
.srt-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 11px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--srt-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.srt-seg__btn i { font-size: 14px; }
.srt-seg__btn:hover { color: var(--srt-text); }
.srt-seg__btn.is-active {
  background: var(--srt-bg);
  color: var(--srt-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.srt-input {
  height: 30px;
  border: 1px solid var(--srt-border);
  border-radius: 6px;
  background: var(--srt-bg);
  color: var(--srt-text);
  font: inherit;
  font-size: 12px;
  padding: 0 8px;
  outline: none;
}
.srt-input:focus { border-color: #9ca3af; }
.srt-input--select { min-width: 130px; cursor: pointer; }

.srt-search { position: relative; display: inline-flex; align-items: center; margin: 0; }
.srt-search i {
  position: absolute;
  left: 8px;
  font-size: 14px;
  color: var(--srt-faint);
  pointer-events: none;
}
.srt-search .srt-input { width: 210px; padding-left: 27px; }

.srt-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--srt-border);
  border-radius: 6px;
  background: var(--srt-bg);
  color: var(--srt-muted);
  font-size: 16px;
  cursor: pointer;
}
.srt-icon-btn:hover { color: var(--srt-text); background: var(--srt-hover); }
.srt-icon-btn:disabled { cursor: default; opacity: 0.7; }
.srt-icon-btn.is-spinning i { animation: srt-spin 1s linear infinite; }
@keyframes srt-spin { to { transform: rotate(360deg); } }

.srt-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--srt-border);
  border-radius: 6px;
  background: var(--srt-bg);
  color: var(--srt-sub);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.srt-add-btn i { font-size: 15px; }
.srt-add-btn:hover { color: var(--srt-text); border-color: #cfd4da; }

.srt__bulk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--srt-sub);
  background: #f3f6fb;
  border-radius: 6px;
  padding: 4px 10px;
}
.srt__bulk[hidden] { display: none; }

.srt-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--srt-link);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.srt-link:hover { text-decoration: underline; }
.srt-link--danger { color: var(--srt-down); }

.srt__notice {
  margin: 0 16px 10px;
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.srt__notice[hidden] { display: none; }
.srt__notice.is-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.srt__notice a { color: inherit; text-decoration: underline; }
.srt__notice i { vertical-align: -2px; }

/* ── Tablo ──────────────────────────────────────────────────────────────── */
.srt-table-wrap {
  position: relative;   /* gizli etiket (.srt-sr) kaydırma kutusunun dışına taşmasın */
  overflow-x: auto;
  border-top: 1px solid var(--srt-border);
  -webkit-overflow-scrolling: touch;
}
.srt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.srt-table th {
  background: var(--srt-head);
  color: var(--srt-muted);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--srt-border);
  white-space: nowrap;
  user-select: none;
}
.srt-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--srt-line);
  vertical-align: middle;
  color: var(--srt-text);
}
.srt-table tbody tr:hover td { background: var(--srt-hover); }
.srt-table tbody tr:last-child td { border-bottom: 0; }
.srt-table .num { text-align: center; white-space: nowrap; }

.srt-sortable { cursor: pointer; }
.srt-sortable:hover { color: var(--srt-text); }
.srt-sortable.is-sorted { color: var(--srt-text); }
.srt-sortable.is-sorted::after { content: ' \2191'; font-size: 10px; }
.srt-sortable.is-sorted.is-desc::after { content: ' \2193'; }

.srt-col-check { width: 34px; padding-right: 0 !important; }
.srt-col-check input { vertical-align: middle; cursor: pointer; }
.srt-col-act { width: 44px; text-align: right !important; }

.srt-kw { min-width: 220px; max-width: 520px; }
.srt-kw__line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.srt-kw__text { font-weight: 500; color: var(--srt-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srt-kw__url {
  margin: 1px 0 0 21px;
  font-size: 11.5px;
  color: var(--srt-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srt-flag { flex: none; border-radius: 1.5px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); }
.srt-tag {
  flex: none;
  font-size: 10px;
  line-height: 16px;
  padding: 0 5px;
  border-radius: 3px;
  background: #f1f3f5;
  color: var(--srt-muted);
}
.srt-tag--muted { background: #fef3c7; color: #92400e; }
.srt-warn { color: #d97706; font-size: 13px; vertical-align: -2px; cursor: help; }

.srt-pos { font-weight: 700; font-size: 14px; color: var(--srt-text); }
.srt-pos--stale { color: var(--srt-faint); }
.srt-pos--out { font-weight: 600; font-size: 12px; color: var(--srt-faint); }

.srt-chg {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: 12px;
  font-weight: 600;
}
.srt-chg i { font-size: 15px; }
.srt-chg--up { color: var(--srt-up); }
.srt-chg--down { color: var(--srt-down); }
.srt-chg--same { color: var(--srt-faint); font-weight: 500; }

.srt-muted { color: var(--srt-faint); }
.srt-muted-text { color: var(--srt-sub); font-size: 12px; white-space: nowrap; }

.srt-table tr.is-paused td:not(.srt-col-act):not(.srt-col-check) { opacity: 0.55; }

.srt-act {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--srt-muted);
  font-size: 17px;
  cursor: pointer;
}
.srt-act:hover { background: #f1f3f5; border-color: var(--srt-border); color: var(--srt-text); }

.srt-empty { text-align: center; padding: 28px 12px !important; color: var(--srt-muted); }

.srt__foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 8px 16px;
  border-top: 1px solid var(--srt-border);
  font-size: 11.5px;
  color: var(--srt-muted);
}

.srt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Satır işlem menüsü ─────────────────────────────────────────────────── */
.srt-menu {
  position: fixed;
  z-index: 900;
  min-width: 180px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.srt-menu[hidden] { display: none; }
.srt-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #111827;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.srt-menu button i { font-size: 16px; color: #6b7280; }
.srt-menu button:hover { background: #f3f4f6; }
.srt-menu button.is-danger, .srt-menu button.is-danger i { color: #dc2626; }

/* ── Modallar (uygulama temasını izler) ─────────────────────────────────── */
.srt-mono { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; }

.srt-sugg {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.srt-sugg__tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.srt-sugg__tab {
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-secondary);
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.srt-sugg__tab.is-active { background: var(--color-surface-3); color: var(--color-text-primary); }
.srt-sugg__hint { margin-left: auto; font-size: 11px; color: var(--color-text-muted); }
.srt-sugg__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 12px;
}
.srt-chip {
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-primary);
  font: inherit;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
}
.srt-chip:hover { border-color: var(--color-text-muted); }
.srt-chip small { color: var(--color-text-muted); margin-left: 4px; font-size: 10.5px; }

.srt-check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; margin-top: 6px; }
.srt-src {
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  margin-bottom: var(--space-3);
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--color-surface-2);
}
.srt-src__row { display: flex; align-items: center; gap: 8px; }
.srt-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; flex: none; }
.srt-dot.is-ok { background: #16a34a; }
.srt-src-sep {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin: var(--space-4) 0 6px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.srt-src-desc { margin: 0 0 10px; line-height: 1.5; }

/* ── Duyarlı ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .srt-hide-md { display: none; }
}
@media (max-width: 640px) {
  .srt-page { padding: var(--space-2); }
  .srt-hide-sm { display: none; }
  .srt__head, .srt__toolbar { padding-left: 12px; padding-right: 12px; }
  .srt__tools { width: 100%; margin-left: 0; }
  .srt-search { flex: 1 1 140px; }
  .srt-search .srt-input { width: 100%; }
  .srt-input--select { min-width: 0; flex: 1 1 110px; }
  .srt-add-btn { flex: 1 1 100%; justify-content: center; }
  .srt-kw { min-width: 150px; max-width: 52vw; }
  .srt-kw .srt-tag:not(.srt-tag--muted) { display: none; }   /* mobilde kelime okunsun; etiket filtresi yukarıda */
  .srt-table td, .srt-table th { padding-left: 8px; padding-right: 8px; }
}
