/* =========================================================
   暗色增长主题（Dark Growth）
   由右上角「主题模式」按钮控制：切到深色时 html 上出现 .dark
   所有规则都挂在 html.dark 下，切回浅色自动失效
   ========================================================= */
html.dark {
  --brand: #63C795;
  --brand-deep: #4A9E70;
  --brand-2: #E5B567;
  --brand-grad: linear-gradient(135deg, #7DD3A8 0%, #63C795 55%, #4A9E70 100%);
  --brand-soft: rgba(99, 199, 149, .14);

  --ink-900: #EDF3EE;
  --ink-700: #C5D2C8;
  --ink-500: #93A89A;
  --ink-400: #6E8276;
  --ink-300: #3C414B;

  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --bg-page: #0b100d;
  --bg-card: #141815;
  --bg-soft: #1b231d;

  --sh-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 26px -20px rgba(0, 0, 0, .9);
  --sh-md: 0 1px 2px rgba(0, 0, 0, .55), 0 18px 40px -22px rgba(0, 0, 0, 1);
  --sh-pop: 0 30px 70px -30px rgba(0, 0, 0, 1);

  --el-color-primary: #63C795;
  --el-color-primary-light-3: #7DD3A8;
  --el-color-primary-light-5: #A8DCC0;
  --el-color-primary-light-7: #7C2D12;
  --el-color-primary-light-8: #5A1F0C;
  --el-color-primary-light-9: #3A1407;
  --el-color-primary-dark-2: #4A9E70;

  --el-bg-color: #141815;
  --el-bg-color-overlay: #1f2822;
  --el-bg-color-page: #0b100d;
  --el-text-color-primary: #EDF3EE;
  --el-text-color-regular: #C5D2C8;
  --el-text-color-secondary: #93A89A;
  --el-text-color-placeholder: #6E8276;
  --el-border-color: rgba(255, 255, 255, .10);
  --el-border-color-light: rgba(255, 255, 255, .07);
  --el-border-color-lighter: rgba(255, 255, 255, .05);
  --el-border-color-extra-light: rgba(255, 255, 255, .04);
  --el-fill-color-blank: #141815;
  --el-fill-color-light: #1b231d;
  --el-fill-color-lighter: #17191D;
  --el-fill-color-dark: #0F1114;
  --el-mask-color: rgba(0, 0, 0, .72);
  color-scheme: dark;
}

html.dark,
html.dark body {
  background: #0b100d !important;
  color: #EDF3EE !important;
}
html.dark body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 460px at 10% -10%, rgba(99, 199, 149, .10), transparent 62%),
    radial-gradient(760px 420px at 96% 0%, rgba(56, 189, 248, .045), transparent 60%);
}

