/* ==========================================================================
   سیتکا — صفحه ورود
   چیدمان دوستونه: پنل برند + فرم احراز هویت
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* ---------- پنل برند ---------- */

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 5vw, 76px);
  color: #fff;
  background:
    radial-gradient(ellipse at 80% 20%, #3479ff 0%, transparent 42%),
    radial-gradient(ellipse at 10% 85%, #233fb1 0%, transparent 42%),
    linear-gradient(145deg, #102657, #123b90 60%, #1762dc);
  isolation: isolate;
}

.brand-panel::before,
.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  pointer-events: none;
}

.brand-panel::before {
  width: 600px;
  height: 600px;
  top: 15%;
  right: -180px;
  box-shadow:
    0 0 0 45px rgba(255, 255, 255, .025),
    0 0 0 95px rgba(255, 255, 255, .025);
}

.brand-panel::after {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -130px;
  box-shadow: 0 0 0 35px rgba(255, 255, 255, .035);
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 50px auto;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, .19);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
  color: #e2ebff;
  font-size: 12px;
  margin-bottom: 28px;
}

.status-dot {
  width: 7px;
  height: 7px;
  background: #6cf3bb;
  border-radius: 50%;
  box-shadow: 0 0 12px #6cf3bb;
}

.brand-content h1 {
  font-size: clamp(32px, 3.4vw, 51px);
  line-height: 1.7;
  font-weight: 800;
  letter-spacing: -1.3px;
}

.brand-content h1 span {
  color: #a9c8ff;
}

.brand-description {
  font-size: 14px;
  line-height: 2.4;
  color: rgba(255, 255, 255, .74);
  max-width: 430px;
  margin-top: 18px;
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 35px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 15px 13px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .11);
  transition: background .25s, transform .25s;
}

.feature:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateY(-2px);
}

.feature-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  border-radius: var(--radius-sm);
}

.feature-icon svg {
  width: 19px;
  height: 19px;
}

.feature strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.feature small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  color: rgba(255, 255, 255, .61);
}

.brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .65);
  font-size: 11px;
}

.secure-label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.secure-label svg {
  width: 15px;
  height: 15px;
}

/* ---------- پنل ورود ---------- */

.login-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 75px);
  position: relative;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(64, 119, 255, .06), transparent 42%),
    var(--brand-background);
}

.login-content {
  width: 100%;
  max-width: 420px;
  animation: appear .65s ease both;
}

.mobile-brand {
  display: none;
}

.welcome {
  margin-bottom: 33px;
}

.welcome h2 {
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--brand-ink);
}

.welcome p {
  margin-top: 11px;
  color: var(--brand-muted);
  font-size: 13px;
  line-height: 2;
}

.form-group {
  margin-bottom: 21px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #283957;
}

.field {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
  background: #fff;
  border: 1px solid #e1e7f2;
  border-radius: var(--radius-md);
  transition: border-color .2s, box-shadow .2s;
}

.field:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(40, 100, 240, .09);
}

.field.has-error {
  border-color: var(--brand-danger);
  box-shadow: 0 0 0 4px rgba(220, 53, 69, .08);
}

.field-icon {
  width: 20px;
  height: 20px;
  margin-right: 16px;
  flex: 0 0 20px;
  color: #8b9ab3;
}

.field input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 12px;
  color: #1c2e4d;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 13px;
}

.field input::placeholder {
  color: #a6b0c1;
  font-size: 12px;
}

.field input:focus-visible {
  outline: none;
}

.toggle-password {
  border: 0;
  background: transparent;
  color: #8b9ab3;
  cursor: pointer;
  padding: 10px 13px;
  display: grid;
  place-items: center;
}

.toggle-password:hover {
  color: var(--brand-primary);
}

.toggle-password svg {
  width: 19px;
  height: 19px;
}

.field-error {
  display: none;
  font-size: 11px;
  color: var(--brand-danger);
  margin-top: 7px;
}

.field-error.is-visible {
  display: block;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 3px 0 27px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64728b;
  font-size: 11px;
  cursor: pointer;
}

.remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}

.text-link {
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.text-link:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.login-button {
  width: 100%;
  height: 55px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(110deg, #3478ff, #2057df);
  box-shadow: var(--shadow-brand);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand-strong);
  filter: brightness(1.04);
}

.login-button:active {
  transform: translateY(0);
}

.login-button svg {
  width: 19px;
  height: 19px;
}

.login-button:disabled {
  opacity: .7;
  cursor: wait;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 30px 0 23px;
  color: #9ba6b8;
  font-size: 10px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e5eaf3;
}

.support-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 15px;
  background: rgba(255, 255, 255, .65);
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, background .2s;
}

.support-card:hover {
  border-color: #cfdcf7;
  background: #fff;
}

.support-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
  flex: 0 0 39px;
}

.support-icon svg {
  width: 21px;
  height: 21px;
}

.support-copy {
  flex: 1;
  min-width: 0;
}

.support-copy strong {
  display: block;
  font-size: 11px;
}

.support-copy p {
  color: var(--brand-muted);
  font-size: 10px;
  margin-top: 5px;
  line-height: 1.8;
}

.support-arrow {
  color: #94a3bc;
  width: 16px;
  height: 16px;
}

.login-footer {
  position: absolute;
  bottom: 22px;
  left: 24px;
  right: 24px;
  text-align: center;
  font-size: 10px;
  color: #a1acbf;
}

.login-footer strong {
  color: #64738c;
  font-weight: 600;
}

/* ---------- واکنش‌گرایی ---------- */

@media (max-width: 1000px) {
  .auth-page {
    grid-template-columns: .85fr 1.15fr;
  }

  .brand-panel {
    padding: 30px;
  }

  .login-panel {
    padding: 35px;
  }

  .brand-content h1 {
    font-size: 35px;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 12px;
  }
}

@media (max-width: 700px) {
  .auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .brand-panel {
    display: none;
  }

  .login-panel {
    flex: 1;
    justify-content: flex-start;
    padding: 28px 22px 72px;
  }

  .login-content {
    max-width: 430px;
    margin: auto 0;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 37px;
  }

  .mobile-brand .brand-mark {
    background: linear-gradient(140deg, #3478ff, #1e50d2);
    border: 0;
    box-shadow: 0 7px 18px rgba(40, 100, 240, .19);
  }

  .mobile-brand .brand-name {
    font-size: 23px;
    color: #18305a;
  }

  .mobile-brand .brand-caption {
    color: #7c8aa3;
  }

  .welcome {
    margin-bottom: 27px;
  }

  .welcome h2 {
    font-size: 26px;
  }

  .login-footer {
    bottom: 17px;
  }
}

@media (max-width: 360px) {
  .login-panel {
    padding: 22px 16px 65px;
  }

  .form-options {
    align-items: flex-start;
  }

  .welcome h2 {
    font-size: 23px;
  }
}
