/* Enterprise ERP Theme - Professional Color System */

:root {
  /* Enterprise Color Palette */
  --primary-color: #1E40AF;           /* Deep Blue */
  --primary-dark: #1E3A8A;           /* Darker Blue */
  --primary-light: #3B82F6;          /* Lighter Blue */
  
  --secondary-color: #64748B;         /* Slate Gray */
  --secondary-dark: #475569;          /* Darker Slate */
  --secondary-light: #94A3B8;        /* Lighter Slate */
  
  --success-color: #059669;           /* Forest Green */
  --success-light: #10B981;          /* Emerald */
  --success-dark: #047857;           /* Dark Green */
  
  --warning-color: #D97706;          /* Amber */
  --warning-light: #F59E0B;          /* Bright Amber */
  --warning-dark: #B45309;           /* Dark Amber */
  
  --danger-color: #DC2626;           /* Red */
  --danger-light: #EF4444;           /* Bright Red */
  --danger-dark: #B91C1C;            /* Dark Red */
  
  /* Neutral Colors */
  --background-color: #F8FAFC;       /* Light Gray Background */
  --surface-color: #FFFFFF;          /* White Surface */
  --border-color: #E2E8F0;           /* Light Border */
  --divider-color: #F1F5F9;          /* Subtle Divider */
  
  /* Text Colors */
  --text-primary: #1E293B;           /* Dark Slate Text */
  --text-secondary: #64748B;         /* Secondary Text */
  --text-muted: #94A3B8;             /* Muted Text */
  --text-white: #FFFFFF;             /* White Text */
  
  /* Shadow Levels */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  --shadow-xl: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  
  /* Spacing System (8px base) */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  
  /* Border Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
}

/* Global Typography */
body {
  font-family: var(--font-family-primary);
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Professional Card Components */
.enterprise-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.enterprise-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.enterprise-card-elevated {
  box-shadow: var(--shadow-md);
}

.enterprise-card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  padding: var(--space-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-weight: 600;
}

/* Professional Button System */
.btn-enterprise-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
  color: var(--text-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-enterprise-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
  color: var(--text-white);
}

.btn-enterprise-secondary {
  background: var(--surface-color);
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-enterprise-secondary:hover {
  background: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-1px);
}

.btn-enterprise-success {
  background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
  border: none;
  color: var(--text-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-enterprise-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
  color: var(--text-white);
}

.btn-enterprise-danger {
  background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-dark) 100%);
  border: none;
  color: var(--text-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-enterprise-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  opacity: 0.9;
  color: var(--text-white);
}

/* Professional Navigation */
.enterprise-navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: var(--shadow-md);
  border: none;
}

.enterprise-navbar .navbar-brand {
  color: var(--text-white);
  font-weight: 600;
  font-size: var(--font-size-xl);
}

.enterprise-navbar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
  margin: 0 var(--space-1);
}

.enterprise-navbar .nav-link:hover,
.enterprise-navbar .nav-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-white);
  transform: translateY(-1px);
}

/* Professional Tables */
.enterprise-table {
  background: var(--surface-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.enterprise-table th {
  background: var(--background-color);
  color: var(--text-primary);
  font-weight: 600;
  padding: var(--space-3);
  border: none;
  border-bottom: 2px solid var(--border-color);
}

.enterprise-table td {
  padding: var(--space-3);
  border: none;
  border-bottom: 1px solid var(--divider-color);
}

.enterprise-table tbody tr:hover {
  background: var(--background-color);
  cursor: pointer;
}

/* Professional Forms */
.enterprise-form .form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  transition: all 0.3s ease;
  font-size: var(--font-size-base);
}

.enterprise-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
  outline: none;
}

.enterprise-form .form-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

/* Professional Alerts */
.enterprise-alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  font-weight: 500;
}

.enterprise-alert-success {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success-dark);
  border-left: 4px solid var(--success-color);
}

.enterprise-alert-warning {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning-dark);
  border-left: 4px solid var(--warning-color);
}

.enterprise-alert-danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger-dark);
  border-left: 4px solid var(--danger-color);
}

.enterprise-alert-info {
  background: rgba(30, 64, 175, 0.1);
  color: var(--primary-dark);
  border-left: 4px solid var(--primary-color);
}

/* Loading States */
.enterprise-loading {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 0.8s linear infinite;
}

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

.enterprise-skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--divider-color) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
  .enterprise-card {
    margin: var(--space-2);
  }
  
  .btn-enterprise-primary,
  .btn-enterprise-secondary,
  .btn-enterprise-success,
  .btn-enterprise-danger {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
  }
  
  .enterprise-table th,
  .enterprise-table td {
    padding: var(--space-2);
    font-size: var(--font-size-sm);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #0F172A;
    --surface-color: #1E293B;
    --border-color: #334155;
    --divider-color: #475569;
    --text-primary: #F8FAFC;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
  }
}

/* --- Enterprise Dashboard Components --- */
.enterprise-header {
  padding: var(--space-6) 0 var(--space-4) 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-6);
}

.enterprise-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.enterprise-kpi-card {
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.enterprise-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  transition: all 0.3s ease;
}

.enterprise-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.enterprise-kpi-card:hover::before {
  height: 6px;
}

.enterprise-kpi-success::before {
  background: var(--success-color);
}

.enterprise-kpi-warning::before {
  background: var(--warning-color);
}

.enterprise-kpi-danger::before {
  background: var(--error-color);
}

.enterprise-kpi-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-2);
  opacity: 0.8;
}

.enterprise-kpi-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin: var(--space-2) 0;
  color: var(--text-primary);
}

.enterprise-kpi-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enterprise-chart-card {
  border: none;
  transition: box-shadow 0.3s ease;
}

.enterprise-chart-card:hover {
  box-shadow: var(--shadow-lg);
}

.enterprise-chart-card .card-header {
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-primary);
}