/* ============================================================
   海霸王 · 控制台登录页（极简居中版）
   视觉：纯深底 + 细弧线 + 居中 logo + 账号/密码 + 青→靛渐变按钮
   配色取自自有 logo：青 #22d3ee ／ 靛 #6366f1
   可替换图片：
     /assets/brand/logo.png        ← 居中品牌标（透明底，建议 512）
     /assets/brand/logo-tile.png   ← 带描边方块版（备用）
   ============================================================ */

.hbw-login,
.hbw-login * {
  box-sizing: border-box;
}

html.hbw-lock,
body.hbw-lock {
  overflow: hidden !important;
  height: 100% !important;
}

body.hbw-guest #root {
  display: none !important;
}

/* 登录页接管时，SPA 自己往 body 上挂的浮动按钮/提示块一并隐藏 */
body.hbw-guest > *:not(.hbw-login):not(script) {
  display: none !important;
}

.hbw-login {
  --hbw-bg: #080b10;
  --hbw-plate: #12161d;
  --hbw-border: #1e2530;
  --hbw-border-2: #2a3341;
  --hbw-text: #e8eef5;
  --hbw-muted: #77839a;
  --hbw-faint: #4d5866;
  --hbw-cyan: #22d3ee;
  --hbw-indigo: #6366f1;
  --hbw-danger: #f87171;

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(34, 211, 238, 0.05), transparent 62%),
    radial-gradient(90% 80% at 50% 110%, rgba(99, 102, 241, 0.06), transparent 65%),
    var(--hbw-bg);
  color: var(--hbw-text);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  animation: hbw-fade 0.3s ease both;
}

@keyframes hbw-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 背景细弧线（矢量，任何分辨率都清晰） */
.hbw-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.85;
}

.hbw-arc {
  fill: none;
  stroke: rgba(150, 195, 225, 0.075);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hbw-arc--bright {
  stroke: rgba(34, 211, 238, 0.09);
}

/* 居中主体 */
.hbw-center {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 342px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  animation: hbw-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hbw-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 品牌标 */
.hbw-logo {
  align-self: center;
  width: 78px;
  height: 78px;
  margin-bottom: 26px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 8px 26px rgba(34, 211, 238, 0.28));
  animation: hbw-breathe 6s ease-in-out infinite;
}

@keyframes hbw-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.015); }
}

.hbw-brandline {
  align-self: center;
  margin: -16px 0 22px;
  font-size: 12.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(120, 140, 168, 0.72);
  font-weight: 600;
  user-select: none;
}

/* 输入框 */
.hbw-field {
  position: relative;
  display: flex;
  align-items: center;
}

.hbw-input {
  width: 100%;
  height: 40px;
  padding: 0 38px 0 13px;
  border-radius: 9px;
  border: 1px solid var(--hbw-border);
  background: var(--hbw-plate);
  color: var(--hbw-text);
  font-size: 13.5px;
  font-family: inherit;
  letter-spacing: 0.01em;
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hbw-input::placeholder {
  color: var(--hbw-faint);
}

.hbw-input:hover {
  border-color: var(--hbw-border-2);
}

.hbw-input:focus {
  border-color: rgba(34, 211, 238, 0.65);
  background: #141a22;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.hbw-input:-webkit-autofill,
.hbw-input:-webkit-autofill:hover,
.hbw-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--hbw-text);
  -webkit-box-shadow: 0 0 0 1000px #141a22 inset;
  transition: background-color 9999s ease-out;
}

.hbw-eye {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--hbw-faint);
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
}

.hbw-eye:hover {
  color: var(--hbw-cyan);
  background: rgba(34, 211, 238, 0.09);
}

.hbw-eye svg {
  width: 16px;
  height: 16px;
}

/* 按钮 */
.hbw-btn {
  position: relative;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #05121a;
  background: linear-gradient(90deg, #22d3ee 0%, #4ea8f5 52%, #6366f1 100%);
  box-shadow: 0 10px 28px -14px rgba(34, 211, 238, 0.9), 0 1px 0 rgba(255, 255, 255, 0.24) inset;
  overflow: hidden;
  transition: filter 0.18s ease, box-shadow 0.22s ease, transform 0.14s ease;
}

.hbw-btn:hover:not(:disabled) {
  filter: brightness(1.07);
  box-shadow: 0 16px 34px -14px rgba(78, 168, 245, 0.95), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

.hbw-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.hbw-btn:disabled {
  cursor: progress;
  filter: saturate(0.7) brightness(0.95);
}

.hbw-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 42%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
}

.hbw-btn:hover:not(:disabled)::after {
  animation: hbw-sheen 0.85s ease;
}

@keyframes hbw-sheen {
  from { left: -60%; }
  to { left: 120%; }
}

.hbw-btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.hbw-spin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(5, 18, 26, 0.3);
  border-top-color: #05121a;
  animation: hbw-spin 0.7s linear infinite;
  display: none;
}

.hbw-btn.is-busy .hbw-spin {
  display: inline-block;
}

@keyframes hbw-spin {
  to { transform: rotate(360deg); }
}

/* 错误提示 */
.hbw-alert {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.08);
  color: #ffb3b3;
  font-size: 12.4px;
  line-height: 1.45;
}

.hbw-alert.is-on {
  display: flex;
}

.hbw-alert svg {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.hbw-shake {
  animation: hbw-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes hbw-shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

/* 底部一行很轻的信息 */
.hbw-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 11px;
  color: rgba(119, 131, 154, 0.55);
  letter-spacing: 0.04em;
  pointer-events: none;
}

.hbw-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.7);
}

@media (max-width: 480px) {
  .hbw-center {
    max-width: 320px;
  }

  .hbw-logo {
    width: 68px;
    height: 68px;
    margin-bottom: 22px;
  }

  .hbw-input {
    height: 44px;
    font-size: 15px;
  }

  .hbw-btn {
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hbw-logo,
  .hbw-btn::after,
  .hbw-center {
    animation: none !important;
  }
}
