[x-cloak] {
  display: none !important;
}

:root {
  --payamito-ink: #17202a;
  --payamito-muted: #667085;
  --payamito-line: #d9e1e8;
  --payamito-paper: #f4f7f8;
  --payamito-accent: #0f766e;
  --payamito-accent-dark: #115e59;
  --payamito-shadow: 0 24px 70px rgba(23, 32, 42, 0.12);
}

.payamito-login-widget,
.page-container {
  direction: rtl;
  color: var(--payamito-ink);
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}

.page-container {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  min-height: 100vh;
  background: var(--payamito-paper);
}

.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: clamp(2rem, 6vw, 6rem);
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: linear-gradient(145deg, #123b3b 0%, #0f766e 58%, #e76f51 170%);
}

.hero-section::before,
.hero-section::after {
  position: absolute;
  content: '';
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}
.hero-section::before {
  width: 32rem;
  height: 32rem;
  inset: -13rem auto auto -12rem;
}
.hero-section::after {
  width: 19rem;
  height: 19rem;
  inset: auto -8rem 10%;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 31rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.05rem;
  font-weight: 700;
}
.logo-icon {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}
.hero-main {
  margin: 5rem 0 3rem;
}
.hero-title {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.08;
}
.hero-description {
  max-width: 25rem;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.9;
}
.back-to-home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.75rem;
  color: #fff;
  text-decoration: none;
  transition:
    background 180ms ease,
    transform 180ms ease;
}
.back-to-home:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}
.back-icon,
.arrow-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-section {
  display: grid;
  min-width: 0;
  min-height: 100%;
  padding: clamp(1rem, 4vw, 4.5rem);
  place-items: center;
  background: radial-gradient(circle at 10% 10%, #fff 0, var(--payamito-paper) 52%);
}
.app-container {
  width: min(100%, 31rem);
}
.auth-card {
  width: 100%;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid rgba(217, 225, 232, 0.9);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--payamito-shadow);
  backdrop-filter: blur(16px);
}
.auth-header {
  margin-bottom: 2.25rem;
}
.auth-title {
  margin: 0 0 0.6rem;
  color: var(--payamito-ink);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 800;
  line-height: 1.3;
}
.auth-description {
  margin: 0;
  color: var(--payamito-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}
.input-group {
  margin-bottom: 1.25rem;
}
.input-label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--payamito-ink);
  font-size: 0.88rem;
  font-weight: 700;
}
.input-wrapper {
  position: relative;
}
.form-input {
  width: 100%;
  min-height: 3.35rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--payamito-line);
  border-radius: 0.75rem;
  outline: none;
  color: var(--payamito-ink);
  background: #fbfcfd;
  font: inherit;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}
.form-input:focus {
  border-color: var(--payamito-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.input-icon {
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--payamito-muted);
  pointer-events: none;
  transform: translateY(-50%);
}
.input-wrapper .form-input {
  padding-right: 3rem;
}
.password-input {
  padding-left: 3.2rem !important;
}
.password-toggle {
  position: absolute;
  top: 50%;
  left: 0.55rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  cursor: pointer;
  place-items: center;
  background: transparent;
  transform: translateY(-50%);
}
.password-toggle:hover {
  background: #eef4f4;
}
.eye-icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--payamito-muted);
}
.otp-input {
  padding-right: 1rem !important;
  text-align: center;
  direction: ltr;
  font-family: Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.45rem;
}
.button-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.submit-button,
.secondary-button {
  min-height: 3.35rem;
  border-radius: 0.75rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}
.submit-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border: 0;
  color: #fff;
  background: var(--payamito-accent);
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.2);
}
.submit-button:hover:not(:disabled) {
  background: var(--payamito-accent-dark);
  transform: translateY(-2px);
}
.secondary-button {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--payamito-line);
  color: var(--payamito-ink);
  background: #fff;
}
.secondary-button:hover:not(:disabled) {
  border-color: var(--payamito-accent);
  color: var(--payamito-accent-dark);
  transform: translateY(-2px);
}
.submit-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: payamito-spin 700ms linear infinite;
}
@keyframes payamito-spin {
  to {
    transform: rotate(360deg);
  }
}
.error-message {
  margin-top: 0.6rem;
  color: #c2410c;
  font-size: 0.83rem;
  font-weight: 600;
}

.toast-container {
  position: fixed;
  z-index: 1000;
  top: 1rem;
  right: 1rem;
  display: flex;
  width: min(24rem, calc(100vw - 2rem));
  flex-direction: column;
  gap: 0.7rem;
  pointer-events: none;
}
.toast {
  position: relative;
  padding: 1rem 1.15rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 0.85rem;
  color: #fff;
  box-shadow: 0 14px 36px rgba(23, 32, 42, 0.18);
  pointer-events: auto;
}
.toast-success {
  background: #15803d;
}
.toast-error {
  background: #b91c1c;
}
.toast-info {
  background: #155e75;
}
.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding-left: 1.8rem;
}
.toast-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 auto;
}
.toast-icon svg {
  width: 100%;
  height: 100%;
}
.toast-text {
  min-width: 0;
  flex: 1;
}
.toast-title {
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
  font-weight: 800;
}
.toast-description {
  font-size: 0.82rem;
  line-height: 1.6;
  opacity: 0.9;
}
.toast-close {
  position: absolute;
  top: 0.7rem;
  left: 0.65rem;
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  opacity: 0.75;
}
.toast-close svg {
  width: 1rem;
  height: 1rem;
}
.toast-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.2rem;
  background: rgba(255, 255, 255, 0.35);
}
.form-step-enter-active,
.form-step-leave-active,
.toast-enter-active,
.toast-leave-active {
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}
.form-step-enter-from,
.form-step-leave-to,
.toast-enter-start,
.toast-leave-end {
  opacity: 0;
  transform: translateY(8px);
}

@media (max-width: 760px) {
  .page-container {
    display: block;
  }
  .hero-section {
    min-height: auto;
    padding: 2.5rem 1.5rem;
  }
  .hero-main {
    margin: 2.5rem 0 2rem;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .auth-section {
    min-height: auto;
    padding: 1.25rem;
  }
  .auth-card {
    border-radius: 1rem;
  }
}
