* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7; color: #1f2933;
  -webkit-tap-highlight-color: transparent;
}
#root { min-height: 100vh; display: flex; flex-direction: column; }
.boot-loader { padding: 40px; text-align: center; color: #888; }

.app-header {
  background: #2c3e50; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.app-header h1 { font-size: 17px; margin: 0; font-weight: 600; }
.app-header button { background: none; border: none; color: #fff; font-size: 14px; }

.tab-bar {
  display: flex; background: #fff; border-bottom: 1px solid #e0e2e5;
  position: sticky; top: 52px; z-index: 9;
}
.tab-bar button {
  flex: 1; padding: 12px 0; border: none; background: none;
  font-size: 14px; font-weight: 600; color: #7a8794;
  border-bottom: 3px solid transparent;
}
.tab-bar button.active { color: #2c3e50; border-bottom-color: #2c3e50; }

.screen { flex: 1; padding: 12px; padding-bottom: 32px; overflow-y: auto; }

.job-card {
  background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.job-card .job-number { font-weight: 700; font-size: 15px; }
.job-card .status-pill {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; margin-left: 6px;
}
.status-open, .status-scheduled { background: #eceff1; color: #607d8b; }
.status-assigned { background: #e3f2fd; color: #1976d2; }
.status-in_progress { background: #fff3e0; color: #f57c00; }
.status-parts_pending { background: #fff8e1; color: #f9a825; }
.status-pending_review { background: #f3e5f5; color: #8e24aa; }
.job-card .customer { margin-top: 4px; font-size: 14px; color: #445; }
.job-card .meta { margin-top: 4px; font-size: 12px; color: #8a94a0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px; border-radius: 8px; border: none; font-size: 15px;
  font-weight: 600; width: 100%; margin-top: 10px; cursor: pointer;
}
.btn-primary { background: #2c3e50; color: #fff; }
.btn-success { background: #2e7d32; color: #fff; }
.btn-outline { background: #fff; color: #2c3e50; border: 1px solid #cfd6dc; }
.btn:disabled { opacity: 0.5; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: #445; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px; border: 1px solid #cfd6dc; border-radius: 8px; font-size: 15px;
}

.error-banner { background: #ffebee; color: #c62828; padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 14px; }
.offline-banner { background: #fff3e0; color: #e65100; padding: 8px 12px; text-align: center; font-size: 13px; }

.detail-section { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.detail-section h3 { margin: 0 0 8px; font-size: 14px; color: #7a8794; text-transform: uppercase; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.photo-grid img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; }
.photo-stage-tag { font-size: 10px; background: rgba(0,0,0,0.6); color: #fff; padding: 1px 5px; border-radius: 4px; }

.back-link { color: #2c3e50; font-size: 14px; margin-bottom: 8px; display: inline-block; }
