:root {
  color-scheme: dark;
  --bg: #0f141c;
  --surface: #161b22;
  --surface-strong: #0f141c;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --border: #30363d;
  --primary: #00ff66;
  --primary-soft: rgba(0, 255, 102, 0.08);
  --accent: #00ff66;
  --danger: #ff3333;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #1f2428;
  --text-muted: #626a73;
  --border: #d1d5da;
  --primary: #059669;
  --primary-soft: rgba(5, 150, 105, 0.08);
  --danger: #d73a49;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Fira Code", monospace;
}

/* Navbar Global Framework */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  background: var(--primary);
  color: #000;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
}

.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  font-size: 0.9rem;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-strong);
}

.nav-link.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.theme-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Structural Viewport Layouts */
.content-viewport {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.static-container {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 4px;
  max-width: 800px;
  margin: 40px auto;
}

.static-container h2 {
  margin-top: 0;
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.static-container p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Ingestion Portals (Drag & Drop Zone) */
.upload-dropzone {
  border: 1px dashed var(--border);
  background: var(--surface-strong);
  padding: 40px 20px;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.upload-dropzone:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.upload-info {
  font-family: "Fira Code", monospace;
}

/* Interview Grid Engine & Panel Architecture */
.interview-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.interview-grid.reporting-mode {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 24px;
}

@media (max-width: 968px) {
  .interview-grid.reporting-mode {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.tag {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Prompt Card and Input Frameworks */
.question-prompt-card {
  background: var(--surface-strong);
  border-left: 3px solid var(--primary);
  padding: 20px;
  border-radius: 0 4px 4px 0;
}

.question-prompt-card p {
  margin: 0;
  line-height: 1.6;
}

.response-textarea {
  width: 100%;
  height: 160px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  box-sizing: border-box;
  color: var(--text);
  font-family: "Fira Code", monospace;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

.response-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Telemetry Reporting Records */
.career-guidance-card h3 {
  margin-top: 0;
  color: var(--primary);
}

.career-guidance-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Global Button Utilities */
.btn {
  font-family: "Fira Code", monospace;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  border: none;
  transition: opacity 0.2s, background-color 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn:hover {
  opacity: 0.9;
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Sub-Surface Engine Overlays & Loaders */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 20, 28, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.loader-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  border-radius: 4px;
  text-align: center;
  max-width: 450px;
}

.loader-card p {
  margin: 16px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility Hidden Toggle Override */
.hidden {
  display: none !important;
}