/* Matches Trello's iframe look: system font, 14px, #172b4d text. */
* { box-sizing: border-box; }
body.page {
  margin: 0;
  padding: 12px;
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #172b4d;
  background: #fff;
}
body.popup { padding: 12px 16px; }
h3 { margin: 4px 0 10px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.toolbar select, .toolbar input { padding: 5px 6px; border: 1px solid #dfe1e6; border-radius: 3px; font: inherit; }
.spacer { flex: 1; }

.btn {
  padding: 6px 12px; border: 1px solid #dfe1e6; border-radius: 3px; background: #f4f5f7;
  font: inherit; cursor: pointer; color: #172b4d;
}
.btn:hover { background: #ebecf0; }
.btn-primary { background: #0079bf; border-color: #0079bf; color: #fff; }
.btn-primary:hover { background: #026aa7; }
.btn-danger { background: #fff; border-color: #eb5a46; color: #b04632; }
.btn-wide { display: block; width: 100%; margin-top: 8px; }

.banner {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  background: #fffae6; border: 1px solid #ffe380; border-radius: 3px;
  padding: 8px 12px; margin-bottom: 10px;
}
.status { color: #5e6c84; margin: 10px 0; }
.hidden { display: none !important; }

table.log { width: 100%; border-collapse: collapse; }
table.log th { text-align: left; color: #5e6c84; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #dfe1e6; }
table.log td { padding: 6px 8px; border-bottom: 1px solid #f4f5f7; vertical-align: top; }
table.log td:first-child { white-space: nowrap; color: #5e6c84; }
tr.deletion td { background: #ffedeb; }

.features { padding-left: 18px; margin: 8px 0 14px; }
.features li { margin: 4px 0; }
.plan-row { margin: 10px 0; display: flex; gap: 16px; align-items: center; }
.plan-row input[type="number"] { width: 70px; padding: 5px 6px; border: 1px solid #dfe1e6; border-radius: 3px; }
.badge { background: #e3fcef; color: #006644; border-radius: 3px; padding: 1px 6px; font-size: 12px; }
.fine { color: #5e6c84; font-size: 12px; }

/* Balanced Auto Assign additions */
.pad { padding: 12px 16px; }
.muted { color: #6b778c; font-size: 12px; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #dfe1e6; }
.pill { font-size: 11px; border-radius: 10px; padding: 2px 8px; background: #dfe1e6; }
.pill-warn { background: #ffab00; color: #172b4d; }
.pill-ok { background: #36b37e; color: #fff; }
.ops { max-height: 220px; overflow-y: auto; font-size: 12px; background: #f4f5f7; border-radius: 4px; padding: 8px; margin: 8px 0; }
table.roster { width: 100%; border-collapse: collapse; margin: 8px 0; }
table.roster th { text-align: left; color: #5e6c84; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #dfe1e6; }
table.roster td { padding: 5px 8px; border-bottom: 1px solid #f4f5f7; }
table.roster input[type="number"] { width: 60px; padding: 4px 6px; border: 1px solid #dfe1e6; border-radius: 3px; }
.status.error { color: #b04632; }

/* Board Merge & Split additions */
.table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.table th { text-align: left; color: #5e6c84; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #dfe1e6; }
.table td { padding: 6px 8px; border-bottom: 1px solid #f4f5f7; vertical-align: middle; }
.table select { padding: 4px 6px; border: 1px solid #dfe1e6; border-radius: 3px; font: inherit; }
.checklist { max-height: 180px; overflow-y: auto; border: 1px solid #dfe1e6; border-radius: 3px; padding: 6px 10px; margin-bottom: 10px; }
.checklist label { display: block; padding: 3px 0; }
.meter { height: 10px; background: #dfe1e6; border-radius: 5px; overflow: hidden; margin: 10px 0; }
.meter-fill { height: 100%; width: 0%; background: #36b37e; transition: width .3s; }
.warn-box { background: #fffae6; border: 1px solid #ffe380; border-radius: 3px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.item-line { font-size: 12px; padding: 3px 0; border-bottom: 1px solid #f4f5f7; }
.item-line.failed { color: #b04632; }
.job-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #dfe1e6; }

/* ---- Anchor Dates additions ---- */
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.space-between { justify-content: space-between; }
.anchor-row { padding: 4px 0; border-bottom: 1px solid #dfe1e6; }
.btn-small { padding: 2px 8px; font-size: 12px; }
.table-wrap { max-height: 260px; overflow: auto; border: 1px solid #dfe1e6; border-radius: 4px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #f0f1f4; }
.table-wrap tr.changed td { background: #fffae6; }
section { margin: 14px 0; }
section h4 { margin: 0 0 6px; }

/* ---- Find & Replace additions ---- */
.error { color: #b04632; }
.snippet { font-size: 12px; color: #44546f; word-break: break-word; }
label input[type="text"] { padding: 5px 6px; border: 1px solid #dfe1e6; border-radius: 3px; font: inherit; min-width: 220px; }
label input[type="number"] { width: 70px; padding: 5px 6px; border: 1px solid #dfe1e6; border-radius: 3px; }
#alerts-banner ul { margin: 6px 0 0; padding-left: 18px; }
#watch-terms ul { margin: 6px 0; padding-left: 18px; }

/* Truncation / partial-result notice: a partial sweep is never shown as complete. */
p.warn {
  background: #fffae6; border: 1px solid #ffc400; border-radius: 3px;
  color: #172b4d; padding: 8px 10px; margin: 8px 0; font-size: 13px;
}
/* Inline flag inside a table row (e.g. "ran 2×" on a duplicated rewrite). */
span.warn { color: #ae2e24; font-weight: 600; white-space: nowrap; }

/* Utility classes replacing inline style="…" attributes.
 * The Content-Security-Policy in public/_headers sets style-src 'self' with no
 * 'unsafe-inline', which blocks inline style attributes in markup — so these
 * live here instead. Checklist All HQ took the same medicine at review time
 * ("extract inline authorize script"); this is the style-attribute equivalent.
 * Setting element.style.foo from JavaScript is CSSOM and remains legal. */
.flush { margin: 0; }
.num-sm { width: 5em; }
.num-xs { width: 4.5em; }
