/* ═══════════════════════════════════════════════════════════════════════════
   G2 LOGISTICS - JOBS PAGE
   Matching Dashboard Design - Compact List View
   ═══════════════════════════════════════════════════════════════════════════ */

/* Shared brand variables */
@import url('g2-variables.css');

/* Jobs-specific variables */
:root {
  --status-submitted: #F59E0B;
  --status-submitted-bg: #FEF3C7;
  --status-booked: #10B981;
  --status-booked-bg: #D1FAE5;
  --status-progress: #3B82F6;
  --status-progress-bg: #DBEAFE;
  --status-completed: #6B7280;
  --status-completed-bg: #F3F4F6;
  --status-cancelled: #EF4444;
  --status-cancelled-bg: #FEE2E2;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: var(--g2-light);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--g2-dark);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.app-layout {
  min-height: 100vh;
}

.btn-book-job-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--g2-white);
  color: var(--g2-orange);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-book-job-header:hover {
  background: var(--g2-dark);
  color: var(--g2-white);
}

.btn-book-job-header svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STATS BANNER - Clean & Simple
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-banner {
  background: linear-gradient(135deg, var(--g2-orange) 0%, #0070C2 100%);
  padding: 20px 16px 20px 256px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.stats-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.1);
}

.stats-banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(0,0,0,0.15);
}

.stats-container {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
}

.stat-card {
  text-align: center;
  background: rgba(255,255,255,0.12);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.15);
  min-width: 90px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--g2-text-on-orange);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--g2-text-on-orange);
  opacity: 0.9;
  margin-top: 4px;
}

.stats-divider {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3), transparent);
}

/* Status Key/Legend */
.status-key {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(0,0,0,0.12);
  padding: 10px 16px;
  border-left: 3px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-md);
}

.status-key-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.status-key-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-key-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--g2-text-on-orange);
  white-space: nowrap;
}

.status-key-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  flex-shrink: 0;
}

.status-key-dot.pending { background: #F59E0B; }
.status-key-dot.booked { background: #10B981; }
.status-key-dot.active { background: #3B82F6; }
.status-key-dot.done { background: #FFFFFF; opacity: 0.6; }
.status-key-dot.cancelled { background: #EF4444; }

/* ═══════════════════════════════════════════════════════════════════════════
   JOBS LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */
.jobs-content {
  display: flex;
  flex: 1;
}

/* Left Filter Panel */
.jobs-filter-panel {
  width: 240px;
  background: var(--g2-white);
  border-right: 1px solid var(--g2-border);
  flex-shrink: 0;
  margin: 16px 0 16px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--g2-border);
  overflow: hidden;
}

.filter-search {
  padding: 16px;
  border-bottom: 1px solid var(--g2-border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-search-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--g2-light);
  border: 1px solid var(--g2-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--g2-dark);
  transition: all 0.2s;
}

.filter-search-input:focus {
  outline: none;
  border-color: var(--g2-orange);
  background: var(--g2-white);
}

.filter-panel-header {
  padding: 16px 16px 8px;
}

.filter-panel-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--g2-muted);
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 4px 8px;
  background: transparent;
  border: none;
  width: calc(100% - 16px);
  text-align: left;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--g2-gray);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-md);
}

.filter-item:hover {
  background: var(--g2-light);
}

.filter-item.active {
  background: var(--g2-orange-light);
  color: var(--g2-orange);
  font-weight: 600;
}

.filter-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-item-icon {
  width: 18px;
  height: 18px;
  opacity: 0.5;
}

.filter-item.active .filter-item-icon {
  opacity: 1;
}

.filter-item-count {
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  background: var(--g2-light);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-item.active .filter-item-count {
  background: var(--g2-orange);
  color: var(--g2-text-on-orange);
}

/* ═══════════════════════════════════════════════════════════════════════════
   JOBS LIST AREA
   ═══════════════════════════════════════════════════════════════════════════ */
.jobs-list-area {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

.jobs-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.jobs-list-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g2-muted);
}

