/* Fan30Tech Test Gate visual owner | Production lineage v99 | Offline step03
   Scope: Test Gate / Welcome Login only
   Direction: Premium Cinematic + Controlled Gold
   Notes: No backend changes. Existing DOM and behavior preserved. */

:root {
  --gate-bg-deep: #050912;
  --gate-surface: #08111b;
  --gate-surface-elevated: #0b1622;
  --gate-surface-soft: rgba(13, 24, 36, 0.78);
  --gate-warm-surface: rgba(39, 28, 25, 0.58);
  --gate-line: rgba(216, 173, 85, 0.17);
  --gate-line-strong: rgba(216, 173, 85, 0.32);
  --gate-text: #fff8e9;
  --gate-muted: #c7bda9;
  --gate-muted-soft: #8f8a81;
  --gate-gold: #d8ad55;
  --gate-gold-light: #f0cd78;
  --gate-gold-deep: #ad7e31;
  --gate-green: #9eddbd;
  --gate-radius-shell: 34px;
  --gate-radius-control: 14px;
}

/* ===== Page atmosphere ===== */
html,
body {
  background-color: var(--gate-bg-deep) !important;
}

.page-background {
  background:
    #050912
    url('../pictures/welcome-background-approved-v1.png') center center / cover no-repeat !important;
}

.page-background__overlay {
  display: block !important;
  background:
    linear-gradient(180deg, rgba(3, 7, 15, 0.04), rgba(3, 7, 15, 0.13)),
    radial-gradient(ellipse 78% 82% at 50% 48%, transparent 34%, rgba(2, 6, 14, 0.16) 100%) !important;
}

/* ===== Main shell ===== */
.login-shell {
  width: min(100%, 1080px) !important;
  min-height: min(730px, calc(100svh - 64px)) !important;
  grid-template-columns: minmax(390px, 0.94fr) minmax(0, 1.06fr) !important;
  border: 1px solid rgba(226, 190, 105, 0.26) !important;
  border-radius: var(--gate-radius-shell) !important;
  background:
    linear-gradient(135deg, rgba(14, 25, 38, 0.97) 0%, rgba(7, 13, 21, 0.985) 50%, rgba(16, 15, 21, 0.98) 100%) !important;
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 247, 229, 0.07) !important;
  -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
  backdrop-filter: blur(18px) saturate(112%) !important;
}

.login-shell::before {
  display: block !important;
  content: '' !important;
  position: absolute !important;
  z-index: 0 !important;
  top: -26% !important;
  right: -8% !important;
  width: 56% !important;
  height: 62% !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(218, 160, 111, 0.14) 0%, rgba(218, 160, 111, 0.05) 40%, transparent 72%) !important;
  filter: none !important;
  pointer-events: none !important;
}

.login-shell::after {
  content: '';
  position: absolute;
  z-index: 4;
  inset: 12px;
  border: 1px solid rgba(255, 244, 217, 0.035);
  border-radius: calc(var(--gate-radius-shell) - 10px);
  pointer-events: none;
}

