:root {
  --brand: #52bb7a;
  --brand-dark: #2f8f56;
  --ink: #173526;
  --muted: #667085;
  --line: rgba(23, 53, 38, 0.12);
  --panel: rgba(255, 255, 255, 0.78);
  --shadow: 0 24px 70px rgba(18, 52, 35, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(82, 187, 122, 0.2), transparent 30%),
    linear-gradient(135deg, #f4fbf6 0%, #eef7f1 44%, #f8faf8 100%);
  color: var(--ink);
  font-family: "Segoe UI", "Aptos", -apple-system, BlinkMacSystemFont, sans-serif;
}

body.login-page {
  height: 100dvh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: clamp(14px, 2.2vw, 42px);
}

body.center-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.top-notice {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  min-width: min(92vw, 360px);
  max-width: min(92vw, 720px);
  padding: 12px 18px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 18px 45px rgba(18, 52, 35, 0.2);
  opacity: 0.75;
  backdrop-filter: blur(8px);
}

.top-notice[hidden] {
  display: none !important;
}

.top-notice--success {
  background: #52bb7a;
}

.top-notice--error {
  background: #d92d20;
}

.top-notice--info {
  background: #344054;
}

.card,
.glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.15);
}

.card {
  width: min(92vw, 520px);
  padding: 32px;
  border-radius: 24px;
}

.login-content {
  width: clamp(340px, 27vw, 560px);
  max-height: calc(100dvh - 28px);
  display: grid;
  gap: clamp(8px, 1.1vh, 16px);
  overflow: hidden;
  text-align: center;
  padding: clamp(22px, 2.6vw, 36px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.login-language-corner {
  position: fixed;
  top: clamp(14px, 2vw, 28px);
  right: clamp(14px, 2vw, 28px);
  z-index: 20;
}

.brand-logo {
  width: auto;
  height: clamp(30px, 3vw, 50px);
  object-fit: contain;
  justify-self: start;
}

.brand-logo--topbar {
  height: 44px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 2vw, 42px);
  line-height: 1.06;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

p {
  line-height: 1.55;
}

.login-status,
.login-copy {
  margin: 0;
  color: var(--muted);
}

.guide {
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(82, 187, 122, 0.1);
}

.guide ol {
  margin: 0;
  padding-left: 20px;
}

.guide li + li {
  margin-top: 8px;
}

.no-permission-card {
  width: min(92vw, 480px);
}

.no-permission-guide {
  padding: 16px 18px;
}

.no-permission-guide h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
}

.no-permission-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
}

.success-card {
  border-top: 6px solid var(--brand);
}

.denied-card {
  border-top: 6px solid #98a2b3;
}

.browser-login {
  margin-top: 6px;
}

.primary-button,
.admin-link,
.logout-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-button:hover,
.admin-link:hover,
.logout-link:hover {
  background: var(--brand-dark);
}

.qr-login {
  margin-top: clamp(10px, 1.5vh, 20px);
  display: grid;
  gap: clamp(6px, 1vh, 12px);
  justify-items: center;
}

.qr-title {
  margin: 0;
  font-weight: 800;
}

