/* Reset e configurações globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Garantir que nenhum elemento esteja selecionado por padrão */
*:focus {
  outline: none;
}

*::selection {
  background: transparent;
}

*::-moz-selection {
  background: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Variáveis CSS */
:root {
  --primary-color: #324673;
  --secondary-color: #4a5a8a;
  --accent-color: #F26E35;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --border-color: #e5e7eb;
  --border-focus: #324673;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container principal */
.cadastro-container {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.row.no-gutters {
  margin: 0;
  min-height: 100vh;
  align-items: stretch;
}

.row.no-gutters > .col,
.row.no-gutters > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
}

/* Seção de fundo melhorada */
.login-background {
  height: 100vh;
  background: linear-gradient(135deg, #324673 100%, #4a6fa5 100%);
  position: relative;
  overflow: hidden;
}

.background-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(50, 70, 115, 0.9) 0%, rgba(74, 90, 138, 0.8) 100%);
  z-index: 1;
}

.background-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  padding: 40px 32px;
  max-width: 730px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.background-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  margin-top: 50px;
  line-height: 1.2;
}

.background-subtitle {
  font-size: 1.125rem;
  margin-bottom: 50px;
  opacity: 0.9;
  line-height: 1.6;
}

.features-list {
  display: flex;
  flex-direction: row;
  gap: 24px;
  text-align: center;
  align-content: stretch;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 50px;
  max-width: 100%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
}

.feature-item i {
  color: var(--success-color);
  font-size: 1.25rem;
}

/* Monitor com formulário */
.monitor-container {
  position: relative;
  margin-bottom: 2rem;
  transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
}

.monitor-screen {
  width: 410px;
  height: 220px;
  background: #ffffff;
  border-radius: 15px;
  border: 8px solid #1e293b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control-btn.close {
  background: #ef4444;
}

.control-btn.minimize {
  background: #f59e0b;
}

.control-btn.maximize {
  background: #10b981;
}

.registration-banner {
  background: linear-gradient(135deg, #ec4899, #be185d);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.screen-content {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  height: calc(100% - 50px);
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.field {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
}

.user-avatar {
  margin-left: 15px;
}

.avatar-circle {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #ec4899, #be185d);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.monitor-stand {
  width: 60px;
  height: 20px;
  background: #1e293b;
  margin: 0 auto;
  border-radius: 0 0 10px 10px;
  position: relative;
  top: -2px;
}

.monitor-stand::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 8px;
  background: #1e293b;
  border-radius: 4px;
}

@keyframes float {
  0%, 100% {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(0px);
  }
  50% {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) translateY(-10px);
  }
}
.form-wrapper {
  width: 100%;
  height: 100%;
  padding: 0;
  background: var(--bg-primary);
  border-radius: 0;
  box-shadow: none;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 500px;
}
.cadastro-form {
  width: 100%;
}

/* Header do formulário */
.form-header {
  text-align: center;
  margin-bottom: 20px;
}

.logo {
  max-width: 180px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.form-title {
  font-size: 2rem;
  font-weight: 700;
  color: #324673;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.form-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
}

/* Indicador de progresso */
.progress-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 25px;
  padding: 0 8px;
}

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

.progress-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.progress-step.completed:not(:last-child)::after {
  background: #F26E35;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
  transition: var(--transition);
}

.progress-step.active .step-number {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 0 0 4px rgba(50, 70, 115, 0.1);
}

.progress-step.completed .step-number {
  background: #F26E35;
  color: white;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  font-weight: 500;
  transition: var(--transition);
}

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

.progress-step.completed .step-label {
  color: #F26E35;
  font-weight: 600;
}

/* Steps do formulário */
.form-step {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
  margin-bottom: 0;
}

.form-step.active {
  display: block;
}
.form-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-label i {
  color: var(--text-secondary);
  font-size: 0.875rem;
  width: 16px;
}

/* Input wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  background: #f9fafb;
  background-clip: padding-box;
  border: 2px solid #d1d5db;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: #324673;
  background: white;
}

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

.form-control.is-valid {
  border-color: #324673;
  background: white;
  box-shadow: 0 0 0 3px rgba(50, 70, 115, 0.1);
}

.form-control.is-invalid {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Ícones dos inputs */
.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  z-index: 2;
  pointer-events: none;
}

