:root {
  --auth-ink: #06142c;
  --auth-muted: #64748b;
  --auth-line: #d9e2f0;
  --auth-paper: #f8fbff;
  --auth-accent: #3e7bff;
  --auth-accent-deep: #2458d6;
  --auth-ease: cubic-bezier(0.77, 0, 0.175, 1);
}

body.auth-luxury-page {
  min-height: 100vh;
  background: #050b18;
  color: var(--auth-ink);
}

.auth-luxury-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(92, 135, 219, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 135, 219, 0.16) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.auth-luxury-page .auth-header {
  background: rgba(5, 11, 24, 0.88);
  border-color: rgba(154, 181, 229, 0.16);
}

.auth-main {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 112px 24px 56px;
}

.auth-shell {
  width: min(100%, 980px);
}

.auth-stage {
  position: relative;
  min-height: 630px;
  overflow: hidden;
  border: 1px solid rgba(154, 181, 229, 0.24);
  border-radius: 8px;
  background: var(--auth-paper);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  isolation: isolate;
}

.auth-form-pane,
.auth-cover {
  position: absolute;
  inset-block: 0;
  width: 50%;
}

.auth-form-pane {
  inset-inline-start: 0;
  z-index: 1;
  overflow-y: auto;
  padding: 42px clamp(28px, 4vw, 54px);
  background: var(--auth-paper);
  scrollbar-width: none;
  transition: transform 560ms var(--auth-ease);
}

.auth-form-pane::-webkit-scrollbar {
  display: none;
}

.auth-stage[data-mode="signup"] .auth-form-pane {
  transform: translateX(100%);
}

[dir="rtl"] .auth-stage[data-mode="signup"] .auth-form-pane {
  transform: translateX(-100%);
}

.auth-cover {
  inset-inline-end: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 56px;
  background: var(--auth-accent);
  color: #fff;
  text-align: center;
  transition: transform 560ms var(--auth-ease);
}

.auth-cover::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.26;
  background-image:
    linear-gradient(135deg, transparent 0 44%, rgba(255, 255, 255, 0.18) 44% 45%, transparent 45% 100%),
    linear-gradient(45deg, transparent 0 72%, rgba(6, 20, 44, 0.24) 72% 73%, transparent 73% 100%);
  background-size: 180px 180px, 240px 240px;
}

.auth-stage[data-mode="signup"] .auth-cover {
  transform: translateX(-100%);
}

[dir="rtl"] .auth-stage[data-mode="signup"] .auth-cover {
  transform: translateX(100%);
}

.auth-cover-content {
  position: relative;
  z-index: 1;
  max-width: 330px;
}

.auth-cover-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
}

.auth-cover h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 900;
  line-height: 1.25;
}

.auth-cover p {
  margin: 0 auto 30px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 2;
}

.auth-cover-switch {
  min-width: 168px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
  background: rgba(6, 20, 44, 0.12);
}

.auth-form-heading {
  margin-bottom: 28px;
  text-align: center;
}

.auth-form-heading h1 {
  margin: 0 0 8px;
  color: var(--auth-ink);
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 950;
  line-height: 1.35;
}

.auth-form-heading p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.9;
}

.auth-luxury-page .auth-role-label,
.auth-luxury-page form label,
.auth-luxury-page #signupMethodPanel > span {
  color: #44546c !important;
}

.auth-role-grid {
  position: relative;
  border: 1px solid var(--auth-line) !important;
  border-radius: 7px !important;
  background: #edf2f8 !important;
}

.auth-role-grid::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 6px;
  right: 6px;
  bottom: 6px;
  width: calc(50% - 9px);
  border-radius: 5px;
  background: var(--auth-accent);
  box-shadow: 0 8px 20px rgba(62, 123, 255, 0.22);
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-role-grid[data-selected-role="coach"]::before { transform: translateX(calc(-100% - 6px)); }

.auth-role-grid > button {
  position: relative;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 180ms ease, transform 140ms ease-out !important;
}

.auth-role-grid > button[aria-selected="true"] { color: #fff !important; }
.auth-role-grid > button:active { transform: scale(0.97); }

.auth-form-pane {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease-out, transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-form-pane.is-view-switching { opacity: 0.58; transform: translateY(5px); }

.auth-luxury-page #submitAuthBtn.is-auth-success {
  background: #1f6feb !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 14px 38px rgba(31,111,235,.32) !important;
}

.auth-luxury-page #submitAuthBtn.is-auth-success .material-symbols-outlined {
  animation: auth-success-mark 220ms cubic-bezier(.23,1,.32,1) both;
}

@keyframes auth-success-mark {
  from { opacity: .3; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

.auth-luxury-page #tabStudent,
.auth-luxury-page #tabCoach,
.auth-luxury-page #signupMethodPanel button {
  border-radius: 5px !important;
  color: #4b5d76;
}

.auth-luxury-page #roleBadge {
  display: block;
  width: max-content;
  margin: 16px auto 22px;
  border-color: rgba(62, 123, 255, 0.24);
  color: var(--auth-accent-deep);
  background: rgba(62, 123, 255, 0.1);
}

.auth-mode-toggle {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.auth-luxury-page #signupMethodPanel {
  margin-bottom: 20px;
}

.auth-luxury-page #unifiedAuthForm,
.auth-luxury-page #passwordResetPanel,
.auth-luxury-page #verificationPanel,
.auth-luxury-page #mfaPanel,
.auth-luxury-page #mfaRecoveryPanel,
.auth-luxury-page #googleAuthPanel {
  color: var(--auth-ink);
}

