* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.header {
  background: #1a5276;
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header h1 {
  font-size: 18px;
  font-weight: 600;
}

.badge {
  background: #e74c3c;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: none;
}

.badge.visible { display: inline-block; }

/* Screens */
.screen { display: none; padding: 20px 16px; }
.screen.active { display: block; }

/* SO Lookup */
.so-input-group {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.so-input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
}

.so-input-group input {
  width: 100%;
  font-size: 32px;
  font-weight: 700;
  padding: 16px;
  border: 3px solid #ddd;
  border-radius: 8px;
  text-align: center;
  outline: none;
  -webkit-appearance: none;
}

.so-input-group input:focus {
  border-color: #1a5276;
}

/* Order confirmation card */
.order-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.order-card .client-name {
  font-size: 20px;
  font-weight: 700;
  color: #1a5276;
}

.order-card .order-meta {
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}

.order-card .order-items {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.order-card .order-items li {
  padding: 4px 0;
  font-size: 15px;
  list-style: none;
}

/* Buttons — large for gloved hands */
.btn {
  display: block;
  width: 100%;
  padding: 20px;
  font-size: 18px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 12px;
  min-height: 64px;
  touch-action: manipulation;
}

.btn-primary {
  background: #27ae60;
  color: white;
}

.btn-primary:active { background: #219a52; }

.btn-secondary {
  background: #1a5276;
  color: white;
}

.btn-secondary:active { background: #154360; }

.btn-danger {
  background: #e74c3c;
  color: white;
}

.btn-danger:active { background: #c0392b; }

.btn-outline {
  background: white;
  color: #1a5276;
  border: 2px solid #1a5276;
}

.btn:disabled {
  background: #bbb;
  cursor: not-allowed;
}

/* Photo capture */
.capture-area {
  text-align: center;
  padding: 20px 0;
}

.capture-btn {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e74c3c;
  border: 6px solid white;
  box-shadow: 0 0 0 4px #e74c3c;
  cursor: pointer;
  margin: 20px auto;
  display: block;
  touch-action: manipulation;
}

.capture-btn:active {
  transform: scale(0.9);
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #ddd;
}

.photo-count {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  padding: 12px;
}

/* Status messages */
.status {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0;
  display: none;
}

.status.visible { display: block; }
.status.success { background: #d4edda; color: #155724; }
.status.error { background: #f8d7da; color: #721c24; }
.status.info { background: #d1ecf1; color: #0c5460; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

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

/* Hidden file input */
input[type="file"] { display: none; }
