/* =====================================================
   CRA-Portal Dark Theme
   Professional, consistent dark theme for all pages
   ===================================================== */

:root {
  /* Brand colors */
  --brand-primary: #3b82f6;
  --brand-primary-hover: #2563eb;
  --brand-primary-soft: rgba(59, 130, 246, 0.15);

  /* Semantic colors */
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);
  --info: #06b6d4;
  --info-soft: rgba(6, 182, 212, 0.15);

  /* Dark theme base */
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-elevated: #334155;
  --bg-hover: #334155;

  /* Borders */
  --border-color: #334155;
  --border-color-light: #475569;

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Accent (for links) */
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
}

/* ---- Global resets ---- */
html, body {
  background-color: var(--bg-body);
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

a:visited {
  color: var(--accent);
}

/* ---- Topbar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-hover));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.brand-name {
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.topbar-spacer {
  flex: 1;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.role-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.role-badge {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Hide any legacy nav */
.topnav, .header-nav, .app-top-nav {
  display: none !important;
}