#login_container {
  width: min(100%, 340px);
  min-height: clamp(220px, 28vh, 300px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qr-status {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.oauth-fallback {
  margin-top: clamp(10px, 1.5vh, 18px);
  padding-top: clamp(10px, 1.5vh, 18px);
  /* Lark 登录按钮上方的分隔线用品牌绿，强化品牌识别 */
  border-top: 1px solid var(--brand);
  display: grid;
  justify-items: center;
}

.oauth-fallback p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result {
  margin-top: 8px;
  padding: 14px;
  border-radius: 14px;
  font-weight: 800;
}

.hidden {
  display: none;
}

.allowed {
  background: rgba(82, 187, 122, 0.16);
  color: #166534;
}

.denied {
  background: #f2f4f7;
  color: #475467;
}

.topbar {
  position: relative;
  z-index: 10;
  width: min(1500px, calc(100% - 32px));
  margin: 18px auto 0;
  border-radius: 0;
  padding: 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #52bb7a;
}

.brand-lockup,
.user-actions,
.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.user-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-chip {
  min-height: 42px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-grid;
  place-items: center;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: inherit;
  font-weight: 300;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.language-menu summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.language-menu:hover summary::after,
.language-menu[open] summary::after {
  transform: rotate(180deg);
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-options {
  position: absolute;
  left: 50%;
  top: 100%;
  width: max-content;
  min-width: 260px;
  max-width: 320px;
  padding: 28px 32px;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateX(-50%);
}

.language-option {
  width: 100%;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.language-option:hover,
.language-option.is-active {
  background: #51bb79;
  color: #ffffff;
  font-weight: 600;
}

.app-shell,
.admin-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 24px auto 56px;
}

.hero-panel,
.admin-panel,
.admin-card {
  border-radius: 26px;
  padding: clamp(20px, 2vw, 32px);
}

.hero-panel p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.module-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.module-card {
  height: 190px;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #eef1f0;
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-2px);
  background: #52bb7a;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(18, 52, 35, 0.16);
}

.module-card--allowed:hover {
  transform: translateY(-2px);
  background: #ffffff;
  color: #52bb7a;
  box-shadow: 0 18px 40px rgba(18, 52, 35, 0.16);
}

.module-card--allowed {
  background: var(--brand);
  color: #ffffff;
}

.module-card--denied,
.module-card--pending {
  background: #e7ece9;
  color: #475467;
}

.module-status {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-card h2 {
  margin-bottom: 6px;
  font-size: clamp(18px, 1.4vw, 24px);
}

.module-description {
  margin: 0;
  font-size: clamp(12px, 0.72vw, 13px);
  line-height: 1.2;
  word-break: break-word;
}

.module-apply-link {
  color: inherit;
  font-weight: 900;
}

.app-guide {
  margin-top: 18px;
  padding: 14px;
}

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

.admin-card {
  color: var(--ink);
  text-decoration: none;
  transition: transform 160ms ease;
}

.admin-card:hover {
  transform: translateY(-2px);
}

.admin-panel {
  margin-top: 18px;
}

.search-row,
.form-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

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

.field-label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

input[type="search"].text-input {
  padding-right: 42px;
}

input[type="search"].text-input::-webkit-search-cancel-button {
  width: 22px;
  height: 22px;
  margin-right: 2px;
  border-radius: 50%;
  background-color: #eef0f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M4 4l6 6M10 4l-6 6' stroke='%23667085' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.permission-checkboxes {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.admin-results,
.selected-users,
.log-output,
.form-status {
  margin-top: 14px;
  color: var(--muted);
}

.external-options-config {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  margin: 10px 0 0;
  font-size: 13px;
}
.external-options-config dt {
  color: var(--muted);
  align-self: center;
}
.external-options-config dd {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.external-options-config code {
  background: rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
  font-family: ui-monospace, monospace;
}
.external-options-config .hint {
  color: var(--muted);
  font-size: 12px;
}

.field-warning {
  display: block;
  margin-top: 4px;
  color: #b7791f;
  font-size: 12px;
  line-height: 1.4;
}

.user-result,
.selected-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 6px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
}

.selected-users-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
}

.selected-users-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.selected-user-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 53, 38, 0.1);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
}

.selected-user-info {
  display: grid;
  gap: 2px;
}

.selected-user-name {
  font-weight: 800;
}

.selected-user-id,
.selected-users-empty {
  color: var(--muted);
  font-size: 12px;
}

.user-log-button {
  min-width: 58px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  white-space: nowrap;
}

.audit-body {
  max-height: min(62vh, 560px);
  overflow: auto;
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.audit-record {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
}

.audit-record p {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.45;
}

.audit-record-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.audit-record-header strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.audit-diff-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
}

.audit-diff-list li {
  margin: 2px 0;
}

.audit-empty {
  color: var(--muted);
}

.checkbox-row--disabled {
  opacity: 0.58;
}

/* 管理员权限（web_prm）行：红字标注，提醒该权限控制后台访问 */
.checkbox-row--admin {
  background: rgba(217, 45, 32, 0.06);
  border: 1px solid rgba(217, 45, 32, 0.24);
}

.admin-permission-tag {
  margin-left: 4px;
  color: #d92d20;
  font-weight: 700;
  font-size: 12px;
}

.log-output {
  max-height: 520px;
  overflow: auto;
  white-space: normal;
  display: grid;
  gap: 6px;
  font-family: inherit;
}

.log-panel {
  display: block;
}

.log-panel > summary.log-panel-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  user-select: none;
}

.log-panel > summary.log-panel-summary::-webkit-details-marker {
  display: none;
}

.log-panel > summary.log-panel-summary > h2 {
  margin: 0;
  flex: 1;
}

.log-panel > summary.log-panel-summary::after {
  content: "▸";
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.15s ease;
}

.log-panel[open] > summary.log-panel-summary::after {
  transform: rotate(90deg);
}

.admin-panel-header,
.app-maintenance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app-sql-tools {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(82, 187, 122, 0.08);
}

.app-maintenance-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.app-maintenance-row {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.app-maintenance-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.app-summary-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.app-maintenance-summary h3,
.app-maintenance-summary p {
  margin: 0;
}

.app-maintenance-detail {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(480px, 1.6fr);
  gap: 14px;
  align-items: stretch;
}

.app-maintenance-row.is-collapsed .app-maintenance-detail {
  display: none;
}

.app-maintenance-row[draggable="true"] {
  cursor: grab;
}

.app-maintenance-main h3,
.app-maintenance-main p {
  margin: 0 0 8px;
}

.app-maintenance-fields {
  display: grid;
  gap: 10px;
  height: 100%;
}

.app-translation-table {
  grid-template-columns: minmax(72px, 0.35fr) repeat(7, minmax(150px, 1fr));
  gap: 0;
  overflow-x: auto;
  align-items: stretch;
  border: 1px solid var(--line);
  background: #ffffff;
  height: 100%;
}

.translation-header,
.translation-row-label {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-weight: 900;
  text-align: center;
}

.translation-header {
  background: #52bb7a;
  color: #ffffff;
}

.translation-row-label {
  background: #ffffff;
  color: var(--ink);
}

.app-translation-table .text-input {
  height: 100%;
  min-height: 42px;
  border-radius: 0;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.counted-field {
  position: relative;
  min-height: 100%;
}

.counted-field .text-input {
  padding-bottom: 24px;
}

.field-counter {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

/* 输入错误状态 */
.input-error {
  border-color: #d92d20 !important;
  background: rgba(217, 45, 32, 0.08) !important;
}

/* 已有用户列表样式 */
.existing-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.existing-users-header .search-row {
  flex: 1;
}

.search-row.compact {
  display: flex;
  align-items: center;
}

.select-all-button {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.select-all-button:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.existing-users-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.existing-users-list.scrollable {
  display: flex;
  flex-direction: column;
}

.loading,
.error {
  padding: 20px;
  text-align: center;
  color: var(--muted);
}

.existing-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.existing-user-item:last-child {
  border-bottom: none;
}

.existing-user-item:hover {
  background: rgba(82, 187, 122, 0.08);
}

.existing-user-item.selected {
  background: rgba(82, 187, 122, 0.18);
}

.user-info {
  flex: 1;
  display: grid;
  gap: 4px;
}

.user-name {
  font-weight: 800;
  color: var(--ink);
}

.user-id {
  font-size: 12px;
  color: var(--muted);
}

.permission-summary {
  font-size: 12px;
  color: var(--muted);
}

/* 分页样式 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
}

.page-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.page-btn:hover:not(:disabled) {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: var(--muted);
}


.translation-row-label {
  display: grid;
  place-items: center;
}

.app-permission-approval-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.danger-button {
  background: #d92d20;
}

.danger-button:hover {
  background: #b42318;
}

.app-maintenance-fields textarea.text-input {
  min-height: 42px;
  resize: vertical;
}

.drag-handle {
  min-width: 34px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: grab;
}

.text-action-button {
  border: 0;
  background: transparent;
  color: var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
  padding: 6px 2px;
}

.text-action-button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.secondary-button {
  min-width: 42px;
  min-height: 42px;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.module-card--disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

@media (min-width: 2200px) {
  .login-card {
    width: 560px;
  }

  .app-shell,
  .admin-shell,
  .topbar {
    width: min(1580px, calc(100% - 64px));
  }
}

@media (max-height: 760px) {
  body.login-page {
    padding: 10px;
  }

  .login-card {
    gap: 6px;
    padding: 18px;
  }

  .brand-logo {
    height: 30px;
  }

  h1 {
    margin-bottom: 6px;
    font-size: 26px;
  }

  #login_container {
    min-height: 210px;
  }

  .oauth-fallback {
    margin-top: 8px;
    padding-top: 8px;
  }
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .module-grid,
  .admin-grid,
  .permission-checkboxes,
  .form-grid,
  .app-maintenance-row,
  .app-maintenance-detail,
  .app-permission-approval-group {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body.login-page {
    padding: 12px;
  }

  .login-card {
    width: min(calc(100vw - 24px), 430px);
    padding: 20px;
  }

  .card {
    width: min(calc(100vw - 24px), 430px);
  }

  .user-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 操作模式选择 */
.mode-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.mode-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
}

.mode-option small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  font-weight: normal;
}

/* 部门选择器 */
.department-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.department-select {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.department-users-preview {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
}

.department-users-preview.scrollable {
  display: flex;
  flex-direction: column;
}

/* 搜索和操作按钮行 */
.search-actions-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.search-actions-row .search-row {
  flex: 1;
  min-width: 300px;
}

.search-type-select {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  min-width: 140px;
}

.search-results-container {
  margin-top: 16px;
}

.search-section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--muted);
  margin: 16px 0 8px;
  padding: 0 4px;
}

.department-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.department-result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.department-result:hover {
  background: rgba(82, 187, 122, 0.1);
  border-color: var(--brand);
}

.department-icon {
  position: relative;
  flex: 0 0 32px;
  width: 32px;
  height: 28px;
  border-radius: 999px;
  background: rgba(82, 187, 122, 0.12);
}

.department-icon span {
  position: absolute;
  display: block;
  border-radius: 999px;
  background: #52bb7a;
}

.department-icon span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  width: 12px;
  height: 7px;
  border-radius: 8px 8px 5px 5px;
  background: #52bb7a;
}

.department-icon span:nth-child(1) {
  left: 11px;
  top: 5px;
  width: 10px;
  height: 10px;
  z-index: 2;
}

.department-icon span:nth-child(1)::after {
  width: 15px;
  height: 9px;
  top: 9px;
}

.department-icon span:nth-child(2),
.department-icon span:nth-child(3) {
  top: 8px;
  width: 7px;
  height: 7px;
  opacity: 0.72;
}

.department-icon span:nth-child(2) {
  left: 5px;
}

.department-icon span:nth-child(3) {
  right: 5px;
}

.department-icon span:nth-child(2)::after,
.department-icon span:nth-child(3)::after {
  width: 9px;
  height: 6px;
  top: 6px;
}

.department-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.department-name {
  font-weight: 700;
}

.department-count {
  font-size: 12px;
  color: var(--muted);
}

.department-arrow {
  color: var(--muted);
}

.department-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 800;
  font-size: 16px;
}

