/* Login — split: brand col (image + footer) | full login panel */

html.auth-login-page,
html.auth-login-page body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.auth-login {
  --teal: #004d56;
  --teal-deep: #003a41;
  --teal-btn: #005a64;
  --gold: #c9a45c;
  --gold-light: #dfc98a;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #dde3ea;
  --foot-h: 92px;

  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
.auth-login *,
.auth-login *::before,
.auth-login *::after {
  box-sizing: border-box;
}

/* ── Main split — always brand left, login right ── */
.auth-login__shell {
  height: 100%;
  display: flex;
  flex-direction: row;
  direction: ltr;
  overflow: hidden;
}
[dir="rtl"] .auth-login__brand-col,
[dir="rtl"] .auth-login__form-side {
  direction: rtl;
}

/* Left column: hero + footer (same width) */
.auth-login__brand-col {
  flex: 0 0 54%;
  max-width: 54%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Hero image area */
.auth-login__hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: var(--teal-deep);
  overflow: hidden;
}
.auth-login__hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.auth-login__hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0, 58, 65, 0.88) 0%,
    rgba(0, 77, 86, 0.72) 50%,
    rgba(0, 77, 86, 0.5) 100%
  );
}
.auth-login__hero-body {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 2.5vh, 28px) clamp(24px, 3.5vw, 44px);
}

/* Top row on image: logo + lang/help */
.auth-login__hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  margin-bottom: clamp(8px, 1.5vh, 16px);
  direction: ltr;
}
[dir="rtl"] .auth-login__brand {
  direction: rtl;
}
.auth-login__hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.auth-login__pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.auth-login__pill--hero {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-login__pill--hero:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.auth-login__pill--hero i {
  color: var(--gold-light);
  font-size: 13px;
}
.auth-login__pill[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.auth-login__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.auth-login__brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(255, 255, 255, 0.1);
  object-fit: contain;
  padding: 7px;
  flex-shrink: 0;
}
.auth-login__brand-mark--text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}
.auth-login__brand-copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
}
.auth-login__brand-copy span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold-light);
}

.auth-login__hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(12px, 2vh, 28px) 0;
  max-width: 520px;
}
.auth-login__hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 800;
  line-height: 1.5;
  color: #fff;
}
.auth-login__hero-text {
  margin: 0 0 22px;
  font-size: clamp(13px, 1.3vw, 14px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
}

.auth-login__highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.auth-login__highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.auth-login__highlights i {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 164, 92, 0.25);
  color: var(--gold-light);
  font-size: 13px;
  flex-shrink: 0;
}
.auth-login__highlights span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
}

/* Footer — only under brand column */
.auth-login__foot {
  flex: 0 0 var(--foot-h);
  background: var(--teal);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 2px solid rgba(201, 164, 92, 0.3);
}
.auth-login__foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 10px clamp(16px, 3vw, 36px) 4px;
}
.auth-login__foot-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.auth-login__foot-ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 14px;
  flex-shrink: 0;
}
.auth-login__foot-item b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 1px;
  white-space: nowrap;
}
.auth-login__foot-item small,
.auth-login__foot-item a {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-login__foot-item a:hover {
  color: #fff;
  text-decoration: underline;
}
.auth-login__copy {
  margin: 0;
  padding: 4px 16px 8px;
  text-align: center;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
}

/* Right column — full-height login panel */
.auth-login__form-side {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-inline-start: 1px solid #e8edf2;
  padding: clamp(20px, 4vh, 48px) clamp(32px, 5vw, 64px);
  overflow-y: auto;
}
.auth-login__form-wrap {
  width: min(100%, 400px);
  max-width: 100%;
  min-width: 0;
  padding: 0;
}
.auth-login__form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.auth-login__form-head {
  text-align: center;
  margin-bottom: 24px;
}
.auth-login__user-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 26px;
  background: #fff;
}
.auth-login__form-head h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--teal);
}
.auth-login__form-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.auth-login__flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.45;
}
.auth-login__flash--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.auth-login__flash--ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.auth-login__group {
  margin-bottom: 18px;
}
.auth-login__group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}
.auth-login__control {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  min-height: 48px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  direction: ltr;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-login__control--password {
  grid-template-columns: 42px 1fr 42px;
}
.auth-login__control:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 77, 86, 0.1);
}
.auth-login__control-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  color: #94a3b8;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}
.auth-login__control input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  box-shadow: none;
}
.auth-login__control--password input {
  padding: 0 4px;
}
.auth-login__input--ltr {
  direction: ltr;
  text-align: left;
}
.auth-login__toggle-pw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.auth-login__toggle-pw:hover {
  color: var(--teal);
  background: rgba(0, 77, 86, 0.06);
}
.auth-login__control input::placeholder {
  color: #94a3b8;
  text-align: left;
}
.auth-login__control input:focus {
  outline: none;
  box-shadow: none;
}
.auth-login__control input:-webkit-autofill,
.auth-login__control input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-login__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 22px;
  font-size: 13px;
}
.auth-login__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}
.auth-login__check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}
.auth-login__meta > a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
}
.auth-login__meta > a:hover {
  color: var(--teal);
}

