@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --auth-navy: #0b3d82;
  --auth-blue: #1267d7;
  --auth-blue-deep: #0754bd;
  --auth-green: #36c58a;
  --auth-ink: #163e77;
  --auth-muted: #7890ad;
  --auth-line: #d9e4f1;
  --auth-white: #ffffff;
  --auth-soft: #f6faff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Vazirmatn, Tahoma, Arial, sans-serif;
}

body.auth-page {
  color: var(--auth-ink);
  background-color: #f4f8fd;
  background-image:
    radial-gradient(circle at 12% 88%, rgba(28, 111, 220, 0.12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(54, 197, 138, 0.08), transparent 22%),
    url('auth-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

a {
  text-decoration: none;
  color: inherit;
}

.auth-shell {
  min-height: 100vh;
  padding: 28px 5.5vw 24px;
  overflow: hidden;
  position: relative;
}

.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 252, 255, 0.72) 0%, rgba(238, 246, 255, 0.55) 48%, rgba(255, 255, 255, 0.78) 100%);
  pointer-events: none;
  z-index: 0;
}

.auth-topbar,
.auth-hero,
.auth-footer {
  position: relative;
  z-index: 1;
}

.auth-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 12px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand-mark {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-brand-name {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: #0b397d;
  line-height: 1.1;
}

.auth-brand-subtitle {
  font-size: 13px;
  color: #587aa2;
  margin-top: 4px;
}

.auth-top-message {
  font-size: 17px;
  color: #4f6f98;
  text-align: right;
  padding-top: 8px;
  max-width: 360px;
}

.auth-message-line {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 10px;
}

.auth-message-line i {
  display: block;
  width: 38px;
  height: 3px;
  border-radius: 10px;
  background: #1974dc;
}

.auth-message-line i:last-child {
  width: 22px;
  background: #45c98d;
}

.auth-hero {
  min-height: calc(100vh - 160px);
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(400px, 500px);
  align-items: center;
  gap: 4vw;
  max-width: 1400px;
  margin: 0 auto;
}

.auth-visual {
  min-height: 560px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.auth-visual-glow {
  position: absolute;
  inset: 8% -10% 4% -12%;
  background:
    radial-gradient(circle at 50% 70%, rgba(74, 160, 255, 0.18), transparent 55%),
    linear-gradient(145deg, rgba(205, 229, 255, 0.55), rgba(255, 255, 255, 0.05));
  border-radius: 52% 48% 55% 45%;
  transform: rotate(-8deg);
  z-index: -2;
  filter: blur(2px);
}

.auth-visual-scene {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-visual-hero {
  width: 78%;
  max-width: 420px;
  height: auto;
  display: block;
  border-radius: 28px;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 28px 40px rgba(16, 76, 150, 0.18));
  animation: auth-float 5.5s ease-in-out infinite;
}

.auth-orbit {
  position: absolute;
  border: 1.5px solid rgba(28, 120, 225, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.auth-orbit-1 {
  width: 92%;
  height: 62%;
  transform: rotate(-17deg);
}

.auth-orbit-2 {
  width: 108%;
  height: 48%;
  transform: rotate(19deg);
  border-color: rgba(54, 197, 138, 0.22);
}

.auth-float-icon {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbe7f3;
  box-shadow: 0 10px 28px rgba(44, 94, 150, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 3;
  animation: auth-float 4.8s ease-in-out infinite;
}

.auth-float-icon img {
  width: 30px;
  height: 30px;
}

.auth-float-icon--union {
  top: 8%;
  left: 42%;
  animation-delay: 0.2s;
}

.auth-float-icon--worker {
  top: 28%;
  left: 4%;
  animation-delay: 0.6s;
}

.auth-float-icon--employer {
  top: 30%;
  right: 2%;
  animation-delay: 1s;
}

.auth-float-icon--security {
  right: 8%;
  bottom: 18%;
  width: 64px;
  height: 64px;
  animation-delay: 1.4s;
}

.auth-float-icon--security img {
  width: 34px;
  height: 34px;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.auth-card-wrap {
  width: 100%;
}

.auth-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 231, 243, 0.95);
  border-radius: 28px;
  padding: 32px 34px 22px;
  box-shadow: 0 28px 70px rgba(28, 77, 130, 0.14);
  backdrop-filter: blur(14px);
}

.auth-card-badge {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #eef5fc;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(18, 86, 166, 0.12);
}

.auth-card-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-card-title {
  text-align: center;
  margin: 0;
  color: #0c3d80;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.55;
}

.auth-card-subtitle {
  text-align: center;
  margin: 8px 0 22px;
  color: #8ba0b8;
  font-size: 13px;
  font-weight: 500;
}

.auth-field {
  display: block;
  margin-bottom: 14px;
}

.auth-field > span,
.auth-field > label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #557595;
  margin: 0 3px 7px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input,
.auth-input-wrap .form-control {
  width: 100%;
  height: 56px;
  border: 1px solid var(--auth-line);
  border-radius: 15px;
  outline: 0;
  background: #fbfdff;
  padding: 0 48px 0 16px;
  font: 500 15px Vazirmatn, Tahoma, sans-serif;
  color: #254d78;
  transition: 0.2s;
  box-shadow: none !important;
}

.auth-input-wrap input:focus,
.auth-input-wrap .form-control:focus {
  border-color: #4b93e5;
  box-shadow: 0 0 0 4px rgba(18, 103, 215, 0.08) !important;
  background: #fff;
}

.auth-input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0.9;
}

.auth-input-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 14px;
  color: #557595;
  font-size: 13px;
  font-weight: 600;
}

.auth-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-blue);
}

