/*
 * 中控统一视觉升级 V3
 * 目标：雾蓝画布、轻量白色面板、明确层级、紧凑操作区。
 * 本文件只负责视觉与响应式，所有权限和业务逻辑保持不变。
 */

:root {
  --wb-radius-control: 10px;
  --wb-radius-card: 16px;
  --wb-radius-panel: 20px;
  --wb-shadow-card: 0 8px 26px color-mix(in srgb, var(--text) 7%, transparent);
  --wb-shadow-float: 0 22px 58px color-mix(in srgb, var(--text) 16%, transparent);
  --wb-hairline: color-mix(in srgb, var(--line) 86%, transparent);
  --wb-blue-soft: color-mix(in srgb, var(--primary) 9%, var(--panel));
  --wb-green-soft: color-mix(in srgb, var(--success) 10%, var(--panel));
  --wb-orange-soft: color-mix(in srgb, var(--warning) 10%, var(--panel));
  --wb-red-soft: color-mix(in srgb, var(--danger) 9%, var(--panel));
  --wb-purple: #7659e8;
  --wb-purple-soft: color-mix(in srgb, var(--wb-purple) 10%, var(--panel));
  --sidebar-width: 218px;
  --topbar-height: 66px;
}

html[data-scheme="light"] {
  --surface-subtle: color-mix(in srgb, var(--panel-2) 74%, var(--panel));
  --surface-hover: color-mix(in srgb, var(--primary) 6%, var(--panel));
  --surface-selected: color-mix(in srgb, var(--primary) 10%, var(--panel));
  --shadow-xs: 0 1px 3px rgba(38, 58, 91, .05);
  --shadow-sm: var(--wb-shadow-card);
  --shadow-lg: var(--wb-shadow-float);
}

html,
body {
  background: var(--bg);
}

html[data-scheme] body {
  background:
    radial-gradient(circle at 14% 0, color-mix(in srgb, var(--primary) 6%, transparent), transparent 26%),
    radial-gradient(circle at 92% 8%, color-mix(in srgb, var(--cyan) 5%, transparent), transparent 24%),
    var(--bg);
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 99px;
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  background-clip: padding-box;
}

/* 登录页 */
.login-page {
  min-height: 100dvh;
  grid-template-columns: minmax(520px, 1.12fr) minmax(420px, .88fr);
  padding: clamp(16px, 2.2vw, 34px);
  gap: clamp(16px, 2vw, 30px);
  background:
    radial-gradient(circle at 16% 10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 28%),
    var(--bg);
}

.login-brand {
  min-height: calc(100dvh - clamp(32px, 4.4vw, 68px));
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  border: 1px solid var(--wb-hairline);
  border-radius: 26px;
  background:
    radial-gradient(circle at 75% 24%, color-mix(in srgb, var(--cyan) 13%, transparent), transparent 24%),
    radial-gradient(circle at 88% 62%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--primary) 7%, var(--panel)), var(--panel) 46%, var(--panel-2));
  box-shadow: var(--wb-shadow-card);
}

.login-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: auto;
  right: 3%;
  top: 24%;
  bottom: auto;
  width: clamp(230px, 22vw, 330px);
  height: clamp(150px, 16vw, 228px);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 34px;
  background:
    radial-gradient(circle at 70% 28%, color-mix(in srgb, var(--cyan) 58%, transparent) 0 4%, transparent 5%),
    radial-gradient(circle at 58% 58%, color-mix(in srgb, var(--success) 62%, transparent) 0 5%, transparent 6%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel) 68%, transparent), color-mix(in srgb, var(--primary) 16%, transparent));
  box-shadow:
    28px 34px 0 -12px color-mix(in srgb, var(--primary) 9%, transparent),
    -30px 62px 0 -22px color-mix(in srgb, var(--cyan) 9%, transparent),
    0 26px 70px color-mix(in srgb, var(--primary) 15%, transparent);
  transform: rotate(-5deg);
  opacity: .72;
  animation: none;
}

.login-brand::after {
  content: "✓";
  display: grid;
  place-items: center;
  position: absolute;
  z-index: -1;
  left: auto;
  right: 11%;
  top: 34%;
  bottom: auto;
  width: 82px;
  height: 94px;
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 28px 28px 40px 40px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 78%, #73a8ff), var(--primary));
  box-shadow: 0 20px 44px color-mix(in srgb, var(--primary) 25%, transparent);
  font-size: 34px;
  font-weight: 800;
  transform: rotate(4deg);
  animation: none;
}

.brand-mark {
  position: relative;
  z-index: 2;
  color: var(--text);
}

.brand-logo,
.top-brand-mark,
.avatar {
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 78%, #79a8ff), var(--primary));
  box-shadow: 0 9px 22px color-mix(in srgb, var(--primary) 22%, transparent);
}

.brand-copy {
  position: relative;
  z-index: 2;
  max-width: 520px;
}

.brand-copy h1 {
  max-width: 500px;
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(36px, 3.25vw, 50px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -.05em;
}

.brand-copy h1::after {
  width: 54px;
  height: 4px;
  margin-top: 22px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--cyan) 70%, var(--primary)));
  box-shadow: none;
}

.brand-copy > p {
  max-width: 500px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.brand-features {
  max-width: 560px;
  gap: 12px;
  margin-top: 30px;
}

.brand-features > div {
  min-height: 84px;
  padding: 15px 16px;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-left: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--text) 5%, transparent);
  backdrop-filter: blur(10px);
}

.brand-features > div:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
  background: var(--panel);
}

.brand-features strong {
  color: var(--text);
}

.brand-features span,
.login-brand > small {
  color: var(--muted);
}

.login-brand > small {
  position: relative;
  z-index: 2;
}

.login-side {
  padding: clamp(22px, 4vw, 58px);
  border: 1px solid var(--wb-hairline);
  border-radius: 26px;
  background: color-mix(in srgb, var(--panel) 56%, transparent);
}

.login-side::before {
  content: "统一身份认证";
  right: 28px;
  top: 24px;
  color: var(--muted);
  font: 700 11px/1 var(--ui-font);
  letter-spacing: .08em;
}

.login-card {
  width: min(430px, 100%);
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid var(--wb-hairline);
  border-top-color: var(--wb-hairline);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--wb-shadow-float);
}

.login-card::before {
  width: 44px;
  height: 4px;
  margin: calc(clamp(28px, 3vw, 42px) * -1) 0 30px;
  border-radius: 99px;
  background: var(--primary);
  box-shadow: none;
}

.login-heading h2 {
  color: var(--text);
  font-size: 30px;
  font-weight: 760;
}

.login-heading p {
  margin-bottom: 30px;
  color: var(--muted);
}

.login-card .field input {
  height: 50px;
  border-radius: 12px;
  background: var(--control-bg);
}

.login-card .primary-btn {
  min-height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 82%, #7a9cff), var(--primary-2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 24%, transparent);
}

.demo-tip {
  border-color: var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel-2);
  font-family: var(--ui-font);
}

.demo-tip strong {
  color: var(--primary);
}

/* 中控外壳：管理员和员工共用 */
.app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  inset: var(--topbar-height) auto 0 0;
  width: var(--sidebar-width);
  padding: 14px 11px 16px;
  border-right: 1px solid color-mix(in srgb, var(--shell-accent) 10%, var(--shell-border));
  background:
    radial-gradient(circle at 12% 0, color-mix(in srgb, var(--shell-accent) 10%, transparent), transparent 25%),
    var(--shell-bg);
}

