/* 创奇售后 品牌视觉强化 + 暗色模式 + 密集表格小屏优化 v1.0 (2026-11-02) */

/* ===== 品牌视觉强化 ===== */
:root {
  --cq-brand: #165DFF;
  --cq-brand-deep: #0E42D2;
  --cq-brand-soft: #4A8BFF;
}
#app .el-button--primary {
  background: linear-gradient(135deg, var(--cq-brand) 0%, var(--cq-brand-soft) 100%);
  border: none;
  font-weight: 500;
  letter-spacing: .5px;
}
#app .el-button--primary:hover { box-shadow: 0 6px 16px rgba(22,93,255,.32); }
#app .el-card { border-radius: 12px; }
#app .el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(22,93,255,.9), rgba(22,93,255,.5)) !important;
  color: #fff !important;
  border-radius: 8px;
}

/* ===== 密集表格小屏优化 ===== */
@media (max-width: 768px) {
  #app .el-table { font-size: 12px; }
  #app .el-table .cell { padding: 0 4px !important; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #app .el-table__body tr > td { padding: 6px 0 !important; }
  #app .el-card__body { padding: 8px !important; }
  #app .el-pagination { flex-wrap: wrap; justify-content: center; row-gap: 6px; }
  #app .el-dialog { width: 96% !important; margin: 4vh auto 0; }
  #app .el-drawer { width: 92% !important; }
  #app .el-form-item { margin-bottom: 10px !important; }
}
@media (min-width: 769px) and (max-width: 992px) {
  #app .el-table { font-size: 13px; }
  #app .el-table .cell { padding: 0 6px !important; }
}

