:root {
  --brand: #0b2471;
  --brand-2: #1e3aa6;
  --accent: #00b6e8;
  --bg: #f7f8fb;
  --fg: #0e1530;
  --muted: #5b6480;
  --card: #ffffff;
  --border: #e3e6ef;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
}
.brand img { display: block; }
.brand span {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 12px;
}

main { max-width: 1100px; margin: 0 auto; padding: 64px 32px; }

.hero { text-align: center; padding: 48px 0 64px; }
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--brand);
}
.hero .lede {
  font-size: 19px;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 80ms ease, background 120ms ease;
}
.btn.primary {
  background: var(--brand);
  color: white;
}
.btn.primary:hover { background: var(--brand-2); }
.btn.big {
  font-size: 18px;
  padding: 14px 28px;
}
.btn.ghost {
  background: white;
  color: var(--brand);
  border-color: var(--border);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--brand);
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
code {
  background: #eef1f9;
  color: var(--brand);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  margin: 64px auto;
  box-shadow: 0 1px 2px rgba(14, 21, 48, 0.04);
}
.card h2 {
  margin: 0 0 24px;
  color: var(--brand);
  font-size: 24px;
}
.card .muted { color: var(--muted); font-size: 14px; }

/* Provisioning progress UI */
.progress-bar {
  position: relative;
  height: 6px;
  background: #eef1f9;
  border-radius: 3px;
  overflow: hidden;
  margin: 16px 0 24px;
}
.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  border-radius: 3px;
  animation: indeterminate 1.6s ease-in-out infinite;
}
@keyframes indeterminate {
  0%   { left: -40%; }
  100% { left: 100%; }
}

.steps { list-style: none; padding: 0; margin: 0; }
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 14px;
  transition: color 200ms ease;
}
.steps li.active { color: var(--fg); font-weight: 500; }
.steps li.done   { color: var(--fg); }

.steps .icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.steps li.pending .icon::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.steps li.active .icon::before {
  content: "";
  width: 14px; height: 14px;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.steps li.done .icon::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}
.steps li.failed { color: #c0392b; font-weight: 500; }
.steps li.failed .icon::before {
  content: "✕";
  color: #c0392b;
  font-weight: 700;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lab-creds {
  background: #0e1530;
  color: #e2e8ff;
  border-radius: 8px;
  padding: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lab-creds > div { display: flex; align-items: baseline; gap: 12px; }
.lab-creds .cred-label {
  display: inline-block;
  width: 80px;
  color: #8a93b3;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lab-creds strong { color: #e2e8ff; font-weight: 600; word-break: break-all; }
.lab-creds a { color: #7fc8ff; text-decoration: none; }
.lab-creds a:hover { text-decoration: underline; }

/* App shell: full-height left rail + scrollable main content */
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  flex: 0 0 260px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar .brand span {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  padding: 0;
}
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.app-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-content > main { max-width: 900px; margin: 0; padding: 48px 48px 16px; }
.app-content > footer { border-top: 1px solid var(--border); margin-top: auto; }

.admin-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.admin-sidebar h3 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.side-nav { margin-bottom: 24px; }
.side-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  transition: background 120ms ease;
}
.side-link:hover { background: #eef1f9; }
.side-link.active {
  background: var(--brand);
  color: white;
}
.side-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.side-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.side-section-head h3 { margin: 0; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 26px; height: 26px;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
}
.icon-btn:hover { background: #eef1f9; color: var(--brand); }
.lab-list { list-style: none; padding: 0; margin: 0; }
.lab-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.lab-item.expired { background: #fff6f4; border-color: #f3c8c0; }
.lab-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.lab-meta strong { color: var(--brand); }
.lab-cid {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
}
.lab-del {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  color: #b03a2e;
  border-color: #f3c8c0;
}
.lab-del:hover { background: #fff6f4; }
.lab-del.armed { background: #b03a2e; color: white; border-color: #b03a2e; }
.lab-del.armed:hover { background: #922d24; }

@media (max-width: 800px) {
  .launch-layout { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

footer {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  margin-top: 64px;
}