.department-back {
  color: var(--brand);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(82, 187, 122, 0.1);
}

.department-back:hover {
  background: rgba(82, 187, 122, 0.2);
}

.department-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* 搜索部门直接展开成员块：每块含部门名、成员数、全选勾选 + 成员列表 */
.department-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.department-block-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(82, 187, 122, 0.08);
}

.department-block-name {
  flex: 1;
  font-weight: 700;
  color: var(--ink);
}

.department-block-count {
  font-size: 12px;
  color: var(--muted);
}

.department-block-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--brand-dark);
  cursor: pointer;
  user-select: none;
}

.department-block-members {
  max-height: 280px;
  overflow: auto;
}

.department-block-members .existing-user-item:last-child {
  border-bottom: none;
}

.hidden {
  display: none !important;
}

/* 弹窗样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(90vw, 500px);
  padding: 32px;
  border-radius: 26px;
}

.modal h3 {
  margin: 0 0 16px;
}

.import-summary {
  margin: 16px 0;
}

.import-summary p {
  margin: 8px 0;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* 响应式调整 */
@media (max-width: 900px) {
  .existing-users-header,
  .department-selector {
    flex-direction: column;
  }

  .action-buttons {
    width: 100%;
  }

  .action-buttons .secondary-button,
  .action-buttons .file-input-label {
    flex: 1;
  }
}

  .language-options {
    left: 0;
    right: auto;
  }
}