.workspace-profile {
  min-height: 62px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border-color: color-mix(in srgb, var(--shell-accent) 16%, var(--shell-border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--shell-raised) 94%, transparent);
}

.nav-label {
  margin: 17px 11px 7px;
  color: var(--shell-muted);
  font-family: var(--ui-font);
  font-size: 10px;
  letter-spacing: .08em;
}

.nav-item,
.nav-directory-trigger {
  min-height: 42px;
  border-radius: 10px;
}

.app-shell > .sidebar .nav-item.active,
html[data-scheme] .app-shell > .sidebar .nav-item.active:hover {
  border-color: color-mix(in srgb, var(--shell-accent) 24%, var(--shell-border));
  background: linear-gradient(90deg, color-mix(in srgb, var(--shell-accent) 13%, var(--shell-raised)), var(--shell-raised));
  box-shadow: inset 3px 0 0 var(--shell-accent), 0 5px 15px rgba(0, 0, 0, .08);
}

.sidebar-foot {
  margin-top: 12px;
  padding-top: 13px;
}

.main {
  padding-top: var(--topbar-height);
}

html[data-scheme] .app-shell .topbar {
  height: var(--topbar-height);
  padding: 0 18px;
  gap: 14px;
  background: color-mix(in srgb, var(--shell-bg) 96%, transparent);
  box-shadow: 0 8px 24px rgba(7, 20, 38, .12);
  backdrop-filter: blur(18px);
}

.topbar-brand {
  width: 200px;
}

.top-sections button,
.app-shell .topbar .search-box,
.app-shell .topbar .icon-btn,
.app-shell .topbar .user-trigger {
  border-radius: 12px;
}

.app-shell .topbar .search-box {
  height: 42px;
  background: color-mix(in srgb, var(--shell-raised) 92%, transparent);
}

.app-shell .topbar .icon-btn {
  width: 42px;
  height: 42px;
}

.content {
  width: 100%;
  max-width: 1760px;
  padding: 22px 24px 46px;
}

/* 页面层级与通用容器 */
.page-heading {
  min-height: 68px;
  margin-bottom: 16px;
  padding: 3px 2px 14px;
  border-bottom: 0;
}

.page-heading > div:first-child {
  position: relative;
  padding-left: 15px;
}

.page-heading > div:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 28px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--cyan) 65%, var(--primary)));
}

.page-heading h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 760;
  letter-spacing: -.035em;
}

.page-heading h1::before {
  display: none;
}

.page-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.section-card,
.org-workspace,
.dimension-category,
.relation-console,
.role-card,
.dimension-card,
.department-manage-card,
.task-stat-grid article,
.intelligence-hero,
.activity-rail {
  border: 1px solid var(--wb-hairline);
  border-radius: var(--wb-radius-card);
  background: var(--panel);
  box-shadow: var(--wb-shadow-card);
}

.section-card {
  margin-bottom: 16px;
  padding: 18px 20px;
}

.section-card::before {
  width: 3px;
  height: 24px;
  top: 17px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--cyan) 66%, var(--primary)));
  box-shadow: none;
}

.section-head {
  margin-bottom: 15px;
}

.section-head h3 {
  font-size: 16px;
  font-weight: 750;
}

.section-head p {
  color: var(--muted);
}

.toolbar,
.org-toolbar,
.knowledge-toolbar,
.task-filter-bar {
  border-color: var(--wb-hairline);
}

.toolbar-search,
.org-search,
.org-status-filter,
.task-filter-bar select,
.task-filter-bar input,
.field input,
.field select,
.field textarea,
.module-url {
  border-color: var(--line);
  border-radius: var(--wb-radius-control);
  color: var(--text);
  background: var(--control-bg);
}

.field input,
.field select {
  min-height: 44px;
}

.field textarea {
  min-height: 92px;
}

.primary-btn,
.secondary-btn,
.filter-btn,
.row-action,
.text-btn,
.activity-all,
.enter-btn {
  border-radius: var(--wb-radius-control);
}

.primary-btn,
.command-form > button {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 84%, #7898ff), var(--primary-2));
  background-color: var(--primary);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent);
}

.secondary-btn,
.filter-btn {
  border-color: var(--line);
  color: var(--text-2);
  background: var(--panel);
}

.filter-btn.active,
html[data-scheme] .filter-btn.active:hover {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  color: var(--action-text);
  background: var(--wb-blue-soft);
}

.org-tabs,
.task-tabs,
.module-registry-tabs,
.knowledge-main-tabs {
  border-color: var(--wb-hairline);
  border-radius: 12px;
  background: var(--panel-2);
}

.org-tab,
.task-tabs button,
.module-registry-tabs button {
  border-radius: 9px;
}

/* 表格、列表和数据卡 */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--wb-hairline);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 5px 18px color-mix(in srgb, var(--text) 4%, transparent);
}

.data-table th {
  padding: 13px 14px;
  border-color: var(--wb-hairline);
  color: var(--muted);
  background: var(--panel-2);
  font-family: var(--ui-font);
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: none;
}

.data-table td {
  padding: 14px;
  border-color: var(--wb-hairline);
  color: var(--text-2);
  background: var(--panel);
}

.data-table tbody tr:hover td,
.org-member-table tbody tr:hover td,
.interactive-row:hover td {
  background: var(--surface-hover) !important;
}

.org-stat,
.announcement-summary > div,
.task-stat-grid article {
  min-height: 100px;
  padding: 15px 16px;
}

.org-stat strong,
.announcement-summary strong,
.task-stat-grid strong {
  color: var(--text);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.role-card,
.dimension-card,
.department-manage-card,
.unified-task-row,
.dimension-value-row,
.knowledge-files article,
.registry-module-card,
.app-launcher-card {
  border-color: var(--wb-hairline);
  border-radius: 14px;
  background: var(--panel);
}

.role-card:hover,
.dimension-card:hover,
.department-manage-card:hover,
.unified-task-row:hover,
.registry-module-card:hover,
.app-launcher-card:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  background: var(--surface-hover);
  box-shadow: var(--wb-shadow-card);
}

.pill,
.status-tag,
.member-status,
.registry-status,
.registry-health,
.task-priority,
.task-status {
  border-radius: 999px;
}

.empty-state,
.rail-empty {
  border-radius: 14px;
  color: var(--muted);
}

/* 公共维度：按公司公共目录与项目业务板块分区，不再把全部维度铺成一张长网格。 */
.dimension-category-catalog {
  display: grid;
  gap: 16px;
}

.dimension-category-catalog > .section-head {
  margin-bottom: 0;
}

.dimension-project-stack {
  display: grid;
  gap: 16px;
}

.dimension-project-panel {
  overflow: hidden;
  border: 1px solid var(--wb-hairline);
  border-radius: 16px;
  background: var(--panel-2);
}

.dimension-project-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--wb-hairline);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 8%, var(--panel)), var(--panel));
}

.dimension-project-panel.is-shared .dimension-project-head {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cyan) 9%, var(--panel)), var(--panel));
}

.dimension-project-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 13px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--panel));
  font-size: 17px;
  font-weight: 800;
}

