/* ══════════════════════════════════════════════════════════════════════════
   CAMPANHA DE VACINAÇÃO 2026 - APROJUS
   Multi-Step Wizard Design
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --primary-blue: #0d6efd;
  --primary-green: #198754;
  --secondary-green: #20c997;
  --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-radius: 14px;
  --border-radius-sm: 8px;
  --border-color: #e2e8f0;
  --shadow: 0 4px 20px rgba(13, 110, 253, 0.08);
  --error-bg: #f8d7da;
  --error-border: #f5c2c7;
  --error-text: #842029;
  --cookie-bg: #185885;
  --font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: #1e293b;
  line-height: 1.6;
  padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────────── */
.app-header {
  background: var(--gradient-primary);
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 0 0 20px 20px;
  margin-bottom: 2rem;
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.12);
}

.header-icon,
.header-icon-logo {
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.header-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  font-size: 1.5rem;
}

.header-icon-logo {
  padding: 8px 15px;
  border-radius: 12px;
  max-width: 180px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-icon-logo img {
  max-width: 100%;
  height: auto;
  /* Mantém cores originais sem filtro */
}

.app-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.app-header p {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PROGRESS BAR
   ───────────────────────────────────────────────────────────────────────────── */
.progress-container {
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition);
}

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

.progress-step.completed .step-number::after {
  content: '✓';
}

.step-label {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  text-align: center;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: var(--primary-green);
  font-weight: 500;
}

.progress-bar-track {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.4s ease;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FORM CARD
   ───────────────────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1rem;
  min-height: 350px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FORM STEPS
   ───────────────────────────────────────────────────────────────────────────── */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-step.active {
  display: block;
}

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

.section-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.subsection-title {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FORM CONTROLS
   ───────────────────────────────────────────────────────────────────────────── */
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.65rem 0.875rem;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
  outline: none;
}

.form-control::placeholder { color: #94a3b8; }

.input-group-text {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.05), rgba(25, 135, 84, 0.05));
  border: 1.5px solid var(--border-color);
  border-right: none;
  border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
  color: var(--primary-green);
  padding: 0.65rem 0.75rem;
}

.input-group .form-control {
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary-green);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CHECKBOXES & RADIOS
   ───────────────────────────────────────────────────────────────────────────── */
.form-check-custom {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: var(--border-radius-sm);
  border: 1.5px solid var(--border-color);
  transition: all var(--transition);
  cursor: pointer;
}

.form-check-custom:hover {
  border-color: var(--secondary-green);
  background: rgba(32, 201, 151, 0.05);
}

.form-check-custom .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.6rem;
  cursor: pointer;
}

.form-check-custom .form-check-input:checked {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.form-check-custom .form-check-label {
  cursor: pointer;
  font-weight: 500;
  color: #334155;
  font-size: 0.9rem;
}

/* Filiacao box */
.filiacao-box {
  background: #f0f8f4;
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(25, 135, 84, 0.1);
}

/* Termo boxes */
.termo-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.875rem;
  transition: all var(--transition);
}

.termo-box:hover {
  border-color: var(--secondary-green);
}

.termo-box .form-check { margin-bottom: 0; }

.termo-box .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.termo-box .form-check-input:checked {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.termo-box .form-check-label {
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.4;
}

.termo-box .form-check-label strong { color: #1e293b; }

/* ─────────────────────────────────────────────────────────────────────────────
   DEPENDENTES
   ───────────────────────────────────────────────────────────────────────────── */
#dependentesContainer { margin-bottom: 0.75rem; }

.dependente-item {
  background: #fff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  animation: slideIn 0.3s ease;
}

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

.dependente-item .dependente-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.dependente-item .dependente-number {
  font-weight: 600;
  color: var(--primary-green);
  font-size: 0.85rem;
}

.btn-remove-dependente {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s;
}

.btn-remove-dependente:hover {
  background: rgba(220, 53, 69, 0.1);
}

.btn-add-dependente {
  width: 100%;
  padding: 0.65rem;
  background: #fff;
  border: 2px dashed var(--secondary-green);
  border-radius: var(--border-radius-sm);
  color: var(--primary-green);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.btn-add-dependente:hover {
  background: rgba(32, 201, 151, 0.1);
  border-color: var(--primary-green);
}

/* ─────────────────────────────────────────────────────────────────────────────
   STEP NAVIGATION BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.btn-prev {
  background: #f1f5f9;
  color: #64748b;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  transition: all var(--transition);
}

.btn-prev:hover {
  background: #e2e8f0;
  color: #334155;
}

.btn-next {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-submit {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.25);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 110, 253, 0.35);
}

/* ─────────────────────────────────────────────────────────────────────────────
   VALIDATION STATES
   ───────────────────────────────────────────────────────────────────────────── */
.is-danger,
.form-control.is-danger {
  border-color: var(--error-border) !important;
  background-color: var(--error-bg) !important;
}

.is-danger::placeholder {
  color: var(--error-text) !important;
  opacity: 1;
}

.input-group.is-danger .input-group-text,
.input-group.is-danger .form-control {
  border-color: var(--error-border);
  background-color: var(--error-bg);
}

.input-group.is-danger .input-group-text { color: var(--error-text); }

.filiacao-box.is-danger,
.aplicacao-container.is-danger {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SHAKE ANIMATION
   ───────────────────────────────────────────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake { animation: shake 0.4s ease both; }

/* ─────────────────────────────────────────────────────────────────────────────
   COOKIE BANNER
   ───────────────────────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--cookie-bg);
  color: white;
  padding: 0.75rem 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  transition: transform 0.4s ease;
}

.cookie-banner.hidden { transform: translateY(100%); }

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-text { font-size: 0.85rem; }

.cookie-link {
  color: var(--secondary-green);
  text-decoration: none;
  font-weight: 500;
  margin-left: 0.25rem;
}

.cookie-link:hover { color: white; text-decoration: underline; }

.btn-cookie-accept {
  background: white;
  color: var(--cookie-bg);
  border: none;
  padding: 0.4rem 1rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.btn-cookie-accept:hover {
  background: var(--secondary-green);
  color: white;
}

/* Aviso Card Subtle */
.aviso-card-subtle {
  background-color: #fdfdfd;
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
}

.aviso-card-subtle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: #ffc107;
  opacity: 0.4;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILITIES
   ───────────────────────────────────────────────────────────────────────────── */
.text-danger { color: #dc3545 !important; }
.text-primary-green { color: var(--primary-green) !important; }
.italic { font-style: italic; }
html { scroll-behavior: smooth; }

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
  .app-header { padding: 1.25rem 0.75rem; }
  .app-header h1 { font-size: 1.15rem; }
  .header-icon { width: 45px; height: 45px; font-size: 1.25rem; }
  .form-card { padding: 1.25rem; min-height: auto; }
  .progress-container { padding: 0.75rem; }
  .step-number { width: 28px; height: 28px; font-size: 0.8rem; }
  .step-label { font-size: 0.6rem; }
  .step-buttons { flex-direction: column-reverse; gap: 0.75rem; }
  .step-buttons .btn-prev,
  .step-buttons .btn-next,
  .step-buttons .btn-submit { width: 100%; }
}
