:root {
  --auth-forest-950: #062f2b;
  --auth-forest-900: #073b36;
  --auth-forest-800: #07564d;
  --auth-teal-700: #08786b;
  --auth-teal-100: #dff4ee;
  --auth-saffron: #f3b63f;
  --auth-saffron-soft: #fff4d9;
  --auth-ink: #142724;
  --auth-muted: #687a76;
  --auth-line: #dce7e3;
  --auth-surface: #ffffff;
  --auth-page: #edf5f1;
  --auth-danger: #b43a3a;
  --auth-danger-soft: #fff1f0;
  --auth-focus: rgba(8, 120, 107, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color-scheme: light;
}

body.hd-auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 18px;
  overflow-x: hidden;
  display: grid;
  place-items: center;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(243, 182, 63, 0.18), transparent 24rem),
    radial-gradient(circle at 92% 94%, rgba(8, 120, 107, 0.15), transparent 30rem),
    linear-gradient(145deg, #f7faf8 0%, var(--auth-page) 48%, #e4f0ec 100%);
  font-family: XW_Zar_Bd_0, Tahoma, Arial, sans-serif;
}

body.hd-auth-page::before,
body.hd-auth-page::after {
  position: fixed;
  z-index: 0;
  width: 260px;
  height: 260px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(7, 86, 77, 0.09);
  border-radius: 50%;
}

body.hd-auth-page::before {
  inset: -150px auto auto -90px;
  box-shadow: 0 0 0 42px rgba(7, 86, 77, 0.025), 0 0 0 86px rgba(7, 86, 77, 0.018);
}

body.hd-auth-page::after {
  inset: auto -100px -170px auto;
  box-shadow: 0 0 0 48px rgba(243, 182, 63, 0.035), 0 0 0 96px rgba(243, 182, 63, 0.02);
}

button,
input {
  font: inherit;
}

a,
button,
input {
  -webkit-tap-highlight-color: transparent;
}

.hd-auth-shell {
  position: relative;
  z-index: 1;
  width: min(1390px, 100%);
  height: min(880px, calc(100vh - 36px));
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(440px, 0.86fr) minmax(0, 1.14fr);
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 32px;
  box-shadow:
    0 32px 80px rgba(6, 47, 43, 0.14),
    0 8px 24px rgba(6, 47, 43, 0.06);
  backdrop-filter: blur(18px);
}

.hd-auth-panel {
  min-width: 0;
}

.hd-auth-form-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: clamp(30px, 4vw, 58px);
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 120, 107, 0.28) transparent;
}

.hd-auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hd-auth-logo {
  width: 154px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
}

.hd-auth-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: right center;
}

.hd-auth-cloud-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  color: var(--auth-forest-800);
  background: #f1f8f5;
  border: 1px solid #d8eae4;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.hd-auth-cloud-badge i {
  width: 8px;
  height: 8px;
  display: block;
  background: #22a57f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(34, 165, 127, 0.12);
}

.hd-auth-card-inner {
  width: min(100%, 470px);
  margin: auto;
  padding: 46px 0 34px;
}

.hd-auth-form-heading {
  margin-bottom: 34px;
}

.hd-auth-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--auth-teal-700);
  font-size: 0.9rem;
  font-weight: 900;
}

.hd-auth-kicker::before {
  width: 25px;
  height: 2px;
  margin-left: 9px;
  content: "";
  background: var(--auth-saffron);
  border-radius: 999px;
}