.dimension-project-panel.is-shared .dimension-project-mark {
  border-color: color-mix(in srgb, var(--cyan) 26%, var(--line));
  color: color-mix(in srgb, var(--cyan) 72%, var(--text));
  background: color-mix(in srgb, var(--cyan) 10%, var(--panel));
}

.dimension-project-head > div {
  min-width: 0;
}

.dimension-project-head h4 {
  margin: 2px 0 3px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.3;
}

.dimension-project-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.dimension-project-head > strong {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  background: var(--panel);
  font-size: 12px;
  white-space: nowrap;
}

.dimension-project-groups {
  display: grid;
  gap: 1px;
  background: var(--wb-hairline);
}

.dimension-project-group {
  min-width: 0;
  padding: 16px 18px 18px;
  background: var(--panel);
}

.dimension-project-group > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.dimension-project-group > header > div {
  display: grid;
  gap: 3px;
}

.dimension-project-group > header span {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.dimension-project-group > header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.dimension-project-group > header b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.dimension-project-group .dimension-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .dimension-project-group .dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dimension-project-head {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 14px;
  }

  .dimension-project-mark {
    width: 40px;
    height: 40px;
  }

  .dimension-project-head > strong {
    grid-column: 2;
    justify-self: start;
  }

  .dimension-project-group {
    padding: 14px;
  }

  .dimension-project-group .dimension-grid {
    grid-template-columns: 1fr;
  }
}

/* 首页：参考图的轻量业务中枢 */
.command-layout {
  min-height: calc(100vh - 112px);
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 18px;
}

.command-main {
  gap: 18px;
}

.command-console {
  position: relative;
  min-height: 258px;
  padding: 25px 22px 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--line));
  border-radius: var(--wb-radius-panel);
  background:
    radial-gradient(circle at 73% 18%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 22%),
    radial-gradient(circle at 91% 72%, color-mix(in srgb, var(--primary) 15%, transparent), transparent 27%),
    linear-gradient(135deg, var(--panel), color-mix(in srgb, var(--primary) 5%, var(--panel)) 62%, var(--panel-2));
  box-shadow: var(--wb-shadow-card);
}

.command-console::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  height: auto;
  background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--cyan) 72%, var(--primary)));
  opacity: 1;
  mask-image: none;
}

.command-console::after {
  content: "✓";
  display: grid;
  place-items: center;
  position: absolute;
  right: 7.5%;
  top: 22px;
  width: 78px;
  height: 88px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 22px 22px 30px 30px;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 68%, #87b9ff), var(--primary));
  box-shadow:
    -74px 7px 0 -17px color-mix(in srgb, var(--cyan) 14%, transparent),
    64px 18px 0 -22px color-mix(in srgb, var(--primary) 14%, transparent),
    0 18px 42px color-mix(in srgb, var(--primary) 24%, transparent);
  font-size: 32px;
  font-weight: 800;
  transform: rotate(5deg);
  opacity: .9;
  pointer-events: none;
}

.command-heading,
.command-form,
.command-feedback,
.command-shortcuts {
  position: relative;
  z-index: 1;
}

.command-heading h1 {
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -.04em;
}

.command-identity {
  min-width: 176px;
  padding: 9px 11px;
  border-color: color-mix(in srgb, var(--primary) 13%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  backdrop-filter: blur(10px);
}

.command-form {
  min-height: 54px;
  margin-top: 18px;
  padding: 6px 7px 6px 10px;
  grid-template-columns: 32px 92px minmax(180px, 1fr) auto;
  gap: 9px;
  border-color: color-mix(in srgb, var(--primary) 18%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 7px 22px color-mix(in srgb, var(--text) 6%, transparent);
  backdrop-filter: blur(12px);
}

.command-form input,
.command-form > button {
  height: 40px;
}

.command-prompt {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--primary);
  background: var(--wb-blue-soft);
}

.command-feedback {
  margin-top: 8px;
}

.command-shortcuts {
  margin-top: 13px;
  gap: 9px;
}

.command-shortcut {
  min-height: 58px;
  padding: 9px 10px;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 9px;
  border-color: var(--wb-hairline);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 4%, transparent);
}

.command-shortcut > span {
  width: 30px;
  height: 30px;
  margin: 0;
  border-radius: 9px;
}

.command-shortcut:nth-child(2) > span { color: var(--success); background: var(--wb-green-soft); }
.command-shortcut:nth-child(3) > span { color: var(--warning); background: var(--wb-orange-soft); }
.command-shortcut:nth-child(4) > span { color: var(--wb-purple); background: var(--wb-purple-soft); }

.command-metrics {
  gap: 14px;
}

.command-metrics button {
  position: relative;
  min-height: 92px;
  padding: 15px 16px;
  overflow: hidden;
  border-color: transparent;
  border-radius: var(--wb-radius-card);
  background: color-mix(in srgb, var(--primary) 13%, var(--panel));
  box-shadow: none;
}

.command-metrics button:nth-child(2) { background: color-mix(in srgb, var(--success) 13%, var(--panel)); }
.command-metrics button:nth-child(3) { background: color-mix(in srgb, var(--warning) 13%, var(--panel)); }
.command-metrics button:nth-child(4) { background: color-mix(in srgb, var(--wb-purple) 13%, var(--panel)); }

.command-metrics button::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.command-metrics button:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, currentColor 12%, transparent);
  box-shadow: var(--wb-shadow-card);
}

.command-metrics strong {
  margin-top: 7px;
  font-size: 25px;
}

.command-apps,
.command-notices {
  padding: 18px 20px;
}

.command-apps .section-head {
  margin-bottom: 16px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--wb-hairline);
}

.command-apps .app-grid {
  grid-template-columns: repeat(4, minmax(0, 190px));
  justify-content: center;
  gap: 16px;
}

.command-apps .app-card.app-card-compact {
  min-height: 120px;
  border-color: var(--wb-hairline);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: 0 5px 18px color-mix(in srgb, var(--text) 5%, transparent);
}

.command-apps .app-card-compact .app-open-trigger {
  min-height: 118px;
  padding: 14px 12px 12px;
}

.command-apps .app-card.app-card-compact:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--text) 9%, transparent);
}

.activity-rail {
  top: 88px;
  overflow: hidden;
  border-radius: var(--wb-radius-panel);
}

.activity-head {
  padding: 18px 16px 15px;
  background: linear-gradient(145deg, var(--panel), var(--panel-2));
}

.activity-head span {
  color: var(--primary);
  font-family: var(--ui-font);
  font-size: 9px;
  letter-spacing: .12em;
}

.activity-item {
  min-height: 68px;
  border-radius: 12px;
}

.activity-icon {
  border-radius: 10px;
  color: var(--primary);
  background: var(--wb-blue-soft);
}

.command-notices .notice-list {
  border-color: var(--wb-hairline);
  border-radius: 14px;
  background: var(--panel-2);
}

/* 应用中心 */
.apps-view .app-launcher {
  border-radius: var(--wb-radius-panel);
  background: var(--panel);
}

.apps-view .app-launcher-card {
  border-color: var(--wb-hairline);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.apps-view .app-launcher-card .app-icon,
.command-apps .app-icon {
  border: 0;
  border-radius: 13px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 18%, transparent);
}