.auth-luxury-page input {
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  color: var(--auth-ink) !important;
  background: #edf2f7 !important;
  box-shadow: inset 0 0 0 1px transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.auth-luxury-page input::placeholder {
  color: #8795a9;
}

.auth-luxury-page input:focus {
  border-color: var(--auth-accent) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(62, 123, 255, 0.13);
}

.auth-luxury-page #submitAuthBtn,
.auth-luxury-page #verifyCodeButton,
.auth-luxury-page #verifyMfaButton,
.auth-luxury-page #passwordResetForm button[type="submit"] {
  border-radius: 6px !important;
  background: var(--auth-accent) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(62, 123, 255, 0.2);
}

.auth-luxury-page #forgotPasswordButton {
  color: var(--auth-accent-deep) !important;
}

.auth-luxury-page #passwordResetPanel,
.auth-luxury-page #verificationPanel,
.auth-luxury-page #mfaPanel,
.auth-luxury-page #mfaRecoveryPanel,
.auth-luxury-page #googleAuthPanel {
  border-color: var(--auth-line) !important;
}

.auth-luxury-page #googleAuthButton,
.auth-luxury-page #googleAuthButton > div,
.auth-luxury-page #googleAuthButton [role="button"] {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
}

.auth-luxury-page #googleAuthButton [role="button"] {
  position: relative !important;
  display: grid !important;
  overflow: hidden !important;
  place-items: center;
  border: 1px solid var(--auth-line) !important;
  border-radius: 5px;
  color: var(--auth-ink);
  background: #fff;
  cursor: pointer;
}

.auth-luxury-page #googleAuthButton [role="button"] > div:first-child {
  position: absolute !important;
  inset: 0 !important;
  height: auto !important;
}

.auth-luxury-page #googleAuthButton [role="button"] > div:nth-child(2) {
  position: relative !important;
  display: flex !important;
  height: 44px !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.auth-luxury-page #googleAuthButton [role="button"] > div:nth-child(2) > div {
  display: flex !important;
  height: 20px !important;
  align-items: center;
}

.auth-luxury-page #googleAuthButton [role="button"] svg {
  width: 20px !important;
  height: 20px !important;
}

.auth-luxury-page #googleAuthButton [role="button"] span {
  font-family: 'Vazirmatn', sans-serif !important;
  font-size: 13px !important;
  line-height: 1 !important;
}

.auth-luxury-page #googleAuthButton [role="button"] .L6cTce {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}

.auth-luxury-page .auth-form-pane .border-outline-muted\/30,
.auth-luxury-page .auth-form-pane .border-outline-muted\/15 {
  border-color: var(--auth-line) !important;
}

.auth-luxury-page .auth-form-pane .text-on-surface-variant {
  color: var(--auth-muted) !important;
}

.auth-luxury-page .auth-form-pane .text-white,
.auth-luxury-page .auth-form-pane .text-on-background {
  color: var(--auth-ink) !important;
}

.auth-luxury-page footer {
  display: none;
}

@media (max-width: 767px) {
  .auth-luxury-page .auth-header > div {
    min-height: 64px;
    padding: 10px 16px !important;
  }

  .auth-luxury-page .auth-header .mc-brand-mark {
    width: 40px;
    height: 40px;
  }

  .auth-luxury-page .auth-header a:last-child {
    min-height: 44px;
    padding: 0 12px;
    font-size: 12px;
  }

  .auth-main {
    display: block;
    padding: 74px 10px 24px;
  }

  .auth-stage {
    min-height: 0;
    overflow: visible;
  }

  .auth-form-pane,
  .auth-cover {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none !important;
  }

  .auth-cover {
    display: none;
  }

  .auth-cover-mark {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }

  .auth-cover h2 {
    font-size: 26px;
  }

  .auth-cover p {
    margin-bottom: 18px;
    line-height: 1.75;
  }

  .auth-cover-switch {
    min-height: 44px;
  }

  .auth-form-pane {
    min-height: 0;
    overflow: visible;
    padding: 28px 20px 30px;
  }

  .auth-form-heading {
    margin-bottom: 22px;
  }

  .auth-form-heading h1 {
    font-size: 30px;
  }

  .auth-form-heading p,
  .auth-luxury-page .auth-role-label,
  .auth-luxury-page form label,
  .auth-luxury-page #signupMethodPanel > span {
    font-size: 13px !important;
  }

  .auth-mode-toggle {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 18px 0 22px;
    padding: 4px !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    border: 1px solid var(--auth-line) !important;
    border-radius: 7px;
    background: #edf2f8;
  }

  .auth-mode-toggle > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: 100%;
  }

  .auth-mode-toggle button {
    min-height: 44px;
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 5px;
    font-size: 13px !important;
  }

  .auth-mode-toggle #roleBadge {
    display: none;
  }

  .auth-luxury-page input {
    min-height: 50px;
  }

  .auth-luxury-page #submitAuthBtn,
  .auth-luxury-page #verifyCodeButton,
  .auth-luxury-page #verifyMfaButton,
  .auth-luxury-page #passwordResetForm button[type="submit"] {
    min-height: 52px;
    font-size: 15px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-role-grid::before,
  .auth-form-pane { transition-duration: 120ms !important; }
  .auth-form-pane,
  .auth-cover {
    transition: opacity 180ms ease;
  }
}
