* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f5f5;
}

/* Navbar */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.navbar-brand {
  font-size: 1.5rem;
  color: white !important;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links .nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.nav-links .nav-link:hover {
  background-color: #34495e;
  color: white;
}

.nav-links .nav-link.active {
  background-color: #34495e;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* Pages */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-title {
  margin-bottom: 2rem;
  color: #2c3e50;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

/* Active Job Card */
.active-job-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.active-job-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.active-job-meta {
  color: #666;
  margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress-bar {
  width: 100%;
  height: 24px;
  background-color: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-fill {
  height: 100%;
  background-color: #3498db;
  transition: width 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  min-width: 40px;
}

/* Cards */
.card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

/* Table */
.table {
  margin-bottom: 0;
}

.table thead th {
  background-color: #34495e;
  color: white;
  padding: 1rem;
  font-weight: 600;
  border: none;
}

.table tbody td {
  padding: 1rem;
  vertical-align: middle;
}

.table tbody tr:hover {
  background-color: #f9f9f9;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.status-queued {
  background-color: #fff3cd;
  color: #856404;
}

.status-processing {
  background-color: #d1ecf1;
  color: #0c5460;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status-cancelled {
  background-color: #e2e3e5;
  color: #383d41;
}

.status-paused {
  background-color: #fff3cd;
  color: #856404;
}

/* Buttons */
.btn-primary {
  background-color: #3498db;
  border-color: #3498db;
}

.btn-primary:hover {
  background-color: #2980b9;
  border-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  border-color: #95a5a6;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
  border-color: #7f8c8d;
}

.btn-danger {
  background-color: #e74c3c;
  border-color: #e74c3c;
}

.btn-danger:hover {
  background-color: #c0392b;
  border-color: #c0392b;
}

/* Form */
.vendor-checkboxes-container {
  display: block;
}

.vendor-section {
  margin-bottom: 1.5rem;
}

.vendor-section:last-child {
  margin-bottom: 0;
}

.vendor-section-canada {
  padding-top: 1.25rem;
  border-top: 1px solid #dee2e6;
  margin-top: 0.5rem;
}

.vendor-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vendor-section-canada .vendor-section-title {
  color: #0d6efd;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-item input {
  margin: 0;
  flex-shrink: 0;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  line-height: 1.4;
  flex: 1;
}

/* Actions */
.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Vendor tags */
.vendor-tag {
  font-size: 0.8rem;
  background: #e0e0e0;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Vendor credentials */
.cred-section {
  padding: 1rem 0;
  border-top: 1px solid #eee;
}

.cred-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.cred-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #666;
  margin-bottom: 0.5rem;
}

/* Start Job loading overlay */
.start-job-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.start-job-overlay-content {
  text-align: center;
  color: white;
}

/* File row in job details */
.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: #f9f9f9;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.file-row:last-child {
  margin-bottom: 0;
}

.vendor-open-subsection {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed #adb5bd;
  border-radius: 6px;
  background: #f8f9fa;
}

.vendor-open-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
