/* Elio refer-PWA global styles. Mobile-first. */

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
  background: #FAFAF8;
  color: #1F2937;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* ─── Contractor header ─────────────────────────────────────────── */

.contractor-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
}

.contractor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #FF6B2B;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.contractor-info h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}

.contractor-info .company {
  font-size: 14px;
  color: #6B7280;
  margin-top: 2px;
}

.contractor-info .channel {
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* ─── Form ──────────────────────────────────────────────────────── */

.intro {
  font-size: 17px;
  line-height: 1.5;
  color: #1F2937;
  margin-bottom: 20px;
}

.form-section {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.field {
  margin-bottom: 16px;
}

.field:last-of-type {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4B5563;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

label .required {
  color: #DC2626;
}

input, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  color: #111827;
  background: #fff;
  transition: border-color 0.15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #FF6B2B;
}

textarea {
  resize: vertical;
  min-height: 80px;
  max-height: 200px;
}

button {
  width: 100%;
  padding: 16px;
  background: #FF6B2B;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
  font-family: inherit;
}

button:hover:not(:disabled) {
  opacity: 0.95;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}

button:disabled {
  background: #D1D5DB;
  cursor: not-allowed;
}

.disclaimer {
  font-size: 12px;
  color: #9CA3AF;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

/* ─── States ────────────────────────────────────────────────────── */

.loading, .error, .success {
  background: #fff;
  border-radius: 16px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.error {
  color: #DC2626;
}

.success h2 {
  font-size: 20px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 8px;
}

.success p {
  font-size: 15px;
  color: #4B5563;
  line-height: 1.5;
}

/* ─── Powered-by footer ─────────────────────────────────────────── */

.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 11px;
  color: #9CA3AF;
}

.footer a {
  color: #FF6B2B;
  text-decoration: none;
}
