/* Dental system appearance presets. Loaded after the product stylesheet so the
   preserved light UI can be restored without disturbing business markup. */

html[data-app-theme="night"] {
  color-scheme: dark;
  --theme-accent: #68e78e;
  --theme-accent-soft: rgba(104, 231, 142, .12);
  --theme-canvas: #020304;
  --theme-surface: rgba(17, 20, 21, .78);
  --theme-surface-raised: rgba(25, 29, 30, .9);
  --theme-line: rgba(244, 248, 246, .18);
  --theme-text: #f7faf8;
  --theme-muted: rgba(247, 250, 248, .66);
}

/* 素曜白角色管理：覆盖后置深色设置规则，并建立紧凑的权限配置层级。 */
html[data-app-theme="light"] #system #roleAdminView {
  gap: 16px;
}

html[data-app-theme="light"] #system #roleAdminView .role-admin-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 2px 2px;
}

html[data-app-theme="light"] #system #roleAdminView .role-admin-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #2f6fe4;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

html[data-app-theme="light"] #system #roleAdminView .role-admin-heading h2,
html[data-app-theme="light"] #system #roleAdminView .role-list-heading h3 {
  margin: 0;
  color: #18253a !important;
}

html[data-app-theme="light"] #system #roleAdminView .role-admin-heading h2 { font-size: 22px; }
html[data-app-theme="light"] #system #roleAdminView .role-list-heading h3 { font-size: 15px; }

html[data-app-theme="light"] #system #roleAdminView .role-admin-heading p,
html[data-app-theme="light"] #system #roleAdminView .role-list-heading p {
  margin: 6px 0 0;
  color: #718096 !important;
  font-size: 13px;
}

html[data-app-theme="light"] #system #roleAdminView .role-admin-safety-note {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #d9e5f7;
  border-radius: 999px;
  color: #50709d;
  background: #f5f9ff;
  font-size: 12px;
  font-weight: 700;
}

html[data-app-theme="light"] #system [data-settings-panel="people-admin"] .permission-admin-tabs {
  border: 1px solid #dce5f0 !important;
  background: #f5f8fc !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] #system [data-settings-panel="people-admin"] .permission-admin-tabs button {
  color: #607087 !important;
  background: transparent !important;
}

html[data-app-theme="light"] #system [data-settings-panel="people-admin"] .permission-admin-tabs button:is(:hover, .active) {
  color: #245fcd !important;
  border-color: transparent !important;
  background: #fff !important;
  box-shadow: 0 1px 4px rgba(47, 88, 143, .10), inset 0 -2px #3f7ce8 !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-form {
  gap: 20px;
  padding: 22px !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 14px !important;
  color: #26354a !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 24px rgba(39, 73, 119, .06) !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-form > .role-name-field {
  display: grid;
  grid-template-columns: minmax(180px, 520px) 1fr;
  max-width: none;
  gap: 5px 20px;
  color: #26354a !important;
}

html[data-app-theme="light"] #system #roleAdminView .role-name-field > span { font-size: 13px; }
html[data-app-theme="light"] #system #roleAdminView .role-name-field > small {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #8794a7;
  font-size: 12px;
  font-weight: 600;
}

html[data-app-theme="light"] #system #roleAdminView .role-name-field > input { grid-column: 1; }

html[data-app-theme="light"] #system #roleAdminView .permission-form input:not([type="checkbox"]) {
  min-height: 44px;
  color: #18253a !important;
  border: 1px solid #cfd9e6 !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(34, 61, 94, .04) !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-form input:not([type="checkbox"])::placeholder { color: #93a0b2 !important; }
html[data-app-theme="light"] #system #roleAdminView .permission-form input:not([type="checkbox"]):focus {
  border-color: #4b83e8 !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .12) !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-check-grid { gap: 14px; }

html[data-app-theme="light"] #system #roleAdminView .permission-check-group {
  gap: 2px;
  padding: 8px !important;
  border: 1px solid #dfe7f1 !important;
  border-radius: 12px;
  background: #f8fafd !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px 11px;
  border-bottom: 1px solid #e5ebf3;
  margin-bottom: 4px;
}

html[data-app-theme="light"] #system #roleAdminView .permission-group-heading strong {
  padding: 0;
  color: #26354a !important;
  font-size: 13px;
}

html[data-app-theme="light"] #system #roleAdminView .permission-group-heading span {
  color: #8190a5;
  font-size: 12px;
  font-weight: 700;
}

html[data-app-theme="light"] #system #roleAdminView .permission-check-group label {
  min-height: 36px;
  padding: 7px 8px !important;
  color: #506078 !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-check-group label:hover {
  color: #244b86 !important;
  border-color: #d8e4f5 !important;
  background: #edf4ff !important;
}

html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"] { accent-color: #3f7ce8; }

html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"] {
  appearance: none;
  display: grid;
  place-content: center;
  box-sizing: border-box;
  flex: 0 0 18px;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 1.5px solid #7c8999 !important;
  border-radius: 4px;
  background: #fff !important;
  cursor: pointer;
}

html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"]::before {
  content: "";
  width: 9px;
  height: 5px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(0);
}

html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"]:checked {
  border-color: #3674e4 !important;
  background: #3674e4 !important;
}

html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
html[data-app-theme="light"] #system #roleAdminView input[type="checkbox"]:focus-visible { outline: 3px solid rgba(54, 116, 228, .2); outline-offset: 2px; }
html[data-app-theme="light"] #system #roleAdminView .permission-group-heading { border-bottom-color: #cbd6e4 !important; }

html[data-app-theme="light"] #system #roleAdminView .permission-form .system-actions {
  justify-content: flex-start;
  gap: 10px;
  padding-top: 0;
}

html[data-app-theme="light"] #system #roleAdminView .permission-form .primary-btn {
  min-width: 112px;
  color: #fff !important;
  border-color: #3674e4 !important;
  background: #3674e4 !important;
  box-shadow: 0 5px 12px rgba(54, 116, 228, .18) !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-form .light-btn {
  color: #4d5f78 !important;
  border-color: #d5dfeb !important;
  background: #fff !important;
}

html[data-app-theme="light"] #system #roleAdminView .role-list-section {
  padding-top: 4px;
  border-top: 1px solid #e5ebf3;
}

html[data-app-theme="light"] #system #roleAdminView .role-list-heading { margin-bottom: 10px; }

html[data-app-theme="light"] #system #roleAdminView .permission-row {
  color: #26354a !important;
  border: 1px solid #e1e8f1 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-row:hover {
  border-color: #cddcf0 !important;
  background: #f8fbff !important;
}

html[data-app-theme="light"] #system #roleAdminView .permission-row strong { color: #24344a !important; }
html[data-app-theme="light"] #system #roleAdminView .permission-row small { color: #718096 !important; }

html[data-app-theme="light"] #system #roleList .permission-row-actions .light-btn {
  min-width: 72px;
  color: #245fcd !important;
  border: 1px solid #b8c9df !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(45, 75, 114, .06) !important;
}

html[data-app-theme="light"] #system #roleList .permission-row-actions .light-btn:hover {
  border-color: #7fa4d5 !important;
  background: #f3f7fd !important;
}

html[data-app-theme="light"] #system #roleList .permission-row-actions .danger-line {
  color: #c44343 !important;
  border-color: #dfb4b4 !important;
  background: #fffafa !important;
}

html[data-app-theme="light"] #system #roleList .permission-row-actions .danger-line:hover {
  border-color: #cf8585 !important;
  background: #fff2f2 !important;
}

html[data-app-theme="light"] #system #peopleEmployeeList .people-row-actions .light-btn {
  min-width: 72px;
  min-height: 36px;
  color: #245fcd !important;
  border: 1px solid #b8c9df !important;
  border-radius: 9px;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(45, 75, 114, .07) !important;
}

html[data-app-theme="light"] #system #peopleEmployeeList .people-row-actions .light-btn:hover {
  border-color: #7fa4d5 !important;
  background: #f3f7fd !important;
}

html[data-app-theme="light"] #system #peopleEmployeeList .people-row-actions .danger-line {
  color: #c44343 !important;
  border-color: #dfb4b4 !important;
  background: #fffafa !important;
}

html[data-app-theme="light"] #system #peopleEmployeeList .people-row-actions .danger-line:hover {
  border-color: #cf8585 !important;
  background: #fff2f2 !important;
}

html[data-app-theme="light"] #system #employeeAdminView :is(.permission-row-actions, .system-actions) .light-btn {
  min-height: 36px;
  padding-inline: 14px;
  color: #245fcd !important;
  border: 1px solid #b8c9df !important;
  border-radius: 9px;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(45, 75, 114, .07) !important;
}

html[data-app-theme="light"] #system #employeeAdminView :is(.permission-row-actions, .system-actions) .light-btn:hover {
  border-color: #7fa4d5 !important;
  background: #f3f7fd !important;
}

html[data-app-theme="light"] #system #employeeAdminView .permission-row-actions .danger-line {
  color: #c44343 !important;
  border-color: #dfb4b4 !important;
  background: #fffafa !important;
}

html[data-app-theme="light"] #system #employeeAdminView .permission-row-actions .danger-line:hover {
  border-color: #cf8585 !important;
  background: #fff2f2 !important;
}

html[data-app-theme="light"] body .employee-password-reset-card {
  color: #26354a !important;
  border-color: #d7e1ed !important;
  background: #fff !important;
}

html[data-app-theme="light"] body .employee-password-account {
  border-color: #dbe4ef !important;
  background: #f6f9fd !important;
}

html[data-app-theme="light"] body .employee-password-account span { color: #718096 !important; }
html[data-app-theme="light"] body .employee-password-account strong,
html[data-app-theme="light"] body .employee-password-reset-form label { color: #26354a !important; }

html[data-app-theme="light"] body .employee-password-reset-form input {
  color: #18253a !important;
  border-color: #b8c9df !important;
  background: #fff !important;
}

html[data-app-theme="light"] body .employee-password-reset-form input:focus {
  border-color: #4b83e8 !important;
  outline-color: rgba(63, 124, 232, .15) !important;
}

html[data-app-theme="light"] body .auto-backup-panel { color: #26354a !important; border-color: #d6e1ed !important; background: #f7fbff !important; }
html[data-app-theme="light"] body .auto-backup-panel :is(strong,label) { color: #26354a !important; }
html[data-app-theme="light"] body .auto-backup-panel :is(small,#autoBackupStatus) { color: #718096 !important; }
html[data-app-theme="light"] body .auto-backup-panel :is(input[type="text"],input[type="time"]) { color: #18253a !important; border-color: #b8c9df !important; background: #fff !important; }
html[data-app-theme="light"] body .system-tools-mode-cards button{color:#26354a!important;border-color:#d7e2ee!important;background:#fff!important;box-shadow:0 5px 16px rgba(39,73,119,.05)!important}
html[data-app-theme="light"] body .system-tools-mode-cards button>span,html[data-app-theme="light"] body .system-tools-mode-cards button>small{color:#718096!important}
html[data-app-theme="light"] body .system-tools-mode-cards button:hover{border-color:#9bb9de!important;background:#f8fbff!important}
html[data-app-theme="light"] body .system-tools-mode-cards button.active{border-color:#4b83e8!important;background:linear-gradient(135deg,#edf4ff,#fff)!important;box-shadow:inset 3px 0 #3674e4,0 7px 20px rgba(54,116,228,.1)!important}
html[data-app-theme="night"] body .system-tools-mode-cards button{color:#f2f6f4!important;border-color:rgba(244,248,246,.14)!important;background:#121717!important}
html[data-app-theme="night"] body .system-tools-mode-cards button>span,html[data-app-theme="night"] body .system-tools-mode-cards button>small{color:rgba(244,247,245,.58)!important}
html[data-app-theme="night"] body .system-tools-mode-cards button.active{border-color:rgba(43,217,130,.64)!important;background:linear-gradient(135deg,rgba(43,217,130,.11),rgba(255,255,255,.025))!important;box-shadow:inset 3px 0 #2bd982!important}
html[data-app-theme="light"] body .auto-backup-modal{background:rgba(24,39,55,.38)!important}
html[data-app-theme="light"] body .auto-backup-dialog{color:#26354a!important;border-color:#d4dfeb!important;background:#fff!important;box-shadow:0 28px 80px rgba(27,53,88,.24)!important}
html[data-app-theme="light"] body .auto-backup-dialog>header,html[data-app-theme="light"] body .auto-backup-dialog>footer{border-color:#dce5ef!important;background:#f8fbff!important}
html[data-app-theme="light"] body .auto-backup-dialog>header p,html[data-app-theme="light"] body .auto-backup-tree label,html[data-app-theme="light"] body .auto-backup-body>#autoBackupStatus{color:#718096!important}
html[data-app-theme="light"] body .auto-backup-fields input{color:#18253a!important;border-color:#b8c9df!important;background:#fff!important}
html[data-app-theme="light"] body .auto-backup-tree section{border-color:#dce5ef!important;background:#f7faff!important}
html[data-app-theme="light"] body .auto-backup-select-all{color:#18253a!important;border-color:#18253a!important;background:#fff!important}
html[data-app-theme="light"] body .auto-backup-select-all:hover{background:#f1f4f7!important}
html[data-app-theme="light"] body .auto-backup-dialog>footer #saveAutoBackup{color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#3674e4!important;background:#3674e4!important;box-shadow:0 5px 12px rgba(54,116,228,.18)!important}
html[data-app-theme="night"] body .auto-backup-dialog{border-color:rgba(244,248,246,.16)!important;background:#101515!important;box-shadow:0 28px 80px rgba(0,0,0,.5),inset 0 1px rgba(255,255,255,.05)!important}
html[data-app-theme="night"] body .auto-backup-dialog>header,html[data-app-theme="night"] body .auto-backup-dialog>footer{border-color:rgba(244,248,246,.12)!important;background:#141919!important}
html[data-app-theme="night"] body .auto-backup-dialog :is(h2,strong,label){color:#f2f6f4!important;-webkit-text-fill-color:#f2f6f4!important}
html[data-app-theme="night"] body .auto-backup-dialog :is(p,small,.auto-backup-tree label){color:rgba(244,247,245,.62)!important;-webkit-text-fill-color:rgba(244,247,245,.62)!important}
html[data-app-theme="night"] body .auto-backup-fields input{color:#f2f6f4!important;-webkit-text-fill-color:#f2f6f4!important;border-color:rgba(244,248,246,.18)!important;background:#171d1d!important}
html[data-app-theme="night"] body .auto-backup-tree section{border-color:rgba(244,248,246,.12)!important;background:rgba(255,255,255,.035)!important}
html[data-app-theme="night"] body .auto-backup-select-all{color:#f2f6f4!important;border-color:rgba(244,248,246,.72)!important;background:transparent!important}
html[data-app-theme="night"] body .auto-backup-select-all:hover{background:rgba(255,255,255,.08)!important}
html[data-app-theme="night"] body .auto-backup-dialog>footer #saveAutoBackup{color:#07150e!important;-webkit-text-fill-color:#07150e!important;border-color:#2bd982!important;background:#2bd982!important}
html:is([data-app-theme="light"],[data-app-theme="night"]) body .auto-backup-dialog :is(#selectAllAutoBackup,#chooseAutoBackupFolder,#runAutoBackupNow,#saveAutoBackup){color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#3674e4!important;background:#3674e4!important;box-shadow:0 5px 12px rgba(54,116,228,.2)!important}
html:is([data-app-theme="light"],[data-app-theme="night"]) body .auto-backup-dialog :is(#selectAllAutoBackup,#chooseAutoBackupFolder,#runAutoBackupNow,#saveAutoBackup):hover{color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:#2d64ca!important;background:#2d64ca!important}

@media (max-width: 760px) {
  html[data-app-theme="light"] #system #roleAdminView .role-admin-heading { display: grid; gap: 10px; }
  html[data-app-theme="light"] #system #roleAdminView .role-admin-safety-note { width: fit-content; }
  html[data-app-theme="light"] #system #roleAdminView .permission-form > .role-name-field { grid-template-columns: 1fr; }
  html[data-app-theme="light"] #system #roleAdminView .role-name-field > small,
  html[data-app-theme="light"] #system #roleAdminView .role-name-field > input { grid-column: 1; grid-row: auto; }
}

html[data-app-theme="light"] {
  color-scheme: light;
  --theme-accent: #168b59;
  --theme-accent-soft: rgba(22, 139, 89, .1);
  --theme-canvas: #f4f7fb;
  --theme-surface: rgba(255, 255, 255, .92);
  --theme-surface-raised: #fff;
  --theme-line: rgba(42, 70, 91, .14);
  --theme-text: #17212f;
  --theme-muted: #657386;
}

/* Compact two-state liquid-glass theme control above the account card. */
.sidebar .sidebar-theme-toggle {
  position: relative;
  display: block;
  width: calc(100% - 24px);
  height: 42px;
  flex: 0 0 auto;
  margin: auto 12px 0;
  padding: 3px;
  border: 1px solid rgba(244, 248, 246, .17);
  border-radius: 13px;
  color: rgba(247, 250, 248, .68);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .18);
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-theme-toggle-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, .16);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.sidebar-theme-toggle-track::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: inherit;
  background: radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .11), transparent 38%);
  content: "";
  pointer-events: none;
}
.sidebar-theme-toggle-thumb {
  position: absolute;
  inset: 2px auto 2px 2px;
  z-index: 0;
  width: calc(50% - 2px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .075));
  box-shadow: inset 0 1px rgba(255, 255, 255, .18), inset 0 -1px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .22);
  transition: transform 300ms cubic-bezier(.16, 1, .3, 1), background-color 300ms ease, box-shadow 300ms ease;
}
.sidebar-theme-toggle[data-state="night"] .sidebar-theme-toggle-thumb { transform: translateX(100%); }
.sidebar-theme-toggle-track > span:not(.sidebar-theme-toggle-thumb) {
  position: relative;
  z-index: 1;
  color: rgba(247, 250, 248, .5) !important;
  font-size: 12px;
  font-weight: 680;
  line-height: 1;
  text-align: center;
  transition: color 200ms ease;
}
.sidebar-theme-toggle[data-state="light"] .sidebar-theme-toggle-track > span:nth-of-type(1),
.sidebar-theme-toggle[data-state="night"] .sidebar-theme-toggle-track > span:nth-of-type(2) { color: #f7faf8 !important; }
.sidebar-theme-toggle:hover { border-color: rgba(244, 248, 246, .28); }
.sidebar-theme-toggle:active { transform: scale(.985); }
.sidebar-theme-toggle:focus-visible { outline: 2px solid rgba(104, 231, 142, .78); outline-offset: 2px; }
.sidebar .sidebar-theme-toggle + .sidebar-account-card { margin-top: 8px; }

html[data-app-theme="light"] .sidebar .sidebar-theme-toggle {
  color: #657386 !important;
  border-color: #ccd8e4 !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: inset 0 1px #fff, 0 8px 22px rgba(25, 41, 61, .08) !important;
}
html[data-app-theme="light"] .sidebar-theme-toggle-track {
  background: rgba(226, 233, 241, .72) !important;
  box-shadow: inset 0 1px 2px rgba(25, 41, 61, .08);
}
html[data-app-theme="light"] .sidebar-theme-toggle-thumb {
  border-color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .88);
  box-shadow: inset 1px 1px rgba(255, 255, 255, .9), inset -1px -1px rgba(71, 85, 105, .08), 0 2px 7px rgba(25, 41, 61, .14);
}
html[data-app-theme="light"] .sidebar-theme-toggle-track > span:not(.sidebar-theme-toggle-thumb) { color: #7b8999 !important; }
html[data-app-theme="light"] .sidebar-theme-toggle[data-state="light"] .sidebar-theme-toggle-track > span:nth-of-type(1),
html[data-app-theme="light"] .sidebar-theme-toggle[data-state="night"] .sidebar-theme-toggle-track > span:nth-of-type(2) { color: #17243a !important; }
html[data-app-theme="light"] .sidebar-theme-toggle:focus-visible { outline-color: rgba(37, 99, 235, .72); }

@media (prefers-reduced-transparency: reduce) {
  .sidebar-theme-toggle-track { background: #151819; backdrop-filter: none; -webkit-backdrop-filter: none; }
  html[data-app-theme="light"] .sidebar-theme-toggle-track { background: #e9eef5 !important; }
}

/* Light preset restores the original light visual foundation that remains in
   styles.css, then neutralizes the later dark skin cascade. */
html[data-app-theme="light"],
html[data-app-theme="light"] body,
html[data-app-theme="light"] .app-shell,
html[data-app-theme="light"] .main,
html[data-app-theme="light"] .view,
html[data-app-theme="light"] .view.active {
  color: #17212f !important;
  background-color: #f4f7fb !important;
  background-image: radial-gradient(circle at 12% 5%, rgba(19, 143, 136, .07), transparent 27%), linear-gradient(145deg, #f4f7fb, #f8fbfd 52%, #eef4f7) !important;
}
html[data-app-theme="light"] :where(.sidebar, .topbar, .schedule-tabs) {
  color: #263647 !important;
  border-color: #dfe7f0 !important;
  background-color: rgba(255, 255, 255, .94) !important;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(241, 247, 249, .88)) !important;
  box-shadow: 0 8px 26px rgba(25, 41, 61, .07) !important;
}
html[data-app-theme="light"] .sidebar,
html[data-app-theme="light"] .sidebar:hover,
html[data-app-theme="light"] .sidebar:focus-within,
html[data-app-theme="light"] .sidebar.sidebar-hold-open,
html[data-app-theme="light"] .sidebar.sidebar-force-closed {
  color: #334155 !important;
  border-color: #dfe7f0 !important;
  background-color: rgba(255, 255, 255, .95) !important;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(241, 247, 249, .9)) !important;
  box-shadow: 8px 0 28px rgba(25, 41, 61, .07) !important;
}
html[data-app-theme="light"] .sidebar :where(.clause-brand, .nav-item, .clinic-card, .sidebar-account-card) {
  color: #334155 !important;
  border-color: rgba(67, 89, 109, .14) !important;
  background-color: rgba(255, 255, 255, .76) !important;
  background-image: none !important;
  box-shadow: 0 8px 22px rgba(25, 41, 61, .06) !important;
}
html[data-app-theme="light"] .sidebar :is(.clinic-card, .sidebar-account-card) {
  background-color: rgba(255, 255, 255, .94) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

/* 侧栏产品品牌：两行文案在品牌区域内水平、垂直居中。 */
.sidebar .sidebar-product-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 76px !important;
  padding: 0 8px !important;
  text-align: center !important;
}
.sidebar .sidebar-product-brand .clause-brand-copy {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
}
.sidebar .sidebar-product-brand .clause-brand-copy strong,
.sidebar .sidebar-product-brand .clause-brand-copy small {
  width: 100% !important;
  text-align: center !important;
}
.sidebar .sidebar-product-brand .clause-brand-copy strong {
  overflow: hidden;
  font-size: clamp(18px, 1.55vw, 24px) !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar .sidebar-product-brand .clause-brand-copy small {
  text-transform: none !important;
}
html[data-app-theme="light"] .sidebar .nav-item { background-color: transparent !important; box-shadow: none !important; }
html[data-app-theme="light"] .sidebar .nav-item:hover,
html[data-app-theme="light"] .sidebar .nav-item.active {
  color: #08716c !important;
  border-color: rgba(19, 143, 136, .22) !important;
  background-color: rgba(19, 143, 136, .08) !important;
}
html[data-app-theme="light"] .sidebar .clinic-card,
html[data-app-theme="light"] .sidebar:hover .clinic-card,
html[data-app-theme="light"] .sidebar:focus-within .clinic-card,
html[data-app-theme="light"] .sidebar.sidebar-hold-open .clinic-card,
html[data-app-theme="light"] .sidebar.sidebar-force-closed .clinic-card {
  color: #334155 !important;
  border: 1px solid var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .94) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] .sidebar .clinic-card span,
html[data-app-theme="light"] .sidebar .clinic-card small { color: #657386 !important; }
html[data-app-theme="light"] .sidebar .clinic-card strong { color: #17212f !important; }
html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .metric-card,
  .queue-card, .work-card, .mini-stat-card, .visit-board, .clinic-card,
  .schedule-board-card, .schedule-date-picker, .booking-form-panel,
  .patients-console, .patients-filter-panel, .patients-querybar, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .expense-hero, .wage-hero,
  .tax-panel, .modal-card, .performance-modal-card, .followup-modal-card,
  .dense-table-wrap, .performance-table-wrap, .login-log-table-wrap
) {
  color: #17212f !important;
  border-color: rgba(79, 104, 128, .17) !important;
  background-color: rgba(255, 255, 255, .94) !important;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(242, 248, 250, .86)) !important;
  box-shadow: 0 14px 36px rgba(25, 41, 61, .08), inset 0 1px #fff !important;
  backdrop-filter: blur(16px) saturate(110%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(110%) !important;
}
html[data-app-theme="light"] body :where(h1, h2, h3, h4, strong, b, dd) { color: #17212f !important; opacity: 1 !important; }
html[data-app-theme="light"] body :where(p, label, small, span, dt, em) { color: #657386 !important; opacity: 1 !important; }
html[data-app-theme="light"] body :where(input, textarea, select) {
  color: #263647 !important;
  border-color: #cad6e2 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(25, 41, 61, .04) !important;
}
html[data-app-theme="light"] body :where(input, textarea)::placeholder { color: #8b99a9 !important; }
html[data-app-theme="light"] body table { color: #475569 !important; background: #fff !important; }
html[data-app-theme="light"] body table :where(th, td) { border-color: #e2e8f0 !important; }
html[data-app-theme="light"] body table th { color: #526174 !important; background-color: #f2f6f9 !important; }
html[data-app-theme="light"] body table td { color: #475569 !important; background-color: #fff !important; }
html[data-app-theme="light"] body table tbody tr:hover td { color: #17212f !important; background-color: #eef8f8 !important; }
html[data-app-theme="light"] body :where(button, .light-btn, .primary-btn, .save-btn) {
  border-color: rgba(19, 143, 136, .24) !important;
  color: #08716c !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body :where(.primary-btn, .save-btn) { color: #fff !important; background-color: #138f88 !important; }
html[data-app-theme="light"] body :where(.nav-item.active, button.active) { color: #08716c !important; background-color: rgba(19, 143, 136, .08) !important; }
html[data-app-theme="light"] #schedule :where(.week-head, .time-board, .time-cell) { background-color: #fff !important; }
html[data-app-theme="light"] #schedule .booking-center { color: #17212f !important; background-color: #f3f7fa !important; background-image: none !important; }
html[data-app-theme="light"] #schedule .booking-toolbar,
html[data-app-theme="light"] #schedule .schedule-board-card .booking-toolbar {
  color: #17212f !important;
  border-color: #dfe7f0 !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] #schedule .booking-toolbar strong { color: #17212f !important; }
html[data-app-theme="light"] #schedule .mode-switch { border-color: #cbd6e1 !important; background: #fff !important; }
html[data-app-theme="light"] #schedule .mode-switch button { color: #657386 !important; background: #fff !important; }
html[data-app-theme="light"] #schedule .mode-switch button.active { color: #fff !important; background: #138f88 !important; }
html[data-app-theme="light"] #schedule :where(.week-head button, .time-label) { color: #526174 !important; border-color: #e2e8f0 !important; background-color: #f8fafc !important; box-shadow: none !important; }
html[data-app-theme="light"] #schedule .schedule-board-card .week-head,
html[data-app-theme="light"] #schedule .schedule-board-card .time-board { border-color: #dfe7f0 !important; background-color: #fff !important; }
html[data-app-theme="light"] #schedule .schedule-board-card .week-head > span,
html[data-app-theme="light"] #schedule .schedule-board-card .week-head button,
html[data-app-theme="light"] #schedule .schedule-board-card .time-board .time-label {
  color: #526174 !important;
  border-color: #e2e8f0 !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #schedule .schedule-board-card .week-head button em {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #3b82f6 !important;
  box-shadow: 0 3px 8px rgba(37, 99, 235, .22) !important;
}
html[data-app-theme="light"] #schedule .schedule-board-card .time-board .time-label strong { color: #334155 !important; text-shadow: none !important; }
html[data-app-theme="light"] #schedule .schedule-board-card .time-board .time-cell {
  border-color: #e9eef3 !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] #schedule .schedule-chip {
  color: #26443a !important;
  border-color: rgba(19, 143, 136, .24) !important;
  background-color: #eaf7f2 !important;
  background-image: linear-gradient(145deg, #f4fbf8, #dff2eb) !important;
  box-shadow: 0 7px 16px rgba(25, 92, 70, .1) !important;
}
html[data-app-theme="light"] #schedule .schedule-chip :where(strong, time, b) { color: #26443a !important; text-shadow: none !important; }
html[data-app-theme="light"] #schedule .schedule-detail-popover { background: transparent !important; }
html[data-app-theme="light"] #schedule .schedule-popover-card { color: #17212f !important; border-color: #ccd8e3 !important; background: #fff !important; box-shadow: 0 22px 62px rgba(25, 41, 61, .2) !important; }
html[data-app-theme="light"] #schedule .schedule-popover-person :where(h2, .schedule-patient-link),
html[data-app-theme="light"] #schedule .schedule-detail-list dd { color: #17212f !important; }
html[data-app-theme="light"] #schedule .schedule-detail-list dt { color: #657386 !important; }
html[data-app-theme="light"] #schedule .schedule-popover-actions > button,
html[data-app-theme="light"] #schedule .schedule-popover-actions .split-action > button { color: #08716c !important; border-color: rgba(19, 143, 136, .24) !important; background: #fff !important; }
html[data-app-theme="light"] :where(.modal, .people-employee-modal, .salary-modal, .wage-modal, .system-confirm-modal) { background: rgba(24, 39, 55, .34) !important; }
html[data-app-theme="light"] :where(.schedule-action-menu, [class$="-select-menu"], [class*="-dropdown"], [class*="-popover"]):not(.schedule-popover-person):not(.schedule-popover-actions) {
  color: #263647 !important;
  border-color: #ccd8e3 !important;
  background-color: rgba(255, 255, 255, .98) !important;
  background-image: none !important;
  box-shadow: 0 18px 42px rgba(25, 41, 61, .18) !important;
}

/* 素曜白：主侧栏按钮采用 neon-button 的胶囊轮廓与上下高光，仅作用于白色主题。 */
html[data-app-theme="light"] .sidebar .nav-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, .2) !important;
  border-radius: 999px !important;
  color: #334155 !important;
  background-color: rgba(59, 130, 246, .05) !important;
  box-shadow: none !important;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease !important;
}

html[data-app-theme="light"] .sidebar .nav-item::before,
html[data-app-theme="light"] .sidebar .nav-item::after {
  content: "" !important;
  position: absolute;
  left: 12.5%;
  width: 75%;
  height: 1px;
  margin: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #2563eb, transparent);
  transition: opacity .5s ease-in-out;
}

html[data-app-theme="light"] .sidebar .nav-item::before { top: 0; }
html[data-app-theme="light"] .sidebar .nav-item::after { right: auto; bottom: 0; }

html[data-app-theme="light"] .sidebar .nav-item:hover {
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, .34) !important;
  background-color: transparent !important;
}

html[data-app-theme="light"] .sidebar .nav-item.active {
  color: #fff !important;
  border-color: transparent !important;
  background-color: #3b82f6 !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] .sidebar .nav-item.active:hover {
  color: #fff !important;
  border-color: rgba(30, 64, 175, .5) !important;
  background-color: #2563eb !important;
}

html[data-app-theme="light"] .sidebar .nav-item:hover::before,
html[data-app-theme="light"] .sidebar .nav-item:hover::after,
html[data-app-theme="light"] .sidebar .nav-item.active::before,
html[data-app-theme="light"] .sidebar .nav-item.active::after {
  opacity: 1;
}

html[data-app-theme="light"] .sidebar .nav-item.active::before,
html[data-app-theme="light"] .sidebar .nav-item.active::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .82), transparent);
}

html[data-app-theme="light"] .sidebar .nav-item:active { transform: scale(.98) !important; }
html[data-app-theme="light"] .sidebar .nav-item:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

/* 素曜白内部页面恢复层。
   styles.css 末尾的深色皮肤使用了 ID 选择器，这里以主题属性 + 对应 ID
   提高优先级，恢复原本被覆盖的白色卡片、表单和浮层。 */
html[data-app-theme="light"] body #system.view.active,
html[data-app-theme="light"] body #inventory.view.active,
html[data-app-theme="light"] body #denture.view.active,
html[data-app-theme="light"] body #billing.view.active,
html[data-app-theme="light"] body #wageSettlement.view.active,
html[data-app-theme="light"] body #patients.view.active,
html[data-app-theme="light"] body #communicationVideos.view.active {
  color: #17212f !important;
  background-color: #f4f7fb !important;
  background-image: radial-gradient(circle at 12% 5%, rgba(37, 99, 235, .055), transparent 27%), linear-gradient(145deg, #f4f7fb, #f8fbfd 52%, #eef4f7) !important;
}

html[data-app-theme="light"] body #denture :where(.settings-console, .settings-layout, .settings-content, .denture-module-shell),
html[data-app-theme="light"] body #inventory :where(.settings-console, .settings-layout, .settings-content, .inventory-module-shell),
html[data-app-theme="light"] body #system :where(.settings-console, .settings-layout, .settings-content) {
  color: #17212f !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card {
  color: #17212f !important;
  border-color: #d7e2ee !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card:hover {
  border-color: rgba(37, 99, 235, .30) !important;
  background-color: #f8fbff !important;
}

html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card.active {
  border-color: rgba(74, 141, 247, .34) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card span { color: #2563eb !important; }
html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card strong { color: #17212f !important; }
html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card small { color: #657386 !important; }
html[data-app-theme="light"] body #denture .denture-category-cards .settings-category-card::before {
  content: none !important;
  display: none !important;
}

html[data-app-theme="light"] body #denture .denture-factory-count { color: #2563eb !important; background: rgba(37, 99, 235, .08) !important; }
html[data-app-theme="light"] body #denture .denture-factory-row {
  color: #17212f !important;
  border-color: #d7e2ee !important;
  background-color: rgba(255, 255, 255, .96) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #denture .denture-factory-row:hover,
html[data-app-theme="light"] body #denture .denture-factory-row.expanded { border-color: rgba(74, 141, 247, .38) !important; }
html[data-app-theme="light"] body #denture .denture-factory-row-main { color: #17212f !important; }
html[data-app-theme="light"] body #denture .denture-factory-name small,
html[data-app-theme="light"] body #denture .denture-factory-stat small,
html[data-app-theme="light"] body #denture .denture-factory-row-actions,
html[data-app-theme="light"] body #denture .denture-factory-detail-head p { color: #657386 !important; }
html[data-app-theme="light"] body #denture .denture-factory-status.complete { color: #087647 !important; background: rgba(16, 185, 129, .1) !important; }
html[data-app-theme="light"] body #denture .denture-factory-status.incomplete { color: #9a5b09 !important; background: rgba(245, 158, 11, .11) !important; }
html[data-app-theme="light"] body #denture .denture-factory-row-detail { border-top-color: #e1e9f1 !important; background: rgba(248, 251, 255, .78) !important; }

html[data-app-theme="light"] body #denture .denture-module-shell > *,
html[data-app-theme="light"] body #denture .denture-module-shell :where(header, section, article, .inventory-table-wrap),
html[data-app-theme="light"] body #inventory .inventory-module-shell > *,
html[data-app-theme="light"] body #inventory .inventory-module-shell :where(header, section, article, .inventory-table-wrap),
html[data-app-theme="light"] body #system :where(.settings-menu, .system-panel) {
  color: #17212f !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .96) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

html[data-app-theme="light"] body #denture :where(h1, h2, h3, h4, strong, b, th),
html[data-app-theme="light"] body #inventory :where(h1, h2, h3, h4, strong, b, th),
html[data-app-theme="light"] body #system :where(h1, h2, h3, h4, strong, b, th) {
  color: #17212f !important;
}

html[data-app-theme="light"] body #denture :where(p, label, td, small, em),
html[data-app-theme="light"] body #inventory :where(p, label, td, small, em),
html[data-app-theme="light"] body #system :where(p, label, td, small, em) {
  color: #657386 !important;
}

html[data-app-theme="light"] body #denture :where(input, textarea, select),
html[data-app-theme="light"] body #inventory :where(input, textarea, select),
html[data-app-theme="light"] body #system :where(input, textarea, select) {
  color: #263647 !important;
  caret-color: #2563eb !important;
  border-color: #cad6e2 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(25, 41, 61, .04) !important;
  color-scheme: light;
}

html[data-app-theme="light"] body #denture :where(input, textarea)::placeholder,
html[data-app-theme="light"] body #inventory :where(input, textarea)::placeholder,
html[data-app-theme="light"] body #system :where(input, textarea)::placeholder { color: #8b99a9 !important; }

html[data-app-theme="light"] body #denture table,
html[data-app-theme="light"] body #inventory table,
html[data-app-theme="light"] body #system table { color: #475569 !important; background: #fff !important; }
html[data-app-theme="light"] body #denture table th,
html[data-app-theme="light"] body #inventory table th,
html[data-app-theme="light"] body #system table th { color: #526174 !important; border-color: #e2e8f0 !important; background: #f2f6f9 !important; }
html[data-app-theme="light"] body #denture table td,
html[data-app-theme="light"] body #inventory table td,
html[data-app-theme="light"] body #system table td { color: #475569 !important; border-color: #e2e8f0 !important; background: #fff !important; }

/* 动态插入到 body 的弹窗与浮层不在页面 ID 内，需要单独恢复。 */
html[data-app-theme="light"] body :where(.modal, .system-confirm-modal, .supplier-delete-modal, .cancel-appointment-modal, .move-appointment-modal, .duplicate-appointment-modal) {
  background-color: rgba(30, 41, 59, .30) !important;
  background-image: none !important;
  -webkit-backdrop-filter: blur(10px) !important;
  backdrop-filter: blur(10px) !important;
}

html[data-app-theme="light"] body :where(.modal-card, .performance-modal-card, .followup-modal-card, .supplier-delete-card, .cancel-appointment-card, .move-appointment-card, .duplicate-appointment-card) {
  color: #17212f !important;
  border-color: #d5e0ea !important;
  background-color: rgba(255, 255, 255, .98) !important;
  background-image: linear-gradient(145deg, #fff, #f5f8fb) !important;
  box-shadow: 0 28px 72px rgba(25, 41, 61, .22), inset 0 1px #fff !important;
}

html[data-app-theme="light"] body #dentureRecordFormModal { background: rgba(30, 41, 59, .30) !important; }
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-form-card,
html[data-app-theme="light"] body #dentureRecordFormModal .modal-head,
html[data-app-theme="light"] body #dentureRecordFormModal .supplier-form-actions,
html[data-app-theme="light"] body #dentureRecordFormModal .inventory-table-wrap,
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-upload-box {
  color: #17212f !important;
  border-color: #d5e0ea !important;
  background-color: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f5f8fb) !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #dentureRecordFormModal :where(h2, h3, strong, b, label, th) { color: #17212f !important; }
html[data-app-theme="light"] body #dentureRecordFormModal :where(p, small) { color: #657386 !important; }
html[data-app-theme="light"] body #dentureRecordFormModal :where(input:not([type="file"]), select, textarea),
html[data-app-theme="light"] body #dentureRecordFormModal :where(.denture-delivery-date-picker, .denture-factory-product-picker) {
  color: #263647 !important;
  border-color: #cad6e2 !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(25, 41, 61, .04) !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal option { color: #263647 !important; background: #fff !important; }

html[data-app-theme="light"] body :where(.denture-factory-product-menu, .denture-delivery-date-popover, .denture-patient-suggestions, .denture-doctor-suggestions) {
  color: #263647 !important;
  border-color: #ccd8e3 !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgba(25, 41, 61, .18) !important;
}
html[data-app-theme="light"] body :where(.denture-factory-product-menu, .denture-delivery-date-popover, .denture-patient-suggestions, .denture-doctor-suggestions) :where(button, header, footer) {
  color: #263647 !important;
  border-color: #e2e8f0 !important;
  background-color: #fff !important;
}
html[data-app-theme="light"] body .denture-delivery-calendar-days button.selected {
  color: #fff !important;
  border-color: #2563eb !important;
  background: #3b82f6 !important;
}

/* 素曜白工作台：恢复被后置 ClauseOS 深色规则覆盖的主看板与右侧工作卡。 */
html[data-app-theme="light"] body #dashboard.view.active {
  color: #17212f !important;
  background-color: #f4f7fb !important;
  background-image: radial-gradient(circle at 12% 5%, rgba(37, 99, 235, .055), transparent 27%), linear-gradient(145deg, #f4f7fb, #f8fbfd 52%, #eef4f7) !important;
}
html[data-app-theme="light"] body #dashboard .visit-board,
html[data-app-theme="light"] body #dashboard .visit-tabs,
html[data-app-theme="light"] body #dashboard .visit-tools,
html[data-app-theme="light"] body #dashboard .dense-table-wrap,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-board {
  color: #263647 !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #dashboard .visit-tabs button { color: #657386 !important; }
html[data-app-theme="light"] body #dashboard .visit-tabs button.active { color: #2563eb !important; border-bottom-color: #3b82f6 !important; background-color: rgba(59, 130, 246, .07) !important; }
html[data-app-theme="light"] body #dashboard .visit-tools :where(input, select, button),
html[data-app-theme="light"] body #dashboard .visit-tabs .board-setting { color: #334155 !important; border-color: #d5e0ea !important; background-color: #fff !important; background-image: none !important; box-shadow: none !important; }
html[data-app-theme="light"] body #dashboard .visit-tools #dashboardTodayMark,
html[data-app-theme="light"] body #dashboard .visit-tools #dashboardTodayMark.active {
  width: 48px !important;
  height: 48px !important;
  box-sizing: border-box !important;
  border: 1px solid #d5e0ea !important;
  border-radius: 14px !important;
  color: #111827 !important;
  background: #fff !important;
  box-shadow: inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .visit-tools #dashboardTodayMark:hover {
  border-color: #9dbce3 !important;
  background: #f4f8ff !important;
}

/* 素曜白：侧栏登录账户保持高对比度。 */
html[data-app-theme="light"] body .sidebar .sidebar-account-card .current-user-badge {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.45 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-card .current-user-badge > strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-card .current-user-badge > small {
  color: #657386 !important;
  -webkit-text-fill-color: #657386 !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-avatar {
  color: #52677e !important;
  border-color: #cbd8e5 !important;
  background: #f7faff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-avatar i {
  border-color: #fff !important;
  background: #12a36d !important;
  box-shadow: 0 0 0 1px rgba(18, 163, 109, .16) !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-logout {
  color: #176f78 !important;
  border-color: #c8dce2 !important;
  background: #f7fcfd !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body .sidebar .sidebar-account-logout:hover {
  color: #b42318 !important;
  border-color: #efc0ba !important;
  background: #fff4f2 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card { color: #263647 !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-tab { border-color: #cad8e6 !important; background: linear-gradient(145deg, #f8fbff, #eaf1f8) !important; box-shadow: inset 0 1px #fff !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-front { border-color: #cad8e6 !important; background: radial-gradient(circle at 18% 0%, #fff, transparent 30%), linear-gradient(151deg, rgba(255,255,255,.98), rgba(226,235,244,.94)) !important; box-shadow: inset 0 1px #fff, 0 12px 24px rgba(25, 41, 61, .12) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-paper { border-color: #d4dee8 !important; background: repeating-linear-gradient(to bottom, transparent 0 12px, rgba(100,116,139,.12) 12px 14px), linear-gradient(145deg, #fff, #edf3f8) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-tab { border-color: rgba(37, 99, 235, .48) !important; background: linear-gradient(145deg, #dceaff, #bdd6ff) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-front { border-color: rgba(37, 99, 235, .58) !important; background: radial-gradient(circle at 18% 0%, #fff, transparent 28%), linear-gradient(151deg, #eaf2ff, #c9dcff 62%, #b8d1ff) !important; box-shadow: inset 0 1px #fff, 0 16px 32px rgba(37, 99, 235, .16) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-cover-print :where(strong, small),
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card :where(strong, small, span, b) { color: #263647 !important; text-shadow: none !important; }
html[data-app-theme="light"] body #dashboard #dashboardListBoard .dashboard-doctor-name {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr:not(.selected) td,
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr:not(.selected) td :where(button, strong, b, span, small, em) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td {
  color: #20384e !important;
  -webkit-text-fill-color: #20384e !important;
  border-color: #a9c9f5 !important;
  background: #edf5ff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td :where(button, strong, b, span, small, em),
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td .patient-name-link:is(:hover, :focus-visible) {
  color: #20384e !important;
  -webkit-text-fill-color: #20384e !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected .table-plus {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  border-color: #8db5ec !important;
  background: rgba(255,255,255,.78) !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-name-link,
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-name-link:is(:hover, :focus-visible) {
  color: #20384e !important;
  -webkit-text-fill-color: #20384e !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-avatar-icon,
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-avatar-icon.female {
  color: #fff !important;
  border-color: rgba(255, 255, 255, .82) !important;
  background: #1d4ed8 !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-avatar-icon::before,
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-avatar-icon.female::before {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table thead th {
  height: 46px !important;
  font-size: 13.2px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody td {
  height: 62.9px !important;
  font-size: 14.4px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody td :where(.patient-name-link, button:not(.table-plus), strong, b) {
  font-size: 14.4px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .dashboard-visit-start {
  font-size: 16.8px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .dashboard-visit-range {
  font-size: 14.4px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .dashboard-visit-duration {
  font-size: 12px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-type-badge {
  font-size: 16.8px !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .dashboard-completed-badge {
  font-size: 10.8px !important;
}

/* 工作台姓名与初诊标记保持独立间距，避免短列宽下相互覆盖。 */
html[data-app-theme="light"] body #dashboard #dashboardListBoard .patient-name-wrap {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  transform: none !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .patient-name-link {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-align: center !important;
  white-space: nowrap !important;
}
html[data-app-theme="light"] body #dashboard #dashboardListBoard .patient-row-badges {
  flex: 0 0 auto !important;
  gap: 5px !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-nav { color: #2563eb !important; border-color: #cedae6 !important; background: rgba(255, 255, 255, .94) !important; box-shadow: 0 8px 20px rgba(25, 41, 61, .10) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-position { color: #657386 !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-card { color: #17212f !important; border-color: var(--suyawb-card-line) !important; background-color: rgba(255, 255, 255, .97) !important; background-image: var(--suyawb-card-bg) !important; box-shadow: var(--suyawb-card-shadow) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-card h2 { color: #17212f !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-revenue-inline { color: #657386 !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-revenue-inline b { color: #17212f !important; }
html[data-app-theme="night"] body #dashboard .dashboard-clause-rail .work-revenue-inline { color: var(--wb-text-secondary, #aeb8b3) !important; }
html[data-app-theme="night"] body #dashboard .dashboard-clause-rail .work-revenue-inline b { color: var(--wb-text, #f4f7f5) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-card h2::before { background: #3b82f6 !important; box-shadow: none !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-card h2::after,
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .work-revenue-eye { color: #657386 !important; border-color: #d5e0ea !important; background: #f7f9fc !important; box-shadow: inset 0 1px #fff !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .mini-stats .mini-stat-card { color: #263647 !important; border-color: var(--suyawb-card-line) !important; background-color: #fff !important; background-image: var(--suyawb-card-bg) !important; box-shadow: var(--suyawb-card-shadow) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .mini-stats .mini-stat-card:hover { border-color: rgba(37, 99, 235, .28) !important; background-color: #f8fbff !important; box-shadow: 0 11px 24px rgba(37, 99, 235, .09) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .mini-stats :where(span, small) { color: #657386 !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .mini-stats b { color: #17212f !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .denture-mini-stat .neon-button { color: #2563eb !important; border-color: rgba(37, 99, 235, .25) !important; background: rgba(59, 130, 246, .06) !important; }

/* 素曜白工作台浮层：计划随访、历史记录、待处理工作及任务中心。 */
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) { background: rgba(30, 41, 59, .28) !important; -webkit-backdrop-filter: blur(10px) !important; backdrop-filter: blur(10px) !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter .dashboard-task-center-card, .pending-record-modal .pending-record-dialog, .pending-followup-modal .pending-followup-dialog, .pending-record-modal .dashboard-followup-stats-dialog) { color: #17212f !important; border-color: var(--suyawb-card-line) !important; background-color: rgba(255, 255, 255, .99) !important; background-image: var(--suyawb-card-bg) !important; box-shadow: 0 28px 72px rgba(25, 41, 61, .22), inset 0 1px #fff !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog > header,
html[data-app-theme="light"] body :where(#dashboardTaskCenter .dashboard-task-center-head, .pending-record-modal .pending-record-head, .pending-followup-modal .pending-followup-head) { color: #17212f !important; border-color: #dce5ee !important; background: linear-gradient(105deg, #edf5ff, #fff 60%) !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog > header span { color: #2563eb !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) :where(h2, h3, h4, label, strong, b) { color: #17212f !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) :where(p, small, .muted) { color: #657386 !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-content,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog > footer,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs,
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) :where(.pending-record-content, .pending-record-table-wrap, .pending-record-empty, .pending-followup-content, .pending-followup-table-wrap, .pending-followup-empty, .dashboard-task-toolbar, .dashboard-task-composer, .dashboard-task-section, .dashboard-task-item, .dashboard-task-empty) { color: #263647 !important; border-color: #e0e7ef !important; background-color: #fff !important; background-image: none !important; box-shadow: none !important; }
html[data-app-theme="light"] body .pending-record-modal :where(.dashboard-followup-plan-card, .dashboard-followup-result-card) { color: #263647 !important; border-color: var(--suyawb-card-line) !important; background-color: #fff !important; background-image: var(--suyawb-card-bg) !important; box-shadow: var(--suyawb-card-shadow) !important; }
html[data-app-theme="light"] body .pending-record-modal :where(.dashboard-followup-plan-card, .dashboard-followup-result-card) > header,
html[data-app-theme="light"] body .pending-record-modal :where(.dashboard-followup-plan-card > p, .dashboard-followup-result-copy section) { color: #334155 !important; border-color: #e2e8f0 !important; background: #f7f9fc !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) :where(input, textarea, select) { color: #263647 !important; border-color: #cad6e2 !important; background: #fff !important; box-shadow: inset 0 1px 2px rgba(25, 41, 61, .04) !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) button { color: #334155 !important; border-color: #d5e0ea !important; background: #fff !important; }
html[data-app-theme="light"] body :where(#dashboardTaskCenter, .pending-record-modal, .pending-followup-modal) :where(.primary, .dashboard-task-submit, .pending-record-write-btn, .pending-followup-complete-btn) { color: #fff !important; border-color: #3b82f6 !important; background: #3b82f6 !important; }

/* 不使用 :where() 承载关键父级，确保优先级高于 styles.css 的末尾主题锁。 */
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog {
  color: #17212f !important;
  border-color: #d5e0ea !important;
  background: linear-gradient(145deg, #fff, #f4f8fb) !important;
  box-shadow: 0 28px 72px rgba(25, 41, 61, .22), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog :is(h2, h3, h4, strong, b) { color: #17212f !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog :is(p, small, .muted) { color: #657386 !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog > footer,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs { border-color: #e0e7ef !important; background: #f8fafc !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs button { color: #657386 !important; background: transparent !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs button:is(:hover, .active) { color: #2563eb !important; background: rgba(59, 130, 246, .07) !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs button.active::after { background: #3b82f6 !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-plan-body b,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-result-meta b,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-result-copy p,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-plan-card > p { color: #334155 !important; }
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-card { color: #17212f !important; border-color: var(--suyawb-card-line) !important; background-color: #fff !important; background-image: var(--suyawb-card-bg) !important; }
html[data-app-theme="light"] body #dashboardTaskCenter :is(h2, h3, h4, label, strong, b) { color: #17212f !important; }
html[data-app-theme="light"] body #dashboardTaskCenter :is(p, small, .muted, .dashboard-task-counts) { color: #657386 !important; }

/* 素曜白统一卡片配方，提取自“收支报表”分类卡。
   蓝白底色负责层级，绿色短线只表达当前选中状态。 */
html[data-app-theme="light"] {
  --suyawb-card-ink: #172235;
  --suyawb-card-muted: #6b7c91;
  --suyawb-card-line: rgba(121, 151, 181, .18);
  --suyawb-card-accent: #59e6a0;
  --suyawb-card-bg:
    radial-gradient(240px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(87, 204, 229, var(--suyawb-glow-alpha, .18)), transparent 72%),
    radial-gradient(circle at 94% 0%, rgba(152, 190, 255, .10), transparent 26%),
    linear-gradient(120deg, rgba(255, 255, 255, .99), rgba(248, 251, 255, .97) 48%, rgba(240, 248, 252, .96));
  --suyawb-card-shadow: 0 15px 38px rgba(66, 96, 126, .09), inset 0 1px rgba(255, 255, 255, .92);
}

/* Every pointer-tracked surface owns its gradient recipe. Custom properties
   referenced inside an inherited recipe otherwise resolve at the root and the
   cyan light remains fixed even while the card coordinates are changing. */
html[data-app-theme="light"] body :where(
  [class$="-card"], [class*="-card "], [class~="card"],
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card, .personnel-module-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board, .dashboard-drawer-card,
  .schedule-board-card, .schedule-date-picker, .booking-form-panel,
  .patients-console, .patients-filter-panel, .patients-querybar, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .expense-hero, .performance-hero, .wage-hero,
  .tax-panel, .system-panel, .modal-card, .performance-modal-card, .followup-modal-card,
  .dashboard-panel-portal, .dashboard-followup-stats-dialog, .pending-record-empty,
  .denture-record-form-card, .denture-record-upload-box,
  #toothPickerPanel, #chargeToothPopover .charge-tooth-card,
  #treatmentToothPopover .charge-tooth-card, #dentureToothPopover .charge-tooth-card,
  #prescriptionToothPopover, #dentureToothPickerModal .denture-tooth-card,
  #inventory .inventory-module-shell > *, #inventory .inventory-adjustment-ledger,
  #communicationVideos .communication-video-category-content, #communicationVideos .communication-video-item,
  #wageSettlement .wage-kpis article,
  #treatmentPlanDrawer .treatment-plan-panel, #medicalRecord.drawer-mode .record-form-section,
  #appointmentDrawer .appointment-drawer-panel, #appointmentDrawer .drawer-appointment-form section,
  #referralModal .referral-modal-card
) {
  --suyawb-card-bg:
    radial-gradient(240px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(87, 204, 229, var(--suyawb-glow-alpha, .18)), transparent 72%),
    radial-gradient(circle at 94% 0%, rgba(152, 190, 255, .10), transparent 26%),
    linear-gradient(120deg, rgba(255, 255, 255, .99), rgba(248, 251, 255, .97) 48%, rgba(240, 248, 252, .96));
}

/* 素曜白全卡片材质契约。
   覆盖静态页面与运行时动态生成的所有 *-card；使用 :where 保持低特异性，
   让后续业务状态（选中、警告、主操作等）仍可按原规则覆盖。 */
html[data-app-theme="light"] body :where(
  [class$="-card"],
  [class*="-card "],
  [class~="card"]
) {
  --suyawb-glow-alpha: .18;
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  border-radius: 18px;
  background-color: rgba(255, 255, 255, .97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
}

html[data-app-theme="light"] body :where(
  [class$="-card"],
  [class*="-card "],
  [class~="card"]
):hover {
  --suyawb-glow-alpha: .30;
}

html[data-app-theme="light"] body :where(
  [class$="-card"],
  [class*="-card "],
  [class~="card"]
):is(.active, .selected, [aria-selected="true"]) {
  border-color: rgba(74, 141, 247, .34) !important;
  box-shadow: 0 17px 42px rgba(55, 108, 155, .13), inset 0 1px rgba(255, 255, 255, .94) !important;
}

html[data-app-theme="light"] body :where(
  button[class$="-card"],
  button[class*="-card "],
  button[class~="card"],
  a[class$="-card"],
  a[class*="-card "],
  a[class~="card"]
):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

html[data-app-theme="light"] body :where(
  [class$="-card"],
  [class*="-card "],
  [class~="card"]
) :where(h1, h2, h3, h4, strong, b) {
  color: var(--suyawb-card-ink) !important;
}

html[data-app-theme="light"] body :where(
  [class$="-card"],
  [class*="-card "],
  [class~="card"]
) :where(p, small, em) {
  color: var(--suyawb-card-muted) !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="light"] body :where(
    [class$="-card"],
    [class*="-card "],
    [class~="card"]
  ) {
    --suyawb-glow-x: 72%;
    --suyawb-glow-y: 48%;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-app-theme="light"] body :where(
    [class$="-card"],
    [class*="-card "],
    [class~="card"]
  ) {
    background-color: #fff !important;
    background-image: none !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board,
  .schedule-board-card, .schedule-date-picker, .booking-form-panel,
  .patients-console, .patients-filter-panel, .patients-querybar, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .expense-hero, .wage-hero,
  .tax-panel, .system-panel, .modal-card, .performance-modal-card, .followup-modal-card
) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board,
  .schedule-board-card, .patients-console, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .tax-panel, .system-panel,
  .modal-card, .performance-modal-card, .followup-modal-card
) :where(h1, h2, h3, h4, strong, b) { color: var(--suyawb-card-ink) !important; }

html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board,
  .schedule-board-card, .patients-console, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .tax-panel, .system-panel,
  .modal-card, .performance-modal-card, .followup-modal-card
) :where(p, small, em) { color: var(--suyawb-card-muted) !important; }

/* 供应商列表以纯白表格为主，避免父级 glow-card 渐变透入列表内容。 */
html[data-app-theme="light"] body #inventory .supplier-management-module {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-app-theme="light"] body #inventory .supplier-management-module::before {
  display: none !important;
}

html[data-app-theme="light"] body #inventory .supplier-management-list-panel,
html[data-app-theme="light"] body #inventory .supplier-management-list-panel > header,
html[data-app-theme="light"] body #inventory .supplier-management-columns,
html[data-app-theme="light"] body #inventory .supplier-management-row {
  background-color: #fff !important;
  background-image: none !important;
}

html[data-app-theme="light"] body #inventory .supplier-management-toolbar .supplier-management-add {
  opacity: 1 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2878ed !important;
  background-color: #2878ed !important;
  background-image: none !important;
  box-shadow: 0 7px 16px rgba(40, 120, 237, .22) !important;
}

html[data-app-theme="light"] body #inventory .supplier-management-toolbar .supplier-management-add:hover,
html[data-app-theme="light"] body #inventory .supplier-management-toolbar .supplier-management-add:focus-visible {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #1d64d8 !important;
  background-color: #1d64d8 !important;
  background-image: none !important;
}

/* 分类卡统一使用同一套蓝白材质和绿色选中线。 */
html[data-app-theme="light"] body .settings-category-card,
html[data-app-theme="light"] body .finance-hub-card,
html[data-app-theme="light"] body .finance-hub-tax-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--suyawb-card-line) !important;
  border-radius: 22px !important;
  color: var(--suyawb-card-ink) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body .settings-category-card > span,
html[data-app-theme="light"] body .finance-hub-card > span,
html[data-app-theme="light"] body .finance-hub-tax-card > span { color: #60758c !important; }
html[data-app-theme="light"] body .settings-category-card > strong,
html[data-app-theme="light"] body .finance-hub-card > strong,
html[data-app-theme="light"] body .finance-hub-tax-card > strong { color: var(--suyawb-card-ink) !important; }
html[data-app-theme="light"] body .settings-category-card > small,
html[data-app-theme="light"] body .finance-hub-card > small,
html[data-app-theme="light"] body .finance-hub-tax-card > small { color: var(--suyawb-card-muted) !important; }
html[data-app-theme="light"] body .settings-category-card::before,
html[data-app-theme="light"] body .finance-hub-card::before,
html[data-app-theme="light"] body .finance-hub-tax-card::before {
  content: "";
  position: absolute;
  right: auto;
  bottom: 0;
  left: 20px;
  width: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--suyawb-card-accent) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  filter: none !important;
  transition: width .18s ease;
}
html[data-app-theme="light"] body .settings-category-card.active::before,
html[data-app-theme="light"] body .finance-hub-card.active::before,
html[data-app-theme="light"] body .finance-hub-tax-card.active::before { width: 54px; }

/* 工作台和动态模块存在 ID 级深色规则，显式接入同一配方。 */
html[data-app-theme="light"] body #dashboard :where(.queue-card, .visit-board, .work-card, .mini-stat-card),
html[data-app-theme="light"] body #denture .denture-module-shell :where(section, article, .inventory-table-wrap),
html[data-app-theme="light"] body #inventory .inventory-module-shell :where(section, article, .inventory-table-wrap),
html[data-app-theme="light"] body #system :where(.system-panel, .settings-menu),
html[data-app-theme="light"] body #billing :where(.report-card, .performance-sidebar, .performance-filter-card, .expense-hero, .performance-hero),
html[data-app-theme="light"] body #wageSettlement :where(.report-card, .performance-sidebar, .performance-filter-card, .wage-hero) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

/* 财务中心顶端三张分类卡使用独立前景聚光层，避免背景配方覆盖跟随坐标。 */
html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card) { isolation: isolate; }
html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card) > * { position: relative; z-index: 1; }
html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card)::after {
  content: "" !important;
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: inherit !important;
  pointer-events: none;
  opacity: 0 !important;
  filter: none !important;
  background: radial-gradient(260px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(62, 190, 225, .38), rgba(126, 211, 238, .17) 34%, transparent 72%) !important;
  box-shadow: none !important;
  transition: opacity .16s ease !important;
}
html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card):hover::after { opacity: 1 !important; }
html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card)::before { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="light"] body :where(.finance-hub-card, .finance-hub-tax-card)::after { transition: none !important; }
}

/* 人员绩效主入口：两张独立卡片复用月度支出的素曜白材质与指针聚光。 */
html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card {
  --suyawb-glow-alpha: .18;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: var(--suyawb-card-ink) !important;
  border: 1px solid var(--suyawb-card-line) !important;
  border-radius: 22px !important;
  background-color: rgba(255, 255, 255, .97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card > * {
  position: relative;
  z-index: 1;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card::before {
  content: none !important;
  display: none !important;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card.active::before {
  width: 0 !important;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 0;
  border-radius: inherit;
  background: radial-gradient(
    260px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%),
    rgba(62, 190, 225, .38),
    rgba(126, 211, 238, .17) 34%,
    transparent 72%
  ) !important;
  box-shadow: none !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card:is(:hover, :focus-visible)::after {
  opacity: 1;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card:is(:hover, :focus-visible) {
  border-color: rgba(95, 160, 211, .32) !important;
  box-shadow: 0 18px 44px rgba(66, 110, 150, .12), inset 0 1px rgba(255, 255, 255, .94) !important;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 3px;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card.active {
  border-color: rgba(74, 141, 247, .30) !important;
  background-color: rgba(255, 255, 255, .97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card :is(strong, h1, h2, h3),
html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card.active > span:first-child > strong {
  color: var(--suyawb-card-ink) !important;
  -webkit-text-fill-color: var(--suyawb-card-ink) !important;
}

html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card :is(small, em) {
  color: var(--suyawb-card-muted) !important;
  -webkit-text-fill-color: var(--suyawb-card-muted) !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card,
  html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card::before,
  html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card::after {
    transition: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-app-theme="light"] body #billing > .personnel-module-cards .personnel-module-card {
    background-color: #fff !important;
    background-image: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* 素曜白预约抽屉卡：沿用财务分类卡的蓝白材质与指针聚光。 */
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card {
  --suyawb-glow-alpha: .20;
  color: var(--suyawb-card-ink) !important;
  filter: none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card:hover,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.current,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected {
  --suyawb-glow-alpha: .34;
  filter: none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-tab {
  border-color: var(--suyawb-card-line) !important;
  background: linear-gradient(145deg, #fff, #edf5fb) !important;
  box-shadow: inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-front,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-front {
  border: 1px solid var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image:
    radial-gradient(250px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(62, 190, 225, var(--suyawb-glow-alpha, .20)), transparent 72%),
    radial-gradient(circle at 94% 0%, rgba(152, 190, 255, .10), transparent 28%),
    linear-gradient(120deg, #fff, #f7fbff 50%, #edf7fb) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-front {
  border-color: rgba(37, 99, 235, .46) !important;
  box-shadow: 0 18px 38px rgba(37, 99, 235, .14), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-tab {
  border-color: rgba(37, 99, 235, .42) !important;
  background: linear-gradient(145deg, #f7fbff, #dceaff) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-paper,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-paper {
  border-color: #d7e2ec !important;
  background: repeating-linear-gradient(to bottom, transparent 0 12px, rgba(100,116,139,.10) 12px 14px), linear-gradient(145deg, #fff, #edf3f8) !important;
  opacity: .72;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-refraction,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card-shine {
  opacity: .18 !important;
  mix-blend-mode: normal !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-cover-print {
  color: var(--suyawb-card-ink) !important;
  border: 1px solid rgba(121, 151, 181, .18) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .68) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .92) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-folder-cover-print :where(strong, b) { color: var(--suyawb-card-ink) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-cover-print :where(small, span, p) { color: var(--suyawb-card-muted) !important; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-folder-front::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 54px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--suyawb-card-accent);
  pointer-events: none;
}

/* 素曜白使用独立预约卡面，彻底绕开深色文件夹叠层。 */
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > :where(
  .dashboard-folder-back, .dashboard-folder-paper, .dashboard-folder-front,
  .dashboard-folder-refraction, .dashboard-drawer-card-shine, .dashboard-folder-copy
) { display: none !important; }
html[data-app-theme="light"] body #dashboard .dashboard-folder-cover-print { display: none !important; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-surface {
  position: absolute;
  z-index: 2000;
  inset: 0;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 5px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--suyawb-card-line);
  border-radius: 22px;
  color: var(--suyawb-card-ink) !important;
  background-color: #fff;
  background-image:
    radial-gradient(260px circle at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(62, 190, 225, var(--suyawb-glow-alpha, .20)), transparent 72%),
    radial-gradient(circle at 94% 0%, rgba(152, 190, 255, .10), transparent 28%),
    linear-gradient(120deg, #fff, #f7fbff 50%, #edf7fb);
  box-shadow: var(--suyawb-card-shadow);
  text-align: left;
}

/* 旧文件夹结构在焦点卡上有独立高层级，必须逐项隐藏，不能只依赖 :where()。 */
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-folder-back,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-folder-paper,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-folder-front,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-folder-refraction,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-drawer-card-shine,
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card > .dashboard-folder-copy {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-stage > .dashboard-folder-cover-print {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-suyao-card-surface {
  border-color: rgba(37, 99, 235, .48);
  box-shadow: 0 18px 38px rgba(37, 99, 235, .15), inset 0 1px #fff;
}
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-head { display: flex; align-items: center; gap: 7px; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-head strong { overflow: hidden; color: var(--suyawb-card-ink) !important; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-patient-link { cursor: pointer; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-patient-link:hover { color: #2563eb !important; text-decoration: underline; text-underline-offset: 3px; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-head em { flex: 0 0 auto; border-radius: 7px; padding: 2px 5px; color: #2563eb !important; background: rgba(59, 130, 246, .09); font-size: 11px; font-style: normal; font-weight: 800; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-surface > small { color: var(--suyawb-card-muted) !important; font-size: 12px; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-history { align-self: end; display: grid; gap: 4px; min-height: 70px; padding: 12px; border: 1px solid rgba(121, 151, 181, .16); border-radius: 13px; background: rgba(255, 255, 255, .58); }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-history > span { color: var(--suyawb-card-muted) !important; font-size: 10px; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-history > strong { color: #334155 !important; font-size: 13px; }
html[data-app-theme="light"] body #dashboard .dashboard-suyao-card-history > small { overflow: hidden; color: #718096 !important; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
html[data-app-theme="light"] body #dashboard .dashboard-drawer-card.selected .dashboard-suyao-card-surface::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 54px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--suyawb-card-accent);
}

/* 素曜白预约操作面板：与蓝白预约卡使用同一材质。 */
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal {
  --suyawb-glow-alpha: .20;
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .98) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 22px 52px rgba(66, 96, 126, .14), inset 0 1px #fff !important;
  -webkit-backdrop-filter: blur(18px) saturate(108%) !important;
  backdrop-filter: blur(18px) saturate(108%) !important;
}
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal::before,
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal::after { background: none !important; box-shadow: none !important; }
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal > header {
  color: var(--suyawb-card-ink) !important;
  border-color: #dce5ee !important;
  background: rgba(255, 255, 255, .58) !important;
}
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal > header :where(strong, span, small) { color: var(--suyawb-card-ink) !important; }
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal .dashboard-drawer-actions { background: rgba(255, 255, 255, .66) !important; }
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal .dashboard-drawer-action {
  color: #334155 !important;
  border-color: #dce5ee !important;
  background: rgba(255, 255, 255, .34) !important;
}
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal .dashboard-drawer-action :where(b, small) { color: #334155 !important; }
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal .dashboard-drawer-action span { color: #2563eb !important; border-color: rgba(37, 99, 235, .20) !important; background: rgba(59, 130, 246, .06) !important; }
html[data-app-theme="light"] body .dashboard-drawer-action-panel.dashboard-panel-portal .dashboard-drawer-action:hover { color: #1d4ed8 !important; background: rgba(59, 130, 246, .09) !important; }

/* 素曜白随访弹窗：内容区、标签和空状态全部使用蓝白卡面。 */
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-dialog {
  --suyawb-glow-alpha: .18;
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 28px 72px rgba(66, 96, 126, .18), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-stats-content,
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-panel,
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty {
  --suyawb-glow-alpha: .18;
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: inset 0 1px #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty {
  min-height: 300px;
  margin: 0 !important;
  border: 1px solid var(--suyawb-card-line) !important;
  border-radius: 18px;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty > span { color: #2563eb !important; border-color: rgba(37, 99, 235, .18) !important; background: rgba(59, 130, 246, .07) !important; }
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty > strong { color: var(--suyawb-card-ink) !important; }
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty > p { color: var(--suyawb-card-muted) !important; }
html[data-app-theme="light"] body .pending-record-modal .dashboard-followup-results-tabs button.active { color: #2563eb !important; background: rgba(59, 130, 246, .08) !important; }

/* 素曜白义齿登记弹窗：外壳、表格和上传卡统一为蓝白卡面。 */
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-form-card {
  --suyawb-glow-alpha: .18;
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 28px 72px rgba(66, 96, 126, .18), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .modal-head,
html[data-app-theme="light"] body #dentureRecordFormModal .supplier-form-actions { border-color: #dce5ee !important; background: rgba(255, 255, 255, .70) !important; }
html[data-app-theme="light"] body #dentureRecordFormModal .inventory-table-wrap,
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-upload-box {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .82) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .inventory-module-table thead th { color: #526174 !important; border-color: #dce5ee !important; background: #edf5ff !important; }
html[data-app-theme="light"] body #dentureRecordFormModal .inventory-module-table td { color: #475569 !important; border-color: #e2e8f0 !important; background: rgba(255, 255, 255, .92) !important; }
html[data-app-theme="light"] body #dentureRecordFormModal [data-save-denture-record-form] { color: #fff !important; border-color: #3b82f6 !important; background: #3b82f6 !important; box-shadow: 0 8px 20px rgba(37, 99, 235, .20) !important; }

/* 素曜白弹窗按钮对比度锁：避免旧深色皮肤留下白字白底。 */
html[data-app-theme="light"] body #dentureRecordFormModal .modal-head .icon-btn,
html[data-app-theme="light"] body #dentureRecordFormModal [data-close-denture-record-form] {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid #d5e0ea !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  box-shadow: inset 0 1px #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .modal-head .icon-btn:hover,
html[data-app-theme="light"] body #dentureRecordFormModal [data-close-denture-record-form]:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, .34) !important;
  background-color: #edf5ff !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .modal-head .icon-btn:focus-visible,
html[data-app-theme="light"] body #dentureRecordFormModal [data-close-denture-record-form]:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

html[data-app-theme="light"] body .pending-record-modal [data-close-dashboard-followup],
html[data-app-theme="light"] body .pending-followup-modal :where([data-close-pending-followup], .pending-followup-close) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d5e0ea !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-app-theme="light"] body .pending-record-modal [data-close-dashboard-followup]:hover,
html[data-app-theme="light"] body .pending-followup-modal :where([data-close-pending-followup], .pending-followup-close):hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, .34) !important;
  background-color: #edf5ff !important;
}

/* 素曜白牙位浮层统一皮肤：病历、收费、治疗计划、处方与义齿登记。 */
html[data-app-theme="light"] body :is(
  #toothPickerPanel,
  #chargeToothPopover .charge-tooth-card,
  #treatmentToothPopover .charge-tooth-card,
  #dentureToothPopover .charge-tooth-card,
  #prescriptionToothPopover,
  #dentureToothPickerModal .denture-tooth-card
) {
  color: var(--suyawb-card-ink) !important;
  border: 1px solid var(--suyawb-card-line) !important;
  background-color: rgba(255, 255, 255, .96) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 20px 48px rgba(71, 85, 105, .16), inset 0 1px #fff !important;
  backdrop-filter: blur(18px) saturate(112%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(112%) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) { filter: none !important; }

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-card::before {
  background: radial-gradient(280px 170px at var(--suyawb-glow-x, 72%) var(--suyawb-glow-y, 48%), rgba(56, 189, 248, .46), transparent 72%) !important;
  opacity: .34 !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-arrow {
  border-right-color: rgba(255, 255, 255, .96) !important;
  filter: drop-shadow(-1px 0 1px rgba(71, 85, 105, .12)) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) :is(.charge-tooth-toolbar button, .charge-tooth-close),
html[data-app-theme="light"] body #toothPickerPanel :is(.tooth-fast-actions button, #clearToothSelection, .tooth-picker-close),
html[data-app-theme="light"] body #prescriptionToothPopover .diagnosis-tooth-presets button {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d5e0ea !important;
  background-color: rgba(255, 255, 255, .90) !important;
  background-image: none !important;
  box-shadow: inset 0 1px #fff !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-toolbar button:hover,
html[data-app-theme="light"] body #toothPickerPanel :is(.tooth-fast-actions button, #clearToothSelection, .tooth-picker-close):hover,
html[data-app-theme="light"] body #prescriptionToothPopover .diagnosis-tooth-presets button:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, .36) !important;
  background-color: #edf5ff !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-toolbar button.active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background-color: #3b82f6 !important;
  box-shadow: 0 7px 18px rgba(37, 99, 235, .20) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-board,
html[data-app-theme="light"] body #toothPickerPanel :is(.tooth-chart, .tooth-surface-panel),
html[data-app-theme="light"] body #prescriptionToothPopover .diagnosis-tooth-board {
  color: #475569 !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.94) !important;
  background-image: var(--suyawb-card-bg) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-board::before,
html[data-app-theme="light"] body #prescriptionToothPopover .diagnosis-tooth-board::before,
html[data-app-theme="light"] body #prescriptionToothPopover .diagnosis-tooth-board::after {
  background: rgba(59, 130, 246, .38) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-label,
html[data-app-theme="light"] body #toothPickerPanel .tooth-choice,
html[data-app-theme="light"] body #prescriptionToothPopover [data-select-prescription-tooth],
html[data-app-theme="light"] body #dentureToothPickerModal .denture-tooth-grid span {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d8e3ed !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 0 0 1px rgba(203, 213, 225, .42), 0 3px 8px rgba(71, 85, 105, .06) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-unit:hover .charge-tooth-label,
html[data-app-theme="light"] body #toothPickerPanel .tooth-choice:hover,
html[data-app-theme="light"] body #prescriptionToothPopover [data-select-prescription-tooth]:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background-color: #edf6ff !important;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .42) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-unit.selected .charge-tooth-label,
html[data-app-theme="light"] body #toothPickerPanel .tooth-choice.selected,
html[data-app-theme="light"] body #dentureToothPickerModal .denture-tooth-grid input:checked + span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background-color: #3b82f6 !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .20) !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) :is(.charge-tooth-extra, .charge-tooth-extra label, .treatment-tooth-summary),
html[data-app-theme="light"] body #toothPickerPanel :is(.tooth-side, #toothSelectionSummary, small) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) :is(.charge-tooth-diagnosis, .charge-tooth-edit, .charge-tooth-note) {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #d5e0ea !important;
  background-color: rgba(255, 255, 255, .90) !important;
  background-image: none !important;
}

html[data-app-theme="light"] body :is(
  #chargeToothPopover,
  #treatmentToothPopover,
  #dentureToothPopover
) .charge-tooth-diagnosis :is(span, button) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}

html[data-app-theme="light"] body #toothPickerMask { background: rgba(71, 85, 105, .22) !important; }

/* 素曜白页面统一：覆盖旧的无主题限定深色应用皮肤。 */
html[data-app-theme="light"] body :is(#wageSettlement, #inventory, #system, #communicationVideos, #patients) {
  color: var(--suyawb-card-ink) !important;
  background-color: #f6f9fc !important;
  background-image: radial-gradient(circle at 76% 8%, rgba(125, 211, 252, .13), transparent 30%) !important;
}

html[data-app-theme="light"] body :is(#wageSettlement, #inventory, #system, #communicationVideos, #patients)
  :where(h1, h2, h3, h4, strong, b) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#wageSettlement, #inventory, #system, #communicationVideos, #patients)
  :where(p, label, td, span) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#wageSettlement, #inventory, #system, #communicationVideos, #patients)
  :where(small, em) {
  color: #718096 !important;
  -webkit-text-fill-color: #718096 !important;
  opacity: 1 !important;
}

/* 工资结算：侧栏、KPI 与完整表格。 */
html[data-app-theme="light"] body #wageSettlement :is(.performance-sidebar, .report-card, .performance-table-card, .performance-table-wrap) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.92) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #wageSettlement .performance-sidebar button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #wageSettlement .performance-sidebar button:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: linear-gradient(100deg, #edf6ff, #f8fbff) !important;
  box-shadow: inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-kpis article {
  border-color: #dbe5ee !important;
  background: linear-gradient(145deg, #fff, #edf7ff) !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #wageSettlement .performance-table :is(th, td) { border-color: #dfe7ef !important; }
html[data-app-theme="light"] body #wageSettlement .performance-table thead th {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:nth-child(even),
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:nth-child(odd),
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr.selected,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr.calculated,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr td,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:nth-child(even) td,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:nth-child(odd) td,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr.selected td,
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr.calculated td,
html[data-app-theme="light"] body #wageSettlement .wage-table td.calculated {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #e2e8f0 !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:nth-child(even) td { background-color: #f8fbfe !important; }
html[data-app-theme="light"] body #wageSettlement .wage-table tbody tr:hover td { background-color: #edf6ff !important; }
html[data-app-theme="light"] body #wageSettlement .performance-table tfoot td {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  background: #eaf3fb !important;
}
html[data-app-theme="light"] body #wageSettlement :is(.report-text-btn, .report-secondary-btn) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255, 255, 255, .92) !important;
}
html[data-app-theme="light"] body #wageSettlement :is(.report-text-btn, .report-secondary-btn):is(:hover, :focus-visible) {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  border-color: #9dbce3 !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #wageSettlement .report-primary-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
}
html[data-app-theme="light"] body #wageSettlement .performance-tabs button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  border-bottom-color: transparent !important;
}
html[data-app-theme="light"] body #wageSettlement .performance-tabs button:is(:hover, :focus-visible, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-bottom-color: #3b82f6 !important;
  background: rgba(59, 130, 246, .07) !important;
}

/* 库房：二级导航、业务卡片、成本调整 KPI 和表格。 */
html[data-app-theme="light"] body #inventory :is(
  .settings-menu, .settings-content, .inventory-module-shell > *,
  .inventory-adjustment-ledger, .inventory-adjustment-toolbar,
  .dense-table-wrap, .inventory-table-wrap
) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.92) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #inventory .settings-submenu button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: rgba(255,255,255,.58) !important;
}
html[data-app-theme="light"] body #inventory .settings-submenu button:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #edf6ff !important;
  box-shadow: inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #inventory .inventory-adjustment-ledger .inventory-adjustment-kpis {
  border-color: #dce5ee !important;
  background: #dce5ee !important;
}
html[data-app-theme="light"] body #inventory .inventory-adjustment-ledger .inventory-adjustment-kpis article {
  background: linear-gradient(145deg, #fff, #edf7ff) !important;
}
html[data-app-theme="light"] body #inventory :is(.inventory-module-table, .visit-table) thead th {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  border-color: #dce5ee !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #inventory :is(.inventory-module-table, .visit-table) tbody td {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #e2e8f0 !important;
  background: #fff !important;
}

/* 设置中心：分类卡、二级菜单、内容面板、表单与模板列表。 */
html[data-app-theme="light"] body #system :is(
  .settings-console, .settings-layout, .settings-menu, .settings-content, .system-panel,
  .system-actions, .system-list, .consent-template-list > *, [class$="-list"] > article
) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.92) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #system .settings-submenu button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #system .settings-submenu button:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #edf6ff !important;
  box-shadow: inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card,
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card:hover,
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card.active {
  color: var(--suyawb-card-ink) !important;
  border: 1px solid var(--suyawb-card-line) !important;
  border-radius: 22px !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
  backdrop-filter: blur(16px) saturate(110%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(110%) !important;
  transform: none !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card.active {
  border-color: rgba(59, 130, 246, .34) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card::before,
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card > span {
  color: #60758c !important;
  -webkit-text-fill-color: #60758c !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card > strong {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #system .settings-category-cards .settings-category-card > small {
  color: #718096 !important;
  -webkit-text-fill-color: #718096 !important;
}
html[data-app-theme="light"] body #system .consent-template-row .light-btn {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255, 255, 255, .92) !important;
}
html[data-app-theme="light"] body #system .consent-template-row .light-btn:is(:hover, :focus-visible) {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  border-color: #9dbce3 !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #system :is(
  #openLocalMedicalInsurancePricing,
  .system-combo-row .light-btn,
  .prescription-diagnosis-row .light-btn,
  .system-project-actions .system-icon-action
) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255, 255, 255, .92) !important;
}
html[data-app-theme="light"] body #system :is(
  #openLocalMedicalInsurancePricing,
  .system-combo-row .light-btn,
  .prescription-diagnosis-row .light-btn,
  .system-project-actions .system-icon-action
):is(:hover, :focus-visible) {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  border-color: #9dbce3 !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #system #refundApplicationTemplateList [data-preview-refund-application] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #system #refundApplicationTemplateList [data-preview-refund-application]:is(:hover, :focus-visible) {
  border-color: #1d4ed8 !important;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
}
html[data-app-theme="light"] body #system #refundApplicationTemplateList [data-edit-refund-application] {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255, 255, 255, .92) !important;
}
/* 素曜白：诊所中心所有操作统一使用蓝色，避免旧绿色和浅底白字。 */
html[data-app-theme="light"] body #system .system-panel button:not(.primary-btn):not(.save-btn):not(:disabled) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
}
html[data-app-theme="light"] body #system .system-panel :is(.primary-btn, .save-btn, button[type="submit"]):not(:disabled) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #system .system-panel button:disabled {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border-color: #d5dee8 !important;
  background: #eef2f6 !important;
  opacity: .78 !important;
}
html[data-app-theme="light"] body #system .audio-switch input:checked + .audio-switch-track {
  background: #3b82f6 !important;
}
html[data-app-theme="light"] body #system #peopleAdminView .people-employee-row .people-department.none {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border-color: #d8e1ea !important;
  background: #f1f5f9 !important;
}

/* Internal activation feedback and drill-down statistics. */

/* Authorized clinic signature. Visual-only adaptation of the supplied
   gradient-button template; the signed clinic-name binding stays unchanged. */
.sidebar .sidebar-product-brand {
  position: relative !important;
  isolation: isolate;
  min-height: 84px !important;
  margin: 12px 10px 18px !important;
  padding: 0 16px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 16px !important;
  background: radial-gradient(150% 180.06% at 11.14% 140%,#000 37.35%,#08012c 61.36%,#4e1e40 78.42%,#70464e 89.52%,#88394c 100%) !important;
  box-shadow: 0 12px 28px rgba(5, 8, 25, .22) !important;
}

.sidebar .sidebar-product-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(20deg,hsla(340,75%,60%,.2),hsla(340,75%,40%,.75));
  -webkit-mask: linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.sidebar .sidebar-product-brand::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.48),transparent);
  pointer-events: none;
}

.sidebar .sidebar-product-brand .clause-brand-copy strong {
  position: relative;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: clamp(19px,1.55vw,25px) !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  text-shadow: 0 2px 10px rgba(0,0,0,.34);
}

html[data-app-theme="light"] .sidebar .sidebar-product-brand,
html[data-app-theme="light"] .sidebar:hover .sidebar-product-brand,
html[data-app-theme="light"] .sidebar:focus-within .sidebar-product-brand,
html[data-app-theme="light"] .sidebar.sidebar-hold-open .sidebar-product-brand {
  border: 1px solid #d5e3ed !important;
  background-color: #f8fbfd !important;
  background-image: radial-gradient(circle at 88% 16%,rgba(197,238,247,.72),transparent 48%),linear-gradient(135deg,#fff 0%,#f5f9fc 58%,#ecf7fa 100%) !important;
  box-shadow: 0 12px 30px rgba(61,91,113,.1),inset 0 1px 0 rgba(255,255,255,.9) !important;
}

html[data-app-theme="light"] .sidebar .sidebar-product-brand::before {
  display: none;
}

html[data-app-theme="light"] .sidebar .sidebar-product-brand::after {
  right: 8%;
  left: 8%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.95),transparent);
}

html[data-app-theme="light"] .sidebar .sidebar-product-brand .clause-brand-copy strong {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  text-shadow: none;
}

html[data-app-theme="night"] .sidebar .sidebar-product-brand,
html[data-app-theme="night"] .sidebar:hover .sidebar-product-brand,
html[data-app-theme="night"] .sidebar:focus-within .sidebar-product-brand,
html[data-app-theme="night"] .sidebar.sidebar-hold-open .sidebar-product-brand {
  border: 1px solid rgba(226,232,240,.35) !important;
  background-color: #090b0c !important;
  background-image: radial-gradient(circle at 86% 88%,rgba(255,255,255,.14),transparent 42%),radial-gradient(circle at 18% 0,rgba(255,255,255,.055),transparent 38%),linear-gradient(145deg,#111416 0%,#080a0b 58%,#17191b 100%) !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.46),inset 0 0 0 1px rgba(255,255,255,.055),inset 0 1px 0 rgba(255,255,255,.12) !important;
}

html[data-app-theme="night"] .sidebar .sidebar-product-brand::before {
  display: block;
  padding: 1px;
  background: linear-gradient(145deg,rgba(255,255,255,.38),rgba(255,255,255,.05) 46%,rgba(255,255,255,.24));
}

html[data-app-theme="night"] .sidebar .sidebar-product-brand::after {
  right: 6%;
  left: 6%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.36),transparent);
}
html[data-app-theme="light"] body #system .print-template-card-actions .light-btn,
html[data-app-theme="light"] body #system .print-config-row-actions .light-btn {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255, 255, 255, .94) !important;
}
html[data-app-theme="light"] body #system .print-config-tree-title {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #system .print-config-tree-item {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #system .print-config-tree-item:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #edf5ff !important;
  box-shadow: inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #system :where(.print-config-table, .print-config-table th, .print-config-table td) {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
  border-color: #e1eaf3 !important;
  background-color: #fff !important;
}
html[data-app-theme="light"] body #system .print-config-table th {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  background: #eef5fc !important;
}
html[data-app-theme="light"] body #system :is(input, select, textarea, .system-card-select-trigger) {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #d5e0ea !important;
  background-color: #fff !important;
  background-image: none !important;
  color-scheme: light !important;
}
html[data-app-theme="light"] body #system :is(input, textarea)::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  opacity: 1 !important;
}

/* 医患沟通视频：内容区、空状态和视频信息卡。 */
html[data-app-theme="light"] body #communicationVideos :is(
  .communication-video-library, .communication-video-category-content,
  .communication-video-item, .communication-video-meta
) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.92) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #communicationVideos .communication-video-category-content {
  border-style: solid !important;
}
html[data-app-theme="light"] body #communicationVideos .communication-video-meta strong {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #communicationVideos .communication-video-meta small {
  color: #718096 !important;
  -webkit-text-fill-color: #718096 !important;
}
html[data-app-theme="light"] body #communicationVideos .communication-video-categories button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #communicationVideos .communication-video-categories button:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #edf6ff !important;
}

/* 患者管理：导航、查询栏、表头、患者行与操作按钮。 */
html[data-app-theme="light"] body #patients {
  --patient-accent: #3b82f6 !important;
  --patient-text: #172033 !important;
  --patient-muted: #718096 !important;
  --patient-border: #dbe5ee !important;
}
html[data-app-theme="light"] body #patients :is(
  .patients-console, .patients-console-menu, .patients-list-workspace,
  .patients-querybar, .patients-card-list-wrap, .patients-filter-panel
) {
  color: var(--suyawb-card-ink) !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.92) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #patients .patients-console-title { color: #172033 !important; -webkit-text-fill-color: #172033 !important; }
html[data-app-theme="light"] body #patients .patients-console-menu button {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #patients .patients-console-menu button:is(:hover, .active) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #edf6ff !important;
  box-shadow: inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #patients .patients-querybar :is(label, input, select, button:not(.primary-btn), .patient-date-range-trigger) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d5e0ea !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #patients .patients-querybar input::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}
html[data-app-theme="light"] body #patients .patients-card-list-head {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border-color: #dce5ee !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #patients :is(.patient-list-card, .patient-project-row, #patientRows > *) {
  color: #334155 !important;
  border-color: #e2e8f0 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #patients :is(.patient-list-card, .patient-project-row, #patientRows > *):hover {
  background-color: #edf6ff !important;
  transform: none !important;
}
html[data-app-theme="light"] body #patients :is(.patient-table-link, .patient-list-card-fields strong) {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}
html[data-app-theme="light"] body #patients .patient-card-actions .patients-row-action {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cfe0f5 !important;
  background: #f4f8ff !important;
}

/* 素曜白患者业务浮层：治疗方案、患者详情、病历、预约、随访、转诊。 */
html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer .treatment-plan-panel,
  #medicalRecord.drawer-mode,
  #appointmentDrawer .appointment-drawer-panel,
  #followupModal .followup-modal-card,
  #referralModal .referral-modal-card
) {
  --overlay-accent: #3b82f6 !important;
  --overlay-ink: #172033 !important;
  --overlay-muted: #718096 !important;
  --overlay-line: #dbe5ee !important;
  --overlay-panel: rgba(255,255,255,.96) !important;
  color: #172033 !important;
  border-color: #d7e3ed !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 24px 70px rgba(71,85,105,.20), inset 0 1px #fff !important;
}

html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer, #appointmentDrawer, #followupModal, #referralModal,
  #medicalRecord.drawer-mode
) :where(h1, h2, h3, h4, strong, b) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer, #appointmentDrawer, #followupModal, #referralModal,
  #medicalRecord.drawer-mode
) :where(p, label, span, td) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer, #appointmentDrawer, #followupModal, #referralModal,
  #medicalRecord.drawer-mode
) :where(small, em) {
  color: #718096 !important;
  -webkit-text-fill-color: #718096 !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  #treatmentPlanBackdrop, #appointmentDrawerBackdrop
) {
  background: rgba(71,85,105,.28) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}
html[data-app-theme="light"] body #medicalRecord > .medical-record-drawer-backdrop {
  background: rgba(30,41,59,.16) !important;
  backdrop-filter: blur(3px) saturate(96%) !important;
  -webkit-backdrop-filter: blur(3px) saturate(96%) !important;
}

/* 病历抽屉外壳必须透明，让工作台透过遮罩保持可辨识。 */
html[data-app-theme="light"] body #medicalRecord.drawer-mode {
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* 治疗方案抽屉。 */
html[data-app-theme="light"] body #treatmentPlanDrawer :is(.treatment-plan-head, .treatment-plan-body, .treatment-plan-actions) {
  color: #172033 !important;
  border-color: #dbe5ee !important;
  background-color: rgba(255,255,255,.88) !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer :is(
  .treatment-patient-grid, .treatment-compare, .treatment-choice-module,
  .treatment-fee-module, .treatment-consent-module
) {
  color: #172033 !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.94) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer table :is(th, td) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #dfe7ef !important;
  background-color: rgba(255,255,255,.88) !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer table thead th { background-color: #edf5ff !important; }
html[data-app-theme="light"] body #treatmentPlanDrawer :is(.treatment-consents, .treatment-consent-card) {
  color: #172033 !important;
  border-color: #dbe5ee !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-consent-card header {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-consent-editor {
  color: #26313e !important;
  -webkit-text-fill-color: #26313e !important;
  background: #fff !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-consent-editor:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .22) !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-consent-inline-check {
  accent-color: #2563eb !important;
  opacity: 1 !important;
}

/* 夜间主题：治疗方案中的知情同意书选择浮层。保持黑底白字，避免被全局弹窗样式冲成浅色。 */
html[data-app-theme="night"] body #treatmentConsentPickerModal {
  background: rgba(0, 0, 0, .72) !important;
  backdrop-filter: blur(12px) saturate(110%);
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card {
  border: 1px solid rgba(148, 163, 184, .24) !important;
  border-radius: 18px !important;
  background: #0b0f12 !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .04) !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card header,
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-search {
  border-color: rgba(148, 163, 184, .14) !important;
  background: #0f1417 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card header {
  padding: 22px 24px 18px;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card h2 {
  color: #f5f7f8 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card header span {
  color: #94a3ad !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-card .icon-btn {
  border: 1px solid rgba(148, 163, 184, .2) !important;
  background: #1a2024 !important;
  color: #c7d0d4 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-search input {
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 12px !important;
  background: #151a1d !important;
  color: #f5f7f8 !important;
  caret-color: #08b9d5;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-search input::placeholder {
  color: #73818a !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-search input:focus {
  border-color: #08b9d5 !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(8, 185, 213, .14) !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-list {
  background: #0b0f12 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row {
  border-color: rgba(148, 163, 184, .2) !important;
  border-radius: 10px !important;
  background: #11171a !important;
  color: #f1f5f6 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row:hover,
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row:focus-visible {
  border-color: #08b9d5 !important;
  background: #12262c !important;
  outline: 0;
  box-shadow: 0 0 0 2px rgba(8, 185, 213, .14) !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row strong {
  color: #f5f7f8 !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row small {
  color: #9aa8ae !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-row em {
  color: #08c0dc !important;
}
html[data-app-theme="night"] body #treatmentConsentPickerModal .treatment-consent-picker-empty {
  color: #94a3ad !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-plan-actions :is(
  #printTreatmentPlan, #saveTreatmentPlan,
  [data-fallback-print-plan], [data-fallback-close-plan]
) {
  border-color: #2563eb !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #treatmentPlanDrawer .treatment-plan-actions :is(
  #printTreatmentPlan, #saveTreatmentPlan,
  [data-fallback-print-plan], [data-fallback-close-plan]
):is(:hover, :focus-visible) {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 患者详情页与收费/病历信息标签。 */
html[data-app-theme="light"] body #patientDetail {
  --patient-detail-cyan: #3b82f6 !important;
  --patient-detail-dark: #1d4ed8 !important;
  --patient-detail-line: #dbe5ee !important;
  color: #172033 !important;
  background-color: #f6f9fc !important;
  background-image: radial-gradient(circle at 74% 8%, rgba(125,211,252,.14), transparent 31%) !important;
}
html[data-app-theme="light"] body #patientDetail :is(
  .patient-center-shell, .patient-detail-page, .patient-center-card,
  .patient-detail-tabs, .patient-record-subtabs, .patient-record-search-strip,
  .patient-record-card, .patient-charge-panel, .patient-charge-summary,
  .patient-charge-table-wrap, .patient-info-card
) {
  color: #172033 !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.94) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #patientDetail :where(h1,h2,h3,h4,strong,b) { color:#172033 !important; -webkit-text-fill-color:#172033 !important; }
html[data-app-theme="light"] body #patientDetail :where(p,label,span,td) { color:#526174 !important; -webkit-text-fill-color:#526174 !important; }
html[data-app-theme="light"] body #patientDetail :is(.patient-detail-tabs, .patient-record-subtabs) button {
  color:#526174 !important; -webkit-text-fill-color:#526174 !important; background:transparent !important;
}
html[data-app-theme="light"] body #patientDetail :is(.patient-detail-tabs, .patient-record-subtabs) button:is(:hover,.active) {
  color:#1d4ed8 !important; -webkit-text-fill-color:#1d4ed8 !important; background:#edf6ff !important;
  box-shadow:inset 0 -3px #3b82f6 !important;
}
html[data-app-theme="light"] body #patientDetail table :is(th,td) { border-color:#dfe7ef !important; background:#fff !important; color:#475569 !important; -webkit-text-fill-color:#475569 !important; }
html[data-app-theme="light"] body #patientDetail table thead th { background:#edf5ff !important; }

/* Final light-theme normalization for the patient center. These rules sit at
   the end of the theme sheet so legacy dark patient-detail surfaces cannot
   win the cascade. */
html[data-app-theme="light"] body #patientDetail,
html[data-app-theme="light"] body #patientDetail .patient-center-shell,
html[data-app-theme="light"] body #patientDetail .patient-detail-page {
  color: #172033 !important;
  background: #f6f9fc !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #patientDetail :is(
  .patient-profile-head, .patient-detail-tabs, .patient-record-subtabs,
  .patient-record-card, .patient-charge-panel, .patient-charge-summary,
  .patient-charge-table-wrap, .patient-record-timeline-card,
  .patient-followup-card, .patient-treatment-plan-card, .patient-info-card,
  .patient-image-panel, .patient-material-panel
) {
  color: #172033 !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  border-color: var(--suyawb-card-line) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #patientDetail :is(h1,h2,h3,h4,strong,b,dt,dd) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #patientDetail :is(p,label,span,small,td,th) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active {
  background-color: #f6f9fc !important;
  background-image: none !important;
  color: #172033 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active :where(.patient-charge-overview, .patient-charge-panel, .patient-charge-summary, .patient-record-page, .patient-record-list, .patient-followup-page, .patient-treatment-plan-page, .patient-material-page, .patient-image-page) {
  background-color: #fff !important;
  background-image: none !important;
  color: #172033 !important;
}

/* 电子病历页面、抽屉与快捷词条。 */
html[data-app-theme="light"] body #medicalRecord:not(.drawer-mode),
html[data-app-theme="light"] body #medicalRecord > .record-page {
  color:#172033 !important;
  background-color:#f6f9fc !important;
  background-image:radial-gradient(circle at 74% 8%,rgba(125,211,252,.14),transparent 31%) !important;
}
html[data-app-theme="light"] body #medicalRecord > .medical-record-drawer-head,
html[data-app-theme="light"] body #medicalRecord :is(
  .record-toolbar,.record-create-top,.record-section-nav,.record-form-section,.record-footer,
  .quick-phrase-panel,.ortho-section,.ortho-plan-card
) {
  color:#172033 !important;
  border-color:var(--suyawb-card-line) !important;
  background-color:rgba(255,255,255,.94) !important;
  background-image:var(--suyawb-card-bg) !important;
  box-shadow:var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #medicalRecord :is(input,select,textarea,.system-card-select-trigger) {
  color:#334155 !important; -webkit-text-fill-color:#334155 !important;
  border-color:#d5e0ea !important; background:#fff !important; color-scheme:light !important;
}
html[data-app-theme="light"] body #medicalRecord :is(input,textarea)::placeholder { color:#94a3b8 !important; -webkit-text-fill-color:#94a3b8 !important; }
html[data-app-theme="light"] body #medicalRecord :is(.quick-phrase-tabs button,.quick-phrase-panel button,.record-template-btn,.record-section-tools button) {
  color:#475569 !important; -webkit-text-fill-color:#475569 !important; border-color:#d5e0ea !important; background:#f8fafc !important;
}

/* 病历书写浮层使用实体表面，避免工作台内容透入病历卡片。 */
html[data-app-theme="light"] body #medicalRecord.drawer-mode {
  background: transparent !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #medicalRecord.drawer-mode > .medical-record-drawer-backdrop {
  background: rgba(30, 41, 59, .58) !important;
  backdrop-filter: blur(7px) !important;
  -webkit-backdrop-filter: blur(7px) !important;
}
html[data-app-theme="light"] body #medicalRecord.drawer-mode > .medical-record-drawer-head,
html[data-app-theme="light"] body #medicalRecord.drawer-mode > .record-page,
html[data-app-theme="light"] body #medicalRecord.drawer-mode :is(
  .record-toolbar,.record-create-top,.record-section-nav,.record-form-section,.record-footer,.quick-phrase-panel
) {
  background-color: #fff !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-app-theme="light"] body #medicalRecord :is(.quick-phrase-tabs button,.quick-phrase-panel button):is(:hover,.active) {
  color:#1d4ed8 !important; -webkit-text-fill-color:#1d4ed8 !important; background:#edf6ff !important;
}
html[data-app-theme="light"] body #medicalRecord :is(
  .record-filter-title,.record-form-section h3,.record-section-nav strong,
  .record-create-top label,.record-visit-time,.record-visit-time > label,
  .record-type-line,.record-type-line label
) {
  color:#172033 !important;
  -webkit-text-fill-color:#172033 !important;
}
html[data-app-theme="light"] body #medicalRecord .record-section-nav a {
  color:#526174 !important;
  -webkit-text-fill-color:#526174 !important;
}
html[data-app-theme="light"] body #medicalRecord .record-section-nav a:hover {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  background:#edf6ff !important;
  box-shadow:inset 3px 0 #3b82f6 !important;
}
html[data-app-theme="light"] body #medicalRecord :is(.record-workspace,.record-page,.record-create-layout,.record-writing-form) {
  color:#172033 !important;
  background:transparent !important;
}
html[data-app-theme="light"] body #medicalRecord .tooth-input-row {
  color:#334155 !important;
  border-color:#d5e0ea !important;
  background:#f8fafc !important;
  background-image:none !important;
}
html[data-app-theme="light"] body #medicalRecord :is(.quick-phrase-group,.quick-phrase-group > span,.quick-phrase-group > strong) {
  color:#526174 !important;
  -webkit-text-fill-color:#526174 !important;
}
html[data-app-theme="light"] body #medicalRecord :is(
  .record-add-tooth,.record-image-add,.record-visit-time button
) {
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  border-color:#cbd8e5 !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:0 1px 3px rgba(32,62,98,.06) !important;
}
html[data-app-theme="light"] body #medicalRecord :is(
  .record-add-tooth,.record-image-add,.record-visit-time button
):hover {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  border-color:#7fa4d5 !important;
  background:#f8fbff !important;
}
html[data-app-theme="light"] body #medicalRecord .quick-phrase-tabs {
  border-color:#e2e8f0 !important;
  background:#fff !important;
}
html[data-app-theme="light"] body #medicalRecord select option {
  color:#334155 !important;
  background:#fff !important;
}
html[data-app-theme="light"] body #medicalRecord :is(input[type="radio"],input[type="checkbox"]) {
  accent-color:#2563eb !important;
}

/* 素曜白病历抽屉：保存与签名统一为黑字描边按钮。 */
html[data-app-theme="light"] body #medicalRecord.drawer-mode .record-footer :is(
  #saveMedicalRecord,#signMedicalRecord
) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:0 1px 3px rgba(32,62,98,.07) !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #medicalRecord.drawer-mode .record-footer :is(
  #saveMedicalRecord,#signMedicalRecord
):hover:not(:disabled) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#64748b !important;
  background:#f8fafc !important;
}

/* 新建预约抽屉。 */
html[data-app-theme="light"] body #appointmentDrawer .appointment-drawer-head,
html[data-app-theme="light"] body #appointmentDrawer .appointment-drawer-body,
html[data-app-theme="light"] body #appointmentDrawer .drawer-actions {
  color:#172033 !important; border-color:#dbe5ee !important; background:#f6f9fc !important;
}
html[data-app-theme="light"] body #appointmentDrawer :is(.drawer-board,.drawer-appointment-form section) {
  color:#172033 !important; border-color:var(--suyawb-card-line) !important;
  background-color:rgba(255,255,255,.94) !important; background-image:var(--suyawb-card-bg) !important;
  box-shadow:var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #appointmentDrawer :is(.drawer-board-title,.drawer-week-nav,.drawer-week-head) {
  color:#475569 !important; border-color:#dbe5ee !important; background:#edf5ff !important;
}
html[data-app-theme="light"] body #appointmentDrawer .drawer-time-board {
  color:#475569 !important; background-color:#fff !important;
  background-image:linear-gradient(#e7eef5 1px,transparent 1px),linear-gradient(90deg,#e7eef5 1px,transparent 1px) !important;
}
html[data-app-theme="light"] body #appointmentDrawer :is(.drawer-time-label,.drawer-time-cell) {
  color:#64748b !important; -webkit-text-fill-color:#64748b !important; border-color:#e2e8f0 !important; background:rgba(255,255,255,.76) !important;
}
html[data-app-theme="light"] body #appointmentDrawer .drawer-time-cell.selected-day { background:#edf6ff !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip {
  color:#172033 !important; border-color:#91b7dc !important; background:linear-gradient(145deg,#fff,#eaf4ff) !important;
  box-shadow:0 5px 14px rgba(54,96,138,.16),inset 0 1px rgba(255,255,255,.9) !important;
}
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip :is(time,small) { color:#536b82 !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip.pending { border-color:#6f9ee8 !important; background:linear-gradient(145deg,#edf4ff,#dfeaff) !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip.waiting { border-color:#d5aa4c !important; background:linear-gradient(145deg,#fff9df,#fff0b7) !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip.normal { border-color:#65b88a !important; background:linear-gradient(145deg,#effbf4,#dff4e8) !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-chip.in-treatment { border-color:#56b8c9 !important; background:linear-gradient(145deg,#eefbfe,#d9f3f8) !important; }
html[data-app-theme="light"] body #appointmentDrawer .drawer-appointment-form :is(input,select,textarea,.drawer-project-search,.duration-trigger) {
  color:#334155 !important; -webkit-text-fill-color:#334155 !important; border-color:#d5e0ea !important; background:#fff !important; color-scheme:light !important;
}

/* 随访编辑器。 */
html[data-app-theme="light"] body #followupModal {
  --followup-white:#172033 !important; --followup-muted:#718096 !important;
  --followup-black:#f8fafc !important; --followup-control:#fff !important;
  --followup-control-hover:#edf6ff !important; --followup-line:#dbe5ee !important;
  --followup-green:#3b82f6 !important; --followup-green-ink:#fff !important;
  background:rgba(71,85,105,.28) !important;
}
html[data-app-theme="light"] body #followupModal :is(.followup-modal-left,.followup-modal-right,.followup-modal-head,.followup-modal-tabs,.followup-modal-actions) {
  color:#172033 !important; border-color:#dbe5ee !important; background:#f8fbfe !important;
}
html[data-app-theme="light"] body #followupModal :is(
  .followup-record-item,.followup-record-paper,.followup-note-card,.followup-patient-summary,
  .followup-config,.followup-plan-box
) {
  color:#172033 !important; border-color:var(--suyawb-card-line) !important;
  background-color:rgba(255,255,255,.94) !important; background-image:var(--suyawb-card-bg) !important;
  box-shadow:var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #followupModal :is(input,select,textarea,.followup-visit-time-display,.followup-card-select-trigger) {
  color:#334155 !important; -webkit-text-fill-color:#334155 !important; border-color:#d5e0ea !important; background:#fff !important; color-scheme:light !important;
}
html[data-app-theme="light"] body #followupModal :is(input,textarea)::placeholder { color:#94a3b8 !important; -webkit-text-fill-color:#94a3b8 !important; }
html[data-app-theme="light"] body #followupModal :is(button,.primary-btn,.light-btn,.followup-add-plan) {
  color:#475569 !important; -webkit-text-fill-color:#475569 !important; border-color:#d5e0ea !important; background:#f8fafc !important;
}
html[data-app-theme="light"] body #followupModal :is(button.active,.followup-modal-tabs button.active,.followup-modal-left header button.active,.followup-time-unit button.active),
html[data-app-theme="light"] body #followupModal :is(#saveFollowupPlan,#saveFollowupAndAppointment) {
  color:#fff !important; -webkit-text-fill-color:#fff !important; border-color:#3b82f6 !important; background:#3b82f6 !important;
}

/* 患者转诊。 */
html[data-app-theme="light"] body #referralModal { background:rgba(71,85,105,.28) !important; }
html[data-app-theme="light"] body #referralModal .referral-modal-card :is(header,footer) {
  color:#172033 !important; border-color:#dbe5ee !important; background:#f8fbfe !important;
}
html[data-app-theme="light"] body #referralModal .referral-modal-card :is(select,textarea,.referral-card-select-trigger) {
  color:#334155 !important; -webkit-text-fill-color:#334155 !important; border-color:#d5e0ea !important; background:#fff !important; color-scheme:light !important;
}
html[data-app-theme="light"] body #referralModal .referral-card-select-menu {
  color:#334155 !important; border-color:#d5e0ea !important; background:#fff !important; box-shadow:0 16px 36px rgba(71,85,105,.16) !important;
}
html[data-app-theme="light"] body #referralModal .referral-card-select-menu button { color:#475569 !important; -webkit-text-fill-color:#475569 !important; background:#fff !important; }
html[data-app-theme="light"] body #referralModal .referral-card-select-menu button:hover { color:#1d4ed8 !important; -webkit-text-fill-color:#1d4ed8 !important; background:#edf6ff !important; }
html[data-app-theme="light"] body #referralModal .referral-modal-card footer .report-secondary-btn {
  color:#475569 !important; -webkit-text-fill-color:#475569 !important; border-color:#d5e0ea !important; background:#f8fafc !important;
}
html[data-app-theme="light"] body #referralModal .referral-modal-card footer .report-primary-btn {
  color:#fff !important; -webkit-text-fill-color:#fff !important; border-color:#3b82f6 !important; background:#3b82f6 !important;
}

/* 所有上述浮层的关闭按钮保持可见。 */
html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer .plain-close,
  #medicalRecord.drawer-mode .plain-close,
  #appointmentDrawer .plain-close,
  #followupModal .followup-modal-close,
  #referralModal [data-close-referral]
) {
  color:#475569 !important; -webkit-text-fill-color:#475569 !important;
  border:1px solid #d5e0ea !important; background:#f8fafc !important; opacity:1 !important; visibility:visible !important;
}
html[data-app-theme="light"] body :is(
  #treatmentPlanDrawer .plain-close,
  #medicalRecord.drawer-mode .plain-close,
  #appointmentDrawer .plain-close,
  #followupModal .followup-modal-close,
  #referralModal [data-close-referral]
):hover { color:#1d4ed8 !important; -webkit-text-fill-color:#1d4ed8 !important; background:#edf6ff !important; }

/* 素曜白工作台患者搜索：锁定输入文字、占位符与操作按钮对比度。 */
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box {
  color:#334155 !important;
  border-color:#d5e0ea !important;
  background-color:rgba(255,255,255,.94) !important;
  background-image:linear-gradient(145deg,#fff,#f4f9ff) !important;
  box-shadow:inset 0 1px #fff,0 6px 18px rgba(71,85,105,.07) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box:focus-within {
  border-color:rgba(59,130,246,.54) !important;
  background-color:#fff !important;
  box-shadow:0 0 0 3px rgba(59,130,246,.10),inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box input,
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box input:focus,
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box input:focus-visible {
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  caret-color:#2563eb !important;
  background:transparent !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box input::placeholder {
  color:#7c8da1 !important;
  -webkit-text-fill-color:#7c8da1 !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box svg {
  color:#64748b !important;
  fill:currentColor !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-clear {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  border:0 !important;
  background:transparent !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-box input::-webkit-search-cancel-button {
  display:none !important;
  -webkit-appearance:none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .top-new-patient:not(.permission-hidden) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background-color:#3b82f6 !important;
  background-image:linear-gradient(135deg,#4f8ff7,#2563eb) !important;
  box-shadow:0 9px 22px rgba(37,99,235,.22) !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .top-new-patient:not(.permission-hidden):hover {
  background-color:#2563eb !important;
  background-image:linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-dropdown {
  color:#334155 !important;
  border-color:#d5e0ea !important;
  background:#fff !important;
  box-shadow:0 18px 42px rgba(71,85,105,.16) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-result {
  color:#526174 !important;
  border-color:#e2e8f0 !important;
  background:#fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-result:hover { background:#edf6ff !important; }
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-result-main,
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-result-main > span {
  color:#526174 !important;
  -webkit-text-fill-color:#526174 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-rail .global-search-result-main strong {
  color:#172033 !important;
  -webkit-text-fill-color:#172033 !important;
}

/* Dashboard signature/search row after moving it into the main column. */
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .dashboard-clinic-signature {
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .dashboard-clinic-signature strong {
  color:#172033 !important;
  -webkit-text-fill-color:#172033 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .global-search-box {
  color:#334155 !important;
  border-color:#d5e0ea !important;
  background-color:rgba(255,255,255,.94) !important;
  background-image:linear-gradient(145deg,#fff,#f4f9ff) !important;
  box-shadow:inset 0 1px #fff,0 6px 18px rgba(71,85,105,.07) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .global-search-box:focus-within {
  border-color:rgba(59,130,246,.54) !important;
  box-shadow:0 0 0 3px rgba(59,130,246,.10),inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .global-search-box input {
  color:#334155 !important;
  -webkit-text-fill-color:#334155 !important;
  caret-color:#2563eb !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .global-search-box input::placeholder {
  color:#7c8da1 !important;
  -webkit-text-fill-color:#7c8da1 !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .global-search-box svg {
  color:#64748b !important;
  fill:currentColor !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .top-new-patient:not(.permission-hidden) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background-color:#3b82f6 !important;
  background-image:linear-gradient(135deg,#4f8ff7,#2563eb) !important;
  box-shadow:0 9px 22px rgba(37,99,235,.22) !important;
  opacity:1 !important;
  visibility:visible !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-clause-main .top-new-patient:not(.permission-hidden):hover {
  background-color:#2563eb !important;
  background-image:linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
}

/* 素曜白任务摘要操作：避免旧深色按钮的浅字落在白色卡片上。 */
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions button {
  color:#475569 !important;
  -webkit-text-fill-color:#475569 !important;
  border-color:#d5e0ea !important;
  background-color:#f8fafc !important;
  background-image:linear-gradient(145deg,#fff,#f2f7fc) !important;
  box-shadow:inset 0 1px #fff !important;
  opacity:1 !important;
  font-weight:750 !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions button:hover,
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions button:focus-visible {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  border-color:rgba(59,130,246,.38) !important;
  background-color:#edf6ff !important;
  background-image:none !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions [data-task-summary-action="assign"] {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background-color:#3b82f6 !important;
  background-image:linear-gradient(135deg,#4f8ff7,#2563eb) !important;
  box-shadow:0 7px 17px rgba(37,99,235,.18) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions [data-task-summary-action="assign"]:hover,
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions [data-task-summary-action="assign"]:focus-visible {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#1d4ed8 !important;
  background-color:#1d4ed8 !important;
  background-image:linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-task-summary .dashboard-task-summary-actions [data-task-summary-action="assign"]::before {
  background:#fff !important;
  box-shadow:0 0 7px rgba(255,255,255,.52) !important;
}

/* 素曜白工作台“今日任务 / 备忘录”卡片。
   覆盖 styles.css 中该卡片专用的深色高透玻璃与固定角光。 */
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary {
  --suyawb-glow-alpha:.20;
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:var(--suyawb-card-ink) !important;
  border:1px solid var(--suyawb-card-line) !important;
  border-radius:18px !important;
  background-color:rgba(255,255,255,.97) !important;
  background-image:var(--suyawb-card-bg) !important;
  box-shadow:var(--suyawb-card-shadow) !important;
  -webkit-backdrop-filter:blur(15px) !important;
  backdrop-filter:blur(15px) !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary > * {
  position:relative;
  z-index:1;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary::before {
  content:none !important;
  display:none !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary::after {
  content:"" !important;
  position:absolute !important;
  z-index:0 !important;
  inset:0 !important;
  display:block !important;
  width:auto !important;
  height:auto !important;
  border:0 !important;
  border-radius:inherit !important;
  pointer-events:none;
  opacity:0 !important;
  filter:none !important;
  mix-blend-mode:normal !important;
  color:transparent !important;
  background:radial-gradient(260px circle at var(--suyawb-glow-x,72%) var(--suyawb-glow-y,48%),rgba(62,190,225,.38),rgba(126,211,238,.17) 34%,transparent 72%) !important;
  box-shadow:none !important;
  transition:opacity .16s ease !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary:is(:hover,:focus-within)::after {
  opacity:1 !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary:hover {
  --suyawb-glow-alpha:.32;
  border-color:rgba(74,141,247,.30) !important;
  background-color:rgba(255,255,255,.98) !important;
  background-image:var(--suyawb-card-bg) !important;
  box-shadow:0 18px 42px rgba(55,108,155,.13),inset 0 1px rgba(255,255,255,.94) !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary .dashboard-stat-index {
  color:#2563eb !important;
  border-color:rgba(59,130,246,.20) !important;
  background:linear-gradient(135deg,rgba(59,130,246,.12),rgba(87,204,229,.14)) !important;
}
html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary :is(strong,b) {
  color:var(--suyawb-card-ink) !important;
  -webkit-text-fill-color:var(--suyawb-card-ink) !important;
}
@media (prefers-reduced-motion:reduce) {
  html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary,
  html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary::after {
    transition:none !important;
  }
}
@media (prefers-reduced-transparency:reduce) {
  html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary {
    background-color:#fff !important;
    background-image:none !important;
    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
  }
  html[data-app-theme="light"] body #dashboard .queue-card.dashboard-task-summary::after {
    display:none !important;
  }
}

/* 素曜白医生绩效：文字统一深色，日期范围统一蓝色选择态。 */
html[data-app-theme="light"] body #billing:not(.expense-only) :is(
  .performance-title-row,.performance-filter-card,.performance-tabs,.performance-table-card,.performance-sidebar
) :where(button,a) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) :is(
  .performance-tabs button.active,.performance-sidebar button.active
) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#3b82f6 !important;
  background-color:#edf6ff !important;
  background-image:none !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) :is(
  .report-text-btn,.report-secondary-btn,.performance-expand,#clearPerformanceDates
) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) .report-primary-btn {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background:#3b82f6 !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) .performance-range-trigger,
html[data-app-theme="light"] body #billing:not(.expense-only) .performance-range-trigger span {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}

html[data-app-theme="light"] body #performanceDatetimePopover.performance-range-popover {
  color:#111827 !important;
  border-color:#d5e0ea !important;
  background-color:rgba(255,255,255,.98) !important;
  background-image:linear-gradient(145deg,#fff,#f4f9ff) !important;
  box-shadow:0 22px 56px rgba(71,85,105,.18),inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-range-heading {
  border-color:#dbe5ee !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-range-heading small {
  color:#2563eb !important;
  -webkit-text-fill-color:#2563eb !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-range-heading b,
html[data-app-theme="light"] body #performanceDatetimePopover > header strong {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-range-heading > span,
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-week span {
  color:#64748b !important;
  -webkit-text-fill-color:#64748b !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover > header button {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  border-color:#d5e0ea !important;
  background:#f4f8ff !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button {
  display:grid !important;
  place-items:center !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:0 !important;
  background-color:transparent !important;
  background-image:none !important;
  opacity:1 !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.outside {
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button:hover {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  background-color:#edf6ff !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.today {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  box-shadow:inset 0 0 0 1px rgba(59,130,246,.52) !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.in-range::before {
  background:rgba(59,130,246,.12) !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.range-start::before,
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.range-end::before {
  background:#3b82f6 !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.range-start,
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.range-end,
html[data-app-theme="light"] body #performanceDatetimePopover .performance-calendar-grid button.selected {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  background-color:#3b82f6 !important;
  background-image:none !important;
  box-shadow:0 6px 14px rgba(37,99,235,.20) !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover > footer {
  border-color:#dbe5ee !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover > footer button {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#d5e0ea !important;
  background:#fff !important;
}
html[data-app-theme="light"] body #performanceDatetimePopover > footer button.confirm {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background:#3b82f6 !important;
  box-shadow:0 7px 18px rgba(37,99,235,.20) !important;
}

html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board,
  .schedule-board-card, .schedule-date-picker, .booking-form-panel,
  .patients-console, .patients-filter-panel, .patients-querybar, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .expense-hero, .performance-hero, .wage-hero,
  .tax-panel, .system-panel, .modal-card, .performance-modal-card, .followup-modal-card
) { --suyawb-glow-alpha: .18; }

html[data-app-theme="light"] body :where(
  .glow-card, .report-card, .settings-glow-card, .finance-hub-card, .finance-hub-tax-card,
  .metric-card, .queue-card, .work-card, .mini-stat-card, .visit-board,
  .schedule-board-card, .schedule-date-picker, .booking-form-panel,
  .patients-console, .patients-filter-panel, .patients-querybar, .patient-list-card,
  .performance-filter-card, .performance-sidebar, .expense-hero, .performance-hero, .wage-hero,
  .tax-panel, .system-panel, .modal-card, .performance-modal-card, .followup-modal-card
):hover { --suyawb-glow-alpha: .32; }

@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="light"] { --suyawb-glow-x: 72%; --suyawb-glow-y: 48%; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-theme-toggle-thumb,
  .sidebar-theme-toggle-track > span { transition: none !important; }
  html[data-app-theme="light"] .sidebar .nav-item,
  html[data-app-theme="light"] .sidebar .nav-item::before,
  html[data-app-theme="light"] .sidebar .nav-item::after { transition: none !important; }
}
/* 素曜白：统一日期 / 月份浮层可读性。必须位于 ClauseOS 全局深色浮层规则之后。 */
html[data-app-theme="light"] body :is(
  .finance-range-popover, .salary-month-popover, .expense-month-popover,
  .mf-month-popover, .performance-datetime-popover,
  .expense-form-date-popover, .denture-delivery-date-popover,
  .dashboard-task-datetime-popover, .patient-date-range-popover,
  #schedule .schedule-date-picker, #schedule .schedule-date-popover,
  #schedule .calendar-dropdown
) {
  color: #17243a !important;
  -webkit-text-fill-color: currentColor;
  border-color: rgba(91, 132, 184, .22) !important;
  background-color: rgba(255, 255, 255, .98) !important;
  background-image: radial-gradient(circle at 84% 8%, rgba(79, 196, 238, .14), transparent 34%), linear-gradient(135deg, #fff, #f7fbff) !important;
  box-shadow: 0 22px 54px rgba(44, 69, 104, .20), inset 0 1px rgba(255,255,255,.96) !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-popover, .salary-month-popover, .expense-month-popover,
  .mf-month-popover, .performance-datetime-popover,
  .expense-form-date-popover, .denture-delivery-date-popover,
  .dashboard-task-datetime-popover, .patient-date-range-popover,
  #schedule .schedule-date-picker, #schedule .schedule-date-popover
) :is(header strong, header b, .calendar-title, .month-title) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-week span, .denture-delivery-calendar-week,
  .dashboard-task-calendar-week span, .expense-form-calendar-week span,
  #patients .patient-date-range-weekdays,
  #schedule .mini-calendar > b, #schedule .mini-calendar > span
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-days button, .denture-delivery-calendar-days button,
  .dashboard-task-calendar-days button, .expense-form-calendar-day,
  #patients .patient-date-range-day, #schedule .mini-calendar button,
  .salary-month-grid button, .expense-month-grid button, .mf-month-grid button
) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-days button.outside, .denture-delivery-calendar-days button.outside,
  .dashboard-task-calendar-days button.outside, .expense-form-calendar-day.outside,
  #patients .patient-date-range-day.outside
) {
  color: #a0aec0 !important;
  -webkit-text-fill-color: #a0aec0 !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-days button.today, .denture-delivery-calendar-days button.today,
  .dashboard-task-calendar-days button.today, .expense-form-calendar-day.today,
  #patients .patient-date-range-day.today, #schedule .mini-calendar button.today:not(.active),
  .salary-month-grid button.current:not(.selected), .expense-month-grid button.current:not(.selected),
  .mf-month-grid button.current:not(.selected)
) {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  border-color: rgba(37, 99, 235, .42) !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .38) !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-days button.in-range,
  #patients .patient-date-range-day.in-range
) {
  color: #1e40af !important;
  -webkit-text-fill-color: #1e40af !important;
  background: #dbeafe !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-days button.range-start, .finance-range-days button.range-end,
  .denture-delivery-calendar-days button.selected,
  .dashboard-task-calendar-days button.selected,
  .expense-form-calendar-day.selected,
  #patients .patient-date-range-day.range-start, #patients .patient-date-range-day.range-end,
  #schedule .mini-calendar button.active,
  .salary-month-grid button.selected, .expense-month-grid button.selected,
  .mf-month-grid button.selected
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .24) !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #schedule .mini-calendar button :is(strong, small) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-popover, .salary-month-popover, .expense-month-popover,
  .mf-month-popover, .performance-datetime-popover,
  .expense-form-date-popover, .denture-delivery-date-popover,
  .dashboard-task-datetime-popover, .patient-date-range-popover
) :is(small, footer span, footer p, label) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-popover, .salary-month-popover, .expense-month-popover,
  .mf-month-popover, .performance-datetime-popover,
  .expense-form-date-popover, .denture-delivery-date-popover,
  .dashboard-task-datetime-popover, .patient-date-range-popover
) :is(header button, footer button) {
  color: #31506f !important;
  -webkit-text-fill-color: #31506f !important;
  border-color: #d7e2ef !important;
  background: #fff !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body :is(
  .finance-range-popover, .salary-month-popover, .expense-month-popover,
  .mf-month-popover, .performance-datetime-popover,
  .expense-form-date-popover, .denture-delivery-date-popover,
  .dashboard-task-datetime-popover, .patient-date-range-popover
) :is(footer button.confirm, footer button.primary, footer .primary-btn) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
}

html[data-app-theme="light"] body .finance-range-selected {
  color: #17243a !important;
  border-color: #dbe7f3 !important;
  background: #f5f9ff !important;
}
html[data-app-theme="light"] body .finance-range-selected :is(strong, small) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #patients .patient-date-range-day.in-range::before {
  background: #dbeafe !important;
}
html[data-app-theme="light"] body #patients .patient-date-range-day:is(.range-start, .range-end)::before {
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .24) !important;
}

/* 素曜白：月度支出、收支报表、税务中心统一为蓝白业务面板。 */
html[data-app-theme="light"] body #billing.expense-only,
html[data-app-theme="light"] body #monthlyExpenseContent,
html[data-app-theme="light"] body .monthly-finance-view,
html[data-app-theme="light"] body #taxCenter.view.active {
  --suyao-panel: rgba(255, 255, 255, .94);
  --suyao-panel-soft: rgba(246, 250, 255, .94);
  --suyao-line: rgba(91, 132, 184, .20);
  --suyao-ink: #17243a;
  --suyao-muted: #607089;
  --suyao-blue: #2563eb;
  color: var(--suyao-ink) !important;
  background-color: #f4f8fc !important;
  background-image: radial-gradient(circle at 78% 4%, rgba(92, 199, 238, .13), transparent 30%), linear-gradient(135deg, #f8fbff, #f1f7fb) !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent :is(
  .report-card, .expense-section-nav, .expense-overview-card,
  .expense-filter-card, .expense-all-chart-card, .expense-category-detail-card,
  .expense-denture-factory-section, .expense-misc-card, .expense-reimbursement-card,
  .expense-salary-details, .expense-reimbursement-grid article,
  .expense-denture-factory-card, .expense-summary-view
),
html[data-app-theme="light"] body .monthly-finance-view :is(.mf-header, .mf-kpis article, .mf-card),
html[data-app-theme="light"] body #taxCenter :is(
  .tax-toolbar, .tax-rule-panel, .tax-panel, .tax-summary article,
  .tax-rule-grid article, .tax-source-grid article,
  .tax-inventory-adjustment-kpis article, .tax-breakdown div, .dense-table-wrap
) {
  color: var(--suyao-ink) !important;
  border-color: var(--suyao-line) !important;
  background-color: var(--suyao-panel) !important;
  background-image: radial-gradient(circle at 82% 12%, rgba(91, 196, 235, .13), transparent 34%), linear-gradient(135deg, rgba(255,255,255,.98), rgba(244,249,255,.94)) !important;
  box-shadow: 0 12px 30px rgba(49, 78, 112, .09), inset 0 1px rgba(255,255,255,.98) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent :is(h2, h3, h4, strong, b, th),
html[data-app-theme="light"] body .monthly-finance-view :is(h2, h3, h4, strong, b),
html[data-app-theme="light"] body #taxCenter :is(h2, h3, h4, strong, b) {
  color: var(--suyao-ink) !important;
  -webkit-text-fill-color: var(--suyao-ink) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent :is(p, label, span, small, td),
html[data-app-theme="light"] body .monthly-finance-view :is(p, label, span, small, em),
html[data-app-theme="light"] body #taxCenter :is(p, label, span, small, td) {
  color: var(--suyao-muted) !important;
  -webkit-text-fill-color: var(--suyao-muted) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent :is(input, select, textarea, .expense-month-trigger, .finance-range-trigger),
html[data-app-theme="light"] body .monthly-finance-view :is(input, select, textarea, .mf-month-trigger),
html[data-app-theme="light"] body #taxCenter :is(input, select, textarea, .tax-custom-select-button) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border-color: #d5e2ef !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(43, 67, 96, .035) !important;
  opacity: 1 !important;
}

/* 素曜白不能把已由卡片选择器替代的原生 select 再次显现。 */
html[data-app-theme="light"] body #monthlyExpenseContent select.system-card-select-source,
html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode.system-card-select-source {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode + .system-card-select,
html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode + .system-card-select .system-card-select-trigger {
  height: 44px !important;
  min-height: 44px !important;
  box-sizing: border-box !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode + .system-card-select .system-card-select-trigger {
  border: 1px solid #d5e2ef !important;
  border-radius: 10px !important;
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(43, 67, 96, .035) !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode + .system-card-select .system-card-select-trigger:hover,
html[data-app-theme="light"] body #monthlyExpenseContent .finance-time-mode + .system-card-select.open .system-card-select-trigger {
  border-color: #9dbce3 !important;
  background: #f8fbff !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent :is(input, textarea)::placeholder,
html[data-app-theme="light"] body #taxCenter :is(input, textarea)::placeholder {
  color: #8a99ad !important;
  -webkit-text-fill-color: #8a99ad !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #monthlyExpenseContent table :is(th, td),
html[data-app-theme="light"] body #taxCenter table :is(th, td) {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
  border-color: #e1eaf3 !important;
  background-color: rgba(255, 255, 255, .92) !important;
  background-image: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent table th,
html[data-app-theme="light"] body #taxCenter table th {
  color: #52647c !important;
  -webkit-text-fill-color: #52647c !important;
  background: #eef5fc !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent table tfoot td {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  background: #eaf4ff !important;
}

html[data-app-theme="light"] body .monthly-finance-view .mf-daily-chart :is(.mf-y-tick text, .mf-x-tick text, .mf-axis-title),
html[data-app-theme="light"] body .monthly-finance-view .mf-chart text {
  fill: #607089 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body .monthly-finance-view .mf-daily-chart :is(.mf-y-tick line, .mf-axis-line, .mf-x-tick line) {
  stroke: #cddbea !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body .monthly-finance-view .mf-donut {
  background-color: #dceaf6 !important;
  filter: none !important;
}
html[data-app-theme="light"] body .monthly-finance-view .mf-donut > div {
  color: var(--suyao-ink) !important;
  background: #fff !important;
}

html[data-app-theme="light"] body #taxCenter :is(.tax-period-tip, .tax-refresh-hint) {
  color: #40516a !important;
  -webkit-text-fill-color: #40516a !important;
  border-left-color: var(--suyao-blue) !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #taxCenter .tax-breakdown {
  background: #dbe6f1 !important;
}
html[data-app-theme="light"] body #taxCenter .tax-total-payable {
  border-color: rgba(37, 99, 235, .30) !important;
  background: linear-gradient(135deg, #edf5ff, #dfeeff) !important;
}

html[data-app-theme="light"] body :is(#monthlyExpenseContent, .monthly-finance-view, #taxCenter) :is(
  .report-primary-btn, .primary-btn
),
html[data-app-theme="light"] body #monthlyExpenseContent :is(.expense-section-nav button.active, .performance-tabs button.active),
html[data-app-theme="light"] body #taxCenter :is(.tax-mode-tabs button.active, .tax-segmented button.active) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .expense-section-nav button:not(.active) {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .expense-section-nav button:not(.active):is(:hover, :focus-visible) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: rgba(59, 130, 246, .07) !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .expense-kpi-link {
  color: #315f91 !important;
  -webkit-text-fill-color: #315f91 !important;
  border-color: #d5e2ef !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent .expense-kpi-link:is(:hover, :focus-visible) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #9dbce3 !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body :is(#monthlyExpenseContent, .monthly-finance-view, #taxCenter) :is(
  .report-secondary-btn, .light-btn, .report-text-btn, .mf-header-actions button
) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #cdddf0 !important;
  background: rgba(255,255,255,.92) !important;
}

@media (prefers-reduced-transparency: reduce) {
  html[data-app-theme="light"] body #monthlyExpenseContent :is(.report-card, .expense-section-nav),
  html[data-app-theme="light"] body .monthly-finance-view :is(.mf-header, .mf-kpis article, .mf-card),
  html[data-app-theme="light"] body #taxCenter :is(.tax-toolbar, .tax-rule-panel, .tax-panel, .tax-summary article) {
    background-image: none !important;
    background-color: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}

/* 素曜白：新建预约侧栏及其内嵌日期浮层。 */
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel {
  color: #17243a !important;
  border-color: rgba(91, 132, 184, .22) !important;
  background-color: #f4f8fc !important;
  background-image: radial-gradient(circle at 82% 7%, rgba(91, 196, 235, .15), transparent 30%), linear-gradient(135deg, #fbfdff, #f1f7fc) !important;
  box-shadow: -16px 0 42px rgba(48, 75, 108, .16) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(
  .form-panel-head, .inline-appointment-form section, .inline-actions
) {
  color: #17243a !important;
  border-color: rgba(91, 132, 184, .20) !important;
  background-color: rgba(255, 255, 255, .94) !important;
  background-image: radial-gradient(circle at 88% 8%, rgba(79, 190, 232, .11), transparent 34%), linear-gradient(135deg, #fff, #f6faff) !important;
  box-shadow: 0 10px 26px rgba(49, 78, 112, .08), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(h2, h3, h4, strong) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(label, p, span, small) {
  color: #566981 !important;
  -webkit-text-fill-color: #566981 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(
  input:not([type="checkbox"]):not([type="radio"]), select, textarea,
  .appointment-card-select-trigger, .appointment-card-date-trigger
) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border-color: #d5e2ef !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(43, 67, 96, .035) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(input, textarea)::placeholder {
  color: #8a99ad !important;
  -webkit-text-fill-color: #8a99ad !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(
  .appointment-card-select-menu, .appointment-card-calendar, .patient-search-dropdown
) {
  color: #17243a !important;
  border-color: rgba(91, 132, 184, .24) !important;
  background-color: rgba(255, 255, 255, .99) !important;
  background-image: radial-gradient(circle at 82% 8%, rgba(79, 196, 238, .14), transparent 34%), linear-gradient(135deg, #fff, #f7fbff) !important;
  box-shadow: 0 18px 42px rgba(44, 69, 104, .18), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-calendar header strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-calendar header button,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-calendar footer button {
  color: #31506f !important;
  -webkit-text-fill-color: #31506f !important;
  border-color: #d7e2ef !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-week span {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-day {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border-color: transparent !important;
  background: transparent !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-day.outside {
  color: #a0aec0 !important;
  -webkit-text-fill-color: #a0aec0 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-day:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-day.today:not(.selected) {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .42) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-calendar-day.selected {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .24) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel :where(.type-toggle, .project-search span, .appointment-card-date-trigger i) {
  color: #52647c !important;
  border-color: #d5e2ef !important;
  background: #f7fbff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .type-toggle label:has(input:checked) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .project-groups label:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel input:is([type="checkbox"], [type="radio"]) {
  accent-color: #2563eb !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .inline-actions .save-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .inline-actions button:not(.save-btn) {
  color: #31506f !important;
  -webkit-text-fill-color: #31506f !important;
  border-color: #d5e2ef !important;
  background: #fff !important;
}

/* 预约字段标签只保留文字，箭头仅显示在下方真正的选择框内。 */
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(.appointment-card-select-picker)::before,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(.appointment-card-select-picker)::after {
  content: none !important;
  display: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(select[name="visitType"])::before,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(select[name="visitType"])::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel select[name="visitType"].appointment-card-native-select {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(select:is([name="consultant"], [name="room"], [name="doctor"]))::before,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(select:is([name="consultant"], [name="room"], [name="doctor"]))::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel select:is([name="consultant"], [name="room"], [name="doctor"]).appointment-card-native-select {
  display: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-menu button b,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-menu button svg {
  display: none !important;
  opacity: 0 !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-menu button[aria-selected="true"] {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid rgba(37, 99, 235, .22) !important;
  background: #eaf3ff !important;
  box-shadow: none !important;
}

/* 素曜白人员管理：科室管理入口使用明确的按钮边框。 */
html[data-app-theme="light"] body #system #openDepartmentManager {
  min-height: 40px !important;
  padding: 0 14px !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #system #openDepartmentManager:hover {
  border-color: #7299cc !important;
  color: #17212f !important;
  background: #f5f9ff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
  transform: none !important;
}

/* 素曜白预约详情浮层：关闭、正文与操作统一为高对比深色。 */
html[data-app-theme="light"] body #schedule .schedule-popover-close {
  border: 1px solid #b8c8d9 !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(32, 62, 98, .12) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-close:hover,
html[data-app-theme="light"] body #schedule .schedule-popover-close:focus-visible {
  border-color: #7299cc !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #eef5ff !important;
  outline: none !important;
}
html[data-app-theme="light"] body #schedule .schedule-detail-body,
html[data-app-theme="light"] body #schedule .schedule-detail-list,
html[data-app-theme="light"] body #schedule .schedule-detail-list :is(dt, dd),
html[data-app-theme="light"] body #schedule .schedule-record-list :is(span, small, em) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #schedule .schedule-detail-list dt {
  color: #52647b !important;
  -webkit-text-fill-color: #52647b !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-actions > button,
html[data-app-theme="light"] body #schedule .schedule-popover-actions .split-action > button {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  border-color: #bfd0e0 !important;
  background: #fff !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-actions > .split-action:first-child > button:first-child,
html[data-app-theme="light"] body #schedule .schedule-popover-actions > .split-action:first-child > button + button {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  border-color: #a9d8cc !important;
  background: #eef9f6 !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #fff !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button:hover,
html[data-app-theme="light"] body #schedule .schedule-action-menu button:focus-visible {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #eef5ff !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button:disabled {
  color: #66758a !important;
  -webkit-text-fill-color: #66758a !important;
  opacity: .62 !important;
}

/* 白色主题：科室管理弹窗。 */
html[data-app-theme="light"] body .department-manager-modal {
  background: rgba(36, 55, 78, .28) !important;
  backdrop-filter: blur(5px);
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card {
  overflow: hidden;
  border: 1px solid #d8e4f1 !important;
  background: #fff !important;
  color: #17243a !important;
  box-shadow: 0 24px 64px rgba(43, 69, 101, .24) !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card header {
  border-bottom: 1px solid #e2ebf5 !important;
  background: linear-gradient(135deg, #fff 12%, #f3f8ff 100%) !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card header h2 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card header p {
  color: #687b92 !important;
  -webkit-text-fill-color: #687b92 !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card header > button {
  border: 1px solid #d7e2ef !important;
  background: #f5f8fc !important;
  color: #52677f !important;
  -webkit-text-fill-color: #52677f !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card header > button:hover {
  border-color: #b9cff0 !important;
  background: #eaf3ff !important;
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-toolbar .primary-btn,
html[data-app-theme="light"] body .department-manager-modal .department-manager-card footer .primary-btn,
html[data-app-theme="light"] body .department-manager-modal .department-inline-actions .primary-btn {
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #4f8df7, #2563eb) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-list article,
html[data-app-theme="light"] body .department-manager-modal .department-manager-list article.department-editor-row {
  border: 1px solid #dce7f2 !important;
  background: #f8fbff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-list article:hover {
  border-color: #b9cff0 !important;
  background: #f2f7ff !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-list article strong {
  color: #263950 !important;
  -webkit-text-fill-color: #263950 !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-list .light-btn,
html[data-app-theme="light"] body .department-manager-modal .department-inline-actions .light-btn {
  border: 1px solid #d4e0ed !important;
  background: #fff !important;
  color: #31506f !important;
  -webkit-text-fill-color: #31506f !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-list .danger-line {
  border-color: #f0caca !important;
  color: #c24141 !important;
  -webkit-text-fill-color: #c24141 !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-inline-editor label {
  color: #40566f !important;
  -webkit-text-fill-color: #40566f !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-inline-editor input {
  border-color: #cfdeed !important;
  background: #fff !important;
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  color-scheme: light !important;
}
html[data-app-theme="light"] body .department-manager-modal .department-manager-card footer {
  border-top: 1px solid #e2ebf5 !important;
  background: #f8fbff !important;
}

/* 诊所中心设置：素曜白统一蓝白表面、可读文字与悬浮选择层。 */
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] {
  color: #17243a !important;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(239,248,255,.96) 62%, rgba(227,246,252,.9)) !important;
  border-color: #d8e6f2 !important;
  box-shadow: 0 14px 34px rgba(57,91,125,.10), inset 0 1px rgba(255,255,255,.9) !important;
  overflow: visible !important;
}
html[data-app-theme="light"] body #system .settings-content,
html[data-app-theme="light"] body #system .settings-layout,
html[data-app-theme="light"] body #system .settings-console {
  overflow: visible !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] :where(h1,h2,h3,h4,strong,b,th) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] :where(p,label,span,small,td) {
  color: #607089 !important;
  -webkit-text-fill-color: #607089 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] :where(input,select,textarea,.system-card-select-trigger) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  background: rgba(255,255,255,.9) !important;
  border-color: #d5e2ef !important;
  box-shadow: inset 0 1px rgba(255,255,255,.95) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] :where(input,textarea)::placeholder {
  color: #91a3ba !important;
  -webkit-text-fill-color: #91a3ba !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] input:is([type="checkbox"],[type="radio"]) {
  accent-color: #2563eb !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] :where(.salary-card,.salary-filter-card,.salary-table-card,.salary-template-grid section,.permission-form,.permission-check-grid,.permission-check-group,.system-list-row,.people-employee-head,.people-employee-row,.permission-admin-tabs) {
  color: #26364d !important;
  background-color: rgba(255,255,255,.94) !important;
  background-image: var(--suyawb-card-bg) !important;
  border-color: var(--suyawb-card-line) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-table {
  color: #26364d !important;
  background: rgba(255,255,255,.72) !important;
  border-color: #d5e2ef !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-table :where(th,td),
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-table tbody :where(tr,td) {
  color: #52647c !important;
  -webkit-text-fill-color: #52647c !important;
  background: rgba(255,255,255,.72) !important;
  border-color: #dfe9f2 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-table thead th {
  color: #40536c !important;
  background: #eef5fb !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-admin-tabs button {
  color: #52647c !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-admin-tabs button:is(:hover,.active) {
  color: #1d4ed8 !important;
  background: #eaf3ff !important;
  box-shadow: inset 0 -2px #3b82f6 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] :where(.permission-form,.permission-check-grid,.permission-check-group) {
  background: rgba(248,252,255,.92) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] :where(.permission-admin-view,.permission-list,.system-list,.permission-check-grid,.permission-check-group,.permission-form) {
  color: #26364d !important;
  background: rgba(248,252,255,.92) !important;
  border-color: #d5e2ef !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] :where(.permission-admin-view,.permission-list,.system-list) :where(strong,b,h3,h4) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select {
  position: relative !important;
  z-index: 40 !important;
  overflow: visible !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999 !important;
  display: block !important;
  max-height: 280px !important;
  overflow: auto !important;
  color: #26364d !important;
  background: rgba(255,255,255,.98) !important;
  border: 1px solid #cbdceb !important;
  box-shadow: 0 18px 38px rgba(43,74,105,.18) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu.hidden { display: none !important; }
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu button {
  display: block !important;
  color: #40536c !important;
  background: transparent !important;
  text-align: left !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu button:is(:hover,[aria-selected="true"]) {
  color: #1d4ed8 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu button i,
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .system-card-select-menu button svg {
  display: none !important;
  visibility: hidden !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card-select {
  position: relative !important;
  display: grid !important;
  overflow: visible !important;
  z-index: 50 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-grid label:has(#salaryDepartmentFilter) .salary-card-select-trigger,
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-grid label:has(#salaryPostFilter) .salary-card-select-trigger {
  border: 1px solid #c7d8ea !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(43, 74, 105, .05) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-grid label:has(#salaryDepartmentFilter) .salary-card-select-trigger:is(:hover,[aria-expanded="true"]),
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-grid label:has(#salaryPostFilter) .salary-card-select-trigger:is(:hover,[aria-expanded="true"]) {
  border-color: #6fa4ef !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card-select-menu {
  position: absolute !important;
  top: calc(100% + 7px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin-top: 0 !important;
  z-index: 999 !important;
  color: #40536c !important;
  background: rgba(255,255,255,.99) !important;
  border: 1px solid #c7d8ea !important;
  box-shadow: 0 18px 38px rgba(43,74,105,.18) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card-select-menu button {
  display: block !important;
  color: #40536c !important;
  background: transparent !important;
  text-align: left !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card-select-menu button:is(:hover,:focus-visible,[aria-selected="true"]) {
  color: #1d4ed8 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card-select-menu button b {
  display: none !important;
  opacity: 0 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tool-card {
  padding: 26px;
  border: 1px solid #d5e2ef;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(233,246,255,.9));
  box-shadow: 0 10px 26px rgba(54,91,124,.09), inset 0 1px rgba(255,255,255,.9);
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tool-kicker {
  color: #2563eb !important;
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 800;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tool-card h3 {
  margin: 10px 0 8px;
  color: #17243a !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tool-card p {
  min-height: 48px;
  color: #607089 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] #exportSystemBackup {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid #138f88 !important;
  border-radius: 8px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #138f88 !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] #exportSystemBackup:hover {
  background: #08716c !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] #chooseSystemBackup {
  color: #08716c !important;
  -webkit-text-fill-color: #08716c !important;
  cursor: pointer !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #system .system-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
/* The schedule detail popover has a legacy dark-surface block later in the
   stylesheet. Restore readable light-theme text when the app uses 素曜白. */
html[data-app-theme="light"] body #schedule .schedule-popover-card {
  color: #17212f !important;
  border-color: #d5e0ea !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f5f8fb) !important;
  box-shadow: 0 24px 64px rgba(25, 41, 61, .22) !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-person h2,
html[data-app-theme="light"] body #schedule .schedule-popover-person h2 .schedule-patient-link {
  color: #17212f !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-person p,
html[data-app-theme="light"] body #schedule .schedule-detail-list dd {
  color: #334155 !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-person p > span,
html[data-app-theme="light"] body #schedule .schedule-detail-list dt {
  color: #64748b !important;
}
html[data-app-theme="light"] body #schedule .schedule-detail-tabs {
  border-bottom-color: #dbe5ee !important;
}
html[data-app-theme="light"] body #schedule .schedule-detail-tabs button {
  color: #64748b !important;
}
html[data-app-theme="light"] body #schedule .schedule-detail-tabs button.active {
  color: #08716c !important;
}
html[data-app-theme="light"] body #schedule .schedule-popover-actions > button,
html[data-app-theme="light"] body #schedule .schedule-popover-actions .split-action > button {
  color: #08716c !important;
  background: #fff !important;
  border-color: #cfe0e8 !important;
}
/* Final override for the action dropdown: a late dark-skin rule was
   painting this menu charcoal even when 素曜白 was active. */
html[data-app-theme="light"] body #schedule .schedule-action-menu {
  z-index: 200 !important;
  color: #263647 !important;
  border: 1px solid #cfe0e8 !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  background-image: none !important;
  box-shadow: 0 18px 42px rgba(25, 41, 61, .18) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button,
html[data-app-theme="light"] body #schedule .schedule-action-menu button:disabled {
  height: 42px !important;
  color: #08716c !important;
  -webkit-text-fill-color: #08716c !important;
  background: #ffffff !important;
  border: 0 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button:hover,
html[data-app-theme="light"] body #schedule .schedule-action-menu button:focus-visible {
  color: #075e59 !important;
  -webkit-text-fill-color: #075e59 !important;
  background: #edf9f7 !important;
  outline: none !important;
}
html[data-app-theme="light"] body #schedule .schedule-action-menu button:disabled {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}
html[data-app-theme="light"] body #schedule .time-board .schedule-chip,
html[data-app-theme="light"] body .schedule-board-card .time-board .schedule-chip {
  border-color: #b9e0dc !important;
  background: #e8f7f3 !important;
  background-image: none !important;
  box-shadow: 0 8px 18px rgba(20, 110, 100, .10) !important;
}
html[data-app-theme="light"] body #schedule .time-board .schedule-chip :where(strong, time, b),
html[data-app-theme="light"] body .schedule-board-card .time-board .schedule-chip :where(strong, time, b) {
  color: #245b58 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #schedule .time-board .schedule-chip small,
html[data-app-theme="light"] body .schedule-board-card .time-board .schedule-chip small {
  color: #527976 !important;
}
html[data-app-theme="light"] body #system #systemBackupStatus {
  display: block;
  margin-top: 12px;
  color: #2563eb !important;
}
@media (max-width: 760px) {
  html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .system-tools-grid { grid-template-columns: 1fr; }
}
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .permission-check-grid,
html[data-app-theme="light"] body #system [data-settings-panel-group="clinic"] .permission-check-group {
  background: #f7fbff !important;
}
/* 强制清掉旧版黑色权限表单的高优先级背景。 */
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-admin-view,
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-form,
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-check-grid,
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-check-group,
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-list {
  background-color: #f8fcff !important;
  background-image: none !important;
  color: #26364d !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="people-admin"] .permission-form :where(label,h2,h3,p,span) {
  color: #52647c !important;
  -webkit-text-fill-color: #52647c !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-settings-stack,
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-card,
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-card {
  overflow: visible !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="salary-standards"] .salary-filter-card {
  position: relative !important;
  z-index: 80 !important;
}

/* Patient detail navigation buttons: visual equivalent of the supplied
   LiquidButton template, while keeping the existing HTML handlers intact. */
html[data-app-theme="light"] body #patientDetail.view.active .patient-detail-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 8px 10px !important;
  min-height: 64px !important;
  border: 1px solid #dbe7f1 !important;
  border-radius: 18px !important;
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 10px 28px rgba(47, 94, 133, .10), inset 0 1px rgba(255,255,255,.95) !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-detail-tabs button {
  position: relative !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: 48px !important;
  padding: 0 16px !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  transition: transform .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-detail-tabs button:hover {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  background: #f1f7ff !important;
  transform: translateY(-1px) !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-detail-tabs button.active {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  background: linear-gradient(180deg, #eef6ff 0%, #e5f0ff 100%) !important;
  border-color: #d7e8ff !important;
  box-shadow: inset 0 -4px #3b82f6, 0 5px 12px rgba(59,130,246,.14) !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-detail-tabs button:active {
  transform: scale(.97) !important;
}

/* Restore contrast for record search/top bars and editable controls that are
   still targeted by the legacy dark patient-center skin. */
html[data-app-theme="light"] body #patientDetail.view.active :where(
  .patient-record-topbar,
  .patient-record-rangebar,
  .patient-record-search-summary,
  .patient-record-filter-title,
  .patient-record-actions,
  .patient-record-actions button,
  .patient-record-rangebar button,
  .patient-record-tooth-query,
  .patient-record-tooth-query span,
  .patient-record-tooth-query small,
  .patient-record-keyword-input,
  .patient-record-page input,
  .patient-record-page select,
  .patient-record-page textarea
) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #dbe5ee !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-filter-title,
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-page :where(h2,h3,h4,strong,b) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-page input::placeholder {
  color: #8a9aae !important;
  -webkit-text-fill-color: #8a9aae !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-page input:focus,
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-page textarea:focus,
html[data-app-theme="light"] body #patientDetail.view.active .patient-record-page select:focus {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  border-color: #60a5fa !important;
  outline: 3px solid rgba(96,165,250,.16) !important;
}

/* Patient detail pages: legacy dark-surface rules used to win over the
   light theme on the lower cards (charges, records, images and follow-ups).
   These are content panels, not modal masks; normalize them as a single
   readable light surface. */
html[data-app-theme="light"] body #patientDetail.view.active {
  color: #172033 !important;
  background: #f6f9fc !important;
  background-image: none !important;
  filter: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active :where(
  .patient-detail-page,
  .patient-record-page,
  .patient-record-card,
  .patient-record-list,
  .patient-charge-overview,
  .patient-charge-panel,
  .patient-charge-summary,
  .patient-charge-table-wrap,
  .patient-followup-page,
  .patient-followup-card,
  .patient-treatment-plan-page,
  .patient-treatment-plan-panel,
  .patient-treatment-plan-card,
  .patient-image-page,
  .patient-image-panel,
  .patient-material-page,
  .patient-material-panel,
  .patient-charge-workspace,
  .patient-charge-metrics,
  .patient-charge-metrics span,
  .patient-charge-ledger,
  .patient-charge-actions,
  .patient-charge-filterbar,
  .patient-charge-action-card,
  .patient-record-card,
  .patient-record-topbar,
  .patient-record-rangebar,
  .patient-record-timeline-shell,
  .patient-record-timeline-list,
  .patient-record-search-summary,
  .patient-history,
  .patient-disposal-panel,
  .patient-disposal-card,
  .patient-followup-panel,
  .patient-followup-result-card,
  .patient-image-center,
  .patient-image-content,
  .patient-image-dropzone,
  .patient-image-toolbar,
  .patient-image-tile,
  .patient-disposal-panel-head,
  .patient-followup-panel-head,
  .patient-return-visit-panel,
  .patient-return-visit-head,
  .patient-return-visit-card,
  .patient-treatment-plan-section,
  .patient-treatment-consent-document,
  .patient-prescription-panel,
  .patient-prescription-card,
  .patient-denture-panel,
  .patient-material-usage-panel,
  .patient-material-usage-table-wrap,
  .patient-relative-table-wrap,
  .family-relation-card,
  .family-relation-empty
) {
  color: #172033 !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border-color: #dbe5ee !important;
  text-shadow: none !important;
  box-shadow: 0 8px 24px rgba(30, 64, 90, .08) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html[data-app-theme="light"] body #patientDetail.view.active :where(
  .patient-detail-page > section,
  .patient-detail-page > article,
  .patient-detail-page > header,
  .patient-record-page > section,
  .patient-record-page > article,
  .patient-charge-panel > section,
  .patient-charge-panel > article,
  .patient-followup-page > section,
  .patient-treatment-plan-page > section,
  .patient-image-page > section,
  .patient-material-page > section
) {
  background-color: #ffffff !important;
  background-image: none !important;
  color: #172033 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active :where(h1,h2,h3,h4,strong,b,dt,dd,th) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  text-shadow: none !important;
}
html[data-app-theme="light"] body #patientDetail.view.active :where(p,label,span,small,td) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  text-shadow: none !important;
}

/* 素曜白：沟通视频上传弹窗。 */
html[data-app-theme="light"] body .communication-video-upload-modal {
  padding: 24px !important;
  background: rgba(35, 55, 78, .34) !important;
  backdrop-filter: blur(10px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(108%) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal > section {
  width: min(680px, calc(100vw - 32px)) !important;
  overflow: hidden !important;
  border: 1px solid #d7e3ee !important;
  border-radius: 20px !important;
  color: #17243a !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 28px 72px rgba(38, 68, 98, .22), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header {
  min-height: 92px !important;
  box-sizing: border-box !important;
  padding: 22px 24px 20px !important;
  border-bottom: 1px solid #dde7f0 !important;
  color: #17243a !important;
  background: linear-gradient(135deg, #fff 0%, #f4f9ff 62%, #edf6ff 100%) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header span {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header h2 {
  margin: 5px 0 4px !important;
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  font-size: 22px !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header p {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header > button {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  border: 1px solid #d6e2ed !important;
  border-radius: 11px !important;
  color: #52677d !important;
  background: #fff !important;
  font-size: 23px !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal header > button:hover {
  color: #1d4f91 !important;
  border-color: #a9c5e8 !important;
  background: #f3f8ff !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal form {
  gap: 18px !important;
  padding: 24px !important;
  color: #17243a !important;
  background: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal label,
html[data-app-theme="light"] body .communication-video-upload-modal label > span {
  color: #33475d !important;
  -webkit-text-fill-color: #33475d !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal :is(input, select, .system-card-select-trigger) {
  min-height: 46px !important;
  border: 1px solid #cfddea !important;
  border-radius: 11px !important;
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(40, 67, 96, .035) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal :is(input, select, .system-card-select-trigger):focus,
html[data-app-theme="light"] body .communication-video-upload-modal .system-card-select.open .system-card-select-trigger {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal input::placeholder {
  color: #8a9aab !important;
  -webkit-text-fill-color: #8a9aab !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal .system-card-select-menu {
  border-color: #d2dfeb !important;
  color: #26394e !important;
  background: #fff !important;
  box-shadow: 0 18px 42px rgba(42, 73, 105, .16) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal .communication-video-file-field {
  gap: 9px !important;
  padding: 18px !important;
  border: 1px dashed #9cbce1 !important;
  border-radius: 14px !important;
  color: #33475d !important;
  background: #f6faff !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal .communication-video-file-field input[type="file"] {
  padding: 7px !important;
  border-style: solid !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal input[type="file"]::file-selector-button {
  height: 32px !important;
  margin-right: 12px !important;
  border: 1px solid #b9cde3 !important;
  border-radius: 8px !important;
  padding: 0 12px !important;
  color: #24558d !important;
  background: #edf5ff !important;
  font-weight: 750 !important;
  cursor: pointer !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal .communication-video-file-field small {
  color: #708196 !important;
  -webkit-text-fill-color: #708196 !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal footer {
  gap: 10px !important;
  padding-top: 2px !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal footer button {
  min-width: 92px !important;
  min-height: 42px !important;
  border: 1px solid #cad8e5 !important;
  border-radius: 10px !important;
  color: #40566c !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal footer button[type="submit"] {
  color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body .communication-video-upload-modal footer button:active {
  transform: translateY(1px) !important;
}

/* 素曜白：收费组合管理的新增入口必须始终清晰可见。 */
html[data-app-theme="light"] body #system [data-settings-panel="charge-combos"] #systemAddCombo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 112px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #2563eb !important;
  background-image: none !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2) !important;
  font-weight: 800 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="charge-combos"] #systemAddCombo:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="charge-combos"] #systemAddCombo:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2) !important;
  outline-offset: 2px !important;
}

/* 素曜白：新增患者弹窗恢复蓝白表单层级，覆盖旧深色皮肤保护规则。 */
html[data-app-theme="light"] body #patientModal.patient-modal {
  padding: 22px !important;
  background: rgba(42, 63, 88, .32) !important;
  backdrop-filter: blur(12px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(108%) !important;
}
html[data-app-theme="light"] body #patientModal.patient-modal .patient-modal-card {
  width: min(1180px, calc(100vw - 44px)) !important;
  max-height: calc(100dvh - 44px) !important;
  border: 1px solid #d5e2ee !important;
  border-radius: 20px !important;
  color: #17243a !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 28px 72px rgba(40, 68, 98, .24), inset 0 1px #fff !important;
  scrollbar-color: #a9bfd4 transparent !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-card .modal-head {
  min-height: 68px !important;
  padding: 0 24px !important;
  border-bottom: 1px solid #dce7f0 !important;
  background: linear-gradient(135deg, #fff, #f1f7fd) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-card .modal-head h2 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  font-size: 22px !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-card .icon-btn {
  width: 40px !important;
  height: 40px !important;
  border: 1px solid #d1dfeb !important;
  border-radius: 11px !important;
  color: #50677e !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form {
  padding: 20px 24px 0 !important;
  color: #26364d !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body #patientModal .patient-form-section {
  margin: 0 0 14px !important;
  padding: 18px 20px !important;
  border: 1px solid #d9e5ef !important;
  border-radius: 15px !important;
  color: #26364d !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f7fbff) !important;
  box-shadow: 0 8px 22px rgba(49, 82, 113, .07), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #patientModal .patient-form-section h3 {
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #e3ebf2 !important;
  color: #1d3048 !important;
  -webkit-text-fill-color: #1d3048 !important;
}
html[data-app-theme="light"] body #patientModal :is(
  .patient-form-row > label,
  .patient-form-row > span,
  .patient-sex-field > span,
  .patient-sex-field label,
  .birth-line .unknown-birth,
  .age-line span
) {
  color: #52657b !important;
  -webkit-text-fill-color: #52657b !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientModal .patient-form-row > label.required::before {
  color: #dc3545 !important;
  -webkit-text-fill-color: #dc3545 !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form :is(
  input:not([type="radio"]):not([type="checkbox"]),
  select,
  textarea,
  .patient-card-select-trigger
) {
  min-height: 40px !important;
  border: 1px solid #cddbe8 !important;
  border-radius: 10px !important;
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(40, 67, 96, .035) !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form :is(input, textarea)::placeholder {
  color: #8798aa !important;
  -webkit-text-fill-color: #8798aa !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form :is(input, textarea, select):focus,
html[data-app-theme="light"] body #patientModal .patient-card-select-trigger:is(:hover, [aria-expanded="true"]) {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form input[readonly] {
  color: #445a70 !important;
  -webkit-text-fill-color: #445a70 !important;
  background: #f3f7fb !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form :is(input[type="radio"], input[type="checkbox"]) {
  accent-color: #2563eb !important;
}
html[data-app-theme="light"] body #patientModal .patient-type-switch {
  border: 1px solid #cddbe8 !important;
  border-radius: 10px !important;
  background: #f5f8fb !important;
}
html[data-app-theme="light"] body #patientModal .patient-type-switch label {
  color: #607289 !important;
  -webkit-text-fill-color: #607289 !important;
}
html[data-app-theme="light"] body #patientModal .patient-type-switch label:has(input:checked) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #eaf3ff !important;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .28) !important;
}
html[data-app-theme="light"] body #patientModal :is(.record-generate-line button, .relation-input button, .source-search button) {
  border: 1px solid #cddbe8 !important;
  border-radius: 10px !important;
  color: #24558d !important;
  -webkit-text-fill-color: #24558d !important;
  background: #f5f9ff !important;
}
html[data-app-theme="light"] body #patientModal .patient-registration-form select:disabled,
html[data-app-theme="light"] body #patientModal .patient-card-select.is-disabled .patient-card-select-trigger {
  color: #8999aa !important;
  -webkit-text-fill-color: #8999aa !important;
  background: #edf2f6 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientModal .patient-card-select-trigger i {
  color: #2563eb !important;
}
html[data-app-theme="light"] body #patientModal .patient-card-select-menu {
  border-color: #d2dfeb !important;
  background: #fff !important;
  box-shadow: 0 16px 38px rgba(42, 73, 105, .16) !important;
}
html[data-app-theme="light"] body #patientModal .patient-card-select-menu button {
  color: #40566d !important;
  -webkit-text-fill-color: #40566d !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #patientModal .patient-card-select-menu button:is(:hover, :focus-visible, [aria-selected="true"]) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-actions {
  margin: 18px -24px 0 !important;
  padding: 14px 24px !important;
  border-top: 1px solid #dce7f0 !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-actions :is(.light-btn, .save-btn) {
  min-width: 112px !important;
  height: 42px !important;
  border: 1px solid #cbd9e6 !important;
  border-radius: 10px !important;
  color: #36516b !important;
  -webkit-text-fill-color: #36516b !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-actions .save-btn {
  border-color: #2563eb !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #2563eb !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #patientModal .patient-modal-actions .save-btn:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}

@media (max-width: 900px) {
  html[data-app-theme="light"] body #patientModal.patient-modal { padding: 0 !important; }
  html[data-app-theme="light"] body #patientModal.patient-modal .patient-modal-card {
    width: 100vw !important;
    max-height: 100dvh !important;
    border: 0 !important;
    border-radius: 0 !important;
  }
}

/* 曜夜黑：工作台筛选按钮与预约列表保持黑底白字。 */
html[data-app-theme="night"] body #dashboard .visit-tools :is(
  #dashboardTodayMark,
  .visit-first-summary,
  .visit-today-summary,
  .board-setting
) {
  color: #f5f7f6 !important;
  -webkit-text-fill-color: #f5f7f6 !important;
  border-color: rgba(244, 248, 246, .2) !important;
  background: rgba(255, 255, 255, .045) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #dashboard .visit-tools :is(
  #dashboardTodayMark,
  .visit-first-summary,
  .visit-today-summary
):is(.active, :hover, :focus-visible) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #denture .denture-ledger-toolbar > [data-add-denture] {
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #denture .denture-ledger-toolbar > [data-add-denture]:hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="night"] body #dashboard .visit-tools :is(
  .visit-first-summary,
  .visit-today-summary
).active {
  border-color: #68e78e !important;
  box-shadow: inset 0 -2px #68e78e !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard {
  color: #f4f7f5 !important;
  border-color: rgba(244, 248, 246, .14) !important;
  background: #080b0c !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .045) !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table {
  color: #f4f7f5 !important;
  background: transparent !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table thead th {
  color: rgba(244, 248, 246, .68) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .68) !important;
  border-bottom-color: rgba(244, 248, 246, .12) !important;
  background: #0b0e0f !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody td,
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr:nth-child(odd) td,
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr:nth-child(even) td,
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr.completed-appointment-row td {
  height: 62.9px !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background: #0d1011 !important;
  background-image: linear-gradient(105deg, rgba(255, 255, 255, .025), transparent 45%) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody td:first-child {
  color: rgba(244, 248, 246, .78) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .78) !important;
  border-left-color: rgba(104, 231, 142, .72) !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr:hover td {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(244, 248, 246, .2) !important;
  background: #15191a !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(104, 231, 142, .3) !important;
  background: rgba(104, 231, 142, .1) !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard :is(
  .patient-name-link,
  .dashboard-visit-start,
  .dashboard-visit-range,
  td strong,
  td b,
  td span
) {
  color: #f5f7f6 !important;
  -webkit-text-fill-color: #f5f7f6 !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard :is(
  .dashboard-visit-duration,
  td small
) {
  color: rgba(244, 248, 246, .64) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .64) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table :is(.table-plus, button.table-plus) {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  border-color: rgba(244, 248, 246, .18) !important;
  background: rgba(255, 255, 255, .055) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .055) !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table :is(.table-plus, button.table-plus):hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(104, 231, 142, .45) !important;
  background: rgba(104, 231, 142, .1) !important;
}

/* 曜夜黑：姓名与性别标识覆盖后置的浅色预约表规则。 */
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-name-link,
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr.completed-appointment-row td.patient-cell .patient-name-link,
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td.patient-cell .patient-name-link {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: transparent !important;
  background: transparent !important;
  text-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-name-link:is(:hover, :focus-visible) {
  color: #8fbcff !important;
  -webkit-text-fill-color: #8fbcff !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-avatar-icon {
  display: inline-grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border: 1px solid rgba(104, 167, 255, .4) !important;
  border-radius: 10px !important;
  color: #6aa7ff !important;
  background: #111820 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .055) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-avatar-icon::before {
  display: block !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #6aa7ff !important;
  -webkit-text-fill-color: #6aa7ff !important;
  background: transparent !important;
  content: "♂" !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  opacity: 1 !important;
  transform: none !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-avatar-icon.female {
  border-color: rgba(255, 126, 182, .42) !important;
  background: #1b1219 !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-avatar-icon.female::before {
  color: #ff7eb6 !important;
  -webkit-text-fill-color: #ff7eb6 !important;
  content: "♀" !important;
}
html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr td.patient-cell .patient-avatar-icon::after {
  display: none !important;
  content: none !important;
}

/* 素曜白：医生绩效的日期筛选与自定义条件显示明确输入边界。 */
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceDateRangeTrigger,
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceConditionCard > .performance-select-trigger,
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceValueTrigger {
  box-sizing: border-box !important;
  border: 1px solid #c7d6e5 !important;
  border-radius: 10px !important;
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f7fbff) !important;
  box-shadow: inset 0 1px 2px rgba(38, 67, 96, .04) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceDateRangeTrigger:is(:hover, :focus-visible, [aria-expanded="true"]),
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceConditionCard > .performance-select-trigger:is(:hover, :focus-visible, [aria-expanded="true"]),
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceValueTrigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceDateRangeTrigger :is(span, i),
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceConditionCard > .performance-select-trigger :is(span, i),
html[data-app-theme="light"] body #billing:not(.expense-only) #performanceValueTrigger :is(span, i) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
}

/* 素曜白：工资核算筛选控件加强边框层级。 */
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(
  .finance-range-trigger,
  .wage-month-trigger,
  .finance-time-mode,
  #wagePost,
  #wageName,
  #wageStatus
) {
  box-sizing: border-box !important;
  min-height: 42px !important;
  border: 1px solid #b8cada !important;
  border-radius: 10px !important;
  color: #263a50 !important;
  -webkit-text-fill-color: #263a50 !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f6faff) !important;
  box-shadow: inset 0 1px 2px rgba(37, 64, 92, .05) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(
  .finance-range-trigger,
  .wage-month-trigger,
  .finance-time-mode,
  #wagePost,
  #wageName,
  #wageStatus
):is(:hover, :focus, :focus-visible, [aria-expanded="true"]) {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .13) !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(
  .finance-range-trigger,
  .wage-month-trigger
) :is(span, b, i) {
  color: #263a50 !important;
  -webkit-text-fill-color: #263a50 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid #wageName::placeholder {
  color: #7c8fa3 !important;
  -webkit-text-fill-color: #7c8fa3 !important;
  opacity: 1 !important;
}

/* 素曜白：今日备忘录、指派任务与历史任务共用统一浮层。 */
html[data-app-theme="light"] body #dashboardTaskCenter.dashboard-task-center {
  background: rgba(42, 58, 78, .34) !important;
  backdrop-filter: blur(12px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(108%) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-card {
  color: #17243a !important;
  border: 1px solid #d3e0eb !important;
  background: #f7faff !important;
  background-image: none !important;
  box-shadow: 0 28px 74px rgba(35, 61, 88, .24), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-head {
  color: #17243a !important;
  border-bottom: 1px solid #dce7f0 !important;
  background: linear-gradient(115deg, #edf6ff, #fff 62%) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-head > div > span {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-head :is(h2, p) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-head p {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-center-head > button {
  color: #52677d !important;
  -webkit-text-fill-color: #52677d !important;
  border: 1px solid #d3e0eb !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-toolbar {
  color: #526174 !important;
  border-bottom: 1px solid #dce7f0 !important;
  background: #f6f9fc !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-toolbar > span {
  color: #718096 !important;
  -webkit-text-fill-color: #718096 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(
  .dashboard-task-composer,
  .dashboard-task-section,
  .dashboard-task-history-section,
  .dashboard-task-date-group,
  .dashboard-task-empty,
  .dashboard-task-archive
) {
  color: #26364d !important;
  border-color: #dbe6ef !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f7fbff) !important;
  box-shadow: 0 8px 22px rgba(48, 79, 108, .06) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-composer {
  border: 1px solid #cfdfea !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(
  h2, h3, h4, label, legend, strong, b,
  .dashboard-task-section-title,
  .dashboard-task-archive summary
) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(
  p, small, .muted, .dashboard-task-meta
) {
  color: #66778b !important;
  -webkit-text-fill-color: #66778b !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-item,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-item.completed,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-item.assigned {
  color: #26364d !important;
  border: 1px solid #d9e5ef !important;
  background: #fff !important;
  background-image: linear-gradient(145deg, #fff, #f7fbff) !important;
  box-shadow: 0 7px 18px rgba(48, 79, 108, .06) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-item.refund-approval {
  color: #26364d !important;
  border: 1px solid #edc8bf !important;
  background: #fff8f6 !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-recipients {
  color: #26364d !important;
  border-color: #dbe6ef !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-recipients label span {
  color: #26364d !important;
  border-color: #d6e2ed !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-composer :is(input, textarea, select),
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-deadline-trigger {
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  border: 1px solid #c8d8e6 !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(38, 67, 96, .04) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-composer :is(input, textarea)::placeholder {
  color: #8798aa !important;
  -webkit-text-fill-color: #8798aa !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-composer :is(input, textarea, select):focus,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-deadline-trigger:is(:hover, :focus-visible, [aria-expanded="true"]) {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-datetime-popover {
  color: #26364d !important;
  border: 1px solid #d2dfeb !important;
  background: #fff !important;
  box-shadow: 0 20px 48px rgba(42, 73, 105, .18) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(button, .light-btn) {
  color: #40566c !important;
  -webkit-text-fill-color: #40566c !important;
  border: 1px solid #cad8e5 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(button, .light-btn):hover:not(:disabled) {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #91b6eb !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(.primary-btn, button[type="submit"]) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter :is(.primary-btn, button[type="submit"]):hover:not(:disabled) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter button:disabled {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
  border-color: #dde5ec !important;
  background: #f1f4f7 !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

/* 素曜白：任务完成时间选择器跟随系统主题。 */
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-pane,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-time-slots,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-datetime-footer {
  color: #26364d !important;
  border-color: #dbe5ee !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-pane > header strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-week {
  color: #64748b !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-days button,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-time-slots button {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border-color: #d6e2ed !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-days button:hover,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-time-slots button:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #91b6eb !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-days button.today:not(.selected) {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  border-color: #93b4f8 !important;
  background: #f5f8ff !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-calendar-days button.selected,
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-time-slots button.selected {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-datetime-footer p {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #dashboardTaskCenter .dashboard-task-datetime-footer p strong {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
}

/* 素曜白：患者收费记录使用蓝灰交互色，避免沿用曜夜黑的绿色强调。 */
html[data-app-theme="light"] body #patientDetail .patient-charge-tabs {
  gap: 8px !important;
}
html[data-app-theme="light"] body #patientDetail .patient-charge-tabs button {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #cbd8e6 !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #patientDetail .patient-charge-tabs button:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #93b4e8 !important;
  background: #f3f7ff !important;
}
html[data-app-theme="light"] body #patientDetail .patient-charge-tabs button.active {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #7da7eb !important;
  background: #edf5ff !important;
  box-shadow: inset 0 -2px #3b82f6 !important;
}
html[data-app-theme="light"] body #patientDetail .patient-charge-checks input[type="checkbox"] {
  accent-color: #2563eb !important;
}
html[data-app-theme="light"] body #patientDetail .patient-ledger-actions :is(
  .icon-detail-btn,
  .patient-print-bill,
  .patient-delete-bill
) {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid #cbd8e6 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #patientDetail .patient-ledger-actions :is(
  .icon-detail-btn,
  .patient-print-bill,
  .patient-delete-bill
):hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #93b4e8 !important;
  background: #edf5ff !important;
}

/* 素曜白：处方入口与新建处方工作区。 */
html[data-app-theme="light"] body #patientDetail .prescription-entry-card {
  color: #26364d !important;
  border: 1px solid #bfd0e0 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 7px 18px rgba(48, 79, 108, .08) !important;
}
html[data-app-theme="light"] body #patientDetail .prescription-entry-card:hover {
  border-color: #79a9e8 !important;
  background: #f4f8ff !important;
  box-shadow: 0 10px 24px rgba(59, 130, 246, .12) !important;
}
html[data-app-theme="light"] body #patientDetail .prescription-entry-card .prescription-entry-icon {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid #cfe0f2 !important;
  background: #eaf4ff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #patientDetail .prescription-entry-card-primary .prescription-entry-icon {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
}
html[data-app-theme="light"] body .prescription-modal {
  padding: 24px !important;
  background: rgba(42, 58, 78, .34) !important;
  backdrop-filter: blur(10px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(108%) !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card {
  color: #172033 !important;
  border: 1px solid #cbd9e6 !important;
  border-radius: 18px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 28px 72px rgba(35, 55, 78, .24) !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card > header {
  min-height: 60px !important;
  padding: 0 18px !important;
  color: #172033 !important;
  border-bottom: 1px solid #d9e4ee !important;
  background: linear-gradient(110deg, #edf5ff 0%, #fff 58%, #eef7ff 100%) !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card > header h2 {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card .icon-btn {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border: 1px solid #cbd8e6 !important;
  border-radius: 10px !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-form-grid {
  padding: 16px 18px 12px !important;
  color: #526174 !important;
  background: #f8fbff !important;
}
html[data-app-theme="light"] body .prescription-modal :is(.prescription-form-grid label, .prescription-note-line, .prescription-form-grid label > span) {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
}
html[data-app-theme="light"] body .prescription-modal :is(
  .prescription-form-grid input,
  .prescription-form-grid select,
  .prescription-note-line input,
  .prescription-drug-table input,
  .prescription-diagnosis-glass
) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border: 1px solid #c8d8e6 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 1px 2px rgba(38, 67, 96, .04) !important;
}
html[data-app-theme="light"] body .prescription-modal :is(input, select, .prescription-diagnosis-glass):focus {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-drug-table-wrap {
  color: #26364d !important;
  border-color: #d7e3ed !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-drug-table {
  color: #475569 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-drug-table th {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #d7e3ed !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-drug-table td {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #e2e8f0 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-add-row {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border: 1px solid #bfd2ea !important;
  border-radius: 8px !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-table-total {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-note-line {
  padding: 12px 18px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card > footer {
  min-height: 72px !important;
  padding: 0 18px !important;
  border-top: 1px solid #d9e4ee !important;
  background: #f8fbff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card > footer .light-btn {
  color: #40566c !important;
  -webkit-text-fill-color: #40566c !important;
  border: 1px solid #c7d6e4 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .prescription-modal .prescription-modal-card > footer .primary-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  background: #2563eb !important;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .18) !important;
}

/* 素曜白：影像分类使用深色文字。 */
html[data-app-theme="light"] body #patientDetail .patient-image-category-tabs button,
html[data-app-theme="light"] body #patientDetail .patient-image-category-tabs button:hover,
html[data-app-theme="light"] body #patientDetail .patient-image-category-tabs button.active {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
}

/* 素曜白：影像工具栏操作必须保持可见，避免全局玻璃按钮规则冲淡文字与底色。 */
html[data-app-theme="light"] body #patientDetail .patient-image-toolbar .primary-btn {
  opacity: 1 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  background-color: #2563eb !important;
  background-image: none !important;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body #patientDetail .patient-image-toolbar .camera-capture-btn {
  border-color: #078ca3 !important;
  background-color: #078ca3 !important;
  box-shadow: 0 7px 16px rgba(7, 140, 163, .18) !important;
}
html[data-app-theme="light"] body #patientDetail .patient-image-toolbar .light-btn {
  opacity: 1 !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #c8d6e3 !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #patientDetail .patient-image-toolbar button:disabled {
  opacity: .58 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border-color: #d5dee7 !important;
  background-color: #eef2f6 !important;
  box-shadow: none !important;
}

/* 素曜白：病历打印按钮和牙位图使用黑色，避免深色皮肤规则导致内容在白色背景上不可见。 */
html[data-app-theme="light"] body #patientDetail :is(
  .patient-record-head-actions .patient-record-link-btn,
  .patient-record-foot-actions .light-btn,
  .patient-record-side-actions .light-btn
) {
  opacity: 1 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  border-color: #111 !important;
  background-color: #fff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #patientDetail :is(
  .patient-record-head-actions .patient-record-link-btn,
  .patient-record-foot-actions .light-btn,
  .patient-record-side-actions .light-btn
):hover {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  border-color: #000 !important;
  background-color: #f1f5f9 !important;
}
html[data-app-theme="light"] body #patientDetail .patient-record-head-actions .patient-record-link-btn:disabled {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #94a3b8 !important;
  background-color: #f1f5f9 !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #patientDetail .patient-record-section-tooth .patient-treatment-tooth-map {
  color: #111 !important;
  border: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #patientDetail .patient-record-section-tooth .patient-treatment-tooth-map .tooth-line {
  background: #111 !important;
}
html[data-app-theme="light"] body #patientDetail .patient-record-section-tooth .patient-treatment-tooth-map .invoice-tooth-quadrant {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

/* 素曜白：收费项目分类按钮沿用左侧边栏的胶囊样式。 */
html[data-app-theme="light"] body #system .system-charge-category-buttons {
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #system .system-charge-category-buttons button {
  min-height: 46px !important;
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #c7d9f7 !important;
  border-radius: 999px !important;
  background: #f1f6fd !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #system .system-charge-category-buttons button:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #8db5f4 !important;
  background: #eaf2ff !important;
}
html[data-app-theme="light"] body #system .system-charge-category-buttons button.active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background: #3b82f6 !important;
  box-shadow: 0 7px 16px rgba(59, 130, 246, .18) !important;
}

/* 素曜白：待写病历与待随访浮层 */
html[data-app-theme="light"] body .pending-record-modal {
  background: rgba(42, 58, 78, .34) !important;
  backdrop-filter: blur(12px) saturate(108%) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog {
  color: #17243a !important;
  border: 1px solid #d3e0eb !important;
  background: #f7faff !important;
  background-image: none !important;
  box-shadow: 0 28px 74px rgba(35, 55, 78, .24) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header {
  border-bottom: 1px solid #d9e5ef !important;
  background: linear-gradient(110deg, #f0f7ff 0%, #fff 58%, #edf7ff 100%) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header span {
  color: #52749a !important;
  -webkit-text-fill-color: #52749a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header h2 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header p {
  color: #62758a !important;
  -webkit-text-fill-color: #62758a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header button {
  color: #40566c !important;
  -webkit-text-fill-color: #40566c !important;
  border: 1px solid #ccd9e5 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(40, 69, 98, .07) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-content {
  color: #25374b !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table-wrap {
  border: 1px solid #d3e0eb !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(42, 73, 105, .06) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table {
  color: #26384d !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table thead,
html[data-app-theme="light"] body .pending-record-modal .pending-record-table th {
  color: #50677e !important;
  -webkit-text-fill-color: #50677e !important;
  background: #edf4fa !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table td {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #e0e8ef !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table tbody tr:hover td {
  background: #f2f7fc !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-table small {
  color: #72859a !important;
  -webkit-text-fill-color: #72859a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty {
  color: #63778c !important;
  border: 1px solid #d5e2ed !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg, #fff 0%, #f2f8ff 100%) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty span {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  background: #eaf2ff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty strong {
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-empty p {
  color: #718398 !important;
  -webkit-text-fill-color: #718398 !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > footer {
  border-top: 1px solid #dbe5ee !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > footer .light-btn,
html[data-app-theme="light"] body .pending-record-modal .pending-record-dialog > header button {
  color: #40566c !important;
  -webkit-text-fill-color: #40566c !important;
  border-color: #cad8e5 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .pending-record-modal :is(.pending-record-write-btn, .pending-followup-complete-btn) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  background: #2563eb !important;
  background-image: none !important;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .18) !important;
}
html[data-app-theme="light"] body .pending-record-modal :is(.pending-record-write-btn, .pending-followup-complete-btn):hover:not(:disabled) {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
}

/* 素曜白：待写病历入口采用黑字描边按钮。 */
html[data-app-theme="light"] body .pending-record-modal .pending-record-write-btn[data-write-pending-record] {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border:1px solid #94a3b8 !important;
  background:#fff !important;
  background-image:none !important;
  box-shadow:0 1px 3px rgba(32,62,98,.07) !important;
}
html[data-app-theme="light"] body .pending-record-modal .pending-record-write-btn[data-write-pending-record]:hover:not(:disabled) {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#64748b !important;
  background:#f8fafc !important;
}

/* 素曜白：待开发票信息 */
html[data-app-theme="light"] body #pendingInvoices {
  color: #17243a !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card {
  color: #20344a !important;
  border: 1px solid var(--suyawb-card-line) !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card.active {
  border-color: rgba(74, 141, 247, .34) !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card > span {
  color: #54779e !important;
  -webkit-text-fill-color: #54779e !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card h2 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card p,
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card > strong {
  color: #65798e !important;
  -webkit-text-fill-color: #65798e !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-mode-card > strong b {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-kpis {
  gap: 12px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-kpis article {
  border: 1px solid #d7e3ed !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 8px 22px rgba(42, 73, 105, .06) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-kpis span {
  color: #61768b !important;
  -webkit-text-fill-color: #61768b !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-kpis small {
  color: #71859a !important;
  -webkit-text-fill-color: #71859a !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-kpis strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-panel {
  color: #25384d !important;
  border: 1px solid #d3e0eb !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(40, 70, 100, .08) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-panel > header {
  border-color: #dbe6ef !important;
  background: linear-gradient(110deg, #f5f9fd 0%, #fff 72%) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-panel h3 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-panel header p {
  color: #6b7f93 !important;
  -webkit-text-fill-color: #6b7f93 !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-filters :is(input, select) {
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  border: 1px solid #c7d7e5 !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(35, 61, 88, .04) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-filters input::placeholder {
  color: #8293a5 !important;
  -webkit-text-fill-color: #8293a5 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-trigger { color: #52677d !important; border-color: #c7d7e5 !important; background: #fff !important; box-shadow: inset 0 1px 2px rgba(35, 61, 88, .04) !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-trigger:hover { border-color: #80aee4 !important; background: #f8fbfe !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-trigger.active { color: #2563eb !important; border-color: rgba(37, 99, 235, .42) !important; background: #f4f8ff !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-total { color: #17243a !important; -webkit-text-fill-color: #17243a !important; border-color: #aebdca !important; background: #fff !important; box-shadow: none !important; opacity: 1 !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-popover { color: #20344a !important; border-color: #cedce8 !important; background: #fff !important; box-shadow: 0 18px 46px rgba(40, 70, 100, .18) !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-popover > header small,
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-fields label > span { color: #687d91 !important; -webkit-text-fill-color: #687d91 !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-popover > header button { color: #5c7186 !important; background: #f1f5f9 !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-fields input { color: #20344a !important; -webkit-text-fill-color: #20344a !important; color-scheme: light; border-color: #c7d7e5 !important; background: #fff !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-popover > footer button:not(.primary) { color: #52677d !important; border-color: #ccdbe7 !important; background: #f7fafc !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-range-popover > footer button.primary { color: #fff !important; -webkit-text-fill-color: #fff !important; border-color: #2563eb !important; background: #2563eb !important; }
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table-wrap {
  border-color: #dbe5ee !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table :is(th, td) {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #e1e9f0 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table th {
  color: #546b82 !important;
  -webkit-text-fill-color: #546b82 !important;
  background: #edf4fa !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table tbody tr,
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table tbody tr:nth-child(even) {
  color: #33485d !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-table tbody tr:hover td {
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  background: #f3f8fc !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-patient strong,
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-preview strong {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #pendingInvoices :is(.pending-invoice-patient small, .pending-invoice-review > small) {
  color: #6f8295 !important;
  -webkit-text-fill-color: #6f8295 !important;
}
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-pagination {
  color: #687d91 !important;
  border-color: #dbe5ee !important;
  background: #fbfdff !important;
}
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-pagination b { color: #20344a !important; }
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-pagination button {
  color: #33485d !important;
  border-color: #c7d7e5 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #pendingInvoices .issued-invoice-pagination button:hover:not(:disabled) {
  color: #2563eb !important;
  border-color: #80aee4 !important;
  background: #f4f8ff !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-preview {
  color: #2d4358 !important;
  -webkit-text-fill-color: #2d4358 !important;
  border: 1px solid #cbdce9 !important;
  background: #f8fbfe !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-preview:hover {
  border-color: #80aee4 !important;
  background: #eef6ff !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-upload {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border: 1px solid #94a3b8 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-upload:hover {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #475569 !important;
  background: #f8fafc !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-review-confirm {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border: 1px solid #94a3b8 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-review-confirm:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #2563eb !important;
  background: #2563eb !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-status-toggle {
  gap: 5px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-status-toggle button {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-status-toggle button.active {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #475569 !important;
  background: #eef2f7 !important;
  box-shadow: inset 0 0 0 1px rgba(71, 85, 105, .12) !important;
}
html[data-app-theme="light"] body #pendingInvoices .pending-invoice-status-toggle button:hover {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #475569 !important;
  background: #f8fafc !important;
}

/* 素曜白：工资结算岗位与状态自定义下拉框边界。 */
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(
  #wagePost.system-card-select-source,
  #wageName.system-card-select-source,
  #wageStatus.system-card-select-source
) {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(#wagePost, #wageName, #wageStatus) + .system-card-select {
  width: 100% !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(#wagePost, #wageName, #wageStatus) + .system-card-select > .system-card-select-trigger {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 42px !important;
  color: #263a50 !important;
  -webkit-text-fill-color: #263a50 !important;
  border: 1px solid #b8cada !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, #fff, #f6faff) !important;
  box-shadow: inset 0 1px 2px rgba(37, 64, 92, .05) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(#wagePost, #wageName, #wageStatus) + .system-card-select > .system-card-select-trigger:is(:hover, :focus-visible),
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(#wagePost, #wageName, #wageStatus) + .system-card-select.open > .system-card-select-trigger {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .13) !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid :is(#wagePost, #wageName, #wageStatus) + .system-card-select .system-card-select-menu {
  color: #263a50 !important;
  border: 1px solid #c7d6e3 !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(37, 64, 92, .16) !important;
}

/* 素曜白：工资核算方式是独立、清晰的有边框控件。 */
html[data-app-theme="light"] body #wageSettlement #wageTimeMode + .system-card-select > .system-card-select-trigger {
  color: #263a50 !important;
  -webkit-text-fill-color: #263a50 !important;
  border: 1px solid #b8cada !important;
  border-radius: 10px !important;
  background: linear-gradient(145deg, #fff, #f6faff) !important;
  box-shadow: inset 0 1px 2px rgba(37, 64, 92, .05) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #wageSettlement #wageTimeMode + .system-card-select > .system-card-select-trigger:is(:hover, :focus-visible),
html[data-app-theme="light"] body #wageSettlement #wageTimeMode + .system-card-select.open > .system-card-select-trigger {
  outline: 0 !important;
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .13) !important;
}

/* 素曜白：预约草稿使用中性灰，与已保存预约明确区分。 */
html[data-app-theme="light"] body #schedule #timeBoard .schedule-chip.drag-preview-chip {
  color: #526170 !important;
  -webkit-text-fill-color: #526170 !important;
  border: 1px dashed #aeb9c4 !important;
  background-color: #e7ebef !important;
  background-image: linear-gradient(145deg, #f1f3f5, #dde2e7) !important;
  box-shadow: 0 8px 18px rgba(71, 85, 105, .14), inset 0 1px rgba(255, 255, 255, .82) !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #schedule #timeBoard .schedule-chip.drag-preview-chip.is-dragging {
  border-color: #8794a2 !important;
  background-color: #d8dde2 !important;
  background-image: linear-gradient(145deg, #e5e8eb, #cfd5db) !important;
  box-shadow: 0 14px 30px rgba(71, 85, 105, .24) !important;
  opacity: .82 !important;
}

/* 素曜白：新建预约是看板右侧的主操作。 */
html[data-app-theme="light"] body #schedule .booking-toolbar .schedule-toolbar-new-appointment {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background-color: #3b82f6 !important;
  background-image: linear-gradient(135deg, #4b8df8, #2563eb) !important;
  box-shadow: 0 7px 16px rgba(37, 99, 235, .22) !important;
  font-weight: 800 !important;
}

html[data-app-theme="light"] body #schedule .booking-toolbar .schedule-toolbar-new-appointment:is(:hover, :focus-visible) {
  outline: 0 !important;
  border-color: #1d4ed8 !important;
  background-color: #2563eb !important;
  background-image: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  box-shadow: 0 9px 20px rgba(37, 99, 235, .28) !important;
}

/* 素曜白：移除工资筛选标签遗留的左侧强调线。 */
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid > label {
  border: 0 !important;
  border-inline: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid > label:not(.wage-time-filter) {
  padding-left: 0 !important;
  text-decoration: none !important;
}
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid > label::before,
html[data-app-theme="light"] body #wageSettlement .wage-filter-grid > label::after {
  display: none !important;
  content: none !important;
}

/* 素曜白：领用出库顶部操作文字保持深色。 */
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions :is(
  [data-inventory-new-record="outbound"],
  [data-open-outbound-export]
) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions :is(
  [data-inventory-new-record="outbound"],
  [data-open-outbound-export]
):is(:hover, :focus-visible, :active, :disabled) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  opacity: 1 !important;
}

/* 素曜白：人力成本与耗材采购使用同一套汇总和明细卡片。 */
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-overview-card {
  padding: 16px !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-card {
  min-height: 154px !important;
  color: #17243a !important;
  border: 1px solid #ccdbe8 !important;
  background: linear-gradient(135deg, #fff 0%, #f3f8fd 100%) !important;
  background-image: linear-gradient(135deg, #fff 0%, #f3f8fd 100%) !important;
  box-shadow: 0 10px 26px rgba(42, 73, 105, .08), inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-gradient,
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-orb {
  display: none !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-content :is(span, b, small) {
  opacity: 1 !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-content span {
  color: #536a82 !important;
  -webkit-text-fill-color: #536a82 !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-content b {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-content small {
  color: #65798e !important;
  -webkit-text-fill-color: #65798e !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details {
  overflow: hidden !important;
  border: 1px solid #d3e0eb !important;
  border-radius: 14px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 8px 22px rgba(42, 73, 105, .06) !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-title {
  min-height: 68px !important;
  box-sizing: border-box !important;
  border-color: #dbe6ef !important;
  background: linear-gradient(110deg, #f5f9fd 0%, #fff 72%) !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-title h3 {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-title p {
  color: #6b7f93 !important;
  -webkit-text-fill-color: #6b7f93 !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-title > span {
  color: #315f91 !important;
  -webkit-text-fill-color: #315f91 !important;
  background: #eaf3ff !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details table {
  color: #33485d !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details th {
  color: #536a82 !important;
  -webkit-text-fill-color: #536a82 !important;
  background: #edf4fa !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details td {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #e1e9f0 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details tfoot td {
  color: #20344a !important;
  -webkit-text-fill-color: #20344a !important;
  background: #edf5ff !important;
}

/* 素曜白：新建账单恢复明亮、清晰的收费工作区。 */
html[data-app-theme="light"] body #billCreate {
  --bill-cyan: #3b82f6 !important;
  --bill-cyan-dark: #2563eb !important;
  --bill-ink: #17243a !important;
  --bill-line: #cfdeea !important;
  color: #17243a !important;
  background: linear-gradient(135deg, #f7faff 0%, #f2f7fc 54%, #edf4fb 100%) !important;
}
html[data-app-theme="light"] body #billCreate :is(
  .charge-summary,
  .charge-actions,
  .charge-items-panel,
  .charge-cashier,
  .payment-history.active,
  .debt-confirm-card
) {
  color: #17243a !important;
  border: 1px solid #cfdeea !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: var(--suyawb-card-shadow) !important;
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
}
html[data-app-theme="light"] body #billCreate :is(.charge-summary h2, .charge-panel-title, .charge-project strong) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #billCreate :is(.summary-values span, .charge-project small, .payment-line label, .cashier-form label) {
  color: #60758a !important;
  -webkit-text-fill-color: #60758a !important;
}
html[data-app-theme="light"] body #billCreate :is(input, select, textarea, .system-card-select-trigger) {
  color: #263a50 !important;
  -webkit-text-fill-color: #263a50 !important;
  border: 1px solid #bfd0df !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(37,64,92,.05) !important;
}
html[data-app-theme="light"] body #billCreate :is(input, textarea)::placeholder {
  color: #8a9bad !important;
  -webkit-text-fill-color: #8a9bad !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #billCreate :is(.charge-project-list, .invoice-table-wrap, .charge-table-wrap) {
  color: #33485d !important;
  border-color: #d3e0ea !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #billCreate :is(.charge-project-list button, .charge-project) {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #e2eaf1 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #billCreate :is(.invoice-table, .charge-table) {
  color: #33485d !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #billCreate :is(.invoice-table, .charge-table) thead th {
  color: #52677c !important;
  -webkit-text-fill-color: #52677c !important;
  border-color: #dbe6ef !important;
  background: #edf4fa !important;
}
html[data-app-theme="light"] body #billCreate :is(.invoice-table, .charge-table) td {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #e3ebf2 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #billCreate :is(.invoice-total, .whole-discount-row, .payment-box, .cashier-form) {
  color: #52677c !important;
  border-color: #d3e0ea !important;
  background: #f8fbfe !important;
}
html[data-app-theme="light"] body #billCreate :is(.payment-result b, .invoice-total b, .whole-discount-row b) {
  color: #17243a !important;
  -webkit-text-fill-color: #17243a !important;
}
html[data-app-theme="light"] body #billCreate :is(.charge-tabs button, .charge-buttons button, .cashier-footer button, .table-action) {
  color: #33485d !important;
  -webkit-text-fill-color: #33485d !important;
  border-color: #c8d8e5 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #billCreate :is(.charge-buttons .primary-btn, .cashier-footer .primary-btn) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background: #3b82f6 !important;
}
html[data-app-theme="light"] body #billCreate .charge-category-tabs .neon-button {
  color: #315a82 !important;
  -webkit-text-fill-color: #315a82 !important;
  border-color: #c8d8e5 !important;
  background: #f7faff !important;
}
html[data-app-theme="light"] body #billCreate .charge-category-tabs .neon-button[aria-pressed="true"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background: #3b82f6 !important;
}

html[data-app-theme="light"] body #billCreate .charge-combo-category-tabs button {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  background: #3b82f6 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.24) !important;
}

html[data-app-theme="light"] body #billCreate .charge-combo-category-tabs button:hover,
html[data-app-theme="light"] body #billCreate .charge-combo-category-tabs button[aria-pressed="true"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #1d4ed8 !important;
  background: #2563eb !important;
}

/* 素曜白预约面板：统一为系统蓝交互，并保持悬停图标清晰可见。 */
html[data-app-theme="light"] body #schedule .schedule-date-trigger {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border: 1px solid #bfd3ea !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .05) !important;
}
html[data-app-theme="light"] body #schedule .schedule-date-trigger svg {
  color: #2563eb !important;
  fill: #2563eb !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-app-theme="light"] body #schedule .schedule-date-trigger:hover,
html[data-app-theme="light"] body #schedule .schedule-date-trigger[aria-expanded="true"] {
  color: #1e3a5f !important;
  -webkit-text-fill-color: #1e3a5f !important;
  border-color: #3b82f6 !important;
  background: #f8fbff !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .10) !important;
}
html[data-app-theme="light"] body #schedule .schedule-date-trigger:hover svg,
html[data-app-theme="light"] body #schedule .schedule-date-trigger[aria-expanded="true"] svg {
  color: #2563eb !important;
  fill: #2563eb !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html[data-app-theme="light"] body #schedule .mode-switch {
  border: 1px solid #bfd3ea !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #schedule .mode-switch button {
  color: #52657a !important;
  -webkit-text-fill-color: #52657a !important;
  border-color: #d8e4f0 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #schedule .mode-switch button.active {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #3b82f6 !important;
  background: #3b82f6 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22) !important;
}

html[data-app-theme="light"] body #schedule #scheduleThisWeekBtn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #3b82f6 !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .18) !important;
  font-weight: 800 !important;
}
html[data-app-theme="light"] body #schedule #scheduleThisWeekBtn:hover {
  border-color: #1d4ed8 !important;
  background: #2563eb !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .24) !important;
}
html[data-app-theme="light"] body #schedule #scheduleThisWeekBtn:active {
  transform: translateY(1px);
}
html[data-app-theme="light"] body #schedule .booking-toolbar .plain-arrow {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #schedule .booking-toolbar .plain-arrow:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: transparent !important;
  background: #eff6ff !important;
}

/* 素曜白家庭管理：恢复白底卡片层级，统一系统蓝交互。 */
html[data-app-theme="light"] body #patientsFamilyWorkspace {
  color: #172033 !important;
}
html[data-app-theme="light"] body #patientsFamilyWorkspace > header span {
  color: #2563eb !important;
  -webkit-text-fill-color: #2563eb !important;
}
html[data-app-theme="light"] body #patientsFamilyWorkspace > header h2 {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #patientsFamilyWorkspace > header p {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #patientsFamilyWorkspace #refreshPatientFamilies {
  min-height: 40px !important;
  padding: 0 18px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #3b82f6 !important;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .16) !important;
  font-weight: 800 !important;
}
html[data-app-theme="light"] body #patientsFamilyWorkspace #refreshPatientFamilies:hover {
  border-color: #1d4ed8 !important;
  background: #2563eb !important;
}
html[data-app-theme="light"] body #patientsFamilySummary article {
  position: relative;
  overflow: hidden;
  border: 1px solid #c8d8e5 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .08) !important;
}
html[data-app-theme="light"] body #patientsFamilySummary article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #3b82f6;
}
html[data-app-theme="light"] body #patientsFamilySummary article span {
  color: #52657a !important;
  -webkit-text-fill-color: #52657a !important;
  font-weight: 700 !important;
}
html[data-app-theme="light"] body #patientsFamilySummary article b {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #patientsFamilySummary article small {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #patientsFamilyList .patients-family-card {
  color: #172033 !important;
  border: 1px solid #c8d8e5 !important;
  background: #fff !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06) !important;
}
html[data-app-theme="light"] body #patientsFamilyList :is(.patients-family-empty, .patients-family-state) {
  border: 1px solid #c8d8e5 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05) !important;
  color: #64748b !important;
}
html[data-app-theme="light"] body #patientsFamilyList .patients-family-empty b {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #patientsFamilyList .patients-family-empty p,
html[data-app-theme="light"] body #patientsFamilyList .patients-family-state p {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #patientsFamilyList .patients-family-state span {
  border-color: #bfdbfe !important;
  border-top-color: #2563eb !important;
}

/* 最终覆盖：素曜白收费分类选中按钮保持蓝底白字。 */
html[data-app-theme="light"] body #system .system-charge-category-buttons button {
  font-size: 14.3px !important;
}
html[data-app-theme="light"] body #system .system-charge-category-buttons button.active,
html[data-app-theme="light"] body #system .system-charge-category-buttons button[aria-pressed="true"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="light"] body section#system.view nav#systemChargeProjectCategoryFilter > button.active[aria-pressed="true"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}

/* 素曜白：本市医保价格索引弹窗沿用设置页的蓝白控件语言。 */
html[data-app-theme="light"] body .local-medical-pricing-modal {
  background: rgba(30, 41, 59, 0.34) !important;
}
html[data-app-theme="light"] body .local-medical-pricing-card {
  color: #172033 !important;
  border-color: #c8d8e5 !important;
  background: #fff !important;
  box-shadow: 0 24px 70px rgba(37, 74, 114, 0.2) !important;
}
html[data-app-theme="light"] body .local-medical-pricing-card .modal-head {
  border-bottom-color: #dbe7f0 !important;
  background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%) !important;
}
html[data-app-theme="light"] body .local-medical-pricing-card .modal-head h2 {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body .local-medical-pricing-card .modal-head p,
html[data-app-theme="light"] body .local-medical-pricing-fields label {
  color: #52657a !important;
  -webkit-text-fill-color: #52657a !important;
}
html[data-app-theme="light"] body .local-medical-pricing-fields select {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  border-color: #bfd3e5 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body .local-medical-pricing-note {
  color: #42566d !important;
  -webkit-text-fill-color: #42566d !important;
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

/* 素曜白：统一全国各省地市医保数据状态浮层。 */
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal {
  background: rgba(30, 41, 59, .34) !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-card {
  color: #172033 !important;
  border-color: var(--suyawb-card-line) !important;
  background-color: #fff !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 24px 70px rgba(37, 74, 114, .20), inset 0 1px rgba(255, 255, 255, .9) !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .modal-head {
  border-bottom-color: #dbe7f0 !important;
  background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%) !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .modal-head h2,
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list span strong {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .modal-head p,
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-loading,
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list span small {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .icon-btn {
  color: #52657a !important;
  border-color: #c8d8e5 !important;
  background: #fff !important;
  box-shadow: 0 2px 7px rgba(37, 74, 114, .07) !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .icon-btn:hover {
  color: #1d4f91 !important;
  border-color: #9fc2e4 !important;
  background: #eef6ff !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list {
  border-color: #dbe7f0 !important;
  background: #fff !important;
  scrollbar-color: #b7c9d9 transparent;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list > button {
  color: #172033 !important;
  border-bottom-color: #e5edf4 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list > button:hover {
  border-bottom-color: #dbe7f0 !important;
  background: #f3f8fd !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list > button:focus-visible {
  outline-color: rgba(37, 99, 235, .72) !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list em.maintained {
  color: #08716c !important;
  -webkit-text-fill-color: #08716c !important;
  border-color: #a7ddd8 !important;
  background: #eaf8f6 !important;
}
html[data-app-theme="light"] body #medicalInsuranceCityStatusModal .medical-region-city-list em.pending {
  color: #9a5b08 !important;
  -webkit-text-fill-color: #9a5b08 !important;
  border-color: #f2d59e !important;
  background: #fff8e8 !important;
}

/* 素曜白：省市行政区划入口使用独立卡片边界。 */
html[data-app-theme="light"] body #system [data-settings-panel="medical-insurance-regions"] .medical-region-list > button {
  border: 1px solid #b9c9d8 !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .78) !important;
  box-shadow: 0 2px 7px rgba(37, 74, 114, .055), inset 0 1px rgba(255, 255, 255, .9) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="medical-insurance-regions"] .medical-region-list > button:hover {
  border-color: #7ea6cf !important;
  background: #f7fbff !important;
  box-shadow: 0 6px 16px rgba(37, 74, 114, .09) !important;
}
html[data-app-theme="light"] body #system [data-settings-panel="medical-insurance-regions"] .medical-region-list > button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18) !important;
  outline-offset: 2px !important;
}

/* 素曜白领用出库筛选：控件边界与日期图标在悬停状态下保持清晰。 */
html[data-app-theme="light"] body #inventory .outbound-filter-panel {
  border: 1px solid #d7e2ef !important;
  background: rgba(255, 255, 255, .82) !important;
  box-shadow: 0 8px 24px rgba(39, 73, 119, .06) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid select,
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger {
  border: 1px solid #bdccdc !important;
  border-radius: 10px !important;
  color: #344760 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(32, 62, 98, .05), inset 0 1px rgba(255, 255, 255, .85) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid select:hover,
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger:hover {
  border-color: #7fa4d5 !important;
  color: #243f65 !important;
  background-color: #f9fbff !important;
  background-image: none !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid select:focus,
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger:focus-visible,
html[data-app-theme="light"] body #inventory .outbound-filter-range-picker.open .outbound-filter-date-trigger {
  border-color: #3f7ce8 !important;
  outline: none !important;
  color: #243f65 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .13) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger svg,
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger:hover svg,
html[data-app-theme="light"] body #inventory .outbound-filter-date-trigger:focus-visible svg,
html[data-app-theme="light"] body #inventory .outbound-filter-range-picker.open .outbound-filter-date-trigger svg {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #078daa !important;
  fill: currentColor !important;
  filter: none !important;
  transform: none !important;
}

/* 出库筛选中的原生 select 会被系统卡片下拉替换，边框需作用于实际触发器。 */
html[data-app-theme="light"] body #inventory .outbound-filter-grid > label > .system-card-select > .system-card-select-trigger {
  width: 100% !important;
  min-height: 42px !important;
  border: 1px solid #bdccdc !important;
  border-radius: 10px !important;
  color: #344760 !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(32, 62, 98, .05), inset 0 1px rgba(255, 255, 255, .85) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid > label > .system-card-select > .system-card-select-trigger:hover {
  border-color: #7fa4d5 !important;
  color: #243f65 !important;
  background: #f9fbff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid > label > .system-card-select.open > .system-card-select-trigger,
html[data-app-theme="light"] body #inventory .outbound-filter-grid > label > .system-card-select > .system-card-select-trigger:focus-visible {
  border-color: #3f7ce8 !important;
  outline: none !important;
  color: #243f65 !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .13) !important;
}
html[data-app-theme="light"] body #inventory .outbound-filter-grid .system-card-select-chevron {
  color: #526a86 !important;
  opacity: 1 !important;
}

/* 素曜白领用记录分类：三个切换按钮保持独立边界，点击时不产生纵向位移。 */
html[data-app-theme="light"] body #inventory .outbound-record-tabs {
  gap: 12px !important;
}
html[data-app-theme="light"] body #inventory .outbound-record-tabs > button {
  border: 1px solid #bdccdc !important;
  border-radius: 12px !important;
  color: #263d53 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .05) !important;
  transform: none !important;
}
html[data-app-theme="light"] body #inventory .outbound-record-tabs > button:hover {
  border-color: #7fa4d5 !important;
  color: #244b86 !important;
  background: #f8fbff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
  transform: none !important;
}
html[data-app-theme="light"] body #inventory .outbound-record-tabs > button.active {
  border-color: #3f7ce8 !important;
  color: #245fcd !important;
  background: #f2f7ff !important;
  box-shadow: inset 0 -3px #3f7ce8, 0 6px 16px rgba(63, 124, 232, .10) !important;
  transform: none !important;
}
html[data-app-theme="light"] body #inventory .outbound-record-tabs > button:active,
html[data-app-theme="light"] body #inventory .outbound-record-tabs > button:focus-visible {
  transform: none !important;
}

/* 素曜白入库入口：三类新增入口与导出操作统一为有边界的深色文字按钮。 */
html[data-app-theme="light"] body #inventory .inbound-hero-create-actions > button,
html[data-app-theme="light"] body #inventory .inventory-hero-metric-actions > [data-open-inbound-export] {
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #inventory .inbound-hero-create-actions > button:hover,
html[data-app-theme="light"] body #inventory .inventory-hero-metric-actions > [data-open-inbound-export]:hover {
  border-color: #7299cc !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #f5f9ff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
  transform: none !important;
}

/* 素曜白三类入库浮层：普通耗材、高值耗材与药品共用统一表单语言。 */
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) {
  background: rgba(32, 45, 61, .36) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inbound-form-card {
  color: #17212f !important;
  border: 1px solid #cad7e5 !important;
  border-radius: 16px !important;
  background: #f8fafc !important;
  background-image: none !important;
  box-shadow: 0 24px 70px rgba(29, 45, 66, .24) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .modal-head {
  color: #17212f !important;
  border-bottom: 1px solid #dce5ee !important;
  background: #fff !important;
  background-image: linear-gradient(105deg, #fff, #f5f9ff) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .modal-head h2 {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .modal-head p {
  color: #68788d !important;
  -webkit-text-fill-color: #68788d !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .modal-head .icon-btn {
  color: #42566f !important;
  border: 1px solid #cbd7e4 !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inbound-form {
  color: #17212f !important;
  background: #f8fafc !important;
  scrollbar-color: #b8c8d9 transparent !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(label, .field-label, .supplier-upload-field) {
  color: #344760 !important;
  -webkit-text-fill-color: #344760 !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(input, select, textarea, .system-card-select-trigger) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  caret-color: #2563eb !important;
  border: 1px solid #bdccdc !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(32, 62, 98, .04) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(input, textarea)::placeholder {
  color: #8a98aa !important;
  -webkit-text-fill-color: #8a98aa !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(input, select, textarea, .system-card-select-trigger):focus,
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .system-card-select.open .system-card-select-trigger {
  border-color: #3f7ce8 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .12) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) option {
  color: #17212f !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inbound-supplier-combobox {
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inbound-supplier-combobox > input {
  border: 1px solid #bdccdc !important;
  border-radius: 10px !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(.inbound-supplier-options, .system-card-select-menu) {
  color: #17212f !important;
  border: 1px solid #ccd8e5 !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(29, 54, 75, .16) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-table-wrap {
  color: #17212f !important;
  border: 1px solid #ccd8e5 !important;
  background: #fff !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table {
  color: #17212f !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table thead th {
  color: #40536b !important;
  -webkit-text-fill-color: #40536b !important;
  border-color: #dce5ee !important;
  background: #edf3fa !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table tbody tr,
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table td {
  color: #17212f !important;
  border-color: #e1e8f0 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table tbody tr:hover,
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inventory-module-table tbody tr:hover td {
  background: #f6f9fd !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(.light-btn, .secondary-btn, .inbound-upload-excel) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  border: 1px solid #b9c9da !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .05) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(.light-btn, .secondary-btn, .inbound-upload-excel):hover {
  color: #17212f !important;
  border-color: #7299cc !important;
  background: #f3f7fd !important;
  transform: none !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .primary-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #3674e4 !important;
  background: #3674e4 !important;
  box-shadow: 0 5px 12px rgba(54, 116, 228, .18) !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(.supplier-upload-box, .supplier-upload-trigger) {
  color: #52667f !important;
  -webkit-text-fill-color: #52667f !important;
  border: 1px dashed #b9c9da !important;
  background: #f7faff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) :is(.supplier-upload-box, .supplier-upload-trigger):hover {
  color: #245fcd !important;
  border-color: #6f98cf !important;
  background: #eef5ff !important;
  transform: none !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .inbound-upload-preview {
  color: #68788d !important;
  border-color: #d9e3ed !important;
  background: #fff !important;
}
html[data-app-theme="light"] body :is(#inboundFormModal, #drugInboundFormModal) .supplier-form-actions {
  border-top: 1px solid #dce5ee !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* 素曜白入库记录分类：三个分类按钮使用独立可见边框。 */
html[data-app-theme="light"] body #inventory .inbound-record-switcher > .inbound-record-tabs {
  gap: 12px !important;
}
html[data-app-theme="light"] body #inventory .inbound-record-switcher > .inbound-record-tabs > button {
  border: 1px solid #bdccdc !important;
  border-radius: 12px !important;
  color: #263d53 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .05) !important;
}
html[data-app-theme="light"] body #inventory .inbound-record-switcher > .inbound-record-tabs > button:hover {
  border-color: #7fa4d5 !important;
  color: #244b86 !important;
  background: #f8fbff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
}
html[data-app-theme="light"] body #inventory .inbound-record-switcher > .inbound-record-tabs > button.active {
  border-color: #3f7ce8 !important;
  color: #245fcd !important;
  background: #f2f7ff !important;
  box-shadow: inset 0 -3px #3f7ce8, 0 6px 16px rgba(63, 124, 232, .10) !important;
}

/* 素曜白库存总览：三项汇总入口保持独立、清晰的卡片边界。 */
html[data-app-theme="light"] body #inventory .inventory-overview-tabs {
  gap: 12px !important;
}
html[data-app-theme="light"] body #inventory .inventory-overview-tabs > button {
  border: 1px solid #bdccdc !important;
  border-radius: 12px !important;
  color: #263d53 !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .05) !important;
  transform: none !important;
}
html[data-app-theme="light"] body #inventory .inventory-overview-tabs > button:hover {
  border-color: #7fa4d5 !important;
  color: #244b86 !important;
  background: #f8fbff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
}
html[data-app-theme="light"] body #inventory .inventory-overview-tabs > button.active {
  border-color: #3f7ce8 !important;
  color: #245fcd !important;
  background: #f2f7ff !important;
  box-shadow: inset 0 -3px #3f7ce8, 0 6px 16px rgba(63, 124, 232, .10) !important;
}

/* 素曜白供应商表单：与入库浮层统一的白色卡片、深色文字和蓝色交互。 */
html[data-app-theme="light"] body #supplierFormModal {
  background: rgba(32, 45, 61, .36) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-form-card {
  color: #17212f !important;
  border: 1px solid var(--suyawb-card-line) !important;
  border-radius: 18px !important;
  background-color: rgba(255,255,255,.97) !important;
  background-image: var(--suyawb-card-bg) !important;
  box-shadow: 0 24px 70px rgba(29, 45, 66, .24) !important;
}
html[data-app-theme="light"] body #supplierFormModal .modal-head {
  color: #17212f !important;
  border-bottom: 1px solid #dce5ee !important;
  background: linear-gradient(105deg, #fff, #f5f9ff) !important;
}
html[data-app-theme="light"] body #supplierFormModal .modal-head h2 {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
}
html[data-app-theme="light"] body #supplierFormModal .modal-head p {
  color: #68788d !important;
  -webkit-text-fill-color: #68788d !important;
}
html[data-app-theme="light"] body #supplierFormModal .modal-head .icon-btn {
  color: #42566f !important;
  border: 1px solid #cbd7e4 !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-form {
  color: #17212f !important;
  background: #f8fafc !important;
  scrollbar-color: #b8c8d9 transparent !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(label, .supplier-upload-field) {
  color: #344760 !important;
  -webkit-text-fill-color: #344760 !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(input, select, .system-card-select-trigger) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  caret-color: #2563eb !important;
  border: 1px solid #bdccdc !important;
  border-radius: 10px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 2px rgba(32, 62, 98, .04) !important;
}
html[data-app-theme="light"] body #supplierFormModal input::placeholder {
  color: #8a98aa !important;
  -webkit-text-fill-color: #8a98aa !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(input, select, .system-card-select-trigger):focus,
html[data-app-theme="light"] body #supplierFormModal .system-card-select.open .system-card-select-trigger {
  border-color: #3f7ce8 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .12) !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-contact-select {
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(.system-card-select-menu, option) {
  color: #17212f !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(.light-btn, .secondary-btn) {
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  border: 1px solid #b9c9da !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .05) !important;
}
html[data-app-theme="light"] body #supplierFormModal :is(.light-btn, .secondary-btn):hover {
  color: #17212f !important;
  border-color: #7299cc !important;
  background: #f3f7fd !important;
  transform: none !important;
}
html[data-app-theme="light"] body #supplierFormModal .primary-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid #3674e4 !important;
  background: #3674e4 !important;
  box-shadow: 0 5px 12px rgba(54, 116, 228, .18) !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-upload-box {
  color: #52667f !important;
  -webkit-text-fill-color: #52667f !important;
  border: 1px dashed #b9c9da !important;
  background: #f7faff !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-upload-box:hover {
  color: #245fcd !important;
  border-color: #6f98cf !important;
  background: #eef5ff !important;
  transform: none !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-upload-preview {
  color: #68788d !important;
  border-color: #d9e3ed !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #supplierFormModal .supplier-form-actions {
  border-top: 1px solid #dce5ee !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* 素曜白义齿页面顶部操作：导出与添加使用清晰的独立边框。 */
html[data-app-theme="light"] body #denture .denture-ledger-toolbar > button {
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  color: #17212f !important;
  -webkit-text-fill-color: #17212f !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #denture .denture-ledger-toolbar > button:hover {
  border-color: #7299cc !important;
  color: #17212f !important;
  background: #f5f9ff !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .08) !important;
  transform: none !important;
}

/* 素曜白义齿登记表：牙位图、单据图片与行操作统一使用黑色。 */
html[data-app-theme="light"] body #denture .denture-card-tooth-map {
  color: #111827 !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #denture .denture-card-tooth-map .tooth-line {
  background: #111827 !important;
}
html[data-app-theme="light"] body #denture .denture-card-tooth-map :is(.tooth-value, .invoice-tooth-quadrant) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}
html[data-app-theme="light"] body #denture :is(.denture-ledger-image-button, .denture-ledger-image-button small) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}
html[data-app-theme="light"] body #denture .denture-ledger-image-button {
  border-color: #cbd5e1 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #denture .denture-ledger-image-button:hover {
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}
html[data-app-theme="light"] body #denture .denture-ledger-actions :is(.light-btn, .light-btn.danger) {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #denture .denture-ledger-actions :is(.light-btn, .light-btn.danger):hover {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #94a3b8 !important;
  background: #f8fafc !important;
}

/* 素曜白预约侧栏：选择控件只保留一层可见边框。 */
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel select.appointment-card-native-select,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel select.appointment-card-native-select + .system-card-select {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-picker {
  min-height: 42px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-picker.open {
  overflow: visible !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-menu {
  max-height: 0 !important;
  overflow: hidden !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-picker.open > .appointment-card-select-menu {
  max-height: 270px !important;
  overflow: auto !important;
  margin-top: 8px !important;
  padding: 7px !important;
  border-width: 1px !important;
  border-color: rgba(91, 132, 184, .24) !important;
  background: #fff !important;
  background-image: linear-gradient(135deg, #fff, #f7fbff) !important;
  box-shadow: 0 18px 42px rgba(44, 69, 104, .18) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-trigger {
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  border: 1px solid #cbd9e7 !important;
  border-radius: 12px !important;
  outline: none !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-trigger:hover,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-trigger:focus-visible,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel .appointment-card-select-picker.open > .appointment-card-select-trigger {
  border-color: #6f98cf !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(63, 124, 232, .10) !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(.appointment-card-select-picker) {
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(.appointment-card-select-picker)::before,
html[data-app-theme="light"] body :is(#schedule, .today-work-appointment-overlay) .booking-form-panel label:has(.appointment-card-select-picker)::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 预约详情只保留修改与更多操作，双按钮等宽排列。 */
#schedule .schedule-popover-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
#schedule .schedule-popover-actions .more-action {
  grid-column: auto !important;
}

/* 素曜白添加诊断：清晰牙位图、单层诊断输入框、对齐的行操作。 */
html[data-app-theme="light"] body #prescriptionDiagnosisModal .prescription-diagnosis-body {
  align-items: center !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker {
  width: 260px !important;
  height: 64px !important;
  overflow: visible !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker .tooth-cross {
  display: block !important;
  width: 230px !important;
  height: 54px !important;
  color: #0f6f7a !important;
  background:
    linear-gradient(#168da0, #168da0) center / 230px 2px no-repeat,
    linear-gradient(#168da0, #168da0) center / 2px 54px no-repeat !important;
  opacity: 1 !important;
  visibility: visible !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker:hover,
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker:focus-within {
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker .tooth-display {
  color: #145f75 !important;
  -webkit-text-fill-color: #145f75 !important;
  background: rgba(255, 255, 255, .94) !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker > input,
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-open {
  border: 0 !important;
  border-radius: 10px !important;
  outline: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-tooth-picker > input[data-prescription-diagnosis-tooth] {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  caret-color: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-search-shell {
  align-self: center !important;
  min-height: 52px !important;
  overflow: visible !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-search-shell:focus-within {
  border-color: #4b8df8 !important;
  box-shadow: 0 0 0 3px rgba(75, 141, 248, .12) !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-search-input-row {
  min-height: 50px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal input[data-prescription-diagnosis-search] {
  height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal input[data-prescription-diagnosis-search]::placeholder {
  color: #7d8da2 !important;
  -webkit-text-fill-color: #7d8da2 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal :is(.diagnosis-plus, .diagnosis-minus) {
  align-self: center !important;
  display: grid !important;
  place-items: center !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 0 3px !important;
  color: #0f6f7a !important;
  -webkit-text-fill-color: #0f6f7a !important;
  border: 1px solid #b9c9da !important;
  border-radius: 10px !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: 0 1px 3px rgba(32, 62, 98, .06) !important;
  font-size: 30px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal :is(.diagnosis-plus, .diagnosis-minus):hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: #7299cc !important;
  background: #edf5ff !important;
}
html[data-app-theme="light"] body #prescriptionDiagnosisModal .diagnosis-suggestions {
  margin: 0 -1px -1px !important;
  overflow: auto !important;
  border: 1px solid #b9c9da !important;
  border-top-color: #d9e4ee !important;
  border-radius: 0 0 10px 10px !important;
  color: #26364d !important;
  background: #fff !important;
  box-shadow: 0 14px 30px rgba(44, 69, 104, .14) !important;
}

/* 预约卡片跨越多个时间行，点击时父单元不能建立裁切上下文。 */
#schedule .time-board .time-cell,
#schedule .time-board .time-cell:hover,
#schedule .time-board .time-cell:active,
#schedule .time-board .time-cell:focus,
#schedule .time-board .time-cell:focus-visible {
  overflow: visible !important;
  transform: none !important;
}
#schedule .time-board .time-cell:focus,
#schedule .time-board .time-cell:focus-visible {
  outline: none !important;
}
#schedule .time-board .schedule-chip,
#schedule .time-board .schedule-chip:active {
  transform: translateZ(0) scale(1) !important;
}

/* 耀夜黑影像中心：分类按钮在深色表面保持完整对比度。 */
html[data-app-theme="night"] body #patientDetail .patient-image-category-tabs {
  border-bottom: 1px solid rgba(226, 235, 231, .12) !important;
  background: #111716 !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .025) !important;
}
html[data-app-theme="night"] body #patientDetail .patient-image-category-tabs button {
  color: rgba(239, 245, 242, .72) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .72) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #patientDetail .patient-image-category-tabs button:hover,
html[data-app-theme="night"] body #patientDetail .patient-image-category-tabs button:focus-visible {
  color: #f5faf7 !important;
  -webkit-text-fill-color: #f5faf7 !important;
  border-color: rgba(101, 230, 164, .22) !important;
  background: rgba(101, 230, 164, .07) !important;
  outline: none !important;
}
html[data-app-theme="night"] body #patientDetail .patient-image-category-tabs button.active {
  color: #dffbed !important;
  -webkit-text-fill-color: #dffbed !important;
  border-color: rgba(101, 230, 164, .34) !important;
  background: rgba(101, 230, 164, .12) !important;
  box-shadow: inset 0 -2px #65e6a4 !important;
}

/* 耀夜黑患者新处方：使用真实组件类名覆盖白色基础表面。 */
html[data-app-theme="night"] body #patientDetail .prescription-panel {
  color: #f4f7f5 !important;
  border: 1px solid rgba(244, 248, 246, .14) !important;
  background: #0d1211 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-toolbar {
  border-bottom: 1px solid rgba(244, 248, 246, .11) !important;
  background: #111716 !important;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 58%) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-card {
  color: rgba(244, 248, 246, .86) !important;
  border: 1px solid rgba(244, 248, 246, .16) !important;
  background: rgba(255, 255, 255, .045) !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-card:hover,
html[data-app-theme="night"] body #patientDetail .prescription-entry-card:focus-visible {
  border-color: rgba(101, 230, 164, .34) !important;
  background: rgba(101, 230, 164, .08) !important;
  outline: none !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-copy strong {
  color: #f5faf7 !important;
  -webkit-text-fill-color: #f5faf7 !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-copy small {
  color: rgba(239, 245, 242, .55) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .55) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-icon {
  color: #dffbed !important;
  -webkit-text-fill-color: #dffbed !important;
  border: 1px solid rgba(101, 230, 164, .25) !important;
  background: rgba(101, 230, 164, .10) !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-entry-card-primary .prescription-entry-icon {
  color: #0b1511 !important;
  -webkit-text-fill-color: #0b1511 !important;
  border-color: #65e6a4 !important;
  background: #65e6a4 !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-table-wrap,
html[data-app-theme="night"] body #patientDetail .prescription-table,
html[data-app-theme="night"] body #patientDetail .prescription-table tbody,
html[data-app-theme="night"] body #patientDetail .prescription-table tr,
html[data-app-theme="night"] body #patientDetail .prescription-table td {
  color: rgba(244, 248, 246, .78) !important;
  border-color: rgba(244, 248, 246, .09) !important;
  background: #0d1211 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-table th {
  color: rgba(244, 248, 246, .66) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .66) !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background: #151b1a !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-table tbody tr:hover td {
  color: #f5faf7 !important;
  background: #151c1a !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-table tr.void td {
  color: rgba(244, 248, 246, .36) !important;
  background: #111514 !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-empty,
html[data-app-theme="night"] body #patientDetail .prescription-empty p {
  color: rgba(239, 245, 242, .56) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .56) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-empty-art .box {
  background: linear-gradient(145deg, #303837, #1a201f) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-empty-art .doctor {
  background: linear-gradient(#e7efeb 0 58%, #65e6d4 58%) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-empty-art::before,
html[data-app-theme="night"] body #patientDetail .prescription-empty-art::after {
  background: #27302e !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-pagination {
  color: rgba(239, 245, 242, .58) !important;
  border-top: 1px solid rgba(244, 248, 246, .11) !important;
  background: #111716 !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-pagination :is(span, button) {
  color: rgba(244, 248, 246, .72) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .72) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-pagination button {
  border: 1px solid rgba(244, 248, 246, .15) !important;
  background: rgba(255, 255, 255, .04) !important;
}
html[data-app-theme="night"] body #patientDetail .prescription-row-actions button {
  color: #bff7d9 !important;
  -webkit-text-fill-color: #bff7d9 !important;
  border-color: rgba(101, 230, 164, .24) !important;
  background: rgba(101, 230, 164, .07) !important;
}

/* 耀夜黑患者义齿信息：明细表与牙位图使用深色高对比度。 */
html[data-app-theme="night"] body #patientDetail .patient-denture-panel {
  color: #f4f7f5 !important;
  border-color: rgba(244, 248, 246, .14) !important;
  background: #0d1211 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #patientDetail .patient-denture-panel > header {
  color: #f4f7f5 !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background: #151b1a !important;
  background-image: linear-gradient(105deg, rgba(255, 255, 255, .035), transparent 66%) !important;
}
html[data-app-theme="night"] body #patientDetail .patient-denture-panel > header h2 {
  color: #f5faf7 !important;
  -webkit-text-fill-color: #f5faf7 !important;
}
html[data-app-theme="night"] body #patientDetail .patient-denture-panel > header span {
  color: rgba(239, 245, 242, .62) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .62) !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-table-wrap {
  border: 1px solid rgba(244, 248, 246, .14) !important;
  background: #0d1211 !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04) !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-table {
  color: rgba(244, 248, 246, .80) !important;
  background: #0d1211 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-table th {
  color: rgba(244, 248, 246, .68) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .68) !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background: #171d1c !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-table td {
  color: rgba(244, 248, 246, .78) !important;
  -webkit-text-fill-color: rgba(244, 248, 246, .78) !important;
  border-color: rgba(244, 248, 246, .08) !important;
  background: #0d1211 !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-table tbody tr:hover td {
  color: #f5faf7 !important;
  -webkit-text-fill-color: #f5faf7 !important;
  background: #151c1a !important;
}
html[data-app-theme="night"] body #patientDetail .denture-card-tooth-map {
  color: #dffbed !important;
  border: 1px solid rgba(101, 230, 164, .20) !important;
  border-radius: 9px !important;
  background: rgba(101, 230, 164, .035) !important;
}
html[data-app-theme="night"] body #patientDetail .denture-card-tooth-map .tooth-line {
  background: #65e6a4 !important;
}
html[data-app-theme="night"] body #patientDetail .denture-card-tooth-map .tooth-value,
html[data-app-theme="night"] body #patientDetail .denture-card-tooth-map .invoice-tooth-quadrant {
  color: #dffbed !important;
  -webkit-text-fill-color: #dffbed !important;
  background: #0d1211 !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-image-button {
  color: #bff7d9 !important;
  -webkit-text-fill-color: #bff7d9 !important;
  border-color: rgba(101, 230, 164, .24) !important;
  background: rgba(101, 230, 164, .07) !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-image-button.is-thumbnail {
  background: #151b1a !important;
}
html[data-app-theme="night"] body #patientDetail .denture-ledger-image-button.is-thumbnail small,
html[data-app-theme="night"] body #patientDetail .denture-ledger-empty {
  color: rgba(239, 245, 242, .58) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .58) !important;
}

/* 耀夜黑物资领用详情：操作列删除按钮使用白色图标。 */
html[data-app-theme="night"] body #patientDetail .patient-material-delete {
  display: inline-grid !important;
  place-items: center !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .06) !important;
  background-image: none !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #patientDetail .patient-material-delete svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
html[data-app-theme="night"] body #patientDetail .patient-material-delete:hover,
html[data-app-theme="night"] body #patientDetail .patient-material-delete:focus-visible {
  color: #101514 !important;
  -webkit-text-fill-color: #101514 !important;
  border-color: #fff !important;
  background: #fff !important;
  outline: none !important;
}

/* 收支报表：让图表区参与文档自然高度，页面可持续向下滚动。 */
#monthlyFinance.monthly-finance-view.active {
  grid-template-rows: auto auto auto !important;
  height: auto !important;
  min-height: calc(100dvh - 92px) !important;
  overflow: visible !important;
}
#monthlyFinance .mf-chart-grid {
  height: auto !important;
  min-height: 560px !important;
}
#monthlyFinance .mf-chart-grid > .mf-card {
  min-height: 560px !important;
}

@media (max-width: 1150px) {
  #monthlyFinance .mf-chart-grid,
  #monthlyFinance .mf-chart-grid > .mf-card {
    min-height: 470px !important;
  }
}

/* 收支报表金额规范：四张指标卡统一字号，待收账款完整展示。 */
#monthlyFinance .mf-kpis article > strong,
#monthlyFinance .mf-receivable-values strong {
  max-width: 100% !important;
  margin: 10px 0 7px !important;
  overflow: visible !important;
  font-size: 28px !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
#monthlyFinance .mf-receivable-values {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
#monthlyFinance .mf-receivable-values > div {
  min-width: 0 !important;
  padding-left: 10px !important;
}
#monthlyFinance .mf-receivable-values strong {
  font-variant-numeric: tabular-nums !important;
}

@media (max-width: 1400px) {
  #monthlyFinance .mf-kpis article > strong,
  #monthlyFinance .mf-receivable-values strong {
    font-size: 25px !important;
  }
}

/* 耀夜黑收支报表：净利润卡保持深色材质与高对比度文字。 */
html[data-app-theme="night"] body #monthlyFinance .mf-kpis article:nth-child(3) {
  color: #f4f8f6 !important;
  border-color: rgba(104, 231, 142, .26) !important;
  background-color: rgba(18, 22, 22, .96) !important;
  background-image:
    radial-gradient(circle at 84% 12%, rgba(104, 231, 142, .12), transparent 38%),
    linear-gradient(145deg, rgba(25, 30, 29, .98), rgba(12, 15, 15, .98)) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .07) !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis article:nth-child(3) > span,
html[data-app-theme="night"] body #monthlyFinance .mf-kpis article:nth-child(3) > small {
  color: rgba(239, 245, 242, .72) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .72) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis article:nth-child(3) > strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis article:nth-child(3) > .mf-compare.positive {
  color: #68e78e !important;
  -webkit-text-fill-color: #68e78e !important;
}

/* 耀夜黑收支报表：分类卡与四张指标卡使用同一深色材质。 */
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card),
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card).active {
  border-color: rgba(244, 248, 246, .18) !important;
  background-color: rgba(14, 17, 18, .78) !important;
  background-image:
    radial-gradient(ellipse 70% 40% at 3% -8%, rgba(255, 255, 255, .07), transparent 72%),
    linear-gradient(138deg, rgba(255, 255, 255, .022), transparent 48%) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .07) !important;
}
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card).active {
  border-color: rgba(104, 231, 142, .34) !important;
}

html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article,
html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article:nth-child(3),
html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article:nth-child(4) {
  color: #f4f8f6 !important;
  border-color: rgba(244, 248, 246, .18) !important;
  background-color: rgba(14, 17, 18, .88) !important;
  background-image:
    radial-gradient(ellipse 68% 38% at 4% -8%, rgba(255, 255, 255, .065), transparent 72%),
    linear-gradient(138deg, rgba(255, 255, 255, .018), transparent 50%) !important;
  box-shadow: 0 15px 36px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .07) !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article :is(span, small, em) {
  color: rgba(239, 245, 242, .70) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .70) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article strong {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="night"] body #monthlyFinance .mf-kpis > article .mf-compare.positive {
  color: #68e78e !important;
  -webkit-text-fill-color: #68e78e !important;
}

/* 耀夜黑财务分类卡：选中卡与相邻卡保持完全一致，分类文字统一白色。 */
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card),
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card).active,
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card):hover,
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card):focus-visible {
  border-color: rgba(244, 248, 246, .18) !important;
  background-color: rgba(14, 17, 18, .78) !important;
  background-image:
    radial-gradient(ellipse 70% 40% at 3% -8%, rgba(255, 255, 255, .07), transparent 72%),
    linear-gradient(138deg, rgba(255, 255, 255, .022), transparent 48%) !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24), inset 0 1px rgba(255, 255, 255, .07) !important;
  transform: none !important;
}
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card)::before,
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card)::after {
  display: none !important;
  content: none !important;
}
html[data-app-theme="night"] body .finance-hub-cards > :is(.finance-hub-card, .finance-hub-tax-card) > span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: 1 !important;
}

/* 耀夜黑添加商品：深色表单与证照上传卡统一。 */
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form-card {
  width: min(980px, calc(100vw - 40px)) !important;
  max-height: min(90vh, 900px) !important;
  color: #f4f8f6 !important;
  border-color: rgba(244, 248, 246, .20) !important;
  background-color: #101313 !important;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(104, 231, 142, .08), transparent 34%),
    linear-gradient(145deg, rgba(22, 26, 26, .99), rgba(10, 12, 12, .99)) !important;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .08) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .modal-head {
  border-bottom-color: rgba(244, 248, 246, .12) !important;
  background: rgba(255, 255, 255, .025) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .modal-head h2,
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form label,
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-upload > span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .modal-head p {
  color: rgba(239, 245, 242, .66) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .66) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .icon-btn {
  color: #fff !important;
  border-color: rgba(244, 248, 246, .18) !important;
  background: rgba(255, 255, 255, .055) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form input:not([type="file"]) {
  color: #f4f8f6 !important;
  -webkit-text-fill-color: #f4f8f6 !important;
  border-color: rgba(244, 248, 246, .17) !important;
  background: rgba(255, 255, 255, .045) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form input:not([type="file"]):focus {
  border-color: #68e78e !important;
  background: rgba(255, 255, 255, .065) !important;
  box-shadow: 0 0 0 3px rgba(104, 231, 142, .12) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-cert-upload-grid .inventory-sub-upload {
  grid-column: auto !important;
  border-color: rgba(244, 248, 246, .16) !important;
  background: rgba(255, 255, 255, .025) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-upload-preview {
  border-color: rgba(244, 248, 246, .18) !important;
  background: rgba(255, 255, 255, .025) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal :is(.inventory-sub-upload-button, .inventory-sub-image-delete-actions button, .inventory-item-form > footer button) {
  border-color: #444 !important;
  background: #191919 !important;
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form > footer .save-btn {
  background: #303030 !important;
  border-color: #666 !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal :is(.inventory-sub-upload-button:hover, .inventory-sub-upload-button:focus-within, .inventory-sub-image-delete-actions button:enabled:hover, .inventory-item-form > footer button:enabled:hover) {
  background: #383838 !important;
  border-color: #888 !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-upload-button span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
/* Factory certificates follow the black theme without tinted upload surfaces. */
html[data-app-theme="night"] body #dentureFactoryFormModal :is(.factory-cert-upload, .factory-saved-entries, .factory-entry-popover) {
  background: #171717 !important;
  border-color: #383838 !important;
  color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #dentureFactoryFormModal .factory-license-upload-preview {
  background: #101010 !important;
  border-color: #444 !important;
  color: var(--theme-muted) !important;
}
html[data-app-theme="night"] body #dentureFactoryFormModal :is(.inventory-sub-upload-button, .factory-license-actions button) {
  background: #191919 !important;
  border-color: #444 !important;
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #dentureFactoryFormModal .inventory-sub-upload-button span {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
html[data-app-theme="night"] body #dentureFactoryFormModal :is(.inventory-sub-upload-button:hover, .inventory-sub-upload-button:focus-within, .factory-license-actions button:enabled:hover) {
  background: #292929 !important;
  border-color: #777 !important;
}
html[data-app-theme="night"] body #dentureFactoryFormModal .inventory-sub-upload-note {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}

html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-upload-note {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal :is(.supplier-upload-box, .supplier-upload-trigger) {
  min-height: 160px !important;
  color: #f4f8f6 !important;
  border-color: rgba(244, 248, 246, .20) !important;
  background-color: rgba(255, 255, 255, .035) !important;
  background-image: radial-gradient(circle at 50% 0%, rgba(104, 231, 142, .07), transparent 56%) !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .supplier-upload-trigger > span {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal :is(.supplier-upload-trigger small, .supplier-upload-empty) {
  color: rgba(239, 245, 242, .58) !important;
  -webkit-text-fill-color: rgba(239, 245, 242, .58) !important;
}
html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-item-form footer {
  position: sticky !important;
  bottom: -22px !important;
  margin: 4px -24px -22px !important;
  padding: 16px 24px !important;
  border-top-color: rgba(244, 248, 246, .12) !important;
  background: rgba(11, 14, 14, .96) !important;
  backdrop-filter: blur(14px) !important;
}

@media (max-width: 820px) {
  html[data-app-theme="night"] body #inventorySubItemFormModal .inventory-sub-cert-upload-grid {
    grid-template-columns: 1fr !important;
  }
}

/* 素曜白开票信息：覆盖基础样式表中未限定主题的深色浮层。 */
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card {
  color: #172235 !important;
  border: 1px solid #d4e0ed !important;
  background: #f7faff !important;
  box-shadow: 0 28px 80px rgba(42, 67, 101, .24) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > :is(header, footer) {
  border-color: #dce6f1 !important;
  background: #fff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > header h2,
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-empty strong {
  color: #172235 !important;
  -webkit-text-fill-color: #172235 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > header span {
  color: #2f6fe4 !important;
  -webkit-text-fill-color: #2f6fe4 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > header p,
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > footer p {
  color: #66768c !important;
  -webkit-text-fill-color: #66768c !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > header button {
  color: #33445c !important;
  border: 1px solid #d7e2ee !important;
  background: #f6f9fd !important;
  box-shadow: 0 4px 12px rgba(47, 79, 120, .08) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > header button:hover {
  color: #1f5fcf !important;
  border-color: #a9c5ef !important;
  background: #edf5ff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary {
  border-bottom-color: #dce6f1 !important;
  background: #f2f6fb !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button {
  color: #506078 !important;
  border: 1px solid #d4dfec !important;
  background: #fff !important;
  box-shadow: 0 4px 14px rgba(54, 82, 119, .05) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button:hover {
  color: #224f9b !important;
  border-color: #9ab8e8 !important;
  background: #f5f9ff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button.active {
  color: #fff !important;
  border-color: #3778e8 !important;
  background: linear-gradient(135deg, #4b88f1, #2f6fe4) !important;
  box-shadow: 0 8px 20px rgba(47, 111, 228, .20) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button :is(span, strong, small) {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button span em {
  color: #9a6819 !important;
  -webkit-text-fill-color: #9a6819 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-summary button.active span em {
  color: rgba(255, 255, 255, .82) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .82) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > main {
  background: #f7faff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-category-section {
  border-color: #d8e3ef !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(45, 73, 108, .06) !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-category-section > header {
  border-bottom-color: #dfe8f2 !important;
  background: #f4f8fd !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-category-section > header b,
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket strong {
  color: #1e2b40 !important;
  -webkit-text-fill-color: #1e2b40 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-category-section > header span {
  color: #245fc5 !important;
  background: #e8f1ff !important;
  -webkit-text-fill-color: #245fc5 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-category-section > header > strong,
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket-index b {
  color: #2f6fe4 !important;
  -webkit-text-fill-color: #2f6fe4 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket {
  border-bottom-color: #e6edf5 !important;
  background: #fff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket:hover {
  background: #f8fbff !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket-index {
  border-right-color: #e1e9f2 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket :is(span, small),
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-empty,
html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-empty-category {
  color: #708096 !important;
  -webkit-text-fill-color: #708096 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-ticket-amount strong {
  color: #b96800 !important;
  -webkit-text-fill-color: #b96800 !important;
}

html[data-app-theme="light"] body .patient-invoice-info-modal .patient-invoice-info-card > footer .primary-btn {
  color: #fff !important;
  border-color: #2f6fe4 !important;
  background: linear-gradient(135deg, #4b88f1, #2f6fe4) !important;
  box-shadow: 0 8px 18px rgba(47, 111, 228, .18) !important;
  -webkit-text-fill-color: #fff !important;
}

/* Dashboard debt marker stays red in both themes and every row state. */
html[data-app-theme] body #dashboard #dashboardListBoard .visit-table tbody .debt-type-badge,
html[data-app-theme] body #dashboard #dashboardListBoard .visit-table tbody tr.selected .debt-type-badge {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
  border: 1px solid rgba(220, 38, 38, .32) !important;
  background: #fff1f2 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* White theme · factory editor: neutral typography and clearly bounded
   qualification cards. The dark skin in styles.css intentionally uses green
   accents, so keep this override scoped to the light theme and this modal. */
html[data-app-theme="light"] body #dentureFactoryFormModal {
  color: #172033 !important;
  -webkit-text-fill-color: currentColor;
}

html[data-app-theme="light"] body #dentureFactoryFormModal :where(
  .modal-head h2,
  .modal-head p,
  .inbound-form-grid > label > span,
  .denture-registration-number-head > span,
  .denture-factory-product-field-group > header > span,
  .denture-factory-license-form > span,
  .denture-factory-license-upload > span
) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-product-add {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  border-color: #cbd5e1 !important;
  background: #fff !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-product-add:hover {
  border-color: #64748b !important;
  background: #f1f5f9 !important;
}

html[data-app-theme="night"] body #dentureFactoryFormModal .denture-factory-product-field-group > header > span {
  color: #f4f8f6 !important;
  -webkit-text-fill-color: #f4f8f6 !important;
}

html[data-app-theme="night"] body #dentureFactoryFormModal .denture-factory-product-add {
  color: #68e78e !important;
  -webkit-text-fill-color: #68e78e !important;
  border-color: rgba(104,231,142,.34) !important;
  background: rgba(104,231,142,.07) !important;
}

/* Night theme · expense composition: the donut centre stays white, so its
   labels must use an explicit dark ink instead of inheriting light text. */
html[data-app-theme="night"] body #monthlyExpenseContent .expense-all-donut > div {
  background: #ffffff !important;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, .22), 0 8px 22px rgba(0, 0, 0, .16) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-all-donut span {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  font-weight: 750;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-all-donut strong {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 900;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Night theme · refund detail: this header deliberately uses a pale surface,
   so prevent global night-mode light text from washing out its content. */
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header {
  border-bottom-color: #94a3b8 !important;
  background: linear-gradient(100deg, #dce6eb, #eef2f5) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header h2 {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  font-weight: 900;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header p {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  font-weight: 650;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header > span {
  border: 1px solid #94a3b8 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  box-shadow: 0 2px 7px rgba(15, 23, 42, .08) !important;
  opacity: 1 !important;
}

/* Night theme · human cost workspace: use native dark surfaces throughout
   instead of pale cards with inherited white text. */
html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-overview-card {
  border-color: #334155 !important;
  background: linear-gradient(145deg, #101820, #0b1117) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-card {
  border: 1px solid #3b4b5f !important;
  background: linear-gradient(135deg, #172330, #101820) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-gradient,
html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-orb {
  opacity: .18 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-content span,
html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-content b {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-content small {
  color: #b6c2d1 !important;
  -webkit-text-fill-color: #b6c2d1 !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-bento-tip {
  border: 1px solid #3b4b5f !important;
  background: #1b2734 !important;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-details {
  border-color: #334155 !important;
  background: #0d141b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-title {
  border-bottom-color: #334155 !important;
  background: linear-gradient(100deg, #172330, #111a23) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-title h3 {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-title p {
  color: #aebaca !important;
  -webkit-text-fill-color: #aebaca !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-title > span {
  border: 1px solid #475569 !important;
  background: #223142 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-details th {
  border-bottom-color: #334155 !important;
  background: #18232e !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-details td {
  border-bottom-color: #243140 !important;
  background: #0d141b !important;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-salary-details tfoot td {
  background: #16212c !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-weight: 850;
}

html[data-app-theme="night"] body #monthlyExpenseContent.human-cost-only .expense-material-empty {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* Night theme · all expense drill-down cards share the system's dark visual
   language. This supersedes legacy pale headers used by misc/refund/denture. */
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-factory-section {
  border-color: #334155 !important;
  background: #0d141b !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card > header,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-factory-section > header {
  border-bottom-color: #334155 !important;
  background: linear-gradient(100deg, #172330, #111a23) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent :is(.expense-category-detail-card, .expense-denture-factory-section) > header h2 {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-weight: 900;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent :is(.expense-category-detail-card, .expense-denture-factory-section) > header p {
  color: #aebaca !important;
  -webkit-text-fill-color: #aebaca !important;
  font-weight: 650;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent :is(.expense-category-detail-card, .expense-denture-factory-section) > header > span,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header > span {
  border: 1px solid #475569 !important;
  background: #223142 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card :is(th, td) {
  border-bottom-color: #243140 !important;
  color: #e2e8f0 !important;
  -webkit-text-fill-color: #e2e8f0 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card th {
  background: #18232e !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tbody td {
  background: #0d141b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tbody tr:hover td {
  background: #121d27 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tfoot td {
  background: #16212c !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  font-weight: 850;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card .expense-detail-type {
  border: 1px solid #475569 !important;
  background: #223142 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-factory-empty,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-empty {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* Material cost uses the same dark summary/table system as human cost. */
html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-overview-card {
  border-color: #334155 !important;
  background: linear-gradient(145deg, #101820, #0b1117) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .28) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-bento-card {
  border: 1px solid #3b4b5f !important;
  background: linear-gradient(135deg, #172330, #101820) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .24) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-bento-gradient,
html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-bento-orb {
  opacity: .18 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-bento-content :is(span, b) {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-bento-content small {
  color: #b6c2d1 !important;
  -webkit-text-fill-color: #b6c2d1 !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-details {
  border-color: #334155 !important;
  background: #0d141b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-title {
  border-bottom-color: #334155 !important;
  background: linear-gradient(100deg, #172330, #111a23) !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-title :is(h3, span),
html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-details :is(th, td) {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-title p {
  color: #aebaca !important;
  -webkit-text-fill-color: #aebaca !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-title > span {
  border: 1px solid #475569 !important;
  background: #223142 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-details th {
  border-bottom-color: #334155 !important;
  background: #18232e !important;
  color: #cbd5e1 !important;
  -webkit-text-fill-color: #cbd5e1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-details td {
  border-bottom-color: #243140 !important;
  background: #0d141b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-salary-details tfoot td {
  background: #16212c !important;
  font-weight: 850;
}

html[data-app-theme="night"] body #monthlyExpenseContent.material-cost-only .expense-material-empty {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

/* Night theme · neutral-black expense surfaces (no blue cast). */
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-overview-card,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-factory-section {
  border-color: #343434 !important;
  background: #0b0b0b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-card {
  border-color: #3a3a3a !important;
  background: #151515 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-gradient,
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-orb {
  display: none !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-bento-tip,
html[data-app-theme="night"] body #monthlyExpenseContent :is(.expense-category-detail-card, .expense-denture-factory-section) > header > span,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header > span,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card .expense-detail-type {
  border-color: #474747 !important;
  background: #242424 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card > header,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header,
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-factory-section > header,
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-title {
  border-bottom-color: #343434 !important;
  background: #171717 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details {
  border-color: #343434 !important;
  background: #0b0b0b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card th,
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details th {
  border-bottom-color: #343434 !important;
  background: #191919 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tbody td,
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details td {
  border-bottom-color: #292929 !important;
  background: #0b0b0b !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tbody tr:hover td {
  background: #151515 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card tfoot td,
html[data-app-theme="night"] body #monthlyExpenseContent:is(.human-cost-only, .material-cost-only) .expense-salary-details tfoot td {
  background: #181818 !important;
}

/* Refund title must stay legible on the neutral-black header. */
html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header h2 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #monthlyExpenseContent .expense-category-detail-card.patient-refund-detail > header p {
  color: #d1d5db !important;
  -webkit-text-fill-color: #d1d5db !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal :where(
  .icon-btn,
  .light-btn,
  .denture-factory-license-trigger span
) {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-license-upload {
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .05) !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-license-box {
  border: 1px dashed #94a3b8 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  color: #172033 !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-license-box:hover,
html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-license-box:focus-within {
  border-color: #475569 !important;
  background: #f1f5f9 !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal .denture-factory-license-trigger span::before {
  border-color: #64748b !important;
  color: #172033 !important;
  background: #fff !important;
}

html[data-app-theme="light"] body #dentureFactoryFormModal :where(
  .denture-factory-license-trigger small,
  .denture-factory-license-preview,
  .denture-factory-license-preview .supplier-upload-empty
) {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}

/* Payment-method manager follows the active system theme. */
html[data-app-theme="night"] body .payment-method-manager-card {
  border-color: #383838 !important;
  background: #0b0b0b !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .58) !important;
}

html[data-app-theme="night"] body .payment-method-manager-card > header,
html[data-app-theme="night"] body .payment-method-manager-card > footer {
  border-color: #333 !important;
  background: #161616 !important;
}

html[data-app-theme="night"] body .payment-method-manager-card > header h2,
html[data-app-theme="night"] body .payment-method-manager-row input {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body .payment-method-manager-card > header p {
  color: #b8b8b8 !important;
  -webkit-text-fill-color: #b8b8b8 !important;
}

html[data-app-theme="night"] body .payment-method-manager-card > header > button {
  border-color: #444 !important;
  background: #242424 !important;
  color: #fff !important;
}

html[data-app-theme="night"] body .payment-method-manager-row input {
  border-color: #444 !important;
  background: #151515 !important;
}

html[data-app-theme="night"] body .payment-method-manager-row input:focus {
  border-color: #8ab4ff !important;
  box-shadow: 0 0 0 3px rgba(138, 180, 255, .14) !important;
}

html[data-app-theme="night"] body .payment-method-manager-row button {
  border-color: #653535 !important;
  background: #2a1717 !important;
  color: #ff9a9a !important;
}

html[data-app-theme="night"] body .payment-method-add-row {
  border-color: #555 !important;
  background: #181818 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body .payment-method-manage-button {
  border-color: #444 !important;
  background: #181818 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body .payment-method-manage-button:hover {
  border-color: #777 !important;
  background: #242424 !important;
}

/* Personnel editor — light theme. Keep add/edit on the same calm system surface. */

html[data-app-theme="light"] body .people-employee-modal {
  background: rgba(31, 45, 61, .28) !important;
  backdrop-filter: blur(10px) saturate(.85) !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form {
  width: min(720px, calc(100vw - 36px)) !important;
  border: 1px solid #d9e3ee !important;
  border-radius: 18px !important;
  background: #fff !important;
  color: #172033 !important;
  box-shadow: 0 28px 80px rgba(45, 67, 89, .22) !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form header {
  min-height: 94px !important;
  padding: 22px 26px !important;
  border-bottom: 1px solid #e3eaf1 !important;
  background: #f7fafc !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form header h2 {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  font-size: 22px !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form header p {
  margin-top: 7px !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  font-size: 13px !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form header > button {
  width: 42px !important;
  height: 42px !important;
  border: 1px solid #d9e3ec !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #64748b !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form header > button:hover {
  border-color: #aebdcb !important;
  background: #eef3f7 !important;
  color: #172033 !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-grid {
  gap: 18px !important;
  padding: 26px !important;
  background: #fff !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-section {
  border-color: rgba(121, 151, 181, .22) !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 10px 28px rgba(66, 96, 126, .06), inset 0 1px rgba(255, 255, 255, .94) !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-section-head {
  border-bottom-color: rgba(121, 151, 181, .18) !important;
  background: linear-gradient(120deg, rgba(249, 252, 255, .99), rgba(239, 247, 252, .97)) !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-section-head strong {
  color: #172235 !important;
  -webkit-text-fill-color: #172235 !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-section-head span,
html[data-app-theme="light"] body .people-employee-modal .people-form-grid label small {
  color: #6b7c91 !important;
  -webkit-text-fill-color: #6b7c91 !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-toggle,
html[data-app-theme="light"] body .people-employee-modal .people-account-toggle span {
  color: #1d5fce !important;
  -webkit-text-fill-color: #1d5fce !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-summary > div {
  border-color: rgba(180, 191, 204, .72);
  background: rgba(248, 250, 252, .9);
}

html[data-app-theme="light"] body .people-employee-modal .people-account-summary span,
html[data-app-theme="light"] body .people-employee-modal .people-account-empty {
  color: #718096;
  -webkit-text-fill-color: #718096;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-summary strong {
  color: #26354a;
  -webkit-text-fill-color: #26354a;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-summary strong.enabled {
  color: #07845f;
  -webkit-text-fill-color: #07845f;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-summary strong.disabled {
  color: #c2413a;
  -webkit-text-fill-color: #c2413a;
}

html[data-app-theme="light"] body .people-employee-modal .people-account-password-action small {
  color: #6b7c91;
  -webkit-text-fill-color: #6b7c91;
}

html[data-app-theme="light"] body .people-employee-modal .people-form-grid label,
html[data-app-theme="light"] body .people-employee-modal .department-inline-editor label {
  gap: 9px !important;
  color: #34445a !important;
  -webkit-text-fill-color: #34445a !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

html[data-app-theme="light"] body .people-employee-modal :is(.people-form-grid, .department-inline-editor) :is(input, select),
html[data-app-theme="light"] body .people-employee-modal .system-card-select,
html[data-app-theme="light"] body .people-employee-modal .system-card-select-trigger {
  min-height: 48px !important;
  border: 1px solid #ccd8e4 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  box-shadow: none !important;
  color-scheme: light !important;
}

html[data-app-theme="light"] body .people-employee-modal :is(.people-form-grid, .department-inline-editor) :is(input, select):focus,
html[data-app-theme="light"] body .people-employee-modal .system-card-select.open .system-card-select-trigger {
  border-color: #4c8df6 !important;
  box-shadow: 0 0 0 3px rgba(76, 141, 246, .13) !important;
}

html[data-app-theme="light"] body .people-employee-modal :is(input, textarea)::placeholder {
  color: #94a3b8 !important;
  -webkit-text-fill-color: #94a3b8 !important;
}

html[data-app-theme="light"] body .people-employee-modal .system-card-select-menu {
  border-color: #d5e0ea !important;
  background: #fff !important;
  box-shadow: 0 18px 46px rgba(45, 67, 89, .18) !important;
}

html[data-app-theme="light"] body .people-employee-modal .system-card-select-menu button {
  background: transparent !important;
  color: #34445a !important;
}

html[data-app-theme="light"] body .people-employee-modal .system-card-select-menu button:hover,
html[data-app-theme="light"] body .people-employee-modal .system-card-select-menu button.active {
  background: #edf4ff !important;
  color: #1d5fd1 !important;
}

html[data-app-theme="light"] body .people-employee-modal .people-employee-form footer {
  min-height: 82px !important;
  padding: 18px 26px !important;
  border-top: 1px solid #e3eaf1 !important;
  background: #f7fafc !important;
}

html[data-app-theme="light"] body .people-employee-modal .light-btn {
  min-width: 110px !important;
  min-height: 44px !important;
  border: 1px solid #ccd8e4 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #34445a !important;
  -webkit-text-fill-color: #34445a !important;
}

html[data-app-theme="light"] body .people-employee-modal .primary-btn {
  min-width: 124px !important;
  min-height: 44px !important;
  border: 1px solid #2878e8 !important;
  border-radius: 11px !important;
  background: #2878e8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 8px 18px rgba(40, 120, 232, .2) !important;
}

html[data-app-theme="light"] body #system #peopleAdminView .people-employee-row .people-department,
html[data-app-theme="light"] body #system #peopleAdminView .people-employee-row .people-department.none {
  border-color: #d8e1ea !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
}



/* Night theme: treatment charge project and charge combination dialogs. */
html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) {
  border: 1px solid rgba(244, 248, 246, .15) !important;
  background: #101516 !important;
  color: #f4f7f5 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .05) !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) :is(header, footer) {
  border-color: rgba(244, 248, 246, .11) !important;
  background: #121819 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) :is(h2, h3, b, strong) {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) :is(span, small, label) {
  color: rgba(244, 247, 245, .66) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .66) !important;
}

html[data-app-theme="night"] body .charge-project-picker-categories,
html[data-app-theme="night"] body .charge-project-picker-combo-columns,
html[data-app-theme="night"] body .charge-project-picker-combos,
html[data-app-theme="night"] body .charge-combo-form-filters,
html[data-app-theme="night"] body .charge-combo-selected-panel {
  border-color: rgba(244, 248, 246, .10) !important;
  background: #0d1213 !important;
}

html[data-app-theme="night"] body .charge-combo-form-categories button {
  border-color: rgba(244, 248, 246, .16) !important;
  background: #171e20 !important;
  color: rgba(244, 247, 245, .78) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .78) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04) !important;
}

html[data-app-theme="night"] body .charge-combo-form-categories button:is(:hover, :focus-visible) {
  border-color: rgba(104, 231, 142, .62) !important;
  background: rgba(104, 231, 142, .10) !important;
  color: #dffff0 !important;
  -webkit-text-fill-color: #dffff0 !important;
}

html[data-app-theme="night"] body .charge-combo-form-categories button.active {
  border-color: #68e78e !important;
  background: #68e78e !important;
  color: #102418 !important;
  -webkit-text-fill-color: #102418 !important;
}

html[data-app-theme="night"] body .charge-project-picker-categories button,
html[data-app-theme="night"] body :is(.charge-project-picker-mode-btn, .charge-project-picker-clear-btn),
html[data-app-theme="night"] body .charge-combo-glass-pill {
  border-color: rgba(244, 248, 246, .15) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: rgba(244, 247, 245, .78) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .78) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .05) !important;
}

html[data-app-theme="night"] body .charge-project-picker-categories button:is(:hover, .active),
html[data-app-theme="night"] body .charge-project-picker-mode-btn:is(:hover, .active),
html[data-app-theme="night"] body .charge-combo-glass-pill:is(:hover, .selected) {
  border-color: rgba(104, 231, 142, .62) !important;
  background: rgba(104, 231, 142, .12) !important;
  color: #dffff0 !important;
  -webkit-text-fill-color: #dffff0 !important;
}

html[data-app-theme="night"] body .charge-project-picker-categories button.active {
  background: #68e78e !important;
  color: #102418 !important;
  -webkit-text-fill-color: #102418 !important;
}

html[data-app-theme="night"] body .charge-project-picker-clear-btn:hover:not(:disabled) {
  border-color: rgba(255, 133, 141, .48) !important;
  background: rgba(255, 133, 141, .09) !important;
  color: #ffb2b7 !important;
  -webkit-text-fill-color: #ffb2b7 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-toolbar, .charge-project-picker-list, .charge-project-picker-row, .charge-project-picker-selected, .charge-project-picker-selected-row, .charge-combo-form-meta, .charge-combo-form-search, .charge-combo-project-row, .charge-combo-selected-row) {
  border-color: rgba(244, 248, 246, .09) !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-toolbar, .charge-combo-form-search) {
  background: #101516 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-row, .charge-project-picker-selected, .charge-project-picker-selected-row, .charge-combo-project-row, .charge-combo-selected-row) {
  background: transparent !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion {
  border-color: rgba(244, 248, 246, .14) !important;
  background: #0d1213 !important;
  color: #f4f7f5 !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .04) !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected {
  background: #0d1213 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected h3 {
  border-color: rgba(244, 248, 246, .10) !important;
  background: rgba(18, 24, 25, .97) !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-head {
  border-color: rgba(244, 248, 246, .10) !important;
  background: #101516 !important;
  color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-head span {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-row {
  border-color: rgba(244, 248, 246, .09) !important;
  background: #101516 !important;
  color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-row :is(b, strong) {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-row :is(span, small, label) {
  color: rgba(244, 247, 245, .72) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .72) !important;
}

html[data-app-theme="night"] body .charge-project-picker-companion .charge-project-picker-selected-row button {
  border-color: rgba(244, 248, 246, .14) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-row > b, .charge-project-picker-row b, .charge-project-picker-selected-row b, .charge-combo-project-row b, .charge-combo-selected-row b) {
  color: #edf4f0 !important;
  -webkit-text-fill-color: #edf4f0 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-toolbar input, .charge-project-picker-adjust input, .charge-project-picker-selected-row input, .charge-combo-form-meta input, .charge-combo-form-meta select, .charge-combo-form-search input, .charge-combo-selected-row input) {
  border-color: rgba(244, 248, 246, .16) !important;
  background: #171e20 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  caret-color: #68e78e !important;
  color-scheme: dark;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-toolbar input, .charge-project-picker-adjust input, .charge-combo-form-meta input, .charge-combo-form-search input)::placeholder {
  color: rgba(244, 247, 245, .38) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .38) !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-toolbar input, .charge-project-picker-adjust input, .charge-project-picker-selected-row input, .charge-combo-form-meta input, .charge-combo-form-meta select, .charge-combo-form-search input, .charge-combo-selected-row input):focus {
  border-color: rgba(104, 231, 142, .72) !important;
  outline: 3px solid rgba(104, 231, 142, .10) !important;
}

html[data-app-theme="night"] body .charge-project-picker-row input,
html[data-app-theme="night"] body .charge-combo-project-row input {
  accent-color: #68e78e !important;
}

html[data-app-theme="night"] body .charge-project-picker-card :is([data-charge-project-picker-toolbar-total], [data-charge-project-picker-footer-total]),
html[data-app-theme="night"] body .charge-combo-form-card footer b {
  color: #68e78e !important;
  -webkit-text-fill-color: #68e78e !important;
}

html[data-app-theme="night"] body .charge-project-picker-project-total output {
  border-color: rgba(244, 248, 246, .16) !important;
  background: #171e20 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

/* Night billing workspace: neutral black surfaces and white type, without green fills. */
html[data-app-theme="night"] body #billCreate {
  --bill-cyan: #f4f7f5 !important;
  --bill-cyan-dark: #f4f7f5 !important;
  --bill-ink: #f4f7f5 !important;
  color: #f4f7f5 !important;
  background: #050606 !important;
  background-image: none !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-summary,
  .charge-actions,
  .charge-items-panel,
  .charge-cashier,
  .payment-history.active,
  .debt-confirm-card
) {
  color: #f4f7f5 !important;
  border-color: rgba(255,255,255,.14) !important;
  background: #101313 !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255,255,255,.06) !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-summary:hover,
  .charge-actions:hover,
  .charge-items-panel:hover,
  .charge-cashier:hover,
  .payment-history.active:hover,
  .debt-confirm-card:hover
) {
  border-color: rgba(255,255,255,.22) !important;
  background: #121515 !important;
}

html[data-app-theme="night"] body #billCreate :is(h1, h2, h3, strong, b, label, span, th, td, p) {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-tabs button,
  .charge-buttons button,
  .cashier-footer button,
  .table-action,
  .charge-category-tabs .neon-button
) {
  border-color: rgba(255,255,255,.18) !important;
  background: #181b1b !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-tabs button:hover,
  .charge-tabs button.active,
  .charge-buttons button:hover,
  .charge-buttons .primary-btn,
  .cashier-footer button:hover,
  .cashier-footer .primary-btn,
  .charge-category-tabs .neon-button:hover,
  .charge-category-tabs .neon-button[aria-pressed="true"]
) {
  border-color: rgba(255,255,255,.34) !important;
  background: #242828 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body #billCreate :is(input, select, textarea, .system-card-select-trigger) {
  border-color: rgba(255,255,255,.16) !important;
  background: #171a1a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-project-list,
  .invoice-table-wrap,
  .charge-table-wrap,
  .invoice-total,
  .whole-discount-row,
  .payment-box,
  .cashier-form
) {
  border-color: rgba(255,255,255,.12) !important;
  background: #0b0d0d !important;
  background-image: none !important;
  color: #f4f7f5 !important;
}

html[data-app-theme="night"] body #billCreate :is(.charge-project-list button, .charge-project) {
  border-color: rgba(255,255,255,.10) !important;
  background: #151818 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body #billCreate :is(
  .charge-project-list button:hover,
  .charge-project:hover,
  .charge-project.selected,
  .invoice-table tbody tr:hover,
  .charge-table tbody tr:hover
) {
  background: #202424 !important;
  box-shadow: inset 3px 0 rgba(255,255,255,.52) !important;
}

html[data-app-theme="night"] body #billCreate :is(.invoice-table thead th, .charge-table thead th) {
  border-color: rgba(255,255,255,.12) !important;
  background: #1a1d1d !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body #billCreate :is(.payment-result .success, .summary-values b, .payment-result b) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Night appointment board: black canvas, gray card borders, white type. */
html[data-app-theme="night"] body #schedule,
html[data-app-theme="night"] body #schedule :is(.booking-layout, .booking-left, .booking-center) {
  color: #fff !important;
  background: #050606 !important;
  background-image: none !important;
}

html[data-app-theme="night"] body #schedule .booking-left::before { display: none !important; }

html[data-app-theme="night"] body #schedule :is(
  .schedule-board-card,
  .schedule-tabs,
  .schedule-toolbar,
  .schedule-date-trigger,
  .schedule-date-picker
) {
  color: #fff !important;
  border-color: rgba(255,255,255,.24) !important;
  background: #101212 !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Light sidebar typography: one black tone across desktop and tablet. */
html[data-app-theme="light"] body .sidebar :is(
  .nav-item,
  .nav-item:hover,
  .nav-item.active,
  .nav-item.active:hover,
  .nav-label-desktop,
  .nav-label-tablet,
  .nav-icon,
  .clinic-card,
  .clinic-card span,
  .clinic-card small,
  .clinic-card strong,
  .sidebar-product-brand,
  .sidebar-product-brand strong,
  .sidebar-product-brand small,
  .sidebar-theme-toggle-track > span,
  .sidebar-account-card,
  .sidebar-account-card .current-user-badge,
  .sidebar-account-card .current-user-badge > strong,
  .sidebar-account-card .current-user-badge > small,
  .sidebar-account-avatar,
  .sidebar-account-logout
) {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body .sidebar .nav-icon :is(path, rect, circle, line) {
  color: #111 !important;
  stroke: #111 !important;
}

html[data-app-theme="light"] body .sidebar .nav-item.active,
html[data-app-theme="light"] body .sidebar .nav-item.active:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background-color: #3b82f6 !important;
}

html[data-app-theme="light"] body .sidebar .nav-item.active :is(.nav-label-desktop, .nav-label-tablet, .nav-icon) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body .sidebar .nav-item.active .nav-icon :is(path, rect, circle, line) {
  color: #fff !important;
  stroke: #fff !important;
}

/* Desktop sidebar follows the compact 150px navigation buttons; tablet keeps
   its dedicated rail sizing. */
@media (min-width: 1440px) {
  html:not([data-device-ui="tablet"]) .app-shell {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }
  html:not([data-device-ui="tablet"]) .sidebar,
  html:not([data-device-ui="tablet"]) .sidebar:hover,
  html:not([data-device-ui="tablet"]) .sidebar:focus-within,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-hold-open,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-force-closed {
    width: 160px !important;
  }
}

@media (min-width: 1221px) and (max-width: 1439px) {
  html:not([data-device-ui="tablet"]) .app-shell {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }
  html:not([data-device-ui="tablet"]) .sidebar,
  html:not([data-device-ui="tablet"]) .sidebar:hover,
  html:not([data-device-ui="tablet"]) .sidebar:focus-within,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-hold-open,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-force-closed {
    width: 160px !important;
  }
}

@media (min-width: 901px) and (max-width: 1220px) {
  html:not([data-device-ui="tablet"]) .app-shell {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }
  html:not([data-device-ui="tablet"]) .sidebar,
  html:not([data-device-ui="tablet"]) .sidebar:hover,
  html:not([data-device-ui="tablet"]) .sidebar:focus-within,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-hold-open,
  html:not([data-device-ui="tablet"]) .sidebar.sidebar-force-closed {
    width: 160px !important;
  }
}

html[data-app-theme="night"] body #schedule :is(
  .week-head > span,
  .time-board .time-label,
  .time-board .time-cell
) {
  color: #fff !important;
  border-color: rgba(255,255,255,.18) !important;
  background: #151717 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body #schedule :is(
  .week-head > span,
  .week-head > span *,
  .time-board .time-label,
  .time-board .time-label *,
  .schedule-board-card h1,
  .schedule-board-card h2,
  .schedule-board-card h3
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body #schedule .time-board :is(
  .schedule-chip,
  .schedule-chip.normal,
  .schedule-chip.pending,
  .schedule-chip.in-treatment
) {
  color: #fff !important;
  border: 1px solid #777 !important;
  background: #2a2d2d !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-app-theme="night"] body #schedule .time-board .schedule-chip :is(strong, time, b, small, span) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-shadow: none !important;
}

html[data-app-theme="night"] body #schedule .time-board .schedule-chip:hover {
  border-color: #aaa !important;
  background: #343737 !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body #schedule :is(
  button,
  .light-btn,
  .schedule-tabs button,
  .schedule-date-trigger
) {
  border-color: rgba(255,255,255,.28) !important;
  background-color: #232626 !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body .charge-project-picker-combo-column {
  border-color: rgba(244, 248, 246, .10) !important;
}

html[data-app-theme="night"] body .charge-project-picker-combo-column h3 {
  border-color: rgba(244, 248, 246, .10) !important;
  background: #151c1e !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) .light-btn {
  border-color: rgba(244, 248, 246, .16) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #d9e3de !important;
  -webkit-text-fill-color: #d9e3de !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) .save-btn {
  border-color: #68e78e !important;
  background: #68e78e !important;
  color: #102418 !important;
  -webkit-text-fill-color: #102418 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-card, .charge-combo-form-card) button:disabled {
  opacity: .38 !important;
}

html[data-app-theme="night"] body :is(.charge-project-picker-scroll, .charge-combo-form-body > section) {
  scrollbar-color: rgba(104, 231, 142, .35) transparent;
}

/* Night theme: treatment-plan project preview and project editor. */
html[data-app-theme="night"] body .treatment-project-entry {
  border-color: rgba(244, 248, 246, .14) !important;
  background: #101516 !important;
  color: #f4f7f5 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body .treatment-project-entry:is(:hover, :focus-visible) {
  border-color: rgba(104, 231, 142, .58) !important;
  background: rgba(104, 231, 142, .055) !important;
}

html[data-app-theme="night"] body .treatment-project-preview-row + .treatment-project-preview-row {
  border-color: rgba(244, 248, 246, .09) !important;
}

html[data-app-theme="night"] body .treatment-project-preview-text,
html[data-app-theme="night"] body .treatment-project-preview-tooth .invoice-tooth-quadrant {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .treatment-project-preview-tooth .tooth-line,
html[data-app-theme="night"] body .treatment-project-tooth .tooth-line {
  background: #68e78e !important;
}

html[data-app-theme="night"] body .treatment-project-modal {
  background: rgba(2, 5, 6, .78) !important;
}

html[data-app-theme="night"] body .treatment-project-dialog {
  border-color: rgba(244, 248, 246, .14) !important;
  background: #0d1213 !important;
  color: #f4f7f5 !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .04) !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > :is(header, footer) {
  border-color: rgba(244, 248, 246, .11) !important;
  background: #121819 !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > header span {
  color: #68e78e !important;
  -webkit-text-fill-color: #68e78e !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > header h2,
html[data-app-theme="night"] body .treatment-project-column-head,
html[data-app-theme="night"] body .treatment-project-tooth .invoice-tooth-quadrant {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > header p {
  color: rgba(244, 247, 245, .58) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .58) !important;
}

html[data-app-theme="night"] body .treatment-project-row {
  border-color: rgba(244, 248, 246, .11) !important;
  background: #151b1e !important;
}

html[data-app-theme="night"] body .treatment-project-row textarea {
  border-color: rgba(244, 248, 246, .16) !important;
  background: #0e1315 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  caret-color: #68e78e !important;
}

html[data-app-theme="night"] body .treatment-project-row textarea::placeholder {
  color: rgba(244, 247, 245, .42) !important;
  -webkit-text-fill-color: rgba(244, 247, 245, .42) !important;
}

html[data-app-theme="night"] body .treatment-project-row textarea:focus {
  border-color: rgba(104, 231, 142, .72) !important;
  outline: 3px solid rgba(104, 231, 142, .10) !important;
}

html[data-app-theme="night"] body .treatment-project-dialog :is(.treatment-project-tooth, .treatment-project-preview-tooth) {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body .treatment-project-add {
  border-color: rgba(244, 248, 246, .18) !important;
  background: #0e1315 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body .treatment-project-add:is(:hover, :focus-visible) {
  border-color: rgba(104, 231, 142, .72) !important;
  background: #151b1e !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > header > button,
html[data-app-theme="night"] body .treatment-project-remove,
html[data-app-theme="night"] body .treatment-project-dialog > footer .light-btn {
  border-color: rgba(244, 248, 246, .16) !important;
  background: rgba(255, 255, 255, .045) !important;
  color: #d9e3de !important;
  -webkit-text-fill-color: #d9e3de !important;
}

html[data-app-theme="night"] body .treatment-project-dialog > footer .save-btn {
  border-color: #68e78e !important;
  background: #68e78e !important;
  color: #102418 !important;
  -webkit-text-fill-color: #102418 !important;
}

/* Night theme: charge-project category filter. */
html[data-app-theme="night"] body #system .system-charge-category-buttons {
  border-color: rgba(244, 248, 246, .14) !important;
  background: #090d0f !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body #system .system-charge-category-buttons button {
  border-color: rgba(244, 248, 246, .15) !important;
  background: #0d1213 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body #system .system-charge-category-buttons button:is(:hover, :focus-visible) {
  border-color: rgba(104, 231, 142, .58) !important;
  background: #121819 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="night"] body #system .system-charge-category-buttons button:is(.active, [aria-pressed="true"]) {
  border-color: #68e78e !important;
  background: #101816 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(104, 231, 142, .18) !important;
}

html[data-app-theme="night"] body #system .system-project-price-head {
  border-color: rgba(244, 248, 246, .14) !important;
  background: #0d1213 !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body #system .system-project-price-head span {
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
}

html[data-app-theme="night"] body #system #peopleAdminView .people-panel-actions :is(#openDepartmentManager, #openPeopleEmployeeForm) {
  border-color: rgba(244, 248, 246, .16) !important;
  background: #151b1e !important;
  background-image: none !important;
  color: #f4f7f5 !important;
  -webkit-text-fill-color: #f4f7f5 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .045) !important;
  text-shadow: none !important;
}

html[data-app-theme="night"] body #system #peopleAdminView .people-panel-actions :is(#openDepartmentManager, #openPeopleEmployeeForm):is(:hover, :focus-visible) {
  border-color: rgba(104, 231, 142, .58) !important;
  background: #19211f !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(104, 231, 142, .10) !important;
  transform: none !important;
}

html[data-app-theme="light"] body #system #refundApplicationTemplateList .system-row-actions :is([data-preview-refund-application], [data-edit-refund-application]) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 112px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #system #refundApplicationTemplateList .system-row-actions :is([data-preview-refund-application], [data-edit-refund-application]):is(:hover, :focus-visible) {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Keep the three backup actions visually equal in both application themes. */
html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .business-backup-actions :is(#exportSelectiveBusinessBackup, #exportSystemBackup, #toggleAutoBackup) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #3674e4 !important;
  border-radius: 8px !important;
  background: #3674e4 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 5px 12px rgba(54, 116, 228, .18) !important;
}

html[data-app-theme="light"] body #system [data-settings-panel="system-tools"] .business-backup-actions :is(#exportSelectiveBusinessBackup, #exportSystemBackup, #toggleAutoBackup):hover {
  border-color: #2d64ca !important;
  background: #2d64ca !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #system #peopleAdminView .people-panel-actions :is(#openDepartmentManager, #openPeopleEmployeeForm) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 116px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 11px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 850 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
  text-shadow: none !important;
}

html[data-app-theme="light"] body #system #peopleAdminView .people-panel-actions :is(#openDepartmentManager, #openPeopleEmployeeForm):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #consentTemplateFormModal .consent-template-form > footer :is(.light-btn, .save-btn) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 108px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #consentTemplateFormModal .consent-template-form > footer :is(.light-btn, .save-btn):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #inventory :is(
  .inventory-module-card .inbound-panel-actions > [data-inventory-new-record="outbound"],
  .inventory-module-card .inbound-panel-actions > [data-open-outbound-export]
) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #inventory :is(
  .inventory-module-card .inbound-panel-actions > [data-inventory-new-record="outbound"],
  .inventory-module-card .inbound-panel-actions > [data-open-outbound-export]
):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 素曜白：物资档案与供应商新增按钮使用深色文字和清晰描边。 */
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > :is(
  [data-inventory-new-record="archives"],
  [data-inventory-new-record="suppliers"]
) {
  border: 1px solid #94a3b8 !important;
  background: rgba(255, 255, 255, .76) !important;
  background-image: none !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > :is(
  [data-inventory-new-record="archives"],
  [data-inventory-new-record="suppliers"]
):is(:hover, :focus-visible, :active) {
  border-color: #64748b !important;
  background: #fff !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

html[data-app-theme="light"] body #denture .inventory-module-card .denture-ledger-toolbar > :is(button[data-export-denture], button[data-add-denture]) {
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #denture .inventory-module-card .denture-ledger-toolbar > :is(button[data-export-denture], button[data-add-denture]):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #wageSettlement .wage-toolbar > div > :is([data-wage-reset], [data-wage-refetch], [data-wage-calc]) {
  min-height: 38px !important;
  padding: 0 16px !important;
  border: 1px solid #2563eb !important;
  border-radius: 9px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #wageSettlement .wage-toolbar > div > :is([data-wage-reset], [data-wage-refetch], [data-wage-calc]):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body #billing:not(.expense-only) #performanceReportContent :is(#performanceAdvanced, #performanceQuery, #performanceExport) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 92px !important;
  min-height: 42px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body #billing:not(.expense-only) #performanceReportContent :is(#performanceAdvanced, #performanceQuery, #performanceExport):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body :is(#communicationVideoUploadButton, #communicationVideoUploadModal button[type="submit"]) {
  min-height: 40px !important;
  padding: 0 18px !important;
  border: 1px solid #2563eb !important;
  border-radius: 9px !important;
  background: #2563eb !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18) !important;
}

html[data-app-theme="light"] body :is(#communicationVideoUploadButton, #communicationVideoUploadModal button[type="submit"]):hover {
  border-color: #1d4ed8 !important;
  background: #1d4ed8 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

html[data-app-theme="light"] body input[type="checkbox"] {
  accent-color: #2563eb !important;
}

/* 素曜白二级目录：复用库房目录的默认与悬停反馈，点击后统一为蓝底白字。 */
body #patients .patients-console-menu button {
  padding-inline:18px !important;
  text-align:left !important;
}
html[data-app-theme="light"] body :is(
  #patients .patients-console-menu button:not(.active),
  #monthlyExpenseContent .expense-section-nav button:not(.active),
  #billing:not(.expense-only) .performance-sidebar button:not(.active),
  #wageSettlement .performance-sidebar button:not(.active)
) {
  color:#526174 !important;
  -webkit-text-fill-color:#526174 !important;
  border-color:transparent !important;
  background-color:rgba(255,255,255,.58) !important;
  background-image:none !important;
  box-shadow:none !important;
  transform:none !important;
}
html[data-app-theme="light"] body :is(
  #patients .patients-console-menu button:not(.active),
  #monthlyExpenseContent .expense-section-nav button:not(.active),
  #billing:not(.expense-only) .performance-sidebar button:not(.active),
  #wageSettlement .performance-sidebar button:not(.active)
):is(:hover,:focus-visible) {
  color:#1d4ed8 !important;
  -webkit-text-fill-color:#1d4ed8 !important;
  background-color:#edf6ff !important;
  background-image:none !important;
  box-shadow:inset 3px 0 #3b82f6 !important;
  transform:none !important;
}
html[data-app-theme="light"] body :is(
  #patients .patients-console-menu button.active,
  #monthlyExpenseContent .expense-section-nav button.active,
  #billing:not(.expense-only) .performance-sidebar button.active,
  #wageSettlement .performance-sidebar button.active,
  #inventory .settings-submenu button.active,
  #system .settings-submenu button.active
) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#2563eb !important;
  background-color:#2563eb !important;
  background-image:linear-gradient(135deg,#4f8df7,#2563eb) !important;
  box-shadow:0 10px 22px rgba(37,99,235,.20) !important;
  transform:none !important;
}
html[data-app-theme="light"] body :is(
  #patients .patients-console-menu button.active,
  #monthlyExpenseContent .expense-section-nav button.active,
  #billing:not(.expense-only) .performance-sidebar button.active,
  #wageSettlement .performance-sidebar button.active,
  #inventory .settings-submenu button.active,
  #system .settings-submenu button.active
):is(:hover,:focus-visible) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#1d4ed8 !important;
  background-color:#1d4ed8 !important;
  background-image:linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
}
html[data-app-theme="light"] body :is(
  #patients .patients-console-menu button.active,
  #monthlyExpenseContent .expense-section-nav button.active,
  #billing:not(.expense-only) .performance-sidebar button.active,
  #wageSettlement .performance-sidebar button.active,
  #inventory .settings-submenu button.active,
  #system .settings-submenu button.active
):focus-visible {
  outline:3px solid rgba(37,99,235,.24) !important;
  outline-offset:2px !important;
}

html[data-app-theme="light"] body .auto-backup-time-trigger{border-color:#b8c9df!important;background:#fff!important;color:#18253a!important;-webkit-text-fill-color:#18253a!important}
html[data-app-theme="light"] body .auto-backup-time-popover{border-color:#d4dfeb!important;background:#fff!important;box-shadow:0 20px 48px rgba(27,53,88,.2)!important}
html[data-app-theme="light"] body .auto-backup-time-popover>header,html[data-app-theme="light"] body .auto-backup-time-popover>footer{border-color:#dce5ef!important;background:#f8fbff!important}
html[data-app-theme="light"] body .auto-backup-time-popover>header small,html[data-app-theme="light"] body .auto-backup-time-popover>section>div>span{color:#64748b!important;-webkit-text-fill-color:#64748b!important}
html[data-app-theme="light"] body .auto-backup-time-popover section button{border-color:#d6e2ed!important;background:#fff!important;color:#26364d!important;-webkit-text-fill-color:#26364d!important}
html[data-app-theme="light"] body .auto-backup-time-popover section button:hover{border-color:#91b6eb!important;background:#edf5ff!important;color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8!important}
html[data-app-theme="light"] body .auto-backup-time-popover section button.selected{border-color:#2563eb!important;background:#2563eb!important;color:#fff!important;-webkit-text-fill-color:#fff!important;box-shadow:0 5px 12px rgba(37,99,235,.18)!important}
html[data-app-theme="light"] body .auto-backup-time-options button{border-color:#d6e2ed!important;background:#fff!important;color:#26364d!important;-webkit-text-fill-color:#26364d!important}
html[data-app-theme="light"] body .auto-backup-time-options button:hover{border-color:#91b6eb!important;background:#edf5ff!important;color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8!important}
html[data-app-theme="light"] body .auto-backup-time-options button.selected{border-color:#2563eb!important;background:#2563eb!important;color:#fff!important;-webkit-text-fill-color:#fff!important;box-shadow:0 5px 12px rgba(37,99,235,.18)!important}

html[data-app-theme="night"] body .auto-backup-dialog :is(#selectAllAutoBackup,#chooseAutoBackupFolder,#runAutoBackupNow,#saveAutoBackup){color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(244,248,246,.28)!important;background:#090d0e!important;background-image:none!important;box-shadow:0 7px 18px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.035)!important}
html[data-app-theme="night"] body .auto-backup-dialog :is(#selectAllAutoBackup,#chooseAutoBackupFolder,#runAutoBackupNow,#saveAutoBackup):hover{color:#fff!important;-webkit-text-fill-color:#fff!important;border-color:rgba(244,248,246,.46)!important;background:#202627!important}
html[data-app-theme="night"] body .auto-backup-dialog :is(#selectAllAutoBackup,#chooseAutoBackupFolder,#runAutoBackupNow,#saveAutoBackup):focus-visible{outline:3px solid rgba(244,248,246,.15)!important;outline-offset:2px}

/* Final light-sidebar active state: blue at rest, white type and icon. */
html[data-app-theme="light"] body .sidebar .nav-item.active,
html[data-app-theme="light"] body .sidebar .nav-item.active:hover,
html[data-app-theme="light"] body .sidebar .nav-item.active:focus-visible {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
  border-color:#3b82f6 !important;
  background-color:#3b82f6 !important;
  background-image:none !important;
}
html[data-app-theme="light"] body .sidebar .nav-item.active :is(span,.nav-label-desktop,.nav-label-tablet,.nav-icon) {
  color:#fff !important;
  -webkit-text-fill-color:#fff !important;
}
html[data-app-theme="light"] body .sidebar .nav-item.active .nav-icon :is(path,rect,circle,line,polyline,polygon) {
  color:#fff !important;
  stroke:#fff !important;
}

/* Visit-table column dividers remain visible across row states and themes. */
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td:not(:last-child) {
  --visit-column-divider: rgba(75, 119, 162, .28);
}

html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody td:not(:last-child) {
  --visit-column-divider: rgba(244, 248, 246, .13);
}

html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr:hover td:not(:last-child) {
  --visit-column-divider: rgba(244, 248, 246, .22);
}

html[data-app-theme="night"] body #dashboard #dashboardListBoard .visit-table tbody tr.selected td:not(:last-child) {
  --visit-column-divider: rgba(255, 255, 255, .32);
}
/* Patient default avatars: gender + life-stage mapping from app.js. */
.patient-avatar-icon,
html[data-app-theme] body .patient-avatar-icon,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-avatar-icon {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  background-image: url("./assets/patient-avatars/adult-male.svg") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  box-shadow: none !important;
}

.patient-avatar-icon.female,
html[data-app-theme] body .patient-avatar-icon.female,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-avatar-icon.female {
  background-image: url("./assets/patient-avatars/adult-female.svg") !important;
}

.patient-avatar-icon.male.child,
html[data-app-theme] body .patient-avatar-icon.male.child {
  background-image: url("./assets/patient-avatars/boy-child.svg") !important;
}

.patient-avatar-icon.female.child,
html[data-app-theme] body .patient-avatar-icon.female.child {
  background-image: url("./assets/patient-avatars/girl-child.svg") !important;
}

.patient-avatar-icon.male.senior,
html[data-app-theme] body .patient-avatar-icon.male.senior {
  background-image: url("./assets/patient-avatars/old-man.svg") !important;
}

.patient-avatar-icon.female.senior,
html[data-app-theme] body .patient-avatar-icon.female.senior {
  background-image: url("./assets/patient-avatars/old-woman.svg") !important;
}

.patient-avatar-icon::before,
.patient-avatar-icon::after,
html[data-app-theme] body .patient-avatar-icon::before,
html[data-app-theme] body .patient-avatar-icon::after,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-avatar-icon::before,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-avatar-icon::after {
  content: none !important;
  display: none !important;
}

/* Dashboard patient badge uses the same six default avatar assets. */
#dashboard #dashboardListBoard .patient-gender-icon,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon {
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: transparent !important;
  background-color: transparent !important;
  background-image: url("./assets/patient-avatars/adult-male.svg") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  box-shadow: none !important;
}

#dashboard #dashboardListBoard .patient-gender-icon.female,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon.female {
  background-image: url("./assets/patient-avatars/adult-female.svg") !important;
}

#dashboard #dashboardListBoard .patient-gender-icon.male.child,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon.male.child {
  background-image: url("./assets/patient-avatars/boy-child.svg") !important;
}

#dashboard #dashboardListBoard .patient-gender-icon.female.child,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon.female.child {
  background-image: url("./assets/patient-avatars/girl-child.svg") !important;
}

#dashboard #dashboardListBoard .patient-gender-icon.male.senior,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon.male.senior {
  background-image: url("./assets/patient-avatars/old-man.svg") !important;
}

#dashboard #dashboardListBoard .patient-gender-icon.female.senior,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon.female.senior {
  background-image: url("./assets/patient-avatars/old-woman.svg") !important;
}

#dashboard #dashboardListBoard .patient-gender-icon::before,
#dashboard #dashboardListBoard .patient-gender-icon::after,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon::before,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-gender-icon::after {
  content: none !important;
  display: none !important;
}

/* Dashboard patient identity order: avatar, name, then status badges. */
#dashboard #dashboardListBoard td.patient-cell,
html[data-app-theme] body #dashboard #dashboardListBoard td.patient-cell {
  padding-left: 15px !important;
  text-align: left !important;
}

#dashboard #dashboardListBoard .patient-name-wrap,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-wrap {
  position: static !important;
  display: inline-grid !important;
  align-items: center !important;
  justify-content: flex-start !important;
  grid-template-columns: max-content max-content !important;
  column-gap: 30px !important;
  width: max-content !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}

#dashboard #dashboardListBoard .patient-name-wrap > .patient-gender-icon,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-wrap > .patient-gender-icon {
  margin: 0 !important;
  justify-self: start !important;
}

#dashboard #dashboardListBoard .patient-name-wrap > .patient-name-link,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-wrap > .patient-name-link {
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  margin-left: 30px !important;
}

#dashboard #dashboardListBoard .patient-name-status,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-status {
  display: inline-grid !important;
  align-items: center !important;
  justify-content: start !important;
  justify-items: start !important;
  grid-template-columns: max-content max-content !important;
  column-gap: 15px !important;
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
}

#dashboard #dashboardListBoard .patient-name-status > .patient-name-link,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-status > .patient-name-link {
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
  overflow: visible !important;
  margin: 0 !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

#dashboard #dashboardListBoard .patient-name-status > .patient-row-badges,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-status > .patient-row-badges {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  gap: 10px !important;
  width: max-content !important;
  margin: 0 !important;
}

#dashboard #dashboardListBoard .patient-name-wrap > .patient-row-badges,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-wrap > .patient-row-badges {
  flex: 0 0 auto !important;
  width: max-content !important;
  gap: 10px !important;
  margin-left: 15px !important;
}

/* 工作台患者姓名使用 20px 字号。 */
#dashboard #dashboardListBoard .patient-name-link,
html[data-app-theme] body #dashboard #dashboardListBoard .patient-name-link {
  font-size: 20px !important;
  font-weight: 400 !important;
}

/* 素曜白患者详情：患者来源标签和值保持清晰可见。 */
html[data-app-theme="light"] body #patientDetail.view.active .patient-profile-source {
  color: #526174 !important;
  -webkit-text-fill-color: #526174 !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-profile-source > span {
  color: #657386 !important;
  -webkit-text-fill-color: #657386 !important;
}
html[data-app-theme="light"] body #patientDetail.view.active .patient-profile-source > b {
  color: #172033 !important;
  -webkit-text-fill-color: #172033 !important;
  opacity: 1 !important;
}

/* 素曜白税务工具栏：下拉浮层必须位于后续提示条和规则卡上方。 */
html[data-app-theme="light"] body #taxCenter .tax-toolbar {
  position: relative !important;
  z-index: 200 !important;
  overflow: visible !important;
}
html[data-app-theme="light"] body #taxCenter .tax-actions,
html[data-app-theme="light"] body #taxCenter .tax-custom-select {
  position: relative;
  overflow: visible !important;
}
html[data-app-theme="light"] body #taxCenter .tax-custom-select:has(.tax-custom-select-menu:not(.hidden)) {
  z-index: 220 !important;
}
html[data-app-theme="light"] body #taxCenter .tax-custom-select-menu {
  z-index: 240 !important;
  color: #172235 !important;
  -webkit-text-fill-color: #172235 !important;
  border-color: rgba(112, 151, 197, .30) !important;
  background-color: rgba(255, 255, 255, .98) !important;
  background-image: linear-gradient(145deg, #fff, #f6faff) !important;
  box-shadow: 0 16px 34px rgba(49, 78, 112, .16), inset 0 1px rgba(255, 255, 255, .96) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  backdrop-filter: blur(16px) !important;
}
html[data-app-theme="light"] body #taxCenter .tax-custom-select-menu button,
html[data-app-theme="light"] body #taxCenter .tax-custom-select-menu button:is(:hover, :focus-visible, .selected) {
  color: #172235 !important;
  -webkit-text-fill-color: #172235 !important;
}
html[data-app-theme="light"] body #taxCenter .tax-custom-select-menu button:is(:hover, :focus-visible, .selected) {
  background: rgba(219, 239, 255, .78) !important;
}

/* 申报周期与季度范围可能是原生 select，也可能已被系统卡片选择器增强。 */
html[data-app-theme="light"] body #taxCenter :is(#taxPeriod, #taxQuarterRange),
html[data-app-theme="light"] body #taxCenter :is(#taxPeriod, #taxQuarterRange) + .system-card-select .system-card-select-trigger {
  border: 1px solid #c9d9eb !important;
  border-radius: 10px !important;
  background-color: rgba(255, 255, 255, .94) !important;
  box-shadow: inset 0 1px 2px rgba(43, 67, 96, .04) !important;
}
html[data-app-theme="light"] body #taxCenter :is(#taxPeriod, #taxQuarterRange):focus-visible,
html[data-app-theme="light"] body #taxCenter :is(#taxPeriod, #taxQuarterRange) + .system-card-select .system-card-select-trigger:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .20) !important;
  outline-offset: 2px;
}
html[data-app-theme="light"] body #taxCenter #taxQuarterRange + .system-card-select .system-card-select-menu button:disabled {
  color: #9aa8b8 !important;
  -webkit-text-fill-color: #9aa8b8 !important;
  background: transparent !important;
  opacity: .62;
  cursor: not-allowed !important;
}

/* Chrome month input: keep the outer control border, remove internal field rims. */
html[data-app-theme="light"] body #taxCenter #taxMonth {
  display: none !important;
}
html[data-app-theme="light"] body #taxCenter .tax-month-control {
  color: #26364d !important;
  border: 1px solid #d5e2ef !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: inset 0 1px 2px rgba(43, 67, 96, .035) !important;
}
html[data-app-theme="light"] body #taxCenter .tax-month-control > span,
html[data-app-theme="light"] body #taxCenter .tax-month-control > svg {
  color: #26364d !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #taxCenter .tax-month-popover {
  color: #26364d !important;
  border-color: #d5e2ef !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #taxCenter .tax-month-popover :is(strong, button) {
  color: #26364d !important;
  -webkit-text-fill-color: #26364d !important;
}
html[data-app-theme="light"] body #taxCenter .tax-month-popover .tax-month-grid button.selected {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #3674e4 !important;
}
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-datetime-edit,
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-datetime-edit-fields-wrapper,
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-datetime-edit-year-field,
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-datetime-edit-month-field,
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-datetime-edit-text {
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
html[data-app-theme="light"] body #taxCenter #taxMonth::-webkit-calendar-picker-indicator {
  border: 0 !important;
  outline: 0 !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Dashboard appointment board: the outer visit board is the only panel surface. */
html body #dashboard .visit-board {
  min-height: 0 !important;
}

html body #dashboard .visit-board > #dashboardListBoard {
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Night dashboard: use one uninterrupted surface behind tools and appointments. */
html[data-app-theme="night"] body #dashboard .visit-board,
html[data-app-theme="night"] body #dashboard .visit-board:hover,
html[data-app-theme="night"] body #dashboard .visit-board > .visit-tools {
  background-color: #080b0c !important;
  background-image: none !important;
}

/* Dashboard account popover owns its button surfaces in both app themes. */
html body #dashboardAccountPopover .dashboard-theme-picker button {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: center !important;
  min-height: 94px !important;
  padding: 12px !important;
  border: 1px solid #dce5ef !important;
  border-radius: 12px !important;
  color: #44556b !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  text-align: left !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button[data-app-theme-option="night"] {
  color: #f1f5f9 !important;
  border-color: #283140 !important;
  background-color: #151b24 !important;
  background-image: linear-gradient(145deg,#222a36,#111722) !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button.selected {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59,130,246,.12) !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button em {
  position: absolute !important;
  top: 7px !important;
  right: 7px !important;
  display: none !important;
  width: 20px !important;
  height: 20px !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: #2563eb !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button.selected em { display: grid !important; }
html body #dashboardAccountPopover .dashboard-password-reset {
  color: #2563eb !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html body #dashboardAccountPopover .dashboard-password-reset:hover { background: #eef5ff !important; }
html body #dashboardAccountPopover .dashboard-account-logout {
  color: #dc3d3d !important;
  border: 1px solid #ef8b8b !important;
  background: #fff !important;
  box-shadow: none !important;
}
html body #dashboardAccountPopover .dashboard-account-logout:hover {
  border-color: #dc3d3d !important;
  background: #fff4f4 !important;
}
html[data-app-theme="night"] body #dashboardAccountPopover .dashboard-theme-picker button[data-app-theme-option="light"] {
  color: #dce5e1 !important;
  border-color: rgba(255,255,255,.14) !important;
  background-color: rgba(255,255,255,.05) !important;
}
html[data-app-theme="night"] body #dashboardAccountPopover .dashboard-password-reset {
  color: #78a8ff !important;
}
html[data-app-theme="night"] body #dashboardAccountPopover .dashboard-password-reset:hover {
  background: rgba(120,168,255,.08) !important;
}
html[data-app-theme="night"] body #dashboardAccountPopover .dashboard-account-logout {
  color: #ff7878 !important;
  border-color: rgba(255,120,120,.5) !important;
  background: transparent !important;
}

/* Dashboard command center refinements: the task group is content, not a
   nested card; patient search stays deliberately compact on wide screens. */
html body #dashboard .dashboard-task-summary-slot .queue-card.dashboard-task-summary,
html body #dashboard .dashboard-task-summary-slot .queue-card.dashboard-task-summary:hover,
html body #dashboard .dashboard-task-summary-slot .queue-card.dashboard-task-summary:focus-within {
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  transform: none !important;
}
html body #dashboard .dashboard-task-summary-slot .queue-card.dashboard-task-summary::before,
html body #dashboard .dashboard-task-summary-slot .queue-card.dashboard-task-summary::after {
  display: none !important;
  content: none !important;
}
html body #dashboard .dashboard-clause-main > .dashboard-visit-actions .global-search-box {
  flex: 0 1 680px !important;
  width: min(40vw, 680px) !important;
  max-width: 680px !important;
}
html body #dashboard .dashboard-account-menu { margin-left: 6px !important; }

/* The dark preview tile must remain legible even while the app is in the
   light theme and generic light-theme typography overrides are active. */
html body #dashboardAccountPopover .dashboard-theme-picker button[data-app-theme-option="night"] b {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  opacity: 1 !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button[data-app-theme-option="night"] small {
  color: #b8c4d3 !important;
  -webkit-text-fill-color: #b8c4d3 !important;
  opacity: 1 !important;
}
html body #dashboardAccountPopover .dashboard-theme-picker button[data-app-theme-option="night"] .dashboard-theme-icon {
  color: #f1f5f9 !important;
  opacity: 1 !important;
}

@media (max-width: 1180px) {
  html body #dashboard .dashboard-clause-main > .dashboard-visit-actions .global-search-box {
    flex: 1 1 420px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Requested light-theme simplification: task actions share one neutral visual
   level, and account text avatars do not carry an online-status dot. */
html[data-app-theme="light"] body #dashboard .dashboard-task-summary-slot .dashboard-task-summary-actions [data-task-summary-action="assign"],
html[data-app-theme="light"] body #dashboard .dashboard-task-summary-slot .dashboard-task-summary-actions [data-task-summary-action="assign"]:hover,
html[data-app-theme="light"] body #dashboard .dashboard-task-summary-slot .dashboard-task-summary-actions [data-task-summary-action="assign"]:focus-visible {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d5e0ea !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard .dashboard-task-summary-slot .dashboard-task-summary-actions [data-task-summary-action="assign"]:hover,
html[data-app-theme="light"] body #dashboard .dashboard-task-summary-slot .dashboard-task-summary-actions [data-task-summary-action="assign"]:focus-visible {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-color: rgba(59,130,246,.38) !important;
  background-color: #edf6ff !important;
}
html body .dashboard-account-trigger > i,
html body .dashboard-account-popover-avatar > i {
  display: none !important;
}

/* Keep the light-theme assignment action visually equal to the neighboring
   task actions.  The full DOM path intentionally outranks the shared
   `.primary-btn` theme rule without changing the button's behavior. */
html[data-app-theme="light"] body #dashboard #dashboardVisitActions #taskQueues.dashboard-task-summary-slot .dashboard-task-summary .dashboard-task-summary-actions button.primary-btn[data-task-summary-action="assign"],
html[data-app-theme="light"] body #dashboard #dashboardVisitActions #taskQueues.dashboard-task-summary-slot .dashboard-task-summary .dashboard-task-summary-actions button.primary-btn[data-task-summary-action="assign"]:hover,
html[data-app-theme="light"] body #dashboard #dashboardVisitActions #taskQueues.dashboard-task-summary-slot .dashboard-task-summary .dashboard-task-summary-actions button.primary-btn[data-task-summary-action="assign"]:focus-visible {
  color: #475569 !important;
  -webkit-text-fill-color: #475569 !important;
  border-color: #d5e0ea !important;
  background: #fff !important;
  box-shadow: inset 0 1px #fff !important;
}
html[data-app-theme="light"] body #dashboard #dashboardVisitActions #taskQueues.dashboard-task-summary-slot .dashboard-task-summary .dashboard-task-summary-actions button.primary-btn[data-task-summary-action="assign"]::before {
  display: none !important;
  content: none !important;
}

/* Dashboard header alignment: keep the search intentionally compact, anchor
   the divider to the patient action, and render the account name as a real
   adaptive text avatar instead of loose text on the toolbar surface. */
html body #dashboard #dashboardVisitActions .top-actions > .global-search-box {
  flex: 0 1 520px !important;
  width: min(32vw, 520px) !important;
  max-width: 520px !important;
}
html body #dashboard #dashboardVisitActions .top-actions > .dashboard-account-menu {
  align-self: center !important;
  margin-left: auto !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}
html body #dashboard #dashboardVisitActions .dashboard-patient-account-divider {
  align-self: center;
  flex: 0 0 1px;
  width: 1px;
  height: 50px;
  margin-left: 6px;
  background: #dbe5ef;
}
html body #dashboard #dashboardVisitActions .top-new-patient.permission-hidden + .dashboard-patient-account-divider {
  display: none;
}
html[data-app-theme="night"] body #dashboard #dashboardVisitActions .dashboard-patient-account-divider {
  background: rgba(255,255,255,.13);
}
html[data-app-theme="light"] body #dashboard #dashboardAccountTrigger.dashboard-account-trigger {
  width: auto !important;
  min-width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 13px !important;
  border: 1px solid #c8d9ee !important;
  border-radius: 999px !important;
  color: #2457a6 !important;
  -webkit-text-fill-color: #2457a6 !important;
  background-color: #e9f2ff !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255,255,255,.9), 0 4px 12px rgba(70,111,166,.08) !important;
}
html[data-app-theme="light"] body #dashboard #dashboardAccountTrigger.dashboard-account-trigger:hover,
html[data-app-theme="light"] body #dashboard #dashboardAccountTrigger.dashboard-account-trigger[aria-expanded="true"] {
  border-color: #9ebbe2 !important;
  background-color: #dceaff !important;
}

@media (max-width: 1180px) {
  html body #dashboard #dashboardVisitActions .top-actions > .global-search-box {
    flex: 1 1 420px !important;
    width: auto !important;
    max-width: none !important;
  }
}

/* Light-theme denture editor: the add-detail action must remain visible over
   the blue-white modal surface despite the legacy dark modal button rules. */
html[data-app-theme="light"] body #dentureRecordFormModal .inbound-form-toolbar > button.light-btn[data-add-denture-detail-row] {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border: 1px solid #94a3b8 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: inset 0 1px #fff, 0 2px 6px rgba(15,23,42,.06) !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .inbound-form-toolbar > button.light-btn[data-add-denture-detail-row]:hover {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  border-color: #64748b !important;
  background-color: #f1f5f9 !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .inbound-form-toolbar > button.light-btn[data-add-denture-detail-row]:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

/* White-theme denture field selectors need an explicit dark chevron. The
   legacy dark modal skin otherwise leaves the first selector nearly white. */
html[data-app-theme="light"] body #dentureRecordFormModal .denture-factory-product-picker > button[data-open-denture-factory-product] {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-left: 1px solid #cbd5e1 !important;
  background-color: #f8fafc !important;
  background-image: none !important;
  opacity: 1 !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .denture-factory-product-picker > button[data-open-denture-factory-product]:hover {
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  border-left-color: #93b4e5 !important;
  background-color: #edf5ff !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .denture-factory-product-picker > button[data-open-denture-factory-product]:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: -3px;
}

html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-form-table tbody tr[data-denture-detail-row].is-active {
  box-shadow: inset 4px 0 #3b82f6, inset 0 0 0 1px rgba(59, 130, 246, .30) !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-form-table tbody tr[data-denture-detail-row].is-active td {
  background: #eef6ff !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-image-context > span { color: #17212f !important; }
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-image-context > small {
  color: #1d4ed8 !important;
  border-color: rgba(37, 99, 235, .24) !important;
  background: rgba(59, 130, 246, .08) !important;
}
html[data-app-theme="light"] body #dentureRecordFormModal .denture-record-image-context > em { color: #64748b !important; }

/* 素曜白：病历词条分类标头固定使用黑字，覆盖系统按钮的通用蓝色规则。 */
html[data-app-theme="light"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button:not(:disabled),
html[data-app-theme="light"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button:not(:disabled):hover,
html[data-app-theme="light"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button:not(:disabled).active,
html[data-app-theme="light"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button:not(:disabled)[aria-pressed="true"] {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

/* 耀夜黑：病历词条配置跟随系统的近黑表面与绿色状态色。 */
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-type-cards > button {
  color: var(--theme-text) !important;
  border: 1px solid var(--theme-line) !important;
  background: #15191a !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-type-cards > button.active {
  color: var(--theme-text) !important;
  border-color: rgba(104,231,142,.58) !important;
  background: linear-gradient(135deg, rgba(104,231,142,.10), #15191a 52%) !important;
  box-shadow: inset 0 -3px var(--theme-accent) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-type-cards > button span {
  color: var(--theme-muted) !important;
  -webkit-text-fill-color: var(--theme-muted) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-type-cards > button strong {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button {
  color: rgba(247,250,248,.82) !important;
  -webkit-text-fill-color: rgba(247,250,248,.82) !important;
  border: 1px solid rgba(244,248,246,.13) !important;
  background: #171b1c !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-section-tabs > button:is(:hover,.active,[aria-pressed="true"]) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: rgba(104,231,142,.52) !important;
  background: rgba(104,231,142,.10) !important;
  box-shadow: inset 0 -2px var(--theme-accent) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-active-content {
  color: var(--theme-text) !important;
  border-color: var(--theme-line) !important;
  background: #121617 !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-active-content > header {
  border-bottom-color: rgba(244,248,246,.11) !important;
  background: #181d1e !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-active-content :is(h3,strong) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-active-content :is(span,small,p) {
  color: var(--theme-muted) !important;
  -webkit-text-fill-color: var(--theme-muted) !important;
}
html[data-app-theme="night"] body #system .medical-phrase-settings .medical-phrase-entry {
  border-bottom-color: rgba(244,248,246,.09) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-modal {
  background: rgba(2,3,4,.74) !important;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
html[data-app-theme="night"] body .medical-phrase-editor-card {
  color: var(--theme-text) !important;
  border: 1px solid var(--theme-line) !important;
  background: #121617 !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.56), inset 0 1px rgba(255,255,255,.04) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card :is(h2,label) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card header span {
  color: var(--theme-accent) !important;
  -webkit-text-fill-color: var(--theme-accent) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card header button {
  color: var(--theme-muted) !important;
  -webkit-text-fill-color: var(--theme-muted) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card :is(input,select,textarea) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: var(--theme-line) !important;
  background: #090c0d !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card :is(input,textarea)::placeholder {
  color: rgba(247,250,248,.42) !important;
  -webkit-text-fill-color: rgba(247,250,248,.42) !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card .light-btn {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: var(--theme-line) !important;
  background: #1a1f20 !important;
}
html[data-app-theme="night"] body .medical-phrase-editor-card .primary-btn {
  color: #07150e !important;
  -webkit-text-fill-color: #07150e !important;
  border-color: var(--theme-accent) !important;
  background: var(--theme-accent) !important;
  box-shadow: none !important;
}

/* 耀夜黑绩效表：取消灰色斑马纹，统一近黑行底色。 */
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr,
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:nth-child(odd),
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:nth-child(even) {
  color: var(--theme-text) !important;
  background: #0b0e0f !important;
}
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr > td,
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:nth-child(odd) > td,
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:nth-child(even) > td {
  color: rgba(247,250,248,.86) !important;
  border-color: rgba(244,248,246,.08) !important;
  background-color: #0b0e0f !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:hover > td {
  color: var(--theme-text) !important;
  background-color: #141a18 !important;
}
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tbody tr:hover > td:first-child {
  box-shadow: inset 3px 0 var(--theme-accent) !important;
}
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table thead th {
  color: var(--theme-text) !important;
  border-color: rgba(244,248,246,.10) !important;
  background: #171b1c !important;
}
html[data-app-theme="night"] body #billing:not(.expense-only) .performance-table tfoot td {
  color: var(--theme-text) !important;
  border-color: rgba(244,248,246,.10) !important;
  background: #111617 !important;
}

/* 耀夜黑开票中心：使用中性黑色，移除绿色偏色。 */
html[data-app-theme="night"] body #pendingInvoices,
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-center {
  background-color: #020304 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #pendingInvoices :is(
  .pending-invoice-mode-card,
  .pending-invoice-mode-card.active,
  .pending-invoice-panel,
  .pending-invoice-panel > header,
  .pending-invoice-table-wrap,
  .issued-invoice-pagination
) {
  border-color: rgba(244,248,246,.12) !important;
  background-color: #0b0d0e !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table th {
  color: rgba(244,248,246,.72) !important;
  border-color: rgba(244,248,246,.09) !important;
  background: #151819 !important;
}
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr,
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr:nth-child(odd),
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr:nth-child(even),
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr > td,
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr:nth-child(odd) > td,
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr:nth-child(even) > td {
  border-color: rgba(244,248,246,.075) !important;
  background-color: #0b0d0e !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-table tbody tr:hover > td {
  color: #f4f8f6 !important;
  background-color: #131617 !important;
}
html[data-app-theme="night"] body #pendingInvoices :is(
  .pending-invoice-preview,
  .pending-invoice-upload,
  .pending-invoice-review-confirm,
  .pending-invoice-status-toggle,
  .pending-invoice-filters input,
  .pending-invoice-filters select,
  .issued-invoice-range-trigger,
  .issued-invoice-total
) {
  color: rgba(244,248,246,.80) !important;
  border-color: rgba(244,248,246,.14) !important;
  background-color: #151819 !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #pendingInvoices .pending-invoice-thumbnail-item > small {
  color: var(--theme-accent) !important;
  -webkit-text-fill-color: var(--theme-accent) !important;
}

/* 素曜白：库存页头的仓库切换、领用与出库操作统一为黑字黑边框。 */
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > :is(
  [data-inventory-new-record="doctor-issues"],
  [data-inventory-new-record="patient-outbound"],
  [data-open-outbound-export="doctor"],
  [data-open-outbound-export="patient"]
),
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > .inventory-stock-scope-head > button {
  border: 1px solid #111827 !important;
  background: rgba(255, 255, 255, .82) !important;
  background-image: none !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  text-shadow: none !important;
  box-shadow: 0 5px 14px rgba(17, 24, 39, .08) !important;
  opacity: 1 !important;
}

html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > :is(
  [data-inventory-new-record="doctor-issues"],
  [data-inventory-new-record="patient-outbound"],
  [data-open-outbound-export="doctor"],
  [data-open-outbound-export="patient"]
):is(.active, :hover, :focus-visible, :active),
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > .inventory-stock-scope-head > button:is(.active, :hover, :focus-visible, :active) {
  border-color: #000 !important;
  background: #fff !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, .12), 0 7px 18px rgba(17, 24, 39, .1) !important;
}

/* 耀夜黑：库房仓库范围按钮跟随系统的近黑表面与绿色状态色。 */
html[data-app-theme="night"] body #inventory .inventory-module-card .inbound-panel-actions > .inventory-stock-scope-head > button {
  color: rgba(247, 250, 248, .78) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .78) !important;
  border: 1px solid rgba(244, 248, 246, .15) !important;
  background-color: #171b1c !important;
  background-image: none !important;
  text-shadow: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}
html[data-app-theme="night"] body #inventory .inventory-module-card .inbound-panel-actions > .inventory-stock-scope-head > button:is(:hover, :focus-visible) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: rgba(104, 231, 142, .42) !important;
  background-color: #1a201e !important;
}
html[data-app-theme="night"] body #inventory .inventory-module-card .inbound-panel-actions > .inventory-stock-scope-head > button.active {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: rgba(104, 231, 142, .56) !important;
  background: linear-gradient(135deg, rgba(104, 231, 142, .11), #15191a 54%) !important;
  box-shadow: inset 0 -3px var(--theme-accent) !important;
}

/* 耀夜黑：统一分页栏和表尾，避免浅色主题的灰白底残留到各业务板块。 */
html[data-app-theme="night"] body :is(
  .outbound-record-pagination,
  .issued-invoice-pagination,
  .prescription-pagination,
  .charge-import-pagination
) {
  color: rgba(247, 250, 248, .58) !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background-color: #101415 !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body :is(
  .outbound-record-pagination,
  .issued-invoice-pagination,
  .prescription-pagination,
  .charge-import-pagination
) :is(strong, b) {
  color: rgba(247, 250, 248, .86) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .86) !important;
}
html[data-app-theme="night"] body :is(
  .outbound-record-pagination,
  .issued-invoice-pagination,
  .prescription-pagination,
  .charge-import-pagination
) button {
  color: rgba(247, 250, 248, .76) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .76) !important;
  border-color: rgba(244, 248, 246, .15) !important;
  background-color: #181c1d !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body :is(
  .outbound-record-pagination,
  .issued-invoice-pagination,
  .prescription-pagination,
  .charge-import-pagination
) button:hover:not(:disabled) {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  border-color: rgba(104, 231, 142, .46) !important;
  background-color: rgba(104, 231, 142, .08) !important;
}
html[data-app-theme="night"] body :is(
  .outbound-record-pagination,
  .issued-invoice-pagination,
  .prescription-pagination,
  .charge-import-pagination
) button:disabled {
  color: rgba(247, 250, 248, .30) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .30) !important;
  background-color: #131718 !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body .view table tfoot,
html[data-app-theme="night"] body .view table tfoot tr,
html[data-app-theme="night"] body .view table tfoot td {
  border-color: rgba(244, 248, 246, .10) !important;
  background-color: #111516 !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* 耀夜黑：医生领用明细的物资类型与费用状态使用深底高对比标签。 */
html[data-app-theme="night"] body #inventory .unified-outbound-table .movement-type {
  color: #b9d8ff !important;
  -webkit-text-fill-color: #b9d8ff !important;
  border: 1px solid rgba(96, 165, 250, .34) !important;
  background-color: rgba(37, 99, 235, .18) !important;
  background-image: none !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inventory .unified-outbound-table .movement-type.patient_use {
  color: #a8f0cf !important;
  -webkit-text-fill-color: #a8f0cf !important;
  border-color: rgba(104, 231, 142, .32) !important;
  background-color: rgba(104, 231, 142, .11) !important;
}
html[data-app-theme="night"] body #inventory .unified-outbound-table .fee-impact,
html[data-app-theme="night"] body #inventory .unified-outbound-table .fee-impact.charged {
  color: #ffd19a !important;
  -webkit-text-fill-color: #ffd19a !important;
  border: 1px solid rgba(251, 191, 36, .34) !important;
  background-color: rgba(180, 83, 9, .20) !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* 耀夜黑：入库搜索框与搜索结果统一使用深色高对比表面。 */
html[data-app-theme="night"] body #inventory .inventory-global-search > input[type="search"] {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  caret-color: var(--theme-accent) !important;
  border-color: rgba(244, 248, 246, .22) !important;
  background-color: #171b1c !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search > input[type="search"]::placeholder {
  color: rgba(247, 250, 248, .48) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .48) !important;
  opacity: 1 !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search > input[type="search"]:focus {
  border-color: rgba(104, 231, 142, .66) !important;
  outline: 3px solid rgba(104, 231, 142, .10) !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search .inbound-search-results {
  color: var(--theme-text) !important;
  border-color: rgba(244, 248, 246, .14) !important;
  background-color: #101415 !important;
  background-image: none !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, .46) !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search .inbound-search-results > :is(button, span) {
  color: rgba(247, 250, 248, .66) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .66) !important;
  border-color: rgba(244, 248, 246, .09) !important;
  background-color: #15191a !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search .inbound-search-results > button strong {
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search .inbound-search-results > button span {
  color: rgba(247, 250, 248, .58) !important;
  -webkit-text-fill-color: rgba(247, 250, 248, .58) !important;
}
html[data-app-theme="night"] body #inventory .inventory-global-search .inbound-search-results > button:is(:hover, :focus-visible) {
  color: var(--theme-text) !important;
  border-color: rgba(104, 231, 142, .26) !important;
  background-color: rgba(104, 231, 142, .08) !important;
  outline: none !important;
}

/* 入库搜索定位：点击结果后在下方记录表中明确标记目标行。 */
html[data-app-theme="light"] body #inventory .inbound-project-table tbody tr.inbound-search-selected > td {
  border-top-color: rgba(37, 99, 235, .28) !important;
  border-bottom-color: rgba(37, 99, 235, .28) !important;
  background-color: #eaf3ff !important;
  background-image: none !important;
}
html[data-app-theme="light"] body #inventory .inbound-project-table tbody tr.inbound-search-selected > td:first-child {
  box-shadow: inset 4px 0 #2563eb !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected > td {
  color: #eef8f1 !important;
  -webkit-text-fill-color: #eef8f1 !important;
  border-top-color: rgba(104, 231, 142, .30) !important;
  border-bottom-color: rgba(104, 231, 142, .30) !important;
  background-color: #14231b !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected > td:first-child {
  box-shadow: inset 4px 0 var(--theme-accent) !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected > td :is(strong, small, span) {
  color: #eef8f1 !important;
  -webkit-text-fill-color: #eef8f1 !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected .inbound-detail-view-btn {
  color: #bdf5ce !important;
  -webkit-text-fill-color: #bdf5ce !important;
  border-color: rgba(104, 231, 142, .36) !important;
  background-color: #1b3023 !important;
  background-image: none !important;
}

/* 耀夜黑：入库记录行悬停时保持深色，避免通用浅色 hover 覆盖文字。 */
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr:hover > td {
  color: #eef4f1 !important;
  -webkit-text-fill-color: #eef4f1 !important;
  border-color: rgba(244, 248, 246, .11) !important;
  background-color: #181d1e !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr:hover > td :is(strong, small, span) {
  color: #eef4f1 !important;
  -webkit-text-fill-color: #eef4f1 !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected:hover > td {
  color: #f4fbf6 !important;
  -webkit-text-fill-color: #f4fbf6 !important;
  border-color: rgba(104, 231, 142, .34) !important;
  background-color: #192d22 !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr:hover .inbound-detail-view-btn {
  color: #dff7e6 !important;
  -webkit-text-fill-color: #dff7e6 !important;
  border-color: rgba(244, 248, 246, .18) !important;
  background-color: #202627 !important;
  background-image: none !important;
}
html[data-app-theme="night"] body #inventory .inbound-project-table tbody tr.inbound-search-selected:hover .inbound-detail-view-btn {
  color: #bdf5ce !important;
  -webkit-text-fill-color: #bdf5ce !important;
  border-color: rgba(104, 231, 142, .42) !important;
  background-color: #213b2a !important;
}

/* 工作台操作完成态必须高于浅色主题的普通/选中行按钮规则。 */
html[data-app-theme="light"] body #dashboard #dashboardListBoard .visit-table tbody tr .table-plus.neon-button:is(
  .arrived,
  .planned,
  .charged,
  .recorded,
  .scheduled,
  .followed,
  .issued,
  .treatment-completed
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: #168dff !important;
  background: #168dff !important;
  box-shadow: 0 0 0 1px rgba(22, 141, 255, .16), 0 10px 22px rgba(22, 141, 255, .2) !important;
}

html[data-app-theme="light"] body #patients .patients-pagination {
  color: #718096 !important;
  border-top-color: #e1e9f1 !important;
}

html[data-app-theme="light"] body #patients .patients-pagination button {
  color: #334155 !important;
  -webkit-text-fill-color: #334155 !important;
  border-color: #d7e1eb !important;
  background: #fff !important;
}

html[data-app-theme="night"] body #patients .patients-pagination {
  color: #8d9996 !important;
  border-top-color: rgba(255, 255, 255, .09) !important;
}

html[data-app-theme="night"] body #patients .patients-pagination button {
  color: #dfe6e3 !important;
  -webkit-text-fill-color: #dfe6e3 !important;
  border-color: rgba(255, 255, 255, .12) !important;
  background: rgba(255, 255, 255, .045) !important;
}
html[data-app-theme="light"] body .inbound-project-table .inbound-qualification-link {
  border: 1px solid #aec5df !important;
  background: linear-gradient(180deg, #ffffff, #f2f7fd) !important;
  color: #294866 !important;
  box-shadow: 0 2px 7px rgba(42, 75, 108, .10) !important;
}

html[data-app-theme="light"] body .inbound-project-table button[data-inbound-supplier-qualification] {
  border-color: #8fcac5 !important;
  background: linear-gradient(180deg, #ffffff, #edf9f7) !important;
  color: #176f68 !important;
}

html[data-app-theme="light"] body .inbound-project-table .inbound-qualification-link:hover,
html[data-app-theme="light"] body .inbound-project-table .inbound-qualification-link:focus-visible {
  border-color: #3674e4 !important;
  box-shadow: 0 0 0 3px rgba(54, 116, 228, .14) !important;
}
/* 患者出库入口：患者中心是右侧浮层，左侧必须透出独立遮罩。 */
html[data-app-theme="light"] body #patientDetail.view.active.patient-outbound-center-overlay,
html[data-app-theme="night"] body #patientDetail.view.active.patient-outbound-center-overlay,
body #patientDetail.view.active.patient-outbound-center-overlay {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body > .patient-outbound-center-backdrop,
html[data-app-theme="night"] body > .patient-outbound-center-backdrop,
body > .patient-outbound-center-backdrop {
  opacity: 1 !important;
  background-color: rgba(8, 20, 34, .64) !important;
  background-image: none !important;
}

html[data-app-theme="light"] body #patientDetail .patient-material-category-button {
  border: 1px solid #b9cddd !important;
  background: #fff !important;
  color: #52677b !important;
  -webkit-text-fill-color: #52677b !important;
}

html[data-app-theme="light"] body #patientDetail .patient-material-category-button.active {
  border-color: #3b82f6 !important;
  background: #eaf3ff !important;
  color: #1d4ed8 !important;
  -webkit-text-fill-color: #1d4ed8 !important;
  box-shadow: inset 0 -3px #3b82f6, 0 4px 12px rgba(59,130,246,.13) !important;
}

/* 耀夜黑：种植记录页使用实际的 app-theme 标记进行完整覆盖。 */
html[data-app-theme="night"] body #implantRecords .implant-record-ledger-title :is(h2, p) {
  color: #f2f2f2 !important;
  -webkit-text-fill-color: currentColor !important;
}

html[data-app-theme="night"] body #implantRecords .implant-record-ledger-title p { color: #a3a3a3 !important; }

html[data-app-theme="night"] body #implantRecords .implant-record-ledger-filters {
  border-color: rgba(255, 255, 255, .12) !important;
  background: #0d0d0d !important;
  background-image: none !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .32) !important;
}

html[data-app-theme="night"] body #implantRecords .implant-record-ledger-filters label {
  color: #b8b8b8 !important;
  -webkit-text-fill-color: #aeb9b5 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-record-ledger-filters :is(input, select) {
  border-color: rgba(255, 255, 255, .14) !important;
  background: #171717 !important;
  background-image: none !important;
  color: #ededed !important;
  -webkit-text-fill-color: #ededed !important;
  box-shadow: none !important;
  color-scheme: dark;
}

html[data-app-theme="night"] body #implantRecords .implant-record-ledger-filters input::placeholder {
  color: #858585 !important;
  -webkit-text-fill-color: #858585 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-summary span {
  border-color: rgba(255, 255, 255, .12) !important;
  background: #151515 !important;
  color: #bdbdbd !important;
  -webkit-text-fill-color: #bdbdbd !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-record {
  border-color: rgba(255, 255, 255, .12) !important;
  background: #0b0b0b !important;
  background-image: none !important;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .36) !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-record > header {
  border-bottom-color: rgba(255, 255, 255, .1) !important;
  background: #111 !important;
  background-image: none !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-patient-link {
  color: #6fe3f0 !important;
  -webkit-text-fill-color: #6fe3f0 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-record > header small {
  color: #a8a8a8 !important;
  -webkit-text-fill-color: #a8a8a8 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-record-actions > span {
  color: #76dda0 !important;
  -webkit-text-fill-color: #76dda0 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-table-wrap table {
  border-color: rgba(255, 255, 255, .12) !important;
  background: #0e0e0e !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-table-wrap th {
  border-bottom-color: rgba(255, 255, 255, .12) !important;
  background: #1a1a1a !important;
  color: #cecece !important;
  -webkit-text-fill-color: #cecece !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-table-wrap td {
  border-bottom-color: rgba(255, 255, 255, .085) !important;
  background: #101010 !important;
  color: #e5e5e5 !important;
  -webkit-text-fill-color: #e5e5e5 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-table-wrap tbody tr:hover td { background: #1c1c1c !important; }
html[data-app-theme="night"] body #implantRecords .implant-ledger-udi,
html[data-app-theme="night"] body #implantRecords .implant-ledger-udi button { color: #65d7e7 !important; -webkit-text-fill-color: #65d7e7 !important; }

html[data-app-theme="night"] body #implantRecords .implant-ledger-signatures {
  border-color: rgba(255, 255, 255, .12) !important;
  background: #101010 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-signatures strong { color: #e8e8e8 !important; -webkit-text-fill-color: #e8e8e8 !important; }
html[data-app-theme="night"] body #implantRecords .implant-ledger-signatures small,
html[data-app-theme="night"] body #implantRecords .implant-ledger-signatures button span { color: #9aa8a2 !important; -webkit-text-fill-color: #9aa8a2 !important; }
html[data-app-theme="night"] body #implantRecords .implant-ledger-signatures button { border-color: rgba(255, 255, 255, .14) !important; background: #090909 !important; }

html[data-app-theme="night"] body #implantRecords .implant-ledger-pagination button {
  border-color: rgba(255, 255, 255, .13) !important;
  background: #171717 !important;
  color: #d8d8d8 !important;
  -webkit-text-fill-color: #d8d8d8 !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-pagination span,
html[data-app-theme="night"] body #implantRecords :is(.implant-ledger-empty, .implant-ledger-empty-value) {
  color: #aaa !important;
  -webkit-text-fill-color: #aaa !important;
}

html[data-app-theme="night"] body #implantRecords .implant-ledger-empty {
  border-color: rgba(255, 255, 255, .14) !important;
  background: #0e0e0e !important;
}

/* 素曜白：医生与耗材类型的自定义下拉按钮与前方筛选框保持一致。 */
html[data-app-theme="light"] body #implantRecords :is(#implantRecordLedgerDoctor, #implantRecordLedgerKind) + .system-card-select > .system-card-select-trigger {
  box-sizing: border-box !important;
  border: 1px solid #cad6e2 !important;
  border-radius: 9px !important;
  background-color: #fff !important;
  background-image: none !important;
  color: #3e5368 !important;
  -webkit-text-fill-color: #3e5368 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 2px 7px rgba(49, 79, 107, .06) !important;
}

html[data-app-theme="light"] body #implantRecords :is(#implantRecordLedgerDoctor, #implantRecordLedgerKind) + .system-card-select > .system-card-select-trigger:hover {
  border-color: #8dcbd8 !important;
}

html[data-app-theme="light"] body #implantRecords :is(#implantRecordLedgerDoctor, #implantRecordLedgerKind) + .system-card-select > .system-card-select-trigger:focus-visible,
html[data-app-theme="light"] body #implantRecords :is(#implantRecordLedgerDoctor, #implantRecordLedgerKind) + .system-card-select.open > .system-card-select-trigger {
  border-color: #4b86e8 !important;
  box-shadow: 0 0 0 3px rgba(75, 134, 232, .13) !important;
  outline: 0 !important;
}

/* 素曜白库存总览：四张统计卡使用连续纯白表面，标题与数据不再分区着色。 */
html[data-app-theme="light"] body #inventory :is(.inventory-dashboard-stat-card, .inventory-dashboard-alert-card) {
  color: #172235 !important;
  border-color: rgba(121, 151, 181, .22) !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: 0 10px 26px rgba(66, 96, 126, .08), inset 0 1px rgba(255, 255, 255, .95) !important;
}

html[data-app-theme="light"] body #inventory :is(.inventory-dashboard-stat-card, .inventory-dashboard-alert-card) > header {
  color: #172235 !important;
  border: 0 !important;
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #inventory :is(
  .inventory-dashboard-stat-pair > button,
  .inventory-dashboard-stat-pair > div,
  .inventory-dashboard-alert-card > div,
  .inventory-dashboard-alert-card > div > button,
  .inventory-dashboard-alert-card > div > div
) {
  background-color: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}

html[data-app-theme="light"] body #inventory .inventory-dashboard-stat-pair > button:hover {
  background: #f8fbff !important;
}

html[data-app-theme="light"] body #inventory .inventory-dashboard-period {
  border-color: #d3dfeb !important;
  background: #fff !important;
}

html[data-app-theme="light"] body #inventory .inventory-dashboard-period button {
  color: #466078 !important;
  border-right-color: #d3dfeb !important;
  background: #fff !important;
}

html[data-app-theme="light"] body #inventory .inventory-dashboard-period button.active {
  color: #087f98 !important;
  background: #eefafd !important;
}

html[data-app-theme="light"] body #inventory .inventory-dashboard-alert-grid .inventory-dashboard-alert-card:first-child > div > :is(button, div) :is(strong, span) {
  color: #dc2626 !important;
  -webkit-text-fill-color: #dc2626 !important;
}

/* 素曜白供应商管理：明细区域使用纯白底板，不叠加蓝白渐变或青色光晕。 */
html[data-app-theme="light"] body #inventory .supplier-management-module::before,
html[data-app-theme="light"] body #inventory .supplier-management-module::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
  background: none !important;
}

html[data-app-theme="light"] body #inventory :is(
  .supplier-management-dashboard,
  .supplier-management-toolbar,
  .supplier-management-content,
  .supplier-management-list-panel,
  .supplier-management-list-panel > header,
  .supplier-management-columns,
  .supplier-management-list,
  .supplier-management-row,
  .supplier-management-row-main,
  .supplier-management-list-panel > .inventory-auto-pagination
) {
  background-color: #fff !important;
  background-image: none !important;
}

html[data-app-theme="light"] body #inventory .supplier-management-list-panel {
  box-shadow: 0 10px 26px rgba(66, 96, 126, .07) !important;
}

/* 耀夜黑库存总览：清除基础组件遗留的白色底板。 */
html[data-app-theme="night"] body #inventory .inventory-dashboard-stat-pair > :is(button, div) {
  border-color: rgba(255, 255, 255, .08) !important;
  background-color: #171717 !important;
  background-image: none !important;
  color: #f2f2f2 !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-stat-pair > button:hover {
  background-color: #252525 !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-stat-pair :is(strong, span) {
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-scope button {
  border-color: rgba(255, 255, 255, .14) !important;
  background-color: #171717 !important;
  background-image: none !important;
  color: #bdbdbd !important;
  -webkit-text-fill-color: #bdbdbd !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-scope button.active {
  border-color: #777 !important;
  background-color: #303030 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-warehouse-summary {
  border-color: rgba(255, 255, 255, .12) !important;
  background-color: #151515 !important;
  background-image: none !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-warehouse-summary span {
  border-color: rgba(255, 255, 255, .1) !important;
  color: #bdbdbd !important;
  -webkit-text-fill-color: #bdbdbd !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-warehouse-summary strong {
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
}

html[data-app-theme="night"] body #inventory .inventory-dashboard-scope {
  background: #101010 !important;
  border-color: #383838 !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inventory .inventory-dashboard-scope button:hover {
  background: #292929 !important;
  border-color: #777 !important;
}
html[data-app-theme="night"] body #inventory .inventory-dashboard-scope button:focus-visible {
  outline: 2px solid #aaa;
  outline-offset: 2px;
}

/* 耀夜黑物资档案：搜索与新增工具栏跟随深色主题。 */
html[data-app-theme="night"] body #inventory .material-archive-static-toolbar,
html[data-app-theme="night"] body #inventory .supplier-management-toolbar {
  border-color: rgba(255, 255, 255, .12) !important;
  background-color: #111718 !important;
  background-image: none !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28) !important;
}

html[data-app-theme="night"] body #inventory .material-archive-query-control > label {
  color: #aeb9b5 !important;
  -webkit-text-fill-color: #aeb9b5 !important;
}

html[data-app-theme="night"] body #inventory .material-archive-query-control input {
  color: #edf3f0 !important;
  -webkit-text-fill-color: #edf3f0 !important;
  caret-color: #68e78e !important;
  border-color: rgba(255, 255, 255, .16) !important;
  background-color: #1b2223 !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body #inventory .material-archive-query-control input::placeholder {
  color: #74827d !important;
  -webkit-text-fill-color: #74827d !important;
  opacity: 1 !important;
}

html[data-app-theme="night"] body #inventory .material-archive-query-control input:focus {
  border-color: rgba(104, 231, 142, .62) !important;
  box-shadow: 0 0 0 3px rgba(104, 231, 142, .10) !important;
}

html[data-app-theme="night"] body #inventory .material-archive-create {
  color: #b9f5ca !important;
  -webkit-text-fill-color: #b9f5ca !important;
  border-color: rgba(104, 231, 142, .42) !important;
  background-color: #17201d !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .035) !important;
}

html[data-app-theme="night"] body #inventory .material-archive-create:is(:hover, :focus-visible) {
  color: #e8fff0 !important;
  -webkit-text-fill-color: #e8fff0 !important;
  border-color: rgba(104, 231, 142, .7) !important;
  background-color: #203028 !important;
  box-shadow: 0 0 0 3px rgba(104, 231, 142, .09) !important;
}

/* 耀夜黑供应商管理：头像与供应商编号使用夜间高对比样式。 */
html[data-app-theme="night"] body #inventory .supplier-management-avatar {
  color: #9ee8b4 !important;
  -webkit-text-fill-color: #9ee8b4 !important;
  border: 1px solid rgba(104, 231, 142, .24) !important;
  background-color: #1b2924 !important;
  background-image: none !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .04) !important;
}

html[data-app-theme="night"] body #inventory .supplier-management-company small {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  opacity: .92 !important;
}

/* White-theme debt collection: visible actions and outlined form controls. */
html[data-app-theme="light"] body #patientDetailContent #patientDebtCollectionPage button {
  color: #24546c !important;
  -webkit-text-fill-color: #24546c !important;
  background: #fff !important;
  border: 1px solid #b9d1e1 !important;
  border-radius: 10px;
  min-height: 38px;
  padding: 8px 16px;
}
html[data-app-theme="light"] body #patientDetailContent #patientDebtCollectionPage button.primary-btn {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #3478ef !important;
  border-color: #3478ef !important;
}
html[data-app-theme="light"] body #patientDetailContent #patientDebtCollectionPage :is(input:not([type="checkbox"]), select, textarea) {
  color: #24374a !important;
  -webkit-text-fill-color: #24374a !important;
  background: #fff !important;
  border: 1px solid #b9cedf !important;
  box-shadow: inset 0 1px 2px rgba(31,66,91,.04) !important;
  border-radius: 10px !important;
  min-height: 38px;
  padding: 9px 12px !important;
}
html[data-app-theme="light"] body #patientDetailContent #patientDebtCollectionPage :is(input,select,textarea):focus-visible {
  outline: 2px solid #72b6f8;
  outline-offset: 2px;
}
html[data-app-theme="light"] body #patientDetailContent #patientDebtCollectionPage form > section {
  border: 1px solid #c2d8e7 !important;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection {
  padding: 14px 18px;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection h3 {
  margin-bottom: 10px;
  padding-bottom: 8px;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection :is(th,td) {
  height: auto !important;
  padding: 9px 12px !important;
  line-height: 1.4;
}
body #patientDetailContent #patientDebtCollectionPage input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  accent-color: #3478ef;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-discount {
  margin-top: 10px;
  gap: 18px;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-discount label {
  white-space: nowrap;
  flex-shrink: 0;
}
body #patientDetailContent #patientDebtCollectionPage .patient-debt-discount input {
  width: 110px;
}

/* Debt selection uses a row tint without vertical selected-cell separators. */
html[data-app-theme] body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection tbody tr.selected > td {
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
}
html[data-app-theme] body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection tbody tr.selected > td::before,
html[data-app-theme] body #patientDetailContent #patientDebtCollectionPage .patient-debt-selection tbody tr.selected > td::after {
  content: none !important;
}

/* Keep tooth selection states distinct from the modal's default blue buttons. */
html body #chargeProjectPickerModal .picker-tooth-editor button[aria-pressed="false"] {
  background: #fff !important;
  border: 1px solid #bfd1e8 !important;
  color: #35516f !important;
  -webkit-text-fill-color: #35516f !important;
}
html body #chargeProjectPickerModal .picker-tooth-editor button[aria-pressed="true"] {
  background: #2563eb !important;
  border: 1px solid #2563eb !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: inset 0 0 0 1px #fff !important;
}
html body #chargeProjectPickerModal .picker-tooth-trigger small {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
html body #chargeProjectPickerModal :is(.picker-tooth-editor button, .picker-tooth-trigger):focus-visible {
  outline: 2px solid #0b92c9;
  outline-offset: 2px;
}
html[data-app-theme="night"] body #chargeProjectPickerModal .picker-tooth-editor button[aria-pressed="false"] {
  background: #22362b !important;
  border-color: #527060 !important;
  color: #e1ede6 !important;
  -webkit-text-fill-color: #e1ede6 !important;
}

html body #chargeProjectPickerModal .charge-project-picker-selected-row > button.picker-tooth-trigger,
html[data-app-theme] body #chargeProjectPickerModal .charge-project-picker-selected-row > button.picker-tooth-trigger:is(:hover, :active, :focus) {
  border: 1px solid #c9dcf4 !important;
  border-radius: 8px !important;
  background: #f0f6ff !important;
  color: #204a83 !important;
  -webkit-text-fill-color: #204a83 !important;
}
html body #chargeProjectPickerModal .picker-project-tooth-number {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}
html[data-app-theme="night"] body #chargeProjectPickerModal .charge-project-picker-selected-row > button.picker-tooth-trigger,
html[data-app-theme="night"] body #chargeProjectPickerModal .charge-project-picker-selected-row > button.picker-tooth-trigger:is(:hover, :active, :focus) {
  background: #22362b !important;
  border-color: #527060 !important;
  color: #e1ede6 !important;
  -webkit-text-fill-color: #e1ede6 !important;
}

/* Inbound receipt details share the system's black surfaces in night mode. */
html[data-app-theme="night"] body #inboundDetailPreviewModal :is(.inbound-receipt-summary, .inbound-detail-preview-table-wrap, .inbound-image-strip button, .inbound-image-strip button small) {
  background: #171717 !important;
  border-color: #383838 !important;
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal :is(.inbound-receipt-summary span, .inventory-module-table th) {
  background: #242424 !important;
  border-color: #383838 !important;
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal .inventory-module-table :is(tr, td) {
  background: #171717 !important;
  border-color: #383838 !important;
  color: var(--theme-text) !important;
  -webkit-text-fill-color: var(--theme-text) !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal .inventory-module-table tbody tr:hover td {
  background: #222 !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal .inbound-receipt-summary small {
  color: var(--theme-muted) !important;
  -webkit-text-fill-color: var(--theme-muted) !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal .inbound-image-strip button img {
  border-color: #383838 !important;
}
html[data-app-theme="night"] body #inboundDetailPreviewModal .inbound-image-strip button:is(:hover, :focus-visible) {
  background: #292929 !important;
  border-color: #777 !important;
}

/* Denture expense summaries and grouped rows use neutral night surfaces. */
html[data-app-theme="night"] body #monthlyExpenseContent :is(.expense-denture-factory-summary, .expense-denture-direct-summary, .expense-denture-direct-summary article, .expense-denture-direct-table-wrap, .expense-denture-direct-table) {
  background: #171717 !important;
  border-color: #383838 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-summary :is(span, strong) {
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-summary span {
  color: #bdbdbd !important;
  -webkit-text-fill-color: #bdbdbd !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-summary article.total {
  background: #242424 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-table :is(tr, th, td) {
  background: #171717 !important;
  border-color: #383838 !important;
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-table :is(th, .expense-denture-factory-total td, tfoot td) {
  background: #242424 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-table tbody tr:not(.expense-denture-factory-total):hover td {
  background: #292929 !important;
}
html[data-app-theme="night"] body #monthlyExpenseContent .expense-denture-direct-table .expense-denture-empty-factory td {
  color: #bdbdbd !important;
  -webkit-text-fill-color: #bdbdbd !important;
}

/* Patient form actions and custom selects follow the neutral black theme. */
html[data-app-theme="night"] body #patientModal.patient-modal #patientForm .patient-modal-actions .save-btn {
  border-color: #666 !important;
  background: #303030 !important;
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .12) !important;
}
html[data-app-theme="night"] body #patientModal.patient-modal #patientForm .patient-modal-actions .save-btn:is(:hover, :focus-visible) {
  background: #3a3a3a !important;
  border-color: #888 !important;
}
html[data-app-theme="night"] body #patientModal #patientForm .patient-card-select-trigger i {
  border-color: #bdbdbd !important;
}
html[data-app-theme="night"] body #patientModal #patientForm .patient-card-select-trigger:is(:hover, [aria-expanded="true"]) {
  background: #242424 !important;
  border-color: #777 !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #patientModal #patientForm .patient-card-select-menu {
  background: #171717 !important;
  border-color: #444 !important;
}
html[data-app-theme="night"] body #patientModal #patientForm .patient-card-select-menu button {
  background: transparent !important;
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
  box-shadow: none !important;
}
html[data-app-theme="night"] body #patientModal #patientForm .patient-card-select-menu button:is(:hover, :focus-visible, [aria-selected="true"]) {
  background: #333 !important;
  border-color: #666 !important;
  box-shadow: none !important;
}

html[data-app-theme="night"] body #pendingInvoices .invoice-inline-upload-card {
  background: #171717 !important; border-color: #383838 !important;
}
html[data-app-theme="night"] body #pendingInvoices .invoice-inline-upload-preview {
  background: #101010 !important; border-color: #444 !important;
}
html[data-app-theme="night"] body #pendingInvoices .invoice-inline-upload-actions button {
  background: #242424 !important; border-color: #444 !important; color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important; box-shadow: none !important;
}
html[data-app-theme="night"] body #pendingInvoices .invoice-inline-upload-actions button:enabled:hover {
  background: #333 !important; border-color: #777 !important;
}
html[data-app-theme="night"] body #pendingInvoices :is(.invoice-inline-upload-caption small, .invoice-inline-upload-preview > span) {
  color: #bdbdbd !important; -webkit-text-fill-color: #bdbdbd !important;
}
html[data-app-theme="night"] body #pendingInvoices .invoice-inline-upload-caption strong {
  color: #f2f2f2 !important; -webkit-text-fill-color: #f2f2f2 !important;
}

/* Invoice compact layout uses the existing white / neutral black themes. */
#pendingInvoices { --invoice-surface: #151515; --invoice-border: #383838; --invoice-muted: #aaa; --invoice-accent: #ededed; --invoice-soft: #2b2b2b; }
html[data-app-theme="light"] #pendingInvoices { --invoice-surface: #fff; --invoice-border: #e0e8f1; --invoice-muted: #748398; --invoice-accent: #3269c5; --invoice-soft: #edf3fc; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .invoice-inline-upload-card { background: var(--invoice-surface) !important; background-image: none !important; border-color: var(--invoice-border) !important; box-shadow: none !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .invoice-compact-tabs button { background: transparent !important; color: var(--invoice-muted) !important; -webkit-text-fill-color: currentColor !important; box-shadow: none !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .invoice-compact-tabs button.active,
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .invoice-compact-detail { color: var(--invoice-accent) !important; -webkit-text-fill-color: currentColor !important; background: transparent !important; box-shadow: none !important; }
html[data-app-theme="light"] body #pendingInvoices .invoice-compact-workspace .pending-invoice-table tbody td { background: #fff !important; }
html[data-app-theme="light"] body #pendingInvoices .invoice-compact-workspace .pending-invoice-table tbody tr:hover td { background: #f8fbff !important; }
html[data-app-theme="light"] body #pendingInvoices .invoice-compact-workspace .invoice-inline-upload-actions button { background: #f5f8fd !important; border-color: #e0e8f1 !important; box-shadow: none !important; color: #526b8a !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace { background: var(--invoice-surface) !important; border: 1px solid var(--invoice-border) !important; border-radius: 14px !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-tabs button.active { border-bottom: 3px solid var(--invoice-accent) !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .invoice-inline-upload-actions button { height: 28px !important; min-height: 28px !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-workspace .pending-invoice-table th:nth-child(2) { text-align: left; }
html[data-app-theme="night"] body #pendingInvoices .invoice-compact-workspace :is(.pending-invoice-export, .pending-invoice-review-confirm, .issued-invoice-total, .performance-range-trigger, input[type="search"]) { background: #242424 !important; border-color: #444 !important; color: #ededed !important; -webkit-text-fill-color: #ededed !important; box-shadow: none !important; }
html[data-app-theme="night"] body #pendingInvoices .invoice-compact-workspace .pending-invoice-export:disabled { opacity: .45; }
html[data-app-theme="night"] body #pendingInvoices .invoice-compact-workspace .pending-invoice-table th { background: #202020 !important; }
html[data-app-theme="night"] body #pendingInvoices .invoice-compact-workspace :is(.invoice-compact-status, .invoice-compact-hint) { background: transparent !important; }
html[data-app-theme] body #pendingInvoices .invoice-compact-tabs button:not(.active) { border-bottom-color: transparent !important; }

/* Grouped settings workspace: share the available width with the active panel. */
html[data-app-theme="night"] body #system.view { --settings-surface: #202222; --settings-ink: #eef2f4; --settings-muted: #a6b0b8; --settings-rule: #3b4146; --settings-selected: #263d58; --settings-blue: #86b6ff; }
/* Match the active view specificity: legacy #system.view.active also defines
   these tokens, including the surface consumed by the menu and every panel. */
html[data-app-theme="light"] body #system.view {
  --settings-canvas: #f4f7fb;
  --settings-surface: #fff;
  --settings-surface-raised: #f5f8fd;
  --settings-ink: #25364a;
  --settings-text: #25364a;
  --settings-muted: #738399;
  --settings-rule: #e3eaf2;
  --settings-line: #e3eaf2;
  --settings-line-strong: #c7d7ed;
  --settings-selected: #edf4ff;
  --settings-blue: #2966d8;
  --settings-accent: #2966d8;
}
body #system .settings-page-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 0 18px; }
body #system .settings-page-heading h2 { margin:0; font-size:24px; }
body #system #settingsSearch { width:340px; max-width:60%; min-height:40px; }
html[data-app-theme] body #system :is(.settings-console,.settings-layout,.settings-content,.system-grid) { width:100%; max-width:none; min-width:0; background:transparent!important; box-shadow:none!important; border:0!important; }
html[data-app-theme] body #system .settings-layout { display:grid; grid-template-columns:170px minmax(0,1fr); align-items:start; gap:20px; padding:0!important; }
html[data-app-theme] body #system .settings-menu { display:block; min-height:0; padding:14px 10px!important; border:1px solid var(--settings-rule)!important; border-radius:12px!important; background:var(--settings-surface)!important; box-shadow:none!important; top:12px; }
body #system .settings-menu-group { margin:0 0 16px; border:0; background:none; }
body #system .settings-menu-group:last-of-type { margin-bottom:0; }
body #system .settings-group-label { margin:0 12px 5px; font-size:12px; font-weight:500; color:var(--settings-muted); }
body #system .settings-submenu { display:grid; gap:2px; padding:0; }
html[data-app-theme] body #system .settings-submenu button { width:100%; min-height:36px; padding:8px 12px; text-align:left; border:0!important; border-radius:7px!important; color:var(--settings-ink)!important; background:transparent!important; box-shadow:none!important; font-size:14px; font-weight:500; }
html[data-app-theme] body #system .settings-submenu button:is(.active,:hover) { color:var(--settings-blue)!important; background:var(--settings-selected)!important; }
body #system [hidden], body #system .permission-hidden { display:none!important; }
html[data-app-theme] body #system .system-grid.settings-panel-single { grid-template-columns:minmax(0,1fr); }
html[data-app-theme] body #system .system-panel { width:100%; max-width:none; min-width:0; padding:22px; border:1px solid var(--settings-rule)!important; border-radius:12px!important; background:var(--settings-surface)!important; box-shadow:none!important; }
body #system .system-panel.settings-panel-hidden { display:none!important; }
html[data-app-theme] body #system :is(.system-actions,.system-list) { background:transparent!important; box-shadow:none!important; }
body #system .panel-head { display:flex; align-items:center; justify-content:space-between; gap:20px; }
body #system .panel-head h2 { font-size:20px; }
body #system .consent-template-actions { display:flex; gap:12px; margin:18px 0; }
body #system #consentTemplateSearch { flex:1; min-width:0; }
body #system #consentTemplateStatusFilter { flex:0 0 150px; width:150px; }
body #system :is(.consent-template-table-head,#consentTemplateList .consent-template-row) { display:grid; grid-template-columns:minmax(0,1fr) 86px 210px; align-items:center; gap:20px; padding:16px 12px; }
body #system .consent-template-table-head { font-size:12px; color:var(--settings-muted); border-bottom:1px solid var(--settings-rule); }
html[data-app-theme] body #system #consentTemplateList { display:block; overflow:visible; }
html[data-app-theme] body #system #consentTemplateList .consent-template-row { margin:0; min-height:94px; border:0!important; border-bottom:1px solid var(--settings-rule)!important; border-radius:0!important; background:transparent!important; box-shadow:none!important; opacity:1; }
body #system .consent-template-description { display:grid; gap:5px; min-width:0; }
body #system .consent-template-description strong { font-size:14px; font-weight:600; }
body #system .consent-template-description small { color:var(--settings-muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body #system .consent-template-status { justify-self:start; font-size:12px; padding:4px 9px; border-radius:5px; color:#238263; background:#e7f5ee; }
body #system .consent-template-status.is-disabled { color:#737f8d; background:#edf0f4; }
body #system #consentTemplateList .system-row-actions { display:flex; gap:8px; justify-content:flex-end; flex-wrap:nowrap; }
body #system #consentTemplateList .system-row-actions > button, body #system .consent-template-more summary { min-width:56px; min-height:32px; padding:6px 10px; font-size:12px; cursor:pointer; border-radius:6px; }
body #system .consent-template-more { position:relative; }
body #system .consent-template-more summary { list-style:none; text-align:center; color:var(--settings-blue); border:1px solid var(--settings-rule); }
body #system .consent-template-more summary::-webkit-details-marker { display:none; }
body #system .consent-template-more-menu { position:absolute; right:0; top:calc(100% + 5px); z-index:20; width:130px; display:grid; gap:4px; padding:6px; background:var(--settings-surface); border:1px solid var(--settings-rule); border-radius:8px; box-shadow:0 8px 24px #0002; }
body #system .consent-template-more:not([open]) .consent-template-more-menu { display:none; }
body #system .consent-template-summary { margin-top:16px; color:var(--settings-muted); font-size:12px; }
body #system :is(button,summary,input,select):focus-visible { outline:2px solid var(--settings-blue); outline-offset:2px; }
body #consentTemplateFormModal.settings-template-drawer { justify-content:flex-end; padding:0; gap:0; }
body #consentTemplateFormModal.settings-template-drawer .consent-template-form-card { flex:0 1 760px; width:min(760px,100vw); height:100dvh; max-height:100dvh; border-radius:16px 0 0 16px; margin:0; }
body #consentTemplateFormModal.settings-template-drawer .consent-template-form-body { overflow:auto; min-height:0; }
body #consentTemplateFormModal.settings-template-drawer .consent-rich-editor { height:360px; min-height:300px; }
body #consentTemplateFormModal.settings-template-drawer .consent-text-tools { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; width:100%; padding:12px; margin:0 0 10px; max-height:none; border-radius:8px; box-shadow:none; }
body #consentTemplateFormModal.settings-template-drawer .consent-text-tools :is(h3,h4,p) { display:none; }
body #consentTemplateFormModal.settings-template-drawer .consent-text-tools label { display:flex; align-items:center; gap:6px; margin:0; font-size:12px; }
body #consentTemplateFormModal.settings-template-drawer .consent-text-tools select { width:auto; padding:4px; min-height:30px; }
body #consentTemplateFormModal.settings-template-drawer :is(.consent-text-tool-buttons,.consent-color-palette) { display:flex; gap:5px; align-items:center; margin:0; }
body #consentTemplateFormModal.settings-template-drawer .consent-text-tool-buttons button { min-height:28px; padding:3px 8px; font-size:12px; }
@media(max-width:1100px) {
 html[data-app-theme] body #system .settings-layout { grid-template-columns:170px minmax(0,1fr); gap:12px; }
 html[data-app-theme] body #system .system-panel { padding:16px; }
 body #system :is(.consent-template-table-head,#consentTemplateList .consent-template-row) { grid-template-columns:minmax(0,1fr) 72px 190px; gap:10px; padding:14px 0; }
}
@media(max-width:700px) {
 html[data-app-theme] body #system .settings-layout { grid-template-columns:1fr; }
 html[data-app-theme] body #system .settings-menu { position:static; max-height:220px; }
 body #system .settings-page-heading { gap:12px; }
 body #system .consent-template-table-head { display:none; }
 body #system #consentTemplateList .consent-template-row { grid-template-columns:minmax(0,1fr) 72px; }
 body #system #consentTemplateList .system-row-actions { grid-column:1/-1; justify-content:flex-start; }
 body #consentTemplateFormModal.settings-template-drawer { flex-direction:row; }
}
html[data-app-theme] body #system .settings-console .settings-menu-group:not([hidden]):not(.permission-hidden) { display:block!important; opacity:1; transform:none; animation:none; }
html[data-app-theme] body #system .settings-console :is(.settings-menu,.system-panel) { background:var(--settings-surface)!important; box-shadow:none!important; }
html[data-app-theme] body #system .settings-console :is(.settings-layout,.settings-content,.system-actions,.system-list,#consentTemplateList .consent-template-row) { background:transparent!important; box-shadow:none!important; }
html[data-app-theme] body #system .settings-console #consentTemplateList .consent-template-status { background:#e7f5ee!important; color:#238263!important; }
html[data-app-theme] body #system .settings-console #consentTemplateList .consent-template-status.is-disabled { background:#edf0f4!important; color:#737f8d!important; }

/* Supplier supply categories: native checkboxes in one horizontal row. */
html[data-app-theme] body #supplierFormModal .supplier-scope-fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
html[data-app-theme] body #supplierFormModal .supplier-scope-fieldset legend { margin-bottom: 10px; padding: 0; font-size: 14px; font-weight: 700; }
html[data-app-theme] body #supplierFormModal .supplier-scope-options { display: flex; flex-wrap: wrap; gap: 12px 28px; }
html[data-app-theme] body #supplierFormModal .supplier-scope-options label { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; cursor: pointer; white-space: nowrap; }
html[data-app-theme] body #supplierFormModal .supplier-scope-options input[type="checkbox"] { appearance: auto !important; -webkit-appearance: checkbox !important; width: 18px !important; height: 18px !important; min-width: 18px !important; min-height: 18px !important; margin: 0 !important; padding: 0 !important; flex: 0 0 18px; accent-color: #3478f6; box-shadow: none !important; }
html[data-app-theme] body #supplierFormModal .supplier-scope-options input:focus-visible { outline: 2px solid #3478f6; outline-offset: 3px; }
html[data-app-theme="light"] body #supplierFormModal .supplier-scope-fieldset legend { color: #526174 !important; -webkit-text-fill-color: #526174 !important; }
html[data-app-theme="night"] body #supplierFormModal .supplier-scope-fieldset legend { color: #f2f2f2 !important; -webkit-text-fill-color: #f2f2f2 !important; }

/* Category-specific certificate uploads use the union of selected requirements. */
html[data-app-theme] body #supplierFormModal .supplier-cert-upload-grid { grid-template-columns: repeat(5, 230px); }
html[data-app-theme] body #supplierFormModal :is([data-supplier-upload-field], .supplier-cert-upload-grid, #supplierScopeUploadHint)[hidden] { display: none !important; }
html[data-app-theme] body #supplierFormModal .supplier-scope-upload-hint { margin: 0; font-size: 13px; }

/* Keep the supplier dialog and certificate cards stable when categories change. */
html[data-app-theme] body #supplierFormModal .supplier-form-card {
  width: min(1280px, calc(100vw - 32px)) !important;
  height: min(680px, calc(100dvh - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  display: flex; flex-direction: column; overflow: hidden;
}
html[data-app-theme] body #supplierFormModal .supplier-form-card > .modal-head { flex: 0 0 auto; }
html[data-app-theme] body #supplierFormModal #supplierForm { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: auto; }
html[data-app-theme] body #supplierFormModal .supplier-cert-upload-grid { flex: 0 0 294px; height: 294px; min-height: 294px; align-items: start; justify-content: start; overflow-x: auto; overflow-y: hidden; }
html[data-app-theme] body #supplierFormModal .supplier-cert-upload { width: 230px; height: 280px; box-sizing: border-box; grid-template-rows: 164px 42px 28px; gap: 8px; padding: 14px; }
html[data-app-theme] body #supplierFormModal .supplier-cert-upload .supplier-upload-preview { height: 164px; min-height: 164px; }
html[data-app-theme] body #supplierFormModal .supplier-cert-upload .inventory-sub-upload-note { font-size: 12px; line-height: 14px; align-self: center; }
html[data-app-theme] body #supplierFormModal .supplier-form-actions { margin-top: auto; flex-shrink: 0; }

html[data-app-theme] body #supplierFormModal .inventory-sub-upload-button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
html[data-app-theme="light"] body #supplierFormModal #supplierScopeUploadHint { color: #9a580c !important; -webkit-text-fill-color: #9a580c !important; }
html[data-app-theme="night"] body #supplierFormModal #supplierScopeUploadHint { color: #eac38d !important; -webkit-text-fill-color: #eac38d !important; }

/* Reset legacy neon decoration before applying the shared print-button skin. */
html[data-app-theme="light"] body #inventory :is(.material-archive-create.light-btn, .supplier-management-add.primary-btn) { min-height: 44px !important; padding: 0 16px; }
html[data-app-theme="light"] body #inventory :is(.material-archive-create.light-btn, .supplier-management-add.primary-btn)::before,
html[data-app-theme="light"] body #inventory :is(.material-archive-create.light-btn, .supplier-management-add.primary-btn)::after { all: initial; color: inherit; display: block !important; opacity: 1 !important; transform: none !important; filter: none !important; }
/* 素曜白：将参考组件的 Liquid Glass 材质转译为现有原生按钮。 */
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 108px;
  height: 44px;
  border: 1px solid rgba(15, 23, 42, .34) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .34)) !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  box-shadow:
    0 2px 6px rgba(15, 23, 42, .10),
    0 8px 20px rgba(71, 85, 105, .08),
    inset 1px 1px 1px rgba(255, 255, 255, .96),
    inset -1px -1px 1px rgba(15, 23, 42, .16),
    inset 0 0 7px rgba(15, 23, 42, .06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  font-weight: 850;
  transform: translateY(0) scale(1);
  transition: transform .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s ease, background-color .22s ease !important;
}
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"])::before {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .95), transparent 42%),
    linear-gradient(100deg, rgba(255, 255, 255, .42), transparent 48%, rgba(255, 255, 255, .24));
  content: "";
  pointer-events: none;
}
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"])::after {
  position: absolute;
  inset: 1px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 10px;
  content: "";
  pointer-events: none;
}
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]):hover {
  border-color: rgba(15, 23, 42, .46) !important;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(241, 245, 249, .48)) !important;
  color: #020617 !important;
  -webkit-text-fill-color: #020617 !important;
  box-shadow:
    0 4px 10px rgba(15, 23, 42, .12),
    0 12px 24px rgba(71, 85, 105, .11),
    inset 1px 1px 1px rgba(255, 255, 255, 1),
    inset -1px -1px 1px rgba(15, 23, 42, .18),
    inset 0 0 8px rgba(15, 23, 42, .07) !important;
  transform: translateY(-1px) scale(1.03);
}
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]):active {
  box-shadow:
    0 1px 3px rgba(15, 23, 42, .14),
    inset 2px 2px 4px rgba(15, 23, 42, .15),
    inset -1px -1px 1px rgba(255, 255, 255, .9) !important;
  transform: translateY(1px) scale(.98) !important;
}
html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28) !important;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]) {
    transition: none !important;
  }
  html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]):hover,
  html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]):active {
    transform: none !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  html[data-app-theme="light"] body :is(#patientDetail [data-patient-record-print], #dashboardTaskCenter.today-work-page .today-work-list .today-work-row button, #inventory .inventory-archive-row-actions > button[data-edit-inventory-archive-detail], #inventory .inventory-archive-row-actions > button[data-view-inventory-archive-qualification], #inventory .material-archive-create.light-btn, #inventory .supplier-management-add.primary-btn, #inventory .supplier-management-actions button[data-edit-supplier], #inventory .supplier-management-actions button[data-open-supplier-qualifications], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="patient-outbound"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="patient"], #inventory .inventory-module-card .inbound-panel-actions > button.light-btn[data-inventory-new-record="doctor-issues"], #inventory .inventory-module-card .inbound-panel-actions > button.primary-btn[data-open-outbound-export="doctor"]) {
    background: #fff !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Allow the two print-style actions to fit their column without changing night mode. */
html[data-app-theme="light"] body #inventory .supplier-management-actions { gap: 8px; }
html[data-app-theme="light"] body #inventory .supplier-management-actions :is([data-edit-supplier], [data-open-supplier-qualifications]) { min-width: 108px; min-height: 44px; padding: 0 16px; flex-shrink: 0; }
@media (min-width: 981px) {
  html[data-app-theme="light"] body #inventory :is(.supplier-management-columns, .supplier-management-row-main) { grid-template-columns: 52px minmax(210px, 1.35fr) minmax(130px, .82fr) minmax(145px, .95fr) 224px; }
}
html[data-app-theme="light"] body #inventory .inventory-module-card .inbound-panel-actions > :is([data-inventory-new-record="patient-outbound"], [data-open-outbound-export="patient"]) { font-weight: 850 !important; }

/* Inbound's flat list surface, shared by light and night themes. */
html[data-app-theme] body #inventory .inventory-inbound-module-card { --inbound-surface: #fff; --inbound-muted-surface: #f8fafc; --inbound-line: #e6ebf2; --inbound-text: #28384d; --inbound-muted: #8490a2; --inbound-accent: #2e6cec; --inbound-tag: #edf3ff; padding: 0 !important; border: 1px solid var(--inbound-line) !important; border-radius: 12px !important; background: var(--inbound-surface) !important; box-shadow: none !important; }
html[data-app-theme="night"] body #inventory .inventory-inbound-module-card { --inbound-surface: #15191e; --inbound-muted-surface: #1c222a; --inbound-line: #303943; --inbound-text: #e1e8f0; --inbound-muted: #9aa9ba; --inbound-accent: #8db5ff; --inbound-tag: #22334e; }
html[data-app-theme] body #inventory .inventory-inbound-module-card::before, html[data-app-theme] body #inventory .inventory-inbound-module-card::after { content: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card :is(.inbound-record-switcher, .inbound-record-tab-panel, .inbound-project-table-wrap) { border: 0 !important; border-radius: 0 !important; padding: 0 !important; background: var(--inbound-surface) !important; box-shadow: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-header h2 { color: var(--inbound-text) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-header p { color: var(--inbound-muted) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-actions > button { border: 1px solid var(--inbound-line); color: var(--inbound-text); background: var(--inbound-surface); box-shadow: none; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-create-menu > button { border: 1px solid #2e6cec; color: #fff; background: #2e6cec; box-shadow: none; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-filters { border-bottom: 1px solid var(--inbound-line); }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-record-tabs > button { border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--inbound-muted) !important; transform: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-record-tabs > button.active { border-bottom-color: var(--inbound-accent) !important; color: var(--inbound-accent) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-record-tabs span { color: var(--inbound-muted) !important; background: var(--inbound-muted-surface) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-record-tabs .active span { color: var(--inbound-accent) !important; background: var(--inbound-tag) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inventory-global-search input { border: 1px solid var(--inbound-line) !important; background: var(--inbound-muted-surface) !important; color: var(--inbound-text) !important; box-shadow: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table { width: 100%; min-width: 1000px; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table :is(th, td) { min-width: 76px !important; padding: 14px 12px; font-size: 12px; border-color: var(--inbound-line) !important; color: var(--inbound-text) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table th { height: 44px; padding-block: 10px; font-size: 11px; font-weight: 500; color: var(--inbound-muted) !important; background: var(--inbound-muted-surface) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table td { height: 64px; background: var(--inbound-surface); }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table :is(th, td):first-child { min-width: 130px !important; padding-left: 24px; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table :is(th, td):nth-child(3) { min-width: 150px !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card [data-inbound-active-module="highValue"] .inbound-project-table :is(th, td):nth-child(5) { min-width: 145px !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table :is(th, td):last-child { min-width: 130px !important; padding-right: 24px; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table .inbound-qualification-link { min-height: 30px; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--inbound-text) !important; text-align: left; font-weight: 500; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table button[data-inbound-supplier-qualification] { color: var(--inbound-muted) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table .inbound-qualification-link:hover { color: var(--inbound-accent) !important; text-decoration: underline; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-actions { flex-wrap: nowrap; gap: 6px; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-actions :is(.inbound-detail-view-btn, [data-edit-inbound], [data-edit-drug-inbound], [popovertarget]) { min-width: 26px; min-height: 32px; padding: 4px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--inbound-accent) !important; font-size: 12px; font-weight: 500; transform: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inventory-auto-pagination { margin: 0 !important; padding: 14px 24px !important; min-height: 62px; border: 0 !important; border-top: 1px solid var(--inbound-line) !important; border-radius: 0 !important; color: var(--inbound-muted) !important; background: var(--inbound-surface) !important; box-shadow: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inventory-auto-pagination button { min-width: 30px; min-height: 30px; padding: 3px 9px; border: 1px solid var(--inbound-line) !important; border-radius: 5px; background: var(--inbound-surface) !important; color: var(--inbound-muted) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inventory-auto-pagination button[aria-current="page"] { background: var(--inbound-tag) !important; color: var(--inbound-accent) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inventory-auto-pagination button:disabled { opacity: .4; cursor: default; }
html[data-app-theme="night"] body .inbound-menu-popover { background: #1c222a; border-color: #303943; color: #e1e8f0; }
html[data-app-theme="night"] body .inbound-menu-popover > button:hover { background: #26354b; }

html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-header { border: 0 !important; background: var(--inbound-surface) !important; box-shadow: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-compact-actions > button { border: 1px solid var(--inbound-line) !important; background: var(--inbound-surface) !important; color: var(--inbound-text) !important; box-shadow: none !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-create-menu > button { border: 1px solid #2e6cec !important; background: #2e6cec !important; color: #fff !important; box-shadow: none !important; }

/* 白色主题：新增入库选项使用黑字与独立边框。 */
html[data-app-theme="light"] body #inventory .inbound-create-menu > .inbound-menu-popover {
  border: 1px solid #b8c2cf;
}
html[data-app-theme="light"] body #inventory .inbound-create-menu > .inbound-menu-popover > button {
  color: #111 !important;
  border: 1px solid #cbd2dc !important;
  background: #fff !important;
}
html[data-app-theme="light"] body #inventory .inbound-create-menu > .inbound-menu-popover > button + button {
  margin-top: 6px;
}
html[data-app-theme="light"] body #inventory .inbound-create-menu > .inbound-menu-popover > button:is(:hover, :focus-visible) {
  border-color: #8b98a9 !important;
  background: #f3f5f8 !important;
}
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-record-tabs strong { color: inherit !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table td:last-child { position: sticky; right: 0; z-index: 2; background: var(--inbound-surface) !important; }
html[data-app-theme] body #inventory .inventory-inbound-module-card .inbound-project-table th:last-child { right: 0; z-index: 3; }

/* Keep the supplier table's six columns aligned in both themes. */
@media (min-width: 981px) {
  html[data-app-theme="light"] body #inventory :is(.supplier-management-columns, .supplier-management-row-main) { grid-template-columns: 40px minmax(0, 1.4fr) minmax(0, .65fr) minmax(0, 1fr) minmax(0, 1fr) 224px; gap: 10px; }
}
@media (min-width: 981px) and (max-width: 1300px) {
  html[data-app-theme="light"] body #inventory :is(.supplier-management-columns, .supplier-management-row-main) { grid-template-columns: 32px minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr) 152px; gap: 8px; }
  html[data-app-theme="light"] body #inventory .supplier-management-actions :is([data-edit-supplier], [data-open-supplier-qualifications]) { min-width: 72px; padding-inline: 10px; }
}

/* Doctor issue preview implementation; patient outbound retains its own layout. */
html[data-app-theme] body #inventory .doctor-issue-module { --issue-surface:#fff;--issue-soft:#f8fafc;--issue-line:#e6ebf2;--issue-text:#344358;--issue-muted:#8490a2;--issue-accent:#2e6cec; padding:0 !important;border:1px solid var(--issue-line) !important;border-radius:12px !important;background:var(--issue-surface) !important;box-shadow:none !important; }
html[data-app-theme="night"] body #inventory .doctor-issue-module { --issue-surface:#15191e;--issue-soft:#1c222a;--issue-line:#303943;--issue-text:#e1e8f0;--issue-muted:#9aa9ba;--issue-accent:#8db5ff; }
html[data-app-theme] body #inventory .doctor-issue-module::before, html[data-app-theme] body #inventory .doctor-issue-module::after { content:none !important; }
html[data-app-theme] body #inventory .doctor-issue-module :is(.doctor-issue-header,.inventory-flow-summary,.inventory-flow-summary article,.outbound-filter-panel,.unified-outbound-table) { border:0 !important;border-radius:0 !important;background:var(--issue-surface) !important;box-shadow:none !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-flow-summary { border-block:1px solid var(--issue-line) !important; }
html[data-app-theme] body #inventory .doctor-issue-module :is(.doctor-issue-header h2,.inventory-flow-summary strong) { color:var(--issue-text) !important; }
html[data-app-theme] body #inventory .doctor-issue-module :is(.doctor-issue-header p,.inventory-flow-summary span,.outbound-filter-grid label > span,.doctor-issue-reset) { color:var(--issue-muted) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-doctor-stock-link small { color:var(--issue-accent) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-doctor-stock-link:hover { transform:none !important; }
html[data-app-theme] body #inventory .doctor-issue-module .doctor-issue-header-actions button { border:1px solid var(--issue-line) !important;background:var(--issue-surface) !important;color:var(--issue-text) !important;box-shadow:none !important; }
html[data-app-theme] body #inventory .doctor-issue-module .doctor-issue-header-actions [data-inventory-new-record] { background:#2e6cec !important;color:white !important;border-color:#2e6cec !important; }
html[data-app-theme] body #inventory .doctor-issue-module :is(.outbound-filter-date-trigger,.outbound-filter-grid select) { border:1px solid var(--issue-line) !important;border-radius:6px !important;background:var(--issue-surface) !important;color:var(--issue-text) !important;box-shadow:none !important; }
html[data-app-theme] body #inventory .doctor-issue-module .unified-outbound-table { border-top:1px solid var(--issue-line) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table { min-width:1120px;width:100%; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table :is(th,td) { padding:12px;font-size:12px;color:var(--issue-text) !important;border-color:var(--issue-line) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table th { position:sticky;top:0;z-index:1;height:44px;font-size:11px;font-weight:500;color:var(--issue-muted) !important;background:var(--issue-soft) !important;white-space:nowrap; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table td { height:64px;background:var(--issue-surface) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table td strong { font-weight:550;color:var(--issue-text) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table td small { font-size:11px;color:var(--issue-muted) !important; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table :is(th,td):first-child { padding-left:24px; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table :is(th,td):last-child { padding-right:24px;white-space:nowrap; }
html[data-app-theme] body #inventory .doctor-issue-module .inventory-module-table :is(th,td):nth-child(9) { text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums; }
html[data-app-theme] body #inventory .doctor-issue-module :is(.movement-type,.fee-impact) { padding:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;color:var(--issue-muted) !important;font-size:11px;font-weight:400; }
html[data-app-theme] body #inventory .doctor-issue-module .outbound-record-pagination { margin:0 !important;padding:14px 24px;min-height:62px;border:0 !important;border-top:1px solid var(--issue-line) !important;border-radius:0 !important;background:var(--issue-surface) !important;color:var(--issue-muted) !important;box-shadow:none !important;font-size:12px; }
html[data-app-theme] body #inventory .doctor-issue-module .outbound-record-pagination button { min-height:30px;min-width:30px;padding:3px 9px;border:1px solid var(--issue-line) !important;border-radius:5px;background:var(--issue-surface) !important;color:var(--issue-muted) !important;font-weight:500; }
html[data-app-theme] body #inventory .doctor-issue-module .outbound-record-pagination button[aria-current="page"] { background:var(--issue-soft) !important;color:var(--issue-accent) !important; }

@media (min-width:981px) {
  html[data-app-theme="light"] body #inventory :is(.supplier-management-columns, .supplier-management-row-main) { grid-template-columns:36px minmax(0,1.4fr) minmax(0,.65fr) minmax(0,1fr) minmax(0,1fr) 76px 224px; }
}
@media (min-width:981px) and (max-width:1300px) {
  html[data-app-theme="light"] body #inventory :is(.supplier-management-columns, .supplier-management-row-main) { grid-template-columns:30px minmax(0,1.3fr) minmax(0,.7fr) minmax(0,1fr) minmax(0,1fr) 60px 152px; }
}

/* 人员绩效：与设置页一致的分组导航和单一内容面板。 */
html[data-app-theme] body #billing:not(.expense-only) {
  --personnel-surface: #fff;
  --personnel-line: #e5ebf2;
  --personnel-ink: #202c3d;
  --personnel-muted: #718096;
  --personnel-soft: #f5f7fa;
  --personnel-blue: #2e6cec;
}
html[data-app-theme="night"] body #billing:not(.expense-only) {
  --personnel-surface: #171e28;
  --personnel-line: #303c4c;
  --personnel-ink: #e4ebf4;
  --personnel-muted: #a0aec0;
  --personnel-soft: #202a37;
  --personnel-blue: #86b3ff;
}
html[data-app-theme] body #billing:not(.expense-only) > .performance-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: start; }
html[data-app-theme] body #billing:not(.expense-only) :is(.personnel-sidebar, #performanceReportContent, #wageContent > .report-card) {
  border: 1px solid var(--personnel-line) !important;
  border-radius: 10px !important;
  background: var(--personnel-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  color: var(--personnel-ink) !important;
}
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar { padding: 12px 10px; gap: 2px; top: 18px; }
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar strong { padding: 16px 12px 10px; font-size: 13px; color: var(--personnel-ink) !important; }
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar strong:not(:first-child) { margin-top: 14px; }
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar button {
  height: 38px; min-height: 38px; padding: 0 12px; border: 0 !important; border-radius: 6px !important;
  background: transparent !important; box-shadow: none !important; color: var(--personnel-muted) !important; transform: none !important;
  text-align: left; font-size: 14px;
}
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar button:hover { background: var(--personnel-soft) !important; color: var(--personnel-ink) !important; }
html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar button.active { background: #2e6cec !important; color: #fff !important; }
html[data-app-theme] body #billing:not(.expense-only) :is(.personnel-sidebar, #performanceReportContent .report-card)::before,
html[data-app-theme] body #billing:not(.expense-only) :is(.personnel-sidebar, #performanceReportContent .report-card)::after { content: none !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent { padding: 22px; gap: 0; min-width: 0; display: flex; flex-direction: column; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent.hidden { display: none !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .report-card {
  padding: 0; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; backdrop-filter: none !important; transform: none !important;
}
html[data-app-theme] body #billing .personnel-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--personnel-line); }
html[data-app-theme] body #billing .personnel-panel-heading h2 { margin: 0; font-size: 20px; color: var(--personnel-ink) !important; }
html[data-app-theme] body #billing .personnel-panel-heading p { margin: 7px 0 0; font-size: 13px; color: var(--personnel-muted); }
html[data-app-theme] body #billing:not(.expense-only) #performanceExport { min-width: 88px; height: 38px; background: #2e6cec !important; color: #fff !important; border: 1px solid #2e6cec !important; border-radius: 6px; box-shadow: none !important; }
html[data-app-theme] body #billing:not(.expense-only) .performance-filter-body { display: block; padding: 20px 0; border-bottom: 1px solid var(--personnel-line); }
html[data-app-theme] body #billing:not(.expense-only) .performance-filter-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; width: 100%; }
html[data-app-theme] body #billing:not(.expense-only) :is(.performance-date-filter,.performance-filter-row,.personnel-dimension-filter) { display: flex; align-items: center; gap: 10px; width: auto; margin: 0; }
html[data-app-theme] body #billing:not(.expense-only) :is(.performance-date-filter,.performance-filter-row,.personnel-dimension-filter) > span { font-size: 13px; color: var(--personnel-ink); white-space: nowrap; }
html[data-app-theme] body #billing:not(.expense-only) .performance-value-control { width: 190px; min-width: 0; }
html[data-app-theme] body #billing:not(.expense-only) .performance-range-trigger { width: 278px; }
html[data-app-theme] body #billing:not(.expense-only) :is(.performance-range-trigger,.performance-select-trigger,#performanceDimension,#performanceReset) {
  height: 38px; min-height: 38px; padding: 0 12px; border: 1px solid var(--personnel-line) !important; border-radius: 6px !important;
  background: var(--personnel-surface) !important; color: var(--personnel-ink) !important; box-shadow: none !important; font: inherit; font-size: 13px;
}
html[data-app-theme] body #billing #performanceDimension { width: 174px; }
html[data-app-theme] body #billing #performanceReset { margin-left: auto; min-width: 70px; cursor: pointer; }
html[data-app-theme] body #billing .personnel-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 0; font-size: 13px; }
html[data-app-theme] body #billing .personnel-summary strong { margin-left: 12px; font-size: 20px; color: var(--personnel-blue) !important; font-variant-numeric: tabular-nums; }
html[data-app-theme] body #billing .personnel-summary > div { display: flex; align-items: center; gap: 16px; }
html[data-app-theme] body #billing .personnel-columns-button { padding: 0; border: 0; background: none; color: var(--personnel-muted); cursor: pointer; font: inherit; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table-wrap { border: 0 !important; border-radius: 6px; overflow: auto; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table { min-width: 900px; width: 100%; border-collapse: collapse; font-size: 13px; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table :is(th,td) { padding: 13px 12px; border: 0 !important; border-bottom: 1px solid var(--personnel-line) !important; color: var(--personnel-ink) !important; background: var(--personnel-surface) !important; box-shadow: none !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table th { background: var(--personnel-soft) !important; font-size: 12px; font-weight: 600; height: 40px; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table :is(td,th).numeric { text-align: right; font-variant-numeric: tabular-nums; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table tbody tr:hover td { background: var(--personnel-soft) !important; }
html[data-app-theme] body #billing .personnel-project-code { display: block; margin-top: 4px; color: var(--personnel-muted); font-size: 11px; }
html[data-app-theme] body #billing .personnel-pagination { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; font-size: 12px; color: var(--personnel-muted); }
html[data-app-theme] body #billing .personnel-pagination > div { display: flex; align-items: center; gap: 12px; }
html[data-app-theme] body #billing .personnel-pagination button { width: 32px; height: 32px; border: 1px solid var(--personnel-line); border-radius: 6px; color: var(--personnel-ink); background: var(--personnel-surface); cursor: pointer; }
html[data-app-theme] body #billing .personnel-pagination button:disabled { opacity: .4; cursor: default; }
html[data-app-theme] body #billing:not(.expense-only) #wageSettlement { margin: 0; min-width: 0; }
html[data-app-theme] body #billing:not(.expense-only) #wageContent { gap: 16px; }
@media (max-width: 1100px) {
  html[data-app-theme] body #billing:not(.expense-only) > .performance-layout { grid-template-columns: 164px minmax(0,1fr); gap: 14px; }
  html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent { padding: 16px; }
}
@media (max-width: 700px) {
  html[data-app-theme] body #billing:not(.expense-only) > .performance-layout { grid-template-columns: minmax(0,1fr); }
  html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  html[data-app-theme] body #billing:not(.expense-only) .personnel-sidebar strong { grid-column: 1 / -1; }
}
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent :is(#performanceDateRangeTrigger, #performanceValueTrigger, #performanceDimension) { background: var(--personnel-surface) !important; background-image: none !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent #performanceColumns { color: var(--personnel-muted) !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table-wrap { box-shadow: none !important; }
html[data-app-theme] body #billing:not(.expense-only) #performanceReportContent .performance-table tbody td { padding-top: 10px; padding-bottom: 10px; }
html[data-app-theme] body #billing:not(.expense-only) #performancePagination button { border: 1px solid var(--personnel-line) !important; background: var(--personnel-surface) !important; color: var(--personnel-ink) !important; box-shadow: none !important; }

/* Monthly expenses: settings-style grouped navigation and single content surface. */
#billing.expense-only{padding:18px 20px 40px!important;background:transparent!important}
#billing.expense-only .expense-workspace{grid-template-columns:170px minmax(0,1fr);gap:20px}
#billing.expense-only .expense-section-nav{position:static;display:grid;gap:3px;padding:12px 10px;border-radius:12px;align-content:start}
#billing.expense-only .expense-section-nav strong{display:block;font-size:12px;padding:16px 12px 8px}
#billing.expense-only .expense-section-nav button{height:40px;border-radius:7px;font-size:14px;transform:none!important}
#billing.expense-only .expense-main-panel{display:flex;flex-direction:column;gap:0;padding:22px;min-width:0;border:1px solid var(--border-color,#e1e8f0);border-radius:12px}
#billing.expense-only .expense-main-panel::before,
#billing.expense-only .expense-main-panel>.report-card::before,
#billing.expense-only .expense-main-panel>.report-card::after,
#billing.expense-only .expense-section-nav::before,
#billing.expense-only .expense-section-nav::after{display:none!important}
#billing.expense-only .expense-main-panel>.report-card{box-shadow:none!important;background:transparent!important;border:0!important;border-radius:0!important;backdrop-filter:none!important}
#billing.expense-only .expense-panel-heading{order:-4;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;border-bottom:1px solid var(--border-color,#e8eef5)}
#billing.expense-only .expense-panel-heading h2{margin:0;font-size:20px}
#billing.expense-only .expense-panel-heading p{margin:6px 0 0;font-size:13px;color:#78869a}
#billing.expense-only #expenseAdd{width:auto;white-space:nowrap}
#billing.expense-only #monthlyExpenseContent .expense-main-panel>.expense-filter-card{order:-3;display:block;padding:18px 0!important}
#billing.expense-only .expense-filter-card>.performance-title-row,
#billing.expense-only .expense-filter-grid>label:not(:first-child),
#billing.expense-only .expense-filter-actions{display:none!important}
#billing.expense-only .expense-filter-grid{display:block}
#billing.expense-only .expense-time-filter{max-width:560px}
#billing.expense-only .expense-total-summary{order:-2;display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;padding:18px 0;border-top:1px solid var(--border-color,#e8eef5);border-bottom:1px solid var(--border-color,#e8eef5)}
#billing.expense-only .expense-total-summary span,#billing.expense-only .expense-total-summary small{color:#78869a;font-size:13px}
#billing.expense-only .expense-total-summary strong{font-size:30px;font-variant-numeric:tabular-nums}
#billing.expense-only #expenseAllChartCard{order:0}
#billing.expense-only .expense-all-chart-card>header{padding:24px 0 0}
#billing.expense-only .expense-all-chart-card h2{font-size:16px}
#billing.expense-only .expense-all-chart-body{grid-template-columns:240px minmax(0,1fr);align-items:center;gap:28px;padding:28px 0 12px}
#billing.expense-only .expense-all-donut{width:200px;height:200px}
#billing.expense-only .expense-all-donut>div{width:142px;height:142px;align-content:center;gap:5px}
#billing.expense-only .expense-all-donut strong{font-size:22px}
#billing.expense-only .expense-all-legend{margin:0;min-width:0}
#billing.expense-only .expense-composition-table{width:100%;border-collapse:collapse;font-size:13px}
#billing.expense-only .expense-composition-table th,#billing.expense-only .expense-composition-table td{padding:16px 10px;border-bottom:1px solid var(--border-color,#e8eef5);text-align:right;white-space:nowrap}
#billing.expense-only .expense-composition-table th{color:#78869a;font-weight:500}
#billing.expense-only .expense-composition-table th:first-child,#billing.expense-only .expense-composition-table td:first-child{text-align:left}
#billing.expense-only .expense-composition-table i{display:inline-block;margin-right:10px}
#billing.expense-only .expense-composition-table button{border:0;background:transparent;color:#376cd6;cursor:pointer;padding:4px}
html[data-app-theme="light"] body #billing.expense-only .expense-main-panel,
html[data-app-theme="light"] body #billing.expense-only .expense-section-nav{background:#fff!important;border:1px solid #e5ebf3!important;box-shadow:none!important;backdrop-filter:none!important;color:#1e293b}
html[data-app-theme="light"] body #billing.expense-only .expense-section-nav button:not(.active){background:transparent!important;box-shadow:none!important;color:#59677b!important}
html[data-app-theme="light"] body #billing.expense-only .expense-section-nav button.active{background:#326af0!important;color:#fff!important;box-shadow:none!important}
@media(max-width:1000px){#billing.expense-only .expense-workspace{grid-template-columns:170px minmax(0,1fr);gap:14px}#billing.expense-only .expense-all-chart-body{grid-template-columns:1fr;gap:20px}#billing.expense-only .expense-main-panel{padding:18px}}
@media(max-width:600px){#billing.expense-only{padding:14px 10px!important}#billing.expense-only .expense-workspace{grid-template-columns:130px minmax(0,1fr);gap:8px}#billing.expense-only .expense-main-panel{padding:12px}#billing.expense-only .expense-panel-heading{align-items:flex-start;flex-direction:column}#billing.expense-only .expense-all-legend{overflow-x:auto}#billing.expense-only .finance-time-filter-shell{flex-wrap:wrap}#billing.expense-only .expense-section-nav{padding:6px}#billing.expense-only .expense-section-nav button{padding:0 8px}}

/* Inventory desktop secondary menu: 220px reduced by 15%. */
@media (min-width: 981px) {
  #inventory .settings-layout.inventory-layout { grid-template-columns:187px minmax(0,1fr); }
}

/* Release 0.3.66 — 2026-09-18 */

/* Inventory ledger: scoped report layout, with both application themes. */
.inventory-ledger { --ledger-line: #34455d; --ledger-soft: #182638; --ledger-ink: #edf3fc; --ledger-muted: #a9b9ce; color:var(--ledger-ink); }
html[data-app-theme="light"] .inventory-ledger { --ledger-line:#e1eaf6; --ledger-soft:#f1f7ff; --ledger-ink:#24334b; --ledger-muted:#62738c; }
.inventory-ledger-heading { display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:22px; }
.inventory-ledger-heading span { font-size:11px;letter-spacing:2px;color:var(--ledger-muted); }
.inventory-ledger-heading h2 { margin:5px 0;font-size:26px; }
.inventory-ledger-heading p,.inventory-ledger-note,.inventory-ledger-count { color:var(--ledger-muted);font-size:13px;line-height:1.7; }
.inventory-ledger-filters { display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:18px;background:var(--ledger-soft);border:1px solid var(--ledger-line);border-radius:14px; }
.inventory-ledger-filters label { display:grid;gap:7px;font-size:12px;color:var(--ledger-muted);min-width:125px; }
.inventory-ledger-filters input,.inventory-ledger-filters select { min-height:40px;width:100%;max-width:100%;padding:8px 10px;border-radius:9px;border:1px solid var(--ledger-line);background:var(--ledger-soft);color:var(--ledger-ink); }
.inventory-ledger-search { flex:1; }
.inventory-ledger-metrics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:20px 0; }
.inventory-ledger-metrics article { display:grid;gap:9px;background:var(--ledger-soft);border:1px solid var(--ledger-line);border-radius:15px;padding:19px; }
.inventory-ledger-metrics article strong { font-size:25px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:var(--ledger-ink); }
.inventory-ledger-metrics article span,.inventory-ledger-metrics article small { color:var(--ledger-muted);font-size:12px; }
html[data-app-theme="light"] .inventory-ledger-metrics article { background:linear-gradient(115deg,#fff,#f1f9ff); }
html[data-app-theme="light"] .inventory-ledger-metrics article:last-child { background:linear-gradient(115deg,#edf3ff,#e6f8fc); }
.inventory-ledger-tabs { display:flex;gap:24px;flex-wrap:wrap;border-bottom:1px solid var(--ledger-line);margin-bottom:18px; }
.inventory-ledger-tabs [data-ledger-view] { color:var(--ledger-muted);background:none;border:0;border-bottom:3px solid transparent;padding:12px 0;cursor:pointer;font:inherit; }
.inventory-ledger-tabs [aria-selected="true"] { color:#397ff6;border-bottom-color:#397ff6;font-weight:600; }
.inventory-ledger .inventory-module-table { min-width:820px;font-variant-numeric:tabular-nums; }
.inventory-ledger .inventory-module-table :is(th,td) { text-align:right; }
.inventory-ledger .inventory-module-table :is(th,td):first-child { text-align:left; }
.inventory-ledger .inventory-module-table td small { display:block;margin-top:5px;color:var(--ledger-muted);font-size:12px; }
.inventory-ledger .inventory-module-table tfoot td { background:var(--ledger-soft);font-weight:600;padding:16px; }
.inventory-ledger .inventory-ledger-closing { background:var(--ledger-soft); }
@media(max-width:1000px) { .inventory-ledger-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .inventory-ledger-filters label { flex:1;min-width:140px; } .inventory-ledger-metrics article { padding:12px; } .inventory-ledger-metrics article strong { font-size:20px; } }
html[data-app-theme] body .inventory-ledger-filters > .primary-btn { background:#2866ed !important;color:#fff !important;border:1px solid #2866ed !important;min-width:76px;min-height:40px;border-radius:9px; }
html[data-app-theme] body .inventory-ledger-tabs [data-ledger-view] { border:0 !important;border-bottom:3px solid transparent !important;border-radius:0 !important;background:transparent !important;color:var(--ledger-muted) !important;padding:12px 0 !important;box-shadow:none !important; }
html[data-app-theme] body .inventory-ledger-tabs [aria-selected="true"] { color:#397ff6 !important;border-bottom-color:#397ff6 !important; }
html[data-app-theme] body .inventory-ledger [data-ledger-detail] { color:#397ff6 !important; }

/* Keep the expense secondary navigation available in reports and tax estimates. */
#monthlyFinance.monthly-finance-view.active,
#taxCenter.view.active { display:block; padding:18px 20px 40px!important; }
.finance-detail-workspace { grid-template-columns:170px minmax(0,1fr); gap:20px; }
.finance-detail-content { display:grid; gap:18px; min-width:0; }
.finance-detail-workspace .expense-section-nav { position:static; align-content:start; gap:3px; padding:12px 10px; border-radius:12px; }
.finance-detail-workspace .expense-section-nav strong { display:block; font-size:12px; padding:16px 12px 8px; }
.finance-detail-workspace .expense-section-nav button { height:40px; border-radius:7px; font-size:14px; transform:none!important; }
.finance-detail-workspace .expense-section-nav::before,
.finance-detail-workspace .expense-section-nav::after { display:none!important; }
html[data-app-theme="light"] body .finance-detail-workspace .expense-section-nav { background:#fff!important; border:1px solid #e5ebf3!important; box-shadow:none!important; backdrop-filter:none!important; color:#1e293b; }
html[data-app-theme="light"] body .finance-detail-workspace .expense-section-nav button:not(.active) { background:transparent!important; box-shadow:none!important; color:#59677b!important; }
html[data-app-theme="light"] body .finance-detail-workspace .expense-section-nav button.active { background:#326af0!important; color:#fff!important; box-shadow:none!important; }
html[data-app-theme="night"] body .finance-detail-workspace .expense-section-nav { background:var(--wb-canvas,#15191e)!important; border:1px solid rgba(244,248,246,.18)!important; }
html[data-app-theme="night"] body .finance-detail-workspace .expense-section-nav :is(strong,button:not(.active)) { color:var(--wb-text,#eef3f8)!important; }
@media(max-width:1000px) { .finance-detail-workspace { gap:14px; } }
@media(max-width:600px) {
  #monthlyFinance.monthly-finance-view.active,#taxCenter.view.active { padding:14px 10px!important; }
  .finance-detail-workspace { grid-template-columns:130px minmax(0,1fr); gap:8px; }
  .finance-detail-workspace .expense-section-nav { padding:6px; }
  .finance-detail-workspace .expense-section-nav button { padding:0 8px; }
}
#taxCenter .finance-detail-content .tax-toolbar { flex-wrap:wrap; align-items:flex-start; }
#taxCenter .finance-detail-content .tax-toolbar > div:first-child { flex:1 1 300px; min-width:0; }
#taxCenter .finance-detail-content .tax-actions { flex:3 1 900px; flex-wrap:wrap; min-width:0; }

/* Focused follow-up assignment dialog. */
#followupModal.followup-simple-modal.open { display:flex; pointer-events:auto; }
html:has(#followupModal.open),
body:has(#followupModal.open) { overflow:hidden !important; overscroll-behavior:none; }
#followupModal .followup-simple-card,
#followupModal textarea,
#followupModal .system-card-select-menu { overscroll-behavior:contain; }
#followupModal.followup-simple-modal { display:none; align-items:center; justify-content:center; padding:24px; }
#followupModal .followup-simple-card { width:min(680px,calc(100vw - 48px)); max-height:calc(100dvh - 48px); overflow:auto; border:1px solid #3b5363; border-radius:22px; background:#14222d; color:#e9f2fa; box-shadow:0 24px 80px #0005; }
#followupModal .followup-simple-card>header { display:flex; justify-content:space-between; align-items:center; padding:24px 28px; border-bottom:1px solid #ffffff18; }
#followupModal .followup-simple-card h2 { margin:0; font-size:22px; }
#followupModal .followup-simple-card header p { margin:8px 0 0; font-size:13px; opacity:.7; }
#followupModal #followupPlanForm { display:grid; gap:18px; padding:24px 28px; }
#followupModal #followupPlanForm label { display:grid; gap:10px; font-size:14px; font-weight:650; min-width:0; }
#followupModal #followupPlanForm :is(select,input,textarea) { box-sizing:border-box; width:100%; min-height:44px; padding:11px 13px; border:1px solid #536673; border-radius:12px; font:inherit; color:inherit; background:#1c303e; }
#followupModal #followupPlanForm textarea { min-height:150px; resize:vertical; }
#followupModal .followup-simple-fields { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
#followupModal .followup-simple-help { font-size:12px; opacity:.65; margin:0; }
#followupModal #followupSaveStatus { margin:0; color:#eb8667; font-size:13px; }
#followupModal #followupPlanForm footer { display:flex; justify-content:flex-end; gap:12px; }
html[data-app-theme="light"] #followupModal .followup-simple-card { background:linear-gradient(135deg,#fff,#f0f8ff); border-color:#d5e4f3; color:#24384f; }
html[data-app-theme="light"] #followupModal .followup-simple-card>header { border-color:#e0eaf3; }
html[data-app-theme="light"] #followupModal #followupPlanForm :is(select,input,textarea) { background:#fff; border-color:#d3e1ef; }
@media(max-width:600px) { #followupModal .followup-simple-fields { grid-template-columns:1fr; } #followupModal #followupPlanForm, #followupModal .followup-simple-card>header { padding:18px; } }

/* Tooth diagrams are transparent buttons: do not inherit white button text fill. */
html[data-app-theme="light"] body .tooth-cross,
html[data-app-theme="light"] body .tooth-cross :is(.quadrant, .tooth-mark-row, .tooth-mark, .tooth-mark sup) {
  color: #24384f !important;
  -webkit-text-fill-color: #24384f !important;
  text-shadow: none !important;
}

/* Non-destructive confirmations use neutral graphite glass in the night theme.
   They share the delete-dialog DOM structure, so explicitly remove its red cast. */
html[data-app-theme="night"] body .system-confirm-modal.system-confirm-neutral .supplier-delete-card {
  border-color: rgba(226, 232, 240, .28) !important;
  background-color: rgba(20, 23, 25, .94) !important;
  background-image:
    radial-gradient(ellipse 62% 54% at 4% 0%, rgba(255, 255, 255, .11), transparent 72%),
    radial-gradient(ellipse 38% 48% at 100% 100%, rgba(148, 163, 184, .08), transparent 76%),
    linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(0, 0, 0, .08)) !important;
  box-shadow: 0 30px 78px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .12) !important;
}
html[data-app-theme="night"] body .system-confirm-modal.system-confirm-neutral .supplier-delete-card::before {
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .08), transparent 24%, transparent 74%, rgba(148, 163, 184, .04)),
    radial-gradient(ellipse 36% 16% at 13% 0%, rgba(255, 255, 255, .10), transparent 74%) !important;
}
html[data-app-theme="night"] body .system-confirm-modal.system-confirm-neutral .supplier-delete-card::after {
  background: rgba(148, 163, 184, .10) !important;
}
html[data-app-theme="night"] body .system-confirm-modal.system-confirm-neutral :is(.modal-head, .supplier-delete-actions) {
  border-color: rgba(226, 232, 240, .12) !important;
}
