/* case 子系统深色模式 (Dark Mode) 专属样式 */
/* 通用深色模式样式适用于所有子系统；下方 html.case 规则保留 case 专属细节。 */
html[data-theme="dark"],
html[data-theme="dark"] body {
    background-color: #121824 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .layui-panel,
html[data-theme="dark"] .layui-card,
html[data-theme="dark"] .layui-colla-content,
html[data-theme="dark"] .layui-colla-item,
html[data-theme="dark"] .layui-tab-card,
html[data-theme="dark"] .layui-table,
html[data-theme="dark"] .layui-table-view,
html[data-theme="dark"] .layui-table-tool,
html[data-theme="dark"] .layui-table-page,
html[data-theme="dark"] .layui-table-init,
html[data-theme="dark"] .layui-table-patch {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .text-black-50,
html[data-theme="dark"] .layui-form-label,
html[data-theme="dark"] .layui-form-mid,
html[data-theme="dark"] .layui-table,
html[data-theme="dark"] .layui-table th,
html[data-theme="dark"] .layui-table td {
    color: #e2e8f0 !important;
}

html[data-theme="dark"] .text-black-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

html[data-theme="dark"] .layui-layout-admin .layui-side {
  background-color: #393d49 !important;
}

html[data-theme="dark"] .layui-layout-admin .layui-header,
html[data-theme="dark"] .layui-layout-admin .layui-header .layui-nav,
html[data-theme="dark"] .layui-footer {
    background-color: #0f172a !important;
}

html[data-theme="dark"] .layui-input,
html[data-theme="dark"] .layui-textarea,
html[data-theme="dark"] .layui-form-select .layui-input,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-table th,
html[data-theme="dark"] .layui-table td,
html[data-theme="dark"] .layui-table-cell,
html[data-theme="dark"] .layui-table thead tr,
html[data-theme="dark"] .layui-table-view,
html[data-theme="dark"] .layui-table-header,
html[data-theme="dark"] .layui-table-tool,
html[data-theme="dark"] .layui-table-page {
    border-color: #334155 !important;
}

html[data-theme="dark"] .layui-table-cell {
    background-color: transparent !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-table thead tr {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-table.fixed-head thead tr th {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] tr.section-title td {
    background-color: #1a2332 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-table-header {
    background-color: #0f172a !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-table-patch {
    background-color: #0f172a !important;
}

html[data-theme="dark"] .layui-table-hover,
html[data-theme="dark"] .layui-table tbody tr:hover,
html[data-theme="dark"] .layui-table-click {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-nav-child,
html[data-theme="dark"] .layui-form-select dl,
html[data-theme="dark"] .layui-layer,
html[data-theme="dark"] .layui-layer-title,
html[data-theme="dark"] .layui-layer-content,
html[data-theme="dark"] .layui-layer-btn {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .layui-laypage-btn,
html[data-theme="dark"] .layui-laypage-count,
html[data-theme="dark"] .layui-laypage-limits,
html[data-theme="dark"] .layui-laypage-curr,
html[data-theme="dark"] .layui-laypage-em,
html[data-theme="dark"] .layui-laypage-spr {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-laypage-limits select,
html[data-theme="dark"] .layui-laypage-btn input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-laypage a,
html[data-theme="dark"] .layui-laypage span,
html[data-theme="dark"] .layui-laypage .layui-laypage-curr .layui-laypage-em,
html[data-theme="dark"] .layui-laypage .layui-laypage-prev,
html[data-theme="dark"] .layui-laypage .layui-laypage-next {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-laypage .layui-laypage-curr .layui-laypage-em {
    background-color: #2f4b3e !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .layui-tab-title,
html[data-theme="dark"] .layui-elem-quote {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-tab-title .layui-this {
    color: #f8fafc !important;
    border-color: #2f4b3e !important;
}

html[data-theme="dark"] .layui-nav a,
html[data-theme="dark"] .layui-nav-child dd a,
html[data-theme="dark"] .layui-layer-setwin span {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-nav .layui-nav-child a:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .layui-card-header {
    background-color: #1a2332 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-unselect.layui-form-switch {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

html[data-theme="dark"] .layui-unselect.layui-form-switch.layui-form-onswitch {
    background-color: #2f4b3e !important;
    border-color: #3f6654 !important;
}

html[data-theme="dark"] .layui-form-select dl dd:hover,
html[data-theme="dark"] .layui-form-select dl dd.layui-this {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .layui-form-checkbox > span {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .layui-form-checkbox.layui-form-checked > span,
html[data-theme="dark"] .layui-form-checkbox.layui-form-checked:hover > span {
    background-color: #2f4b3e !important;
    border-color: #2f4b3e !important;
    color: #ffffff !important;
}

html[data-theme="dark"] .layui-x-select,
html[data-theme="dark"] xm-select,
html[data-theme="dark"] xm-select .xm-input,
html[data-theme="dark"] xm-select .xm-body,
html[data-theme="dark"] xm-select .xm-cascader-box {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-theme="dark"] xm-select .xm-body .xm-option-content,
html[data-theme="dark"] xm-select .xm-body .xm-group-item,
html[data-theme="dark"] xm-select .xm-body .xm-toolbar .toolbar-tag,
html[data-theme="dark"] xm-select .xm-body .xm-search > i,
html[data-theme="dark"] xm-select .xm-body .xm-select-empty {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] xm-select .xm-body .xm-option:hover,
html[data-theme="dark"] xm-select .xm-body .xm-option.selected,
html[data-theme="dark"] xm-select .xm-body .xm-paging > span {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html[data-theme="dark"] xm-select .xm-body .xm-search,
html[data-theme="dark"] xm-select .xm-body .xm-search-input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-theme="dark"] .layui-icon,
html[data-theme="dark"] .layui-table-tool .layui-icon,
html[data-theme="dark"] .layui-table-tool-self .layui-icon {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"],
html.case[data-theme="dark"] body {
    background-color: #121824 !important;
    color: #e2e8f0 !important;
}

html.case[data-theme="dark"] .card,
html.case[data-theme="dark"] .list-group-item,
html.case[data-theme="dark"] .modal-content,
html.case[data-theme="dark"] .dropdown-menu {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html.case[data-theme="dark"] .card-header,
html.case[data-theme="dark"] .card-footer {
    background-color: #1a2332 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.case[data-theme="dark"] .table {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .table thead th,
html.case[data-theme="dark"] .table-light,
html.case[data-theme="dark"] .thead-light th {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

html.case[data-theme="dark"] .table td,
html.case[data-theme="dark"] .table th {
    border-color: #334155 !important;
}

html.case[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

html.case[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

html.case[data-theme="dark"] .form-control,
html.case[data-theme="dark"] .form-select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

html.case[data-theme="dark"] .form-control:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 0.25rem rgba(56, 189, 248, 0.25) !important;
}

html.case[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

html.case[data-theme="dark"] .text-dark {
    color: #f1f5f9 !important;
}

html.case[data-theme="dark"] .bg-light,
html.case[data-theme="dark"] .badge.bg-light {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

html.case[data-theme="dark"] .bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

html.case[data-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}

html.case[data-theme="dark"] .list-group-item-action {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .list-group-item-action:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html.case[data-theme="dark"] code {
    background-color: #0f172a !important;
    color: #38bdf8 !important;
}

html.case[data-theme="dark"] .layui-layout-admin .layui-header,
html.case[data-theme="dark"] .layui-layout-admin .layui-side {
    background-color: #0f172a !important;
}

html.case[data-theme="dark"] .layui-layout-admin .layui-header .layui-nav {
    background-color: #0f172a !important;
}

/* Layui components */
html.case[data-theme="dark"] .layui-nav,
html.case[data-theme="dark"] .layui-nav-child,
html.case[data-theme="dark"] .layui-panel,
html.case[data-theme="dark"] .layui-card,
html.case[data-theme="dark"] .layui-colla-content,
html.case[data-theme="dark"] .layui-colla-item,
html.case[data-theme="dark"] .layui-tab-card {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

html.case[data-theme="dark"] .layui-nav .layui-nav-item a,
html.case[data-theme="dark"] .layui-nav-child dd a,
html.case[data-theme="dark"] .layui-breadcrumb a,
html.case[data-theme="dark"] .layui-colla-title,
html.case[data-theme="dark"] .layui-tab-title li {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .layui-nav .layui-nav-item a:hover,
html.case[data-theme="dark"] .layui-nav-child dd a:hover,
html.case[data-theme="dark"] .layui-colla-title:hover,
html.case[data-theme="dark"] .layui-tab-title li:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html.case[data-theme="dark"] .layui-form-label,
html.case[data-theme="dark"] .layui-form-mid,
html.case[data-theme="dark"] .layui-form-select dl dd,
html.case[data-theme="dark"] .layui-form-select dl dt {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .layui-input,
html.case[data-theme="dark"] .layui-textarea,
html.case[data-theme="dark"] .layui-select,
html.case[data-theme="dark"] .layui-form-select .layui-input,
html.case[data-theme="dark"] .layui-form-checkbox[lay-skin="primary"] span {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html.case[data-theme="dark"] .layui-form-select dl,
html.case[data-theme="dark"] .layui-form-selected dl {
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

html.case[data-theme="dark"] .layui-form-select dl dd:hover,
html.case[data-theme="dark"] .layui-form-select dl dd.layui-this {
    background-color: #334155 !important;
    color: #ffffff !important;
}

html.case[data-theme="dark"] .layui-table,
html.case[data-theme="dark"] .layui-table-view,
html.case[data-theme="dark"] .layui-table thead tr,
html.case[data-theme="dark"] .layui-table-header,
html.case[data-theme="dark"] .layui-table-body,
html.case[data-theme="dark"] .layui-table-page,
html.case[data-theme="dark"] .layui-table-tool,
html.case[data-theme="dark"] .layui-table-tool-panel,
html.case[data-theme="dark"] .layui-table-tool-temp,
html.case[data-theme="dark"] .layui-table-tool-self,
html.case[data-theme="dark"] .layui-table-init {
    background-color: #1e293b !important;
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .layui-table th,
html.case[data-theme="dark"] .layui-table td,
html.case[data-theme="dark"] .layui-table thead tr,
html.case[data-theme="dark"] .layui-table-view,
html.case[data-theme="dark"] .layui-table-header {
    border-color: #334155 !important;
}

html.case[data-theme="dark"] .layui-table-tool,
html.case[data-theme="dark"] .layui-table-tool-panel,
html.case[data-theme="dark"] .layui-table-page,
html.case[data-theme="dark"] .layui-table-init,
html.case[data-theme="dark"] .layui-footer {
    border-color: #334155 !important;
}

html.case[data-theme="dark"] .layui-footer {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
}

html.case[data-theme="dark"] .layui-table-tool .layui-icon,
html.case[data-theme="dark"] .layui-table-tool a,
html.case[data-theme="dark"] .layui-table-tool-panel label {
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .layui-table tbody tr:hover,
html.case[data-theme="dark"] .layui-table-click,
html.case[data-theme="dark"] .layui-table-hover {
    background-color: #334155 !important;
}

html.case[data-theme="dark"] .layui-tab-title,
html.case[data-theme="dark"] .layui-tab-brief > .layui-tab-title .layui-this,
html.case[data-theme="dark"] .layui-tab-card > .layui-tab-title {
    border-color: #334155 !important;
    background-color: #0f172a !important;
}

html.case[data-theme="dark"] .layui-tab-content,
html.case[data-theme="dark"] .layui-tab-item {
    color: #e2e8f0 !important;
}

html.case[data-theme="dark"] .layui-laypage a,
html.case[data-theme="dark"] .layui-laypage span,
html.case[data-theme="dark"] .layui-laypage input,
html.case[data-theme="dark"] .layui-laypage select {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}

html.case[data-theme="dark"] .layui-layer,
html.case[data-theme="dark"] .layui-layer-title,
html.case[data-theme="dark"] .layui-layer-content,
html.case[data-theme="dark"] .layui-layer-btn {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

html.case[data-theme="dark"] .layui-layer-title,
html.case[data-theme="dark"] .layui-layer-setwin span {
    color: #f8fafc !important;
}

html.case[data-theme="dark"] .layui-layer-btn a {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html.case[data-theme="dark"] .theme-toggle-btn {
    background: #334155;
    color: #fbbf24;
    border: 1px solid #475569;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

html.case[data-theme="light"] .theme-toggle-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

html.case .theme-toggle-icon {
    color: #fbbf24 !important;
    font-size: 16px;
}

html.case[data-theme="light"] .theme-toggle-icon {
    color: #475569 !important;
}
