/* Login modal fullscreen — slide da direita */
:root {
  --auth-modal-red: #e53935;
  --auth-modal-red-dark: #d32f2f;
  --auth-modal-red-soft: #ffebee;
}

body.account-auth-modal {
  overflow: hidden;
  background: #fff;
}

body.account-auth-modal .page-content.account-auth-modal-page,
body.account-auth-modal #main-container,
body.account-auth-modal .container-fluid {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  width: 100%;
  max-width: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.auth-modal.is-open {
  transform: translateX(0);
}

.auth-modal__viewport {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.auth-modal__back {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 30;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.auth-modal__back:hover {
  background: #fff;
  transform: scale(1.04);
}

.auth-modal__track {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.auth-modal__track[data-step="form"] {
  transform: translateX(-50%);
}

.auth-modal__screen {
  width: 50%;
  flex: 0 0 50%;
  height: 100%;
  overflow: hidden;
}

/* —— Welcome —— */
.auth-modal__screen--welcome {
  display: flex;
  flex-direction: column;
  background: #f5f5f5;
}

.auth-modal__hero {
  position: relative;
  flex: 1 1 52%;
  min-height: 240px;
  background-color: #c62828;
  background-image: linear-gradient(160deg, rgba(198, 40, 40, 0.35) 0%, rgba(0, 0, 0, 0.2) 100%), var(--auth-hero-image);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.auth-modal__hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.25) 100%);
  pointer-events: none;
}

.auth-modal__hero-brand {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: 0 56px;
  z-index: 2;
}

.auth-modal__hero-logo {
  max-height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.auth-modal__hero-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
}

.auth-modal__sheet {
  position: relative;
  flex: 0 0 auto;
  margin-top: -28px;
  padding: 36px 22px 24px;
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.08);
  text-align: center;
  z-index: 5;
}

.auth-modal__sheet-badge {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--auth-modal-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(229, 57, 53, 0.25);
}

.auth-modal__sheet-title {
  margin: 8px 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-modal__sheet-subtitle {
  margin: 0 0 22px;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.45;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.auth-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
  box-sizing: border-box;
}

.auth-modal__btn--primary {
  background: var(--auth-modal-red) !important;
  border-color: var(--auth-modal-red) !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.35);
}

.auth-modal__btn--primary:hover:not(:disabled) {
  background: var(--auth-modal-red-dark) !important;
  border-color: var(--auth-modal-red-dark) !important;
  color: #fff !important;
}

.auth-modal__btn--outline {
  background: #fff;
  border-color: var(--auth-modal-red);
  color: var(--auth-modal-red);
}

.auth-modal__btn--outline:hover {
  background: var(--auth-modal-red-soft);
  color: var(--auth-modal-red-dark);
}

.auth-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.auth-modal__divider::before,
.auth-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.auth-modal__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-modal__social-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #f0f0f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  padding: 0;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.auth-modal__social-btn:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.auth-modal__social-icon {
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.auth-modal__social-icon--google {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23FFC107' d='M43.611 20.083H42V20H24v8h11.303C33.654 32.657 29.273 36 24 36c-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C33.64 6.053 28.991 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z'/%3E%3Cpath fill='%23FF3D00' d='M6.306 14.691l6.571 4.819C14.655 16.108 18.961 13 24 13c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C33.64 6.053 28.991 4 24 4 16.318 4 9.656 8.337 6.306 14.691z'/%3E%3Cpath fill='%234CAF50' d='M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238C29.211 35.091 26.715 36 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z'/%3E%3Cpath fill='%231976D2' d='M43.611 20.083H42V20H24v8h11.303c1.149 3.413 4.397 5.808 8.697 5.808 2.402 0 4.582-.92 6.233-2.417l6.19 5.238C36.971 41.205 30.999 44 24 44c-7.773 0-14.227-4.977-16.694-11.917z'/%3E%3C/svg%3E");
}

.auth-modal__social-icon--apple {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23101828' d='M17.05 20.28c-.98.95-2.05 1.88-3.51 1.9-1.46.02-1.93-.86-3.6-.86-1.67 0-2.19.84-3.57.88-1.38.04-2.43-1.24-3.41-2.18-1.85-1.9-3.27-5.38-1.37-7.73 1.34-1.58 3.35-2.51 5.28-2.53 1.3-.02 2.53.87 3.6.87 1.07 0 3.07-1.07 5.18-.91.88.04 3.35.35 4.93 2.65-.13.08-2.95 1.72-2.92 5.13.03 4.09 3.58 5.45 3.63 5.47-.03.09-.56 1.92-1.74 3.81zM14.02 4.2c.73-.89 1.22-2.12 1.09-3.35-1.05.04-2.32.7-3.08 1.58-.68.78-1.27 2.03-1.11 3.23 1.18.09 2.38-.6 3.1-1.46z'/%3E%3C/svg%3E");
}

.auth-modal__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.6875rem;
  color: #9ca3af;
}

.auth-modal__footer i {
  color: var(--auth-modal-red);
  font-size: 0.75rem;
  margin-right: 2px;
}

.auth-modal__footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--auth-modal-red);
  opacity: 0.7;
}

/* —— Form step —— */
.auth-modal__screen--form {
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-modal[data-step-inner="form"] .auth-modal__back {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-modal__form-head {
  padding: 64px 20px 12px;
  text-align: center;
  flex-shrink: 0;
}

.auth-modal__form-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111;
}

.auth-modal__form-subtitle {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.auth-modal__form-body {
  flex: 1;
  padding: 0 16px 24px;
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.account-auth--modal-form {
  max-width: none;
  padding: 0;
  margin: 0;
}

.account-auth--modal-form .account-auth__card--modal {
  border: 0;
  box-shadow: none;
  padding: 16px 4px 8px;
  background: transparent;
}

.account-auth--modal-form .account-auth__submit,
.account-auth--modal-form .auth-modal__btn--submit {
  background: var(--auth-modal-red) !important;
  border-color: var(--auth-modal-red) !important;
  border-radius: 999px !important;
  height: 50px;
  font-size: var(--auth-fs-btn, 0.875rem);
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.3);
}

.account-auth--modal-form .account-auth__forgot {
  color: var(--auth-modal-red);
}

.account-auth--modal-form .auth-field__input:focus {
  border-color: #ef9a9a !important;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12) !important;
}

.auth-modal__providers {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (min-width: 768px) {
  .auth-modal {
    left: auto;
    right: 0;
    max-width: 480px;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
  }

  .auth-modal__sheet-title {
    font-size: 1.45rem;
  }
}