.jobs-list-actions {
  display: flex;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   JOB LIST - Compact Items
   ═══════════════════════════════════════════════════════════════════════════ */
.jobs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Job Item - Compact Row */
.job-card {
  background: var(--g2-white);
  border: 1px solid var(--g2-border);
  border-left: 3px solid var(--g2-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s;
}

.job-card:hover {
  border-color: var(--g2-muted);
}

.job-card.expanded {
  position: relative;
}

/* Active/highlighted job card - status-colored highlights */
.job-card.active,
.job-card.highlighted {
  position: relative;
  transform: translateX(4px);
  transition: all 0.2s ease;
}

@keyframes pulse-border {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Status-based active highlighting */
.job-card.active:has(.job-status-badge.submitted),
.job-card.highlighted:has(.job-status-badge.submitted) {
  background: var(--status-submitted-bg);
  border-color: var(--status-submitted);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3), 0 4px 12px rgba(245, 158, 11, 0.15);
}

.job-card.active:has(.job-status-badge.booked),
.job-card.highlighted:has(.job-status-badge.booked) {
  background: var(--status-booked-bg);
  border-color: var(--status-booked);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3), 0 4px 12px rgba(16, 185, 129, 0.15);
}

.job-card.active:has(.job-status-badge.in-progress),
.job-card.highlighted:has(.job-status-badge.in-progress) {
  background: var(--status-progress-bg);
  border-color: var(--status-progress);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 4px 12px rgba(59, 130, 246, 0.15);
}

.job-card.active:has(.job-status-badge.completed),
.job-card.highlighted:has(.job-status-badge.completed) {
  background: var(--status-completed-bg);
  border-color: var(--status-completed);
  box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.3), 0 4px 12px rgba(107, 114, 128, 0.15);
}

.job-card.active:has(.job-status-badge.cancelled),
.job-card.highlighted:has(.job-status-badge.cancelled) {
  background: var(--status-cancelled-bg);
  border-color: var(--status-cancelled);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3), 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Status-based left border colors */
.job-card:has(.job-status-badge.submitted) { border-left-color: var(--status-submitted); }
.job-card:has(.job-status-badge.booked) { border-left-color: var(--status-booked); }
.job-card:has(.job-status-badge.in-progress) { border-left-color: var(--status-progress); }
.job-card:has(.job-status-badge.completed) { border-left-color: var(--status-completed); }
.job-card:has(.job-status-badge.cancelled) { border-left-color: var(--status-cancelled); }

/* Job Header Row */
.job-card-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 16px;
  cursor: pointer;
}

/* Status Badge - Fixed width for alignment */
.job-status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  flex-shrink: 0;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.job-status-badge.submitted {
  background: var(--status-submitted-bg);
  color: var(--status-submitted);
}

.job-status-badge.booked {
  background: var(--status-booked-bg);
  color: var(--status-booked);
}

.job-status-badge.in-progress {
  background: var(--status-progress-bg);
  color: var(--status-progress);
}

.job-status-badge.completed {
  background: var(--status-completed-bg);
  color: var(--status-completed);
}

.job-status-badge.cancelled {
  background: var(--status-cancelled-bg);
  color: var(--status-cancelled);
}


/* Vehicle Info */
.job-vehicle {
  min-width: 180px;
}

.job-vehicle-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--g2-dark);
  line-height: 1.2;
}

.job-vehicle-reg {
  font-size: 12px;
  font-weight: 600;
  color: var(--g2-orange);
  font-family: 'SF Mono', Monaco, Consolas, monospace;
}

/* Route Info */
.job-route-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.job-location {
  flex: 1;
  min-width: 0;
}

.job-location-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g2-muted);
}

