/* 应用工作台 · hub.css */
/* 与首页 hnyswm 同源：导航 #003366，品牌蓝 #1d6fe0 → #0f4c9e */
:root {
  --wh-navy: #003366;
  --wh-navy-strong: #002a55;
  --wh-bg: #f5f7fb;
  --wh-surface: #ffffff;
  --wh-surface-2: #f7f9fc;
  --wh-text: #1f2937;
  --wh-muted: #5b6472;
  --wh-line: #edf0f6;
  --wh-line-strong: #d7dee8;
  --wh-biz: #1d6fe0;
  --wh-biz-strong: #0f4c9e;
  --wh-biz-soft: #eaf2ff;
  --wh-memo: #003366;
  --wh-memo-soft: #e8eef7;
  --wh-danger: #b02a37;
  --wh-danger-soft: #fdeeee;
  --wh-radius: 18px;
  --wh-radius-sm: 9px;
  --wh-shadow: 0 1px 2px rgba(15, 41, 77, .04), 0 12px 32px rgba(15, 41, 77, .07);
  --wh-shadow-hover: 0 2px 4px rgba(15, 41, 77, .06), 0 18px 40px rgba(15, 41, 77, .13);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--wh-text);
  background: var(--wh-bg);
  font-family: "Microsoft YaHei", "simsun", "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--wh-biz); }

h1, h2, p, ul { margin: 0; }

ul { padding: 0; list-style: none; }

.wh-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--wh-text);
  color: #fff;
  text-decoration: none;
}
.wh-skip:focus { left: 12px; }

/* ---------- 顶栏 ---------- */
.wh-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
}

.wh-header-in {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wh-text);
  text-decoration: none;
  min-width: 0;
}

.wh-brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #1d6fe0, #0f4c9e);
  color: #fff;
  box-shadow: 0 4px 10px rgba(15, 41, 77, .22);
}

.wh-brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}
.wh-brand-text strong {
  font-size: 15px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42vw;
}
.wh-brand-text small {
  font-size: 12px;
  color: var(--wh-muted);
}

.wh-head-actions,
.wh-user {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.wh-link {
  color: var(--wh-muted);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  padding: 2px 2px;
}
.wh-link:hover { color: var(--wh-biz); text-decoration: underline; text-underline-offset: 3px; }
.wh-link--muted { color: #7a8699; }

.wh-btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--wh-line-strong);
  border-radius: 999px;
  color: var(--wh-text);
  text-decoration: none;
  font-size: 14px;
  background: var(--wh-surface);
  transition: border-color .16s, color .16s;
}
.wh-btn-ghost:hover { border-color: var(--wh-biz); color: var(--wh-biz); }

.wh-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--wh-biz-soft);
  color: var(--wh-biz-strong);
  font-size: 14px;
  font-weight: 650;
  user-select: none;
}

.wh-user-name {
  font-size: 14px;
  font-weight: 600;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 主体 ---------- */
.wh-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 40px;
}

.wh-hero { margin-bottom: 32px; }

.wh-eyebrow {
  font-size: 13px;
  color: var(--wh-biz);
  font-weight: 600;
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.wh-hero h1,
.wh-auth-copy h1 {
  font-size: clamp(1.55rem, 3.4vw, 2.1rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--wh-navy);
}

.wh-lede {
  margin-top: 10px;
  max-width: 620px;
  color: var(--wh-muted);
  font-size: 15px;
}

/* ---------- 系统卡片 ---------- */
.wh-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.wh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 28px;
  background: var(--wh-surface);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  box-shadow: var(--wh-shadow);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.wh-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--wh-card-accent, var(--wh-biz));
}

.wh-card--biz { --wh-card-accent: var(--wh-biz); --wh-card-soft: var(--wh-biz-soft); }
.wh-card--memo { --wh-card-accent: var(--wh-memo); --wh-card-soft: var(--wh-memo-soft); }

a.wh-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--wh-shadow-hover);
  border-color: var(--wh-line-strong);
}
a.wh-card:focus-visible {
  outline: 2px solid var(--wh-card-accent);
  outline-offset: 3px;
}

.wh-card.is-off { opacity: .62; }

.wh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.wh-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--wh-card-soft);
  color: var(--wh-card-accent);
}

.wh-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--wh-muted);
  background: var(--wh-surface-2);
  border: 1px solid var(--wh-line);
  white-space: nowrap;
}
.wh-state.is-on { color: var(--wh-card-accent); border-color: transparent; background: var(--wh-card-soft); }
.wh-state.is-on::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.wh-state.is-off { color: #8a6d3b; background: #fdf6e7; border-color: #f0e0bd; }

.wh-card h2 {
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -.01em;
}

.wh-desc {
  margin-top: 8px;
  color: var(--wh-muted);
  font-size: 14px;
  min-height: 44px;
}

.wh-tag {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--wh-card-accent);
  font-weight: 600;
}

