:root {
  --bg: #050816;
  --bg-soft: #0b1020;
  --card: #111827;
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.15);
  --accent-strong: #16a34a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.3);
  --pill-bg: rgba(15, 23, 42, 0.9);
  --pill-border: rgba(148, 163, 184, 0.5);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0b1120 0, #020617 45%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #4ade80, #16a34a 60%, #052e16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #ecfdf5;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.top-bar-nav {
  display: flex;
  gap: 0.75rem;
}

.top-link {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.top-link:hover {
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text);
}

/* Bottom bar */

.bottom-bar {
  margin-top: auto;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Main layout */

#app {
  padding: 1.5rem;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: 1.5rem;
  background: radial-gradient(circle at top left, #0f172a 0, #020617 55%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 0.75rem;
  color: var(--muted);
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.hero-title {
  font-size: 2.1rem;
  line-height: 1.1;
  margin: 0;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #022c22;
  font-weight: 600;
}

.btn-secondary {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-secondary:hover {
  border-color: var(--accent);
}

/* Hero visual */

.hero-visual {
  position: relative;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: radial-gradient(circle at top, #0b1120 0, #020617 70%);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.hero-visual-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--muted);
}

.hero-visual-card {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-visual-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.hero-visual-title {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-visual-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-visual-score {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

/* Intake */

.intake {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.intake h2 {
  margin: 0 0 0.5rem;
}

.intake label {
  font-size: 0.85rem;
  color: var(--muted);
}

.intake input,
.intake select {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: #020617;
  color: var(--text);
  font-size: 0.9rem;
}

.intake button {
  margin-top: 0.75rem;
  align-self: flex-start;
}

#intake-status {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

/* Dashboards */

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 1.5rem;
}

.dashboard h2 {
  margin-top: 0;
}

.card {
  padding: 1.25rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.card h3 {
  margin-top: 0;
}

.card ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Responsive */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .bottom-bar {
    flex-direction: column;
    gap: 0.25rem;
  }
}
