/* ELLSMS sign-in: a light, quiet surface using the panel brand and local Vazirmatn.
   The feature slider in the card's end half has its own stylesheet, login-slider.css. */

.auth {
  --a-ink:    #10131c;
  --a-soft:   #454b5a;
  --a-faint:  #4d5363;
  --a-brand:  #4a32e8;
  --a-brand-hover: #3e28d0;
  --a-err:    #a3182b;
  --a-err-bg: rgba(255, 226, 230, .75);

  --a-glass:        #fff;
  --a-glass-strong: rgba(255, 255, 255, .72);
  --a-glass-edge:   #e5e9f2;
  --a-field:        rgba(255, 255, 255, .78);
  --a-field-edge:   rgba(16, 19, 28, .12);
  --a-field-hover:  rgba(255, 255, 255, .9);
  --a-field-focus:  #fff;
  --a-solid:        #fff;
  --a-tint:         rgba(16, 19, 28, .07);
  --a-shadow:       24, 35, 69;
  /* Quiet brand tints keep text readable and avoid continuous large repaints. */
  --a-base:  #f5f7fb;
  --a-blob1: rgba(74, 50, 232, .09);
  --a-blob2: rgba(46, 99, 246, .07);
  --a-blob3: transparent;
  --a-blob4: transparent;
  --a-on-night:      #0b1023;
  --a-on-night-soft: #59647c;

  --a-font: 'Vazirmatn', Tahoma, sans-serif;
  --a-fs-xs:   13px;
  --a-fs-base: 14px;
  --a-fs-md:   16px;
  --a-fs-lg:   19px;
  --a-fs-xl:   clamp(24px, 2.1vw, 30px);

  --a-radius: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  margin: 0;
  min-height: 100svh;
  background: var(--a-base);
  color: var(--a-ink);
  font-family: var(--a-font);
  font-size: var(--a-fs-md);
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.auth *, .auth input, .auth button { font-family: var(--a-font); letter-spacing: 0; }
.auth a { color: var(--a-ink); text-decoration: underline; text-decoration-color: var(--a-soft); text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .15s ease; }
.auth a:hover { text-decoration-color: var(--a-ink); }
.auth :focus-visible { outline: 2px solid var(--a-brand); outline-offset: 3px; }

/* ---------- The colour field ---------- */
.auth-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: var(--a-base);
}
.auth-bg i {
  position: absolute; display: block; border-radius: 50%;

}
.auth-bg .b1 { width: 64vmax; height: 64vmax; top: -20vmax; right: -14vmax; background: radial-gradient(closest-side, var(--a-blob1), transparent); }
.auth-bg .b2 { width: 58vmax; height: 58vmax; bottom: -22vmax; left: -12vmax; background: radial-gradient(closest-side, var(--a-blob2), transparent); }
.auth-bg .b3 { width: 46vmax; height: 46vmax; top: 6%; left: 18%; background: radial-gradient(closest-side, var(--a-blob3), transparent); }
.auth-bg .b4 { width: 36vmax; height: 36vmax; bottom: -8vmax; right: 14%; background: radial-gradient(closest-side, var(--a-blob4), transparent); }
/* ---------- Shell ---------- */
.auth-shell {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto; gap: 24px;
  width: min(1040px, 100% - 32px); margin-inline: auto;
  padding-block: clamp(16px, 3vw, 32px);
}
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none !important; }
/* Full DATIS wordmark — the SVG carries its own entrance + breathing triangle animation. */
.auth-logo { display: block; height: 64px; width: auto; }
@keyframes mark-typing { 0%, 60%, 100% { opacity: 1; } 30% { opacity: .35; } }
.auth-toplink { font-size: var(--a-fs-base); }
.auth-bottom { text-align: center; font-size: var(--a-fs-xs); color: var(--a-on-night-soft); line-height: 1.6; }
.auth-top a { color: var(--a-on-night); }
.auth-top a.auth-toplink { text-decoration-color: var(--a-on-night-soft); }
.auth-top a.auth-toplink:hover { text-decoration-color: var(--a-on-night); }

/* ---------- The glass card ---------- */
.auth-card {
  align-self: center;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: var(--a-glass);

  border: 1px solid var(--a-glass-edge);
  border-radius: 28px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 16px 60px -16px rgba(var(--a-shadow), .12),
    0 4px 18px rgba(var(--a-shadow), .03);
  overflow: hidden;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .auth-card { background: var(--a-solid); }
}

