/* Shared page layout and form basics for login, register, forgot password, and reset password pages */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.page-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.page-image {
  flex: 1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

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

.page-panel {
  /* xs default: full width (image is hidden below lg) */
  width: 100%;
  flex-shrink: 0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.08);
}

.page-content {
  flex: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.logo-container {
  text-align: center;
  margin-bottom: 22px;
}

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

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

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

.required {
  color: #ef4444;
}

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

.form-group input::placeholder {
  color: #9ca3af;
}

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

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

.password-toggle,
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

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

.password-toggle svg,
.toggle-password svg,
.match-indicator svg {
  width: 20px;
  height: 20px;
}

.match-indicator {
  position: absolute;
  right: 36px;
  display: none;
  color: #16a34a;
  pointer-events: none;
}

.match-indicator.visible {
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-message,
.error-message {
  display: none;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}

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

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

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

.btn,
.btn-acessar,
.btn-submit,
.btn-solicitar,
.btn-publico,
.btn-primary,
.btn-secondary,
.btn-retornar {
  width: 100%;
  min-width: 0;
  height: 46px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0 20px;
}

.btn:disabled,
.btn-acessar:disabled,
.btn-submit:disabled,
.btn-solicitar:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-retornar:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn:active,
.btn-acessar:active,
.btn-submit:active,
.btn-solicitar:active,
.btn-publico:active,
.btn-primary:active,
.btn-secondary:active,
.btn-retornar:active {
  transform: scale(0.98);
}

.btn.loading,
.btn-acessar.loading,
.btn-submit.loading,
.btn-solicitar.loading,
.btn-publico.loading,
.btn-primary.loading,
.btn-secondary.loading,
.btn-retornar.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after,
.btn-acessar.loading::after,
.btn-submit.loading::after,
.btn-solicitar.loading::after,
.btn-publico.loading::after,
.btn-primary.loading::after,
.btn-secondary.loading::after,
.btn-retornar.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.termos-footer-link {
  text-align: center;
  padding: 20px 0 12px;
}

.termos-footer-link a {
  font-size: 13px;
  color: #6b7280;
  text-decoration: underline;
  cursor: pointer;
}

.termos-footer-link a:hover {
  color: #1e3a8a;
}

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

@media (max-width: 991px) {
  .page-image {
    display: none;
  }
}

/* lg ≥ 992px: span 10/24 */
@media (min-width: 992px) {
  .page-panel {
    width: calc(10 / 24 * 100%);
  }
}

/* xl ≥ 1200px: span 8/24 */
@media (min-width: 1200px) {
  .page-panel {
    width: calc(8 / 24 * 100%);
  }
}

@media (max-width: 480px) {
  .page-content {
    max-width: none;
    width: 100%;
    padding: 36px 24px 0;
  }

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