:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #e4eaf2;
  --line-strong: #d0d8e5;
  --text: #1f2937;
  --muted: #667085;
  --blue: #1677ff;
  --blue-dark: #0958d9;
  --green: #12a866;
  --green-bg: #ecfdf3;
  --orange: #d97706;
  --orange-bg: #fff7e6;
  --red: #d92d20;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow-popover: 0 12px 32px rgba(16, 24, 40, .14);
  --ui-primary-soft: #eaf3ff;
  --ui-surface-subtle: #f8fafc;
}

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

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.ui-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--bg);
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 76px minmax(0, 1fr);
}

.ui-aura,
.ui-particles {
  display: none !important;
}

.app-shell > .sidebar {
  position: sticky;
  top: 0;
  align-self: start;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 20px 14px 16px;
  overflow: hidden auto;
  border-right: 1px solid var(--line);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.side-brand {
  position: relative;
  gap: 11px;
  min-height: 58px;
  padding: 2px 8px 16px;
}

.side-brand-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.side-brand-link:hover strong {
  color: var(--blue);
}

.side-brand-link:focus-visible {
  outline: 3px solid rgba(18, 111, 219, .32);
  outline-offset: 4px;
}

.side-brand img {
  width: 40px;
  height: 40px;
  border-color: var(--line);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: var(--shadow);
}

.side-brand strong {
  color: #101828;
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
}

.side-brand span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sidebar-collapse {
  position: absolute;
  top: 8px;
  right: -4px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease, border-color 120ms ease;
}

.sidebar:hover .sidebar-collapse,
.sidebar-collapse:focus-visible,
.sidebar-collapsed .sidebar-collapse {
  opacity: 1;
}

.sidebar-collapse:hover {
  border-color: #9dc6ff;
  color: var(--blue);
}

.sidebar-collapsed .side-brand {
  justify-content: center;
  padding-inline: 0;
}

.sidebar-collapsed .side-brand-link > div,
.sidebar-collapsed .nav-group-title,
.sidebar-collapsed .nav-group > button span:last-child,
.sidebar-collapsed .sidebar-footer {
  display: none;
}

.sidebar-collapsed .sidebar-collapse {
  right: -10px;
}

.nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.nav-group {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.nav-group-title {
  padding: 0 10px 5px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.nav-group > button {
  gap: 10px;
  height: 42px;
  padding: 0 11px;
  border-radius: 8px;
  color: #475467;
  font-size: 14px;
  font-weight: 650;
  transition: color 120ms ease, background-color 120ms ease;
}

.nav-group > button:hover {
  background: #f5f8fc;
  color: #344054;
}

.nav-group > button.active {
  background: var(--ui-primary-soft);
  color: var(--blue);
  box-shadow: none;
}

.nav-icon {
  display: grid;
  width: 20px;
  place-items: center;
}

.sidebar-collapsed .nav-group > button {
  justify-content: center;
  padding: 0;
}

.sidebar-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-service-qr {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 2px 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.sidebar-service-qr-image {
  display: block;
  width: 128px;
  max-width: 100%;
  height: auto;
}

.sidebar-account-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5edf9;
  border-radius: 16px;
  background: #f4f8ff;
  color: inherit;
  text-align: left;
  box-shadow: 0 8px 20px rgba(44, 92, 153, .08);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.sidebar-account-card:hover {
  border-color: #9dc6ff;
  box-shadow: 0 10px 24px rgba(44, 92, 153, .15);
  transform: translateY(-1px);
}

.system-settings-content {
  display: grid;
  width: min(100%, 1040px);
  gap: 0;
  margin-top: 8px;
}

.system-settings-identity-card {
  max-width: 520px;
}

.system-settings-identity-card:hover {
  border-color: #e5edf9;
  box-shadow: 0 8px 20px rgba(44, 92, 153, .08);
  transform: none;
}

.system-settings-section-copy {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sidebar-account-section {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e0ebfb;
  border-radius: 11px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 10px rgba(44, 92, 153, .05);
}

.sidebar-account-personal-button,
.sidebar-account-workspace-button {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.sidebar-account-personal-button:hover,
.sidebar-account-workspace-button:hover {
  border-color: #9dc6ff;
  background: #fff;
}

.sidebar-account-personal-button:focus-visible,
.sidebar-account-workspace-button:focus-visible {
  border-color: #4a93ff;
  outline: none;
  box-shadow: 0 0 0 3px #dcecff;
}

.sidebar-account-workspace-section.is-switch-locked {
  cursor: not-allowed;
}

.sidebar-account-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  line-height: 1.2;
}

.sidebar-account-section-title .ui-icon {
  width: 14px;
  height: 14px;
  color: #4a93ff;
  stroke-width: 1.8;
}

.sidebar-account-profile,
.sidebar-account-workspace-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.sidebar-account-user,
.sidebar-account-workspace {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-account-user strong,
.sidebar-account-workspace strong {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-user small,
.sidebar-account-workspace small {
  overflow: hidden;
  color: #667085;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-user small {
  width: fit-content;
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eaf3ff;
  color: #4a93ff;
  font-size: 9px;
  line-height: 1.2;
}

.sidebar-account-arrow {
  display: grid;
  width: 18px;
  color: #98a2b3;
  place-items: center;
}

.sidebar-account-arrow svg {
  width: 15px;
  height: 15px;
}

.sidebar-account-ids {
  display: none;
}

.sidebar-account-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid #edf2f8;
}

.sidebar-account-meta-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 4px;
  min-width: 0;
}

.sidebar-account-meta-item > .ui-icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: #4a93ff;
  stroke-width: 1.8;
}

.sidebar-account-meta-item > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sidebar-account-meta-item small,
.sidebar-account-workspace-id small {
  color: #667085;
  font-size: 9px;
  line-height: 1.15;
}

.sidebar-account-meta-item b,
.sidebar-account-workspace-id b {
  overflow: hidden;
  color: #475467;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account-meta-divider {
  width: 1px;
  background: #edf2f8;
}

.sidebar-account-workspace-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #e8f2ff;
  color: #4a93ff;
}

.sidebar-account-workspace-icon .ui-icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}

.sidebar-account-workspace-id {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  padding-top: 7px;
  border-top: 1px solid #edf2f8;
}

.sidebar-account-workspace-id > .ui-icon {
  width: 13px;
  height: 13px;
  color: #4a93ff;
  stroke-width: 1.8;
}

.sidebar-account-workspace-id b {
  max-width: 80px;
  text-align: right;
}

.system-settings-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 176px;
  overflow: hidden;
  gap: 24px;
  padding: 30px 34px;
  border: 1px solid #dceafb;
  border-radius: 16px;
  background: #f4f9ff;
  box-shadow: 0 10px 28px rgba(31, 82, 150, .06);
}

.system-settings-hero::before,
.system-settings-hero::after {
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(99, 160, 255, .2);
  border-radius: 50%;
  content: '';
}

.system-settings-hero::before {
  right: -92px;
  bottom: -126px;
  width: 258px;
  height: 258px;
}

.system-settings-hero::after {
  top: 18px;
  right: 78px;
  width: 106px;
  height: 106px;
}

.system-settings-hero-person,
.system-settings-hero-meta,
.system-settings-hero-mark {
  position: relative;
  z-index: 1;
}

.system-settings-hero-person {
  display: flex;
  align-items: center;
  align-self: center;
}

.system-settings-hero-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.system-settings-hero-copy strong {
  overflow: hidden;
  color: #24364c;
  font-size: 22px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-settings-hero-copy > span {
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #2877df;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-settings-hero-copy p {
  max-width: 520px;
  margin: 1px 0 0;
  color: #637087;
  font-size: 13px;
  line-height: 1.65;
}

.system-settings-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(126px, 1fr));
  align-items: center;
  align-self: end;
  gap: 10px;
  padding-right: 42px;
}