.job-location-value {
  font-size: 13px;
  color: var(--g2-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-location-date {
  font-size: 12px;
  color: var(--g2-gray);
}

.job-route-arrow {
  color: var(--g2-muted);
  flex-shrink: 0;
}

.job-route-arrow svg {
  width: 20px;
  height: 20px;
}

/* Reference */
.job-ref {
  min-width: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--g2-gray);
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  text-align: right;
}

/* Expand Arrow */
.job-expand-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g2-muted);
  flex-shrink: 0;
}

.job-expand-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.job-card.expanded .job-expand-arrow svg {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   JOB EXPANDED DETAILS
   ═══════════════════════════════════════════════════════════════════════════ */
.job-card-details {
  max-height: 0;
  overflow: hidden;
  border-top: 0 solid var(--g2-orange);
  background: var(--g2-light);
  transition: max-height 0.3s ease, border-top-width 0.3s ease;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.job-card.expanded .job-card-details {
  max-height: 500px;
  border-top-width: 2px;
}

.job-details-content {
  padding: 16px 20px;
  background: var(--g2-light);
  border-radius: var(--radius-md);
}

/* Two-column location cards */
.job-details-locations {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 16px;
}

.job-location-card {
  flex: 1;
  background: var(--g2-white);
  border: 1px solid var(--g2-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.location-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--g2-orange);
  color: var(--g2-text-on-orange);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.location-card-header svg {
  width: 16px;
  height: 16px;
}

.location-card-header.delivery {
  background: #3B82F6;
}

.location-card-body {
  padding: 14px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.location-address {
  font-size: 14px;
  font-weight: 600;
  color: var(--g2-dark);
  line-height: 1.4;
  margin-bottom: 6px;
}

.location-datetime {
  font-size: 13px;
  color: var(--g2-orange);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--g2-border);
}

.location-contact,
.location-phone {
  font-size: 13px;
  color: var(--g2-gray);
  margin-bottom: 4px;
}

.location-contact strong,
.location-phone strong {
  color: var(--g2-muted);
  font-weight: 600;
}

.location-arrow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--g2-muted);
  flex-shrink: 0;
}

.location-arrow-divider svg {
  width: 24px;
  height: 24px;
}

/* Meta row */
.job-details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 12px 14px;
  background: var(--g2-white);
  border: 1px solid var(--g2-border);
  border-radius: var(--radius-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-item.notes {
  flex: 1;
  min-width: 200px;
}

.meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g2-muted);
}

.meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--g2-dark);
}

.meta-value.ref {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  color: var(--g2-orange);
  font-weight: 600;
}

.job-details-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  background: var(--g2-white);
  border-top: 2px solid var(--g2-light);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--g2-orange);
  color: var(--g2-text-on-orange);
}

.btn-primary:hover {
  background: var(--g2-orange-hover);
}

.btn-secondary {
  background: var(--g2-white);
  color: var(--g2-dark);
  border: 1px solid var(--g2-border);
}

.btn-secondary:hover {
  border-color: var(--g2-dark);
}

.btn-edit-pending {
  background: #3B82F6;
  color: #FFFFFF;
}

.btn-edit-pending:hover {
  background: #2563EB;
}

.btn-light {
  background: var(--g2-light);
  color: var(--g2-gray);
}

