.auth-root,
.auth-root * {
  box-sizing: border-box;
}

.auth-root[hidden] {
  display: none !important;
}

.auth-locked {
  overflow: hidden !important;
}

.auth-root {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  min-width: 320px;
  place-items: center;
  overflow-y: auto;
  padding: 28px 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(99, 230, 166, 0.1), transparent 34%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #080b0a;
  background-size: auto, 32px 32px, 32px 32px, auto;
  color: #edf3ef;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.auth-card {
  width: min(100%, 452px);
  padding: 28px;
  border: 1px solid rgba(225, 244, 233, 0.15);
  border-radius: 18px;
  background: rgba(14, 20, 16, 0.97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(225, 244, 233, 0.09);
}

.auth-brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(99, 230, 166, 0.28);
  border-radius: 11px;
  background: #173b2b;
  color: #63e6a6;
}

.auth-brand__mark svg {
  width: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.auth-brand > span:last-child {
  display: grid;
  gap: 3px;
}

.auth-brand strong {
  font-size: 14px;
  letter-spacing: 0.01em;
}

.auth-brand small {
  color: #87948c;
  font-size: 11px;
}

.auth-card__heading {
  padding: 26px 0 22px;
}

.auth-card__heading p {
  margin: 0 0 8px;
  color: #63e6a6;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.auth-card__heading h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 7vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.auth-card__heading > span {
  display: block;
  margin-top: 10px;
  color: #9ba7a0;
  font-size: 13px;
  line-height: 1.65;
}

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

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form label > span {
  color: #c0c9c4;
  font-size: 12px;
  font-weight: 650;
}

.auth-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(225, 244, 233, 0.14);
  border-radius: 9px;
  outline: none;
  background: #090d0b;
  color: #edf3ef;
  font: inherit;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input::placeholder {
  color: #657169;
}

.auth-form input:focus-visible {
  border-color: #63e6a6;
  box-shadow: 0 0 0 3px rgba(99, 230, 166, 0.12);
}

.auth-form__message {
  min-height: 20px;
  margin: -2px 0 0;
  color: #9ba7a0;
  font-size: 12px;
  line-height: 1.5;
}

.auth-form__message.is-error {
  color: #f2a3ab;
}

.auth-submit {
  min-height: 48px;
  border: 1px solid #63e6a6;
  border-radius: 9px;
  background: #63e6a6;
  color: #07100b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  transition: background 150ms ease, transform 150ms ease;
}

.auth-submit:hover {
  background: #83edb8;
}

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

.auth-submit:focus-visible,
.auth-wms-link:focus-visible,
.auth-session select:focus-visible,
.auth-session button:focus-visible {
  outline: 2px solid #96f4c6;
  outline-offset: 3px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-security-note {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding: 13px;
  border: 1px solid rgba(99, 230, 166, 0.12);
  border-radius: 9px;
  background: rgba(23, 59, 43, 0.34);
}

.auth-security-note svg {
  width: 20px;
  color: #63e6a6;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.auth-security-note p {
  display: grid;
  gap: 3px;
  margin: 0;
}

.auth-security-note strong {
  color: #dbe8e0;
  font-size: 12px;
}

.auth-security-note span {
  color: #87948c;
  font-size: 11px;
  line-height: 1.55;
}

.auth-wms-link {
  display: block;
  margin-top: 16px;
  color: #9ba7a0;
  font-size: 11px;
  text-align: center;
  text-decoration: underline;
  text-decoration-color: rgba(155, 167, 160, 0.4);
  text-underline-offset: 3px;
}

.auth-session {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding-left: 10px;
  border-left: 1px solid rgba(225, 244, 233, 0.1);
  color: #c0c9c4;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
  font-size: 11px;
}

.auth-session__identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.auth-session__identity i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #63e6a6;
  box-shadow: 0 0 0 3px rgba(99, 230, 166, 0.12);
}

.auth-session__warehouse select,
.auth-session__warehouse-name,
.auth-session__logout {
  min-height: 30px;
  border: 1px solid rgba(225, 244, 233, 0.11);
  border-radius: 7px;
  background: #101612;
  color: #c0c9c4;
  font: inherit;
}

.auth-session__warehouse select {
  max-width: 190px;
  padding: 0 25px 0 8px;
}

.auth-session__warehouse-name {
  display: inline-flex;
  max-width: 150px;
  align-items: center;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-session__logout {
  padding: 0 9px;
  cursor: pointer;
}

.auth-session__logout:hover {
  border-color: rgba(240, 138, 149, 0.35);
  color: #f2a3ab;
}

.auth-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 760px) {
  .auth-root {
    align-items: start;
    padding: 18px 12px;
  }

  .auth-card {
    padding: 22px;
  }

  .auth-session__identity,
  .auth-session__warehouse-name {
    display: none;
  }

  .auth-session__warehouse select {
    max-width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-form input,
  .auth-submit {
    transition: none;
  }
}