/* ---------- 侧边栏 ---------- */
html.dark .sidebar-container,
html.dark .sidebar-container .el-menu,
html.dark .sidebar-container .sidebar-logo-container {
  background: #0C0D0F !important;
  border-right: 1px solid rgba(255, 255, 255, .06) !important;
}
html.dark .sidebar-container .sidebar-logo-container { border-bottom: 1px solid rgba(255, 255, 255, .06) !important; }
html.dark .sidebar-container .sidebar-logo-container .sidebar-title,
html.dark .sidebar-container .sidebar-logo-container h1 { color: #F2F6F3 !important; }
html.dark .sidebar-container .el-menu-item,
html.dark .sidebar-container .el-sub-menu__title { color: #93A89A !important; }
html.dark .sidebar-container .el-menu-item .el-icon,
html.dark .sidebar-container .el-sub-menu__title .el-icon { color: #77897D !important; }
html.dark .sidebar-container .el-menu-item:hover,
html.dark .sidebar-container .el-sub-menu__title:hover {
  background: rgba(255, 255, 255, .05) !important;
  color: #E5E7EB !important;
}
html.dark .sidebar-container .el-menu-item.is-active {
  background: rgba(99, 199, 149, .13) !important;
  color: #7DD3A8 !important;
  font-weight: 650 !important;
  box-shadow: inset 0 0 0 1px rgba(99, 199, 149, .22);
}
html.dark .sidebar-container .el-menu-item.is-active .el-icon { color: #7DD3A8 !important; }
html.dark .sidebar-container .el-menu-item.is-active::before {
  background: #63C795 !important;
  box-shadow: 0 0 12px rgba(99, 199, 149, .9) !important;
}
html.dark .sidebar-container .el-sub-menu.is-active > .el-sub-menu__title { color: #E5E7EB !important; }

/* ---------- 顶栏 ---------- */
html.dark .navbar {
  background: rgba(12, 13, 15, .88) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
  box-shadow: none !important;
  backdrop-filter: saturate(160%) blur(18px);
}
html.dark .navbar .hamburger-container { color: #93A89A !important; }
html.dark .navbar .hamburger-container:hover { background: rgba(255, 255, 255, .06) !important; }
html.dark .navbar .el-breadcrumb__inner,
html.dark .navbar .el-breadcrumb__inner a { color: #7C838F !important; }
html.dark .navbar .el-breadcrumb__item:last-child .el-breadcrumb__inner { color: #EDF3EE !important; }
html.dark .navbar .right-menu .right-menu-item { color: #93A89A !important; }
html.dark .navbar .right-menu .right-menu-item:hover { background: rgba(255, 255, 255, .06) !important; }
html.dark .navbar .avatar-container .user-nickname { color: #C5D2C8 !important; }
html.dark .navbar .el-dropdown { color: #C5D2C8 !important; }

/* ---------- 标签栏 ---------- */
html.dark .tags-view-container {
  background: #0b100d !important;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
}
html.dark .tags-view-container .tags-view-wrapper .tags-view-item {
  background: #141815 !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  color: #93A89A !important;
}
html.dark .tags-view-container .tags-view-wrapper .tags-view-item:hover { color: #EDF3EE !important; border-color: rgba(255,255,255,.16) !important; }
html.dark .tags-view-container .tags-view-wrapper .tags-view-item.active {
  background: rgba(99, 199, 149, .14) !important;
  border-color: rgba(99, 199, 149, .28) !important;
  color: #7DD3A8 !important;
}

/* ---------- 内容区与容器兜底 ---------- */
html.dark .app-main { background: #0b100d !important; }
html.dark .app-container,
html.dark .app-container .el-row,
html.dark .app-container .el-col,
html.dark .app-container .head-container,
html.dark .app-container .tree-container,
html.dark .box-card,
html.dark .el-card {
  background-color: transparent !important;
}
html.dark .app-container > .el-form,
html.dark .app-container > form.el-form {
  background: #141815 !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  box-shadow: var(--sh-sm) !important;
}
html.dark .app-container .el-form-item__label { color: #93A89A !important; }

/* ---------- 卡片 ---------- */
html.dark .el-card,
html.dark .stat-card,
html.dark .count-card,
html.dark .overview-card {
  background: #141815 !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  box-shadow: var(--sh-sm) !important;
}
html.dark .el-card__header { border-bottom: 1px solid rgba(255, 255, 255, .07) !important; }
html.dark .el-card.box-card { background: #141815 !important; }

/* ---------- 表格（逐层强制，防止任何一层漏白） ---------- */
html.dark .el-table {
  --el-table-border-color: rgba(255, 255, 255, .06);
  --el-table-header-bg-color: #101613;
  --el-table-row-hover-bg-color: #191C21;
  --el-table-bg-color: #141815;
  --el-table-tr-bg-color: #141815;
  --el-table-expanded-cell-bg-color: #141815;
  background-color: #141815 !important;
  border: 1px solid rgba(255, 255, 255, .07) !important;
  color: #C5D2C8 !important;
  box-shadow: var(--sh-sm) !important;
}
html.dark .el-table__inner-wrapper,
html.dark .el-table__body-wrapper,
html.dark .el-table__header-wrapper,
html.dark .el-table__footer-wrapper,
html.dark .el-scrollbar,
html.dark .el-scrollbar__wrap,
html.dark .el-scrollbar__view,
html.dark .el-table__body,
html.dark .el-table__header,
html.dark .el-table__empty-block,
html.dark .el-table__append-wrapper {
  background-color: #141815 !important;
}
html.dark .el-table table,
html.dark .el-table tbody,
html.dark .el-table thead { background-color: transparent !important; }
html.dark .el-table th.el-table__cell {
  background-color: #101613 !important;
  color: #77897D !important;
  border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
}
html.dark .el-table td.el-table__cell {
  border-bottom: 1px solid rgba(255, 255, 255, .045) !important;
  color: #C5D2C8 !important;
  background-color: #141815 !important;
}
html.dark .el-table__body tr > td.el-table__cell { background-color: #141815 !important; }
html.dark .el-table__body tr:hover > td.el-table__cell { background-color: #191C21 !important; }
html.dark .el-table__body tr.el-table__row--striped > td.el-table__cell { background-color: #121417 !important; }
html.dark .el-table__empty-text { color: #6E8276 !important; }
html.dark .el-table .cell { color: inherit !important; }
html.dark .el-table .el-button.is-link { color: #7DD3A8 !important; }
html.dark .el-table .el-button.is-link:hover { background: rgba(99, 199, 149, .14) !important; }
html.dark .el-table .el-button.is-link.is-danger { color: #FB7185 !important; }
html.dark .el-table.ops-sticky .el-table__body td.el-table__cell:last-child { background-color: #141815 !important; }
html.dark .el-table.ops-sticky .el-table__header th.el-table__cell:last-child { background-color: #101613 !important; }
html.dark .el-table.ops-sticky .el-table__body tr:hover > td.el-table__cell:last-child { background-color: #191C21 !important; }

/* ---------- 按钮 ---------- */
html.dark .el-button {
  background: transparent !important;
  border-color: rgba(255, 255, 255, .12) !important;
  color: #C5D2C8 !important;
}
html.dark .el-button:hover {
  background: rgba(255, 255, 255, .06) !important;
  border-color: rgba(255, 255, 255, .22) !important;
  color: #EDF3EE !important;
}
html.dark .el-button--primary:not(.is-link):not(.is-text):not(.is-plain) {
  background: var(--brand-grad) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 24px -12px rgba(99, 199, 149, .95) !important;
}
html.dark .el-button--primary:not(.is-link):not(.is-text):not(.is-plain):hover {
  filter: brightness(1.06);
  box-shadow: 0 14px 28px -12px rgba(99, 199, 149, 1) !important;
}
html.dark .el-button.is-plain {
  background: #1b231d !important;
  border-color: rgba(255, 255, 255, .1) !important;
  color: #C5D2C8 !important;
}
html.dark .el-button.is-plain:hover { background: #1F2329 !important; border-color: rgba(249,115,22,.4) !important; color: #7DD3A8 !important; }
html.dark .el-button--primary.is-plain {
  background: rgba(99, 199, 149, .12) !important;
  border-color: rgba(99, 199, 149, .28) !important;
  color: #7DD3A8 !important;
}
html.dark .el-button--primary.is-plain:hover { background: rgba(99, 199, 149, .2) !important; }
html.dark .el-button.is-disabled,
html.dark .el-button.is-disabled:hover {
  background: #17191D !important;
  border-color: rgba(255, 255, 255, .06) !important;
  color: #4B515C !important;
}
html.dark .el-button.is-disabled span { color: #4B515C !important; }

/* ---------- 表单控件 ---------- */
html.dark .el-input__wrapper,
html.dark .el-select__wrapper,
html.dark .el-textarea__inner {
  background: #1b231d !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09) inset !important;
  color: #EDF3EE !important;
}
html.dark .el-input__wrapper:hover,
html.dark .el-select__wrapper:hover { background: #1E2228 !important; box-shadow: 0 0 0 1px rgba(255,255,255,.16) inset !important; }
html.dark .el-input__wrapper.is-focus,
html.dark .el-select__wrapper.is-focused {
  background: #1E2228 !important;
  box-shadow: 0 0 0 1px #63C795 inset, 0 0 0 3px rgba(99, 199, 149, .16) !important;
}
html.dark .el-input__inner,
html.dark .el-textarea__inner { color: #EDF3EE !important; }
html.dark .el-input__inner::placeholder { color: #6E8276 !important; }
html.dark .el-range-input { color: #EDF3EE !important; background: transparent !important; }
html.dark .el-date-editor .el-range-separator { color: #77897D !important; }
html.dark .el-select__placeholder { color: #6E8276 !important; }
html.dark .el-form-item__error { color: #FB7185 !important; }

/* ---------- 分页 ---------- */
html.dark .el-pagination .btn-prev,
html.dark .el-pagination .btn-next,
html.dark .el-pagination .el-pager li {
  background: #141815 !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
  color: #93A89A !important;
}
html.dark .el-pagination .el-pager li.is-active {
  background: var(--brand-grad) !important;
  border-color: transparent !important;
  color: #fff !important;
}
html.dark .el-pagination__total,
html.dark .el-pagination__jump { color: #77897D !important; }

/* ---------- 弹窗 / 抽屉 / 下拉 ---------- */
html.dark .el-dialog,
html.dark .el-drawer { background: #141815 !important; border: 1px solid rgba(255, 255, 255, .08) !important; }
html.dark .el-dialog__header { border-bottom: 1px solid rgba(255, 255, 255, .07) !important; }
html.dark .el-dialog__title { color: #EDF3EE !important; }
html.dark .el-dialog__footer { background: #141815 !important; border-top: 1px solid rgba(255, 255, 255, .07) !important; }
html.dark .el-drawer__header { border-bottom: 1px solid rgba(255, 255, 255, .07) !important; }

html.dark .el-dropdown-menu,
html.dark .el-select-dropdown,
html.dark .el-picker-panel { background: #1f2822 !important; border: 1px solid rgba(255, 255, 255, .09) !important; }
html.dark .el-dropdown-menu__item,
html.dark .el-select-dropdown__item { color: #C5D2C8 !important; }
html.dark .el-dropdown-menu__item:hover,
html.dark .el-select-dropdown__item.is-hovering { background: rgba(99, 199, 149, .14) !important; color: #7DD3A8 !important; }
html.dark .el-select-dropdown__item.is-selected { color: #7DD3A8 !important; }
html.dark .el-picker-panel__body,
html.dark .el-date-picker,
html.dark .el-popper.is-light { background: #1f2822 !important; border-color: rgba(255,255,255,.09) !important; color: #C5D2C8 !important; }
html.dark .el-date-table td.available:hover { color: #7DD3A8 !important; }
html.dark .el-date-table td.current:not(.disabled) .el-date-table-cell__text { background: #63C795 !important; color: #fff !important; }
html.dark .el-date-table th { color: #77897D !important; border-bottom-color: rgba(255,255,255,.08) !important; }
html.dark .el-message { background: #1f2822 !important; border-color: rgba(255,255,255,.1) !important; color: #EDF3EE !important; }
html.dark .el-message-box { background: #141815 !important; border-color: rgba(255,255,255,.1) !important; }
html.dark .el-message-box__title { color: #EDF3EE !important; }
html.dark .el-message-box__message { color: #C5D2C8 !important; }

html.dark .el-tag { background: rgba(255, 255, 255, .07) !important; color: #C5D2C8 !important; }

/* 树 / 开关 / 单选框 */
html.dark .el-tree { background: transparent !important; color: #C5D2C8 !important; }
html.dark .el-tree-node__content:hover { background: rgba(255, 255, 255, .05) !important; }
html.dark .el-tree-node.is-current > .el-tree-node__content { background: rgba(99, 199, 149, .12) !important; }
html.dark .el-switch.is-checked .el-switch__core { background: #63C795 !important; border-color: #63C795 !important; }
html.dark .el-radio__label,
html.dark .el-checkbox__label { color: #C5D2C8 !important; }

/* ---------- 统计页 ---------- */
html.dark .el-alert {
  background: rgba(99, 199, 149, .07) !important;
  border: 1px solid rgba(99, 199, 149, .16) !important;
  color: #B4B9C4 !important;
}
html.dark .el-alert__title { color: #D9DDE5 !important; }
html.dark .el-segmented { background: #1b231d !important; border: 1px solid rgba(255,255,255,.06); }
html.dark .el-segmented__item { color: #93A89A !important; }
html.dark .el-segmented__item.is-selected { background: #63C795 !important; color: #fff !important; }

/* ---------- 滚动条 ---------- */
html.dark ::-webkit-scrollbar-thumb { background: #2A2E36; background-clip: content-box; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #3D434D; background-clip: content-box; }

/* ---------- 洞察带 ---------- */
html.dark .ci-card {
  background: #141815;
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: var(--sh-sm);
}
html.dark .ci-card::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0) 62%);
}
html.dark .ci-card:hover { border-color: rgba(255, 255, 255, .14); }
html.dark .ci-title { color: #77897D; }
html.dark .ci-title i { background: #63C795; box-shadow: 0 0 0 3px rgba(99, 199, 149, .16); }
html.dark .ci-card .ci-kv-row { color: #93A89A; }
html.dark .ci-card .ci-kv-row b { color: #F2F6F3; font-size: 17px; }
html.dark .ci-card .ci-kv-row em { color: #6E8276; }
html.dark .ci-card .ci-legend span { color: #93A89A; }
html.dark .ci-card .ci-donut::after { background: #141815; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .7); }
html.dark .ci-card .ci-donut b { color: #F2F6F3; font-size: 19px; }

html.dark .ci-card.ci-yellow {
  background: linear-gradient(150deg, #2A6B4C 0%, #1F5238 55%, #163A29 100%);
  border-color: rgba(99, 199, 149, .38);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 22px 46px -24px rgba(99, 199, 149, .55);
}
html.dark .ci-card.ci-yellow .ci-title { color: rgba(214, 255, 232, .68); }
html.dark .ci-card.ci-yellow .ci-title i { background: #A8E0C2; box-shadow: 0 0 0 3px rgba(168, 224, 194, .16); }
html.dark .ci-card.ci-yellow .ci-kv-row { color: rgba(214, 255, 232, .78); }
html.dark .ci-card.ci-yellow .ci-kv-row b { color: #F0FFF7; }
html.dark .ci-card.ci-yellow .ci-kv-row em { color: rgba(214, 255, 232, .56); }
html.dark .ci-card.ci-yellow .ci-legend span { color: rgba(214, 255, 232, .78); }
html.dark .ci-card.ci-yellow .ci-donut::after { background: #235C40; box-shadow: inset 0 1px 4px rgba(0, 0, 0, .35); }
html.dark .ci-card.ci-yellow .ci-donut b { color: #F0FFF7; }

html.dark .ci-card.ci-trend .ci-bar {
  background: linear-gradient(180deg, #A8DCC0 0%, #63C795 62%, #4A9E70 100%);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .16) inset;
}
html.dark .ci-card.ci-trend .ci-bar.zero {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.12), rgba(255,255,255,.12) 3px, transparent 3px, transparent 6px);
  border-color: rgba(255, 255, 255, .12);
}
html.dark .ci-card.ci-trend .ci-bars::after { background: rgba(255, 255, 255, .08); }
html.dark .ci-card.ci-trend .ci-bar-val { color: #D9DDE5; }
html.dark .ci-card.ci-trend .ci-bar-lbl { color: #6E8276; }

html.dark .ci-card.ci-dark {
  background: linear-gradient(160deg, #1B1E24 0%, #14161A 60%, #101613 100%);
  border-color: rgba(255, 255, 255, .09);
}
html.dark .ci-card.ci-dark .ci-todo-item { background: rgba(255, 255, 255, .04); }
html.dark .ci-card.ci-dark .ci-todo-item:hover { background: rgba(255, 255, 255, .08); }
html.dark .ci-card.ci-dark .ci-todo-num.warn { color: #A8DCC0; }

html.dark .ci-skeleton {
  background: linear-gradient(90deg, #141815 25%, #1B1E24 37%, #141815 63%);
  background-size: 400% 100%;
  border-color: rgba(255, 255, 255, .07);
}
