/* ============================================================
   vibeship.eu — the signed-in dashboard.
   Same dark devtool aesthetic as the rest of the site; every
   colour and radius comes from the tokens in styles.css.
   ============================================================ */

.dash {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 24px 100px;
}

/* ---------- the sign-in gate ---------- */
/* Shown while /v1/auth/me is in flight and whenever the answer isn't a
   signed-in user. Centred and sparse so a signed-out visitor sees a
   deliberate page rather than a broken one. */
.dash-gate {
  text-align: center;
  padding: 60px 0 80px;
}
.dash-gate h1 {
  font-size: clamp(28px, 5vw, 38px);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.dash-gate-text {
  color: var(--text-dim);
  max-width: 44ch;
  margin: 0 auto 28px;
}
.dash-gate-text a { color: var(--accent); }
.dash-gate-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- hero ---------- */
.dash-hero { margin-bottom: 36px; }
.dash-hero h1 {
  font-size: clamp(30px, 6vw, 44px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.dash-sub { color: var(--text-dim); margin: 0; }

/* ---------- cards ---------- */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
/* The launcher is the one destructive action on the page; the glow is how it
   reads as different from the four save buttons above it. */
.dash-card-accent {
  border-color: var(--border-2);
  box-shadow: 0 0 0 1px var(--accent-glow);
}
.dash-card h2 {
  font-size: 18px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.dash-card-lead {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 20px;
  max-width: 62ch;
}

/* ---------- site switcher ---------- */
.dash-siteswitch { padding: 16px 24px; }
.dash-siteswitch-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.dash-siteswitch .audit-label { margin: 0 0 6px; }
#dash-site-select {
  min-width: 16rem;
}
#dash-site-select:disabled { opacity: 0.8; cursor: default; }

/* A set-once field that's been committed. */
.dash-lock {
  color: var(--text-dim);
  border-left: 2px solid var(--border-2);
  padding-left: 10px;
}

/* ---------- inputs ---------- */
/* Matches #url on the audit page: monospace, inset, accent ring on focus. */
.dash input[type="text"],
.dash input[type="url"],
.dash input[type="password"],
.dash select {
  width: 100%;
  font-family: var(--mono);
  font-size: 14px;
  padding: 11px 13px;
  background: var(--code-bg);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.dash input:focus,
.dash select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.dash input::placeholder { color: var(--text-mute); }
.dash .audit-label { margin-top: 16px; }
.dash form > .audit-label:first-child,
.dash fieldset > .audit-label:first-of-type { margin-top: 0; }

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dash-grid .audit-label { margin-top: 16px; }

.dash-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin: 0 0 20px;
}
.dash-fieldset legend {
  padding: 0 8px;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* The "use a throwaway account" warning. Amber rather than red: it is a
   caution about consequences, not a report of something broken. */
.dash-warn {
  color: var(--amber);
  border-left: 2px solid var(--amber);
  padding-left: 10px;
  margin-top: 0;
}

.dash-details { margin-top: 18px; }
.dash-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
  user-select: none;
}
.dash-details summary:hover { color: var(--text); }
.dash-details[open] summary { margin-bottom: 12px; }

/* ---------- save row ---------- */
.dash-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.dash-status { font-size: 13px; color: var(--text-mute); }
.dash-status-busy { color: var(--text-dim); }
.dash-status-ok   { color: var(--green); }
.dash-status-bad  { color: var(--red); }

/* ---------- what the next run will cover ---------- */
/* Shown before the launch button so "we never tested this" is something the
   user reads now, not half an hour later in the report. */
.dash-coverage {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.dash-cov {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.dash-cov span:first-child {
  font-family: var(--mono);
  font-weight: 700;
  line-height: 1.4;
}
.dash-cov-yes {
  color: var(--text-dim);
  border-color: rgba(74, 222, 128, 0.28);
}
.dash-cov-yes span:first-child { color: var(--green); }
.dash-cov-no {
  color: var(--text-dim);
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.05);
}
.dash-cov-no span:first-child { color: var(--amber); }

/* ---------- authorization checkbox ---------- */
.dash-consent {
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}
.dash-consent input { margin-top: 3px; accent-color: var(--accent); }
.dash-consent strong { color: var(--text); }

.dash .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- history ---------- */
.dash-history { display: grid; gap: 8px; }
.dash-empty { color: var(--text-mute); font-size: 14px; margin: 0; }

.dash-run {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 120ms ease, background 120ms ease;
}
.dash-run:hover {
  border-color: var(--border-2);
  background: var(--bg-elev);
}
.dash-run-when {
  font-size: 13px;
  color: var(--text-mute);
  white-space: nowrap;
}
.dash-run-url {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- danger zone ---------- */
.dash-danger { border-color: rgba(239, 68, 68, 0.3); }
.dash-danger h2 { color: var(--red); }
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.5);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.1); border-color: var(--red); }
.btn-danger[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- onboarding wizard ---------- */
.wiz-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  flex-wrap: wrap;
}
.wiz-steps li {
  flex: 1;
  min-width: 8rem;
  font-size: 13px;
  color: var(--text-mute);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  border-bottom: 2px solid var(--border);
}
.wiz-steps li.wiz-on {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.wiz-steps li.wiz-done {
  color: var(--text-dim);
  border-bottom-color: var(--green);
}
.wiz-choice { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- recon output ---------- */
.recon-out { margin-top: 18px; display: grid; gap: 18px; }
.recon-out:empty { margin-top: 0; }
.recon-group h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin: 0 0 8px;
}
.recon-facts {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 14px;
}
.recon-facts dt { color: var(--text-mute); }
.recon-facts dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: 13px; }
.recon-items { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.recon-items.recon-mono li { font-family: var(--mono); font-size: 12.5px; }
.recon-items li { color: var(--text-dim); font-size: 14px; word-break: break-all; }
.recon-items.recon-mono { columns: 2; column-gap: 24px; }
.recon-items.recon-mono li { break-inside: avoid; }
.recon-more { color: var(--text-mute) !important; font-style: italic; }

/* API descriptor: the money find — make it stand out. */
.recon-hit {
  border: 1px solid rgba(124, 92, 255, 0.3);
  background: rgba(124, 92, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.recon-hit .recon-items { columns: 1; }
.recon-hit a { color: var(--accent); }
.recon-kind {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.15);
  color: var(--accent);
}

@media (max-width: 560px) { .recon-items.recon-mono { columns: 1; } }

/* ---------- narrow screens ---------- */
@media (max-width: 640px) {
  .dash { padding: 32px 16px 72px; }
  .dash-card { padding: 18px; }
  .dash-grid { grid-template-columns: 1fr; }
  /* The address is the least useful of the three on a small screen, and it is
     the one that forces the row to overflow. */
  .dash-run { grid-template-columns: 1fr auto; }
  .dash-run-url { display: none; }
}
