/* 
 * Logentica Console - Main Styles
 * Minimalist Monochrome Theme
 */

/* ===== CSS VARIABLES ===== */
:root {
  /* Background layers - pure black to charcoal */
  --bg-void: #000000;
  --bg-space: #000000;
  --bg-panel: #111111;
  --bg-elevated: #111111;
  --bg-hover: rgba(255, 255, 255, 0.05);
  
  /* Borders - opacity-based white */
  --border-dim: rgba(255, 255, 255, 0.1);
  --border-default: rgba(255, 255, 255, 0.15);
  --border-bright: rgba(255, 255, 255, 0.25);
  
  /* Primary accent - White */
  --accent-blue: #FFFFFF;
  --accent-blue-bright: #FFFFFF;
  --accent-blue-dim: rgba(255, 255, 255, 0.8);
  --accent-blue-glow: rgba(255, 255, 255, 0.2);
  
  /* Secondary accent - use white */
  --accent-purple: #FFFFFF;
  --accent-purple-glow: rgba(255, 255, 255, 0.2);
  
  /* Tertiary accent - use white */
  --accent-cyan: #FFFFFF;
  --accent-cyan-glow: rgba(255, 255, 255, 0.2);
  
  /* Status colors - keep functional but muted */
  --status-success: #10b981;
  --status-success-glow: rgba(16, 185, 129, 0.3);
  --status-warning: #f59e0b;
  --status-warning-glow: rgba(245, 158, 11, 0.3);
  --status-danger: #ef4444;
  --status-danger-glow: rgba(239, 68, 68, 0.3);
  --status-neutral: rgba(255, 255, 255, 0.5);
  --status-info: rgba(255, 255, 255, 0.7);
  
  /* Text hierarchy - white with opacity */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-muted: rgba(255, 255, 255, 0.3);
  
  /* Typography */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows - subtle, no colored glows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-glow-blue: 0 0 20px rgba(255, 255, 255, 0.1);
  --shadow-glow-green: 0 0 20px var(--status-success-glow);
  --shadow-glow-red: 0 0 20px var(--status-danger-glow);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* Grid background and scanlines removed - Logentica uses clean design */

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ===== GLASS EFFECT ===== */
.glass {
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-dim);
}

.glass-strong {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
}

/* Glow effects removed - Logentica uses clean design */

/* ===== NAVIGATION ===== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dim);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  transform: translateZ(0);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo-img {
  height: 28px;
  width: auto;
}

.nav-wordmark {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  margin-left: 0.5rem;
}

.nav-wordmark-sub {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 0.25rem;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tabs {
  display: flex;
  gap: var(--space-xs);
  margin-left: var(--space-xl);
}

.nav-tab {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-tab.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: #FFFFFF;
  border-radius: var(--radius-full);
}

.nav-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.status-dot.healthy {
  background: var(--status-success);
  box-shadow: 0 0 8px var(--status-success-glow);
}

.status-dot.warning {
  background: var(--status-warning);
  box-shadow: 0 0 8px var(--status-warning-glow);
}

.status-dot.error {
  background: var(--status-danger);
  box-shadow: 0 0 8px var(--status-danger-glow);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding-top: 64px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-lg);
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ===== TENANT CARD (Mission Pod) ===== */
.tenant-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  position: relative;
}

.tenant-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--status-color, var(--accent-blue));
  opacity: 0.8;
}

.tenant-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.tenant-card.status-active { --status-color: var(--status-success); }
.tenant-card.status-creating { --status-color: var(--status-info); }
.tenant-card.status-provisioning { --status-color: var(--status-warning); }
.tenant-card.status-failed { --status-color: var(--status-danger); }
.tenant-card.status-archived { --status-color: var(--status-neutral); }

.tenant-card-body {
  padding: var(--space-lg);
}

.tenant-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tenant-domain {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  margin-top: var(--space-xs);
}

.tenant-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-dim);
}

.tenant-metric {
  text-align: center;
}

.tenant-metric-value {
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.tenant-metric-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.tenant-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-dim);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  outline: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #FFFFFF;
  color: #000000;
}

.btn-primary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--status-danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  box-shadow: var(--shadow-glow-red);
}

.btn-success {
  background: var(--status-success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  box-shadow: var(--shadow-glow-green);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
}

.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.75rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-lg);
  font-size: 1rem;
}

/* ===== INPUTS ===== */
.input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-glow);
}

.input::placeholder {
  color: var(--text-muted);
}

.input-mono {
  font-family: var(--font-mono);
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== MODALS ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  transform: translateZ(0);
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-dim);
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-lg);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-top: 1px solid var(--border-dim);
}

/* ===== COMMAND PALETTE ===== */
.command-palette {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  background: rgba(5, 5, 8, 0.7);
  backdrop-filter: blur(8px);
}