.system-settings-hero-meta > span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-width: 0;
  gap: 2px 7px;
  padding: 10px 12px;
  border: 1px solid rgba(165, 203, 250, .72);
  border-radius: 10px;
  background: rgba(255, 255, 255, .72);
}

.system-settings-hero-meta .ui-icon {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
  align-self: center;
  color: #2877df;
  stroke-width: 1.8;
}

.system-settings-hero-meta small,
.system-settings-hero-meta b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-settings-hero-meta small {
  color: #748196;
  font-size: 11px;
}

.system-settings-hero-meta b {
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
}

.system-settings-hero-mark {
  display: grid;
  position: absolute;
  top: 32px;
  right: 34px;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(137, 191, 255, .52);
  border-radius: 16px;
  background: rgba(255, 255, 255, .55);
  color: #4b95fa;
  transform: rotate(-8deg);
}

.system-settings-hero-mark .ui-icon {
  width: 26px;
  height: 26px;
  stroke-width: 1.55;
}

.system-settings-tabs {
  display: flex;
  align-items: stretch;
  gap: 30px;
  margin-top: 20px;
  border-bottom: 1px solid #dfe7f1;
}

.system-settings-tabs button {
  position: relative;
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.system-settings-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: '';
}

.system-settings-tabs button:hover,
.system-settings-tabs button:focus-visible,
.system-settings-tabs button.active {
  color: var(--blue);
}

.system-settings-tabs button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .14);
}

.system-settings-tabs button.active::after {
  background: var(--blue);
}

.system-settings-content .system-settings-profile-panel,
.system-settings-content .system-settings-workspace-panel {
  width: 100%;
  margin: 20px 0 0;
  padding: 26px;
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(31, 53, 85, .05);
}

.system-settings-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.system-settings-panel-heading {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 12px;
}

.system-settings-panel-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #eaf3ff;
  color: var(--blue);
}