/* ===== Showcase / brand side ===== */
.login-showcase {
  isolation: isolate;
  padding: clamp(34px, 4.8vw, 54px) !important;
  border-left: 1px solid rgba(216, 173, 85, 0.15) !important;
  background:
    radial-gradient(circle at 54% 30%, rgba(226, 161, 120, 0.20) 0%, rgba(226, 161, 120, 0.08) 30%, transparent 58%),
    radial-gradient(circle at 86% 86%, rgba(216, 173, 85, 0.08) 0%, transparent 42%),
    linear-gradient(150deg, rgba(49, 32, 31, 0.62) 0%, rgba(22, 20, 29, 0.84) 48%, rgba(11, 13, 21, 0.96) 100%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(116%) !important;
  backdrop-filter: blur(18px) saturate(116%) !important;
}

.login-showcase::after {
  right: auto !important;
  left: -54px !important;
  bottom: 28px !important;
  width: 250px !important;
  height: 250px !important;
  border: 1px solid rgba(216, 173, 85, 0.08) !important;
  background:
    radial-gradient(circle at center, rgba(216, 173, 85, 0.035), transparent 67%) !important;
}

.showcase-brand {
  gap: 16px !important;
}

.showcase-brand__logo-wrap {
  width: 80px !important;
  height: 80px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(216, 173, 85, 0.42) !important;
  background:
    linear-gradient(145deg, rgba(28, 23, 21, 0.95), rgba(11, 13, 19, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 218, 0.10),
    0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

.showcase-brand__logo-wrap::after,
.mobile-brand__logo-wrap::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(216, 173, 85, 0.10);
  border-radius: inherit;
  pointer-events: none;
}

.showcase-brand__identity strong {
  color: var(--gate-text) !important;
  font-size: 29px !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

.showcase-brand__identity small {
  margin-top: 5px !important;
  color: rgba(236, 213, 166, 0.74) !important;
  font-size: 10px !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase;
}

.showcase-content {
  max-width: 450px;
  padding-block: 42px 34px !important;
}

.showcase-content__eyebrow,
.login-introduction__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gate-gold-light) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}

.showcase-content h2 {
  max-width: 460px !important;
  margin-top: 16px !important;
  color: var(--gate-text) !important;
  font-size: clamp(38px, 4.2vw, 55px) !important;
  font-weight: 900 !important;
  line-height: 1.31 !important;
  letter-spacing: -0.045em !important;
  text-wrap: balance;
}

.showcase-content h2 span:last-child {
  color: #fff2d8;
}

.showcase-content p {
  max-width: 430px !important;
  margin-top: 20px !important;
  color: rgba(229, 215, 190, 0.72) !important;
  font-size: 13px !important;
  line-height: 2.05 !important;
}

/* Refined showcase rows: richer hierarchy without heavy card treatment. */
.showcase-features {
  gap: 9px !important;
}

.showcase-features > .showcase-feature {
  position: relative;
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px !important;
  min-height: 56px !important;
  padding: 7px 10px 7px 14px !important;
  overflow: hidden;
  border: 1px solid rgba(216, 173, 85, 0.16) !important;
  border-radius: 11px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.012), rgba(216, 173, 85, 0.035) 78%, rgba(216, 173, 85, 0.055)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 229, 0.028),
    inset 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

.showcase-feature__copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  text-align: right;
}

.showcase-feature__copy strong {
  color: rgba(248, 239, 221, 0.88);
  font-size: 12.2px;
  font-weight: 700;
  line-height: 1.65;
}

.showcase-feature__copy small {
  color: rgba(226, 215, 196, 0.48);
  font-size: 10.25px;
  font-weight: 400;
  line-height: 1.55;
}

.showcase-features > .showcase-feature > i {
  display: grid;
  width: 36px !important;
  height: 36px !important;
  place-items: center;
  border: 1px solid rgba(216, 173, 85, 0.18) !important;
  border-radius: 10px !important;
  background: rgba(216, 173, 85, 0.075) !important;
  color: var(--gate-gold-light) !important;
  font-size: 12px;
}

/* ===== Login side ===== */
.login-panel {
  isolation: isolate;
  padding: clamp(34px, 4.8vw, 56px) !important;
  background:
    radial-gradient(circle at 18% 14%, rgba(49, 92, 137, 0.10) 0%, transparent 34%),
    radial-gradient(circle at 76% 82%, rgba(216, 173, 85, 0.045) 0%, transparent 38%),
    linear-gradient(160deg, rgba(7, 16, 26, 0.985) 0%, rgba(5, 11, 19, 0.992) 58%, rgba(7, 9, 16, 0.995) 100%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(110%) !important;
  backdrop-filter: blur(18px) saturate(110%) !important;
}

.login-panel::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -100px;
  bottom: -130px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(216, 173, 85, 0.045);
  border-radius: 50%;
  pointer-events: none;
}

.login-navigation {
  top: clamp(22px, 3.6vw, 32px) !important;
  right: clamp(26px, 4.8vw, 54px) !important;
  left: clamp(26px, 4.8vw, 54px) !important;
}

.back-link,
.admin-badge {
  min-height: 40px !important;
  padding: 8px 13px !important;
  border-radius: 12px !important;
  background: rgba(8, 14, 22, 0.76) !important;
  border-color: rgba(216, 173, 85, 0.22) !important;
  box-shadow: inset 0 1px 0 rgba(255, 247, 229, 0.045) !important;
}

.back-link {
  color: rgba(235, 221, 190, 0.78) !important;
}

.back-link:hover {
  color: var(--gate-text) !important;
  border-color: rgba(216, 173, 85, 0.42) !important;
  background: rgba(216, 173, 85, 0.07) !important;
}

