/* Iron Forge Pro Console — shell styles. Reuses the consumer app's theme tokens
   (kept in sync by hand) so the Pro surface is on-brand. Lean + self-contained;
   this is the W3a shell, not the full design system. */
:root {
  color-scheme: dark;
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #334155;
  --border: #475569;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f5f9; --surface: #ffffff; --surface-2: #e2e8f0; --border: #cbd5e1;
  --primary: #2563eb; --primary-dark: #1d4ed8; --text: #0f172a; --text-secondary: #475569;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3 { margin: 0 0 8px; }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 0.85em; }
.muted { color: var(--text-secondary); }

.spinner {
  display: inline-block; width: 24px; height: 24px; border: 3px solid var(--surface-2);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite;
}
.center-spinner { display: grid; place-items: center; min-height: 60vh; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--text);
}
.btn:hover { filter: brightness(1.08); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-block { width: 100%; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: var(--surface-2); color: var(--text-secondary);
}
.badge-soon { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning); }

input, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-size: 1rem;
}
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; margin-bottom: 4px; }
.error-msg { color: var(--danger); margin: 0 0 10px; }

/* ── public (landing / login) ── */
.public { max-width: 920px; margin: 0 auto; padding: 32px 20px; }
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.hero p { color: var(--text-secondary); font-size: 1.1rem; max-width: 620px; margin: 8px auto 24px; }
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.auth-box { max-width: 380px; margin: 8vh auto; }

/* ── console shell ── */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px; display: flex; flex-direction: column; }
.brand { font-weight: 800; font-size: 1.1rem; padding: 8px 10px 18px; display: flex; align-items: center; gap: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-secondary); cursor: pointer; font-weight: 600; margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 10px; }
.content { padding: 28px 32px; max-width: 1000px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stat { font-size: 1.8rem; font-weight: 800; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: none; }

@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-foot { display: none; }
  .content { padding: 20px 16px; }
}
