.operator-login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(80, 126, 190, 0.28), transparent 34%),
    linear-gradient(135deg, #0b1728 0%, #122b48 52%, #08111e 100%);
}

.operator-login-card {
  width: min(388px, 100%);
  padding: 42px 40px 38px;
  border: 1px solid rgba(183, 145, 69, 0.62);
  border-radius: 14px;
  background: rgba(15, 29, 48, 0.94);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.08);
  color: #f6f8fb;
}

.operator-login-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid #d3ad62;
  border-radius: 12px;
  background: linear-gradient(145deg, #f1cf80, #aa762b);
  color: #17253a;
  font: 700 25px/1 "Microsoft YaHei", sans-serif;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.operator-login-card h1 {
  margin: 0 0 30px;
  color: #ffffff;
  font: 600 24px/1.2 "Microsoft YaHei", sans-serif;
  letter-spacing: 0.08em;
  text-align: center;
}

.operator-login-label {
  display: block;
  margin: 0 0 7px;
  color: #cad6e5;
  font: 13px/1.2 "Microsoft YaHei", sans-serif;
}

.operator-login-card input {
  width: 100%;
  height: 44px;
  margin: 0 0 18px;
  padding: 0 13px;
  border: 1px solid #405a77;
  border-radius: 7px;
  outline: none;
  background: #0b1b2e;
  color: #ffffff;
  font: 14px/44px "Microsoft YaHei", sans-serif;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.operator-login-card input:focus {
  border-color: #d3ad62;
  box-shadow: 0 0 0 3px rgba(211, 173, 98, 0.16);
}

.operator-login-card button {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 1px solid #dfb965;
  border-radius: 7px;
  background: linear-gradient(135deg, #d9b15f, #a8762d);
  color: #132238;
  font: 700 14px/42px "Microsoft YaHei", sans-serif;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.operator-login-card button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.operator-login-card button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.operator-login-card button.operator-login-secondary {
  height: 36px;
  margin-top: 0;
  border-color: #526a86;
  background: transparent;
  color: #c4d0df;
  font-weight: 400;
}

.operator-login-card button.operator-login-secondary:hover:not(:disabled) {
  background: rgba(82, 106, 134, 0.18);
  filter: none;
}

.operator-totp-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.operator-totp-actions button {
  margin-top: 0;
}

.operator-totp-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 9, 18, 0.72);
}

.operator-totp-dialog[hidden] {
  display: none;
}

.operator-totp-dialog-card {
  position: relative;
  width: min(400px, 100%);
  padding: 13px;
  border: 1px solid rgba(211, 173, 98, 0.45);
  border-radius: 10px;
  background: rgba(8, 20, 35, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
}

.operator-totp-dialog-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #c4d0df !important;
  font-size: 22px !important;
  line-height: 24px !important;
}

.operator-totp-qr {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: 0 auto 12px;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
}

.operator-totp-qr svg {
  display: block;
  width: min(190px, 100%);
  height: auto;
}

.operator-totp-bind-title {
  margin-bottom: 10px;
  color: #f1cf80;
  font: 600 13px/1.2 "Microsoft YaHei", sans-serif;
}

.operator-totp-bind-row {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 9px;
}

.operator-totp-bind-row code {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
  color: #ffffff;
  font: 12px/1.5 Consolas, monospace;
}

.operator-totp-dialog textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  margin: 0 0 4px;
  padding: 7px;
  border: 1px solid #405a77;
  border-radius: 6px;
  outline: none;
  background: #0b1b2e;
  color: #dfe9f5;
  font: 11px/1.4 Consolas, monospace;
}

.operator-totp-dialog button {
  height: 34px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 32px;
}

.operator-totp-bind-row button {
  width: auto;
  flex: 0 0 auto;
  padding: 0 9px;
  border-color: #526a86;
  background: transparent;
  color: #c4d0df;
  font-weight: 400;
}

.operator-totp-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.operator-totp-dialog-actions button {
  margin-top: 4px;
}

.operator-login-error {
  min-height: 18px;
  margin-top: 14px;
  color: #ff9c9c;
  font: 13px/18px "Microsoft YaHei", sans-serif;
  text-align: center;
}

.operator-login-error.operator-login-success {
  color: #a9d6b0;
}

@media (max-width: 480px) {
  .operator-login-gate {
    padding: 16px;
  }

  .operator-login-card {
    padding: 34px 24px 30px;
  }

  .operator-totp-actions {
    grid-template-columns: 1fr;
  }
}
