/* ========================================
   APPLE UI DESIGN SYSTEM
   Clean, Minimal, SF Pro Typography
   No Emojis - Professional Interface
   ======================================== */

/* CSS Variables - Apple HIG Compliant */
:root {
  /* Apple System Colors */
  --color-primary: #007aff;
  --color-primary-hover: #0071e3;
  --color-primary-active: #0062cc;

  /* Backgrounds - Apple Light Mode */
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fbfbfd;
  --bg-grouped: #f2f2f7;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-active: rgba(0, 0, 0, 0.08);

  /* Text - Apple Typography Colors */
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #aeaeb2;
  --text-quaternary: #c7c7cc;

  /* Borders - Subtle Apple Style */
  --border-color: #d2d2d7;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-separator: rgba(60, 60, 67, 0.12);

  /* Status Colors - Apple System Colors */
  --status-new: #007aff;
  --status-ready: #32d74b;
  --status-scheduled: #5856d6;
  --status-rescheduled: #ff9f0a;
  --status-progress: #ff9500;
  --status-completed: #34c759;
  --status-attention: #ff3b30;
  --status-cancelled: #8e8e93;
  --status-neutral: #8e8e93;

  /* Apple-style Shadows */
  --shadow-xs: 0 0.5px 1px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Border Radius - Apple HIG */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions - Apple Ease Curves */
  --transition-fast: 120ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-normal: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-spring: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* Base */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  /* SF Pro font stack - system fonts on Apple, fallback to Inter on others */
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
               'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: var(--text-primary);
  background: var(--bg-secondary);
  min-height: 100vh;
}

/* Typography - Apple SF Pro Scale */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
  color: var(--text-primary);
}

h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 28px;
  letter-spacing: -0.024em;
}
h3 {
  font-size: 22px;
  letter-spacing: -0.022em;
}
h4 {
  font-size: 17px;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  line-height: 1.47059;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Icon Container */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  width: 20px;
  height: 20px;
}

.icon-sm svg {
  width: 16px;
  height: 16px;
}

.icon-lg svg {
  width: 24px;
  height: 24px;
}

.icon-xl svg {
  width: 32px;
  height: 32px;
}

/* ========================================
   HEADER
   ======================================== */

