:root {
	--navy: #262261;
	--teal: #00a99d;
	--line: #e5e7eb;
	--muted: #6b7280;
	--ok: #1a7f37;
	--err: #c62828;
	--warn: #b26a00;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2937; background: #f6f7f9; }
a { color: var(--navy); }
header { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: #fff; border-bottom: 3px solid var(--teal); flex-wrap: wrap; }
header img { display: block; }
header nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
header nav a, header .link { color: var(--navy); text-decoration: none; padding: 6px 10px; border-radius: 6px; }
header nav a.active, header nav a:hover { background: #e6f6f5; color: var(--teal); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 8px; color: var(--navy); }
h2 { font-size: 18px; margin: 32px 0 10px; color: var(--navy); }
.muted { color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.big { font-size: 32px; font-weight: 700; color: var(--navy); }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f1f5f9; font-weight: 600; font-size: 14px; }
tr.group td { background: #e6f6f5; color: var(--navy); font-weight: 600; }
.table-wrap { overflow-x: auto; }
input[type="text"], input[type="password"], input:not([type]) { padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; width: 100%; max-width: 360px; }
button { padding: 8px 16px; border: 0; border-radius: 6px; background: var(--teal); color: #fff; font: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
button.link { background: none; padding: 6px 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.tasks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0; }
.log { margin: 16px 0; padding-left: 20px; }
.log li { margin: 4px 0; }
.ok { color: var(--ok); }
.err, .error { color: var(--err); }
.warn { color: var(--warn); }
.score { font-weight: 700; }
body.login { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(to right, var(--teal), var(--navy)); }
body.login .card { width: min(360px, calc(100% - 32px)); display: grid; gap: 12px; }
body.login img { filter: none; }
body.login label { display: grid; gap: 4px; }
body.login input { max-width: none; }
.center { text-align: center; }
.p3 { color: var(--err); font-weight: 600; } .p2 { color: var(--warn); font-weight: 600; } .p1 { color: var(--muted); font-weight: 600; }
details.card { margin: 8px 0; padding: 12px 16px; }
details.card summary { cursor: pointer; }
details.card table { margin-top: 10px; }
pre.log-lines { background: #fff; border: 1px solid var(--line); padding: 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
button.secondary { background: #fff; color: var(--teal); border: 1px solid var(--teal); padding: 5px 12px; }
.row-log { margin: 4px 0 0; padding: 0; list-style: none; font-size: 13px; }
.row-log:empty { display: none; }
table.overview th { font-size: 13px; line-height: 1.3; vertical-align: bottom; }
table.overview th.center { text-align: center; }
.sites-wrap { max-height: 75vh; overflow: auto; }
table.overview th { position: sticky; top: 0; z-index: 1; }
table.overview th.sortable { cursor: pointer; user-select: none; }
table.overview th[data-dir="asc"]::after { content: " ▲"; }
table.overview th[data-dir="desc"]::after { content: " ▼"; }
/* Every button on the report page shares one size; icon buttons are square. */
.btn, .btn.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; box-sizing: border-box; white-space: nowrap; font-size: 14px; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--teal); border: 1px solid var(--teal); }
td.actions { white-space: nowrap; }
table.overview th { white-space: nowrap; }
.btn.push { margin-left: auto; }
tr.group td { padding: 6px 10px; }
/* Row actions: quiet icons, a light tint on hover. */
td.actions { white-space: nowrap; padding: 4px 10px; }
.ico, button.ico { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); vertical-align: middle; }
a.ico:hover, button.ico:hover { background: #e6f6f5; color: var(--teal); }
/* Icon button while its site is being scanned: the icon turns, no text. */
button.ico.busy { cursor: progress; color: var(--teal); }
button.ico.busy:disabled { opacity: 1; }
button.ico.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Groups: a site can carry several tags (indigo, small); the bar above the table filters by one. */
.groupbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; padding: 10px 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; }
.groupbar .lbl { display: flex; align-items: center; gap: 6px; height: 34px; margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
/* Every control in the bar shares one height (34px) and one box model, so they line up on the baseline. */
.groupbar select, .groupbar input, .groupbar .btn { height: 34px; margin: 0; box-sizing: border-box; font: inherit; font-size: 14px; line-height: 20px; border-radius: 6px; }
.groupbar select, .groupbar input { padding: 0 10px; border: 1px solid #cbd5e1; background: #fff; color: var(--navy); }
.groupbar select { padding-right: 30px; }
.groupbar input { width: 200px; }
.groupbar .sep { width: 1px; height: 22px; margin: 0 4px; background: var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.tag { display: inline-block; max-width: 140px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid #c7d2fe; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 11px; line-height: 17px; font-weight: 600; }
/* One colour per group (Groups::hue): light fill, dark text. */
.tag.g0 { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }
.tag.g1 { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.tag.g2 { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.tag.g3 { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.tag.g4 { background: #f0f9ff; border-color: #bae6fd; color: #075985; }
.tag.g5 { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.tag.g6 { background: #f7fee7; border-color: #d9f99d; color: #3f6212; }
.tag.g7 { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