.btn-light:hover {
  background: var(--g2-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 60px 40px;
  background: var(--g2-white);
  border: 2px dashed var(--g2-border);
  border-radius: var(--radius-lg);
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--g2-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon svg {
  width: 32px;
  height: 32px;
  color: var(--g2-muted);
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--g2-dark);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--g2-gray);
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════════════════ */
.jobs-list.loading {
  opacity: 0.5;
  pointer-events: none;
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--g2-muted);
  font-size: 14px;
  gap: 10px;
  background: var(--g2-white);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.loading-spinner svg {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

/* ═══════════════════════════════════════════════════════════════════════════
   LOAD MORE
   ═══════════════════════════════════════════════════════════════════════════ */
.load-more-section {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 24px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-backdrop.active,
.modal-backdrop[style*="display: flex"] {
  display: flex;
}

.modal-panel {
  background: var(--g2-white);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
}

.modal-panel.large { max-width: 700px; }
.modal-panel.xlarge { max-width: 900px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--g2-orange);
  color: var(--g2-text-on-orange);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-subtitle {
  font-size: 12px;
  opacity: 0.9;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: var(--radius-md);
  color: var(--g2-text-on-orange);
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(255,255,255,0.3);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--g2-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-ref {
  font-size: 12px;
  color: var(--g2-gray);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .job-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .jobs-filter-panel {
    width: 200px;
  }

  .job-vehicle {
    min-width: 140px;
  }

  .job-ref {
    display: none;
  }
}

@media (max-width: 1024px) {
  .stats-banner {
    padding: 16px 20px;
    flex-direction: column;
    gap: 16px;
  }

  .stats-container {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .stat-card {
    padding: 12px 16px;
    min-width: 80px;
  }

  .status-key {
    width: 100%;
    justify-content: center;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 12px 16px;
  }

  .stat-number {
    font-size: 28px;
  }

  .stat-card.highlight .stat-number {
    font-size: 36px;
  }

  .stats-divider {
    display: none;
  }
}

@media (max-width: 768px) {
  .stats-banner {
    padding: 12px;
    gap: 12px;
  }

  .stats-container {
    gap: 8px;
  }

  .stat-card {
    padding: 8px 10px;
    min-width: 60px;
  }

  .stat-number {
    font-size: 20px;
  }

  .stat-label {
    font-size: 9px;
  }

  .status-key {
    padding: 10px 12px;
    gap: 10px;
  }

  .status-key-items {
    gap: 8px;
  }

  .status-key-item {
    font-size: 10px;
  }

  .btn-book-job-header span {
    display: none;
  }

  .jobs-content {
    flex-direction: column;
  }

  .jobs-filter-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--g2-border);
  }

  .jobs-filter-panel::before {
    display: none;
  }

  .jobs-list-area {
    padding: 16px;
  }

  .job-card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .job-route-info {
    width: 100%;
    order: 3;
  }

  .job-details-locations {
    flex-direction: column;
  }

  .location-arrow-divider {
    transform: rotate(90deg);
    margin: -8px 0;
  }

  .job-details-meta {
    flex-direction: column;
    gap: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKIP LINK & LEGACY
   ═══════════════════════════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 10px 20px;
  background: var(--g2-orange);
  color: var(--g2-text-on-orange);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 16px;
}

.stats-command-bar,
.status-cards-wrapper,
.status-tabs-wrapper,
.filters-card,
.filter-tabs-container,
.search-filters-row,
.job-row {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════════════════ */
[data-theme="dark"] .jobs-filter-panel {
  background: #353533;
  border-color: #454543;
}

[data-theme="dark"] .filter-search {
  border-bottom-color: #454543;
}

[data-theme="dark"] .filter-search-input {
  background: #3D3D3B;
  border-color: #454543;
  color: #FFFFFF;
}

[data-theme="dark"] .filter-search-input::placeholder {
  color: #666666;
}

[data-theme="dark"] .filter-item {
  color: #B0B0B0;
}

[data-theme="dark"] .filter-item:hover {
  background: #3D3D3B;
  color: #FFFFFF;
}

[data-theme="dark"] .filter-item.active {
  background: rgba(10, 132, 221, 0.15);
  color: #0A84DD;
}

[data-theme="dark"] .filter-item-count {
  background: #454543;
  color: #B0B0B0;
}

[data-theme="dark"] .jobs-list-area {
  background: #2D2D2B;
}

[data-theme="dark"] .jobs-list-title {
  color: #808080;
}

[data-theme="dark"] .job-card {
  background: #353533;
  border-color: #454543;
}

[data-theme="dark"] .job-card:hover {
  border-color: #525250;
}

[data-theme="dark"] .job-card.expanded {
  background: #2D2D2B;
}

/* Dark mode status-based active highlighting */
[data-theme="dark"] .job-card.active:has(.job-status-badge.submitted),
[data-theme="dark"] .job-card.highlighted:has(.job-status-badge.submitted) {
  background: #2D2510;
  border-color: var(--status-submitted);
}

[data-theme="dark"] .job-card.active:has(.job-status-badge.booked),
[data-theme="dark"] .job-card.highlighted:has(.job-status-badge.booked) {
  background: #102D20;
  border-color: var(--status-booked);
}

[data-theme="dark"] .job-card.active:has(.job-status-badge.in-progress),
[data-theme="dark"] .job-card.highlighted:has(.job-status-badge.in-progress) {
  background: #101D2D;
  border-color: var(--status-progress);
}

[data-theme="dark"] .job-card.active:has(.job-status-badge.completed),
[data-theme="dark"] .job-card.highlighted:has(.job-status-badge.completed) {
  background: #1D1D1D;
  border-color: var(--status-completed);
}

[data-theme="dark"] .job-card.active:has(.job-status-badge.cancelled),
[data-theme="dark"] .job-card.highlighted:has(.job-status-badge.cancelled) {
  background: #2D1515;
  border-color: var(--status-cancelled);
}

[data-theme="dark"] .job-vehicle-name {
  color: #FFFFFF;
}

[data-theme="dark"] .job-location-value {
  color: #FFFFFF;
}

[data-theme="dark"] .job-location-date {
  color: #808080;
}

[data-theme="dark"] .job-ref {
  color: #808080;
}

[data-theme="dark"] .job-card-details {
  background: #292927;
}

[data-theme="dark"] .job-details-content {
  background: #292927;
}

[data-theme="dark"] .job-location-card {
  background: #353533;
  border-color: #454543;
}

[data-theme="dark"] .location-card-body {
  background: #353533;
}

[data-theme="dark"] .location-address {
  color: #FFFFFF;
}

[data-theme="dark"] .location-datetime {
  border-bottom-color: #454543;
}

[data-theme="dark"] .location-contact,
[data-theme="dark"] .location-phone {
  color: #B0B0B0;
}

[data-theme="dark"] .job-details-meta {
  background: #353533;
  border-color: #454543;
}

[data-theme="dark"] .meta-value {
  color: #FFFFFF;
}

[data-theme="dark"] .job-details-actions {
  background: #353533;
  border-top-color: #454543;
}

[data-theme="dark"] .btn-edit-pending {
  background: #3B82F6;
  color: #FFFFFF;
}

[data-theme="dark"] .btn-edit-pending:hover {
  background: #2563EB;
}

[data-theme="dark"] .btn-secondary {
  background: #3D3D3B;
  color: #B0B0B0;
  border-color: #454543;
}

[data-theme="dark"] .btn-secondary:hover {
  background: #454543;
  border-color: #525250;
  color: #FFFFFF;
}

[data-theme="dark"] .btn-light {
  background: #3D3D3B;
  color: #B0B0B0;
}

[data-theme="dark"] .btn-light:hover {
  background: #454543;
}

[data-theme="dark"] .empty-state {
  background: #353533;
  border-color: #454543;
}

[data-theme="dark"] .empty-state h3 {
  color: #FFFFFF;
}

[data-theme="dark"] .empty-state p {
  color: #808080;
}

[data-theme="dark"] .empty-icon {
  background: #3D3D3B;
}

[data-theme="dark"] .loading-spinner {
  background: #353533;
  color: #808080;
}

[data-theme="dark"] .modal-panel {
  background: #353533;
}

[data-theme="dark"] .modal-body {
  background: #353533;
  color: #FFFFFF;
}

[data-theme="dark"] .modal-footer {
  background: #2D2D2B;
  border-top-color: #454543;
}

[data-theme="dark"] .stat-card {
  background: rgba(0, 0, 0, 0.3);
}
