/* Mission Control — the Setup route (workspace readiness).
   Uses the app's existing design tokens so it inherits light/dark automatically. */

.mission-control {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  container-type: inline-size; /* enables the .mc-grid container query below */
}

/* ── Hero / readiness header ─────────────────────────────────────────────── */
.mc-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--surface);
  border: var(--line);
  border-radius: 20px;
  padding: 24px;
}
.mc-hero-main { flex: 1 1 420px; min-width: 300px; }
.mc-hero h1 { margin: 0 0 4px; font-size: 1.5rem; font-weight: 800; }
.mc-hero-sub { margin: 0 0 16px; color: var(--text-muted, #9aa3b2); }
.mc-progress {
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text, #888) 12%, transparent);
  overflow: hidden;
}
.mc-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary, #7c5cff), color-mix(in srgb, var(--primary, #7c5cff) 60%, #35d0a5));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.mc-hero-meta {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--text-muted, #9aa3b2);
  font-size: .9rem;
}
.mc-hero-meta strong { color: var(--text, inherit); font-size: 1rem; }

.mc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mc-action {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 12px;
  border: var(--line); background: var(--bg, transparent); color: var(--text, inherit);
  font-weight: 600; font-size: .85rem; cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .1s ease;
}
.mc-action:hover { border-color: color-mix(in srgb, var(--primary, #7c5cff) 45%, var(--line)); }
.mc-action:active { transform: translateY(1px); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.mc-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
@container (max-width: 900px) { .mc-grid { grid-template-columns: 1fr; } }
.mc-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Category card ───────────────────────────────────────────────────────── */
.mc-card {
  background: var(--surface);
  border: var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.mc-card:hover { border-color: color-mix(in srgb, var(--primary, #7c5cff) 35%, var(--line)); transform: translateY(-2px); box-shadow: var(--glass); }
.mc-card-head { display: flex; gap: 12px; align-items: center; }
.mc-card-icon {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 11px; font-size: 1.15rem;
  background: color-mix(in srgb, var(--primary, #7c5cff) 14%, transparent);
  color: var(--primary, #7c5cff);
}
.mc-card-titles { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-card-titles h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.mc-card-summary { margin: 0; color: var(--text-muted, #9aa3b2); font-size: .88rem; line-height: 1.4; }

.mc-status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; }
.mc-status--ok   { color: #2fb27a; }
.mc-status--warn { color: #d99a2b; }
.mc-status--bad  { color: #e5484d; }
.mc-status--idle { color: var(--text-muted, #9aa3b2); }

.mc-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.mc-dot--green { background: #2fb27a; }
.mc-dot--amber { background: #d99a2b; }
.mc-dot--red   { background: #e5484d; }
.mc-dot--grey  { background: color-mix(in srgb, var(--text, #888) 35%, transparent); }

.mc-facts { display: flex; flex-direction: column; gap: 5px; }
.mc-fact { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; }
.mc-fact-k { color: var(--text-muted, #9aa3b2); }
.mc-fact-v { font-weight: 600; }
.mc-fact-v.ok { color: #2fb27a; }
.mc-fact-v.bad { color: var(--text-muted, #9aa3b2); }

.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mc-chip {
  font-size: .72rem; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line, rgba(128,128,128,.2));
  color: var(--text-muted, #9aa3b2);
}
.mc-open {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 10px;
  border: var(--line); background: transparent; color: var(--text, inherit);
  font-weight: 600; font-size: .82rem; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.mc-open:hover { background: color-mix(in srgb, var(--primary, #7c5cff) 12%, transparent); border-color: color-mix(in srgb, var(--primary, #7c5cff) 45%, var(--line)); }

/* ── Side panels ─────────────────────────────────────────────────────────── */
.mc-side { display: flex; flex-direction: column; gap: 16px; }
.mc-panel { background: var(--surface); border: var(--line); border-radius: 16px; padding: 16px; }
.mc-panel > header { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 12px; }
.mc-panel > header i { color: var(--primary, #7c5cff); }

.mc-rec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mc-rec { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.mc-rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary, #7c5cff); flex: 0 0 auto; }
.mc-rec-text { flex: 1; color: var(--text, inherit); line-height: 1.35; }
.mc-rec--empty { color: var(--text-muted, #9aa3b2); }
.mc-rec-cta {
  flex: 0 0 auto; padding: 4px 10px; border-radius: 8px;
  border: var(--line); background: transparent; color: var(--primary, #7c5cff);
  font-weight: 600; font-size: .76rem; cursor: pointer;
}
.mc-rec-cta:hover { background: color-mix(in srgb, var(--primary, #7c5cff) 12%, transparent); }

.mc-health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mc-health-item { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--text-muted, #9aa3b2); }

/* Subtle pulse on the "checking" state. */
.mission-control.is-loading .mc-card-summary,
.mission-control.is-loading .mc-status { opacity: .65; }