/* 必填项红色星号 */
.required-asterisk {
  color: #d92d20;
  font-weight: bold;
}

/* 访问限制（IP 封禁/解封）页 */
.security-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 12px 0;
}

.security-status {
  color: var(--ink);
  font-size: 13px;
  min-height: 18px;
  margin: 8px 0;
}

.security-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--line);
}

.security-table th,
.security-table td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.security-table th {
  background: #52bb7a;
  color: #ffffff;
  font-weight: 900;
}

.security-table tbody tr:nth-child(even) {
  background: #f7faf8;
}

/* 封禁专用页（blocked.html）：与无权限页同构，增加倒计时与提示行 */
.blocked-card {
  width: min(92vw, 480px);
}

.blocked-countdown {
  margin: 18px 0 0;
  font-size: 15px;
}

.blocked-countdown-value {
  display: inline-block;
  min-width: 64px;
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.blocked-retry {
  margin: 10px 0 0;
  color: #667085;
  font-size: 14px;
}

/* ============================================================
 * 导航应用运行状态监控（普通用户导航页 + 后台 /admin/health）
 * 监控元素全部由 app.js 按 /api/module-health 数据动态装饰；
 * 停用卡、无数据时不插入任何元素，页面结构与现状一致。
 * ============================================================ */

/* ---- 顶部健康汇总条（纯展示，无操作按钮） ---- */
.health-summary {
  margin-top: 18px;
  padding: 14px 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* display:flex 会覆盖 UA 的 [hidden]，需显式恢复隐藏（无数据/功能关闭时不占位） */
.health-summary[hidden] {
  display: none;
}

.health-summary__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.health-summary__dot--ok {
  background: var(--brand);
  animation: hp-green 1.8s infinite;
}

.health-summary__dot--down {
  background: #d92d20;
  animation: hp-red 1.8s infinite;
}

.health-summary__dot--unknown {
  background: #98a2b3;
  animation: hp-gray 1.8s infinite;
}

@keyframes hp-green {
  0% {
    box-shadow: 0 0 0 0 rgba(82, 187, 122, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(82, 187, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(82, 187, 122, 0);
  }
}

@keyframes hp-red {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 45, 32, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(217, 45, 32, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 45, 32, 0);
  }
}

@keyframes hp-gray {
  0% {
    box-shadow: 0 0 0 0 rgba(152, 162, 179, 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(152, 162, 179, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(152, 162, 179, 0);
  }
}

.health-summary__body {
  flex: 1 1 auto;
  min-width: 0;
}

.health-summary__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
}

.health-summary__title--down {
  color: #b42318;
}

.health-summary__meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---- 卡片外部包裹层（异常态用外圈色环，半径与卡片 26px 同心） ---- */
.module-health-wrap {
  border-radius: 26px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

/* 关键修复：卡片被 div 包裹后不再是 grid item，<a> 会退回 inline 盒，
 * 必须显式恢复块级盒与固定高度，否则卡片塌陷、背景只包住文字行 */
.module-health-wrap .module-card {
  display: block;
  height: 190px;
  position: relative;
}

.module-health-wrap:hover {
  transform: translateY(-2px);
}

/* 卡片在包裹层内不再自行上浮，由外层统一承载悬浮位移 */
.module-health-wrap .module-card:hover {
  transform: none;
}

.module-health-wrap--down {
  outline: 3px solid #d92d20;
  outline-offset: 0;
  box-shadow: 0 16px 38px rgba(217, 45, 32, 0.28);
}

.module-health-wrap--slow {
  outline: 3px solid #f79009;
  outline-offset: 0;
  box-shadow: 0 16px 38px rgba(247, 144, 9, 0.22);
}

/* 右上角胶囊/白点需要卡片自身做定位参照（正常卡不包裹，同样需要） */
.module-card--allowed {
  position: relative;
}

/* ---- 右上角状态点（正常：低调白色脉冲点） ---- */
.health-dot {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
}

.health-dot--ok {
  animation: hp-white 1.8s infinite;
}

@keyframes hp-white {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

/* ---- 右上角状态胶囊（慢 / 异常 / 检测中） ---- */
.health-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.health-chip--down {
  background: #d92d20;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(217, 45, 32, 0.35);
}

.health-chip--slow {
  background: #f79009;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(247, 144, 9, 0.3);
}

.health-chip--unknown {
  background: rgba(255, 255, 255, 0.92);
  color: #475467;
}

.health-chip__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: hp-blink 1.2s ease-in-out infinite;
}

@keyframes hp-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* ---- 卡片底部详情条（异常/较慢时由 JS 插入，仅包裹卡内出现） ---- */
.module-health-wrap .module-description {
  padding-bottom: 20px;
}

.health-detail {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.health-detail--down {
  background: rgba(217, 45, 32, 0.92);
  color: #fff;
}

.health-detail--slow {
  background: rgba(247, 144, 9, 0.95);
  color: #fff;
}

/* ---- 后台「应用运行监控」面板（/admin/health） ---- */
.health-stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 4px;
}

.health-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: #f2f4f3;
  color: var(--ink);
}

.health-stat-chip b {
  font-size: 15px;
}

.health-stat-chip--ok {
  background: rgba(82, 187, 122, 0.14);
  color: #2f8f56;
}

.health-stat-chip--slow {
  background: #f79009;
  color: #fff;
}

.health-stat-chip--down {
  background: #d92d20;
  color: #fff;
}

.health-stat-chip--unknown {
  background: #eef1f0;
  color: #475467;
}

.health-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 12px;
}

.health-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.health-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.health-table tr:last-child td {
  border-bottom: 0;
}

.health-table tr.is-down td {
  background: rgba(217, 45, 32, 0.045);
}

.health-table tr.is-slow td {
  background: rgba(247, 144, 9, 0.05);
}

.health-table tr.is-disabled {
  opacity: 0.55;
}

.health-table .cell-app {
  font-weight: 800;
}

.health-table .cell-app small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.health-table .cell-reason {
  max-width: 320px;
  color: #b42318;
  font-size: 12px;
}

.health-table .cell-muted {
  color: var(--muted);
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.health-pill--ok {
  background: rgba(82, 187, 122, 0.16);
  color: #2f8f56;
}

.health-pill--slow {
  background: #f79009;
  color: #fff;
}

.health-pill--down {
  background: #d92d20;
  color: #fff;
}

.health-pill--unknown {
  background: #eef1f0;
  color: #475467;
}

.health-pill--disabled {
  background: #e7ece9;
  color: #667085;
}

.row-refresh-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink);
}

.row-refresh-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.row-refresh-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

/* 管理首页（/admin）第 5 张入口卡角标 */
.admin-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(82, 187, 122, 0.14);
  color: #2f8f56;
}

.admin-entry-badge[hidden] {
  display: none;
}

.admin-entry-badge--down {
  background: #d92d20;
  color: #fff;
}

.admin-entry-badge--unknown {
  background: #eef1f0;
  color: #475467;
}


/* ---------- 进程监控（admin_process_monitor.html + startProcessMonitor） ---------- */

.pm-disabled-hint {
  margin: 0;
  padding: 12px 16px;
  color: #475467;
  font-size: 14px;
}

.pm-inline-status {
  margin: 8px 0;
  min-height: 18px;
  font-size: 13px;
  color: #475467;
  white-space: pre-wrap;
}




.pm-status {
  font-weight: 700;
  white-space: nowrap;
}

.pm-status--alive {
  color: #2f8f56;
}

.pm-status--dead {
  color: #d92d20;
}

.pm-status--unknown {
  color: #98a2b3;
}


.pm-btn-start {
  color: #2f8f56;
}

.pm-btn-stop {
  color: #d92d20;
}

.pm-edit-row > td {
  background: #f8fafa;
}

.pm-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}

