/* =================== 云版扩展样式:登录页 + 顶部用户条 =================== */

.cw-login {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 50%, #0a0e1a 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 24px;
  overflow: auto;
}
.cw-login-card {
  width: 100%; max-width: 820px;
  background: rgba(20, 24, 36, 0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 32px 36px 28px;
  color: #e8eaf0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
}
.cw-login-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.cw-login-brand {
  width: 44px; height: 44px; border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4, #1f6feb);
  position: relative;
}
.cw-login-brand::after {
  content: ''; position: absolute; right: 6px; bottom: 6px;
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
}
.cw-login-head h1 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
.cw-login-head p  { margin: 0; font-size: 13px; color: #8a92a6; }

.cw-login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.cw-pick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 6px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #d8dce5;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.cw-pick:hover { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.3); }
.cw-pick.on   { background: rgba(6,182,212,0.16); border-color: #06b6d4; box-shadow: 0 0 0 2px rgba(6,182,212,0.2); }
.cw-pick-av {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
.cw-pick-name { font-size: 13px; }

.cw-login-form { display: flex; gap: 10px; }
.cw-pwd {
  flex: 1;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e8eaf0;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.cw-pwd:focus { border-color: #06b6d4; }
.cw-pwd::placeholder { color: #5a6275; }
.cw-submit {
  padding: 12px 24px;
  background: #06b6d4;
  border: none;
  border-radius: 8px;
  color: #0a0e1a;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.cw-submit:hover:not(:disabled) { background: #22c4dc; }
.cw-submit:disabled { opacity: 0.5; cursor: not-allowed; }

.cw-err {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(220,60,60,0.12);
  border: 1px solid rgba(220,60,60,0.3);
  border-radius: 6px;
  color: #ff8a8a;
  font-size: 13px;
}
.cw-foot {
  margin-top: 14px;
  font-size: 12px; color: #6c7488;
  text-align: center;
}
.cw-foot b { color: #c8d0e0; }
.cw-clear { cursor: pointer; color: #06b6d4; }
.cw-clear:hover { text-decoration: underline; }

/* ---- 加载页 ---- */
.cw-loading {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  background: #0a0e1a; color: #8a92a6;
  z-index: 9999;
  font-size: 14px;
}
.cw-spin {
  width: 32px; height: 32px;
  border: 3px solid rgba(6,182,212,0.15);
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: cw-spin 0.8s linear infinite;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }

/* ---- 错误页 ---- */
.cw-err-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background: #0a0e1a; color: #e8eaf0;
  z-index: 9999;
  padding: 24px;
  text-align: center;
}
.cw-err-screen pre {
  max-width: 600px; padding: 12px 16px;
  background: rgba(220,60,60,0.12);
  border: 1px solid rgba(220,60,60,0.3);
  border-radius: 6px;
  color: #ff8a8a;
  font-size: 12px;
  white-space: pre-wrap;
}
.cw-err-screen button {
  padding: 8px 18px; margin: 0 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #e8eaf0;
  cursor: pointer;
  font-family: inherit;
}

/* ---- 顶部用户条 ---- */
.cw-userbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px;
  background: rgba(6,182,212,0.06);
  border-bottom: 1px solid rgba(6,182,212,0.15);
  font-size: 12px;
  color: #6c7488;
}
[data-theme="dark"] .cw-userbar { background: rgba(6,182,212,0.08); border-bottom-color: rgba(6,182,212,0.2); color: #8a92a6; }
.cw-userbar b { color: var(--text, #1a1f2e); }
[data-theme="dark"] .cw-userbar b { color: #e8eaf0; }
.cw-userbar-dot { width: 6px; height: 6px; border-radius: 50%; background: #06b6d4; }
.cw-userbar-sp  { color: #c0c4d0; }
.cw-logout {
  margin-left: auto;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid rgba(6,182,212,0.4);
  color: #06b6d4;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.cw-logout:hover { background: rgba(6,182,212,0.1); }