.auth-login__btn {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--teal-btn);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s, transform 0.1s;
}
.auth-login__btn:hover {
  background: var(--teal);
}
.auth-login__btn:active {
  transform: translateY(1px);
}

.auth-login__apk {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid var(--teal);
  border-radius: 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.auth-login__note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.auth-login__sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
  color: #94a3b8;
  font-size: 12px;
}
.auth-login__sep::before,
.auth-login__sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-login__oauth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  max-width: 100%;
}
.auth-login__oauth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-login__register {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-login__register a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: none;
  margin-inline-start: 4px;
}
.auth-login__register a:hover {
  text-decoration: underline;
}

/* ── Compact screens ── */
@media (max-height: 760px) {
  .auth-login {
    --foot-h: 80px;
  }
  .auth-login__user-icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
    margin-bottom: 12px;
  }
  .auth-login__group {
    margin-bottom: 14px;
  }
  .auth-login__control {
    min-height: 44px;
  }
  .auth-login__control input {
    height: 44px;
  }
  .auth-login__toggle-pw {
    height: 44px;
  }
  .auth-login__btn {
    height: 46px;
  }
  .auth-login__hero-text {
    margin-bottom: 14px;
  }
  .auth-login__highlights li {
    padding: 7px 9px;
  }
}

@media (max-height: 640px) {
  .auth-login__highlights {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .auth-login__highlights span {
    font-size: 10px;
  }
}

/* ── Mobile ── */
@media (max-width: 900px) {
  html.auth-login-page,
  html.auth-login-page body {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  .auth-login {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  .auth-login__shell {
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* Login first on mobile */
  .auth-login__form-side {
    order: 1;
    flex: none;
    width: 100%;
    max-width: 100%;
    border-inline-start: 0;
    border-bottom: 1px solid #e8edf2;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: 28px;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    align-items: stretch;
    justify-content: flex-start;
    overflow-x: hidden;
  }

  .auth-login__form-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .auth-login__brand-col {
    order: 2;
    flex: none;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
  }

  .auth-login__hero {
    flex: none;
    min-height: 280px;
    max-height: none;
  }

  .auth-login__hero-body {
    padding: 20px;
  }

  .auth-login__hero-content {
    padding: 8px 0 0;
  }

  .auth-login__hero-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .auth-login__hero-text {
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.65;
  }

  .auth-login__foot {
    flex: none;
  }

  .auth-login__foot-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 20px 4px;
  }

  .auth-login__foot-item {
    padding: 4px 0;
  }
}

@media (max-width: 480px) {
  .auth-login__form-side {
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    padding-bottom: 24px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .auth-login__form-head {
    margin-bottom: 18px;
  }

  .auth-login__form-head h1 {
    font-size: 1.2rem;
  }

  .auth-login__user-icon {
    width: 56px;
    height: 56px;
    font-size: 22px;
    margin-bottom: 12px;
  }

  .auth-login__group {
    margin-bottom: 14px;
  }

  .auth-login__meta {
    margin-bottom: 18px;
    font-size: 12px;
  }

  .auth-login__btn {
    height: 48px;
    font-size: 14px;
  }

  .auth-login__hero {
    min-height: 240px;
  }

  .auth-login__hero-top {
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
  }

  .auth-login__brand-mark {
    width: 44px;
    height: 44px;
    padding: 5px;
  }

  .auth-login__brand-copy strong {
    font-size: 0.88rem;
  }

  .auth-login__brand-copy span {
    font-size: 11px;
  }

  .auth-login__hero-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .auth-login__pill--hero {
    padding: 6px 11px;
    font-size: 11px;
  }

  .auth-login__hero-title {
    font-size: 1.05rem;
  }

  .auth-login__hero-text {
    display: none;
  }

  .auth-login__highlights {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .auth-login__highlights li {
    padding: 7px 8px;
  }

  .auth-login__highlights span {
    font-size: 11px;
  }

  .auth-login__foot-grid {
    padding: 10px 16px 4px;
  }

  .auth-login__foot-ico {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .auth-login__oauth {
    grid-template-columns: 1fr;
  }
}