/* 权限、组织和维度页面的大型配置区 */
.permission-management-tabs,
.department-permission-shell,
.permission-v2-simple,
.dimension-category,
.relation-console {
  border: 1px solid var(--wb-hairline);
  border-radius: var(--wb-radius-card);
  background: var(--panel);
  box-shadow: var(--wb-shadow-card);
}

.permission-management-tabs {
  padding: 5px;
}

.permission-management-tabs button {
  min-height: 38px;
  border-radius: 10px;
}

.permission-management-tabs button.active {
  color: var(--primary);
  background: var(--wb-blue-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 28%, var(--line));
}

.department-permission-shell > header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--wb-hairline);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.permission-v2-module-groups > section {
  border-color: var(--wb-hairline);
  border-radius: 14px;
  background: var(--panel-2);
}

.permission-v2-group-option {
  border-color: var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.permission-v2-group-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: var(--wb-blue-soft);
}

.org-summary .org-stat:nth-child(1) { background: color-mix(in srgb, var(--primary) 8%, var(--panel)); }
.org-summary .org-stat:nth-child(2) { background: color-mix(in srgb, var(--success) 8%, var(--panel)); }
.org-summary .org-stat:nth-child(3) { background: color-mix(in srgb, var(--warning) 8%, var(--panel)); }
.org-summary .org-stat:nth-child(4) { background: color-mix(in srgb, var(--danger) 7%, var(--panel)); }

/* 弹窗、抽屉和选择器 */
.overlay,
.modal::backdrop {
  background: rgba(25, 37, 57, .42);
  backdrop-filter: blur(8px);
}

.drawer {
  border-color: var(--wb-hairline);
  border-radius: 22px 0 0 22px;
  background: var(--panel);
  box-shadow: var(--wb-shadow-float);
}

.modal {
  border: 1px solid var(--wb-hairline);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--wb-shadow-float);
}

.modal form {
  padding: 22px 24px;
}

.modal-head {
  margin-bottom: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--wb-hairline);
}

.modal-head h3,
.drawer-head h3 {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.modal-actions {
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--wb-hairline);
}

.close-btn {
  width: 40px;
  height: 40px;
  border-color: var(--line);
  border-radius: 11px;
  background: var(--panel-2);
}

.member-form-section,
.role-config-section,
.permission-group,
.dimension-option-editor,
.password-reset-panel,
.knowledge-module-scope,
.knowledge-files,
.dimension-value-relations,
.relation-group,
.task-target-builder,
.task-target-conditions {
  border-color: var(--wb-hairline);
  border-radius: 14px;
  background: var(--panel-2);
}

.check-field,
.permission-option,
.access-option,
.dimension-option-row,
.knowledge-check {
  border-color: var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.permission-option:has(input:checked),
.access-option:has(input:checked),
.knowledge-check:has(input:checked) {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line));
  color: var(--primary);
  background: var(--wb-blue-soft);
}

.toast {
  border-radius: 12px;
  box-shadow: var(--wb-shadow-float);
}

