/* =============================================================
   Login Moderno - Inspirado no Vuexy Bootstrap Admin Template
   Cor primaria: #7367F0 | Dark bg: #283046 | Font: Montserrat
   ============================================================= */

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

body.auth-page {
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  color: #6e6b7b;
  background-color: #283046;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Auth Wrapper - Centralizado */
.auth-wrapper {
  display: flex;
  flex-basis: 100%;
  min-height: 100vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem;
  position: relative;
}

/* Formas decorativas */
.auth-inner {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.auth-inner::before {
  content: '';
  position: absolute;
  width: 244px;
  height: 243px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='244' height='243' viewBox='0 0 244 243'%3E%3Cpath fill='%237367F0' fill-opacity='0.08' d='M1 0C1 0 63 0 127 0C191 0 244 53 244 117C244 181 191 234 127 234C63 234 1 181 1 117C1 53 1 0 1 0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  top: -54px;
  left: -46px;
  z-index: -1;
}

.auth-inner::after {
  content: '';
  position: absolute;
  width: 272px;
  height: 272px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='272' height='272' viewBox='0 0 272 272'%3E%3Cpath fill='%237367F0' fill-opacity='0.08' d='M136 0C211 0 272 61 272 136C272 211 211 272 136 272C61 272 0 211 0 136C0 61 61 0 136 0Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  bottom: -55px;
  right: -75px;
  z-index: -1;
}

/* Card */
.auth-card {
  background-color: #fff;
  border: none;
  border-radius: 0.428rem;
  box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
  display: flex;
  flex-direction: column;
}

.auth-card-body {
  padding: 2rem;
}

/* Brand / Logo */
.brand-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.brand-logo img {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
  display: block;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 600;
  color: #7367F0;
  margin: 0;
  text-decoration: none;
}

/* Subtitulo */
.auth-subtitle {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #b9b9c3;
  font-size: 0.95rem;
  font-weight: 400;
}

/* Form Groups */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.857rem;
  font-weight: 500;
  color: #5e5873;
}

/* Inputs */
.form-control-modern {
  display: block;
  width: 100%;
  height: 2.714rem;
  padding: 0.438rem 1rem;
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.45;
  color: #6e6b7b;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #d8d6de;
  border-radius: 0.357rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
}

.form-control-modern::placeholder {
  color: #b9b9c3;
  opacity: 1;
}

.form-control-modern:focus {
  border-color: #7367F0;
  box-shadow: 0 3px 10px 0 rgba(34, 41, 47, 0.1);
  outline: 0;
}

.form-control-modern:disabled {
  background-color: #efefef;
  opacity: 1;
}

/* Input Group (para toggle de senha) */
.input-group-modern {
  position: relative;
  display: flex;
  width: 100%;
}

.input-group-modern .form-control-modern {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex: 1;
  border-right: none;
}

.input-group-append {
  display: flex;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.438rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  color: #6e6b7b;
  background-color: #fff;
  border: 1px solid #d8d6de;
  border-left: none;
  border-radius: 0 0.357rem 0.357rem 0;
  cursor: pointer;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-group-modern .form-control-modern:focus ~ .input-group-append .input-group-text,
.input-group-modern .form-control-modern:focus + .input-group-append .input-group-text {
  border-color: #7367F0;
  box-shadow: 0 3px 10px 0 rgba(34, 41, 47, 0.1);
}

.input-group-text:hover {
  color: #7367F0;
}

.input-group-text svg,
.input-group-text i {
  width: 18px;
  height: 18px;
}

/* Botao Primario */
.btn-primary-modern {
  display: block;
  width: 100%;
  height: 2.714rem;
  padding: 0.5rem 1rem;
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: #fff;
  text-align: center;
  background-color: #7367F0;
  border: 1px solid #7367F0;
  border-radius: 0.357rem;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  outline: none;
  text-decoration: none;
}

.btn-primary-modern:hover {
  background-color: #5344ed;
  border-color: #4839eb;
  color: #fff;
}

.btn-primary-modern:focus {
  background-color: #5344ed;
  border-color: #4839eb;
  box-shadow: 0 0 0 0.2rem rgba(136, 126, 242, 0.5);
}

.btn-primary-modern:active {
  background-color: #4839eb;
  border-color: #3e2dea;
}

.btn-primary-modern:disabled,
.btn-primary-modern.loading {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Checkbox Customizado */
.custom-checkbox-wrapper {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.custom-checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  accent-color: #7367F0;
  cursor: pointer;
}

.custom-checkbox-wrapper label {
  font-size: 0.857rem;
  font-weight: 400;
  color: #5e5873;
  cursor: pointer;
  margin: 0;
}

/* Links */
.auth-link {
  color: #7367F0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease-in-out;
}

.auth-link:hover {
  color: #5344ed;
  text-decoration: underline;
}

/* Footer do card */
.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
}

.auth-footer p {
  font-size: 0.857rem;
  color: #b9b9c3;
  margin: 0.35rem 0;
}

/* Versao */
.version-text {
  position: fixed;
  bottom: 10px;
  right: 15px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

/* Powered by */
.powered-text {
  position: fixed;
  bottom: 10px;
  left: 15px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

.powered-text a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}

.powered-text a:hover {
  color: #7367F0;
}

/* reCAPTCHA */
.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Alertas de erro inline */
.form-error {
  font-size: 0.75rem;
  color: #EA5455;
  margin-top: 0.25rem;
}

/* Animacao de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  animation: fadeInUp 0.4s ease-out;
}

/* Responsivo */
@media (max-width: 576px) {
  .auth-wrapper {
    padding: 1rem;
  }

  .auth-inner::before,
  .auth-inner::after {
    display: none;
  }

  .auth-card-body {
    padding: 1.5rem;
  }

  .brand-logo img {
    max-width: 160px;
    max-height: 60px;
  }
}

@media (max-width: 360px) {
  .auth-card-body {
    padding: 1.25rem;
  }
}