.app-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.shop-badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-logout {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-logout:hover {
  background: var(--bg-secondary);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ========================================
   WELCOME SECTION
   ======================================== */

.welcome-section {
  background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
  border-radius: var(--radius-xl);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.welcome-content h1 {
  color: #ffffff;
  font-size: 28px;
  margin-bottom: 8px;
}

.welcome-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
}

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

.btn-primary {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.btn-secondary {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  text-decoration: none;
}

.btn-accent {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-primary);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-accent:hover {
  background: var(--color-primary-hover);
  text-decoration: none;
}

.btn-ghost {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.stat-card:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
}

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stat-card-icon.blue { background: rgba(0, 122, 255, 0.1); color: #007aff; }
.stat-card-icon.purple { background: rgba(88, 86, 214, 0.1); color: #5856d6; }
.stat-card-icon.orange { background: rgba(255, 149, 0, 0.1); color: #ff9500; }
.stat-card-icon.green { background: rgba(52, 199, 89, 0.1); color: #34c759; }
.stat-card-icon.gray { background: rgba(142, 142, 147, 0.1); color: #8e8e93; }

.stat-value {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* ========================================
   CARDS
   ======================================== */

.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
  font-size: 17px;
  font-weight: 600;
}

.card-body {
  padding: 24px;
}

/* ========================================
   FILTER BAR
   ======================================== */

.filter-bar {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border-subtle);
}

.filter-tabs {
  display: flex;
  gap: 4px;
}

.filter-tab {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.search-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  min-width: 260px;
}

.search-input input {
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  font-family: inherit;
}

.search-input input::placeholder {
  color: var(--text-tertiary);
}

.search-input .icon {
  color: var(--text-tertiary);
}

/* ========================================
   VEHICLE LIST
   ======================================== */

.vehicle-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vehicle-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.vehicle-card:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.vehicle-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
}

.vehicle-ro {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.vehicle-info {
  flex: 1;
}

.vehicle-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.vehicle-vin {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: 'SF Mono', 'Menlo', monospace;
}

.vehicle-calibration {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 500;
  background: rgba(0, 113, 227, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.vehicle-schedule {
  text-align: right;
  min-width: 120px;
}

.schedule-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.schedule-time {
  font-size: 13px;
  color: var(--text-tertiary);
}

.vehicle-status {
  min-width: 120px;
}

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

/* ========================================
   STATUS BADGES
   ======================================== */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-badge.new { background: rgba(0, 122, 255, 0.1); color: var(--status-new); }
.status-badge.scheduled,
.status-badge.rescheduled { background: rgba(88, 86, 214, 0.1); color: var(--status-scheduled); }
.status-badge.in-progress { background: rgba(255, 149, 0, 0.1); color: var(--status-progress); }
.status-badge.completed { background: rgba(52, 199, 89, 0.1); color: var(--status-completed); }
.status-badge.needs-attention,
.status-badge.cancelled { background: rgba(255, 59, 48, 0.1); color: var(--status-attention); }
.status-badge.no-cal,
.status-badge.ready { background: rgba(142, 142, 147, 0.1); color: var(--status-neutral); }

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */

.loading-state,
.empty-state {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

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

.empty-state .icon {
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.empty-state .icon svg {
  width: 48px;
  height: 48px;
}

.empty-state h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  margin-bottom: 24px;
}

/* ========================================
   FORMS
   ======================================== */

.form-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--border-subtle);
}

.form-header {
  margin-bottom: 32px;
  text-align: center;
}

.form-header h2 {
  margin-bottom: 8px;
}

.form-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.form-step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-number.active {
  background: var(--color-primary);
  color: #ffffff;
}

.step-number.completed {
  background: var(--status-completed);
  color: #ffffff;
}

.step-label {
  font-size: 13px;
  color: var(--text-tertiary);
}

.step-label.active {
  color: var(--text-primary);
  font-weight: 500;
}

.step-line {
  width: 40px;
  height: 1px;
  background: var(--border-color);
}

.step-line.completed {
  background: var(--status-completed);
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: all var(--transition-fast);
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

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

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* File Upload */
.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--color-primary);
  background: rgba(0, 113, 227, 0.02);
}

.file-upload input {
  display: none;
}

.file-upload .icon {
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.file-upload .icon svg {
  width: 32px;
  height: 32px;
}

.file-upload-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.file-upload-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
}

.file-preview {
  display: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
  align-items: center;
  gap: 12px;
}

.file-preview.has-file {
  display: flex;
}

.file-preview .icon {
  color: var(--color-primary);
}

.file-preview-info {
  flex: 1;
}

.file-preview-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}

.file-preview-size {
  font-size: 12px;
  color: var(--text-tertiary);
}

.file-preview-remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-hover);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.file-preview-remove:hover {
  background: rgba(255, 59, 48, 0.1);
  color: var(--status-attention);
}

/* Checkbox */
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-top: 16px;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-primary);
}

.checkbox-option span {
  font-size: 14px;
  color: var(--text-primary);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.form-actions-center {
  justify-content: center;
}

.form-actions-between {
  justify-content: space-between;
}

/* ========================================
   MODAL
   ======================================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-hover);
}

.modal-body {
  padding: 24px;
}

.modal-success {
  text-align: center;
  padding: 48px 24px;
}

.modal-success .icon {
  color: var(--status-completed);
  margin-bottom: 16px;
}

.modal-success .icon svg {
  width: 64px;
  height: 64px;
}

.modal-success h2 {
  margin-bottom: 8px;
}

.modal-success p {
  margin-bottom: 24px;
}

/* Confirmation Modal */
.modal-confirm {
  max-width: 360px;
}

.confirm-body {
  text-align: center;
  padding: 32px 24px;
}

.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: var(--bg-secondary);
}

.confirm-icon svg {
  width: 28px;
  height: 28px;
}

.confirm-icon.warning {
  background: rgba(255, 149, 0, 0.12);
  color: var(--status-progress);
}

.confirm-icon.success {
  background: rgba(52, 199, 89, 0.12);
  color: var(--status-completed);
}

.confirm-icon.danger {
  background: rgba(255, 59, 48, 0.12);
  color: var(--status-attention);
}

.confirm-body h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.confirm-body p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-buttons button {
  min-width: 100px;
}

/* Help Modal Items */
.help-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.help-item:last-child {
  border-bottom: none;
}

.help-item .icon {
  color: var(--color-primary);
  padding-top: 2px;
}

.help-item-content strong {
  display: block;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.help-item-content p,
.help-item-content a {
  font-size: 14px;
  margin: 0;
}

/* ========================================
   REVIEW SECTION (Form Summary)
   ======================================== */

.review-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.review-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.review-item:last-child {
  border-bottom: none;
}

.review-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.review-value {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 14px;
  text-align: right;
  word-break: break-all;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: var(--text-primary);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.error {
  background: var(--status-attention);
}

.toast.success {
  background: var(--status-completed);
}

/* ========================================
   BACK BUTTON
   ======================================== */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color var(--transition-fast);
}

.back-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .app-header {
    padding: 0 16px;
  }

  .header-center {
    display: none;
  }

  .app-main {
    padding: 20px 16px;
  }

  .welcome-section {
    flex-direction: column;
    text-align: center;
    gap: 24px;
    padding: 32px 24px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-tabs {
    flex-wrap: wrap;
    justify-content: center;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .vehicle-card {
    flex-direction: column;
    align-items: stretch;
  }

  .vehicle-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .vehicle-schedule {
    text-align: left;
  }

  .vehicle-actions {
    justify-content: stretch;
  }

  .vehicle-actions .btn-secondary,
  .vehicle-actions .btn-accent {
    flex: 1;
    justify-content: center;
  }

  .form-card {
    padding: 24px 16px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button,
  .form-actions a {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.hidden { display: none !important; }
.visible { display: block; }

/* ========================================
   TECH BADGE
   ======================================== */

.tech-badge {
  background: #34c759;
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
}

/* ========================================
   JOB CARDS (Tech Portal)
   ======================================== */

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

.job-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.job-card:hover {
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.job-card.today {
  border-left: 3px solid var(--color-primary);
}

/* Completed jobs in Today's Schedule - subtle green styling */
.job-card.status-completed {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  opacity: 0.85;
}

.job-card.status-completed:hover {
  opacity: 1;
}

/* In Progress jobs - highlight with purple */
.job-card.status-in-progress {
  background: #eef2ff;
  border-left: 4px solid #6366f1;
}

/* Scheduled jobs - amber highlight */
.job-card.status-scheduled,
.job-card.status-rescheduled {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
}

.job-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.job-time {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  min-width: 80px;
}

.job-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-ro {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.job-vehicle {
  font-size: 14px;
  color: var(--text-secondary);
}

.job-shop {
  font-size: 12px;
  color: var(--text-tertiary);
}

.job-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.job-cals {
  font-size: 12px;
  color: var(--color-primary);
  background: rgba(0, 113, 227, 0.08);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section {
  margin-bottom: 32px;
}

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

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.badge {
  background: var(--color-primary);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

/* ========================================
   FILTER PILLS
   ======================================== */

.filter-pills {
  display: flex;
  gap: 6px;
}

.pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-secondary);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover {
  background: var(--bg-hover);
}

.pill.active {
  background: var(--text-primary);
  color: white;
}

/* ========================================
   MODAL LARGE
   ======================================== */

.modal-large {
  max-width: 600px;
}

.modal-section {
  margin-bottom: 24px;
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ========================================
   INFO GRID
   ======================================== */

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.info-value {
  font-size: 14px;
  color: var(--text-primary);
}

.info-value.mono {
  font-family: 'SF Mono', 'Menlo', monospace;
  font-size: 13px;
}

/* ========================================
   CALIBRATIONS BOX
   ======================================== */

.calibrations-box {
  background: rgba(0, 113, 227, 0.08);
  color: var(--color-primary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
}

/* ========================================
   DTC BOX
   ======================================== */

.dtc-box {
  background: rgba(255, 149, 0, 0.1);
  color: #b45309;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: 'SF Mono', 'Menlo', monospace;
}

/* ========================================
   NOTES BOX
   ======================================== */

.notes-box {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 150px;
  overflow-y: auto;
}

/* ========================================
   DOCUMENT CHIPS
   ======================================== */

.docs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.doc-chip.available {
  background: rgba(0, 122, 255, 0.1);
  color: var(--color-primary);
}

.doc-chip.available:hover {
  background: rgba(0, 122, 255, 0.15);
  text-decoration: none;
}

.doc-chip.unavailable {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
}

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

.status-buttons {
  display: flex;
  gap: 12px;
}

.status-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.status-btn:hover {
  background: var(--bg-secondary);
}

.status-btn.success {
  background: var(--status-completed);
  border-color: var(--status-completed);
  color: white;
}

.status-btn.success:hover {
  background: #2da44e;
}

/* ========================================
   ADD NOTE FORM
   ======================================== */

.add-note-form {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.add-note-form textarea {
  flex: 1;
}

/* ========================================
   EMPTY STATE INLINE
   ======================================== */

.empty-state-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
}

.empty-state-inline .icon {
  opacity: 0.5;
}

/* ========================================
   ENHANCED FILE UPLOAD
   ======================================== */

.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--color-primary);
  background: rgba(0, 113, 227, 0.02);
}

.file-upload.has-file {
  border-color: var(--status-completed);
  border-style: solid;
  background: rgba(52, 199, 89, 0.05);
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-content {
  pointer-events: none;
}

.upload-icon {
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.upload-icon svg {
  width: 32px;
  height: 32px;
}

.upload-success {
  color: var(--status-completed);
}

.upload-success svg {
  width: 32px;
  height: 32px;
}

.upload-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ========================================
   CHECKBOX GROUP
   ======================================== */

.checkbox-group {
  margin-top: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.checkbox-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   REVIEW SECTION ENHANCED
   ======================================== */

.review-section h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.review-notes {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.review-value.success {
  color: var(--status-completed);
}

.review-value.warning {
  color: var(--status-in-progress);
  font-style: italic;
}

/* Extracted info badges */
.extracted-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.extracted-badge {
  display: inline-block;
  background: rgba(52, 199, 89, 0.15);
  color: var(--status-completed);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Small spinner for inline use */
.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ========================================
   INFO BANNER
   ======================================== */

.info-banner {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: rgba(0, 122, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.info-banner .icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.info-banner p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   PROCESSING OVERLAY
   ======================================== */

.processing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  z-index: 10;
}

.processing-content {
  text-align: center;
}

.processing-content p {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========================================
   FORM CARD ENHANCED
   ======================================== */

.form-card {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.form-header h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

/* Required indicator */
.required {
  color: var(--status-attention);
}

/* Step styling enhanced */
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step .step-number {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.step.active .step-number {
  background: var(--color-primary);
  color: white;
}

.step.completed .step-number {
  background: var(--status-completed);
  color: white;
}

.step .step-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.step.active .step-label {
  color: var(--text-primary);
  font-weight: 500;
}

/* ========================================
   RESPONSIVE ADDITIONS
   ======================================== */

@media (max-width: 768px) {
  .job-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .job-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-meta {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .status-buttons {
    flex-direction: column;
  }

  .docs-row {
    flex-direction: column;
  }

  .doc-chip {
    width: 100%;
    justify-content: center;
  }

  .filter-pills {
    flex-wrap: wrap;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   STATS ROW (Tech Dashboard)
   ======================================== */

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stats-row .stat-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.stats-row .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.stats-row .stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   SEARCH BAR (Inline)
   ======================================== */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  margin-bottom: 16px;
}

.search-bar .icon {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-input-inline {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
}

.search-input-inline::placeholder {
  color: var(--text-tertiary);
}

/* ========================================
   LOADING STATE
   ======================================== */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--text-tertiary);
}

.loading-state .spinner {
  margin-bottom: 16px;
}
