/* The installer's web page. Same colors as the desktop window (installer/theme.py): dark first, n8n's orange-red.
   The mode is chosen with data-theme on <html>; without it the device's own setting decides. No outside files. */
:root {
  color-scheme: dark;
  --bg: #1b1b1f; --panel: #26262c; --raised: #32323a; --hover: #3c3c46; --line: #3d3d47;
  --text: #f2f2f4; --muted: #9a9aa6; --disabled: #6b6b76;
  --accent: #ff6d5a; --accent-dark: #e2533f; --accent-hover: #ff8273; --on-accent: #ffffff;
  --green: #4cc38a; --red: #ff7b72; --select: #44303a; --select-text: #ffffff; --shade: rgba(0, 0, 0, .55);
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  color-scheme: light;
  --bg: #f4f4f6; --panel: #ffffff; --raised: #e8e8ec; --hover: #dcdce2; --line: #cfcfd8;
  --text: #1f1f24; --muted: #6b6b78; --disabled: #a8a8b3;
  --accent: #e8503c; --accent-dark: #c9412f; --accent-hover: #f0634f; --on-accent: #ffffff;
  --green: #16794c; --red: #c62828; --select: #ffe3de; --select-text: #1f1f24; --shade: rgba(30, 30, 40, .35);
} }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f6; --panel: #ffffff; --raised: #e8e8ec; --hover: #dcdce2; --line: #cfcfd8;
  --text: #1f1f24; --muted: #6b6b78; --disabled: #a8a8b3;
  --accent: #e8503c; --accent-dark: #c9412f; --accent-hover: #f0634f; --on-accent: #ffffff;
  --green: #16794c; --red: #c62828; --select: #ffe3de; --select-text: #1f1f24; --shade: rgba(30, 30, 40, .35);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.app { min-height: 100%; display: flex; flex-direction: column; max-width: 1320px; margin: 0 auto; padding: 0 16px 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 0 6px; }
.brand { font-size: 18px; font-weight: 600; }
.brand span { color: var(--accent); }
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0 12px; }
.bar label, .status { color: var(--muted); }
.status { font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
button, select, input { font: inherit; color: var(--text); }
button { background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: 7px 14px; cursor: pointer; }
button:hover { background: var(--hover); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.primary:hover { background: var(--accent-hover); }
button.primary:active { background: var(--accent-dark); }
button:disabled, button.primary:disabled { background: var(--panel); color: var(--disabled); border-color: var(--line); cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select, input[type="text"], input[type="password"] { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; }
.panes { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 14px; flex: 1; min-height: 260px; }
.pane { border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.pane > h2 { font-size: 13px; font-weight: 600; color: var(--muted); }
.summary { color: var(--muted); font-size: 13px; }
.scroll { overflow: auto; flex: 1; min-height: 160px; max-height: 46vh; border-radius: 6px; background: var(--panel); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { position: sticky; top: 0; background: var(--raised); color: var(--muted); font-weight: 600; text-align: left; padding: 8px 10px; white-space: nowrap; }
td { padding: 7px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.wide { white-space: normal; overflow-wrap: anywhere; min-width: 160px; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--hover); }
tbody tr.sel, tbody tr.sel:hover { background: var(--select); color: var(--select-text); }
.s-new { color: var(--accent); } .s-ok { color: var(--muted); } .s-bad { color: var(--red); }
tr.m-new td { color: var(--green); } tr.m-typed td { color: var(--accent); } tr.m-fixed td { color: var(--muted); }
tr.quiet td { color: var(--muted); }
tr.sel.quiet td { color: var(--select-text); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.log { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: 12.5px/1.55 var(--mono);
  height: 190px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.log .good { color: var(--green); } .log .bad { color: var(--red); } .log .headline { color: var(--accent); }
.veil { position: fixed; inset: 0; background: var(--shade); display: flex; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; overflow: auto; z-index: 5; }
.veil.solid { background: var(--bg); }
.dialog { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; width: min(540px, 100%); display: flex; flex-direction: column; gap: 12px; }
.dialog h2 { color: var(--accent); font-size: 17px; font-weight: 600; }
.dialog p { white-space: pre-line; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.bad-text { color: var(--red); }
.fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.fields .hint { grid-column: 2; margin-top: -6px; font-size: 12px; color: var(--muted); }
.fields .checks { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.fields input[type="text"], .fields input[type="password"], .full { width: 100%; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.busy { cursor: progress; }
@media (max-width: 800px) { .panes { grid-template-columns: minmax(0, 1fr); } .scroll { max-height: 38vh; } }
