/* ==========================================================================
   🎨 MAX LIMPEZA - DESIGN SYSTEM & ESTILOS PREMIUM TEMA CLARO (style.css)
   ========================================================================== */

/* ── 🚀 IMPORTE DE FONTES (Google Fonts) ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── 🛠️ VARIÁVEIS DE DESIGN SYSTEM (Design Tokens Light Mode) ── */
:root {
  --font-primary: 'Outfit', sans-serif;

  /* Cores Base Tema Claro */
  --bg-gradient: linear-gradient(135deg, #f3f6fa 0%, #e8edf5 50%, #f0f4f9 100%);
  --color-primary: #0084ff;       /* Azul Max Limpeza Premium */
  --color-primary-hover: #006dd4;
  --color-secondary: #00a8ff;     /* Azul secundário */
  --color-accent: #fc00ff;        /* Violeta vibrante */
  --color-success: #10b981;       /* Verde feedback */
  --color-warning: #f59e0b;       /* Laranja atenção */
  --color-danger: #ef4444;        /* Vermelho alerta */
  
  /* Cores de Texto */
  --text-main: #1e293b;           /* Slate 800 */
  --text-muted: #64748b;          /* Slate 500 */
  --text-placeholder: #94a3b8;    /* Slate 400 */

  /* Glassmorphism Light & Cards */
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-highlight: rgba(0, 132, 255, 0.08);
  --shadow-premium: 0 30px 60px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.02);

  /* Dimensões */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 🧼 RESET & CONFIGURAÇÃO GLOBAL ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 40px 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── 🌌 ELEMENTOS DE FUNDO DECORATIVOS (Efeito Orb Suave) ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.18;
}
.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--color-primary);
  top: -100px;
  left: -100px;
}
.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--color-secondary);
  bottom: -50px;
  right: -50px;
}

/* ==========================================================================
   📦 CONTAINER PRINCIPAL (Glassmorphism Light Card)
   ========================================================================== */
.app-container {
  width: 100%;
  max-width: 620px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-premium);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  position: relative;
  z-index: 10;
  overflow: hidden;
  transition: var(--transition-smooth);
}

@media (max-width: 480px) {
  .app-container {
    padding: 30px 20px;
    border-radius: 16px;
  }
}

/* ── 🏢 LOGO E TÍTULO ── */
.header {
  text-align: center;
  margin-bottom: 40px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 132, 255, 0.08);
  border: 1px solid rgba(0, 132, 255, 0.15);
  color: var(--color-primary);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.8px;
  margin-bottom: 8px;
}

.header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
}

/* ==========================================================================
   📝 SEÇÕES DO FORMULÁRIO (Layout Página Única)
   ========================================================================== */
.form-section {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  padding-bottom: 35px;
  margin-bottom: 40px;
  animation: fadeInSection 0.5s ease forwards;
}

.form-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--color-primary);
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
  letter-spacing: -0.3px;
}

/* ── 🎛️ ESTRUTURA DOS CAMPOS DE INPUT ── */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #334155; /* Slate 700 */
}

.form-group label span.required {
  color: var(--color-danger);
  margin-left: 3px;
}

/* Inputs de Texto/Número/Seleção */
.input-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cbd5e1; /* Slate 300 */
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.input-control:hover {
  border-color: #94a3b8; /* Slate 400 */
}

.input-control:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 132, 255, 0.1), inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.input-control::placeholder {
  color: var(--text-placeholder);
}

/* Estilização específica para Select */
select.input-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  padding-right: 45px;
}

select.input-control option {
  background: #ffffff;
  color: var(--text-main);
}

/* Áreas de Texto */
textarea.input-control {
  resize: vertical;
  min-height: 100px;
}

/* ── 🧬 CONTROLES CONDICIONAIS DINÂMICOS ── */
.conditional-container {
  display: none;
  padding: 18px 22px;
  background: rgba(15, 23, 42, 0.02);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 15px;
  animation: fadeInDown 0.3s ease forwards;
}

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

/* ── 🔘 RADIOS E CHECKBOXES CUSTOMIZADOS ── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .options-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.option-card {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0; /* Slate 200 */
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.01);
}

.option-card:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  transform: translateY(-1px);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Indicador Customizado do Radio */
.radio-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  background: #ffffff;
}

.radio-indicator::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: scale(0);
  transition: var(--transition-smooth);
}

.option-card input:checked ~ .radio-indicator {
  border-color: var(--color-primary);
}

.option-card input:checked ~ .radio-indicator::after {
  transform: scale(1);
}

/* Indicador Customizado do Checkbox */
.check-indicator {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  background: #ffffff;
}

.check-indicator::after {
  content: '✓';
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: bold;
  transform: scale(0);
  transition: var(--transition-smooth);
}

.option-card input:checked ~ .check-indicator {
  border-color: var(--color-primary);
}

.option-card input:checked ~ .check-indicator::after {
  transform: scale(1);
}

/* Estado Ativo do Option Card */
.option-card.selected {
  border-color: var(--color-primary);
  background: rgba(0, 132, 255, 0.04);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.05);
}

.option-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

/* Opções de Disponibilidade */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==========================================================================
   🔘 BOTÕES E AÇÕES DO FOOTER
   ========================================================================== */
.footer-actions {
  display: flex;
  margin-top: 35px;
}

.btn {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 30px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-smooth);
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 132, 255, 0.25);
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 132, 255, 0.38);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ==========================================================================
   🚨 POP-UP E MODAL CUSTOMIZADOS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 15px;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  padding: 35px;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
  transform: translateY(30px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-warning);
  font-size: 1.8rem;
  margin: 0 auto 20px auto;
  animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.modal-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.modal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-btn-fill {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 600;
  padding: 14px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.18);
}

.modal-btn-fill:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 132, 255, 0.25);
}

.modal-btn-skip {
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.modal-btn-skip:hover {
  background: rgba(15, 23, 42, 0.02);
  color: var(--text-main);
}

/* ==========================================================================
   🔄 TELA DE CARREGAMENTO / SUCESSO
   ========================================================================== */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(0, 132, 255, 0.08);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

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

.loading-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.loading-subtext {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tela de Sucesso */
.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
  font-size: 3rem;
  margin-bottom: 25px;
  animation: scaleInCheck 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes scaleInCheck {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 🧼 NOTIFICAÇÕES DE FEEDBACK DE INPUT */
.error-msg {
  color: var(--color-danger);
  font-size: 0.8rem;
  margin-top: 5px;
  font-weight: 500;
  display: none;
  animation: fadeIn 0.2s ease forwards;
}

.input-control.invalid {
  border-color: var(--color-danger);
  background: rgba(239, 68, 68, 0.02);
}

.input-control.invalid:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

/* Destaque no container com erros em radio cards */
.form-group.has-error .option-card {
  border-color: rgba(239, 68, 68, 0.3);
}

/* ── 🔄 TELA DE SUCESSO E CARREGAMENTO COMPACTA ── */
.app-container.loading-active {
  max-width: 500px;
  padding: 40px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.app-container.loading-active .header,
.app-container.loading-active #recruitmentForm {
  display: none !important;
}

.app-container.loading-active .loading-overlay {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 300px;
  display: flex;
  background: transparent;
  padding: 0;
  animation: fadeIn 0.4s ease forwards;
}

