/* IronOps Mil-Spec Design System */
/* Military-grade aesthetic: olive/amber palette, angular UI, tactical precision */

:root {
  /* Mil-Spec Color Palette - Deep Blue/Steel Theme */
  --bg-primary: #0a0a0f;
  --bg-secondary: #13131a;
  --bg-card: #1a1a24;
  --bg-card-hover: #1f1f2a;

  /* Deep Navy Blue / Steel Tones */
  --olive-dark: #1a3a52;
  --olive: #2d5a7b;
  --olive-light: #4a7ba7;
  --olive-glow: rgba(45, 90, 123, 0.15);

  /* Steel Blue Accent */
  --amber-dark: #0a3d66;
  --amber: #0052a3;
  --amber-light: #4da6ff;
  --amber-glow: rgba(0, 82, 163, 0.15);

  /* Status Colors */
  --status-operational: #4a7ba7; /* steel-light */
  --status-warning: #0052a3; /* steel accent */
  --status-critical: #c43636;
  --status-secure: #10b981;

  /* Text Hierarchy */
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --text-muted: #4b5563;

  /* Borders & Dividers */
  --border-primary: rgba(122, 143, 90, 0.2); /* olive with opacity */
  --border-secondary: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(217, 119, 6, 0.3); /* amber with opacity */

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-olive: 0 4px 20px var(--olive-glow);
  --shadow-amber: 0 4px 20px var(--amber-glow);

  /* Grid Overlay (subtle tactical grid) */
  --grid-pattern: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 19px,
    rgba(45, 90, 123, 0.03) 19px,
    rgba(45, 90, 123, 0.03) 20px
  ),
  repeating-linear-gradient(
    90deg,
    transparent,
    transparent 19px,
    rgba(45, 90, 123, 0.03) 19px,
    rgba(45, 90, 123, 0.03) 20px
  );

  /* Typography */
  --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Border Radius (Angular - sharper than before) */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* Global Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  background-image: var(--grid-pattern);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mil-Spec Button Styles */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--olive);
  color: var(--text-primary);
  border: 1px solid var(--olive-light);
  box-shadow: var(--shadow-olive);
}

.btn-primary:hover {
  background: var(--olive-light);
  border-color: var(--olive-light);
  box-shadow: 0 6px 24px var(--olive-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--amber);
  border: 1px solid var(--amber);
}

.btn-secondary:hover {
  background: var(--amber-glow);
  border-color: var(--amber-light);
  box-shadow: var(--shadow-amber);
}

.btn-danger {
  background: var(--status-critical);
  color: var(--text-primary);
  border: 1px solid #e35555;
}

.btn-danger:hover {
  background: #d84444;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Mil-Spec Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--olive-light);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-operational {
  background: rgba(122, 143, 90, 0.15);
  color: var(--olive-light);
  border: 1px solid var(--olive-light);
}

.badge-warning {
  background: var(--amber-glow);
  color: var(--amber-light);
  border: 1px solid var(--amber);
}

.badge-critical {
  background: rgba(196, 54, 54, 0.15);
  color: #ff6b6b;
  border: 1px solid var(--status-critical);
}

.badge-secure {
  background: rgba(16, 185, 129, 0.15);
  color: var(--status-secure);
  border: 1px solid var(--status-secure);
}

/* Form Inputs */
input, textarea, select {
  font-family: var(--font-primary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  transition: all var(--transition-base);
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px var(--olive-glow);
}

input::placeholder, textarea::placeholder {
  color: var(--text-tertiary);
}

/* Tactical Grid Lines */
.grid-overlay {
  position: relative;
}

.grid-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grid-pattern);
  pointer-events: none;
  opacity: 0.5;
}

/* Angular Dividers */
.divider {
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--border-primary) 10%,
    var(--border-primary) 90%,
    transparent
  );
  margin: var(--space-lg) 0;
  border-color: var(--border-primary);
}

.divider-vertical {
  width: 1px;
  background: linear-gradient(180deg,
    transparent,
    var(--border-primary) 10%,
    var(--border-primary) 90%,
    transparent
  );
}

/* Tactical Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-olive {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--olive-glow);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

@keyframes pulse-steel {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--olive-glow);
  }
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.animate-fade-in {
  animation: fadeInUp 0.5s ease-out;
}

.animate-slide-in {
  animation: slideInLeft 0.5s ease-out;
}

/* Utility Classes */
.text-olive { color: var(--olive-light); }
.text-amber { color: var(--amber); }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); }

.bg-olive { background: var(--olive-glow); }
.bg-amber { background: var(--amber-glow); }

.border-olive { border-color: var(--olive); }
.border-amber { border-color: var(--amber); }

/* Responsive Utilities */
@media (max-width: 768px) {
  :root {
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }

  .card {
    padding: var(--space-md);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Visible (Keyboard Navigation) */
*:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}