.wh-feats {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--wh-line);
  display: grid;
  gap: 7px;
}

.wh-feats li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: #3d4a5f;
}
.wh-feats li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .58em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--wh-card-accent);
  opacity: .55;
}

.wh-last {
  margin-top: 14px;
  font-size: 12px;
  color: #8a94a6;
}

.wh-go {
  margin-top: auto;
  padding-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wh-card-accent);
  font-size: 14px;
  font-weight: 650;
}
.wh-go svg { transition: transform .18s ease; }
a.wh-card:hover .wh-go svg { transform: translateX(3px); }

/* ---------- 提示 ---------- */
.wh-tip {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius-sm);
  background: rgba(255, 255, 255, .72);
  color: var(--wh-muted);
  font-size: 13.5px;
}
.wh-tip-icon { color: var(--wh-biz); flex: 0 0 auto; margin-top: 1px; }
.wh-tip strong { color: var(--wh-text); margin-right: 6px; }
.wh-tip a { color: var(--wh-biz); text-underline-offset: 3px; }

/* ---------- 登录（访客） ---------- */
.wh-main--guest { padding-top: 56px; }

.wh-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 56px;
  align-items: center;
  margin-bottom: 48px;
}

.wh-auth-copy h1 { margin-top: 2px; }

.wh-points {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}
.wh-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #3d4a5f;
}
.wh-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--wh-biz);
  opacity: .65;
}

.wh-auth-card {
  background: var(--wh-surface);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  padding: 30px 28px;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .03), 0 20px 48px rgba(15, 35, 70, .09);
  scroll-margin-top: 90px;
}

.wh-auth-card h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.wh-auth-sub {
  margin-top: 4px;
  color: var(--wh-muted);
  font-size: 13.5px;
}

.wh-alert {
  margin-top: 16px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid #f3c9c4;
  border-left: 3px solid var(--wh-danger);
  background: var(--wh-danger-soft);
  color: var(--wh-danger);
  font-size: 13.5px;
}
.wh-alert--info {
  border-color: #cfe0f5;
  border-left-color: var(--wh-biz);
  background: var(--wh-biz-soft);
  color: var(--wh-biz-strong);
}

.wh-form { margin-top: 18px; }

.wh-field { margin-bottom: 14px; }
.wh-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #3d4a5f;
}

.wh-field input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--wh-line-strong);
  border-radius: var(--wh-radius-sm);
  background: var(--wh-surface);
  color: var(--wh-text);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.wh-field input::placeholder { color: #9aa5b6; }
.wh-field input:focus {
  border-color: var(--wh-biz);
  box-shadow: 0 0 0 3px rgba(29, 111, 224, .16);
}

.wh-passwrap { position: relative; }
.wh-passwrap input { padding-right: 44px; }

.wh-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7a8699;
  cursor: pointer;
}
.wh-eye:hover { background: var(--wh-surface-2); color: var(--wh-text); }
.wh-eye:focus-visible { outline: 2px solid var(--wh-biz); outline-offset: 1px; }

.wh-verify { display: flex; gap: 10px; align-items: center; }
.wh-verify input { flex: 1 1 auto; min-width: 0; }
.wh-verify img {
  width: 108px;
  height: 44px;
  flex: 0 0 108px;
  object-fit: cover;
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius-sm);
  cursor: pointer;
  background: var(--wh-surface-2);
}

.wh-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  font-size: 13.5px;
  color: var(--wh-muted);
  cursor: pointer;
  user-select: none;
}
.wh-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--wh-biz);
}

.wh-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--wh-radius-sm);
  background: var(--wh-biz);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background .16s, transform .06s;
}
.wh-submit:hover { background: var(--wh-biz-strong); }
.wh-submit:active { transform: translateY(1px); }
.wh-submit:focus-visible { outline: 2px solid var(--wh-text); outline-offset: 2px; }

.wh-reg {
  margin-top: 16px;
  text-align: center;
  font-size: 13.5px;
  color: var(--wh-muted);
}
.wh-reg a { color: var(--wh-biz); font-weight: 600; text-underline-offset: 3px; }

.wh-grid--preview .wh-card { min-height: 260px; }

/* ---------- 页脚 ---------- */
.wh-foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #8a94a6;
  font-size: 12.5px;
}
.wh-foot-dot { opacity: .6; }