/* 键盘与动效 */
button,
[role="button"],
.app-card,
.section-card,
.unified-task-row {
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

@media (max-width: 1380px) {
  .command-console::after {
    right: 5%;
    opacity: .58;
  }

  .command-apps .app-grid {
    grid-template-columns: repeat(4, minmax(0, 176px));
  }
}

@media (max-width: 1080px) {
  .login-page {
    grid-template-columns: minmax(440px, 1fr) minmax(380px, .88fr);
  }

  .login-brand::before,
  .login-brand::after {
    opacity: .45;
  }

  .command-layout {
    grid-template-columns: 1fr;
  }

  .activity-rail {
    position: static;
  }

  .command-apps .app-grid {
    grid-template-columns: repeat(4, minmax(0, 190px));
  }
}

@media (max-width: 860px) {
  .login-page {
    display: block;
    padding: 14px;
  }

  .login-brand {
    display: none;
  }

  .login-side {
    min-height: calc(100dvh - 28px);
    border-radius: 20px;
  }

  .main {
    padding-top: 66px;
  }

  .sidebar {
    inset: 66px auto 0 0;
  }

  html[data-scheme] .app-shell .topbar {
    height: 66px;
    padding: 0 13px;
  }

  .content {
    padding: 17px 14px 36px;
  }

  .command-console::after {
    display: none;
  }

  .command-apps .app-grid {
    grid-template-columns: repeat(2, minmax(0, 220px));
  }
}

@media (max-width: 640px) {
  .content {
    padding: 14px 10px 30px;
  }

  .page-heading {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .section-card {
    padding: 16px;
    border-radius: 14px;
  }

  .command-console {
    padding: 20px 16px 16px;
    border-radius: 16px;
  }

  .command-form {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .command-form > button {
    grid-column: 1 / -1;
  }

  .command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .command-apps .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .modal form {
    padding: 18px 16px;
  }
}

@media (max-width: 420px) {
  .command-apps .app-grid {
    grid-template-columns: minmax(0, 260px);
  }
}

/* Dashboard Visual Rebuild V2 — TARGET_REFERENCE high-fidelity pass. */
.command-layout {
  grid-template-columns: minmax(0, 4fr) minmax(270px, 1fr);
  gap: 18px;
}

.command-main {
  gap: 18px;
}

.command-console {
  min-height: 214px;
  padding: 26px 26px 22px;
  isolation: isolate;
  border: 1px solid rgba(85, 117, 180, .06);
  border-radius: 18px;
  background:
    radial-gradient(circle at 65% 42%, rgba(82, 220, 187, .11), transparent 14%),
    radial-gradient(circle at 86% 22%, rgba(83, 143, 255, .18), transparent 28%),
    linear-gradient(118deg, #fbfdff 0%, #f4f8ff 52%, #edf3ff 100%);
  box-shadow: 0 6px 24px rgba(30, 55, 90, .055);
}

.command-heading {
  position: relative;
  z-index: 3;
  min-height: 70px;
}

.command-heading h1 {
  color: #13213a;
  font-size: clamp(28px, 1.7vw, 32px);
  font-weight: 760;
  letter-spacing: -.045em;
}

.command-heading h1 > span {
  display: inline-block;
  margin-left: 4px;
  font-size: .72em;
  transform: translateY(-2px);
}

.command-heading p {
  max-width: 620px;
  margin-top: 9px;
  color: #708098;
  font-size: 13px;
  line-height: 1.55;
}

.command-console::after {
  display: none;
}

.hero-visual {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 3.5%;
  width: min(420px, 39%);
  height: 142px;
  pointer-events: none;
}

.hero-ui-card {
  position: absolute;
  display: block;
  border: 1px solid rgba(255, 255, 255, .64);
  background: linear-gradient(145deg, rgba(126, 178, 255, .64), rgba(90, 131, 236, .28));
  box-shadow: 0 16px 38px rgba(73, 112, 206, .13);
  backdrop-filter: blur(3px);
}

.hero-ui-card-left {
  left: 4%;
  top: 25px;
  width: 180px;
  height: 72px;
  padding: 21px 18px;
  border-radius: 12px;
  transform: rotate(7deg);
}

.hero-ui-card-left i {
  display: block;
  width: 72%;
  height: 6px;
  margin-bottom: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .58);
}

.hero-ui-card-left i:nth-child(2) { width: 48%; }
.hero-ui-card-left i:nth-child(3) { width: 32%; background: rgba(55, 109, 234, .5); }

.hero-ui-card-right {
  right: 2%;
  top: 20px;
  width: 148px;
  height: 104px;
  padding: 21px 18px;
  border-radius: 17px;
  transform: rotate(8deg);
}

.hero-ui-card-right b {
  display: block;
  width: 34px;
  height: 18px;
  margin-bottom: 16px;
  border-radius: 99px;
  background: rgba(52, 99, 220, .46);
  box-shadow: 42px 0 0 rgba(255, 255, 255, .52), 84px 0 0 rgba(255, 255, 255, .52);
}

.hero-ui-card-right i {
  display: block;
  width: 82%;
  height: 7px;
  margin-bottom: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .55);
}

.hero-ui-card-right i:last-child { width: 56%; }

.hero-shield {
  position: absolute;
  z-index: 4;
  right: 23%;
  bottom: -1px;
  width: 76px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px 22px 30px 30px;
  color: #fff;
  background: linear-gradient(145deg, #6da4ff, #3f6df6 74%);
  box-shadow: 0 18px 35px rgba(63, 109, 246, .22);
  transform: rotate(7deg);
}

.hero-shield svg {
  width: 36px;
  height: 36px;
  stroke-width: 2;
}

.hero-orb {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
}

.hero-orb-one {
  left: 2%;
  top: 64px;
  width: 24px;
  height: 24px;
  background: rgba(83, 226, 187, .22);
}

.hero-orb-two {
  left: 17%;
  top: 63px;
  width: 13px;
  height: 13px;
  background: #20c993;
  box-shadow: 0 5px 14px rgba(32, 201, 147, .25);
}

.command-form {
  position: absolute;
  z-index: 6;
  right: 26px;
  bottom: 21px;
  left: 26px;
  min-height: 55px;
  margin: 0;
  padding: 6px 7px 6px 11px;
  grid-template-columns: 28px 95px minmax(180px, 1fr) auto;
  gap: 10px;
  border: 1px solid rgba(105, 133, 184, .1);
  border-radius: 13px;
  background: rgba(255, 255, 255, .91);
  box-shadow: 0 9px 24px rgba(41, 68, 123, .075);
}

.command-form label strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #27364f;
  font-size: 13px;
}

.command-form label b {
  color: #718097;
  font-size: 12px;
  font-weight: 600;
}

.command-form input,
.command-form > button {
  height: 42px;
}

.command-form input {
  padding: 0 14px;
  border-color: rgba(112, 137, 181, .12);
  color: #26354f;
  background: rgba(249, 251, 255, .78);
  font-size: 13px;
}

.command-form > button {
  min-width: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4d7cff, #3f64e8);
  box-shadow: 0 8px 18px rgba(63, 100, 232, .22);
  font-size: 13px;
}

.command-form > button svg {
  width: 15px;
  height: 15px;
}

.command-feedback {
  display: none;
}

.dashboard-module-strip {
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-module-shortcut {
  min-height: 88px;
  padding: 15px 14px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  border-color: rgba(100, 128, 177, .1);
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(30, 55, 90, .045);
}

.dashboard-module-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #3971f5;
  background: linear-gradient(145deg, #eaf2ff, #dce9ff);
}

.dashboard-module-shortcut:nth-child(2) .dashboard-module-icon {
  color: #8a5cf6;
  background: linear-gradient(145deg, #f0eaff, #e7ddff);
}

.dashboard-module-shortcut:nth-child(3) .dashboard-module-icon {
  color: #13a982;
  background: linear-gradient(145deg, #e6f9f3, #d8f3eb);
}

.dashboard-module-shortcut:nth-child(4) .dashboard-module-icon {
  color: #3979f6;
  background: linear-gradient(145deg, #eaf2ff, #dbe8ff);
}

.dashboard-module-shortcut:nth-child(5) .dashboard-module-icon {
  color: #6c7890;
  background: linear-gradient(145deg, #f3f6fa, #e9eef5);
}

.dashboard-module-icon svg {
  width: 21px;
  height: 21px;
}

.dashboard-module-shortcut strong {
  color: #18263e;
  font-size: 14px;
  font-weight: 720;
}

.dashboard-module-shortcut small {
  margin-top: 5px;
  color: #7c899e;
  font-size: 11px;
}

.dashboard-overview {
  padding: 16px;
  border-color: rgba(100, 128, 177, .08);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(30, 55, 90, .05);
}

.dashboard-overview .command-metrics {
  margin: 0;
  gap: 14px;
}

.dashboard-overview .command-metrics button {
  min-height: 116px;
  padding: 18px 18px;
  border-radius: 15px;
  background: linear-gradient(135deg, #f3f7ff, #e9f1ff) !important;
  box-shadow: inset 0 0 0 1px rgba(63, 109, 246, .015);
}

.dashboard-overview .command-metrics button:nth-child(2) { background: linear-gradient(135deg, #f0fbf7, #e4f7f0) !important; }
.dashboard-overview .command-metrics button:nth-child(3) { background: linear-gradient(135deg, #fff7f1, #ffecdf) !important; }
.dashboard-overview .command-metrics button:nth-child(4) { background: linear-gradient(135deg, #f8f4ff, #eee7ff) !important; }

.dashboard-overview .command-metrics button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(30, 55, 90, .08);
}

.dashboard-overview .command-metrics .metric-copy > span:first-child {
  color: #4778ff;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-overview .command-metrics button:nth-child(2) .metric-copy > span:first-child { color: #11966f; }
.dashboard-overview .command-metrics button:nth-child(3) .metric-copy > span:first-child { color: #e66c25; }
.dashboard-overview .command-metrics button:nth-child(4) .metric-copy > span:first-child { color: #8056d9; }

.dashboard-overview .command-metrics .metric-value {
  margin-top: 7px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.dashboard-overview .command-metrics .metric-value strong {
  margin: 0;
  color: #17233a;
  font-size: 31px;
  font-weight: 770;
  line-height: 1;
}

.dashboard-overview .command-metrics .metric-value em {
  color: #7f8da2;
  font-size: 11px;
  font-style: normal;
}

.dashboard-overview .command-metrics small {
  margin-top: 8px;
  color: #7e8ba0;
  font-size: 11px;
}

.dashboard-overview .command-metrics i {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 10px 26px rgba(63, 109, 246, .14);
}

.dashboard-overview .command-metrics i svg {
  width: 28px;
  height: 28px;
}

.dashboard-overview .command-metrics button > b {
  position: absolute;
  right: 13px;
  bottom: 12px;
  width: 15px;
  height: 15px;
  color: #718097;
}

.dashboard-overview .command-metrics button > b svg {
  width: 100%;
  height: 100%;
}

.dashboard-common {
  margin-top: 16px;
  padding-top: 16px;
}

.dashboard-common .section-head {
  min-height: 28px;
  margin-bottom: 12px;
}

.dashboard-common .section-head h3 {
  color: #17233a;
  font-size: 18px;
  font-weight: 760;
}

.dashboard-common .command-shortcuts {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-common .command-shortcut {
  position: relative;
  min-height: 84px;
  padding: 13px 27px 13px 13px;
  grid-template-columns: 40px minmax(0, 1fr) 13px;
  gap: 10px;
  border-color: rgba(100, 128, 177, .1);
  border-radius: 13px;
  background: #fff;
}

.dashboard-common .command-shortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(63, 109, 246, .22);
  box-shadow: 0 8px 20px rgba(30, 55, 90, .07);
}

.dashboard-common .command-shortcut-icon {
  width: 40px;
  height: 40px;
  margin: 0;
  border-radius: 12px;
  color: #3971f5;
  background: #eaf2ff;
}

.dashboard-common .command-shortcut:nth-child(2) .command-shortcut-icon { color: #0aa77c; background: #e4f8f1; }
.dashboard-common .command-shortcut:nth-child(3) .command-shortcut-icon { color: #3971f5; background: #eaf2ff; }
.dashboard-common .command-shortcut:nth-child(4) .command-shortcut-icon { color: #f0802e; background: #fff0e5; }
.dashboard-common .command-shortcut:nth-child(5) .command-shortcut-icon { color: #8a5cf6; background: #efe9ff; }
.dashboard-common .command-shortcut:nth-child(6) .command-shortcut-icon { color: #3971f5; background: #eaf2ff; }

.dashboard-common .command-shortcut-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-common .command-shortcut-copy {
  min-width: 0;
}

.dashboard-common .command-shortcut strong {
  color: #18263e;
  font-size: 13px;
  font-weight: 720;
}

.dashboard-common .command-shortcut small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #8591a4;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-common .command-shortcut > i {
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 13px;
  height: 13px;
  color: #748298;
}

.dashboard-common .command-shortcut > i svg {
  width: 100%;
  height: 100%;
}

.dashboard-side {
  top: 88px;
  gap: 18px;
}

.activity-rail {
  min-height: 382px;
  border-color: rgba(100, 128, 177, .09);
  border-radius: 17px;
  box-shadow: 0 6px 24px rgba(30, 55, 90, .055);
}

.activity-head {
  min-height: 63px;
  padding: 20px 18px 16px;
}

.activity-head h2,
.quick-rail-head h2 {
  color: #17233a;
  font-size: 18px;
}

.activity-head .text-btn {
  color: #4778ff;
  font-size: 11px;
}

.activity-list {
  min-height: 260px;
  padding: 9px;
}

.activity-item {
  min-height: 61px;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: #edf3ff;
}

.rail-empty {
  min-height: 250px;
  padding: 62px 18px 28px;
}

.rail-empty::before {
  content: "";
  width: 46px;
  height: 46px;
  display: block;
  margin: 0 auto 15px;
  border-radius: 15px;
  background:
    linear-gradient(#bfd0f2, #bfd0f2) 13px 14px / 20px 3px no-repeat,
    linear-gradient(#d7e2f7, #d7e2f7) 13px 22px / 14px 3px no-repeat,
    linear-gradient(145deg, #f1f5fc, #e6eefb);
  box-shadow: 0 8px 20px rgba(57, 102, 181, .09);
}

.rail-empty strong {
  color: #334159;
  font-size: 13px;
}

.rail-empty span {
  margin-top: 7px;
  font-size: 11px;
}

.quick-rail {
  min-height: 158px;
  padding: 20px 18px;
  border-color: rgba(100, 128, 177, .09);
  border-radius: 17px;
  box-shadow: 0 6px 24px rgba(30, 55, 90, .055);
}

.quick-rail-head h2 {
  margin-bottom: 16px;
}

.quick-rail-grid {
  gap: 10px;
}

.quick-rail-grid button {
  min-height: 51px;
  padding: 9px;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  border-radius: 11px;
}

.quick-rail-grid button span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.quick-rail-grid strong {
  font-size: 11px;
}

.command-notices {
  min-height: 170px;
  padding: 0;
  overflow: hidden;
  border-color: rgba(100, 128, 177, .09);
  border-radius: 17px;
  box-shadow: 0 6px 24px rgba(30, 55, 90, .05);
}

.command-notices .section-head {
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
  border-bottom: 1px solid rgba(100, 128, 177, .09);
}

.command-notices .section-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #17233a;
  font-size: 17px;
}

.section-title-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #526985;
}

.section-title-icon svg {
  width: 17px;
  height: 17px;
}

.command-notices .section-head .text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #59687e;
  font-size: 11px;
}

.command-notices .section-head .text-btn svg {
  width: 13px;
  height: 13px;
}

.command-notices .notice-list {
  min-height: 118px;
  border: 0;
  border-radius: 0;
  background: #fff;
}

.notice-empty {
  min-height: 118px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  background: #fff;
}

.notice-empty-visual {
  position: relative;
  width: 66px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: #9aabc5;
  background: linear-gradient(145deg, #f4f7fc, #e8eef8);
}

.notice-empty-visual::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 4px;
  width: 24px;
  height: 24px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #a7b5ca;
}

.notice-empty-visual svg {
  width: 27px;
  height: 27px;
}

.notice-empty strong,
.notice-empty small {
  display: block;
  text-align: left;
}

.notice-empty strong {
  color: #647188;
  font-size: 13px;
}

.notice-empty small {
  margin-top: 7px;
  color: #98a3b5;
  font-size: 11px;
}

@media (max-width: 1480px) {
  .command-layout {
    grid-template-columns: minmax(0, 4fr) minmax(252px, 1fr);
  }

  .dashboard-module-shortcut {
    padding: 13px 11px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .dashboard-module-icon {
    width: 40px;
    height: 40px;
  }

  .dashboard-common .command-shortcut {
    grid-template-columns: 35px minmax(0, 1fr) 12px;
  }

  .dashboard-common .command-shortcut-icon {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 1180px) {
  .command-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
  }

  .activity-rail {
    min-height: 260px;
  }

  .activity-list,
  .rail-empty {
    min-height: 150px;
  }
}

@media (max-width: 860px) {
  .command-console {
    min-height: 206px;
  }

  .hero-visual {
    right: 0;
    width: 48%;
    opacity: .62;
  }

  .dashboard-module-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-all-modules {
    grid-column: span 2;
  }

  .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .command-console {
    min-height: 246px;
    padding: 22px 18px;
  }

  .command-heading p {
    max-width: 76%;
    font-size: 12px;
  }

  .hero-visual {
    top: 8px;
    width: 56%;
    opacity: .42;
  }

  .command-form {
    right: 15px;
    bottom: 18px;
    left: 15px;
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .command-form label {
    display: none;
  }

  .command-form > button {
    grid-column: 1 / -1;
  }

  .dashboard-overview .command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .dashboard-module-strip,
  .dashboard-overview .command-metrics,
  .dashboard-common .command-shortcuts {
    grid-template-columns: 1fr;
  }

  .dashboard-all-modules {
    grid-column: auto;
  }
}


/* V2 final fidelity lock: intentionally last to defeat legacy homepage rules. */
#content .command-layout {
  grid-template-columns: minmax(0, 4fr) minmax(270px, 1fr);
  gap: 18px;
}

#content .command-main {
  gap: 18px;
}

#content .command-console {
  min-height: 214px;
  padding: 26px 26px 22px;
  border: 1px solid rgba(85, 117, 180, .06);
  border-radius: 18px;
  background:
    radial-gradient(circle at 65% 42%, rgba(82, 220, 187, .11), transparent 14%),
    radial-gradient(circle at 86% 22%, rgba(83, 143, 255, .18), transparent 28%),
    linear-gradient(118deg, #fbfdff 0%, #f4f8ff 52%, #edf3ff 100%);
  box-shadow: 0 6px 24px rgba(30, 55, 90, .055);
}

#content .command-heading {
  min-height: 70px;
}

#content .command-heading h1 {
  color: #13213a;
  font-size: clamp(28px, 1.7vw, 32px);
}

#content .command-heading p {
  max-width: 620px;
  margin-top: 9px;
  color: #708098;
  font-size: 13px;
}

#content .command-form {
  right: 26px;
  bottom: 21px;
  left: 26px;
  min-height: 55px;
  margin: 0;
  padding: 6px 7px 6px 11px;
  grid-template-columns: 28px 95px minmax(180px, 1fr) auto;
  gap: 10px;
  border-radius: 13px;
}

#content .command-form input,
#content .command-form > button {
  height: 42px;
}

#content .dashboard-module-strip {
  margin: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

#content .dashboard-module-shortcut {
  min-height: 88px;
  padding: 15px 14px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  border-radius: 14px;
}

#content .dashboard-module-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

#content .dashboard-module-shortcut:nth-child(1) .dashboard-module-icon {
  color: #3971f5;
  background: linear-gradient(145deg, #eaf2ff, #dce9ff);
}

#content .dashboard-module-icon svg {
  width: 21px;
  height: 21px;
}

#content .dashboard-module-shortcut strong {
  color: #18263e;
  font-size: 14px;
}

#content .dashboard-module-shortcut small {
  margin-top: 5px;
  color: #7c899e;
  font-size: 11px;
}

#content .dashboard-overview {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
}

#content .dashboard-overview .command-metrics {
  margin: 0;
  gap: 14px;
}

#content .dashboard-overview .command-metrics button {
  min-height: 116px;
  padding: 18px;
  border-radius: 15px;
}

#content .dashboard-common {
  margin-top: 16px;
  padding-top: 16px;
}

#content .dashboard-common .section-head {
  min-height: 28px;
  margin-bottom: 12px;
}

#content .dashboard-common .section-head h3 {
  font-size: 18px;
}

#content .dashboard-common .command-shortcuts {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

#content .dashboard-common .command-shortcut {
  min-height: 84px;
  padding: 13px 27px 13px 13px;
  grid-template-columns: 40px minmax(0, 1fr) 13px;
  gap: 10px;
  border-radius: 13px;
}

#content .dashboard-common .command-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

#content .dashboard-common .command-shortcut-copy {
  width: auto;
  height: auto;
  min-width: 0;
  display: block;
  margin: 0;
  border-radius: 0;
  background: transparent;
}

#content .dashboard-common .command-shortcut-copy strong,
#content .dashboard-common .command-shortcut-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#content .dashboard-common .command-shortcut small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
}

#content .dashboard-common .command-shortcut > i {
  display: block;
}

#content .command-notices {
  min-height: 170px;
  padding: 0;
  border-radius: 17px;
}

#content .command-notices .section-head {
  min-height: 50px;
  margin: 0;
  padding: 0 18px;
}