/* Botões dos inputs */
.clear-btn,
.toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-btn:active,
.toggle-password:active {
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.toggle-password {
  right: 3rem;
}

/* Feedback dos campos */
.field-feedback {
  font-size: 16px;
  min-height: 12px;
}

.field-feedback.valid {
  color: var(--success-color);
}

.field-feedback.invalid {
  color: var(--error-color);
}

.custom-checkbox {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.custom-checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}

.custom-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.custom-checkbox .checkmark {
  height: 18px;
  width: 18px;
  border: 2px solid #555;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  margin-right: 8px;
}

.custom-checkbox input:checked ~ label .checkmark {
  background-color: #28a745;
  border-color: #28a745;
}

.custom-checkbox input:checked ~ label .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.label-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 2px;
}
.terms-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.terms-link:active {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Alertas */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error-color);
  border-left: 4px solid var(--error-color);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert i {
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.alert-content {
  flex: 1;
}

.error-list {
  margin: 0.5rem 0 0 0;
  padding-left: 1rem;
}

.error-list li {
  margin-bottom: 0.25rem;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
  gap: 16px;
}

.form-group {
  margin-bottom: 0 !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 4px;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  min-height: 45px;
  position: relative;
  overflow: hidden;
  flex: 1;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary,
.btn-success {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover, .btn-primary:focus {
  color: #f0f6fc;
  background-color: #5796f6;
  border-color: #5796f6;
}

.btn-primary:active:not(:disabled),
.btn-success:active:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

.btn-secondary:active:not(:disabled) {
  background: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn:active:not(:disabled) {
  transform: translateY(-1px);
}

.btn-submit {
  flex: 1;
  font-size: 1rem;
  padding: 4px 4px;
}

.btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loading {
  display: flex;
}

/* Footer do formulário - Compacto */
.form-footer {
  text-align: center;
  margin-top: 15px;
  padding-top: 0;
  border-top: 1px solid var(--border-color);
}

.login-link {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 20px 0 0 0;
}

.login-link-text {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  font-size: 15px;
  margin: 0px;
}
.login-link-text:active {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Responsividade */
@media (max-width: 991.98px) {
  .login-background {
    height: auto;
    min-height: 50vh;
    padding: 40px 20px;
  }

  .background-content {
    padding: 20px;
    height: auto;
  }

  .background-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .background-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .features-list {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
  }

  .feature-item {
    justify-content: center;
  }

  .monitor-container {
    transform: none;
    margin-bottom: 30px;
  }

  .monitor-screen {
    width: 100%;
    max-width: 350px;
    height: 200px;
  }

  .form-wrapper {
    padding: 32px 24px;
    max-width: 100%;
  }

  .form-title {
    font-size: 1.75rem;
  }

  .progress-indicator {
    margin-bottom: 24px;
  }

  .step-number {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .step-label {
    font-size: 0.7rem;
  }
}

@media (max-width: 575.98px) {
  .form-wrapper {
    padding: 24px 16px;
  }

  .form-header {
    margin-bottom: 24px;
  }

  .logo {
    max-width: 140px;
    margin-bottom: 16px;
  }

  .form-title {
    font-size: 1.5rem;
  }

  .form-subtitle {
    font-size: 0.9rem;
  }

  .progress-indicator {
    margin-bottom: 20px;
    padding: 0 4px;
  }

  .step-number {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  .step-label {
    font-size: 0.65rem;
  }

  .form-group {
    margin-bottom: 20px;
  }

  .form-control {
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.9rem;
  }

  .form-navigation {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  .btn {
    width: 100%;
    padding: 12px 20px;
    min-height: 44px;
  }

  .form-footer {
    margin-top: 24px;
    padding-top: 20px;
  }

  .login-link {
    font-size: 0.75rem;
  }

  .login-link-text {
    font-size: 0.8rem;
  }
}

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

body:not(.user-interacted) *:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Remover seleção de texto por padrão */
body:not(.user-interacted) *::selection {
  background: transparent !important;
}

body:not(.user-interacted) *::-moz-selection {
  background: transparent !important;
}

#modalCodigoVerificacao .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 3.5rem);
  margin: 1.75rem auto;
}

#codigo_verificacao:focus {
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
  outline: none;
}

#cancelar-verificacao:hover {
  background: #f7fafc !important;
  border-color: #cbd5e0 !important;
}

#verificar_codigo_cadastro:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5) !important;
}

#reenviar-codigo:hover:not(:disabled) {
  background: #f0f4ff;
  color: #5568d3 !important;
}

#reenviar-codigo:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Animações do modal de sucesso */
@keyframes scaleIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

#modalCadastroSucesso .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 3.5rem);
  margin: 1.75rem auto;
}

#modalCadastroSucesso .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

