:root {
  --bg: #0d0f14;
  --bg-grad: radial-gradient(1200px 600px at 50% -10%, #161a23 0%, #0d0f14 60%);
  --surface: #131722;
  --line: #232a38;
  --ink: #e6e9ef;
  --ink-soft: #8a93a6;
  --accent: #c9a227;          /* pale gold - dark luxury, not the default blue/green */
  --accent-soft: rgba(201, 162, 39, 0.16);
  --term-green: #4ec9a8;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg-grad); background-color: var(--bg);
  color: var(--ink); font-family: var(--mono);
  display: grid; place-items: center; padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 34px 30px 30px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset,
              0 24px 60px rgba(0,0,0,0.55);
}

.prompt-mark {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--term-green);
  letter-spacing: 0.02em; margin-bottom: 22px;
}
.prompt-mark::before { content: "$"; color: var(--ink-soft); }
.caret {
  width: 8px; height: 15px; background: var(--term-green);
  display: inline-block; border-radius: 1px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

h1 {
  margin: 0 0 4px; font-size: 23px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--ink);
}
h1 .dot { color: var(--accent); }
.sub { margin: 0 0 24px; font-size: 13px; color: var(--ink-soft); }

.err {
  background: rgba(229, 83, 75, 0.12); border: 1px solid rgba(229, 83, 75, 0.4);
  color: #f0a8a2; font-size: 13px; padding: 9px 12px; border-radius: 8px;
  margin-bottom: 18px;
}

label {
  display: block; font-size: 12px; color: var(--ink-soft);
  margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.08em;
}
input {
  width: 100%; margin-bottom: 18px; padding: 11px 13px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #0f131c; border: 1px solid var(--line); border-radius: 9px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button {
  width: 100%; margin-top: 6px; padding: 12px 16px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  color: #1a1606; background: var(--accent);
  border: none; border-radius: 9px;
  transition: filter .12s, transform .1s, box-shadow .12s;
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.22);
}
button:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(201, 162, 39, 0.3); }
button:active { transform: translateY(1px); }

/* Invite / set-password pages (board #965) */
.hint {
  margin: 16px 0 0; font-size: 12px; line-height: 1.5;
  color: var(--ink-soft);
}
.card .sub strong { color: var(--ink); font-weight: 600; }

