/* 统一账号与微信共享样式 (v20261118-identity4) */
.account-identity-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

/* 工作台单层顶栏胶囊按钮 (/console) */
.account-switch,
.account-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.account-switch svg,
.account-settings svg {
  width: 13.5px;
  height: 13.5px;
  flex: 0 0 auto;
}
.account-switch {
  border-color: #e0e7ff;
  background: #f5f7ff;
  color: #4338ca;
}
.account-switch:hover {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}
.account-settings:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

/* 用户面板悬浮顶栏“管理视图”胶囊 (/user) */
.account-top-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.account-top-switch .icon {
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
}
.account-top-switch .icon svg {
  width: 14px;
  height: 14px;
}

/* 登录页“微信登录”自适应深浅色卡片 (/user 深色玻璃 & /login 浅色管理卡) */
.wechat-login-zone {
  display: grid;
  margin: 0;
}
.wechat-login-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, .16);
  border-radius: 8px;
  background: rgba(15, 23, 42, .64);
  color: #eaf0ff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.wechat-login-button:not(:disabled):hover {
  border-color: rgba(52, 211, 153, .56);
  background: rgba(15, 23, 42, .84);
  transform: translateY(-1px);
}
.wechat-login-button:disabled {
  color: #748197;
  cursor: not-allowed;
  opacity: 1;
}
.wechat-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, #34d399, #86efac);
  box-shadow: 0 0 14px rgba(52, 211, 153, .70);
}
.wechat-login-button:disabled .wechat-dot {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: none;
  opacity: .68;
}
body.workbench-login-page .wechat-login-button {
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  background: #f8fafc;
  color: #243b53;
  font-size: 13.5px;
  font-weight: 660;
}
body.workbench-login-page .wechat-login-button:not(:disabled):hover {
  border-color: #94d3b3;
  background: #f0fdf4;
  color: #065f46;
}
body.workbench-login-page .wechat-login-button:disabled {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #758498;
}

/* 统一高对比 Bento 弹窗 */
.account-dialog {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  overflow: visible;
  color: inherit;
}
.account-dialog::backdrop {
  background: rgba(9, 11, 16, .52);
  backdrop-filter: blur(8px);
}
.account-dialog-panel {
  width: min(416px, calc(100vw - 28px));
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 20px;
  border: 1px solid #e4e7ee;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .18);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
}
html[data-user-theme="dark"] .account-dialog-panel {
  border-color: #232838;
  background: #12151f;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .65);
  color: #f8fafc;
}
.account-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.account-dialog-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 820;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.account-dialog-sub {
  margin: 3px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
html[data-user-theme="dark"] .account-dialog-sub {
  color: #94a3b8;
}
.account-dialog-close {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
html[data-user-theme="dark"] .account-dialog-close {
  border-color: #272d3f;
  background: #1a1f2e;
  color: #94a3b8;
}
.account-dialog-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
html[data-user-theme="dark"] .account-dialog-close:hover {
  background: #252b3d;
  color: #ffffff;
}
.account-dialog-body {
  display: grid;
  gap: 10px;
  font-size: 13px;
}
.account-stat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  gap: 9px;
}
.account-stat-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #eaecf2;
  border-radius: 14px;
  background: #f8fafc;
  display: grid;
  align-content: center;
  gap: 5px;
}
html[data-user-theme="dark"] .account-stat-card {
  border-color: #232838;
  background: #181c28;
}
.account-stat-card.wide {
  grid-column: 1 / -1;
}
.account-stat-card > span {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 660;
}
html[data-user-theme="dark"] .account-stat-card > span {
  color: #94a3b8;
}
.account-stat-card > strong {
  font-size: 18px;
  font-weight: 840;
  line-height: 1.2;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.account-stat-card.wide > strong {
  font-size: 13.5px;
  font-weight: 740;
}
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #64748b;
  font-size: 12px;
  font-weight: 740;
}
html[data-user-theme="dark"] .account-pill {
  border-color: #2b3246;
  background: #12151f;
  color: #cbd5e1;
}
.account-pill.ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #059669;
}
html[data-user-theme="dark"] .account-pill.ok {
  border-color: rgba(16, 185, 129, .35);
  background: rgba(16, 185, 129, .14);
  color: #6ee7b7;
}
.account-dialog-status {
  margin: 0;
  padding: 9px 12px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}
html[data-user-theme="dark"] .account-dialog-status {
  background: #181c28;
  border-color: #232838;
  color: #94a3b8;
}
.account-dialog-status.bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}
html[data-user-theme="dark"] .account-dialog-status.bad {
  border-color: rgba(239, 68, 68, .35);
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
}
.account-qr-wrap {
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}
.account-dialog-qr {
  width: min(228px, 66vw);
  max-width: 100%;
  display: block;
  border-radius: 10px;
}
.account-modal-btn {
  width: 100%;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 11px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
html[data-user-theme="dark"] .account-modal-btn {
  border-color: #2a3145;
  background: #181c28;
}
.account-modal-btn.primary {
  min-height: 42px;
  font-size: 13.5px;
  border: 1px solid #0f172a;
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .16);
}
.account-modal-btn.primary:hover {
  background: #1e293b;
}
html[data-user-theme="dark"] .account-modal-btn.primary {
  border-color: #4f46e5;
  background: #4f46e5;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .32);
}
html[data-user-theme="dark"] .account-modal-btn.primary:hover {
  background: #4338ca;
}
.account-modal-btn.danger {
  min-height: 32px;
  font-size: 12px;
  font-weight: 680;
  border-color: #e2e8f0;
  background: transparent;
  color: #64748b;
}
html[data-user-theme="dark"] .account-modal-btn.danger {
  border-color: #272d3f;
  color: #94a3b8;
}
.account-modal-btn.danger:hover,
.account-confirm-row .account-modal-btn.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}
html[data-user-theme="dark"] .account-modal-btn.danger:hover,
html[data-user-theme="dark"] .account-confirm-row .account-modal-btn.danger {
  border-color: rgba(239, 68, 68, .4);
  background: rgba(239, 68, 68, .14);
  color: #fca5a5;
}
.account-confirm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.account-confirm-row .account-modal-btn {
  min-height: 34px;
  font-size: 12.5px;
}

@media (max-width: 720px) {
  .account-identity-actions { gap: 5px; }
  .account-switch,
  .account-settings {
    height: 30px;
    padding: 0 8px;
    font-size: 11.5px;
  }
}
@media (max-width: 460px) {
  .account-stat-grid { grid-template-columns: 1fr; }
  .account-dialog-panel { padding: 16px; }
}

/* === 2026-11-27 identity6 手机端账号弹窗快捷入口 === */
.account-mobile-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}
.account-mob-link {
  min-height: 38px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  font-size: 13px;
  font-weight: 680;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.account-mob-link.is-pri {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(37, 99, 235, 0.32);
  color: #2563eb;
}
html[data-user-theme="dark"] .account-mob-link.is-pri {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(96, 165, 250, 0.36);
  color: #60a5fa;
}
.account-mob-link.is-danger {
  background: rgba(225, 29, 72, 0.08);
  border-color: rgba(225, 29, 72, 0.28);
  color: #e11d48;
}
html[data-user-theme="dark"] .account-mob-link.is-danger {
  color: #fb7185;
}