.system-settings-panel-icon .ui-icon {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.system-settings-panel-heading > span:last-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.system-settings-panel-heading strong {
  color: #24364c;
  font-size: 18px;
  line-height: 1.4;
}

.system-settings-panel-heading p {
  margin: 0;
  color: #69778d;
  font-size: 13px;
  line-height: 1.55;
}

.system-settings-save-button,
.system-settings-switch-button {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
}

.system-settings-save-button .ui-icon,
.system-settings-switch-button .ui-icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.system-settings-profile-panel .form-grid {
  margin-top: 22px;
}

.system-settings-logout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.system-settings-logout-row > span {
  display: grid;
  gap: 3px;
}

.system-settings-logout-row strong {
  color: #4a2b30;
  font-size: 14px;
}

.system-settings-logout-row small {
  color: #7c8799;
  font-size: 12px;
  line-height: 1.5;
}

.system-settings-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.system-settings-detail-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e6edf6;
  border-radius: 11px;
  background: #f8fbff;
}

.system-settings-detail-item > .ui-icon {
  width: 18px;
  height: 18px;
  padding: 6px;
  border-radius: 9px;
  background: #e8f2ff;
  color: var(--blue);
  stroke-width: 1.8;
}

.system-settings-detail-item > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.system-settings-detail-item small,
.system-settings-detail-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-settings-detail-item small {
  color: #748196;
  font-size: 12px;
}

.system-settings-detail-item b {
  color: #344054;
  font-size: 14px;
  line-height: 1.45;
}

.system-settings-switch-hint {
  max-width: 320px;
  color: #7a8798;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.system-settings-switch-hint.is-locked {
  color: #a16207;
}

.workspace-switch-modal {
  width: min(660px, 100%);
}

.workspace-switch-intro {
  margin: 0 0 14px;
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
}

.workspace-switch-list {
  display: grid;
  gap: 10px;
}

.workspace-switch-option {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe7f7;
  border-radius: 12px;
  background: #fff;
  color: #344054;
  text-align: left;
}

.workspace-switch-option:hover:not(:disabled) {
  border-color: #8ebeff;
  background: #f7fbff;
}

.workspace-switch-option:focus-visible {
  border-color: #4a93ff;
  outline: none;
  box-shadow: 0 0 0 3px #dcecff;
}

.workspace-switch-option:disabled {
  cursor: default;
}

.workspace-switch-option-main,
.workspace-switch-option-meta {
  display: grid;
  min-width: 0;
}

.workspace-switch-option-main {
  gap: 4px;
}

.workspace-switch-option-main strong {
  overflow: hidden;
  color: #1d2939;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-switch-option-main span,
.workspace-switch-option-meta span {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-switch-option-meta {
  align-content: start;
  justify-items: end;
  gap: 5px;
}

.workspace-switch-current {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #1677ff !important;
  font-size: 11px !important;
  font-weight: 700;
}

.sidebar-plan-card {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ui-surface-subtle);
}

.sidebar-plan-card .sidebar-plan-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-plan-card strong {
  overflow: hidden;
  color: #344054;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  min-width: 0;
  padding: 24px 28px 40px;
}

.btn,
.input,
.select,
.textarea {
  border-color: var(--line-strong);
  border-radius: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.btn:hover:not(:disabled) {
  border-color: #9dc6ff;
  color: var(--blue);
}

.btn.primary {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 1px 2px rgba(22, 119, 255, .2);
}

.btn.primary:hover:not(:disabled) {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  color: #fff;
}

.btn.danger:hover:not(:disabled) {
  border-color: #f6aaa5;
  background: #fff8f7;
  color: var(--red);
}

.input:focus,
.textarea:focus,
.select:focus,
.btn:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, .18);
}

.panel,
.login-panel,
.modal-panel,
.drawer-panel {
  border-color: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  margin-bottom: 20px;
}

.management-header-copy h1 {
  margin: 0;
  color: #101828;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.management-header-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.management-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.management-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-right: 4px;
}

.management-user-copy {
  display: grid;
  min-width: 0;
}

.management-user-copy strong,
.management-user-copy span {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.management-user-copy strong {
  color: #344054;
  font-size: 13px;
}

.management-user-copy span {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
}

.page-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.page-stat-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 104px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.page-stat-card:hover {
  border-color: #b8d6ff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(16, 24, 40, .07);
}

.page-stat-card.active {
  border-color: #7db3ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .08);
}

.page-stat-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: var(--ui-primary-soft);
  color: var(--blue);
}

.page-stat-card.green .page-stat-icon {
  background: #e8f8ef;
  color: #12a866;
}

.page-stat-card.amber .page-stat-icon {
  background: #fff5dd;
  color: #dc8a00;
}

.page-stat-card.slate .page-stat-icon {
  background: #f0efff;
  color: #6f5bd3;
}

.page-stat-copy {
  display: grid;
  min-width: 0;
}