.hd-auth-form-heading h1 {
  margin: 13px 0 10px;
  color: var(--auth-ink);
  font-size: clamp(2rem, 3.1vw, 2.75rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.hd-auth-form-heading p {
  max-width: 440px;
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.98rem;
  line-height: 1.95;
}

.hd-auth-form {
  display: grid;
  gap: 22px;
}

.hd-auth-field {
  min-width: 0;
}

.hd-auth-field label,
.hd-auth-label-row label {
  display: block;
  margin: 0 0 9px;
  color: var(--auth-ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.hd-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hd-auth-label-row a {
  margin-bottom: 9px;
  color: var(--auth-teal-700);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  transition: color 160ms ease;
}

.hd-auth-label-row a:hover {
  color: var(--auth-forest-950);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hd-auth-input {
  position: relative;
}

.hd-auth-field-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 17px;
  width: 20px;
  height: 20px;
  pointer-events: none;
  fill: none;
  stroke: #82948f;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(-50%);
  transition: stroke 160ms ease;
}

.hd-auth-input input {
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 0 49px 0 18px;
  color: var(--auth-ink);
  background: #f8fbfa;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  outline: none;
  box-shadow: 0 1px 0 rgba(6, 47, 43, 0.02);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.hd-auth-input input#login-username,
.hd-auth-input input[type="email"] {
  direction: ltr;
  text-align: left;
}

.hd-auth-input input#password,
.hd-auth-input input[type="password"],
.hd-auth-input input[type="text"]#password {
  padding-left: 52px;
  direction: ltr;
  text-align: left;
}

.hd-auth-input:focus-within .hd-auth-field-icon {
  stroke: var(--auth-teal-700);
}

.hd-auth-input input:hover {
  border-color: #b7cbc4;
}

.hd-auth-input input:focus {
  background: #fff;
  border-color: var(--auth-teal-700);
  box-shadow: 0 0 0 4px var(--auth-focus);
}

.hd-auth-field.has-error .hd-auth-input input {
  border-color: rgba(180, 58, 58, 0.65);
  box-shadow: 0 0 0 4px rgba(180, 58, 58, 0.08);
}

.hd-auth-field-error {
  margin-top: 7px;
  color: var(--auth-danger);
  font-size: 0.83rem;
  line-height: 1.65;
}

.hd-auth-field-error ul {
  margin: 0;
  padding-right: 18px;
}

.hd-auth-password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 10px;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #7a8b87;
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 160ms ease, background-color 160ms ease;
}

.hd-auth-password-toggle:hover,
.hd-auth-password-toggle:focus-visible {
  color: var(--auth-teal-700);
  background: var(--auth-teal-100);
  outline: none;
}

.hd-auth-password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hd-auth-eye-closed,
.hd-auth-password-toggle[aria-pressed="true"] .hd-auth-eye-open {
  display: none;
}

.hd-auth-password-toggle[aria-pressed="true"] .hd-auth-eye-closed {
  display: block;
}

.hd-auth-submit {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 2px;
  padding: 11px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-teal-700), var(--auth-forest-800));
  border: 1px solid var(--auth-forest-800);
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(7, 86, 77, 0.2);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.hd-auth-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.hd-auth-submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 18px 34px rgba(7, 86, 77, 0.26);
  transform: translateY(-1px);
}

.hd-auth-submit:hover svg {
  transform: translateX(-3px);
}

.hd-auth-submit:active {
  box-shadow: 0 9px 20px rgba(7, 86, 77, 0.2);
  transform: translateY(1px);
}

.hd-auth-submit:focus-visible {
  outline: 3px solid rgba(243, 182, 63, 0.55);
  outline-offset: 3px;
}

.hd-auth-trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 19px;
  color: #758681;
  font-size: 0.82rem;
}

.hd-auth-trust-note svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--auth-teal-700);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hd-auth-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #82928e;
  font-size: 0.79rem;
}

.hd-auth-footer i {
  width: 4px;
  height: 4px;
  background: var(--auth-saffron);
  border-radius: 50%;
}

.hd-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: -8px 0 21px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.7;
}

.hd-auth-alert ul {
  margin: 0;
  padding-right: 17px;
}

.hd-auth-alert-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  margin-top: 2px;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 900;
}

.hd-auth-alert-danger,
.hd-auth-alert-error {
  color: var(--auth-danger);
  background: var(--auth-danger-soft);
  border: 1px solid rgba(180, 58, 58, 0.15);
}

.hd-auth-alert-danger .hd-auth-alert-icon,
.hd-auth-alert-error .hd-auth-alert-icon {
  color: #fff;
  background: var(--auth-danger);
}

.hd-auth-alert-info,
.hd-auth-alert-success {
  color: var(--auth-forest-800);
  background: #edf8f4;
  border: 1px solid rgba(8, 120, 107, 0.14);
}

.hd-auth-alert-info .hd-auth-alert-icon,
.hd-auth-alert-success .hd-auth-alert-icon {
  color: #fff;
  background: var(--auth-teal-700);
}

.hd-auth-visual-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--auth-forest-950);
  border-radius: 25px;
}

.hd-auth-visual-panel > img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 67%;
  transform: scale(1.01);
}

.hd-auth-visual-panel::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 30, 28, 0.28) 0%, rgba(4, 30, 28, 0.06) 35%, rgba(4, 30, 28, 0.88) 100%),
    linear-gradient(90deg, rgba(4, 30, 28, 0.18), transparent 60%);
}

