/* ═══════════════════════════════════════════════
   SciComp — Shared Design System
   Unified header, nav, tokens, and footer
   for Data Explorer + SciBridge
   ═══════════════════════════════════════════════ */

/* ── Google Fonts (DM Sans + DM Mono + Fraunces) ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&family=Fraunces:wght@700;900&display=swap');

/* ── Design Tokens ── */
:root {
  /* Primary palette */
  --sc-blue: #1a56db;
  --sc-blue-dark: #1e40af;
  --sc-blue-light: #eff6ff;
  --sc-blue-border: #bfdbfe;

  /* Accent */
  --sc-orange: #ff6b35;
  --sc-orange-dark: #e85a2a;
  --sc-green: #059669;

  /* Grays */
  --sc-gray-50: #f9fafb;
  --sc-gray-100: #f3f4f6;
  --sc-gray-200: #e5e7eb;
  --sc-gray-300: #d1d5db;
  --sc-gray-400: #9ca3af;
  --sc-gray-500: #6b7280;
  --sc-gray-600: #4b5563;
  --sc-gray-700: #374151;
  --sc-gray-800: #1f2937;
  --sc-gray-900: #111827;

  /* Typography */
  --sc-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sc-mono: 'DM Mono', 'SF Mono', 'Fira Code', monospace;
  --sc-display: 'Fraunces', Georgia, serif;

  /* Layout */
  --sc-max-width: 1200px;
  --sc-radius: 6px;
  --sc-transition: all 0.2s ease;
}

/* ── Shared App Header ── */
.sc-header {
  background: #fff;
  border-bottom: 1px solid var(--sc-gray-200);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
  font-family: var(--sc-font);
}

.sc-header-inner {
  max-width: var(--sc-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 2rem;
}

/* Logo area */
.sc-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.sc-header-brand:hover {
  opacity: 0.85;
}

.sc-header-logo {
  height: 32px;
  width: auto;
}

.sc-header-wordmark {
  font-family: var(--sc-display);
  font-weight: 900;
  font-size: 18px;
  color: var(--sc-gray-900);
  letter-spacing: -0.02em;
  line-height: 1;
}

.sc-header-wordmark span {
  color: var(--sc-blue);
}

/* Navigation tabs */
.sc-header-nav {
  display: flex;
  align-items: stretch;
  height: 56px;
  gap: 0;
  margin-left: auto;
}

.sc-header-nav a {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-gray-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: var(--sc-transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
  font-family: var(--sc-font);
}

.sc-header-nav a:hover {
  color: var(--sc-gray-900);
  background: var(--sc-gray-50);
}

.sc-header-nav a.active {
  color: var(--sc-blue);
  border-bottom-color: var(--sc-blue);
}

/* Nav icon (small, subtle) */
.sc-nav-icon {
  width: 15px;
  height: 15px;
  margin-right: 6px;
  opacity: 0.7;
}

.sc-header-nav a.active .sc-nav-icon {
  opacity: 1;
}

/* ── User display (header right) ── */
.sc-header-user {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 10px;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--sc-gray-200);
  height: 28px;
}

.sc-user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--sc-gray-600);
  white-space: nowrap;
}

.sc-user-logout {
  font-size: 11px;
  font-weight: 500;
  color: var(--sc-gray-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  font-family: var(--sc-font);
  transition: color 0.15s;
}

.sc-user-logout:hover {
  color: var(--sc-gray-700);
}

/* ── Shared Footer ── */
.sc-footer {
  background: var(--sc-gray-900);
  color: var(--sc-gray-400);
  padding: 1.5rem 0;
  margin-top: 4rem;
  border-top: 3px solid var(--sc-blue);
  font-family: var(--sc-font);
}

.sc-footer-inner {
  max-width: var(--sc-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.8125rem;
}

.sc-footer-inner p {
  margin: 0;
  line-height: 1.6;
}

.sc-footer-conf {
  color: var(--sc-orange);
  font-weight: 700;
  margin-top: 0.375rem;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .sc-header-inner {
    padding: 0 1rem;
    gap: 0.75rem;
    height: 48px;
  }

  .sc-header-logo {
    height: 26px;
  }

  .sc-header-wordmark {
    font-size: 15px;
  }

  .sc-header-nav a {
    padding: 0 0.75rem;
    font-size: 12px;
  }
}