.page-stat-copy small {
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.page-stat-copy strong {
  margin-top: 2px;
  color: #101828;
  font-size: 27px;
  line-height: 1.1;
}

.page-management-panel {
  overflow: visible;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.page-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.page-panel-heading h3 {
  margin: 0;
  color: #101828;
  font-size: 17px;
}

.page-panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.page-panel-heading > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.page-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(140px, .75fr)) auto;
  gap: 10px;
  padding: 0 20px 16px;
}

.page-search-field,
.page-select-field {
  position: relative;
  min-width: 0;
}

.page-search-field {
  display: flex;
  align-items: center;
}

.page-search-field > .ui-icon {
  position: absolute;
  z-index: 1;
  left: 12px;
  width: 16px;
  height: 16px;
  color: #98a2b3;
  pointer-events: none;
}

.page-search-field .input {
  height: 40px;
  padding-left: 37px;
}

.page-select-field > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.page-select-field .select {
  height: 40px;
  padding: 0 32px 0 11px;
  color: #475467;
  font-size: 13px;
}

.page-folder-button {
  white-space: nowrap;
}

.page-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 20px 16px;
  padding: 10px 12px;
  border: 1px solid #c7ddff;
  border-radius: 10px;
  background: #f1f7ff;
}

.page-bulk-bar > div,
.page-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.page-bulk-bar strong {
  color: #175cd3;
  font-size: 13px;
}

.page-bulk-clear {
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
}

.page-bulk-actions .btn {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.page-table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-management-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
}

.page-management-table th,
.page-management-table td {
  height: 68px;
  padding: 10px 12px;
  border-bottom-color: #edf1f6;
  font-size: 12px;
}

.page-management-table th {
  height: 44px;
  background: var(--ui-surface-subtle);
  color: #667085;
  font-weight: 650;
}

.page-management-table tbody tr {
  transition: background-color 120ms ease;
}

.page-management-table tbody tr:hover,
.page-management-table tbody tr.selected {
  background: #f8fbff;
}

.page-management-table th:nth-child(1),
.page-management-table td:nth-child(1) { width: 48px; }
.page-management-table th:nth-child(3),
.page-management-table td:nth-child(3) { width: 132px; }
.page-management-table th:nth-child(4),
.page-management-table td:nth-child(4) { width: 112px; }
.page-management-table th:nth-child(5),
.page-management-table td:nth-child(5) { width: 120px; }
.page-management-table th:nth-child(6),
.page-management-table td:nth-child(6) { width: 158px; }
.page-management-table th:nth-child(7),
.page-management-table td:nth-child(7) { width: 196px; }

.page-select-column {
  text-align: center !important;
}

.page-select-column input,
.page-mobile-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.page-title-cell {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-title-cell > div:last-child {
  min-width: 0;
}

.page-title-cell strong {
  display: block;
  overflow: hidden;
  color: #1d2939;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title-cell span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-id-label {
  color: #344054;
  font-weight: 700;
}

.page-thumb {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
  object-fit: contain !important;
  object-position: center;
}

.page-thumb-empty {
  display: grid;
  place-items: center;
  color: #98a2b3;
}

.page-thumb-empty span {
  display: none;
}

.page-template-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: #475467;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  background: #f2f4f7;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.page-status-badge.success {
  background: var(--green-bg);
  color: #087a46;
}

.page-status-badge.warning {
  background: var(--orange-bg);
  color: #b35f00;
}

.page-date-cell {
  color: #475467;
  white-space: nowrap;
}

.page-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.page-action-link,
.page-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
}

.page-action-link:hover,
.page-more-button:hover {
  background: var(--ui-primary-soft);
  color: var(--blue);
}

.page-more-button {
  width: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.page-more-button[aria-expanded="true"] {
  border-color: #9dc6ff;
  background: var(--ui-primary-soft);
  color: var(--blue);
}

.page-delete-modal {
  width: min(520px, calc(100vw - 28px));
}

.page-delete-confirm {
  display: grid;
  gap: 14px;
}

.page-delete-confirm p {
  margin: 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}

.page-delete-confirm label {
  color: #475467;
  font-size: 13px;
  line-height: 1.65;
}

.page-delete-confirm label strong {
  display: inline;
  color: #b42318;
  overflow-wrap: anywhere;
}

.page-delete-confirm .input[aria-invalid="true"] {
  border-color: #f04438;
  box-shadow: 0 0 0 3px rgba(240, 68, 56, .1);
}

.page-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.page-action-menu {
  position: fixed;
  z-index: 120;
  top: var(--menu-top);
  left: var(--menu-left);
  display: grid;
  width: 208px;
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-popover);
  animation: pageMenuIn 150ms ease both;
}

@keyframes pageMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-action-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font-size: 12px;
  text-align: left;
}

.page-action-menu button:hover:not(:disabled) {
  background: #f5f8fc;
  color: var(--blue);
}

.page-action-menu button:disabled {
  color: #b7bec8;
  cursor: not-allowed;
}

.page-action-menu button.danger {
  color: var(--red);
}

.page-action-menu button.danger:hover {
  background: #fff3f2;
  color: var(--red);
}

.page-action-menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