@media (max-width: 900px) {
  .pm-edit-grid {
    grid-template-columns: 1fr;
  }
}

.pm-field--span {
  grid-column: 1 / -1;
}

.pm-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding: 4px 0;
}

.pm-field .text-input {
  width: 100%;
  box-sizing: border-box;
}

.pm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475467;
}

.pm-field--check {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #1d2939;
}

.pm-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pm-field-hint {
  font-size: 12px;
  color: #98a2b3;
  line-height: 1.4;
}

.pm-mention-picker .pm-mention-search {
  display: flex;
  gap: 6px;
}

.pm-mention-picker .pm-mention-search .text-input {
  flex: 1;
  min-width: 0;
}

.pm-mention-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.pm-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(82, 187, 122, 0.14);
  color: #2f8f56;
  font-size: 12px;
  font-weight: 700;
}

.pm-mention-chip-remove {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.pm-mention-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.pm-mention-option {
  border: 1px solid #e4e7ec;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}

.pm-mention-option:hover {
  background: #f2f4f3;
}

/* ---- 进程监控：状态提示着色 / 操作按钮 / 确认浮窗 / 事件表格 ---- */

.pm-inline-status--error {
  color: #d92d20;
  font-weight: 700;
}

.pm-inline-status--ok {
  color: #2f8f56;
  font-weight: 700;
}

.pm-actions-cell {
  white-space: nowrap;
  text-align: right;
}

.pm-actions-cell .pm-btn + .pm-btn {
  margin-left: 6px;
}

.pm-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  background: #eef1f0;
  color: #344054;
  transition: filter 0.15s ease;
}

.pm-btn:hover {
  filter: brightness(0.94);
}

.pm-btn--check {
  background: #eef1f0;
  color: #344054;
}

.pm-btn--start {
  background: rgba(82, 187, 122, 0.16);
  color: #2f8f56;
}

.pm-btn--stop {
  background: rgba(217, 45, 32, 0.12);
  color: #d92d20;
}

.pm-btn--edit {
  background: #eef1f0;
  color: #475467;
}

.pm-btn--delete {
  background: #d92d20;
  color: #fff;
}

.pm-edit-actions .pm-btn {
  padding: 7px 20px;
  font-size: 13px;
}

.pm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, 0.5);
}

