/* ════════════════════════════════════════════
   SCCM AI Investigator — Design System
   ════════════════════════════════════════════ */

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

/* ── CSS Custom Properties ── */
:root {
  /* Backgrounds */
  --bg-primary: #06080f;
  --bg-secondary: #0d1117;
  --bg-tertiary: #161b22;
  --bg-card: #111827;
  --bg-glass: rgba(17, 24, 39, 0.65);
  --bg-glass-hover: rgba(17, 24, 39, 0.85);
  --bg-input: rgba(15, 20, 35, 0.8);
  --bg-elevated: #1a2233;

  /* Accents */
  --accent-primary: #3b82f6;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --accent-gradient-hover: linear-gradient(135deg, #60a5fa, #a78bfa);
  --accent-glow: rgba(59, 130, 246, 0.25);
  --accent-glow-strong: rgba(59, 130, 246, 0.45);

  /* Severity Colors */
  --severity-critical: #ef4444;
  --severity-critical-bg: rgba(239, 68, 68, 0.1);
  --severity-critical-border: rgba(239, 68, 68, 0.3);
  --severity-high: #f97316;
  --severity-high-bg: rgba(249, 115, 22, 0.1);
  --severity-warning: #f59e0b;
  --severity-warning-bg: rgba(245, 158, 11, 0.1);
  --severity-warning-border: rgba(245, 158, 11, 0.3);
  --severity-info: #10b981;
  --severity-info-bg: rgba(16, 185, 129, 0.1);
  --severity-info-border: rgba(16, 185, 129, 0.3);
  --severity-low: #06b6d4;

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

  /* Borders */
  --border-subtle: rgba(148, 163, 184, 0.08);
  --border-default: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(148, 163, 184, 0.2);
  --border-accent: rgba(59, 130, 246, 0.3);

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --shadow-glow-strong: 0 0 50px var(--accent-glow-strong);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ── Layout ── */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-glow);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { box-shadow: var(--shadow-glow); }
  50% { box-shadow: var(--shadow-glow-strong); }
}

.header-title {
  font-size: 1.35rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.header-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-glass);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
}

.btn:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  box-shadow: var(--shadow-glow-strong);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-md);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-danger {
  border-color: var(--severity-critical-border);
  color: var(--severity-critical);
}

.btn-danger:hover {
  background: var(--severity-critical-bg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* ════════════════════════════════════════════
   SETTINGS DRAWER
   ════════════════════════════════════════════ */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.settings-overlay.active {
  opacity: 1;
  visibility: visible;
}

.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-default);
  z-index: 1001;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.settings-drawer.active {
  transform: translateX(0);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.settings-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.settings-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.setting-group .hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: -4px;
}

/* ── Form Controls ── */
.input,
.select-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  outline: none;
}

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

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

.input-password-wrapper {
  position: relative;
}

.input-password-wrapper .input {
  padding-right: 42px;
}

.input-password-wrapper .toggle-visibility {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.input-password-wrapper .toggle-visibility:hover {
  color: var(--text-secondary);
}

.select-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.select-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Provider info */
.static-provider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.static-provider .active-dot {
  color: var(--severity-info);
  font-weight: bold;
  animation: logoPulse 2s ease-in-out infinite;
}

/* ════════════════════════════════════════════
   MAIN CONTENT GRID
   ════════════════════════════════════════════ */
.main-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding-bottom: 60px;
}

/* ════════════════════════════════════════════
   GLASS CARD
   ════════════════════════════════════════════ */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  border-color: var(--border-default);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header h2 .icon {
  font-size: 1.15rem;
}

.card-body {
  padding: 24px;
}

/* ════════════════════════════════════════════
   UPLOAD ZONE
   ════════════════════════════════════════════ */
.upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: transparent;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.03);
}

.upload-zone.drag-over {
  border-style: solid;
  transform: scale(1.01);
}

