.auth-gate[hidden],
.auth-panel[hidden],
.auth-feedback[hidden],
.auth-account[hidden],
.auth-account-menu[hidden] {
  display: none !important;
}

.auth-gate,
.auth-stage,
.auth-card,
.auth-card input,
.auth-card button,
.auth-account,
.auth-account * {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

html,
body.auth-page {
  min-height: 100%;
  margin: 0;
  background: #030712;
}

body.auth-page {
  color: #0f172a;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

.auth-account {
  position: relative;
  z-index: 40;
  color: #0f172a;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.auth-avatar {
  display: block;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 19px;
  background: #ffffff;
  color: #155e75;
  font-size: 15px;
  font-weight: bold;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
}

.auth-account-menu {
  position: absolute;
  top: 46px;
  right: 0;
  width: 220px;
  padding: 12px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.auth-account-email {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  word-wrap: break-word;
}

.auth-account-menu button {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
}

.auth-gate {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: block;
  width: 100%;
  height: 100%;
  overflow: auto;
  font-size: 0;
  text-align: center;
  white-space: nowrap;
  background: #030712;
  background: rgba(3, 7, 18, 0.96);
}

.auth-gate:before {
  display: inline-block;
  width: 0;
  height: 100%;
  content: "";
  vertical-align: middle;
}

.auth-stage {
  display: inline-block;
  width: 100%;
  max-width: 440px;
  padding: 20px;
  font-size: 16px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

.auth-card {
  width: 100%;
  margin: 0 auto;
  padding: 28px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.auth-eyebrow {
  margin-bottom: 14px;
  color: #475569;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.08em;
}

.auth-eyebrow:before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border-radius: 3px;
  background: #e11d48;
  content: "";
  vertical-align: middle;
}

.auth-title {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 23px;
  line-height: 1.25;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.auth-field {
  display: block;
  margin: 0 0 14px;
}

.auth-field label {
  display: block;
  margin: 0;
  color: #334155;
  font-size: 13px;
  font-weight: normal;
}

.auth-field label span {
  color: #64748b;
  font-size: 12px;
}

.auth-card input {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  outline: 0;
  background: #f8fafc;
  color: #0f172a;
  font: inherit;
}

.auth-card input:focus {
  border-color: #0e7490;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.14);
}

.auth-field-row {
  display: block;
}

.auth-primary {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  padding: 9px 14px;
  border: 0;
  border-radius: 4px;
  background: #0e7490;
  color: #ffffff;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.auth-primary:hover,
.auth-primary:focus {
  background: #155e75;
}

.auth-primary[disabled] {
  cursor: wait;
  opacity: 0.65;
}

.auth-feedback {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 4px;
  background: #fff1f2;
  color: #be123c;
  font-size: 13px;
  line-height: 1.45;
}

.auth-feedback.success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.auth-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
}

.auth-footer:after {
  display: block;
  clear: both;
  content: "";
}

.auth-footer span {
  float: left;
}

.auth-link {
  float: right;
  border: 0;
  border-bottom: 1px solid #94a3b8;
  padding: 0;
  background: transparent;
  color: #0f172a;
  font: inherit;
  cursor: pointer;
}

.auth-link-left {
  float: left;
}

.auth-link:hover,
.auth-link:focus {
  border-color: #0e7490;
  color: #0e7490;
}

@media (max-width: 768px) {
  .auth-stage {
    padding: 12px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 22px;
  }
}