.command-palette-inner {
  width: 100%;
  max-width: 600px;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.command-palette-input {
  width: 100%;
  padding: var(--space-lg);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
}

.command-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.command-item:hover,
.command-item.selected {
  background: var(--bg-hover);
}

.command-item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
}

.command-item-content {
  flex: 1;
}

.command-item-title {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.command-item-description {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.command-item-shortcut {
  display: flex;
  gap: 4px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

/* ===== NOTIFICATIONS ===== */
.notification {
  position: fixed;
  top: 80px;
  right: var(--space-lg);
  z-index: 150;
  min-width: 320px;
  max-width: 400px;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.notification.success {
  border-color: var(--status-success);
  box-shadow: var(--shadow-lg), 0 0 20px var(--status-success-glow);
}

.notification.error {
  border-color: var(--status-danger);
  box-shadow: var(--shadow-lg), 0 0 20px var(--status-danger-glow);
}

.notification.warning {
  border-color: var(--status-warning);
  box-shadow: var(--shadow-lg), 0 0 20px var(--status-warning-glow);
}

.notification-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.notification-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  color: var(--accent-blue);
  font-size: 1.25rem;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Orbital view removed - Logentica uses dashboard-first design */

/* ===== TERMINAL ===== */
.terminal {
  background: var(--bg-void);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28ca42; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.terminal-body {
  padding: var(--space-md);
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.terminal-line {
  margin: var(--space-xs) 0;
}

.terminal-prompt {
  color: var(--accent-cyan);
}

.terminal-output {
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.terminal-input {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-top: 1px solid var(--border-dim);
}

.terminal-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  outline: none;
}

/* ===== PROGRESS BAR ===== */
.progress {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress-bar.success {
  background: var(--status-success);
}

.progress-bar.warning {
  background: var(--status-warning);
}

.progress-bar.danger {
  background: var(--status-danger);
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--status-danger);
}

.badge-info {
  background: rgba(6, 182, 212, 0.15);
  color: var(--status-info);
}

.badge-neutral {
  background: rgba(100, 116, 139, 0.15);
  color: var(--status-neutral);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-void);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-bright);
}

/* ===== UTILITIES ===== */

.bg-success { background: var(--status-success); }
.bg-warning { background: var(--status-warning); }
.bg-danger { background: var(--status-danger); }
.bg-tertiary { background: var(--text-tertiary); }

.h-1 { height: 0.25rem; }
.rounded { border-radius: var(--radius-md); }
.overflow-hidden { overflow: hidden; }
.transition-all { transition: all var(--transition-normal); }
.duration-300 { transition-duration: 300ms; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-muted { color: var(--text-muted); }
.text-blue { color: var(--accent-blue); }
.text-success { color: var(--status-success); }
.text-warning { color: var(--status-warning); }
.text-danger { color: var(--status-danger); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-bar {
    height: auto;
    padding: var(--space-sm) var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .nav-logo {
    flex: 1 1 auto;
    min-width: 180px;
  }

  .nav-status {
    flex: 0 0 auto;
    gap: var(--space-sm);
  }

  .nav-tabs {
    width: 100%;
    order: 3;
    margin-left: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-dim);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  .nav-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: var(--space-sm) var(--space-sm);
    font-size: 0.8125rem;
  }

  .main-content {
    /* Account for two-row fixed nav on mobile */
    padding-top: 120px;
  }
  
  .container {
    padding: var(--space-md);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal {
    margin: var(--space-md);
    max-height: calc(100vh - var(--space-xl));
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== RESEARCH REPORT (SAFE HTML) ===== */
.research-report {
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 0.95rem;
}

.research-report h1,
.research-report h2,
.research-report h3,
.research-report h4,
.research-report h5,
.research-report h6 {
  margin: 1.2em 0 0.5em;
  line-height: 1.25;
  color: var(--text-primary);
}

.research-report h1 { font-size: 1.35rem; }
.research-report h2 { font-size: 1.2rem; }
.research-report h3 { font-size: 1.05rem; }

.research-report p {
  margin: 0.75em 0;
}

.research-report a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.research-report ul,
.research-report ol {
  margin: 0.75em 0;
  padding-left: 1.25em;
}

.research-report li {
  margin: 0.35em 0;
}

.research-report blockquote {
  margin: 0.9em 0;
  padding: 0.75em 1em;
  border-left: 3px solid var(--border-dim);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.research-report pre {
  margin: 1em 0;
  padding: 0.9em 1em;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.2);
  overflow: auto;
}

.research-report code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.research-report table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.research-report th,
.research-report td {
  border: 1px solid var(--border-dim);
  padding: 0.5em 0.6em;
  vertical-align: top;
}

.research-report th {
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
}
