/* Kervalt OS setup — stille, macOS-geïnspireerde eerste-configuratie.
   Eén beslissing per scherm, grote typografie, zachte overgangen. */
:root {
  --ink: #1d1d1f;
  --paper: #f5f5f7;
  --card: #ffffff;
  --line: #e5e5ea;
  --line-strong: #d2d2d7;
  --accent: #1f6f43;
  --muted: #6e6e73;
  --err: #b3261e;
  --radius: 18px;
  --dur: 220ms;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 70% -10%, #ffffff 0%, transparent 60%),
    var(--paper);
  color: var(--ink);
  font: 17px/1.5 ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.shell {
  max-width: 660px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: clamp(20px, 4vh, 40px) 22px 0;
  display: flex;
  flex-direction: column;
}

.brand { display: flex; justify-content: space-between; align-items: baseline; }
.wordmark { font-weight: 700; letter-spacing: -0.02em; font-size: 17px; }
.wordmark .dot { color: var(--accent); }
.phase { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Het podium centreert de actieve stap verticaal, zoals de macOS-assistent.
   `safe center` voorkomt dat bovenin wordt afgeknipt zodra een stap langer
   is dan het scherm (readiness, provisioning). */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 6vh, 64px) 0; }
@supports (justify-content: safe center) {
  .stage { justify-content: safe center; }
}

h1 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 10px;
  font-weight: 650;
}
.lead { color: var(--muted); max-width: 52ch; margin: 0 0 26px; font-size: 16px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3.5vw, 30px);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.03), 0 12px 32px -24px rgb(0 0 0 / 0.12);
}

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
label:first-of-type { margin-top: 0; }
.hint { color: var(--muted); font-weight: 400; }
input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  font: inherit;
  font-size: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
input::placeholder { color: #aeaeb2; }
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

button, .primary, a.primary {
  font: inherit; font-weight: 600; border-radius: 12px; cursor: pointer; text-decoration: none;
  min-height: 46px; padding: 10px 22px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center;
  transition: filter 150ms ease, transform 100ms ease, background 150ms ease;
}
button:active { transform: scale(0.985); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button:disabled:active { transform: none; }
button.primary, a.primary { background: var(--accent); color: #fff; }
button.primary:hover, a.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
button.ghost:hover { background: rgb(0 0 0 / 0.03); }
a.big { font-size: 18px; padding: 14px 30px; border-radius: 14px; }

.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.actions.center { justify-content: center; }
.actions.center > :last-child { margin-left: 0; }
.actions.full, .full { grid-column: 1 / -1; }
.actions button:last-child, .actions a:last-child { margin-left: auto; }
.actions.center button:last-child, .actions.center a:last-child { margin-left: 0; }

.form-grid { display: grid; grid-template-columns: 1fr; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.legend { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }

/* Config-substappen: drie stippen onder het paneel. */
.cfg-dots { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.cfg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); transition: background var(--dur) ease, transform var(--dur) ease; }
.cfg-dot.active { background: var(--accent); transform: scale(1.15); }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); align-items: baseline; }
.checks li:last-child { border-bottom: 0; }
.checks .mark { font-weight: 700; width: 1.4em; }
.checks .ok .mark { color: var(--accent); }
.checks .bad .mark { color: var(--err); }
.checks small { display: block; color: var(--muted); }

.stages { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.stages li { display: flex; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); align-items: baseline; }
.stages li:last-child { border-bottom: 0; }
.stages .n { counter-increment: s; color: var(--muted); font-variant-numeric: tabular-nums; }
.stages .n::before { content: counter(s, decimal-leading-zero); }
.stages .st { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.stages .done .st { color: var(--accent); }
.stages .running .st { color: var(--ink); }
.stages .failed .st { color: var(--err); }
.stages small { display: block; color: var(--muted); }

.verify { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.verify .v { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.verify .v b { display: block; font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.verify .ok b { color: var(--accent); }
.verify .pend b { color: #8a6d1a; }

/* Eerlijke tijdsindicatie bij provisioning — informatief, nooit druk. */
#provision-hint { margin: 10px 0 4px; }
.elapsed { margin: 0 0 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.elapsed .t-num { font-weight: 600; color: var(--ink); }
#workspace-health.health-ok { color: var(--accent); font-weight: 550; }
input[aria-invalid="true"] { border-color: var(--err); }
input[aria-invalid="true"]:focus { outline: 2px solid color-mix(in srgb, var(--err) 35%, transparent); }

.summary { display: grid; grid-template-columns: auto 1fr; gap: 7px 20px; margin: 0; }
.summary dt { color: var(--muted); font-size: 13px; }
.summary dd { margin: 0; font-weight: 550; }

.onetime { margin-top: 16px; border-top: 1px dashed var(--line); padding-top: 16px; }
.onetime code { display: inline-block; font-size: 22px; letter-spacing: 0.08em; background: var(--paper); padding: 10px 16px; border-radius: 12px; margin: 8px 10px 8px 0; }

.error { color: var(--err); font-size: 14px; min-height: 1.2em; margin: 10px 0 0; }
.ok-line { color: var(--accent); font-weight: 600; }

.env { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.env li { margin: 4px 0; }

.quiet { margin-top: 16px; color: var(--muted); font-size: 14px; }
.quiet summary { cursor: pointer; }
.quiet pre { background: var(--paper); padding: 12px; border-radius: 10px; overflow: auto; font-size: 12px; }
.quiet-links { display: flex; gap: 18px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.quiet-links a { color: var(--muted); font-size: 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.quiet-links a:hover { color: var(--ink); }

.hidden { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; }

/* Voortgang: subtiele stippen onderaan het scherm, zoals de setup-assistent. */
.progress { padding: 18px 0 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dots { display: flex; gap: 7px; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); transition: background var(--dur) ease; }
.dots span.active { background: var(--ink); }
.dots span.done { background: var(--muted); opacity: 0.55; }
.stepcount { margin: 0; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .step { animation: step-in var(--dur) ease-out; }
  .step.back { animation-name: step-in-back; }
  @keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
  @keyframes step-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* DNS-records in de config-stap */
.dns-list { display: grid; gap: 0.4rem; margin-top: 8px; }
.dns-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.5rem 0.75rem;
}
.dns-row code { font-size: 0.82rem; overflow-wrap: anywhere; }
.dns-row .copy {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  min-height: 30px; padding: 0.2rem 0.7rem; font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.dns-row .copy:hover { border-color: var(--accent); }