.page-mobile-list {
  display: none;
}

.page-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  color: var(--muted);
  font-size: 12px;
}

.page-pagination-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-number-button {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #475467;
  font-size: 12px;
}

.page-number-button:hover:not(:disabled),
.page-number-button.active {
  border-color: var(--blue);
  color: var(--blue);
}

.page-number-button.active {
  background: var(--ui-primary-soft);
  font-weight: 700;
}

.page-number-button:disabled {
  color: #c7cdd5;
  cursor: not-allowed;
}

.page-pagination-ellipsis {
  display: grid;
  width: 28px;
  place-items: center;
}

.page-size-control select {
  height: 32px;
  padding: 0 24px 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #475467;
  font-size: 12px;
}

.page-list-skeleton {
  display: grid;
  border-top: 1px solid var(--line);
}

.page-skeleton-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) 140px 180px;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 10px 20px;
  border-bottom: 1px solid #edf1f6;
}

.page-skeleton-row i,
.page-skeleton-row span,
.page-skeleton-row b,
.page-skeleton-row em {
  height: 12px;
  border-radius: 5px;
  background: #edf1f6;
  animation: skeletonPulse 1.3s ease-in-out var(--skeleton-delay) infinite alternate;
}

.page-skeleton-row i {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.page-skeleton-row span { width: 60%; }
.page-skeleton-row b { width: 70%; }
.page-skeleton-row em { width: 100%; }

@keyframes skeletonPulse {
  to { opacity: .48; }
}

.page-empty-state {
  display: grid;
  justify-items: center;
  min-height: 320px;
  align-content: center;
  padding: 32px 20px;
  text-align: center;
}

.page-empty-state > .ui-icon {
  width: 40px;
  height: 40px;
  color: #98a2b3;
}

.page-empty-state h3,
.page-error-state h3 {
  margin: 14px 0 0;
  color: #344054;
  font-size: 16px;
}

.page-empty-state p,
.page-error-state p {
  margin: 7px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.page-error-state {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 20px 20px;
  padding: 16px;
  border: 1px solid #f5c1bd;
  border-radius: 10px;
  background: #fff8f7;
}

.page-error-state > .ui-icon {
  width: 28px;
  height: 28px;
  color: var(--red);
}

.page-error-state h3,
.page-error-state p {
  margin: 0;
}

.delete-pages-confirmation {
  display: grid;
  gap: 14px;
}

.delete-pages-confirmation p {
  margin: 0;
  color: #475467;
  font-size: 13px;
  line-height: 1.65;
}

.delete-pages-confirmation code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #fff1f0;
  color: var(--red);
  font-family: inherit;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .page-filter-bar {
    grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(140px, .8fr));
  }

  .page-filter-bar .page-folder-button,
  .page-filter-bar .page-select-field:nth-of-type(4) {
    grid-row: 2;
  }

  .page-filter-bar .page-folder-button {
    justify-self: start;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .side-brand {
    justify-content: center;
    padding-inline: 0;
  }

  .side-brand-link > div,
  .sidebar-collapse,
  .nav-group-title,
  .nav-group > button span:last-child,
  .sidebar-footer {
    display: none;
  }

  .nav-group > button {
    justify-content: center;
    padding: 0;
  }

  .main {
    padding: 22px 24px 36px;
  }
}

@media (max-width: 960px) {
  .page-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-search-field {
    grid-column: 1 / -1;
  }

  .page-filter-bar .page-folder-button,
  .page-filter-bar .page-select-field:nth-of-type(4) {
    grid-row: auto;
  }

  .page-table-wrap {
    display: none;
  }

  .page-mobile-list {
    display: grid;
    gap: 10px;
    padding: 0 16px 16px;
  }

  .page-mobile-card {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas:
      "media copy select"
      "media actions actions";
    gap: 10px 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
  }

  .page-mobile-card.selected {
    border-color: #8dbdff;
    background: #f8fbff;
  }

  .page-mobile-preview {
    grid-area: media;
    align-self: start;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .page-mobile-preview .page-thumb {
    width: 64px;
    height: 64px;
  }

  .page-mobile-copy {
    grid-area: copy;
    display: grid;
    align-content: start;
    min-width: 0;
  }

  .page-mobile-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
  }

  .page-mobile-title-row strong {
    display: -webkit-box;
    min-width: 0;
    overflow: hidden;
    color: #1d2939;
    font-size: 14px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .page-mobile-copy > span,
  .page-mobile-copy > small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
  }

  .page-mobile-select {
    grid-area: select;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 12px;
  }

  .page-mobile-card .page-row-actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .page-mobile-card .page-action-link,
  .page-mobile-card .page-more-button {
    min-height: 44px;
  }

  .page-mobile-card .page-more-button {
    width: 44px;
  }

  .page-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-bulk-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-bulk-actions .btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-shell > .sidebar,
  .sidebar {
    position: fixed;
    z-index: 90;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    overflow: hidden;
    border: 0;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
  }

  .side-brand,
  .sidebar-footer,
  .nav-group-title {
    display: none !important;
  }

  .nav {
    display: flex;
    height: 58px;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: contents;
  }

  .nav-group > button,
  .sidebar-collapsed .nav-group > button {
    flex: 1 0 68px;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    height: 56px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  .nav-group > button span:last-child,
  .sidebar-collapsed .nav-group > button span:last-child {
    display: block;
  }

  .nav-icon {
    width: auto;
  }

  .nav-icon .ui-icon {
    width: 20px;
    height: 20px;
  }

  .main {
    padding: 16px 14px 26px;
  }

  .management-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
  }

  .management-header-copy h1 {
    font-size: 23px;
  }

  .management-header-actions {
    justify-content: space-between;
    width: 100%;
  }

  .management-user-copy span {
    display: none;
  }

  .page-panel-heading {
    padding: 16px 16px 13px;
  }

  .page-filter-bar {
    padding: 0 16px 14px;
  }

  .page-pagination {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px 16px;
  }

  .page-pagination-controls {
    max-width: 100%;
    overflow-x: auto;
  }

  .page-bulk-bar {
    position: sticky;
    z-index: 30;
    bottom: calc(68px + env(safe-area-inset-bottom));
    margin-inline: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .14);
  }
}

