/* =========================================================
   深色主题：参考铁路基础设施风险管控系统
   仅覆盖颜色、边框、阴影；不修改任何布局尺寸与排版规则
   ========================================================= */
html[data-theme="dark"] {
  color-scheme: dark;
  --rail-bg: #0b1d32;
  --rail-bg-2: #102943;
  --rail-panel: rgba(18, 45, 72, .94);
  --rail-panel-soft: rgba(22, 52, 82, .84);
  --rail-line: rgba(83, 157, 232, .34);
  --rail-line-soft: rgba(83, 157, 232, .2);
  --rail-blue: #398cff;
  --rail-cyan: #42dcff;
  --rail-text: #e2efff;
  --rail-sub: #a4c2df;
  --rail-muted: #7898b9;
  --el-color-primary: #398cff;
  --el-color-primary-light-3: #63a7ff;
  --el-color-primary-light-5: #82baff;
  --el-color-primary-light-7: #275d91;
  --el-color-primary-light-8: #1d456d;
  --el-color-primary-light-9: #163653;
  --el-color-primary-dark-2: #2875d8;
  --el-bg-color: #102943;
  --el-bg-color-page: #0b1d32;
  --el-bg-color-overlay: #102b49;
  --el-text-color-primary: #e2efff;
  --el-text-color-regular: #c0d6eb;
  --el-text-color-secondary: #a4c2df;
  --el-text-color-placeholder: #7898b9;
  --el-border-color: rgba(83, 157, 232, .34);
  --el-border-color-light: rgba(83, 157, 232, .25);
  --el-border-color-lighter: rgba(83, 157, 232, .18);
  --el-border-color-extra-light: rgba(83, 157, 232, .12);
  --el-fill-color: #173653;
  --el-fill-color-light: #173653;
  --el-fill-color-lighter: #15314d;
  --el-fill-color-extra-light: #122b45;
  --el-fill-color-dark: #0d2239;
  --el-fill-color-blank: #102943;
  --el-mask-color: rgba(2, 10, 24, .72);
  --el-mask-color-extra-light: rgba(2, 10, 24, .35);
}
html[data-theme="dark"] .wb-map-panel,
html[data-theme="dark"] .wb-panel,
html[data-theme="dark"] .wb-report-strip,
html[data-theme="dark"] .wb-kpi-card {
  background: linear-gradient(145deg, rgba(22, 52, 82, .96), rgba(13, 35, 58, .98));
  border-color: var(--rail-line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] .wb-section-head,
html[data-theme="dark"] .wb-resource-item,
html[data-theme="dark"] .wb-report-title,
html[data-theme="dark"] .wb-report-item {
  border-color: var(--rail-line) !important;
}

html[data-theme="dark"] .wb-report-strip > * {
  border-color: var(--rail-line) !important;
}

html[data-theme="dark"] body {
  color: var(--rail-text);
  background: var(--rail-bg);
}
html[data-theme="dark"] .app-aside {
  background: linear-gradient(180deg, rgba(22,59,94,.98), rgba(14,39,65,.98));
  border-right: 1px solid var(--rail-line-soft);
}
html[data-theme="dark"] .app-logo {
  color: #eaf6ff;
  background: linear-gradient(180deg, #18558a 0%, #12416f 55%, #0d2e50 100%);
  border-bottom: 1px solid rgba(0,190,255,.4);
  text-shadow: 0 0 12px rgba(66,220,255,.22);
}
html[data-theme="dark"] .app-aside .el-menu,
html[data-theme="dark"] .app-aside .el-menu--inline {
  background: transparent !important;
  border-right: 0;
}
html[data-theme="dark"] .app-aside .el-menu-item,
html[data-theme="dark"] .app-aside .el-sub-menu__title {
  color: #b6d3ee !important;
  background: transparent !important;
}
html[data-theme="dark"] .app-aside .el-menu-item:hover,
html[data-theme="dark"] .app-aside .el-sub-menu__title:hover {
  color: #fff !important;
  background: rgba(45,132,220,.25) !important;
}
html[data-theme="dark"] .app-aside .el-menu-item.is-active {
  color: #fff !important;
  background: linear-gradient(90deg,rgba(25,120,255,.55),rgba(25,120,255,.1)) !important;
  box-shadow: inset 3px 0 0 var(--rail-cyan), 0 0 12px rgba(20,140,255,.2);
}
html[data-theme="dark"] .app-aside .el-sub-menu .el-menu-item {
  color: #8fb4d8 !important;
}
html[data-theme="dark"] .app-aside .el-sub-menu .el-menu-item.is-active {
  color: var(--rail-cyan) !important;
  background: rgba(48,135,220,.22) !important;
}
html[data-theme="dark"] .app-header {
  color: var(--rail-text);
  background: linear-gradient(180deg,#18558a 0%,#12416f 48%,#0d2e50 100%);
  border-bottom: 1px solid rgba(0,190,255,.48);
  box-shadow: 0 3px 16px rgba(0,0,0,.35);
}
html[data-theme="dark"] .app-header .sys-name { color: #eef7ff; }
html[data-theme="dark"] .app-header > span[style] { color: #9cc0e6 !important; }
html[data-theme="dark"] .app-header .el-dropdown > span { color: #eaf5ff !important; }
html[data-theme="dark"] .app-page-tabs {
  background: #102943;
  border-bottom-color: var(--rail-line);
}
html[data-theme="dark"] .app-page-tabs li {
  color: #a4c2df;
  border-color: var(--rail-line);
  background: rgba(13,35,58,.65);
}
html[data-theme="dark"] .app-page-tabs li.is-active {
  color: var(--rail-cyan);
  background: rgba(25,120,255,.18);
  border-color: rgba(66,220,255,.55);
}
html[data-theme="dark"] .app-page-tabs button:hover { background: rgba(66,220,255,.16); }
html[data-theme="dark"] .app-main {
  color: var(--rail-text);
  background:
    radial-gradient(1000px 460px at 18% -12%,rgba(10,100,210,.16),transparent 68%),
    radial-gradient(800px 420px at 92% 112%,rgba(0,160,255,.1),transparent 70%),
    linear-gradient(180deg,#142f4b 0%,#0b1d32 100%);
}
html[data-theme="dark"] .app-main.app-main-home { background: #0b1d32; }
html[data-theme="dark"] .workbench-home,
html[data-theme="dark"] .workbench-home.wb-redesign {
  color: var(--rail-text);
  background: linear-gradient(145deg,#142f4b,#0b1d32);
}
html[data-theme="dark"] .workbench-module,
html[data-theme="dark"] .wb-module-card,
html[data-theme="dark"] .workbench-map-panel,
html[data-theme="dark"] .detail-page-body,
html[data-theme="dark"] .page-card > .el-card,
html[data-theme="dark"] .app-main .el-card {
  color: var(--rail-text);
  background: linear-gradient(145deg,rgba(22,52,82,.94),rgba(13,35,58,.96));
  border-color: var(--rail-line);
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}
html[data-theme="dark"] .workbench-module:hover,
html[data-theme="dark"] .wb-module-card:hover {
  border-color: rgba(66,220,255,.55);
  box-shadow: 0 8px 22px rgba(0,0,0,.25),0 0 14px rgba(57,140,255,.12);
}
html[data-theme="dark"] .workbench-title,
html[data-theme="dark"] .module-title,
html[data-theme="dark"] .map-head-title,
html[data-theme="dark"] .wb-module-copy h3,
html[data-theme="dark"] .page-title-row h3,
html[data-theme="dark"] .el-card__header {
  color: var(--rail-text);
}
html[data-theme="dark"] .workbench-subtitle,
html[data-theme="dark"] .module-desc,
html[data-theme="dark"] .module-arrow,
html[data-theme="dark"] .map-head-sub,
html[data-theme="dark"] .page-desc,
html[data-theme="dark"] .detail-page-subject {
  color: var(--rail-sub);
}
html[data-theme="dark"] .workbench-map {
  background: #102943;
}
html[data-theme="dark"] .workbench-map-legend,
html[data-theme="dark"] .workbench-map-pop {
  color: var(--rail-text);
  background: rgba(12,34,56,.94);
  border-color: var(--rail-line);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
html[data-theme="dark"] .map-pop-title,
html[data-theme="dark"] .map-pop-foot,
html[data-theme="dark"] .workbench-map-head {
  border-color: var(--rail-line-soft);
}
html[data-theme="dark"] .workbench-station-label {
  fill: #d8efff;
  stroke: rgba(9,29,50,.92);
}
html[data-theme="dark"] .workbench-map-legend { color: var(--rail-sub); }
html[data-theme="dark"] .app-main .el-card {
  --el-card-bg-color: transparent;
}
html[data-theme="dark"] .el-card__header { border-bottom-color: var(--rail-line); }
html[data-theme="dark"] .el-table,
html[data-theme="dark"] .el-table tr,
html[data-theme="dark"] .el-table th.el-table__cell,
html[data-theme="dark"] .el-table td.el-table__cell {
  color: #c9def2;
  background: transparent;
  border-bottom-color: var(--rail-line-soft);
}
html[data-theme="dark"] .el-table {
  --el-table-border-color: var(--rail-line);
  --el-table-header-bg-color: #173a5b;
  --el-table-tr-bg-color: rgba(13,35,58,.55);
  --el-table-row-hover-bg-color: rgba(42,120,195,.22);
  --el-table-current-row-bg-color: rgba(42,120,195,.28);
  --el-table-header-text-color: #b9d8f4;
  --el-table-text-color: #c9def2;
  --el-table-bg-color: #102943;
  --el-table-fixed-box-shadow: 0 0 10px rgba(0,0,0,.25);
}
html[data-theme="dark"] .el-table th.el-table__cell {
  color: #c6e3ff;
  background: #173a5b !important;
}
html[data-theme="dark"] .el-table tr { background: rgba(13,35,58,.55); }
html[data-theme="dark"] .el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: rgba(29,68,105,.25);
}
html[data-theme="dark"] .el-table__body tr:hover > td.el-table__cell {
  background: rgba(42,120,195,.22) !important;
}
html[data-theme="dark"] .el-table__inner-wrapper::before,
html[data-theme="dark"] .el-table--border::after,
html[data-theme="dark"] .el-table--border::before { background: var(--rail-line); }
html[data-theme="dark"] .el-table__empty-block { background: transparent; }
html[data-theme="dark"] .el-form-item__label,
html[data-theme="dark"] .el-descriptions__label,
html[data-theme="dark"] .el-statistic__head { color: var(--rail-sub); }
html[data-theme="dark"] .el-input__wrapper,
html[data-theme="dark"] .el-textarea__inner,
html[data-theme="dark"] .el-select__wrapper,
html[data-theme="dark"] .el-date-editor.el-input__wrapper,
html[data-theme="dark"] .el-date-editor .el-input__wrapper,
html[data-theme="dark"] .el-input-number,
html[data-theme="dark"] .el-cascader .el-input__wrapper {
  background: rgba(8,27,46,.82);
  box-shadow: 0 0 0 1px var(--rail-line) inset;
}
html[data-theme="dark"] .el-input__inner,
html[data-theme="dark"] .el-textarea__inner,
html[data-theme="dark"] .el-select__selected-item,
html[data-theme="dark"] .el-select__placeholder,
html[data-theme="dark"] .el-input-number__decrease,
html[data-theme="dark"] .el-input-number__increase {
  color: var(--rail-text);
}
html[data-theme="dark"] .el-input__wrapper.is-focus,
html[data-theme="dark"] .el-select__wrapper.is-focused,
html[data-theme="dark"] .el-textarea__inner:focus {
  box-shadow: 0 0 0 1px var(--rail-cyan) inset,0 0 8px rgba(66,220,255,.12);
}
html[data-theme="dark"] .el-input__inner::placeholder,
html[data-theme="dark"] .el-textarea__inner::placeholder { color: #7898b9; }
html[data-theme="dark"] .el-button--default,
html[data-theme="dark"] .el-button.is-plain {
  color: #c5def5;
  background: rgba(19,54,85,.75);
  border-color: var(--rail-line);
}
html[data-theme="dark"] .el-button--default:hover,
html[data-theme="dark"] .el-button.is-plain:hover {
  color: var(--rail-cyan);
  background: rgba(40,105,165,.25);
  border-color: rgba(66,220,255,.55);
}
html[data-theme="dark"] .el-button--primary {
  color: #fff;
  background: linear-gradient(135deg,#398cff,#1765bd);
  border-color: #398cff;
}
html[data-theme="dark"] .el-button--primary.is-plain {
  color: #8fcaff;
  background: rgba(36,112,190,.12);
  border-color: rgba(57,140,255,.55);
}
html[data-theme="dark"] .el-button.is-text,
html[data-theme="dark"] .el-button--text { color: #78c8ff; }
html[data-theme="dark"] .el-button.is-text:hover,
html[data-theme="dark"] .el-button--text:hover { color: var(--rail-cyan); background: rgba(66,220,255,.08); }
html[data-theme="dark"] .el-pagination { color: var(--rail-sub); }
html[data-theme="dark"] .el-pagination button,
html[data-theme="dark"] .el-pager li {
  color: #b9d8f4;
  background: #173653;
}
html[data-theme="dark"] .el-pager li.is-active { color: #fff; background: #287bd5; }
html[data-theme="dark"] .el-dialog,
html[data-theme="dark"] .el-drawer,
html[data-theme="dark"] .el-message-box {
  color: var(--rail-text);
  background: linear-gradient(145deg,#102b49,#0b1d32);
  border: 1px solid var(--rail-line);
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
}
html[data-theme="dark"] .el-dialog__header,
html[data-theme="dark"] .el-drawer__header,
html[data-theme="dark"] .el-message-box__header {
  color: var(--rail-text);
  border-bottom-color: var(--rail-line-soft);
}
html[data-theme="dark"] .el-dialog__title,
html[data-theme="dark"] .el-message-box__title,
html[data-theme="dark"] .el-drawer__title { color: var(--rail-text); }
html[data-theme="dark"] .el-dialog__body,
html[data-theme="dark"] .el-drawer__body,
html[data-theme="dark"] .el-message-box__content { color: #c0d6eb; }
html[data-theme="dark"] .el-overlay { background: rgba(2,10,24,.72); }
html[data-theme="dark"] .el-popper,
html[data-theme="dark"] .el-select__popper,
html[data-theme="dark"] .el-dropdown__popper,
html[data-theme="dark"] .el-picker__popper,
html[data-theme="dark"] .el-date-picker,
html[data-theme="dark"] .el-time-panel {
  color: var(--rail-text);
  background: #102b49;
  border-color: var(--rail-line);
}
html[data-theme="dark"] .el-select-dropdown__item,
html[data-theme="dark"] .el-dropdown-menu__item,
html[data-theme="dark"] .el-picker-panel,
html[data-theme="dark"] .el-date-table th,
html[data-theme="dark"] .el-date-picker__header-label { color: #c5def5; }
html[data-theme="dark"] .el-select-dropdown__item.hover,
html[data-theme="dark"] .el-select-dropdown__item:hover,
html[data-theme="dark"] .el-dropdown-menu__item:hover { background: rgba(57,140,255,.2); }
html[data-theme="dark"] .el-tabs__nav-wrap::after { background: var(--rail-line); }
html[data-theme="dark"] .el-tabs__item { color: var(--rail-sub); }
html[data-theme="dark"] .el-tabs__item.is-active,
html[data-theme="dark"] .el-tabs__item:hover { color: var(--rail-cyan); }
html[data-theme="dark"] .el-tabs__active-bar { background: var(--rail-cyan); }
html[data-theme="dark"] .el-descriptions__body,
html[data-theme="dark"] .el-descriptions__table,
html[data-theme="dark"] .el-descriptions__cell { background: transparent; }
html[data-theme="dark"] .el-descriptions__cell { border-color: var(--rail-line); }
html[data-theme="dark"] .el-alert { background: rgba(23,54,83,.78); border: 1px solid var(--rail-line); }
html[data-theme="dark"] .el-empty__description,
html[data-theme="dark"] .el-empty__description p { color: var(--rail-sub); }
html[data-theme="dark"] .el-divider { border-color: var(--rail-line); }
html[data-theme="dark"] .import-guide {
  color: #c5def5;
  background: rgba(20,54,84,.72);
  border-color: var(--rail-line);
}
html[data-theme="dark"] .detail-page-body { background: rgba(16,41,67,.9); }
html[data-theme="dark"] .detail-page-subject { color: var(--rail-sub); }
html[data-theme="dark"] .mark { color: #17283a; background: #f2d36b; }
html[data-theme="dark"] .link-like { color: #78c8ff; }
html[data-theme="dark"] .demo-watermark { color: rgba(190,220,255,.06); }
html[data-theme="dark"] .mobile-bg { background: #0b1d32; }
html[data-theme="dark"] .m-card {
  color: var(--rail-text);
  background: #102943;
  border: 1px solid var(--rail-line);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
html[data-theme="dark"] .m-sec-title,
html[data-theme="dark"] .m-v { color: var(--rail-text); }
html[data-theme="dark"] .m-row { border-bottom-color: var(--rail-line-soft); }
html[data-theme="dark"] .m-k { color: var(--rail-sub); }
html[data-theme="dark"] .m-alert { background: rgba(150,40,50,.18); border-color: rgba(255,100,110,.4); color: #ff9ba4; }
html[data-theme="dark"] .theme-toggle {
  color: #bfeaff !important;
  border-color: rgba(125,205,255,.48) !important;
  background: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] .theme-toggle:hover {
  color: #fff !important;
  border-color: var(--rail-cyan) !important;
  background: rgba(66,220,255,.14) !important;
}


html[data-theme="dark"] .login-wrap {
  background:
    radial-gradient(900px 520px at 20% 8%,rgba(30,130,220,.22),transparent 65%),
    radial-gradient(720px 460px at 90% 90%,rgba(0,190,255,.12),transparent 70%),
    linear-gradient(145deg,#142f4b,#081a2e);
}
html[data-theme="dark"] .login-card {
  color: var(--rail-text);
  background: linear-gradient(145deg,rgba(18,45,72,.96),rgba(9,27,47,.98));
  border: 1px solid var(--rail-line);
  box-shadow: 0 18px 55px rgba(0,0,0,.42),0 0 22px rgba(57,140,255,.1);
}
html[data-theme="dark"] .login-card .sys-name { color: #e2efff; }
html[data-theme="dark"] .login-card .sys-sub,
html[data-theme="dark"] .login-card .login-foot,
html[data-theme="dark"] .login-card p { color: var(--rail-sub); }
html[data-theme="dark"] .login-card .logo {
  color: #9fe2ff;
  filter: drop-shadow(0 0 9px rgba(60,200,255,.65));
}
html[data-theme="dark"] .login-err { color: #ff9ba4; }
html[data-theme="dark"] .app-main h1,
html[data-theme="dark"] .app-main h2,
html[data-theme="dark"] .app-main h3,
html[data-theme="dark"] .app-main h4,
html[data-theme="dark"] .app-main strong,
html[data-theme="dark"] .app-main b { color: inherit; }
html[data-theme="dark"] .app-main p,
html[data-theme="dark"] .app-main label,
html[data-theme="dark"] .app-main .el-checkbox__label,
html[data-theme="dark"] .app-main .el-radio__label { color: var(--rail-sub); }
html[data-theme="dark"] .el-checkbox__input.is-checked .el-checkbox__inner,
html[data-theme="dark"] .el-radio__input.is-checked .el-radio__inner { background: var(--rail-blue); border-color: var(--rail-blue); }
html[data-theme="dark"] .el-checkbox__inner,
html[data-theme="dark"] .el-radio__inner { background: #102943; border-color: #527da5; }
html[data-theme="dark"] .el-switch__core { background: #244766; border-color: #527da5; }
html[data-theme="dark"] .el-progress-bar__outer { background: rgba(110,155,195,.2); }
html[data-theme="dark"] .el-tree,
html[data-theme="dark"] .el-tree-node__content { color: var(--rail-text); background: transparent; }
html[data-theme="dark"] .el-tree-node__content:hover { background: rgba(57,140,255,.16); }
html[data-theme="dark"] .el-timeline-item__timestamp,
html[data-theme="dark"] .el-timeline-item__content { color: var(--rail-sub); }
html[data-theme="dark"] .el-upload-dragger { background: rgba(8,27,46,.65); border-color: var(--rail-line); }
html[data-theme="dark"] .el-upload-dragger:hover { border-color: var(--rail-cyan); }
html[data-theme="dark"] .el-result__title,
html[data-theme="dark"] .el-result__subtitle { color: var(--rail-sub); }
html[data-theme="dark"] .el-statistic__content { color: #e2efff; }
