@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;600&display=swap');

:root {
  --bg: #0f1317;
  --panel: #171c22;
  --panel-border: rgba(255, 255, 255, 0.08);
  --accent: #f6c445;
  --accent-2: #5cc8ff;
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.7);
  --shadow: 0 20px 50px rgba(15, 19, 23, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: radial-gradient(circle at top, #1c2430 0%, #0f1317 55%, #0b0e12 100%);
  color: var(--text);
  min-height: 100vh;
}

.bg-orbit {
  position: fixed;
  inset: -20% auto auto -20%;
  width: 380px;
  height: 380px;
  background: conic-gradient(from 90deg, rgba(92, 200, 255, 0.3), rgba(246, 196, 69, 0.1));
  filter: blur(40px);
  opacity: 0.6;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.login-overlay,
.wizard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 4;
}

.login-overlay.active,
.wizard-overlay.active {
  display: flex;
}

.login-card,
.wizard-card {
  background: var(--panel);
  padding: 32px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  width: min(420px, 85vw);
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.wizard-header {
  display: grid;
  gap: 6px;
}

.wizard-body {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.wizard-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 220px;
  padding: 32px 20px;
  background: rgba(15, 19, 23, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 2;
}

.brand {
  display: grid;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--accent);
}

.brand small {
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.sidebar nav {
  display: grid;
  gap: 10px;
}

.sidebar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar a:hover {
  color: var(--text);
}

.sidebar-footer {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.app-shell {
  margin-left: 220px;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 64px 8vw 40px;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--accent-2);
  margin: 0 0 16px;
}

.hero h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
  margin: 0 0 16px;
}

.hero-subtitle {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-metrics,
.metrics-strip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metrics-strip {
  padding: 0 8vw 24px;
  position: relative;
  z-index: 1;
}

.metric {
  background: rgba(23, 28, 34, 0.8);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.metric-value {
  font-size: 1.5rem;
  font-family: 'IBM Plex Mono', monospace;
  display: block;
  margin-top: 8px;
}

.grid {
  position: relative;
  z-index: 1;
  padding: 0 8vw 80px;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.panel.full {
  grid-column: 1 / -1;
}

.panel-header {
  padding: 20px 24px 0;
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.panel-header p {
  margin: 0 0 8px;
  color: var(--muted);
}

.panel-body {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

input,
select,
textarea {
  background: #0d1116;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-family: 'IBM Plex Mono', monospace;
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checklist {
  gap: 14px;
}

.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-2);
  font-size: 0.7rem;
  cursor: help;
  position: relative;
}

.hint::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: #0d1116;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  width: 200px;
  text-align: left;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.hint:hover::after {
  opacity: 1;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #1c1c1c;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.response {
  min-height: 22px;
  color: var(--accent-2);
  font-size: 0.85rem;
}

.table {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
}

.batch-list {
  font-size: 0.85rem;
  color: var(--muted);
}

.hub-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer {
  padding: 24px 8vw 48px;
  color: var(--muted);
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-shell {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 48px 6vw 24px;
  }

  .grid {
    padding: 0 6vw 60px;
  }
}