.upload-zone.drag-over::before {
  opacity: 0.04;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
  animation: floatUp 3s ease-in-out infinite;
}

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.upload-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.upload-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.upload-browse {
  color: var(--accent-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#file-input {
  display: none;
}

/* ── File List ── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  animation: slideIn var(--transition-base) ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.file-item-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.file-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: 8px;
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.file-item-remove:hover {
  color: var(--severity-critical);
}

/* ════════════════════════════════════════════
   PRE-ANALYSIS PANEL
   ════════════════════════════════════════════ */
.pre-analysis {
  display: none;
}

.pre-analysis.visible {
  display: block;
  animation: fadeIn var(--transition-base) ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

.stat-value.errors {
  color: var(--severity-critical);
}

.stat-value.warnings {
  color: var(--severity-warning);
}

.stat-value.info {
  color: var(--accent-primary);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
}

.components-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.component-tag {
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ════════════════════════════════════════════
   INVESTIGATE BUTTON
   ════════════════════════════════════════════ */
.investigate-section {
  display: none;
  text-align: center;
  padding: 8px 0;
}

.investigate-section.visible {
  display: block;
}

.btn-investigate {
  padding: 14px 40px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.btn-investigate::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.08) 50%,
    transparent 70%
  );
  transform: rotate(0deg);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

/* ════════════════════════════════════════════
   INVESTIGATION PROGRESS
   ════════════════════════════════════════════ */
.investigation-progress {
  display: none;
}

.investigation-progress.visible {
  display: block;
  animation: fadeIn var(--transition-base) ease-out;
}

.progress-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.progress-step.active {
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.05);
}

.progress-step.complete {
  color: var(--severity-info);
}

.progress-step-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.progress-step.active .progress-step-icon {
  animation: spin 1s linear infinite;
  border-color: var(--accent-primary);
  border-top-color: transparent;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-step.complete .progress-step-icon {
  background: var(--severity-info);
  border-color: var(--severity-info);
  color: #fff;
}

/* ════════════════════════════════════════════
   REPORT
   ════════════════════════════════════════════ */
.report-section {
  display: none;
}

.report-section.visible {
  display: block;
  animation: fadeIn var(--transition-slow) ease-out;
}

.report-actions {
  display: flex;
  gap: 8px;
}

.report-content {
  padding: 28px;
  font-size: 0.9rem;
  line-height: 1.75;
}

/* Markdown-rendered report styles */
.report-content h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.report-content h1:first-child {
  margin-top: 0;
}

.report-content h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 12px 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 20px 0 8px 0;
  color: var(--accent-primary);
}

.report-content p {
  margin: 8px 0;
  color: var(--text-secondary);
}

.report-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.report-content ul,
.report-content ol {
  padding-left: 24px;
  margin: 8px 0;
}

.report-content li {
  margin: 4px 0;
  color: var(--text-secondary);
}

.report-content li strong {
  color: var(--text-primary);
}

.report-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  color: var(--accent-primary);
}

.report-content pre {
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
  position: relative;
}

.report-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.6;
}

.report-content blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 8px 16px;
  margin: 12px 0;
  background: rgba(59, 130, 246, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
}

.report-content hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 24px 0;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}

.report-content th {
  background: var(--bg-tertiary);
  text-align: left;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.report-content td {
  padding: 8px 14px;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.report-content tr:hover td {
  background: rgba(59, 130, 246, 0.03);
}

/* ════════════════════════════════════════════
   TIMELINE
   ════════════════════════════════════════════ */
.timeline-section {
  display: none;
}

.timeline-section.visible {
  display: block;
  animation: fadeIn var(--transition-slow) ease-out;
}

.timeline-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.timeline-filter {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.timeline-filter.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.timeline-filter:hover:not(.active) {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.timeline-filter.error-filter.active {
  background: var(--severity-critical);
  border-color: var(--severity-critical);
}

.timeline-filter.warning-filter.active {
  background: var(--severity-warning);
  border-color: var(--severity-warning);
  color: #000;
}

.timeline-filter.info-filter.active {
  background: var(--severity-info);
  border-color: var(--severity-info);
}

.timeline-body {
  max-height: 500px;
  overflow-y: auto;
  margin-top: 16px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 150px 110px 1fr;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  transition: background var(--transition-fast);
  border-left: 3px solid transparent;
}

.timeline-entry:hover {
  background: var(--bg-tertiary);
}

.timeline-entry.error {
  border-left-color: var(--severity-critical);
  background: var(--severity-critical-bg);
}

.timeline-entry.warning {
  border-left-color: var(--severity-warning);
  background: var(--severity-warning-bg);
}

.timeline-entry.info {
  border-left-color: var(--severity-info);
}

.timeline-timestamp {
  color: var(--text-tertiary);
  white-space: nowrap;
}

.timeline-source {
  color: var(--accent-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-message {
  color: var(--text-secondary);
  word-break: break-word;
}

.timeline-entry.error .timeline-message {
  color: var(--severity-critical);
}

.timeline-entry.warning .timeline-message {
  color: var(--severity-warning);
}

.timeline-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ════════════════════════════════════════════
   STATUS BAR
   ════════════════════════════════════════════ */
.status-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  z-index: 100;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--text-muted);
}

.status-dot.ready {
  background: var(--severity-info);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.status-dot.working {
  background: var(--severity-warning);
  animation: blink 1s ease-in-out infinite;
}

.status-dot.error {
  background: var(--severity-critical);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.85rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  animation: toastIn var(--transition-spring) ease-out;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}

.toast.toast-error {
  border-color: var(--severity-critical-border);
}

.toast.toast-success {
  border-color: var(--severity-info-border);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-exit {
  animation: toastOut 300ms ease-in forwards;
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(30px); }
}

/* ════════════════════════════════════════════
   STREAMING CURSOR
   ════════════════════════════════════════════ */
.streaming-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--accent-primary);
  margin-left: 2px;
  animation: cursorBlink 0.8s step-end infinite;
  vertical-align: text-bottom;
  border-radius: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-container {
    padding: 0 16px;
  }

  .app-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-entry {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .timeline-source {
    font-size: 0.72rem;
  }

  .report-content {
    padding: 16px;
  }

  .settings-drawer {
    width: 100%;
    max-width: 100vw;
  }
}

/* ════════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════════ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hidden {
  display: none !important;
}
