:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #65738a;
  --line: #dbe3ef;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  min-height: calc(100vh - 96px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

.status-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.08);
}

.status-card h2 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.status-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.version {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .app-shell {
    padding: 28px 0;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
}

.header-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
}

.header-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.5rem;
}

.header-nav .nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.header-nav .nav-link:hover {
  color: var(--ink);
}

.header-nav .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.logout-btn {
  background: none;
  border: 1px solid var(--line);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
}

.logout-btn:hover {
  background: var(--line);
  color: var(--ink);
}

.back-btn {
  background: var(--line);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  margin-left: 1rem;
}

.back-btn:hover {
  background: #cbd5e1;
}

.help-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  opacity: 0.7;
}

.help-toggle:hover {
  opacity: 1;
}