.auth-btn {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(135deg, #1474e1, #0752ba);
  color: #fff !important;
  font: 800 15px Vazirmatn, Tahoma, sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 13px 25px rgba(9, 88, 185, 0.2);
  transition: 0.2s;
  text-decoration: none;
}

.auth-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 17px 30px rgba(9, 88, 185, 0.25);
  color: #fff !important;
}

.auth-btn img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.auth-btn--ghost {
  background: #fff;
  color: var(--auth-blue) !important;
  border: 1px solid var(--auth-line);
  box-shadow: none;
  margin-top: 10px;
}

.auth-btn--ghost:hover {
  background: #f5f9ff;
  color: var(--auth-blue-deep) !important;
}

.auth-btn--ghost img {
  filter: none;
}

.auth-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.auth-link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 700;
}

.auth-link-row a {
  color: var(--auth-blue);
}

.auth-link-row a:hover {
  color: var(--auth-blue-deep);
}

.auth-divider {
  height: 1px;
  background: #e9eff5;
  margin: 22px 0 16px;
}

.auth-guide-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: var(--auth-blue);
  font-size: 14px;
  font-weight: 700;
}

.auth-guide-link img {
  width: 22px;
  height: 22px;
}

.auth-guide-link:hover {
  color: var(--auth-blue-deep);
}

.auth-alert {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.7;
}

.auth-alert--info {
  background: #eef6ff;
  color: #1d5ca7;
  border: 1px solid #d3e5fa;
}

.auth-alert--success {
  background: #eefbf4;
  color: #1c8a5a;
  border: 1px solid #cfeedd;
}

.auth-alert--danger,
.auth-errors {
  background: #fff1f1;
  color: #a23a3a;
  border: 1px solid #f1caca;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  margin-bottom: 14px;
}

.auth-errors p {
  margin: 0 0 4px;
}

.auth-errors p:last-child {
  margin-bottom: 0;
}

.auth-countdown {
  margin-top: 10px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #8096ad;
  font-size: 12px;
  padding-top: 18px;
}

.auth-footer-sep {
  width: 1px;
  height: 14px;
  background: #cbd9e7;
}

.auth-card .form-group {
  margin-bottom: 14px;
}

.auth-card .form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #557595;
  margin: 0 3px 7px;
}

.auth-card .crispy,
.auth-card .asteriskField {
  color: #a23a3a;
}

@media (max-width: 1050px) {
  .auth-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0 0;
  }

  .auth-visual {
    display: none;
  }

  .auth-card {
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
  }

  .auth-top-message {
    display: none;
  }
}

@media (max-width: 600px) {
  .auth-shell {
    padding: 18px 15px 20px;
  }

  .auth-brand-name {
    font-size: 22px;
  }

  .auth-brand-mark {
    width: 46px;
    height: 46px;
  }

  .auth-brand-subtitle {
    font-size: 11px;
  }

  .auth-card {
    padding: 24px 16px 18px;
    border-radius: 22px;
  }

  .auth-card-title {
    font-size: 18px;
  }

  .auth-footer {
    font-size: 10px;
  }
}
