:root {
  --color-primary: #004b82;
  --color-primary-light: #006bb3;
  --color-secondary: #008744;
  --color-accent: #f9a826;
  --color-background: #e3eef8;
  --color-surface: rgba(255, 255, 255, 0.85);
  --color-text-dark: #0f172a;
  --color-text-muted: #475569;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-error: #ef4444;
  --color-success: #10b981;
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 25px 60px -12px rgba(0, 75, 130, 0.22);
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
}

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

body {
  font-family: var(--font-family);
  background: var(--color-background);
  color: var(--color-text-dark);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 8px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo-area img {
  width: 62px;
  height: auto;
}

.logo-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

.logo-text p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-top: 4px;
}

.header-contact {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.header-contact a {
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-contact a:hover,
.header-contact i {
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .logo-area {
    flex-direction: column;
    gap: 16px;
  }

  .header-contact {
    flex-direction: column;
    gap: 12px;
  }
}

/* Form Container */
.form-wrapper {
  max-width: 880px;
  margin: 30px auto 60px;
  padding: 35px 50px 50px;
  background: var(--color-surface);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
  animation: slideUp 0.8s ease-out;
}

.form-header {
  text-align: center;
  margin-bottom: 35px;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 20px;
}

.form-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -1px;
  margin-bottom: 8px;
}

.form-header p {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Grid & Layout */
.form-row {
  display: flex;
  gap: 24px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.field-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.field-group.half {
  flex: 1 1 calc(50% - 12px);
}

.field-group.full {
  flex: 1 1 100%;
}

/* Typography & Labels */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 8px;
  margin: 30px 0 20px;
}

label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--color-text-dark);
}

label .req {
  color: var(--color-error);
  margin-left: 2px;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
  width: 100%;
  border: 1px solid #CBCAD0;
  /* tom cinza bem clarinho */
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-family);
  color: var(--color-text-dark);
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

input::placeholder {
  color: #a0aec0;
}

input:focus,
select:focus {
  background-color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(0, 75, 130, 0.1);
  transform: translateY(-1px);
}

/* Radios */
.radio-group {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 5px;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
}

input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

/* Upload Areas */
.upload-section {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 30px 0 20px;
}

.upload-header {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.upload-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.upload-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 180px;
  max-width: 250px;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: var(--color-primary);
  border: 2px dashed #e2e8f0;
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.upload-btn:hover {
  border-color: var(--color-primary);
  background: rgba(0, 75, 130, 0.04);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.upload-btn input[type="file"] {
  display: none;
}

.file-name {
  font-size: 12px;
  color: var(--color-text-muted);
  text-align: center;
  word-break: break-word;
  line-height: 1.3;
}

/* Procuração box */
.procuracao-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(249, 168, 38, 0.05);
  border: 1px solid rgba(249, 168, 38, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  flex-wrap: wrap;
}

.procuracao-box p {
  font-size: 14px;
  font-weight: 500;
  flex: 1 1 200px;
  color: #b7791f;
}

.modelo-link a {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
}

/* CPF specific alignment */
.cpf-fields {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cpf-fields .field-group {
  flex: 1 1 140px;
}

/* Logic Visibility */
.reveal-section {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  margin: 0;
}

.reveal-section.show {
  max-height: 2000px;
  opacity: 1;
  pointer-events: auto;
}

.reveal-flex {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.reveal-flex.show {
  display: flex;
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 30px;
  box-shadow: 0 8px 25px rgba(0, 75, 130, 0.25);
  letter-spacing: 0.5px;
}

.btn-submit:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 75, 130, 0.4);
  filter: brightness(1.1);
}

.btn-submit.submitting {
  background: #64748b !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.8;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Overlay de Carregamento */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
  display: none !important;
  opacity: 0;
}

.loading-box {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

.loading-box h3 {
  color: var(--color-primary);
  margin: 20px 0 10px;
  font-size: 1.4rem;
}

.loading-box p {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(0, 75, 130, 0.1);
  border-left-color: var(--color-primary);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
}

/* Alerts */
.alert {
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

/* Responsive adjustments */
/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 650px) {
  .form-wrapper {
    padding: 40px 20px;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .field-group.half {
    flex: 1 1 100%;
  }

  .upload-item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .page-header h1 {
    font-size: 1.3rem;
  }

  footer {
    padding: 50px 0 30px;
  }

  .footer-contact a {
    display: block;
    margin: 15px 0;
  }
}

/* Footer Standard Styles */
footer {
  background-color: #0f172a;
  color: #fff;
  padding: 80px 0 40px;
  text-align: center;
  margin-top: 80px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
}

.footer-contact a {
  color: #94a3b8;
  text-decoration: none;
  margin: 0 20px;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-copy {
  color: #64748b;
  font-size: 0.9rem;
  margin-top: 10px;
}