/* ===== 暗色模式 ===== */
html[data-theme="dark"] {
  --cq-bg: #12151F;
  --cq-bg-soft: #1A1E2A;
  --cq-bg-card: #1D2130;
  --cq-text: #E6E8EF;
  --cq-text-soft: #A0A7BC;
  --cq-border: #2A2F42;
  --el-bg-color: #1D2130;
  --el-bg-color-overlay: #1D2130;
  --el-bg-color-page: #12151F;
  --el-fill-color-blank: #1D2130;
  --el-fill-color-light: #1A1E2A;
  --el-fill-color-lighter: #1A1E2A;
  --el-fill-color-extra-light: #1A1E2A;
  --el-text-color-primary: #E6E8EF;
  --el-text-color-regular: #A0A7BC;
  --el-text-color-secondary: #8B93A9;
  --el-text-color-placeholder: #6B7184;
  --el-border-color: #2A2F42;
  --el-border-color-light: #2A2F42;
  --el-border-color-lighter: #2A2F42;
  --el-border-color-extra-light: #2A2F42;
  --el-mask-color: rgba(0,0,0,.55);
}
html[data-theme="dark"] body { background: #12151F !important; color: #E6E8EF !important; }
html[data-theme="dark"] #app .el-card,
html[data-theme="dark"] #app .el-table,
html[data-theme="dark"] #app .el-dialog,
html[data-theme="dark"] #app .el-drawer { background: #1D2130; border-color: #2A2F42; }
html[data-theme="dark"] #app .el-table th,
html[data-theme="dark"] #app .el-table tr { background: #1A1E2A; color: #E6E8EF; }
html[data-theme="dark"] #app .el-table--striped .el-table__body tr.el-table__row--striped td { background: #1A1E2A; }
html[data-theme="dark"] #app .el-table--enable-row-hover .el-table__body tr:hover > td { background: rgba(22,93,255,.14) !important; }
html[data-theme="dark"] #app .el-menu { background: #1D2130; }
html[data-theme="dark"] #app .el-menu-item { color: #A0A7BC; }
html[data-theme="dark"] #app .el-menu-item.is-active { color: #fff !important; }
html[data-theme="dark"] #app .el-input__wrapper,
html[data-theme="dark"] #app .el-textarea__inner,
html[data-theme="dark"] #app .el-select__wrapper { background: #1A1E2A; box-shadow: 0 0 0 1px #2A2F42 inset !important; }
html[data-theme="dark"] #app .el-input__inner,
html[data-theme="dark"] #app .el-textarea__inner { color: #E6E8EF; }
html[data-theme="dark"] #app h1,
html[data-theme="dark"] #app h2,
html[data-theme="dark"] #app h3 { color: #E6E8EF !important; }
html[data-theme="dark"] #app .el-form-item__label { color: #A0A7BC; }
html[data-theme="dark"] #app .el-dropdown-menu,
html[data-theme="dark"] #app .el-select-dropdown { background: #1D2130; }
html[data-theme="dark"] #app .el-dropdown-menu__item,
html[data-theme="dark"] #app .el-select-dropdown__item { color: #E6E8EF; }
html[data-theme="dark"] #app .el-dropdown-menu__item:hover,
html[data-theme="dark"] #app .el-select-dropdown__item.is-hovered { background: #1A1E2A; }
html[data-theme="dark"] #app .el-pagination.is-background .el-pager li { background: #1A1E2A; color: #A0A7BC; }
html[data-theme="dark"] #app .el-pagination.is-background .el-pager li.is-active { background: var(--cq-brand); color: #fff; }
html[data-theme="dark"] ::-webkit-scrollbar { width: 8px; height: 8px; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3A4160; border-radius: 4px; }
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #1A1E2A; }

/* ===== 登录页自定义容器暗色补全 ===== */
html[data-theme="dark"] .login-container { background: #12151F !important; }
html[data-theme="dark"] .bg-decoration .circle { background: rgba(22,93,255,.08) !important; }
html[data-theme="dark"] .login-box { background: #1D2130 !important; border: 1px solid #2A2F42; box-shadow: 0 12px 40px rgba(0,0,0,.45); }
html[data-theme="dark"] .login-right,
html[data-theme="dark"] .form-wrapper { background: #1D2130 !important; }
html[data-theme="dark"] .form-header h2,
html[data-theme="dark"] .form-header .title { color: #E6E8EF !important; }
html[data-theme="dark"] .form-header p,
html[data-theme="dark"] .form-header .subtitle { color: #8B93A9 !important; }
html[data-theme="dark"] .login-left { background: linear-gradient(150deg, #0E42D2 0%, #0A2E94 100%) !important; }
html[data-theme="dark"] .footer-section { color: #6B7184 !important; }

/* ===== 主布局通用容器暗色兜底 ===== */
html[data-theme="dark"] .layout-container,
html[data-theme="dark"] .app-container,
html[data-theme="dark"] .main-content,
html[data-theme="dark"] .page-container { background: #12151F; }
html[data-theme="dark"] .el-header,
html[data-theme="dark"] .navbar,
html[data-theme="dark"] .app-header { background: #1D2130 !important; border-color: #2A2F42 !important; }
html[data-theme="dark"] .el-aside,
html[data-theme="dark"] .sidebar { background: #161A26 !important; }
html[data-theme="dark"] .el-main,
html[data-theme="dark"] .app-main { background: #12151F !important; }

/* ===== 内部页面自定义容器暗色补全 ===== */
html[data-theme="dark"] .layout-container { background: #12151F !important; }
html[data-theme="dark"] .sidebar-mask { background: rgba(0,0,0,.5) !important; }
html[data-theme="dark"] .sidebar-menu { background: #161A26 !important; border-right: 1px solid #2A2F42; }
html[data-theme="dark"] .page-header { background: #1D2130 !important; border-bottom: 1px solid #2A2F42; color: #E6E8EF; }
html[data-theme="dark"] .content-box { background: #12151F !important; }
html[data-theme="dark"] .card-vertical { background: #1D2130 !important; border: 1px solid #2A2F42; }
html[data-theme="dark"] .tab-bar { background: #1D2130 !important; border-color: #2A2F42 !important; }
html[data-theme="dark"] .breadcrumb-item { color: #8B93A9 !important; }
html[data-theme="dark"] .el-breadcrumb__inner,
html[data-theme="dark"] .el-breadcrumb__separator { color: #8B93A9 !important; }
html[data-theme="dark"] .el-tabs__item { color: #A0A7BC; }
html[data-theme="dark"] .el-tabs__item.is-active { color: #4A8BFF; }
html[data-theme="dark"] .el-tabs__nav-wrap::after { background-color: #2A2F42; }
html[data-theme="dark"] .el-tabs__active-bar { background-color: #4A8BFF; }
html[data-theme="dark"] .el-tabs__header { margin: 0 0 12px; }
