@import "tailwindcss";

:root {
  --bg-canvas: #06070A;
  --bg-elevated: #0E1118;
  --surface-card: #121725;
  --surface-muted: #1A2335;
  --border-subtle: #1E293B;
  --border-default: #2A3654;
  --text-primary: #EFF4FF;
  --text-secondary: #A5B1C7;
  --text-tertiary: #6C7C98;
  --accent-primary: #5A8CFF;
  --accent-secondary: #2EE6D6;
  --success: #34D399;
  --warning: #F59E0B;
  --danger: #FF6E6E;
  --purple: #A78BFA;
}

@theme inline {
  --color-background: var(--bg-canvas);
  --color-foreground: var(--text-primary);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', ui-monospace, monospace;
}

body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Status dot pulse animation */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.3); }
}

.pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Card hover */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-default);
  box-shadow: 0 0 20px rgba(90, 140, 255, 0.05);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-canvas); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* Progress bar */
.progress-bar {
  background: var(--surface-muted);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Toast slide-in animation */
@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.animate-in {
  animation: slide-in-right 0.3s ease-out;
}

/* Focus ring */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Utility classes — replaces pervasive inline styles (CQ2) */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent-primary); }
.text-accent-secondary { color: var(--accent-secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-purple { color: var(--purple); }

.bg-canvas { background: var(--bg-canvas); }
.bg-elevated { background: var(--bg-elevated); }
.bg-surface { background: var(--surface-card); }
.bg-muted { background: var(--surface-muted); }

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

.input-base {
  background: var(--surface-muted);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  caret-color: var(--accent-primary);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-danger {
  background: rgba(255, 110, 110, 0.1);
  color: var(--danger);
}

.btn-success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
}

/* Skeleton shimmer (CQ5) */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--border-subtle) 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
}

/* Light theme overrides (F10) */
:root.light {
  --bg-canvas: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --surface-card: #FFFFFF;
  --surface-muted: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-default: #CBD5E1;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --accent-primary: #3B6FE8;
  --accent-secondary: #0EA5E9;
  --success: #10B981;
  --warning: #D97706;
  --danger: #EF4444;
  --purple: #8B5CF6;
}