/* Start half: the form. */
.auth-form-side { padding: clamp(28px, 4vw, 52px); }
.auth-title {
  margin: 0 0 6px;
  font-size: var(--a-fs-xl); font-weight: 700; line-height: 1.6;
  color: var(--a-ink);
}
.auth-lede { margin: 0 0 28px; font-size: var(--a-fs-md); line-height: 1.9; color: var(--a-soft); }

.auth-error {
  margin: 0 0 20px; padding: 12px 14px;
  background: var(--a-err-bg); color: var(--a-err);
  border: 1px solid var(--a-tint);
  border-radius: var(--a-radius);
  font-size: var(--a-fs-base); font-weight: 500; line-height: 1.9;
}

.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 8px; }
.auth-field label { margin: 0; font-size: var(--a-fs-base); font-weight: 500; line-height: 1.6; color: var(--a-ink); }
/* Usernames and passwords are Latin, so the fields run left to right; their labels stay Persian and right-aligned. */
.auth-field input[type=text],
.auth-field input[type=password] {
  margin: 0; height: 52px; padding: 0 16px;
  direction: ltr; text-align: left;
  background: var(--a-field); color: var(--a-ink);
  border: 1px solid var(--a-field-edge); border-radius: var(--a-radius);
  font-size: var(--a-fs-md); font-weight: 400; line-height: 1.4;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.auth-field input:hover { background: var(--a-field-hover); }
.auth-field input:focus { background: var(--a-field-focus); border-color: var(--a-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a-brand) 18%, transparent); outline: none; }
.auth-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--a-ink);
  -webkit-box-shadow: 0 0 0 40px var(--a-solid) inset;
}
@media (pointer: coarse) {
  .auth-field input[type=text], .auth-field input[type=password] { font-size: 16px; }
}

/* The show/hide button sits at the right end of the left-to-right password field. */
.auth-pass { position: relative; }
.auth-pass input { padding-right: 78px !important; }
.auth-reveal {
  position: absolute; top: 4px; bottom: 4px; right: 7px;
  padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--a-tint); color: var(--a-soft);
  font-size: var(--a-fs-xs); font-weight: 500; line-height: 1; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.auth-reveal:hover { background: var(--a-field-edge); color: var(--a-ink); }
.auth-reveal:active { transform: scale(.96); }

.auth-submit {
  margin-top: 6px; height: 52px; width: 100%;
  border: 0; border-radius: var(--a-radius);
  background: var(--a-brand); color: #fff;
  font-size: var(--a-fs-md); font-weight: 500; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 24px -10px color-mix(in srgb, var(--a-brand) 70%, transparent);
  transition: background-color .15s ease, transform .12s var(--ease-out), box-shadow .15s ease;
}
.auth-submit:hover { background: var(--a-brand-hover); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 14px 28px -10px color-mix(in srgb, var(--a-brand) 80%, transparent); }
.auth-submit:active { transform: scale(.99); }

.auth-register { margin: 22px 0 0; font-size: var(--a-fs-base); color: var(--a-soft); text-align: center; }

/* ---------- Motion ---------- */
.lines .line { display: block; overflow: hidden; padding-bottom: .15em; margin-bottom: -.15em; }
.lines [data-line] { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] {
    transform: translateY(110%);
    animation: auth-line-up 220ms var(--ease-out) forwards;
    animation-delay: 40ms;
  }
  .js .rise {
    opacity: 0; transform: translateY(6px);
    animation: auth-rise 220ms var(--ease-out) forwards;
    animation-delay: calc(var(--d, 0) * 30ms);
  }
}
@keyframes auth-line-up { to { transform: none; } }
@keyframes auth-rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .auth *, .auth *::before, .auth *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* ---------- Narrow screens: the slider is hidden (login-slider.css) and the form stands alone ---------- */
@media (max-width: 860px) {
  .auth-card { grid-template-columns: 1fr; border-radius: 24px; width: min(480px, 100%); justify-self: center; }
}
@media (max-width: 480px) {
  .auth-shell { width: calc(100% - 24px); }
  .auth-card { border-radius: 22px; }
  .auth-form-side { padding: 24px 20px; }
}


.auth-toplink { display: inline-flex; align-items: center; min-height: 44px; }
.auth-reveal { min-width: 52px; min-height: 44px; }
.auth-register a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) {
  .auth-form-side { padding: 28px 20px; }
  .auth-top { gap: 8px; }
  .auth-toplink { font-size: 13px; }
  .auth-brand { gap: 8px; }
  .auth-logo { height: 50px; }
}
