/* Customer portal: 42ITS or 42Live by data-brand on <html>. Both share the
   brand red; 42Live's black is very slightly warm, per its house style. */
@font-face {
  font-family: "Montserrat";
  src: url("/shared/fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #000;
  --panel: #0e172d;
  --line: rgba(255, 255, 255, .12);
  --text: #b4b4bb;
  --muted: #7a7a84;
  --heading: #fff;
  --red: #b01818;
  --red-hover: #d92a2a;
  --ok: #22c55e;
  color-scheme: dark;
}
:root[data-brand="42live"] {
  --bg: #0a0003;
  --panel: #121012;
  --line: rgba(255, 255, 255, .13);
  --text: #cfcfcf;
  --muted: #9a9a9a;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 16px/1.7 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--heading); }
a:hover { color: var(--red-hover); }
:focus-visible { outline: 3px solid var(--red-hover); outline-offset: 2px; }
h1 { color: var(--heading); font-weight: 600; font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.25; margin: 0 0 .5rem; }
h2 { color: var(--heading); font-weight: 600; font-size: 1.1rem; margin: 0 0 .75rem; }
p { margin: 0 0 .9rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #000; }
header img { height: 38px; width: auto; display: block; }
header nav { display: flex; gap: 10px; align-items: center; }
main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
.narrow { max-width: 440px; margin: 6vh auto 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 22px; margin-bottom: 16px; }
form.panel, .stack { display: grid; gap: 14px; }
label { display: grid; gap: 4px; color: var(--heading); font-size: .9rem; font-weight: 500; }
input {
  font: inherit; color: var(--heading); background: #000; border: 1px solid var(--line);
  border-radius: 4px; padding: 10px 12px; width: 100%;
}
input:focus { border-color: var(--red); outline: none; }
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 30px; border: 1px solid transparent;
  background: var(--red); color: #fff; font: 600 1rem/1.2 inherit; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: var(--red-hover); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.3); color: var(--text); padding: 7px 16px; font-size: .9rem; }
.btn.ghost:hover { border-color: var(--red); color: var(--red-hover); }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.error { color: #ff8a8a; margin: 0; }

.machines { display: grid; gap: 12px; }
.machine { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.machine .name { color: var(--heading); font-weight: 600; font-size: 1.05rem; }
.machine .grow { flex: 1; min-width: 12rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #3a3f4d; margin-right: 8px; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgb(34 197 94 / .2); }
.dot.asleep { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.qr { background: #fff; padding: 12px; border-radius: 6px; width: max-content; }
.secret { font: 500 1rem/1.4 ui-monospace, Consolas, monospace; color: var(--heading); word-break: break-all; margin: 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10; max-width: calc(100% - 32px);
  background: var(--panel); border: 1px solid var(--line); color: var(--heading); padding: 10px 18px; border-radius: 30px;
}
/* "Remember this computer" on the sign-in code step. */
label.remember { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
label.remember[hidden] { display: none; }
label.remember input { width: 18px; height: 18px; margin: 0; accent-color: var(--red); flex: none; }