.admin-badge {
  border-color: rgba(117, 210, 157, 0.26) !important;
  background: linear-gradient(135deg, rgba(18, 58, 47, 0.58), rgba(8, 27, 23, 0.72)) !important;
  color: #d7f6e4 !important;
}

.admin-badge i {
  color: var(--gate-green) !important;
}

.login-introduction {
  margin-top: 40px !important;
  text-align: center !important;
}

.login-introduction__title {
  max-width: 520px;
  margin-inline: auto;
  margin-top: 12px !important;
  color: var(--gate-text) !important;
  font-size: clamp(40px, 4.4vw, 56px) !important;
  font-weight: 900 !important;
  line-height: 1.26 !important;
  letter-spacing: -0.045em !important;
  text-wrap: balance;
}

.login-introduction__description {
  max-width: 500px !important;
  margin-inline: auto;
  margin-top: 16px !important;
  color: rgba(210, 202, 187, 0.70) !important;
  font-size: 13px !important;
  line-height: 2.05 !important;
}

.login-form {
  gap: 20px !important;
  margin-top: clamp(26px, 4vw, 34px) !important;
}

.form-field {
  gap: 10px !important;
}

.form-field__label {
  color: rgba(255, 248, 233, 0.90) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.form-field__control {
  position: relative;
  border: 1px solid rgba(216, 173, 85, 0.22) !important;
  border-radius: var(--gate-radius-control) !important;
  background:
    linear-gradient(180deg, rgba(14, 22, 31, 0.96), rgba(8, 14, 22, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 229, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20) !important;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.form-field__control:focus-within {
  border-color: rgba(240, 205, 120, 0.54) !important;
  background:
    linear-gradient(180deg, rgba(18, 26, 36, 0.98), rgba(9, 15, 23, 0.99)) !important;
}

.form-field__input {
  height: 60px !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  color: var(--gate-text) !important;
  padding-right: 52px !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.form-field__input:focus {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.form-field__input::placeholder {
  color: rgba(185, 180, 170, 0.50) !important;
}

.form-field__icon,
.password-toggle {
  color: rgba(216, 173, 85, 0.82) !important;
}

.password-toggle {
  left: 11px !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}

.password-toggle:hover {
  border-color: rgba(216, 173, 85, 0.18) !important;
  background: rgba(216, 173, 85, 0.07) !important;
}

.submit-button {
  position: relative;
  min-height: 60px !important;
  overflow: hidden;
  border: 1px solid rgba(255, 235, 183, 0.28) !important;
  border-radius: var(--gate-radius-control) !important;
  background:
    linear-gradient(135deg, #f1ce75 0%, #dcb45a 50%, #bf8e3b 100%) !important;
  color: #171106 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(111, 73, 20, 0.26) !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: -0.01em;
}

.submit-button:hover {
  filter: brightness(1.035) !important;
  transform: translateY(-1px) !important;
}

.submit-button:active {
  transform: translateY(0) !important;
}

.security-notice {
  position: relative;
  gap: 11px !important;
  margin-top: 26px !important;
  padding: 15px 14px 15px 12px !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(118, 210, 160, 0.10), inset 0 1px 0 rgba(255, 247, 230, 0.035) !important;
  border-radius: 10px !important;
  background: linear-gradient(90deg, rgba(118, 210, 160, 0.055), rgba(118, 210, 160, 0.012)) !important;
  color: rgba(185, 181, 171, 0.62) !important;
  font-size: 10.5px !important;
}

.security-notice__icon {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid rgba(118, 210, 160, 0.13);
  border-radius: 9px !important;
  background: rgba(118, 210, 160, 0.075) !important;
  color: var(--gate-green) !important;
}

.security-notice p {
  color: rgba(203, 197, 185, 0.62) !important;
}

/* step15 — Desktop action-stack baseline alignment with showcase features. */
@media (min-width: 901px) {
  .login-panel {
    --login-action-stack-shift: clamp(58px, calc(124.7px - 5.87vw), 72px);
  }

  .login-form,
  .security-notice {
    transform: translateY(var(--login-action-stack-shift));
  }
}

/* ===== Mobile brand ===== */
.mobile-brand__logo-wrap {
  position: relative;
  border: 1px solid rgba(216, 173, 85, 0.34) !important;
  background: linear-gradient(145deg, rgba(27, 21, 18, 0.96), rgba(9, 13, 19, 0.98)) !important;
}

.mobile-brand__identity strong {
  color: var(--gate-text) !important;
}

.mobile-brand__identity small {
  color: rgba(216, 205, 184, 0.65) !important;
}

/* ===== Responsive ===== */
@media (max-width: 980px) and (min-width: 901px) {
  .login-shell {
    grid-template-columns: minmax(350px, 0.92fr) minmax(0, 1.08fr) !important;
  }

  .login-showcase,
  .login-panel {
    padding-inline: 38px !important;
  }

  .showcase-content h2,
  .login-introduction__title {
    font-size: 43px !important;
  }
}

@media (max-width: 900px) {
  .login-shell {
    width: min(100%, 590px) !important;
    min-height: auto !important;
    grid-template-columns: 1fr !important;
    border-radius: 28px !important;
    background:
      radial-gradient(circle at 80% 6%, rgba(223, 157, 112, 0.11), transparent 34%),
      linear-gradient(158deg, rgba(8, 18, 29, 0.985), rgba(5, 11, 19, 0.992) 60%, rgba(9, 10, 16, 0.99)) !important;
  }

  .login-shell::before {
    top: -170px !important;
    right: -120px !important;
    width: 420px !important;
    height: 360px !important;
    background: radial-gradient(circle, rgba(216, 148, 102, 0.11), transparent 68%) !important;
  }

  .login-shell::after {
    inset: 9px;
    border-radius: 21px;
  }

  .login-showcase {
    display: none !important;
  }

  .login-panel {
    min-height: 670px !important;
    padding: 28px 34px 32px !important;
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .login-navigation {
    right: 28px !important;
    left: 28px !important;
  }

  .mobile-brand {
    display: flex !important;
    justify-content: flex-start !important;
    margin-top: 66px !important;
  }

  .mobile-brand__logo-wrap {
    width: 58px !important;
    height: 58px !important;
    border-radius: 18px !important;
  }

  .mobile-brand__identity strong {
    font-size: 22px !important;
  }

  .login-introduction {
    margin-top: 30px !important;
    text-align: center !important;
  }

  .login-introduction__title {
    max-width: 500px;
    font-size: clamp(37px, 7.6vw, 48px) !important;
    line-height: 1.28 !important;
  }

  .login-introduction__description {
    margin-inline: auto !important;
    font-size: 12.5px !important;
  }
}

@media (max-width: 560px) {
  .admin-login-page {
    padding:
      calc(env(safe-area-inset-top, 0px) + 10px)
      9px
      calc(env(safe-area-inset-bottom, 0px) + 10px) !important;
  }

  .login-shell {
    border-radius: 24px !important;
  }

  .login-shell::after {
    inset: 7px;
    border-radius: 18px;
  }

  .login-panel {
    min-height: auto !important;
    padding: 22px 18px 24px !important;
  }

  .login-navigation {
    top: 18px !important;
    right: 18px !important;
    left: 18px !important;
  }

  .back-link,
  .admin-badge {
    min-height: 37px !important;
    padding-inline: 10px !important;
    border-radius: 11px !important;
  }

  .mobile-brand {
    margin-top: 64px !important;
    gap: 11px !important;
  }

  .mobile-brand__logo-wrap {
    width: 54px !important;
    height: 54px !important;
    border-radius: 17px !important;
  }

  .login-introduction {
    margin-top: 26px !important;
  }

  .login-introduction__eyebrow {
    font-size: 10.5px !important;
  }

  .login-introduction__title {
    margin-top: 10px !important;
    font-size: clamp(33px, 10.3vw, 42px) !important;
    line-height: 1.31 !important;
  }

  .login-introduction__description {
    margin-top: 12px !important;
    font-size: 11.5px !important;
    line-height: 1.95 !important;
  }

  .login-form {
    margin-top: 24px !important;
    gap: 17px !important;
  }

  .form-field__input,
  .submit-button {
    min-height: 56px !important;
    height: 56px !important;
  }

  .security-notice {
    margin-top: 21px !important;
    padding-block: 12px !important;
    font-size: 9.5px !important;
  }
}

@media (max-width: 390px) {
  .login-panel {
    padding-inline: 15px !important;
  }

  .login-navigation {
    right: 15px !important;
    left: 15px !important;
  }

  .back-link,
  .admin-badge {
    gap: 6px !important;
    padding-inline: 9px !important;
  }

  .mobile-brand__identity small {
    font-size: 10px !important;
  }

  .login-introduction__title {
    font-size: 34px !important;
  }
}

@media (max-height: 760px) and (min-width: 901px) {
  .login-shell {
    min-height: 680px !important;
  }

  .showcase-content {
    padding-block: 28px 24px !important;
  }

  .showcase-content h2,
  .login-introduction__title {
    font-size: 42px !important;
  }

  .login-form {
    margin-top: 22px !important;
  }

  .security-notice {
    margin-top: 20px !important;
  }
}

/* Step09: desktop primary headings stay single-line without changing page structure. */
@media (min-width: 901px) {
  .login-introduction__title,
  .showcase-content h2 {
    width: 100% !important;
    max-width: none !important;
    white-space: nowrap !important;
    text-wrap: nowrap !important;
    line-height: 1.16 !important;
  }

  .login-introduction__title {
    font-size: clamp(30px, 3.15vw, 42px) !important;
  }

  .showcase-content h2 {
    font-size: clamp(28px, 2.8vw, 37px) !important;
  }

  .showcase-content h2 span {
    display: inline !important;
    width: auto !important;
  }
}

@media (prefers-contrast: more) {
  .login-shell {
    border-color: rgba(240, 205, 120, 0.48) !important;
  }

  .form-field__control,
  .showcase-features span {
    border-color: rgba(240, 205, 120, 0.38) !important;
  }
}

/* Final focus geometry: crisp, not glowing. */
.form-field__input:focus,
.form-field__input:focus-visible {
  outline: none !important;
}

.form-field__control:focus-within {
  box-shadow:
    0 0 0 2px rgba(216, 173, 85, 0.16),
    inset 0 1px 0 rgba(255, 247, 229, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.20) !important;
}

@media (max-height: 800px) and (min-width: 901px) {
  .admin-login-page {
    padding-block: 20px !important;
  }

  .login-shell {
    min-height: min(700px, calc(100svh - 40px)) !important;
  }

  .showcase-content {
    padding-block: 26px 22px !important;
  }

  .login-introduction {
    margin-top: 30px !important;
  }

  .login-form {
    margin-top: 22px !important;
  }

  .security-notice {
    margin-top: 18px !important;
  }
}

/* step07 — Empty-submit error state: controlled red warning without geometry change. */
.form-field__control.form-field__control--error,
.form-field__control.form-field__control--error:focus-within {
  border-color: rgba(239, 92, 92, 0.72) !important;
  background:
    linear-gradient(180deg, rgba(34, 20, 24, 0.97), rgba(18, 12, 17, 0.99)) !important;
  box-shadow:
    0 0 0 2px rgba(239, 92, 92, 0.10),
    inset 0 1px 0 rgba(255, 238, 238, 0.035),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22) !important;
}

.form-field__control.form-field__control--error .form-field__icon,
.form-field__control.form-field__control--error .password-toggle {
  color: rgba(244, 111, 111, 0.92) !important;
}

.form-field__control.form-field__control--error .form-field__input::placeholder {
  color: rgba(224, 162, 162, 0.64) !important;
}

/* step08 — Keep the custom password eye as the only reveal control. */
.form-field__input--password::-ms-reveal,
.form-field__input--password::-ms-clear {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* step08 — Short, controlled attention motion for an empty submit. */
@keyframes fan30-password-error-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.form-field__control.form-field__control--shake {
  animation: fan30-password-error-shake 260ms cubic-bezier(.36,.07,.19,.97) both;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .form-field__control.form-field__control--shake {
    animation: none !important;
  }
}

/* step11 — Responsive-only hardening. Desktop (>=901px) remains frozen. */
@media (max-width: 900px) {
  .admin-login-page {
    padding-inline: clamp(10px, 3vw, 24px) !important;
  }

  .login-shell {
    width: min(100%, 620px) !important;
  }

  .login-panel {
    padding-inline: clamp(24px, 5vw, 34px) !important;
  }

  .login-navigation {
    right: clamp(20px, 4vw, 28px) !important;
    left: clamp(20px, 4vw, 28px) !important;
  }

  .mobile-brand {
    margin-top: clamp(60px, 8vw, 66px) !important;
  }

  .login-introduction {
    margin-top: clamp(24px, 4vw, 30px) !important;
  }

  .login-introduction__title {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }
}

/* Phone: touch-friendly controls and denser use of the available width. */
@media (max-width: 560px) {
  .admin-login-page {
    padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
    padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
  }

  .login-panel {
    padding-inline: clamp(15px, 4.6vw, 20px) !important;
  }

  .login-navigation {
    right: clamp(15px, 4.6vw, 20px) !important;
    left: clamp(15px, 4.6vw, 20px) !important;
  }

  .back-link {
    min-height: 44px !important;
  }

  button.password-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    left: 7px !important;
  }

  .form-field__input {
    padding-left: 54px !important;
  }

  .login-introduction__title {
    font-size: clamp(30px, 9vw, 40px) !important;
    line-height: 1.28 !important;
  }
}

/* Very narrow phones: preserve hierarchy without clipping or oversized text. */
@media (max-width: 340px) {
  .login-panel {
    padding-inline: 13px !important;
  }

  .login-navigation {
    right: 13px !important;
    left: 13px !important;
  }

  .back-link,
  .admin-badge {
    padding-inline: 8px !important;
  }

  .login-introduction__title {
    font-size: 30px !important;
  }

  .login-introduction__description {
    font-size: 11px !important;
  }

  .form-field__label {
    font-size: 12px !important;
  }

  .security-notice {
    padding-inline: 10px !important;
  }
}

/* Short-height tablet/mobile and landscape: never center the shell above the viewport. */
@media (max-width: 900px) and (max-height: 600px) {
  .admin-login-page {
    min-height: 100svh !important;
    place-items: start center !important;
    padding-top: calc(env(safe-area-inset-top, 0px) + 8px) !important;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 12px) !important;
  }

  .login-shell {
    margin-block: 0 !important;
  }

  .login-panel {
    min-height: auto !important;
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .login-navigation {
    top: 14px !important;
  }

  .mobile-brand {
    margin-top: 52px !important;
  }

  .mobile-brand__logo-wrap {
    width: 48px !important;
    height: 48px !important;
    border-radius: 15px !important;
  }

  .mobile-brand__identity strong {
    font-size: 20px !important;
  }

  .mobile-brand__identity small {
    margin-top: 1px !important;
    font-size: 9px !important;
  }

  .login-introduction {
    margin-top: 16px !important;
  }

  .login-introduction__eyebrow {
    font-size: 10px !important;
  }

  .login-introduction__title {
    margin-top: 8px !important;
    font-size: clamp(28px, 5.2vw, 36px) !important;
    line-height: 1.22 !important;
  }

  .login-introduction__description {
    margin-top: 8px !important;
    font-size: 11px !important;
    line-height: 1.75 !important;
  }

  .login-form {
    margin-top: 15px !important;
    gap: 12px !important;
  }

  .form-field {
    gap: 7px !important;
  }

  .form-field__input,
  .submit-button {
    min-height: 52px !important;
    height: 52px !important;
  }

  .security-notice {
    margin-top: 13px !important;
    padding-block: 10px !important;
    font-size: 9px !important;
    line-height: 1.65 !important;
  }
}

/* =====================================================================
   Account Login step04
   Direct TestGate visual-standard adaptation.
   Top TestGate nav/badge controls are intentionally absent from the DOM.
   ===================================================================== */

.account-login-form {
  width: min(100%, 500px);
  margin-inline: auto !important;
  gap: 11px !important;
}

.account-login-form .form-field {
  gap: 8px !important;
}

.account-login-form .form-field__control {
  min-height: 58px !important;
  height: 58px !important;
}

.account-login-form .form-field__input {
  min-height: 56px !important;
  height: 56px !important;
}

.account-field-icon {
  right: 17px !important;
  left: auto !important;
  width: 18px;
  font-size: 15px;
}

.account-login-form .form-field__input {
  padding-right: 50px !important;
}

.account-login-form .form-field__input--password {
  padding-left: 54px !important;
}

.account-field-message {
  min-height: 0;
  margin: 0;
  color: rgba(244, 111, 111, 0.88);
  font-size: 10px;
  line-height: 1.65;
}

.account-field-message:empty {
  display: none;
}

.account-field-message:not(:empty) {
  display: block;
  margin-top: 2px;
}

.account-login-links {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-top: 1px;
}

.account-login-switch {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  color: rgba(203, 197, 185, 0.62);
  font-size: 11px;
  line-height: 1.7;
}

.account-login-switch::before,
.account-login-switch::after {
  width: min(72px, 17%);
  height: 1px;
  flex: 0 1 72px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(216, 173, 85, 0.18));
}

.account-login-switch::after {
  transform: scaleX(-1);
}

.account-login-switch a {
  color: var(--gate-gold-light) !important;
  font-weight: 800;
  text-decoration: none;
}

.account-login-switch a:hover,
.account-login-switch a:focus-visible {
  color: #ffe39a !important;
}

.account-back-home {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 3px 2px;
  color: rgba(216, 173, 85, 0.76) !important;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
}

.account-back-home i {
  font-size: 10px;
}

.account-back-home:hover,
.account-back-home:focus-visible {
  color: var(--gate-gold-light) !important;
}

.account-submit-button:disabled {
  cursor: wait;
  filter: saturate(0.82) brightness(0.94);
  opacity: 0.92;
}

/* The account form has one extra field + two requested links.
   Therefore the old TestGate step15 vertical translation is not reused. */
@media (min-width: 901px) {
  .account-login-form,
  .login-panel:has(.account-login-form) .security-notice {
    transform: none !important;
  }

  .login-panel:has(.account-login-form) .login-introduction {
    margin-top: 20px !important;
  }

  .login-panel:has(.account-login-form) .login-introduction__title {
    font-size: clamp(38px, 3.8vw, 50px) !important;
  }

  .login-panel:has(.account-login-form) .login-introduction__description {
    max-width: 510px !important;
  }
}

/* No top navigation exists in Account Login.
   Mobile identity therefore starts naturally from the top. */
@media (max-width: 900px) {
  .login-panel:has(.account-login-form) {
    min-height: auto !important;
  }

  .login-panel:has(.account-login-form) .mobile-brand {
    margin-top: 0 !important;
  }

  .login-panel:has(.account-login-form) .login-introduction {
    margin-top: 24px !important;
  }

  .account-login-form {
    margin-top: 22px !important;
  }
}

@media (max-width: 560px) {
  .login-panel:has(.account-login-form) {
    padding-top: 20px !important;
  }

  .login-panel:has(.account-login-form) .mobile-brand {
    justify-content: center !important;
  }

  .login-panel:has(.account-login-form) .login-introduction__title {
    font-size: clamp(29px, 8.7vw, 38px) !important;
  }

  .account-login-form {
    gap: 10px !important;
  }

  .account-login-form .form-field__control,
  .account-login-form .form-field__input,
  .account-submit-button {
    min-height: 56px !important;
    height: 56px !important;
  }

  .account-field-message {
    min-height: 0;
    font-size: 9.5px;
  }

  .account-login-switch {
    font-size: 10.5px;
  }
}

@media (max-width: 340px) {
  .account-login-switch::before,
  .account-login-switch::after {
    width: 34px;
    flex-basis: 34px;
  }
}




/* =====================================================================
   Account Login step08
   Forgot-password link under password field.
   Offline visual placeholder only: Production v153 has no reset route.
   ===================================================================== */
.account-forgot-password {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  justify-content: flex-start;
  margin-top: -6px;
  margin-right: 2px;
  color: rgba(216, 173, 85, 0.72) !important;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  transition: color 160ms ease;
}

.account-forgot-password:hover,
.account-forgot-password:focus-visible {
  color: var(--gate-gold-light) !important;
}

.account-forgot-password:focus-visible {
  outline: 1px solid rgba(216, 173, 85, 0.42);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 560px) {
  .account-forgot-password {
    font-size: 10px;
    margin-top: -6px;
  }
}


/* Preserve step07 bottom alignment after inserting forgot-password link. */
@media (min-width: 901px) {
  .login-panel:has(.account-login-form) .account-login-form {
    transform: translateY(24.33px) !important;
  }
}


/* ACCOUNT LOGIN STEP09 FINAL OWNER */
.account-forgot-password {
  margin-top: 0.00px !important;
}

.account-login-switch {
  font-size: 12px !important;
}

.account-back-home {
  font-size: 12px !important;
}

@media (max-width: 560px) {
  .account-login-switch {
    font-size: 11.5px !important;
  }

  .account-back-home {
    font-size: 11.5px !important;
  }

  .account-forgot-password {
    margin-top: 0.00px !important;
  }
}

/* Preserve step07 bottom alignment after step09 local refinements. */
@media (min-width: 901px) {
  .login-panel:has(.account-login-form) .account-login-form {
    transform: translateY(20.48px) !important;
  }
}