#content .command-notices .notice-list,
#content .notice-empty {
  min-height: 118px;
}

@media (max-width: 1480px) {
  #content .command-layout {
    grid-template-columns: minmax(0, 4fr) minmax(252px, 1fr);
  }

  #content .dashboard-module-shortcut {
    padding: 13px 11px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  #content .dashboard-module-icon {
    width: 40px;
    height: 40px;
  }

  #content .dashboard-common .command-shortcut {
    grid-template-columns: 35px minmax(0, 1fr) 12px;
  }

  #content .dashboard-common .command-shortcut-icon {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 1180px) {
  #content .command-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  #content .dashboard-module-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #content .dashboard-all-modules {
    grid-column: span 2;
  }

  #content .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #content .command-console {
    min-height: 246px;
    padding: 22px 18px;
  }

  #content .command-form {
    right: 15px;
    bottom: 18px;
    left: 15px;
    grid-template-columns: 28px minmax(0, 1fr);
  }

  #content .dashboard-overview .command-metrics,
  #content .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  #content .dashboard-module-strip,
  #content .dashboard-overview .command-metrics,
  #content .dashboard-common .command-shortcuts {
    grid-template-columns: 1fr;
  }

  #content .dashboard-all-modules {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* 首页 V4：按参考稿重建信息结构，不再沿用旧首页卡片比例。 */
