/* ============================================
   ISSYSPORT PLANNIF v2 — Mercury Design System
   ============================================ */

/* Fonts loaded via <link> in index.html (non render-blocking) */

:root {
  /* Backgrounds */
  --bg-primary: #0a0b0d;
  --bg-surface: #111214;
  --bg-surface-hover: #161719;
  --bg-surface-active: #1b1c1f;

  /* Borders */
  --border-primary: #1f2023;
  --border-subtle: #18191b;

  /* Text */
  --text-primary: #edeef0;
  --text-secondary: #8b8d94;
  --text-muted: #55565c;

  /* Accent */
  --accent: #7c6bf0;
  --accent-soft: #7c6bf018;

  /* Semantic */
  --success: #34d399;
  --success-soft: #34d39915;
  --danger: #f87171;
  --danger-soft: #f8717115;
  --warning: #fbbf24;
  --warning-soft: #fbbf2415;
  --info: #60a5fa;

  /* Charts */
  --chart-1: #7c6bf0;
  --chart-2: #34d399;
  --chart-3: #f87171;
  --chart-4: #fbbf24;
  --chart-5: #60a5fa;
  --chart-6: #f472b6;

  /* Codes planning */
  --code-mim: #60a5fa;
  --code-smm: #a78bfa;
  --code-sjo: #22d3ee;
  --code-mjo: #38bdf8;
  --code-bil: #fbbf24;
  --code-sbil: #f59e0b;
  --code-r: #55565c;
  --code-cp: #34d399;
  --code-am: #f87171;
  --code-f: #f472b6;
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.mercury-page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.mercury-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.mercury-body {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
}

.mercury-muted {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.mercury-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 600;
}

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

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

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.fadeUp {
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger1 { animation-delay: 0.05s; }
.stagger2 { animation-delay: 0.10s; }
.stagger3 { animation-delay: 0.15s; }
.stagger4 { animation-delay: 0.20s; }
.stagger5 { animation-delay: 0.25s; }
.stagger6 { animation-delay: 0.30s; }

.panelIn {
  animation: panelIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.pulseGlow {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* ============================================
   INPUTS
   ============================================ */

.mercury-input,
.mercury-select {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}

.mercury-input:focus,
.mercury-select:focus {
  border-color: var(--accent);
}

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

/* ============================================
   BUTTONS
   ============================================ */

.mercury-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.mercury-btn:hover {
  transform: translateY(-1px);
}

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

.mercury-btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.mercury-btn-primary:hover {
  box-shadow: 0 4px 20px rgba(124, 107, 240, 0.4);
}

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

.mercury-btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ============================================
   PDF EXPORT THEME (light)
   ============================================ */

.pdf-export {
  --pdf-bg: #ffffff;
  --pdf-surface: #f8f9fa;
  --pdf-border: #e2e5e9;
  --pdf-text: #111827;
  --pdf-text-sub: #6b7280;
  --pdf-text-muted: #9ca3af;
  --pdf-accent: #4f46e5;
  --pdf-success: #059669;
  --pdf-danger: #dc2626;
  --pdf-warning: #d97706;

  background: var(--pdf-bg) !important;
  color: var(--pdf-text) !important;
}
