:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18212f;
  background: #f4f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app { width: min(1180px, calc(100% - 28px)); margin: 28px auto 60px; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:18px; }
h1 { margin:0 0 5px; font-size:28px; }
h2 { margin:0 0 6px; font-size:19px; }
p { margin:0; color:#677386; line-height:1.45; }
.card {
  background:white; border:1px solid #dfe5ee; border-radius:16px; padding:20px;
  box-shadow:0 8px 28px rgba(34,52,84,.06); margin-bottom:16px;
}
.section-title { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; margin-bottom:15px; }
.header-actions,.row { display:flex; align-items:center; }
.gap { gap:8px; }
button {
  border:0; border-radius:9px; padding:10px 14px; font-weight:650;
}
.primary { background:#2367e8; color:#fff; }
.primary:hover { background:#1958ca; }
.secondary { background:#edf2f8; color:#25344b; }
.secondary:hover { background:#e2e9f3; }
.danger { background:#ffe9e9; color:#a93232; }
button:disabled { opacity:.5; cursor:not-allowed; }
textarea,input,select {
  width:100%; border:1px solid #cfd7e3; border-radius:9px; padding:10px 11px;
  background:#fff; outline:none;
}
textarea:focus,input:focus,select:focus { border-color:#4882ee; box-shadow:0 0 0 3px rgba(72,130,238,.12); }
textarea { resize:vertical; line-height:1.5; }
.target-head,.target-row {
  display:grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr) 38px; gap:9px; align-items:center;
}
.target-head { font-size:12px; font-weight:750; color:#667185; padding:0 3px 6px; }
.target-row { margin-bottom:8px; }
.icon-btn { padding:8px; width:38px; height:38px; font-size:21px; line-height:1; background:#f2f4f7; color:#566174; }
.paste-box { margin-top:14px; padding-top:14px; border-top:1px solid #edf0f4; }
.paste-box label { display:block; font-weight:700; margin-bottom:7px; }
.paste-box textarea { margin-bottom:5px; }
.helper { font-size:12px; color:#7a8494; margin-bottom:9px; }
.badge { font-size:12px; background:#edf2f8; border-radius:999px; padding:6px 9px; color:#536074; }
.settings-grid { display:grid; grid-template-columns:180px 180px 1fr 1fr; gap:12px; align-items:end; margin-top:13px; }
.settings-grid label { font-size:13px; font-weight:700; color:#495568; }
.settings-grid select { margin-top:5px; }
.checkbox-label { display:flex; align-items:center; gap:8px; min-height:40px; }
.checkbox-label input { width:auto; }
.runbar { display:flex; align-items:center; gap:9px; margin-top:17px; }
.progress-wrap { display:flex; align-items:center; gap:10px; flex:1; min-width:180px; }
.progress { height:9px; background:#e7ebf1; border-radius:99px; overflow:hidden; flex:1; }
.progress div { height:100%; width:0%; background:#2367e8; transition:width .15s linear; }
#progressText { font-size:12px; color:#657186; min-width:105px; text-align:right; }
.hidden { display:none; }
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:16px 0; }
.stats div { border:1px solid #e2e7ee; border-radius:11px; padding:13px; }
.stats strong { display:block; font-size:22px; }
.stats span { color:#748093; font-size:12px; }
.filters { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.filter { padding:7px 10px; font-size:12px; background:#f1f4f8; color:#5b6677; }
.filter.active { background:#223a61; color:white; }
.table-wrap { overflow:auto; border:1px solid #e2e7ee; border-radius:11px; }
table { width:100%; border-collapse:collapse; min-width:820px; }
th,td { text-align:left; padding:11px 12px; border-bottom:1px solid #edf0f4; vertical-align:top; }
th { background:#f7f9fc; font-size:12px; color:#647084; position:sticky; top:0; }
td { font-size:13px; }
.source-cell { max-width:470px; overflow-wrap:anywhere; }
.status { display:inline-block; border-radius:999px; padding:4px 8px; font-size:11px; font-weight:750; white-space:nowrap; }
.status.complete { background:#e5f7ec; color:#237843; }
.status.partial { background:#fff3d7; color:#8a6412; }
.status.none { background:#ffe6e6; color:#a33838; }
.status.error { background:#eceff4; color:#5c6674; }
.detail-row td { background:#fbfcfe; padding:0; }
.details { padding:12px 16px 15px 34px; }
.details table { min-width:0; border:0; }
.details th,.details td { padding:7px 8px; font-size:12px; }
.details th { position:static; background:transparent; }
.match-yes { color:#207440; font-weight:700; }
.match-no { color:#a53636; font-weight:700; }
.match-warn { color:#8a6412; font-weight:700; }
.toggle-details { background:transparent; padding:0; color:#2367e8; font-weight:700; }
.anchor-chip { background:#eef2f7; border-radius:6px; padding:2px 5px; display:inline-block; margin:1px 2px 1px 0; }
@media (max-width:800px) {
  .app { width:min(100% - 18px,1180px); margin-top:12px; }
  .topbar,.section-title { flex-direction:column; align-items:stretch; }
  .header-actions { flex-wrap:wrap; }
  .settings-grid { grid-template-columns:1fr 1fr; }
  .stats { grid-template-columns:1fr 1fr; }
  .runbar { flex-wrap:wrap; }
}
@media (max-width:560px) {
  .target-head { display:none; }
  .target-row { grid-template-columns:1fr 38px; }
  .target-row .target-anchor { grid-column:1; }
  .target-row .remove-target { grid-column:2; grid-row:1 / span 2; }
  .settings-grid { grid-template-columns:1fr; }
}
.same-source { color:#7a8494; font-style:italic; }

.issue-breakdown {
  display:flex; flex-wrap:wrap; align-items:center; gap:7px;
  margin:0 0 11px; padding:10px 12px; background:#f7f9fc;
  border:1px solid #e3e8ef; border-radius:10px; font-size:12px;
}
.issue-pill { background:#fff; border:1px solid #dfe5ed; border-radius:999px; padding:5px 8px; }
.issue-detail { margin-top:5px; max-width:420px; color:#5e697a; font-size:12px; line-height:1.35; }
.technical { margin-top:3px; }
.status.issue-live { background:#fff1d6; color:#865d08; }
.status.issue-gone { background:#ffe5e5; color:#9e3131; }
.status.issue-blocked,.status.issue-rate { background:#f2e8ff; color:#69419a; }
.status.issue-timeout,.status.issue-connection { background:#e9edf3; color:#566171; }
.status.issue-server,.status.issue-other { background:#ffe9e0; color:#93472d; }
.status.issue-redirect { background:#e7efff; color:#365f9e; }
