/* ============================================
   PMOMAX DESIGN SYSTEM - OBSIDIAN + GOLD
   Premium, unified theme with consistent hierarchy
   ============================================ */

:root {
  /* ===== COLOR TOKENS ===== */
  /* Background tiers */
  --color-bg-primary: #070A0F;      /* Near-black with blue hint */
  --color-bg-panel: #0F172A;        /* Panel background */
  --color-bg-panel-2: #0B1220;      /* Deeper panel variant */
  --color-bg-elevated: #1A2333;     /* Elevated cards */
  
  /* Borders & dividers */
  --color-border: rgba(148, 163, 184, 0.14);  /* Subtle borders */
  --color-border-hover: rgba(148, 163, 184, 0.28);
  --color-border-focus: rgba(251, 191, 36, 0.5);
  
  /* Text hierarchy */
  --color-text-primary: #E5E7EB;    /* Main text */
  --color-text-secondary: rgba(226, 232, 240, 0.68);  /* Muted text */
  --color-text-tertiary: rgba(226, 232, 240, 0.45);   /* Very muted */
  
  /* Primary: Gold accent (only primary action) */
  --color-primary: #F59E0B;         /* Gold - primary actions only */
  --color-primary-hover: #FBBF24;   /* Lighter gold on hover */
  --color-primary-on: #0B0F17;      /* Text on gold background */
  --color-primary-glow: rgba(245, 158, 11, 0.25);  /* Subtle glow */
  
  /* Secondary: Neutral slate */
  --color-secondary: #334155;       /* Slate for secondary actions */
  --color-secondary-hover: #475569;
  --color-secondary-text: #E2E8F0;
  
  /* Semantic colors (minimal use) */
  --color-success: #10B981;         /* Green - compliance */
  --color-warning: #F59E0B;         /* Gold - warnings */
  --color-danger: #EF4444;          /* Red - destructive only */
  --color-info: #3B82F6;            /* Blue - informational */
  
  /* Teal accent (optional, for AI features) */
  --color-teal: #14B8A6;
  --color-teal-hover: #0D9488;
  
  /* ===== SHADOWS & DEPTH ===== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.15);  /* Gold glow */
  
  /* ===== SPACING & SIZING ===== */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.5rem;    /* 24px */
  --radius-2xl: 2rem;     /* 32px */
  
  /* ===== TYPOGRAPHY ===== */
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  
  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.25rem;     /* 20px */
  --text-2xl: 1.5rem;     /* 24px */
  --text-3xl: 1.875rem;   /* 30px */
  
  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BUTTON HIERARCHY (3 LEVELS)
   ============================================ */

/* PRIMARY: Gold filled - Use sparingly for main CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.4;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-primary);
  background: linear-gradient(135deg, var(--color-primary) 0%, #FBBF24 100%);
  color: var(--color-primary-on);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--color-primary-hover) 0%, #FCD34D 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(245, 158, 11, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

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

/* SECONDARY: Slate outline/filled - Standard actions */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-hover);
  background: var(--color-secondary);
  color: var(--color-secondary-text);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-secondary-hover);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

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

/* TERTIARY: Text/ghost button - Minimal actions */
.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.btn-tertiary:hover:not(:disabled) {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-tertiary:active:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

/* DESTRUCTIVE: Red - Confirm dialogs only */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: 1px solid #DC2626;
  background: var(--color-danger);
  color: white;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn-danger:hover:not(:disabled) {
  background: #DC2626;
  box-shadow: var(--shadow-md);
}

/* ============================================
   PANEL & CARD SYSTEM
   ============================================ */

.panel-primary {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

.panel-elevated {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.panel-elevated:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-xl);
}

.card-interactive {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all var(--transition-base);
  cursor: pointer;
}

.card-interactive:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-interactive:active {
  transform: translateY(0);
}

/* ============================================
   INPUT & FORM ELEMENTS
   ============================================ */

.input-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: var(--color-bg-panel-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.input-primary:hover {
  border-color: var(--color-border-hover);
}

.input-primary:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1);
  background: var(--color-bg-panel);
}

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

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

.text-heading-1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--color-text-primary);
}

.text-heading-2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
}

.text-heading-3 {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-primary);
}

.text-body {
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
}

.text-body-sm {
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.text-label {
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-secondary);
}

/* ============================================
   AGENT CARD SYSTEM (NO RAINBOW UI)
   ============================================ */

.agent-card {
  background: var(--color-bg-panel);
  border: 1px solid var(--color-border);
  border-left: 3px solid transparent;  /* Accent bar placeholder */
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: all var(--transition-base);
}

.agent-card:hover {
  border-left-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.agent-card.agent-risk {
  border-left-color: #DC2626;
}

.agent-card.agent-compliance {
  border-left-color: var(--color-success);
}

.agent-card.agent-schedule {
  border-left-color: #3B82F6;
}

.agent-card.agent-quality {
  border-left-color: #8B5CF6;
}

/* ============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

.animate-fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-in {
  animation: slideIn var(--transition-base) ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================
   FOCUS RING (ACCESSIBILITY)
   ============================================ */

*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.2);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-panel-2);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-sm);
  border: 2px solid var(--color-bg-panel-2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

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

@media (max-width: 640px) {
  :root {
    --text-xs: 0.7rem;
    --text-sm: 0.8rem;
    --text-base: 0.9rem;
    --text-lg: 1rem;
    --text-xl: 1.125rem;
    --text-2xl: 1.25rem;
    --text-3xl: 1.5rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: var(--text-xs);
  }
  
  .panel-primary,
  .panel-elevated {
    padding: 1rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.border-gold {
  border-color: var(--color-primary) !important;
}

.text-gold {
  color: var(--color-primary) !important;
}

.bg-gold {
  background-color: var(--color-primary) !important;
}

.shadow-gold {
  box-shadow: var(--shadow-glow) !important;
}

.hover-lift {
  transition: transform var(--transition-fast);
}

.hover-lift:hover {
  transform: translateY(-2px);
}
