.header-auth {
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-label-mobile { display: none; }
.header-login {
  border-color: #83c9fa;
  color: #f3faff;
  background: linear-gradient(180deg, #215f98, #10396b);
}
.header-login:hover { box-shadow: 0 0 11px #6ac5ff59; }
.header-register {
  border-color: #d8ebff;
  color: #0b305f;
  background: linear-gradient(180deg, #f8fcff, #afcef5);
}
.header-register:hover { box-shadow: 0 0 11px #a0d0ff59; }
.login-entry-icon {
  position: relative;
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background: linear-gradient(currentColor, currentColor) left center / .58em 1.5px no-repeat;
  font-size: 16px;
}
.login-entry-icon::before, .login-entry-icon::after {
  position: absolute;
  content: "";
}
.login-entry-icon::before {
  inset: .08em 0 .08em .48em;
  border: 1.5px solid currentColor;
  border-left: 0;
  border-radius: 0 3px 3px 0;
}
.login-entry-icon::after {
  top: 50%;
  left: .28em;
  width: .31em;
  height: .31em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.login-panel {
  padding: 11px 12px 9px;
  border-color: #88b7e6;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #174c86, #0e3567 58%, #0a294f);
  box-shadow: inset 0 1px 0 #b4dfff4a, 0 4px 11px #0d427338;
}
.login-panel h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 15px;
}
.login-panel h2 .menu-icon { font-size: 20px; color: #d7edff; }
#login-form { display: grid; gap: 7px; }
#login-form input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #9ec4ed;
  border-radius: 8px;
  color: var(--navy);
  background: #f3f8ff;
  font: inherit;
  font-size: 16px;
}
#login-form input::placeholder { color: #546d8b; font-size: 13px; }
#login-form input[aria-invalid="true"] { border-color: #f38c8c; }
.login-field { position: relative; }
.login-field-icon {
  position: absolute;
  inset: 50% auto auto 8px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 24px;
  transform: translateY(-50%);
  color: #356395;
  background: transparent;
  font-size: 17px;
  pointer-events: none;
}
#login-form .login-field input { padding-inline-start: 34px; }
#login-form .login-password input { padding-inline-end: 42px; }
.login-password-toggle {
  position: absolute;
  inset: 4px 4px 4px auto;
  display: grid;
  place-items: center;
  width: 34px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #24578b;
  background: transparent;
}
.login-password-toggle:hover { background: #dbeafa; }
.login-eye {
  position: relative;
  width: 16px;
  height: 10px;
  display: grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 70% 70%;
}
.login-eye::after {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.login-password-toggle[aria-pressed="true"] .login-eye::before {
  position: absolute;
  width: 16px;
  height: 1.5px;
  transform: rotate(-40deg);
  border-radius: 1px;
  background: currentColor;
  box-shadow: 0 1px #f3f8ff;
  content: "";
}
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #e4f2ff;
  font-size: 11px;
}
.login-options label { display: flex; align-items: center; gap: 5px; }
.login-options input { margin: 0; accent-color: #72bfff; }
.login-help {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font-weight: 700;
}
.login-help:hover { text-decoration: underline; }
.login-submit, .login-register {
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid #ffe28d;
  border-radius: 9px;
  color: #14274b;
  background: linear-gradient(#ffe99b, #ffbf30);
  font-weight: 800;
}
.login-submit:hover { background: linear-gradient(#fff0ae, #ffd058); }
.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.login-register {
  border-color: #b4d6fb;
  background: linear-gradient(#f7fbff, #bfdafb);
}
.login-register:hover { background: linear-gradient(#fff, #d6eaff); }
.login-panel :focus-visible { outline-color: #9dd3ff; outline-offset: 2px; }
.login-note { color: #bedaf7; font-size: 10px; text-align: center; }
.login-error { color: #ffe0e0; font-size: 12px; }

@media (min-width: 621px) and (max-width: 940px) {
  .login-panel { grid-row: span 2; align-self: start; }
}
@media (min-width: 1024px) {
  [data-account-state="guest"] .header-inner {
    width: min(1220px, calc(100% - 24px));
    gap: 9px;
  }
  [data-account-state="guest"] .header-actions { gap: 6px; }
}
@media (min-width: 1024px) and (max-width: 1200px) {
  [data-account-state="guest"] .brand { flex-basis: 103px; }
  [data-account-state="guest"] .topnav a { gap: 4px; padding-inline: 4px; font-size: 12px; }
  [data-account-state="guest"] .topnav a .menu-icon { width: 20px; height: 20px; font-size: 16px; }
  [data-account-state="guest"] .header-shortcuts { gap: 5px; }
  [data-account-state="guest"] .header-actions .header-button { padding-inline: 7px; }
}
@media (min-width: 1024px) and (max-width: 1100px) {
  [data-account-state="guest"] .header-inner { gap: 6px; }
  [data-account-state="guest"] .brand { flex-basis: 90px; }
  [data-account-state="guest"] .topnav a { gap: 3px; padding-inline: 3px; }
  [data-account-state="guest"] .header-tools { gap: 3px; padding-inline-start: 3px; }
  [data-account-state="guest"] .header-tool { width: 28px; }
  [data-account-state="guest"] .header-actions { gap: 4px; }
  [data-account-state="guest"] .header-actions .header-button { padding-inline: 5px; }
  .header-login .login-entry-icon { font-size: 14px; }
}
@media (max-width: 1023px) {
  .header-shortcuts .header-shortcut-label { display: none; }
  .header-shortcuts .header-button {
    flex: 0 0 32px;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
  }
  .header-shortcuts .header-button .menu-icon { display: block; font-size: 17px; }
  .header-auth .login-entry-icon, .auth-label-desktop { display: none; }
  .auth-label-mobile { display: inline; }
  .header-auth .header-button {
    min-height: 35px;
    padding-inline: 10px;
    border-radius: 10px;
    font-size: 12px;
  }
}
@media (max-width: 680px) {
  [data-account-state="guest"] body { min-width: 0; }
  [data-account-state="guest"] .header-inner { gap: 5px; }
  [data-account-state="guest"] .brand { flex-basis: clamp(72px, 22vw, 110px); }
  .header-actions, .header-auth, .header-shortcuts { gap: 4px; }
  .header-shortcuts .header-button { flex-basis: 28px; width: 28px; min-height: 28px; }
  .header-auth .header-button { padding-inline: 8px; font-size: 11px; }
  [data-account-state="guest"] .menu-toggle { width: 30px; height: 32px; }
}
@media (max-width: 360px) {
  .header-actions, .header-auth, .header-shortcuts { gap: 3px; }
  .header-shortcuts .header-button { flex-basis: 26px; width: 26px; min-height: 26px; }
  .header-auth .header-button { padding-inline: 6px; }
  [data-account-state="guest"] .menu-toggle { flex: 0 0 28px; width: 28px; }
}
@media (max-width: 620px) {
  #mobile-account-slot:not(:empty) { margin-block-start: 10px; }
  #mobile-account-slot .panel {
    border-color: #a3c9ee;
    border-radius: 15px;
    box-shadow: 0 5px 14px #0d487b38, inset 0 1px #ecf8ff58;
  }
  #mobile-account-slot .account-panel {
    padding: 7px;
    background: linear-gradient(155deg, #f5fbff, #d8ebfc);
  }
  #mobile-account-slot .account-identity { gap: 11px; min-height: 62px; }
  #mobile-account-slot .account-identity .profile-trigger-avatar {
    flex-basis: 54px;
    width: 54px;
    height: 54px;
  }
  #mobile-account-slot .account-name { font-size: 16px; }
  #mobile-account-slot .balance { min-height: 48px; padding-inline: 9px; }
  #mobile-account-slot .balance-details span { font-size: 11px; }
  #mobile-account-slot .balance strong { font-size: 24px; }
  #mobile-account-slot .balance-icon { flex-basis: 30px; height: 30px; }
  #mobile-account-slot .refresh { width: 38px; height: 36px; }
  #mobile-account-slot .money-actions { gap: 7px; margin-top: 7px; }
  #mobile-account-slot .money-button { min-height: 51px; gap: 7px; font-size: 14px; }
  #mobile-account-slot .money-button[data-action="deposit"] {
    border-color: #69b4f1;
    background: linear-gradient(155deg, #218bd5, #0955a6 70%);
  }
  #mobile-account-slot .money-art { flex-basis: 44px; width: 44px; height: 39px; }
  #mobile-account-slot .login-panel {
    padding: 13px 14px 10px;
    scroll-margin-block-end: 57px;
  }
  #mobile-account-slot .login-panel h2 { font-size: 17px; }
  #mobile-account-slot .login-field input { min-height: 44px; }
  #mobile-account-slot .login-field input::placeholder { font-size: 14px; }
  #mobile-account-slot :is(.login-submit, .login-register) { min-height: 44px; font-size: 15px; }
}