.pm-modal-card {
  width: min(420px, calc(100vw - 48px));
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.24);
}

.pm-modal-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #101828;
}

.pm-modal-message {
  margin: 0 0 16px;
}

.pm-modal-message p {
  margin: 4px 0;
  font-size: 13px;
  color: #475467;
  line-height: 1.5;
  word-break: break-all;
}

.pm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.pm-modal-actions .pm-btn {
  padding: 7px 20px;
  font-size: 13px;
}

.pm-event-outcome--ok {
  color: #2f8f56;
  font-weight: 700;
  white-space: nowrap;
}

.pm-event-outcome--bad {
  color: #d92d20;
  font-weight: 700;
  white-space: nowrap;
}

.pm-event-detail {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- 进程监控：行内三角展开编辑面板 ---- */

.pm-detail-row > td {
  background: #f8fafa;
  padding: 16px 18px;
  border-bottom: 2px solid #e4e7ec;
}

.pm-detail-panel {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  padding: 16px 18px;
}

.pm-detail-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #101828;
  margin-bottom: 14px;
}

.pm-detail-title::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2f8f56;
}

/* ---- 三角展开按钮（操作列末尾，展开态三角旋转向上） ---- */

.pm-btn--toggle {
  padding: 4px 10px;
}

.pm-btn--toggle::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #475467;
  transition: transform 0.15s ease;
}

.pm-btn--toggle.is-open::before {
  transform: rotate(180deg);
  border-top-color: #2f8f56;
  border-top: 6px solid #2f8f56;
}

/* ---- 启用/停用滑动开关（操作列，检测旁） ---- */

.pm-switch {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 22px;
  vertical-align: middle;
  margin: 0 6px;
  cursor: pointer;
}

.pm-switch-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 7px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  pointer-events: none;
}

.pm-switch input:checked ~ .pm-switch-text {
  right: auto;
  left: 8px;
  color: #fff;
}

.pm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pm-switch-slider {
  position: absolute;
  inset: 0;
  background: #d0d5dd;
  border-radius: 999px;
  transition: background 0.18s ease;
}

.pm-switch-slider::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.25);
  transition: transform 0.18s ease;
}

.pm-switch input:checked + .pm-switch-slider {
  background: #2f8f56;
}

.pm-switch input:checked + .pm-switch-slider::before {
  transform: translateX(36px);
}