@media (max-width: 520px) {
  .main {
    padding-inline: 12px;
  }

  .management-user-copy {
    display: none;
  }

  .management-header-actions .btn.primary {
    flex: 1;
  }

  .page-stat-grid {
    gap: 9px;
  }

  .page-stat-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    min-height: 92px;
    padding: 12px;
  }

  .page-stat-icon {
    width: 36px;
    height: 36px;
  }

  .page-stat-copy strong {
    font-size: 23px;
  }

  .page-panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .page-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-search-field {
    grid-column: auto;
  }

  .page-filter-bar .page-folder-button {
    width: 100%;
  }

  .page-mobile-list {
    padding-inline: 10px;
  }

  .page-mobile-card {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "media copy"
      "select actions";
    padding: 12px;
  }

  .page-mobile-preview,
  .page-mobile-preview .page-thumb {
    width: 56px;
    height: 56px;
  }

  .page-mobile-title-row {
    display: grid;
    gap: 5px;
  }

  .page-mobile-title-row .page-status-badge {
    justify-self: start;
  }

  .page-mobile-select {
    align-self: center;
  }

  .page-action-link,
  .page-more-button {
    min-height: 44px;
  }

  .page-more-button {
    width: 44px;
  }

  .page-bulk-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-action-menu {
    right: 12px;
    left: auto;
    width: min(240px, calc(100vw - 24px));
  }
}

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

/* 核心入口、系统页与模板市场的信息架构。 */
.nav-primary-group {
  margin-bottom: -4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.planned-system-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px 20px;
  max-width: 880px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.planned-system-icon {
  display: grid;
  grid-row: 1 / span 2;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 15px;
  background: #eaf3ff;
  color: var(--blue);
}

.planned-system-icon .ui-icon {
  width: 30px;
  height: 30px;
}

.planned-system-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 99px;
  background: #fff7e6;
  color: #b76300;
  font-size: 12px;
  font-weight: 800;
}

.planned-system-panel h2 {
  margin: 0;
  color: #1d2939;
  font-size: 22px;
}

.planned-system-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.planned-system-panel ul {
  display: grid;
  grid-column: 2;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  list-style: none;
}

.planned-system-panel li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #475467;
  font-size: 14px;
}

.planned-system-panel li .ui-icon {
  width: 17px;
  height: 17px;
  color: #16a36a;
}

.team-workspace-summary {
  display: grid;
  grid-template-columns: 52px minmax(220px, 1fr) minmax(250px, auto) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.team-workspace-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: #eaf3ff;
  color: var(--blue);
}

.team-workspace-mark .ui-icon {
  width: 24px;
  height: 24px;
}

.team-workspace-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-workspace-copy span,
.team-workspace-copy small,
.team-workspace-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.team-workspace-copy strong {
  overflow: hidden;
  color: #1d2939;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-workspace-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
}

.team-workspace-summary dl div {
  display: grid;
  gap: 5px;
  padding: 10px 14px;
  border-left: 1px solid var(--line);
}

.team-workspace-summary dd {
  margin: 0;
  color: #253247;
  font-size: 14px;
  font-weight: 800;
}