/* ---------- 响应式 ---------- */
@media (max-width: 920px) {
  .wh-auth {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .wh-auth-card { max-width: 460px; }
}

@media (max-width: 720px) {
  .wh-main { padding: 32px 18px 32px; }
  .wh-header-in { padding: 10px 18px; }
  .wh-grid { grid-template-columns: minmax(0, 1fr); }
  .wh-card { min-height: 0; padding: 22px; }
  .wh-card .wh-go { padding-top: 18px; }
  .wh-feats { grid-template-columns: minmax(0, 1fr); }
  .wh-hero { margin-bottom: 24px; }
  .wh-main--guest { padding-top: 36px; }
  .wh-auth { margin-bottom: 36px; }
  .wh-brand-text strong { max-width: 34vw; }
  .wh-user { gap: 10px; }
  .wh-user-name { max-width: 96px; }
  .wh-foot { padding: 4px 18px 32px; }
}

@media (max-width: 420px) {
  .wh-auth-card { padding: 24px 20px; }
  .wh-head-actions { gap: 10px; }
  .wh-avatar { display: none; }
  .wh-brand-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}

/* 首页 hnyswm 为固定浅色版式，不跟随系统深色模式；
   这里不再提供暗色变量，避免插件页与主站观感割裂。 */

/* ---------- 个人中心 ---------- */
.wh-me { padding-top: 36px; }

.wh-me-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.wh-me-head h1 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--wh-navy);
}
.wh-me-head .wh-btn-ghost { flex: 0 0 auto; margin-bottom: 4px; }

.wh-note {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.wh-note.is-ok { background: #e8f6ed; color: #116232; border-color: #bfe4cc; }
.wh-note.is-err { background: var(--wh-danger-soft); color: var(--wh-danger); border-color: #f3c9c4; }

.wh-me-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}

.wh-panel {
  background: var(--wh-surface);
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-radius);
  box-shadow: var(--wh-shadow);
  padding: 24px;
}
.wh-panel-t {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--wh-navy);
}
.wh-panel-s {
  margin: 4px 0 16px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--wh-muted);
}

.wh-me-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--wh-line-strong);
  border-radius: var(--wh-radius-sm);
  background: var(--wh-surface);
  color: var(--wh-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
  min-height: 82px;
  transition: border-color .16s, box-shadow .16s;
}
.wh-me-form textarea::placeholder { color: #9aa5b6; }
.wh-me-form textarea:focus {
  border-color: var(--wh-biz);
  box-shadow: 0 0 0 3px rgba(var(--wh-biz-rgb), .16);
}
.wh-me-form .wh-field input:disabled {
  background: var(--wh-surface-2);
  color: var(--wh-muted);
  cursor: not-allowed;
}

.wh-me-listhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 7px;
}
.wh-me-listhead h3 {
  font-size: 13px;
  font-weight: 650;
  color: #3d4a5f;
}
.wh-me-clear {
  border: 0;
  background: none;
  padding: 2px 4px;
  color: var(--wh-muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  border-radius: 5px;
}
.wh-me-clear:hover { color: var(--wh-danger); background: var(--wh-danger-soft); }
.wh-me-clear:focus-visible { outline: 2px solid var(--wh-biz); outline-offset: 2px; }

.wh-me-list {
  max-height: 176px;
  overflow-y: auto;
  padding: 2px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--wh-line);
  border-radius: 10px;
  background: var(--wh-surface-2);
}
.wh-me-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--wh-line);
  font-size: 12.5px;
}
.wh-me-item:last-child { border-bottom: 0; }
.wh-me-item .t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--wh-text);
}
.wh-me-item .t a { color: var(--wh-biz); text-decoration: none; }
.wh-me-item .t a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wh-me-item .u { flex: 0 0 auto; color: #8a94a6; font-size: 11px; }
.wh-me-empty {
  padding: 22px 8px;
  text-align: center;
  font-size: 12.5px;
  color: #8a94a6;
}

.wh-me-sechead { margin: 32px 0 14px; }
.wh-me-sechead h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--wh-navy);
}
.wh-me-sechead p {
  margin-top: 6px;
  max-width: 760px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--wh-muted);
}

.wh-theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.wh-theme-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wh-theme-now {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--wh-biz-soft);
  color: var(--wh-biz);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.wh-tones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin: 2px 0 16px;
}
.wh-tone {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--wh-line-strong);
  border-radius: 10px;
  background: var(--wh-surface);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .06s;
}
.wh-tone:hover { border-color: #c9d7e8; }
.wh-tone:active { transform: translateY(1px); }
.wh-tone input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.wh-tone-sw {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--p), var(--pd));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
}
.wh-tone-nm {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wh-text);
  white-space: nowrap;
}
.wh-tone-ck {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--wh-biz);
  opacity: 0;
}
.wh-tone.on {
  border-color: var(--wh-biz);
  box-shadow: 0 0 0 2px var(--wh-biz-soft);
}
.wh-tone.on .wh-tone-ck { opacity: 1; }
.wh-tone:focus-within { outline: 2px solid var(--wh-biz); outline-offset: 2px; }

@media (max-width: 920px) {
  .wh-me-grid,
  .wh-theme-grid { grid-template-columns: minmax(0, 1fr); }
  .wh-me-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .wh-me-head .wh-btn-ghost { margin-bottom: 0; }
}

@media (max-width: 560px) {
  .wh-panel { padding: 20px 18px; }
  .wh-tones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wh-me { padding-top: 26px; }
}
