/* Reset e Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  color: #333;
  overflow: hidden;
}

/* Container Principal - Split Layout */
.register-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Lado Esquerdo - Imagem */
.register-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.register-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 90%, rgba(255, 255, 255, 0.1) 100%);
}

/* Lado Direito - Painel */
.register-panel {
  width: 500px;
  min-width: 500px;
  background: #f4f4f4;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.register-content {
  width: 100%;
  max-width: 420px;
  padding: 40px 24px 32px;
}

/* Logo */
.logo-container {
  text-align: center;
  margin-bottom: 16px;
}

.logo-container img {
  max-width: 220px;
  height: auto;
}

/* Título */
.register-title {
  text-align: center;
  color: #1e3a8a;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
}

.register-description {
  color: #4b5563;
  font-size: 14px;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 8px;
}

.register-description u {
  text-decoration: underline;
}

/* Mensagem de feedback */
.feedback-message {
  display: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 14px;
}

.feedback-message.show {
  display: block;
}

.feedback-message.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.feedback-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* Formulário */
.register-form {
  margin-top: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 13px;
}

.required {
  color: #ef4444;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

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

.input-password-wrapper input {
  width: 100%;
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0 38px 0 10px;
  font-size: 14px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-password-wrapper input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.12);
}

.toggle-password {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #6b7280;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

/* Checkbox termos */
.terms-check {
  margin-bottom: 16px;
  font-size: 13px;
  color: #4b5563;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.terms-check label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.terms-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1e3a8a;
  flex-shrink: 0;
  cursor: pointer;
}

.policy-link {
  color: #1e3a8a;
  text-decoration: underline;
  font-weight: 600;
}

.policy-link:hover {
  color: #1e40af;
}

/* Botão Solicitar Acesso (desabilitado por default) */
.btn-solicitar {
  width: 100%;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #6b7280;
  margin-bottom: 10px;
}

.btn-solicitar:not(:disabled) {
  background: #1e3a8a;
  color: #ffffff;
  border-color: #1e3a8a;
}

.btn-solicitar:not(:disabled):hover {
  background: #1e40af;
}

.btn-solicitar:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-solicitar:active:not(:disabled) {
  transform: scale(0.99);
}

/* Loading spinner */
.btn-solicitar.loading {
  position: relative;
  color: transparent;
}

.btn-solicitar.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Botão Retornar */
.btn-retornar {
  width: 100%;
  height: 44px;
  border-radius: 6px;
  border: 1px solid #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #16a34a;
}

.btn-retornar:hover {
  background: #f0fdf4;
}

.btn-retornar:active {
  transform: scale(0.99);
}

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

/* Responsividade */
@media (max-width: 1024px) {
  .register-image {
    display: none;
  }

  .register-panel {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .register-content {
    max-width: none;
    padding: 28px 16px 24px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .logo-container img {
    max-width: 190px;
  }

  .register-title {
    font-size: 24px;
  }

  .btn-solicitar,
  .btn-retornar {
    font-size: 16px;
  }
}
