:root {
  --login-white: #ffffff;
  --login-white-strong: rgba(255, 255, 255, 0.96);
  --login-white-body: rgba(255, 255, 255, 0.8);
  --login-white-muted: rgba(255, 255, 255, 0.62);
  --login-line: rgba(255, 255, 255, 0.2);
  --login-glass: rgba(255, 255, 255, 0.1);
  --login-glass-hover: rgba(255, 255, 255, 0.15);
  --login-teal-light: #bcebdc;
  --login-teal-dark: #173f39;
  --login-error: #ffb9ad;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--login-white);
  background: #101513;
  font-family: inherit;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.login-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  align-items: center;
  gap: 88px;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: 52px 7vw;
}

.login-shell::before,
.login-shell::after {
  position: absolute;
  inset: 0;
  content: "";
}

.login-shell::before {
  z-index: -2;
  background-image: url("/assets/login-bead-store-straight.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.login-shell::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 11, 10, 0.22) 0%, rgba(7, 11, 10, 0.16) 42%, rgba(7, 11, 10, 0.62) 70%, rgba(7, 11, 10, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 11, 10, 0.06) 36%, rgba(7, 11, 10, 0.42) 100%);
}

.login-panel {
  grid-column: 2;
  width: 100%;
  justify-self: end;
  padding: 10px 0;
  color: var(--login-white);
  background: transparent;
}

.login-brand {
  display: grid;
  gap: 2px;
  margin-bottom: 27px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--login-line);
}

.login-brand > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.login-brand > div > span {
  color: var(--login-teal-light);
  font-size: 10px;
  font-weight: 820;
}

.login-brand h1 {
  margin: 0;
  overflow: hidden;
  color: var(--login-white-strong);
  font-size: 32px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
  white-space: nowrap;
}

.login-brand p {
  margin: 0;
  color: var(--login-white-muted);
  font-size: 12px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 2px;
}

.login-form-heading strong {
  color: var(--login-white-strong);
  font-size: 21px;
  font-weight: 820;
}

.login-form-heading span {
  color: var(--login-white-muted);
  font-size: 12px;
}

.login-field {
  display: grid;
  gap: 7px;
  color: var(--login-white-body);
  font-size: 12px;
  font-weight: 700;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-height: 24px;
  margin-top: -2px;
  color: var(--login-white-body);
  font-size: 11px;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-weight: 720;
  white-space: nowrap;
}

.login-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--login-teal-light);
}

.login-credential-hint {
  color: var(--login-white-muted);
  text-align: right;
}

.login-input {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 7px;
  background: var(--login-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.login-input::before {
  grid-column: 1;
  width: 18px;
  height: 18px;
  content: "";
  color: var(--login-teal-light);
  background: currentColor;
  -webkit-mask: var(--login-input-icon) center / contain no-repeat;
  mask: var(--login-input-icon) center / contain no-repeat;
}

.login-input-user {
  --login-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm-8 10a8 8 0 0 1 16 0H4Z'/%3E%3C/svg%3E");
}

.login-input-password {
  --login-input-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 9V7a5 5 0 0 1 10 0v2h1.5A1.5 1.5 0 0 1 20 10.5v10A1.5 1.5 0 0 1 18.5 22h-13A1.5 1.5 0 0 1 4 20.5v-10A1.5 1.5 0 0 1 5.5 9H7Zm2 0h6V7a3 3 0 1 0-6 0v2Zm3 5a2 2 0 0 0-1 3.73V20h2v-2.27A2 2 0 0 0 12 14Z'/%3E%3C/svg%3E");
  grid-template-columns: 27px minmax(0, 1fr) 40px;
  padding-right: 5px;
}

.login-input:focus-within {
  border-color: rgba(188, 235, 220, 0.78);
  background: var(--login-glass-hover);
  box-shadow: 0 0 0 3px rgba(188, 235, 220, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-input input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 4px;
  border: 0;
  outline: 0;
  color: var(--login-white);
  background: transparent;
  font-size: 16px;
}

.login-input input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.login-password-toggle {
  grid-column: 3;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
}

.login-password-toggle::before {
  width: 18px;
  height: 18px;
  content: "";
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c5.5 0 9.7 4.8 10 7-.3 2.2-4.5 7-10 7S2.3 14.2 2 12c.3-2.2 4.5-7 10-7Zm0 2c-3.7 0-6.9 2.9-7.8 5 .9 2.1 4.1 5 7.8 5s6.9-2.9 7.8-5c-.9-2.1-4.1-5-7.8-5Zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 5c5.5 0 9.7 4.8 10 7-.3 2.2-4.5 7-10 7S2.3 14.2 2 12c.3-2.2 4.5-7 10-7Zm0 2c-3.7 0-6.9 2.9-7.8 5 .9 2.1 4.1 5 7.8 5s6.9-2.9 7.8-5c-.9-2.1-4.1-5-7.8-5Zm0 2.5a2.5 2.5 0 1 1 0 5 2.5 2.5 0 0 1 0-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-password-toggle:hover,
.login-password-toggle[aria-pressed="true"] {
  color: var(--login-white);
  background: rgba(255, 255, 255, 0.1);
}

.login-submit {
  position: relative;
  min-height: 52px;
  margin-top: 3px;
  padding: 0 48px 0 20px;
  border: 0;
  border-radius: 6px;
  color: var(--login-teal-dark);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  transition: background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.login-submit::after {
  position: absolute;
  top: 50%;
  right: 19px;
  width: 8px;
  height: 8px;
  content: "";
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

.login-submit:hover {
  background: #fff;
  box-shadow: 0 13px 32px rgba(0, 0, 0, 0.26);
}

.login-submit:active {
  transform: translateY(1px);
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.62;
  box-shadow: none;
}

.login-message {
  min-height: 20px;
  margin: -2px 0 0;
  color: var(--login-error);
  font-size: 12px;
  font-weight: 680;
}

.login-panel-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--login-line);
  color: var(--login-white-muted);
  font-size: 10px;
}

.login-panel-foot span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #78d6b8;
  box-shadow: 0 0 0 4px rgba(120, 214, 184, 0.12);
}

.login-password-toggle:focus-visible,
.login-remember input:focus-visible,
.login-submit:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .login-shell {
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0;
    padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  }

  .login-shell::before {
    background-image: url("/assets/login-bead-store-straight.jpg");
    background-position: center center;
  }

  .login-shell::after {
    background:
      linear-gradient(180deg, rgba(7, 11, 10, 0.04) 0%, rgba(7, 11, 10, 0.12) 22%, rgba(7, 11, 10, 0.64) 42%, rgba(7, 11, 10, 0.76) 74%, rgba(7, 11, 10, 0.68) 100%);
  }

  .login-panel {
    grid-column: 1;
    max-width: none;
    padding: 0;
  }

  .login-brand {
    display: none;
  }

  .login-form-heading {
    margin-bottom: 8px;
    text-align: center;
  }

  .login-form-heading strong {
    font-size: 24px;
  }

  .login-form {
    gap: 14px;
  }

  .login-options {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .login-credential-hint {
    flex: 1 1 160px;
  }
}

@media (max-width: 350px) {
  .login-shell {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (min-width: 761px) and (max-height: 680px) {
  .login-shell {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .login-brand {
    margin-bottom: 19px;
    padding-bottom: 16px;
  }

  .login-form {
    gap: 13px;
  }
}