.team-summary-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.team-summary-action > span {
  max-width: 190px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.team-management-panel {
  padding: 0;
  overflow: hidden;
}

.team-panel-head {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.team-panel-head h2 {
  margin: 0;
  color: #1d2939;
  font-size: 18px;
}

.team-panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.team-panel-head .icon-button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
}

.team-panel-head .ui-icon {
  width: 17px;
  height: 17px;
}

.team-readonly-banner,
.team-plan-banner {
  margin: 16px 22px 0;
  padding: 11px 14px;
  border: 1px solid #cfe2ff;
  border-radius: 10px;
  background: #f3f8ff;
  color: #315d91;
  font-size: 13px;
  line-height: 1.6;
}

.team-plan-banner {
  border-color: #f1dfb8;
  background: #fffaf0;
  color: #765416;
}

.team-member-table-wrap {
  overflow-x: auto;
}

.team-member-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.team-member-table th,
.team-member-table td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.team-member-table th {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
}

.team-member-table th:first-child {
  width: 48%;
}

.team-member-table th:last-child,
.team-member-table td:last-child {
  width: 116px;
  text-align: right;
}

.team-member-table tbody tr:hover {
  background: #fbfdff;
}

.team-member-table tbody tr:last-child td {
  border-bottom: 0;
}

.team-member-table td:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-member-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.team-member-identity strong {
  overflow: hidden;
  color: #253247;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-member-identity small,
.team-member-identity em,
.team-member-action-note {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.team-member-identity em {
  color: #98a2b3;
}

.team-role-badge,
.team-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.team-role-badge.owner {
  background: #eaf3ff;
  color: #1769c2;
}

.team-status-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.team-status-badge.active {
  background: #eaf8f0;
  color: #16865b;
}

.team-status-badge.removed {
  background: #fff0f0;
  color: #b54747;
}

.team-member-manage {
  min-width: 64px;
}

.team-loading {
  display: grid;
}

.team-loading > span {
  display: grid;
  min-height: 72px;
  grid-template-columns: 42px minmax(150px, 1fr) 100px;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
}

.team-loading i,
.team-loading b,
.team-loading em {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: #edf1f5;
}

.team-loading i {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.team-loading b {
  max-width: 230px;
}

.team-loading em {
  width: 76px;
  justify-self: end;
}

.team-error-state,
.team-empty-state {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

.team-error-state strong,
.team-empty-state strong {
  color: #344054;
  font-size: 16px;
}

.team-dialog {
  max-width: 520px;
}

.team-invite-form,
.team-member-dialog {
  display: grid;
  gap: 12px;
}

.team-invite-form p {
  margin: 0 0 2px;
  color: #475467;
  font-size: 14px;
  line-height: 1.7;
}

.team-invite-form label {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.team-invite-form > small {
  color: var(--muted);
  font-size: 12px;
}

.team-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.team-member-dialog-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border-radius: 12px;
  background: #f8fafc;
}

.team-member-dialog-person div {
  display: grid;
  gap: 4px;
}

.team-member-dialog-person strong {
  color: #253247;
  font-size: 14px;
}

.team-member-dialog-person small {
  color: var(--muted);
  font-size: 12px;
}

.team-action-list {
  display: grid;
  gap: 8px;
}

.team-action-list button {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #344054;
  text-align: left;
  cursor: pointer;
}

.team-action-list button:hover,
.team-action-list button:focus-visible {
  border-color: #9fc8ff;
  background: #f7fbff;
  outline: none;
}

.team-action-list button strong {
  font-size: 14px;
}

.team-action-list button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.team-transfer-managed {
  padding: 11px 13px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .team-workspace-summary {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }

  .team-workspace-summary dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .team-workspace-summary dl div:first-child {
    border-left: 0;
  }

  .team-summary-action {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 600px) {
  .team-workspace-summary {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 16px;
  }

  .team-workspace-mark {
    width: 44px;
    height: 44px;
  }

  .team-workspace-summary dl,
  .team-summary-action {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .team-summary-action {
    justify-content: stretch;
  }

  .team-summary-action .btn {
    width: 100%;
  }

  .team-summary-action > span {
    max-width: none;
    text-align: left;
  }

  .team-panel-head,
  .team-member-table th,
  .team-member-table td {
    padding-right: 16px;
    padding-left: 16px;
  }
}

.template-library-panel {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.template-market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.template-search-box {
  width: min(390px, 100%);
  min-height: 42px;
  border-radius: 10px;
  background: #fff;
}

.template-search-box > span {
  display: grid;
  color: #98a2b3;
}

.template-search-box .ui-icon {
  width: 17px;
  height: 17px;
}

.template-market-toolbar .template-filter-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.template-market-toolbar .template-filter-block > span {
  white-space: nowrap;
}

.template-type-tabs {
  display: flex;
  max-width: none;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: #f2f5f9;
}

.template-type-pill {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  box-shadow: none;
}

.template-type-pill.active {
  border: 0;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

.template-library-layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: 0;
  min-height: 620px;
}

.template-category-nav {
  padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.template-category-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 12px;
}

.template-category-nav-head h3 {
  margin: 0;
  color: #1d2939;
  font-size: 14px;
}

.template-category-nav-head > span {
  color: #98a2b3;
  font-size: 11px;
}

.template-category-all,
.template-category-scene {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #53637b;
  font-size: 12px;
  text-align: left;
}

.template-category-all:hover,
.template-category-scene:hover {
  background: #f0f5fb;
  color: #344054;
}

.template-category-all.active,
.template-category-scene.active {
  background: #eaf3ff;
  color: var(--blue);
  font-weight: 800;
}

.template-category-all b,
.template-category-scene b {
  margin-left: auto;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
}

.template-category-all.active b,
.template-category-scene.active b {
  color: var(--blue);
}

.template-category-all i,
.template-category-scene i {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #f0f4f9;
  color: #718096;
  font-style: normal;
}

.template-category-all i .ui-icon,
.template-category-scene i .ui-icon {
  width: 14px;
  height: 14px;
}

.template-category-all.active i,
.template-category-scene.active i {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(18, 111, 219, .12);
}

.template-category-scenes {
  display: grid;
  gap: 2px;
  margin-top: 4px;
}

.template-scene-detail {
  min-width: 0;
  padding: 18px 20px 24px;
}

.template-scene-detail-head {
  margin-bottom: 14px;
}

.template-scene-detail-head > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.template-scene-detail-head h3 {
  margin: 0;
  color: #1d2939;
  font-size: 16px;
}

.template-scene-detail-head p {
  margin: 0;
  color: #98a2b3;
  font-size: 12px;
}

.template-library-compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  justify-content: stretch;
  gap: 14px;
}

.template-library-mini-card {
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.template-library-cover {
  background: #f7f9fc;
}

.template-cover-badge {
  display: none !important;
}

.template-library-body,
.template-library-mini-card .template-library-body {
  gap: 8px;
  padding: 11px 12px 12px;
}

.template-library-card h3,
.template-library-mini-card h3 {
  font-size: 14px;
}

.template-card-meta {
  min-height: 22px;
}

.template-card-badge {
  display: inline-flex;
  align-items: center;
  max-width: 68%;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #eaf3ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 750;
}

.btn.primary.template-card-primary-action {
  min-height: 34px;
  border-color: #9fc8ff;
  background: #fff;
  color: var(--blue);
  font-size: 12px;
  box-shadow: none;
}

.btn.primary.template-card-primary-action:hover {
  border-color: var(--blue);
  background: #f0f6ff;
  color: var(--blue-dark);
}

.template-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.template-pagination > span {
  color: var(--muted);
  font-size: 12px;
}

.template-pagination > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-pagination button {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #475467;
  font-size: 12px;
}

.template-pagination button.active {
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .08);
}

.template-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.template-pagination i {
  display: grid;
  min-width: 22px;
  place-items: center;
  color: #98a2b3;
  font-style: normal;
}

@media (max-width: 1180px) {
  .template-library-layout {
    grid-template-columns: 194px minmax(0, 1fr);
  }

  .template-library-compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  }
}

@media (max-width: 900px) {
  .template-market-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .template-search-box {
    width: 100%;
    max-width: none;
  }

  .template-market-toolbar .template-filter-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-type-tabs {
    width: 100%;
  }

  .template-type-pill {
    flex: 1;
  }

  .template-library-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .template-category-nav {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .template-category-scenes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .nav-primary-group {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .planned-system-panel {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px;
  }

  .planned-system-icon,
  .planned-system-panel ul {
    grid-column: 1;
    grid-row: auto;
  }

  .template-scene-detail {
    padding-inline: 14px;
  }

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

  .template-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .template-pagination > div {
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .template-market-toolbar {
    padding-inline: 14px;
  }

  .template-type-tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
  }

  .template-type-pill {
    padding-inline: 3px;
    font-size: 11px;
  }

  .template-category-scenes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .system-settings-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 20px;
    padding: 24px 20px;
  }

  .system-settings-hero-mark {
    display: none;
  }

  .system-settings-hero-meta {
    align-self: auto;
    padding-right: 0;
  }

  .system-settings-content .system-settings-profile-panel,
  .system-settings-content .system-settings-workspace-panel {
    padding: 20px;
  }
}

@media (max-width: 520px) {
  .system-settings-hero {
    padding: 20px 16px;
  }

  .system-settings-hero-person {
    align-items: flex-start;
  }

  .system-settings-hero-copy strong {
    font-size: 19px;
  }

  .system-settings-hero-copy p {
    font-size: 12px;
  }

  .system-settings-hero-meta,
  .system-settings-workspace-grid {
    grid-template-columns: 1fr;
  }

  .system-settings-tabs {
    gap: 24px;
    margin-top: 16px;
  }

  .system-settings-tabs button {
    min-height: 44px;
    font-size: 14px;
  }

  .system-settings-content .system-settings-profile-panel,
  .system-settings-content .system-settings-workspace-panel {
    margin-top: 16px;
    padding: 18px 16px;
  }

  .system-settings-panel-head,
  .system-settings-logout-row {
    align-items: stretch;
    flex-direction: column;
  }

  .system-settings-save-button,
  .system-settings-switch-button,
  .system-settings-logout-row .btn {
    justify-content: center;
    width: 100%;
  }

  .system-settings-switch-hint {
    max-width: none;
    text-align: left;
  }
}
