/* Estilos Gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: #f8f8f8;
  min-height: 100vh;
}

body:not(.dashboard-body) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-color: #f8f8f8;
}

.container {
  display: flex;
  width: 100%;
  max-width: 1200px;
  min-height: 600px;
  max-height: 90vh;
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-radius: 8px;
  margin: 0 auto;
}

/* Painel Esquerdo */
.left-panel {
  flex: 1;
  background: linear-gradient(rgba(245, 74, 6, 0.589), rgba(0, 0, 0, 0.822)),
    url("../img/pexels-photo-2219024.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 300px;
  overflow-y: auto;
}

.logo-container {
  text-align: left;
  margin-bottom: 40px;
}

.logo {
  width: 100px;
  margin-bottom: 10px;
}

.logo-container h1 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.logo-container p {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.8;
  max-width: 300px;
}

.features {
  flex-grow: 1;
}

.feature {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.feature-icon {
  background-color: rgba(255, 255, 255, 0.15);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 15px;
}

.feature-icon i {
  font-size: 18px;
}

.feature-text h3 {
  font-size: 15px;
  margin-bottom: 4px;
  font-weight: 600;
}

.feature-text p {
  font-size: 13px;
  opacity: 0.8;
}

.app-download {
  margin-top: 40px;
  text-align: left;
}

.app-download p {
  font-size: 14px;
  margin-bottom: 10px;
}

.app-icons a {
  color: white;
  margin-right: 15px;
  font-size: 20px;
}

/* Painel Direito */
.right-panel {
  flex: 1;
  padding: 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  background-color: #ffffff;
  overflow-y: auto;
  min-height: 400px;
  width: 100%;
  box-sizing: border-box;
}

.form-container {
  width: 100%;
  max-width: 100%;
  position: relative;
  margin: 0 auto;
  padding: 20px 10px;
  box-sizing: border-box;
}

.language-selector {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1000;
}

.language-selector select {
  background-color: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 13px;
}

.avatar-container {
  position: absolute;
  top: 0;
  right: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  opacity: 0.7;
}

.form-container h2 {
  font-size: 24px;
  color: #333;
  margin-bottom: 10px;
  font-weight: 600;
}

.form-container > p {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Formulário */
.account-type {
  margin-bottom: 20px;
}

.account-type p {
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
}

.radio-group {
  display: flex;
}

.radio-group label {
  margin-right: 20px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.radio-group input[type="radio"] {
  margin-right: 5px;
}

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

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group.half {
  flex: 1;
  min-width: calc(50% - 7.5px);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: #f9f9f9;
  margin-bottom: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 16px; /* Previne zoom em iOS */
}

/* Estilos para validação de campos */
.form-group input.valid {
  border-color: #4caf50;
  background-color: #f0fff0;
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.form-group input.invalid {
  border-color: #f44336;
  background-color: #fff0f0;
  box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* Melhorias para acessibilidade e UX */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: #ff5500;
  box-shadow: 0 0 0 2px rgba(255, 85, 0, 0.2);
  background-color: #fff;
}

/* Melhorias para o seletor de idioma */
.language-selector .current-lang {
  transition: transform 0.2s ease;
}

.language-selector .current-lang:hover {
  transform: scale(1.1);
}

.language-selector .lang-dropdown {
  animation: fadeIn 0.2s ease;
}

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

/* Estilo para botão desabilitado */
.btn-cadastrar:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #cccccc;
  border: 1px solid #aaaaaa;
}

.btn-cadastrar.enabled {
  opacity: 1;
  cursor: pointer;
  background-color: #ff5500;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.password-input {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 14px;
}

.remember-me {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 13px;
  color: #666;
}

.remember-me label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.remember-me label:hover {
  color: #333;
}

.remember-me input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #ddd;
  border-radius: 3px;
  margin-right: 8px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
}

.remember-me input[type="checkbox"]:hover {
  border-color: #f54a06;
}

.remember-me input[type="checkbox"]:checked {
  background: #f54a06;
  border-color: #f54a06;
}

.remember-me input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.remember-me input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 74, 6, 0.2);
}

.forgot-password {
  color: #ff5500;
  text-decoration: none;
  font-size: 13px;
}

.btn-cadastrar,
.btn-entrar {
  width: 100%;
  padding: 12px;
  background-color: #ff5500;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

.btn-cadastrar:hover,
.btn-entrar:hover {
  background-color: #e04d00;
}

.login-link,
.register-link {
  text-align: center;
  margin-top: 15px;
  font-size: 13px;
  color: #666;
}

.login-link a,
.register-link a {
  color: #ff5500;
  text-decoration: none;
  font-weight: 500;
}

.footer {
  text-align: center;
  margin-top: 30px;
  font-size: 11px;
  color: #999;
}

.footer a {
  color: #ff5500;
  text-decoration: none;
  font-weight: 500;
}

/* Responsividade Melhorada */
@media (max-width: 1400px) {
  .container {
    max-width: 95%;
    margin: 20px auto;
  }

  .left-panel {
    padding: 35px;
  }

  .right-panel {
    padding: 35px;
  }
}

@media (max-width: 1200px) {
  .container {
    max-width: 100%;
    min-height: 100vh;
    height: auto;
    margin: 10px;
    border-radius: 12px;
  }

  .left-panel {
    padding: 30px;
    min-width: 280px;
  }

  .right-panel {
    padding: 30px;
  }

  .form-container {
    max-width: 100%;
  }

  .logo {
    width: 90px;
  }

  .feature-text h3 {
    font-size: 14px;
  }

  .feature-text p {
    font-size: 12px;
  }
}

@media (max-width: 1024px) {
  .container {
    margin: 5px;
    border-radius: 8px;
  }

  .left-panel {
    min-width: 250px;
    padding: 25px;
  }

  .right-panel {
    padding: 25px;
  }

  .form-container {
    max-width: 500px;
  }
}

@media (max-width: 992px) {
  body:not(.dashboard-body) {
    align-items: flex-start;
    padding: 5px;
  }

  .container {
    max-width: 100%;
    height: auto;
    min-height: auto;
    margin: 0;
    border-radius: 0;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-group {
    min-width: 100%;
    width: 100%;
  }

  .form-group.half {
    width: 100%;
    min-width: 100%;
  }

  .left-panel {
    min-width: 200px;
  }

  .feature {
    margin-bottom: 25px;
  }

  .feature-icon {
    width: 32px;
    height: 32px;
  }

  .feature-icon i {
    font-size: 16px;
  }
}

@media (max-width: 992px) {
  .container {
    flex-direction: column;
    max-height: none;
    height: auto;
    max-width: 100%;
  }
  
  .left-panel {
    min-height: 300px;
    padding: 30px 20px;
    width: 100%;
  }
  
  .right-panel {
    min-height: auto;
    padding: 30px 15px;
    width: 100%;
  }
  
  .form-container {
    padding: 10px 5px;
  }
  
  .form-row {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  body:not(.dashboard-body) {
    padding: 0;
    align-items: flex-start;
    min-height: 100vh;
    height: auto;
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    max-width: 100%;
    width: 100%;
  }

  .left-panel {
    padding: 25px 20px;
    min-height: 250px;
    min-width: auto;
    order: 1;
    flex-shrink: 0;
  }

  .right-panel {
    padding: 25px 20px;
    order: 2;
    min-height: auto;
    align-items: flex-start;
    padding-top: 20px;
  }

  .form-container {
    max-width: 100%;
    padding: 0;
  }

  .logo {
    width: 80px;
    margin-bottom: 15px;
  }

  .logo-container {
    text-align: center;
    margin-bottom: 25px;
  }

  .logo-container h1 {
    font-size: 18px;
  }

  .logo-container p {
    font-size: 12px;
    max-width: 100%;
  }

  .features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
  }

  .feature {
    margin-bottom: 0;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
  }

  .feature-text h3 {
    font-size: 13px;
  }

  .feature-text p {
    font-size: 11px;
    line-height: 1.3;
  }

  .feature-icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
  }

  .feature-icon i {
    font-size: 14px;
  }

  .app-download {
    text-align: center;
    margin-top: 20px;
  }

  .app-download p {
    font-size: 12px;
  }

  .form-container h2 {
    font-size: 22px;
    text-align: center;
  }

  .form-container > p {
    font-size: 13px;
    text-align: center;
  }

  .language-selector {
    top: 10px;
    right: 10px;
  }
}

@media (max-width: 576px) {
  body:not(.dashboard-body) {
    padding: 0;
    margin: 0;
  }

  .container {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }

  .left-panel {
    padding: 20px 15px;
    min-height: 200px;
    flex-shrink: 0;
  }

  .right-panel {
    padding: 20px 15px;
    min-height: auto;
    align-items: flex-start;
    padding-top: 15px;
  }

  .form-container {
    padding: 0;
    max-width: 100%;
  }

  .form-container h2 {
    font-size: 20px;
    margin-bottom: 8px;
  }

  .form-container > p {
    font-size: 13px;
    margin-bottom: 25px;
  }

  .logo {
    width: 70px;
    margin-bottom: 10px;
  }

  .logo-container {
    margin-bottom: 20px;
  }

  .logo-container p {
    font-size: 11px;
    line-height: 1.3;
  }

  .features {
    gap: 10px;
    margin-bottom: 15px;
  }

  .feature {
    padding: 8px;
    flex-direction: column;
    text-align: center;
  }

  .feature-icon {
    width: 26px;
    height: 26px;
    margin-right: 0;
    margin-bottom: 5px;
  }

  .feature-icon i {
    font-size: 12px;
  }

  .feature-text h3 {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .feature-text p {
    font-size: 10px;
    line-height: 1.2;
  }

  .app-download {
    margin-top: 15px;
  }

  .app-download p {
    font-size: 11px;
  }

  .app-icons a {
    font-size: 18px;
    margin-right: 10px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  label {
    font-size: 13px;
    margin-bottom: 5px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"] {
    padding: 12px 10px;
    font-size: 16px; /* Evita zoom no iOS */
    border-radius: 6px;
  }

  .btn-cadastrar,
  .btn-entrar {
    padding: 14px;
    font-size: 16px;
    border-radius: 6px;
    margin-top: 15px;
  }

  .radio-group {
    flex-direction: column;
    gap: 8px;
  }

  .radio-group label {
    margin-right: 0;
    margin-bottom: 5px;
  }

  .remember-me {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .language-selector {
    top: 8px;
    right: 8px;
  }

  .language-selector .current-lang img {
    width: 22px;
    height: 22px;
  }

  .language-selector .lang-dropdown {
    top: 28px;
    right: -5px;
  }

  .language-selector .lang-flag img {
    width: 18px;
    height: 18px;
  }

  .footer {
    margin-top: 20px;
    font-size: 10px;
  }

  .login-link,
  .register-link {
    margin-top: 20px;
    font-size: 12px;
  }
}

/* Melhorias para dispositivos muito pequenos */
@media (max-width: 375px) {
  .left-panel {
    padding: 15px 10px;
    min-height: 200px;
  }

  .right-panel {
    padding: 15px 10px;
  }

  .logo {
    width: 60px;
  }

  .features {
    display: none; /* Ocultar features em telas muito pequenas */
  }

  .app-download {
    margin-top: 10px;
  }

  .form-container h2 {
    font-size: 18px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"] {
    padding: 10px 8px;
  }

  .btn-cadastrar,
  .btn-entrar {
    padding: 12px;
  }
}

/* Orientação landscape para dispositivos móveis */
@media (max-width: 768px) and (orientation: landscape) {
  .container {
    flex-direction: row;
    max-height: 100vh;
    overflow: hidden;
  }
  
  .right-panel {
    padding: 20px 15px;
    overflow-y: auto;
  }
  
  .form-container {
    padding: 10px 5px;
  }

  .left-panel {
    min-height: auto;
    min-width: 40%;
    padding: 15px;
  }

  .right-panel {
    min-height: auto;
    padding: 15px;
  }

  .features {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .feature {
    padding: 5px;
    flex-direction: row;
    text-align: left;
  }

  .feature-icon {
    margin-right: 8px;
    margin-bottom: 0;
  }

  .logo-container {
    text-align: left;
    margin-bottom: 15px;
  }

  .app-download {
    text-align: left;
  }
}