.command-layout {
  min-height: calc(100vh - 102px);
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 16px;
}

.command-main {
  gap: 16px;
}

.dashboard-overview {
  padding: 12px;
  border: 1px solid var(--wb-hairline);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--wb-shadow-card);
}

.command-console {
  min-height: 150px;
  padding: 20px 20px 15px;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at 76% 15%, rgba(91, 175, 255, .18), transparent 24%),
    radial-gradient(circle at 93% 70%, rgba(77, 110, 243, .17), transparent 30%),
    linear-gradient(126deg, #f8fbff 0%, #f2f6ff 56%, #edf4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(77, 110, 243, .05);
}

.command-console::before {
  display: none;
}

.command-console::after {
  right: 8%;
  top: 22px;
  width: 58px;
  height: 66px;
  border-radius: 16px 16px 22px 22px;
  box-shadow:
    -62px -2px 0 -15px rgba(100, 184, 234, .14),
    48px 10px 0 -17px rgba(77, 110, 243, .13),
    0 14px 30px rgba(77, 110, 243, .18);
  font-size: 26px;
  opacity: .84;
}

.command-heading {
  min-height: 52px;
}

.command-heading h1 {
  font-size: 27px;
  line-height: 1.15;
}

.command-heading p {
  max-width: 570px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.command-form {
  min-height: 44px;
  margin-top: 15px;
  padding: 4px 5px 4px 8px;
  grid-template-columns: 28px 78px minmax(160px, 1fr) auto;
  gap: 8px;
  border-color: rgba(77, 110, 243, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 6px 18px rgba(41, 68, 123, .06);
}

.command-prompt {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.command-form label strong {
  font-size: 11px;
}

.command-form input,
.command-form > button {
  height: 34px;
}

.command-form input {
  border-radius: 8px;
  font-size: 11px;
}

.command-form > button {
  min-width: 66px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 11px;
}

.command-feedback {
  margin: 6px 2px 0;
  font-size: 9px;
}

.dashboard-module-strip {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-module-shortcut {
  position: relative;
  min-width: 0;
  min-height: 64px;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid var(--wb-hairline);
  border-radius: 11px;
  color: var(--text);
  background: #fff;
  text-align: left;
  box-shadow: 0 3px 10px rgba(32, 56, 103, .035);
}

.dashboard-module-shortcut:hover {
  transform: translateY(-2px);
  border-color: rgba(77, 110, 243, .2);
  box-shadow: 0 8px 20px rgba(32, 56, 103, .08);
}

.dashboard-module-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--module-color, var(--primary));
  background: color-mix(in srgb, var(--module-color, var(--primary)) 11%, #fff);
}

.dashboard-module-icon svg {
  width: 17px;
  height: 17px;
}

.dashboard-module-shortcut strong,
.dashboard-module-shortcut small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-module-shortcut strong {
  font-size: 11px;
}

.dashboard-module-shortcut small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
}

.dashboard-module-shortcut > b {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--danger);
  font-size: 8px;
}

.dashboard-all-modules .dashboard-module-icon {
  color: #6b7488;
  background: #f2f5fa;
}

.dashboard-overview .command-metrics {
  margin-top: 12px;
  gap: 10px;
}

.dashboard-overview .command-metrics button {
  min-height: 86px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 11px;
  background: #edf3ff;
}

.dashboard-overview .command-metrics button:nth-child(2) { background: #ebf9f4; }
.dashboard-overview .command-metrics button:nth-child(3) { background: #fff2e9; }
.dashboard-overview .command-metrics button:nth-child(4) { background: #f2edff; }

.dashboard-overview .command-metrics button::after {
  display: none;
}

.dashboard-overview .command-metrics .metric-copy {
  position: relative;
  z-index: 1;
}

.dashboard-overview .command-metrics span,
.dashboard-overview .command-metrics strong,
.dashboard-overview .command-metrics small {
  display: block;
}

.dashboard-overview .command-metrics span {
  color: #53627a;
  font-size: 9.5px;
}

.dashboard-overview .command-metrics strong {
  margin: 6px 0 3px;
  color: var(--text);
  font-size: 22px;
}

.dashboard-overview .command-metrics small {
  color: #8290a4;
  font-size: 8.5px;
}

.dashboard-overview .command-metrics i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  color: #4d6ef3;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 7px 18px rgba(77, 110, 243, .12);
}

.dashboard-overview .command-metrics button:nth-child(2) i { color: #16a37e; box-shadow: 0 7px 18px rgba(22, 163, 126, .12); }
.dashboard-overview .command-metrics button:nth-child(3) i { color: #f08b32; box-shadow: 0 7px 18px rgba(240, 139, 50, .12); }
.dashboard-overview .command-metrics button:nth-child(4) i { color: #8a63e8; box-shadow: 0 7px 18px rgba(138, 99, 232, .12); }

.dashboard-overview .command-metrics i svg {
  width: 22px;
  height: 22px;
}

.dashboard-common {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--wb-hairline);
}

.dashboard-common .section-head {
  min-height: 26px;
  margin: 0 0 8px;
  padding: 0 2px;
  border: 0;
}

.dashboard-common .section-head h3 {
  font-size: 14px;
}

.dashboard-common .command-shortcuts {
  margin: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-common .command-shortcut {
  min-height: 62px;
  padding: 9px;
  grid-template-columns: 29px minmax(0, 1fr);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.dashboard-common .command-shortcut > span {
  width: 29px;
  height: 29px;
  border-radius: 9px;
}

.dashboard-common .command-shortcut strong {
  font-size: 10px;
}

.dashboard-common .command-shortcut small {
  display: none;
}

.command-notices {
  padding: 14px 16px;
  border-radius: 15px;
}

.command-notices .section-head {
  min-height: 28px;
  margin-bottom: 8px;
}

.dashboard-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}

.activity-rail {
  position: static;
  top: auto;
  border-radius: 15px;
  box-shadow: var(--wb-shadow-card);
}

.activity-head {
  min-height: 54px;
  padding: 15px 14px 12px;
  align-items: center;
  background: #fff;
}

.activity-head h2 {
  margin: 0;
  font-size: 15px;
}

.activity-head .text-btn {
  padding: 0;
  border: 0;
  font-size: 9px;
}

.activity-summary div {
  padding: 11px 14px;
}

.activity-list {
  min-height: 150px;
  padding: 7px;
}

.activity-item {
  min-height: 58px;
  padding: 8px;
}

.activity-all {
  min-height: 34px;
  font-size: 9px;
}

.quick-rail {
  padding: 15px;
  border: 1px solid var(--wb-hairline);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--wb-shadow-card);
}

.quick-rail-head h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
}

.quick-rail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-rail-grid button {
  min-width: 0;
  min-height: 52px;
  padding: 8px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 9px;
  color: var(--text);
  background: #f7f9fd;
  text-align: left;
}

.quick-rail-grid button:hover {
  color: var(--primary);
  background: #eef3ff;
}

.quick-rail-grid button span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--primary);
  background: #eaf0ff;
}

.quick-rail-grid button:nth-child(2) span { color: #16a37e; background: #e9f8f3; }
.quick-rail-grid button:nth-child(3) span { color: #f08b32; background: #fff1e7; }
.quick-rail-grid button:nth-child(4) span { color: #8a63e8; background: #f1ecff; }

.quick-rail-grid svg {
  width: 14px;
  height: 14px;
}

.quick-rail-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
  font-size: 9.5px;
  white-space: nowrap;
}

/* 首页中的浅色信息卡使用固定可读前景色，避免深色主题变量造成低对比。 */
.command-console .command-heading h1,
.command-console .command-form label strong,
.dashboard-module-shortcut strong,
.dashboard-overview .command-metrics strong,
.dashboard-common .command-shortcut strong,
.activity-rail .activity-head h2,
.activity-rail .activity-summary strong,
.activity-rail .activity-item strong,
.quick-rail h2,
.quick-rail-grid strong {
  color: #17233a;
}

.dashboard-module-shortcut small,
.activity-rail .activity-item small,
.activity-rail .rail-empty span,
.activity-rail .activity-summary span {
  color: #718097;
}

.activity-rail {
  color: #3f4d65;
  background: #fff;
}

.activity-rail .activity-list,
.activity-rail .activity-summary {
  background: #fff;
}

.dashboard-common .command-shortcut {
  color: #3f4d65;
}

@media (max-width: 1380px) {
  .command-layout {
    grid-template-columns: minmax(0, 1fr) 238px;
  }

  .dashboard-module-strip {
    grid-template-columns: repeat(5, minmax(118px, 1fr));
  }

  .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .command-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-side {
    position: static;
    grid-template-columns: minmax(0, 1.3fr) minmax(220px, .7fr);
  }
}

@media (max-width: 860px) {
  .dashboard-overview {
    padding: 10px;
  }

  .dashboard-module-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-all-modules {
    grid-column: span 2;
  }

  .dashboard-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .command-console {
    min-height: 178px;
    padding: 18px 14px 14px;
  }

  .command-heading h1 {
    font-size: 23px;
  }

  .command-heading p {
    max-width: 80%;
  }

  .command-form {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .command-form label {
    display: none;
  }

  .command-form > button {
    grid-column: 1 / -1;
  }

  .dashboard-overview .command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-common .command-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .dashboard-module-strip,
  .dashboard-overview .command-metrics,
  .dashboard-common .command-shortcuts {
    grid-template-columns: 1fr;
  }

  .dashboard-all-modules {
    grid-column: auto;
  }
}

/* 最近动态独占右栏：保留原有卡片视觉，列表随视口延展。 */
.dashboard-side {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-side .activity-rail {
  display: flex;
  flex-direction: column;
  height: clamp(520px, calc(100vh - 112px), 780px);
}

.dashboard-side .activity-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

@media (max-width: 1180px) {
  .dashboard-side {
    position: static;
  }

  .dashboard-side .activity-rail {
    height: auto;
    min-height: 0;
  }

  .dashboard-side .activity-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .dashboard-side .activity-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
