/* OpenPXE web UI — Netbox-style minimal layout, fully offline. * * Theme tokens live on `:root` (dark default) and `:root[data-theme=light]`. * Both palettes share variable *names*, so component CSS uses * `var(--bg)` regardless and the toggle in the topbar just flips the * data-attribute. No JS-side recolouring, no React re-renders, no FOUC * (the inline script in index.html paints the right theme before main * CSS lands). */ :root { /* Jet-black dark palette (default). Modelled on Netbox Labs's near-black product chrome, with surfaces stepping subtly upward rather than the previous blue-tinted ramp, so the UI reads as a genuine "dark" rather than "dim navy". */ --bg: #030303; --bg-panel: #0a0a0a; --bg-panel-2: #141414; --bg-elev: #1c1c1c; --fg: #e8eaed; --fg-dim: #9aa0a6; --fg-dimmer: #6b7077; --accent: #00d4b4; /* Netbox-ish teal — kept for brand */ --accent-dim: #07a38c; --warn: #ffb347; --err: #ef6e6e; --ok: #4ade80; --border: #1f1f1f; --border-soft: #141414; --terminal-bg: #050505; --shadow-card: 0 1px 0 rgba(255,255,255,0.02), 0 8px 24px rgba(0,0,0,0.55); --radius: 6px; --radius-lg: 10px; --sidebar-w: 240px; --topbar-h: 56px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif; /* v0.4.63: tie native form-control rendering (checkboxes, scroll bars, date pickers) to the active OpenPXE theme. Without this, the inline `` in index.html forces dark form chrome in *both* themes — so the SSO "Enable single sign-on" checkbox renders as an opaque black square against the light-mode panel, ignoring our accent-color hint. CSS `color-scheme` overrides the meta and tracks `data-theme` correctly. */ color-scheme: dark; } :root[data-theme="light"] { color-scheme: light; /* Light palette — high-contrast neutral, accent unchanged for brand consistency. Designed against Netbox Labs's reference screenshot: near-white surfaces, soft grey dividers, dark text. */ --bg: #f6f8fb; --bg-panel: #fbfcfe; --bg-panel-2: #f0f3f8; --bg-elev: #e6ebf2; --fg: #1c2330; --fg-dim: #5a6377; --fg-dimmer: #95a0b3; --accent: #00b89c; --accent-dim: #008b73; --warn: #b67016; --err: #c63a3a; --ok: #1f9b54; --border: #d8dde6; --border-soft: #e7eaf0; /* Light-mode terminal: the pane background and chrome track the rest of the light theme. Per-level text colours below recolour-on-light so log lines stay readable on a pale background — previously the terminal was locked to dark and looked like a stuck panel. */ --terminal-bg: #ffffff; --shadow-card: 0 1px 0 rgba(0,0,0,0.02), 0 6px 18px rgba(20,28,52,0.06); } * { box-sizing: border-box; } html, body { height: 100%; } body { margin: 0; font-family: var(--sans); font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--fg); transition: background 0.16s ease, color 0.16s ease; } a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; } code, kbd { font-family: var(--mono); font-size: 12.5px; background: var(--bg-panel-2); padding: 1px 5px; border-radius: 3px; } /* ── Shell ─────────────────────────────────────────────────────────── */ .shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; grid-template-rows: var(--topbar-h) 1fr; grid-template-areas: "sidebar topbar" "sidebar main"; height: 100vh; } .sidebar { grid-area: sidebar; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; } /* The brand block sits flush with the topbar so the sidebar+topbar reads as one continuous bar across the top of the app, rather than a chunky 2-line logo block plus a separate (smaller-typeface) page title. The height/border-bottom match the topbar exactly so the divider runs straight across without a step. */ .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: var(--topbar-h); border-bottom: 1px solid var(--border); } .sidebar .brand img { width: 26px; height: 26px; flex: none; } .sidebar .brand strong { font-size: 15px; font-weight: 600; letter-spacing: 0.2px; color: var(--fg); } /* v0.4.69: FleetDM-style full-width custom logo. When the operator has uploaded a custom brand mark, the sidebar header drops the bundled 26px mark + "OpenPXE" wordmark and instead lets the uploaded image span the header — left-aligned, capped at 200x50, scaled to fit without distortion. The wordmark is hidden so the operator's logo is the sole brand element (their logo presumably already contains their name). The bundled-default case keeps the mark + wordmark. */ .sidebar .brand.has-custom-logo { gap: 0; } .sidebar .brand.has-custom-logo img { width: auto; height: 50px; max-width: 200px; object-fit: contain; object-position: left center; flex: none; } .sidebar .brand.has-custom-logo strong { display: none; } .sidebar nav { padding: 10px 0; flex: 1; overflow-y: auto; } .sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 8px 18px; color: var(--fg); font-size: 13.5px; border-left: 2px solid transparent; cursor: pointer; } .sidebar nav a:hover { background: var(--bg-panel-2); text-decoration: none; } .sidebar nav a.active { background: var(--bg-panel-2); border-left-color: var(--accent); color: var(--accent); } .sidebar nav a .count { margin-left: auto; background: var(--bg-elev); color: var(--fg-dim); padding: 1px 7px; font-size: 11px; border-radius: 10px; font-variant-numeric: tabular-nums; } .sidebar nav a.active .count { background: var(--accent); color: #002923; } .sidebar .footer { padding: 12px 18px; border-top: 1px solid var(--border); color: var(--fg-dimmer); font-size: 11px; display: flex; flex-direction: column; gap: 4px; } .sidebar .footer code { background: transparent; color: var(--fg-dim); padding: 0; font-size: 11px; word-break: break-all; } .sidebar .footer .status-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; } .sidebar .footer .status-row .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--fg-dimmer); flex: none; } .sidebar .footer .status-row .dot.ok { background: var(--ok); box-shadow: 0 0 6px color-mix(in srgb, var(--ok) 60%, transparent); } .sidebar .footer .status-row .dot.err { background: var(--err); } .sidebar .footer .status-row .dot.warn { background: var(--warn); } .sidebar .footer .status-label { color: var(--fg-dim); } .sidebar .footer .status-value { color: var(--fg); font-weight: 600; } .sidebar .footer .status-value.ok { color: var(--ok); } .sidebar .footer .status-value.err { color: var(--err); } .sidebar .footer .status-value.warn { color: var(--warn); } .sidebar .footer .footer-sub { color: var(--fg-dimmer); margin-top: 2px; } /* Persistent backend identity. Sits below the advertised URL so even when an operator has uploaded their own logo, "what is this" stays answerable from the bottom-left of every page. */ .sidebar .footer .footer-version { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-soft); color: var(--fg-dim); font-variant-numeric: tabular-nums; letter-spacing: 0.2px; } /* ── Top bar ───────────────────────────────────────────────────────── */ .topbar { grid-area: topbar; display: flex; align-items: center; padding: 0 20px; gap: 14px; background: var(--bg-panel); border-bottom: 1px solid var(--border); } .topbar h1 { margin: 0; font-size: 15px; font-weight: 600; color: var(--fg); letter-spacing: 0.2px; } .topbar .spacer { flex: 1; } .topbar .chip { background: var(--bg-panel-2); border: 1px solid var(--border); color: var(--fg-dim); font-size: 12px; padding: 4px 10px; border-radius: 12px; white-space: nowrap; } .topbar .chip strong { color: var(--fg); font-weight: 600; } /* Theme toggle button. Two glyphs stacked; CSS swaps which is visible based on the active theme. Keeps the layout stable when toggling. */ .theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 32px; background: transparent; color: var(--fg); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 0; transition: background 0.15s ease, border-color 0.15s ease; } .theme-toggle:hover { background: var(--bg-panel-2); border-color: var(--accent); } .theme-toggle .t-sun { display: none; } .theme-toggle .t-moon { display: inline; } :root[data-theme="light"] .theme-toggle .t-sun { display: inline; } :root[data-theme="light"] .theme-toggle .t-moon { display: none; } /* ── Main content ─────────────────────────────────────────────────── */ .main { grid-area: main; overflow: auto; padding: 22px 26px 40px; } .grid { display: grid; gap: 20px; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } @media (max-width: 1024px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } } /* ── Cards / panels ───────────────────────────────────────────────── */ .card { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); } .card > header { padding: 12px 16px; background: var(--bg-panel-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; } .card > header h2 { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--fg); } .card > header .sub { color: var(--fg-dim); font-size: 12px; margin-left: auto; } .card .body { padding: 16px; } .stat { padding: 16px; } .stat .label { color: var(--fg-dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px; } .stat .value { font-size: 28px; font-weight: 600; line-height: 1.1; margin-top: 4px; color: var(--fg); } .stat .trend { font-size: 12px; color: var(--fg-dim); margin-top: 4px; } /* ── Tables ───────────────────────────────────────────────────────── */ table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--border-soft); } th { color: var(--fg-dim); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; background: var(--bg-panel-2); } tr:hover td { background: var(--bg-panel-2); } td.mono { font-family: var(--mono); font-size: 12.5px; } td.num { text-align: right; font-variant-numeric: tabular-nums; } /* ── Tags / pills ─────────────────────────────────────────────────── */ .tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--bg-elev); color: var(--fg-dim); } .tag.ok { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); } .tag.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); } .tag.err { background: color-mix(in srgb, var(--err) 22%, transparent); color: var(--err); } .tag.accent { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); } .tag.arch { text-transform: uppercase; } /* ── Forms ────────────────────────────────────────────────────────── */ button, .btn { background: var(--accent); color: #002923; border: 0; border-radius: var(--radius); padding: 7px 14px; font: inherit; font-weight: 600; cursor: pointer; transition: background 0.12s ease; } button:hover, .btn:hover { background: var(--accent-dim); color: #f4fffd; } button.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); } button.ghost:hover { background: var(--bg-panel-2); color: var(--fg); } button.danger { background: transparent; color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); } button.danger:hover { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); } label.field { display: grid; gap: 4px; margin-bottom: 14px; } label.field .name { color: var(--fg-dim); font-size: 12px; } label.field .hint { color: var(--fg-dimmer); font-size: 11px; } /* All single-line inputs share one chrome rule. Pre-v0.4.6 we only styled type=text/number, which left type=password fields rendering with the default browser look — visibly off vs adjacent text fields in the Account card. The negation list keeps `type=checkbox`, `type=file`, and `type=range` (none of which we use inside `label.field`) from picking up the padded-box look. */ label.field input:not([type="checkbox"]):not([type="file"]):not([type="range"]), label.field select, label.field textarea { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 10px; font: inherit; /* iOS/Safari shrinks password-field text by default; clamp it so the password input matches the username input's metrics. */ font-size: 14px; line-height: 1.4; box-shadow: none; -webkit-appearance: none; appearance: none; } /* v0.4.63: with `appearance: none`, the native