.hd-auth-visual-panel::after {
  position: absolute;
  z-index: -1;
  inset: 18px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}

.hd-auth-visual-top {
  position: absolute;
  top: 34px;
  right: 34px;
  left: 34px;
  display: flex;
  justify-content: flex-start;
}

.hd-auth-visual-top span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(4, 30, 28, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(3, 22, 20, 0.16);
  backdrop-filter: blur(12px);
  font-size: 0.83rem;
  font-weight: 800;
}

.hd-auth-visual-top svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--auth-saffron);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hd-auth-visual-content {
  position: absolute;
  right: clamp(34px, 5vw, 68px);
  bottom: clamp(36px, 5vw, 66px);
  left: clamp(34px, 5vw, 68px);
  max-width: 650px;
}

.hd-auth-visual-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f8d993;
  font-size: 0.9rem;
  font-weight: 900;
}

.hd-auth-visual-eyebrow::before {
  width: 26px;
  height: 2px;
  content: "";
  background: var(--auth-saffron);
  border-radius: 999px;
}

.hd-auth-visual-content h2 {
  max-width: 620px;
  margin: 13px 0 11px;
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 4.35rem);
  font-weight: 900;
  line-height: 1.17;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.2);
}

.hd-auth-visual-content p {
  max-width: 570px;
  margin: 0;
  color: rgba(244, 250, 248, 0.78);
  font-size: 0.98rem;
  line-height: 1.9;
}

.hd-auth-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 21px 0 0;
  padding: 0;
  list-style: none;
}

.hd-auth-feature-list li {
  position: relative;
  padding: 7px 25px 7px 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 0.8rem;
  font-weight: 800;
}

.hd-auth-feature-list li::before {
  position: absolute;
  top: 50%;
  right: 11px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--auth-saffron);
  border-radius: 50%;
  transform: translateY(-50%);
}

@media (max-width: 1023px) {
  body.hd-auth-page {
    display: block;
    padding: 14px;
  }

  .hd-auth-shell {
    width: min(760px, 100%);
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    margin: 0 auto;
  }

  .hd-auth-visual-panel {
    min-height: 430px;
    grid-row: 1;
  }

  .hd-auth-form-panel {
    min-height: 640px;
  }

  .hd-auth-card-inner {
    margin: auto;
  }

  .hd-auth-visual-content h2 {
    max-width: 540px;
    font-size: clamp(2.2rem, 7vw, 3.7rem);
  }
}

@media (max-width: 640px) {
  body.hd-auth-page {
    padding: 0;
    background: #fff;
  }

  body.hd-auth-page::before,
  body.hd-auth-page::after {
    display: none;
  }

  .hd-auth-shell {
    gap: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .hd-auth-visual-panel {
    min-height: 290px;
    margin: 10px 10px 0;
    border-radius: 22px;
  }

  .hd-auth-visual-panel::after {
    inset: 12px;
    border-radius: 14px;
  }

  .hd-auth-visual-panel > img {
    object-position: center 63%;
  }

  .hd-auth-visual-top {
    top: 24px;
    right: 24px;
    left: 24px;
  }

  .hd-auth-visual-content {
    right: 25px;
    bottom: 25px;
    left: 25px;
  }

  .hd-auth-visual-eyebrow {
    font-size: 0.78rem;
  }

  .hd-auth-visual-content h2 {
    max-width: 360px;
    margin: 9px 0 0;
    font-size: clamp(1.65rem, 8vw, 2.25rem);
  }

  .hd-auth-visual-content p,
  .hd-auth-feature-list {
    display: none;
  }

  .hd-auth-form-panel {
    min-height: 600px;
    padding: 28px 22px 24px;
    overflow: visible;
  }

  .hd-auth-logo {
    width: 138px;
    height: 49px;
  }

  .hd-auth-cloud-badge {
    min-height: 31px;
    font-size: 0.77rem;
  }

  .hd-auth-card-inner {
    width: 100%;
    padding: 42px 0 36px;
  }

  .hd-auth-form-heading {
    margin-bottom: 28px;
  }

  .hd-auth-form-heading h1 {
    font-size: clamp(1.85rem, 8vw, 2.35rem);
  }

  .hd-auth-input input,
  .hd-auth-submit {
    height: 54px;
    min-height: 54px;
    border-radius: 15px;
  }

  .hd-auth-footer {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .hd-auth-cloud-badge {
    display: none;
  }

  .hd-auth-label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}