/* Sign-in right panel — method tabs & alternate login (auth-left unchanged) */

.auth-right {
  overflow-y: auto;
}

.signin-wrap {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.signin-wrap > h2 {
  margin-bottom: 8px;
}

.signin-wrap > p.signin-lead {
  color: #64748b;
  font-size: 0.92rem;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ---- Method tabs with sliding pill ---- */
.signin-methods {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  background: #eef2f7;
  border-radius: 14px;
  margin-bottom: 16px;
  isolation: isolate;
}

.signin-tab-indicator {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc((100% - 10px - 12px) / 3);
  height: calc(100% - 10px);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(36, 107, 206, 0.12), 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  pointer-events: none;
}

.signin-wrap .remember-row {
  margin: 0 0 20px;
}

.signin-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.signin-tab i {
  font-size: 0.9rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.signin-tab.active {
  color: #1e293b;
  box-shadow: none;
}

.signin-tab.active i {
  transform: scale(1.12);
}

.signin-tab:hover:not(.active) {
  color: #334155;
}

.signin-tab:active {
  transform: scale(0.97);
}

/* ---- Stacked panels with crossfade ---- */
.signin-panels {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.signin-panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.98);
  filter: blur(4px);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.42s,
    filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  will-change: opacity, transform, filter;
}

.signin-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
  z-index: 1;
}

.signin-panel.active .signin-stagger {
  animation: signinStaggerIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signin-panel.active .signin-stagger:nth-child(1) { animation-delay: 0.04s; }
.signin-panel.active .signin-stagger:nth-child(2) { animation-delay: 0.1s; }
.signin-panel.active .signin-stagger:nth-child(3) { animation-delay: 0.16s; }
.signin-panel.active .signin-stagger:nth-child(4) { animation-delay: 0.22s; }
.signin-panel.active .signin-stagger:nth-child(5) { animation-delay: 0.28s; }

@keyframes signinStaggerIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.signin-hint {
  margin-top: 14px;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
}

.google-btn-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.google-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
  transform: translateY(-2px);
}

#googleButtonContainer {
  display: flex;
  justify-content: center;
  min-height: 44px;
  transition: opacity 0.35s ease;
}

.signin-field {
  margin-bottom: 14px;
}

.signin-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 6px;
  transition: color 0.25s ease;
}

.signin-field:focus-within label {
  color: #246bce;
}

.signin-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.signin-input:focus {
  outline: none;
  border-color: #246bce;
  box-shadow: 0 0 0 4px rgba(36, 107, 206, 0.12);
  transform: translateY(-1px);
}

.signin-input::placeholder {
  color: #94a3b8;
  transition: opacity 0.2s ease;
}

.signin-input:focus::placeholder {
  opacity: 0.55;
}

.signin-field .password-field input.signin-input {
  padding-right: 46px;
}

.signin-field .password-toggle {
  right: 6px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.signin-field .password-toggle.is-visible {
  color: #246bce;
}

.otp-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
}

/* ---- Phone OTP step transition ---- */
.phone-flow {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 180px;
}

.phone-step-1,
.phone-step-2 {
  grid-area: 1 / 1;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s;
}

.phone-step-1 {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.phone-step-1.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-28px);
  pointer-events: none;
}

.phone-step-2 {
  opacity: 0;
  visibility: hidden;
  transform: translateX(28px);
  pointer-events: none;
}

.phone-step-2.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.phone-sent-note {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  animation: signinNotePop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes signinNotePop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.phone-sent-note strong {
  color: #0369a1;
}

.signin-link-btn {
  background: none;
  border: none;
  color: #246bce;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 10px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.signin-link-btn:hover {
  text-decoration: underline;
  transform: translateX(2px);
}

.signin-actions {
  margin-top: 6px;
}

.signin-actions .submit-btn {
  margin-top: 4px;
}

/* ---- Feedback message ---- */
.signin-wrap .message {
  border-radius: 10px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0 12px;
  transform: translateY(-6px);
  transition:
    max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease,
    margin 0.35s ease,
    padding 0.35s ease,
    transform 0.35s ease;
}

.signin-wrap .message.is-visible {
  max-height: 120px;
  opacity: 1;
  margin: 0 0 16px;
  padding: 12px 14px;
  transform: translateY(0);
}

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

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

@media (prefers-reduced-motion: reduce) {
  .signin-tab-indicator,
  .signin-panel,
  .signin-tab,
  .signin-tab i,
  .signin-input,
  .phone-step-1,
  .phone-step-2,
  .signin-wrap .message,
  .signin-panel.active .signin-stagger {
    transition: none;
    animation: none;
    filter: none;
  }

  .signin-panel {
    transform: none;
  }

  .signin-panel.active .signin-stagger {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .signin-tab {
    font-size: 0.75rem;
    padding: 9px 6px;
  }

  .signin-tab span.tab-label {
    display: none;
  }
}