.btn-link {
  display: block; margin-top: 22px; padding: 11px 16px; text-align: center;
  font-size: 13px; font-weight: 600; text-decoration: none; letter-spacing: 0.01em;
  color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 9px;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-link:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Front door pages: /home/ and /build/ (spec Part 2). Same tokens; wider than the login card. */
body.page { display: block; place-items: normal; padding: 0; min-height: 100%; height: auto; background-attachment: fixed; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.brand { color: var(--ink); font-weight: 600; text-decoration: none; margin-right: auto; }
.brand .dot { color: var(--accent); }
.who { color: var(--ink-soft); font-size: 13px; }
.btn-small, .btn-ghost, .btn-primary, .btn-quiet, .tile-link {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 0 14px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; width: auto; margin: 0; box-shadow: none;
}
.btn-small, .btn-ghost, .btn-quiet, .tile-link {
  color: var(--ink); background: transparent; border: 1px solid var(--line);
}
.btn-small:hover, .btn-ghost:hover, .tile-link:hover { border-color: var(--accent); color: var(--accent); }
.btn-quiet { color: var(--ink-soft); }
.btn-primary { color: #1a1606; background: var(--accent); border: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent);
}
.wrap { max-width: 980px; margin: 0 auto; padding: 22px 20px 48px; }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 18px 16px; margin-bottom: 14px;
}
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tiles .panel { margin: 0; }
.tile-wide { grid-column: 1 / -1; }
.tile-title { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.tile p, .status-strip p { margin: 0 0 8px; font-size: 13px; }
.tile .btn-link { display: inline-flex; margin-top: 4px; min-height: 44px; align-items: center; }
.muted { color: var(--ink-soft); font-size: 12px; }
.empty { color: var(--ink-soft); }
.err-line { color: #f0a8a2; }
.warn-line { color: var(--accent); font-size: 13px; margin: 6px 0; }
.ok-line { color: var(--term-green); font-size: 13px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.req-title { margin: 0 0 8px; font-size: 15px; }
.req-title a { color: var(--ink); text-decoration: none; }
.req-title a:hover { color: var(--accent); }
.state-line { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 6px; font-size: 13px; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; border: 1px solid var(--line); color: var(--ink);
}
.badge-staging, .badge-design-ready, .badge-needs-design { border-color: var(--accent); color: var(--accent); }
.badge-production, .badge-approved, .badge-design-accepted { border-color: var(--term-green); color: var(--term-green); }
.badge-withdrawn, .badge-rejected { color: var(--ink-soft); }
.next { margin: 0 0 10px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: flex-start; }
.actions form { margin: 0; }
.actions button { width: auto; min-height: 44px; margin: 0; padding: 0 16px; }
.actions .btn-quiet { background: transparent; color: var(--ink-soft); }
.refreshing { opacity: 0.7; }
.refreshing .req-title::after { content: " frissítés..."; color: var(--ink-soft); font-size: 12px; font-weight: 400; }

/* the pipeline graph (spec Part 6): an ordered list with connectors, fixed node sizes */
.graph-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin: 8px 0 4px; }
.fix-count { color: var(--accent); }
.graph { list-style: none; display: flex; gap: 14px; padding: 0; margin: 0 0 6px; overflow-x: auto; }
.node {
  position: relative; flex: 1 1 0; min-width: 84px; min-height: 56px; padding: 7px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: #0f131c; font-size: 11px; display: flex; flex-direction: column; gap: 3px;
}
.node + .node::before {
  content: ""; position: absolute; left: -15px; top: 50%; width: 14px; border-top: 1px solid var(--line);
}
.node-label { color: var(--ink); font-weight: 600; }
.node-status { color: var(--ink-soft); }
.node-done .node-status { color: var(--term-green); }
.node-done .node-status::before { content: "✓ "; }
.node-run .node-status::before { content: "● "; color: var(--accent); }
.node-fail .node-status { color: #f0a8a2; }
.node[aria-current="step"] { border: 2px solid var(--accent); }
.node-reka { border-color: var(--accent); background: var(--accent-soft); }
.node-reka .node-label { color: var(--accent); }
.fix-loop { color: var(--accent); font-size: 10px; }
.graph-empty .node { opacity: 0.6; }

/* forms */
.form-panel h2 { margin: 6px 0 12px; font-size: 16px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: 13px;
}
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: 0.55; }
select, textarea {
  width: 100%; margin-bottom: 6px; padding: 11px 13px; font: inherit; font-size: 15px; color: var(--ink);
  background: #0f131c; border: 1px solid var(--line); border-radius: 9px; min-height: 44px;
}
textarea { resize: vertical; }
.form-panel input { margin-bottom: 6px; }
.form-panel .hint { margin: 0 0 14px; }
.counter { margin: 0 0 12px; text-align: right; font-size: 11px; color: var(--ink-soft); }
.field-err { margin: -2px 0 12px; font-size: 12px; color: #f0a8a2; }
.check { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink); min-height: 44px; }
.check input { width: 20px; height: 20px; margin: 0; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.prompt-box { flex-basis: 100%; }
.prompt-box summary { list-style: none; display: inline-flex; }
.prompt-box summary::-webkit-details-marker { display: none; }
.prompt-box form { margin-top: 10px; }

/* /build/<id>: the side by side */
.back { color: var(--ink-soft); font-size: 13px; }
.detail-title { font-size: 19px; margin: 0 0 8px; }
.rounds, .view-switch { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.rounds a, .view-switch a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: 13px;
}
.rounds a[aria-current], .view-switch a[aria-current] { color: var(--accent); border-color: var(--accent); }
.view-switch { display: none; }
.prompt-line { font-size: 13px; color: var(--ink); }
.sbs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pane { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.pane figcaption { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.pane img { display: block; width: 100%; height: auto; border-radius: 6px; background: #0f131c; }
.img-missing {
  display: grid; place-items: center; aspect-ratio: 16 / 9; margin: 0; padding: 12px; text-align: center;
  border: 1px dashed var(--line); border-radius: 6px; color: var(--ink-soft); font-size: 13px;
}
.img-missing a { color: var(--accent); }
.diff-line { font-size: 13px; color: var(--ink-soft); }
.diff-line a { color: var(--accent); }
.confirm h1 { font-size: 18px; }
.confirm button { width: auto; padding: 12px 22px; }

@media (max-width: 599px) {
  .topbar { padding: 10px 14px; }
  .wrap { padding: 16px 12px 40px; }
  .tiles, .sbs { grid-template-columns: 1fr; }
  .graph { flex-direction: column; gap: 6px; overflow: visible; }
  .node { flex: none; min-height: 0; flex-direction: row; justify-content: space-between; flex-wrap: wrap; }
  .node + .node::before { left: 18px; top: -7px; width: 0; height: 6px; border-top: 0; border-left: 1px solid var(--line); }
  .fix-loop { flex-basis: 100%; }
  .view-switch { display: flex; }
  .phone-hide { display: none; }
}
