:root {
  --bg: #f6f7f9; --card: #fff; --text: #1d2330; --muted: #6b7280; --line: #e3e6eb;
  --accent: #2457d6; --ok: #137a3a; --bad: #b42318; --warn: #a15c00;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171c; --card: #1d2128; --text: #e7e9ee; --muted: #9aa3b2; --line: #2e333c;
    --accent: #7aa2ff; --ok: #4cc27a; --bad: #ff7a6b; --warn: #f0b35a; }
}
* { box-sizing: border-box; }
body { margin: 0; padding: 16px; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, Segoe UI, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center; max-width: 900px; margin: 0 auto 12px; gap: 8px; flex-wrap: wrap; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 10px; }
main, #signin { max-width: 900px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
button { font: inherit; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: 8px 20px; }
button:disabled { opacity: .5; cursor: default; }
label.pick { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 7px; cursor: pointer; }
label.pick:hover { background: var(--bg); }
.muted { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.dot.on { background: var(--ok); }
.status-Success { color: var(--ok); font-weight: 600; }
.status-Failed, .status-TimedOut, .status-Cancelled, .status-Undeliverable, .status-Terminated { color: var(--bad); font-weight: 600; }
.status-Pending, .status-InProgress, .status-Delayed { color: var(--warn); font-weight: 600; }
details { border-top: 1px solid var(--line); padding: 8px 0; }
summary { cursor: pointer; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 10px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; font-size: 13px; margin: 6px 0; }
.hist { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); cursor: pointer; flex-wrap: wrap; }
#signin { max-width: 420px; }
form { display: grid; gap: 10px; }
form label { display: grid; gap: 4px; font-size: 14px; }
input[type=email], input[type=password], input[inputmode] { font: inherit; padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.scripts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.script { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.script:hover { border-color: var(--accent); }
.script:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.script input { position: absolute; opacity: 0; pointer-events: none; }
.icon { flex: none; width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hist .name { display: inline-flex; gap: 8px; align-items: center; }
.hist .icon { width: 26px; height: 26px; border-radius: 6px; }
.hist .icon svg { width: 16px; height: 16px; }
[hidden] { display: none !important; }
.title { margin: 0; align-items: center; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tile { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 22px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.3; }
.tile:hover, .tile:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.tile .icon { width: 64px; height: 64px; border-radius: 16px; }
.tile .icon svg { width: 36px; height: 36px; }
.tile.extra .icon { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.head { display: flex; gap: 14px; align-items: flex-start; }
.head .icon { width: 52px; height: 52px; border-radius: 12px; }
.head .icon svg { width: 30px; height: 30px; }
.head h2 { font-size: 19px; margin: 2px 0 4px; }
.head p { margin: 0; }
