/* ==========================================================================
   Sistema de Coleta — SINFARPE
   Design: Premium, Seguro, Corporativo, Responsivo e Acessível
   ========================================================================== */

:root {
  --primary:        #c5a880; /* Dourado / Âmbar premium */
  --primary-dark:   #a88c64; 
  --accent:         #c5a880;
  --success:        #81c784;
  --error:          #ff8a80;
  --error-bg:       rgba(255, 138, 128, 0.1);
  --warn-bg:        rgba(255, 213, 79, 0.08);
  --warn-border:    #ffd54f;
  --success-bg:     rgba(129, 199, 132, 0.1);
  --success-border: #81c784;
  
  /* Gradiente escuro profundo e luxuoso */
  --bg:             radial-gradient(circle at 50% 0%, #172a45 0%, #0a192f 100%);
  --card:           rgba(16, 33, 65, 0.7); /* Efeito Translúcido (Glassmorphic) */
  --text:           #f4f6f9;
  --text-muted:     #8892b0;
  --border:         rgba(197, 168, 128, 0.2); /* Borda sutil com tom dourado */
  --radius:         12px;
  --shadow:         0 12px 40px rgba(0, 0, 0, 0.5);
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* --- Header --- */
header {
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-logo {
  height: 48px;
  width: auto;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.header-text { display: flex; flex-direction: column; }
.header-title  { font-family: "Georgia", serif; font-size: 1.05rem; font-weight: 700; color: var(--primary); letter-spacing: 0.02em; }
.header-sub    { font-size: 0.75rem; color: var(--text-muted); }

/* --- Main --- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 4rem;
}

/* --- Card --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  width: 100%;
  max-width: 620px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition);
}

/* --- Progress Bar --- */
.progress-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.2rem;
  padding: 0 0.5rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  z-index: 1;
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0d1e36;
  border: 2px solid rgba(197, 168, 128, 0.25);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all var(--transition);
}

.progress-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: #0a192f;
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.5);
}

.step-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.progress-step.active .step-label {
  color: var(--primary);
}

.progress-bar-line {
  flex: 1;
  height: 2px;
  background: rgba(197, 168, 128, 0.15);
  margin: 0 -5px;
  margin-top: -16px; /* Ajusta o alinhamento vertical */
  z-index: 0;
  transition: all var(--transition);
}

.progress-bar-line.active {
  background: var(--primary);
  box-shadow: 0 0 4px rgba(197, 168, 128, 0.3);
}

/* --- Screens --- */
.screen { display: none; }
.screen.active { 
  display: block; 
  animation: fadeIn 0.4s ease forwards;
}

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

/* --- Step badge --- */
.step-badge {
  display: inline-block;
  background: rgba(197, 168, 128, 0.15);
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

/* --- Headings --- */
h1 { font-family: "Georgia", serif; font-size: 1.6rem; color: var(--primary); margin-bottom: 0.5rem; font-weight: normal; }
h2 { font-family: "Georgia", serif; font-size: 1.35rem; color: var(--primary); margin-bottom: 0.5rem; font-weight: normal; }
.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
  line-height: 1.55;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Form groups --- */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
label .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(197, 168, 128, 0.25);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(10, 25, 47, 0.5);
  transition: all var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(197, 168, 128, 0.25);
  background: rgba(10, 25, 47, 0.8);
}
input::placeholder { color: #5a6b82; }

/* --- Radio group --- */
.radio-group {
  display: flex;
  gap: 1.75rem;
  margin-top: 0.4rem;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
}
.radio-label input[type="radio"] { 
  width: 18px; 
  height: 18px; 
  cursor: pointer; 
  accent-color: var(--primary);
}

/* --- Consent box --- */
.consent-scroll {
  background: rgba(10, 25, 47, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.consent-scroll strong { color: var(--text); display: block; margin-bottom: 0.5rem; }
.consent-scroll p { margin-bottom: 0.65rem; }

/* Custom scrollbar para o termo de consentimento */
.consent-scroll::-webkit-scrollbar { width: 6px; }
.consent-scroll::-webkit-scrollbar-track { background: transparent; }
.consent-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.consent-scroll::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Checkbox --- */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.1rem;
  background: rgba(10, 25, 47, 0.5);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.checkbox-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: var(--primary);
}
.checkbox-wrap label {
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.4;
}

/* --- Buttons --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #0a192f;
  box-shadow: 0 4px 15px rgba(197, 168, 128, 0.2);
}
.btn-primary:hover:not(:disabled) { 
  background: linear-gradient(135deg, #d8bc95 0%, var(--primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(197, 168, 128, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-top: 0.5rem;
  padding: 0.4rem 0;
  border: 1px dashed rgba(197, 168, 128, 0.3);
  border-radius: 6px;
}
.btn-ghost:hover:not(:disabled) { 
  background: rgba(197, 168, 128, 0.05);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* --- Alerts --- */
.alert {
  padding: 1.1rem 1.35rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 1.4rem;
}
.alert-warn {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  color: #ffe082;
}
.alert-success-box {
  background: var(--success-bg);
  border-left: 4px solid var(--success-border);
  color: #a5d6a7;
}
.alert-info-box {
  background: rgba(197, 168, 128, 0.08);
  border-left: 4px solid var(--primary);
  color: var(--text-muted);
}
.alert-info-box strong {
  color: var(--primary);
}

/* --- Error message --- */
.error-msg {
  display: none;
  color: var(--error);
  background: var(--error-bg);
  border-left: 3px solid var(--error);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-top: 0.6rem;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

/* --- Icons --- */
.success-icon {
  width: 72px;
  height: 72px;
  background: var(--success-bg);
  border: 3px solid var(--success-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--success);
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 15px rgba(129, 199, 132, 0.2);
}

.info-icon {
  width: 72px;
  height: 72px;
  background: rgba(197, 168, 128, 0.12);
  border: 3px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-family: "Georgia", serif;
  color: var(--primary);
  margin: 0 auto 1.25rem;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(197, 168, 128, 0.2);
}

/* --- Form note --- */
.form-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: -0.6rem;
  margin-bottom: 1.1rem;
}

/* --- Spinner --- */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 25, 47, 0.4);
  border-top-color: #0a192f;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 0.6rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: rgba(10, 25, 47, 0.85);
  margin-top: auto;
}

/* --- Responsive --- */
@media (max-width: 620px) {
  .card { padding: 1.75rem 1.5rem; }
  h1    { font-size: 1.35rem; }
  h2    { font-size: 1.15rem; }
  .radio-group { flex-direction: column; gap: 0.6rem; }
  .progress-container { margin-bottom: 1.75rem; }
  .step-label { display: none; } /* Oculta textos dos passos em mobile */
  .step-circle { width: 32px; height: 32px; font-size: 0.95rem; }
  .progress-bar-line { margin-top: -18px; }
}
