@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
  background-color: #1a1a2e;
  color: #ffffff;
}

label {
  font-weight: 700;
  color: #ffffff;
}

html {
  height: 100%;
  box-sizing: border-box;
  background-color: #1a1a2e;
}

#app {
  height: 100%;
  background-color: #1a1a2e;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

.no-padding {
  padding: 0px !important;
}

.padding-content {
  padding: 4px 0;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: #00d4ff;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.fr {
  float: right;
}

.fl {
  float: left;
}

.pr-5 {
  padding-right: 5px;
}

.pl-5 {
  padding-left: 5px;
}

.block {
  display: block;
}

.pointer {
  cursor: pointer;
}

.inlineBlock {
  display: block;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

aside {
  background: #1e1e2d;
  padding: 8px 24px;
  margin-bottom: 20px;
  border-radius: 2px;
  display: block;
  line-height: 32px;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  border: 1px solid rgba(255, 255, 255, 0.1);

  a {
    color: #00d4ff;
    cursor: pointer;

    &:hover {
      color: #33ddff;
    }
  }
}

//main-container全局样式
.app-container {
  padding: 20px;
  background-color: #1a1a2e;
}

.components-container {
  margin: 30px 50px;
  position: relative;
  background-color: #1e1e2d;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
}

.text-center {
  text-align: center
}

.sub-navbar {
  height: 50px;
  line-height: 50px;
  position: relative;
  width: 100%;
  text-align: right;
  padding-right: 20px;
  transition: 600ms ease position;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.8) 0%, rgba(0, 212, 255, 0.6) 100%);

  .subtitle {
    font-size: 20px;
    color: #000;
  }

  &.draft {
    background: #1e1e2d;
    border: 1px dashed #64748b;
  }

  &.deleted {
    background: #1e1e2d;
    border: 1px dashed #64748b;
  }
}

.link-type,
.link-type:focus {
  color: #00d4ff;
  cursor: pointer;

  &:hover {
    color: #33ddff;
  }
}

.filter-container {
  padding-bottom: 10px;
  background-color: #1e1e2d;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
  border: 1px solid #334155;

  .filter-item {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 10px;
    margin-right: 10px;
  }
}
//上传组件颜色
.el-upload--picture-card {
  background-color: var(--tech-card-bg);
  border-radius: 6px;

  &:hover {
    border-color: var(--tech-primary);
    background-color: rgba(0, 120, 212, 0.05);
  }
}
// 用户管理页面特定样式
.user-container {
  .filter-container {
    background-color: #1e1e2d;
    border: 1px solid #334155;
    border-radius: 4px;
    margin-bottom: 15px;

    .filter-item {
      margin-right: 10px;
    }
  }

  // 搜索按钮样式
  .el-button {
    &.filter-item {
      background-color: rgba(0, 212, 255, 0.1);
      border-color: rgba(0, 212, 255, 0.3);
      color: #00d4ff;

      &:hover {
        background-color: rgba(0, 212, 255, 0.2);
        border-color: #00d4ff;
      }
    }
  }
}

// 表格组件样式优化
.el-table {
  background-color: #1e1e2d;
  color: #e2e8f0;
  border: 1px solid #334155;

  // 表头单元格样式
  .el-table__header-wrapper {
    th {
      background-color: rgba(0, 212, 255, 0.15) !important;
      color: #00d4ff !important;
      font-weight: 600;
      border-bottom: 1px solid #334155;

      &.is-sortable {
        &:hover {
          background-color: rgba(0, 212, 255, 0.2) !important;
        }
      }

      // 排序图标颜色
      .caret-wrapper {
        .sort-caret {
          &.ascending,
          &.descending {
            color: #00d4ff;
          }
        }
      }
    }
  }

  // 多级表头样式
  .el-table__header {
    th {
      background-color: rgba(0, 212, 255, 0.15);
      color: #00d4ff;
    }
  }

  // 表头样式
  th {
    background-color: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    font-weight: 600;
    border-bottom: 1px solid #334155;

    &.is-sortable {
      &:hover {
        background-color: rgba(0, 212, 255, 0.2);
      }
    }
  }

  // 表格数据行
  td {
    background-color: transparent;
    color: #e2e8f0;
    border-bottom: 1px solid #334155;
  }

  // 表格行悬停效果
  .el-table__row:hover {
    background-color: rgba(0, 212, 255, 0.05);
  }

  // 表格边框
  &::before {
    background-color: #334155;
  }

  // 展开行样式
  .el-table__expanded-cell {
    background-color: #1a1a2e;
  }

  // 固定列样式
  .el-table__fixed,
  .el-table__fixed-right {
    background-color: #1e1e2d;

    th {
      background-color: rgba(0, 212, 255, 0.15);
    }
  }

  // 表格空状态
  .el-table__empty-block {
    background-color: #1e1e2d;

    .el-table__empty-text {
      color: #94a3b8;
    }
  }
}

// 分页组件样式优化
.el-pagination {
  background-color: #1e1e2d;
  color: #e2e8f0;
  padding: 15px;
  border-radius: 0 0 4px 4px;

  // 页码按钮样式
  .el-pager li {
    background-color: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
    margin: 0 2px;
    min-width: 30px;
    height: 30px;
    line-height: 28px;

    &:hover {
      color: #00d4ff;
      border-color: #00d4ff;
    }

    &.active {
      background-color: #00d4ff;
      color: #000;
      border-color: #00d4ff;
    }
  }

  // 上一页/下一页按钮
  .btn-prev,
  .btn-next {
    background-color: transparent;
    color: #cbd5e1;
    border: 1px solid #334155;
    min-width: 30px;
    height: 30px;
    line-height: 28px;

    &:disabled {
      color: #64748b;
    }

    &:not(.disabled):hover {
      color: #00d4ff;
      border-color: #00d4ff;
    }
  }

  // 跳转输入框
  .el-pagination__jump {
    color: #e2e8f0;
    margin-left: 15px;

    .el-input__inner {
      background-color: rgba(255, 255, 255, 0.08);
      border: 1px solid #334155;
      color: #e2e8f0;
      width: 50px;
      height: 30px;

      &:focus {
        border-color: #00d4ff;
      }
    }
  }

  // 每页条数选择器
  .el-pagination__sizes {
    .el-select {
      .el-input__inner {
        background-color: rgba(255, 255, 255, 0.08);
        border: 1px solid #334155;
        color: #e2e8f0;
        height: 30px;
        line-height: 30px;
      }

      &:hover {
        .el-input__inner {
          border-color: #00d4ff;
        }
      }
    }
  }

  // 总条数显示
  .el-pagination__total {
    color: #e2e8f0;
  }
}

// 用户操作按钮统一样式
.el-button {
  &--primary {
    background-color: #00d4ff;
    border-color: #00d4ff;
    color: #000;

    &:hover {
      background-color: #33ddff;
      border-color: #33ddff;
    }
  }

  &--success {
    background-color: #00ff9d;
    border-color: #00ff9d;
    color: #000;

    &:hover {
      background-color: #33ffaf;
      border-color: #33ffaf;
    }
  }

  &--warning {
    background-color: #ffaa00;
    border-color: #ffaa00;
    color: #000;

    &:hover {
      background-color: #ffbb33;
      border-color: #ffbb33;
    }
  }

  &--danger {
    background-color: #ff4d4d;
    border-color: #ff4d4d;
    color: #fff;

    &:hover {
      background-color: #ff6666;
      border-color: #ff6666;
    }
  }

  &--info {
    background-color: #6b7280;
    border-color: #6b7280;
    color: #fff;

    &:hover {
      background-color: #7b8290;
      border-color: #7b8290;
    }
  }

  // 用户管理页面按钮样式
  &.filter-item {
    background-color: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;

    &:hover {
      background-color: rgba(0, 212, 255, 0.2);
      border-color: #00d4ff;
    }
  }
}

// 用户管理页面容器样式
.user-manage-container {
  background-color: #1a1a2e;
  color: #ffffff;

  // 页面标题
  .page-header {
    color: #00d4ff;
    border-bottom: 1px solid #334155;
    padding-bottom: 15px;
    margin-bottom: 20px;
  }
}

// 用户搜索区域
.user-search-area {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;

  .search-title {
    color: #00d4ff;
    font-size: 16px;
    margin-bottom: 15px;
  }
}

// 搜索表单
.user-search-form {
  .el-form-item {
    margin-bottom: 15px;

    .el-form-item__label {
      color: #e2e8f0;
    }

    .el-input__inner {
      background-color: rgba(255, 255, 255, 0.08);
      border: 1px solid #334155;
      color: #e2e8f0;

      &:focus {
        border-color: #00d4ff;
      }
    }
  }
}

// 用户操作按钮区域
.user-action-bar {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;

  // 主要操作按钮
  .el-button--primary {
    background-color: #00d4ff;
    border-color: #00d4ff;
    color: #000;

    &:hover {
      background-color: #33ddff;
      border-color: #33ddff;
    }
  }

  // 批量操作按钮
  .batch-action-btn {
    background-color: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: #00d4ff;

    &:hover {
      background-color: rgba(0, 212, 255, 0.2);
      border-color: #00d4ff;
    }
  }
}

// 用户管理页面右侧数据区域
.user-data-container {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;

  // 数据展示区域
  .data-display-area {
    background-color: #1e1e2d;
  }
}

// 右侧主要内容区域
.main-content-area {
  background-color: #1e1e2d;

  // 内容卡片
  .content-card {
    background-color: #1e1e2d;
    border: 1px solid #334155;
  }
}

// 用户信息展示区域
.user-info-section {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 20px;

  .section-title {
    color: #00d4ff;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
    margin-bottom: 15px;
  }
}

// 数据统计区域
.data-statistics {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 15px;

  .statistic-item {
    .statistic-label {
      color: #cbd5e1;
    }

    .statistic-value {
      color: #00d4ff;
    }
  }
}

// 部门树形结构样式
.department-tree {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;

  .el-tree {
    background-color: transparent;
    color: #e2e8f0;

    .el-tree-node__content {
      &:hover {
        background-color: rgba(0, 212, 255, 0.1);
      }
    }

    .el-tree-node.is-current > .el-tree-node__content {
      background-color: rgba(0, 212, 255, 0.15);
      color: #00d4ff;
    }
  }

  .el-tree--highlight-current {
    .el-tree-node.is-current > .el-tree-node__content {
      background-color: rgba(0, 212, 255, 0.15);
    }
  }
}

// 搜索栏容器
.search-container {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;

  // 搜索标题
  .search-title {
    color: #00d4ff;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
  }

  // 搜索条件区域
  .search-conditions {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
  }
}

// 搜索表单元素
.search-form {
  .el-form-item {
    margin-bottom: 18px;

    .el-form-item__label {
      color: #e2e8f0;
      font-weight: normal;
    }

    .el-input__inner {
      background-color: rgba(255, 255, 255, 0.08);
      border: 1px solid #334155;
      color: #e2e8f0;
      border-radius: 4px;

      &:focus {
        border-color: #00d4ff;
        box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
      }

      &::placeholder {
        color: #94a3b8;
      }
    }

    .el-select {
      .el-input__inner {
        background-color: rgba(255, 255, 255, 0.08);
        border: 1px solid #334155;
        color: #e2e8f0;
      }

      &:hover {
        .el-input__inner {
          border-color: #00d4ff;
        }
      }
    }

    .el-date-editor {
      .el-input__inner {
        background-color: rgba(255, 255, 255, 0.08);
        border: 1px solid #334155;
        color: #e2e8f0;
      }
    }
  }
}
//日期
input.el-range-input{
  background-color: #2f4258 !important;
}
// 日期时间范围选择器
.el-date-range-picker {
  .el-date-table {
    // 选中日期背景色
    td.selected div {
      background-color: #00d4ff;
      color: #000;
    }

    // 起始日期
    td.start-date span {
      background-color: #00d4ff;
      color: #000;
    }

    // 结束日期
    td.end-date span {
      background-color: #00d4ff;
      color: #000;
    }

    // 范围内日期
    td.in-range div {
      background-color: rgba(0, 212, 255, 0.2);
    }
  }
}

// 搜索按钮区域
.search-actions {
  background-color: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  padding: 15px;
  text-align: center;

  .el-button {
    &--primary {
      background-color: #00d4ff;
      border-color: #00d4ff;
      color: #000;
      font-weight: 500;

      &:hover {
        background-color: #33ddff;
        border-color: #33ddff;
      }
    }

    &--default {
      background-color: rgba(255, 255, 255, 0.08);
      border-color: #334155;
      color: #cbd5e1;

      &:hover {
        background-color: rgba(0, 212, 255, 0.1);
        border-color: #00d4ff;
        color: #00d4ff;
      }
    }
  }
}

// 部门选择器样式
.department-selector {
  .el-cascader {
    .el-input__inner {
      background-color: rgba(255, 255, 255, 0.08);
      border: 1px solid #334155;
      color: #e2e8f0;

      &:focus {
        border-color: #00d4ff;
      }
    }
  }

  .el-cascader-panel {
    background-color: #1e1e2d;
    border: 1px solid #334155;

    .el-cascader-node {
      color: #e2e8f0;

      &:hover {
        background-color: rgba(0, 212, 255, 0.1);
      }

      &.is-active {
        color: #00d4ff;
        font-weight: bold;
      }
    }
  }
}

// 用户状态标签样式
.el-tag {
  &.el-tag--success {
    background-color: rgba(0, 255, 157, 0.15);
    border-color: rgba(0, 255, 157, 0.3);
    color: #00ff9d;
  }

  &.el-tag--warning {
    background-color: rgba(255, 170, 0, 0.15);
    border-color: rgba(255, 170, 0, 0.3);
    color: #ffaa00;
  }

  &.el-tag--danger {
    background-color: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
  }

  &.el-tag--info {
    background-color: rgba(107, 114, 128, 0.15);
    border-color: rgba(107, 114, 128, 0.3);
    color: #6b7280;
  }
}

// 表单元素适配深色主题
.el-form {
  .el-form-item__label {
    color: #e2e8f0;
  }

  .el-input__inner,
  .el-textarea__inner {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid #334155;
    color: #e2e8f0;

    &:focus {
      border-color: #00d4ff;
    }

    &::placeholder {
      color: #94a3b8;
    }
  }
  ::v-deep .el-date-editor {
    .el-range-input {
      background-color: rgba(255, 255, 255, 0.08);  // 半透明深色背景
      border: 1px solid rgba(64, 158, 255, 0.2);     // 科技蓝边框
      color: #fff;                                   // 白色文字

      &:focus {
        border-color: #409eff;                       // 聚焦时的边框颜色
        box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2); // 聚焦光晕效果
      }

      &::placeholder {
        color: #909399;                             // 占位符颜色
      }
    }

    // 范围分隔符颜色适配
    .el-range-separator {
      color: #e4e7ed;
    }
  }

  .el-select-dropdown {
    background-color: #1e1e2d;
    border: 1px solid #334155;

    .el-select-dropdown__item {
      color: #e2e8f0;

      &.selected {
        color: #00d4ff;
        font-weight: bold;
      }

      &:hover {
        background-color: rgba(0, 212, 255, 0.1);
      }
    }
  }
}

// 对话框样式适配
.el-dialog {
  background-color: #1e1e2d;
  border: 1px solid #334155;

  .el-dialog__header {
    background-color: rgba(0, 212, 255, 0.1);
    border-bottom: 1px solid #334155;
    color: #00d4ff;

    .el-dialog__title {
      color: #00d4ff;
    }

    .el-dialog__headerbtn {
      .el-dialog__close {
        color: #cbd5e1;

        &:hover {
          color: #00d4ff;
        }
      }
    }
  }

  .el-dialog__body {
    color: #e2e8f0;
    padding: 20px;
    background-color: #1e1e2d;
  }

  .el-dialog__footer {
    background-color: rgba(255, 255, 255, 0.03);
    border-top: 1px solid #334155;
    padding: 15px 20px;
  }
}

// 卡片组件进一步优化
.el-card {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  color: #e2e8f0;

  .el-card__header {
    background-color: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid #334155;
    color: #00d4ff;
  }

  .el-card__body {
    background-color: #1e1e2d;
  }
}

// 下拉菜单样式
.el-dropdown-menu {
  background-color: #1e1e2d;
  border: 1px solid #334155;

  .el-dropdown-menu__item {
    color: #e2e8f0;

    &:hover {
      background-color: rgba(0, 212, 255, 0.1);
      color: #00d4ff;
    }
  }
}

// 工具提示样式
.el-tooltip__popper {
  background-color: #1e1e2d;
  color: #e2e8f0;
  border: 1px solid #334155;

  &[x-placement^="top"] .popper__arrow {
    border-top-color: #334155;

    &::after {
      border-top-color: #1e1e2d;
    }
  }

  &[x-placement^="bottom"] .popper__arrow {
    border-bottom-color: #334155;

    &::after {
      border-bottom-color: #1e1e2d;
    }
  }
}

// 消息提示框样式
.el-message {
  background-color: #1e1e2d;
  border: 1px solid #334155;
  color: #e2e8f0;

  &.el-message--success {
    background-color: rgba(0, 255, 157, 0.15);
    border-color: rgba(0, 255, 157, 0.3);
    color: #00ff9d;
  }

  &.el-message--warning {
    background-color: rgba(255, 170, 0, 0.15);
    border-color: rgba(255, 170, 0, 0.3);
    color: #ffaa00;
  }

  &.el-message--error {
    background-color: rgba(255, 77, 77, 0.15);
    border-color: rgba(255, 77, 77, 0.3);
    color: #ff4d4d;
  }
}

// 修复用户管理页面右侧数据区域背景问题
.right-side-content,
.right-panel,
.user-management-right-panel {
  background-color: #1e1e2d !important;

  .el-card {
    background-color: #1e1e2d;
    border: 1px solid #334155;
  }

  .el-tabs {
    .el-tabs__header {
      background-color: rgba(255, 255, 255, 0.03);
      border-bottom: 1px solid #334155;

      .el-tabs__item {
        color: #cbd5e1;

        &.is-active {
          color: #00d4ff;
        }

        &:hover {
          color: #00d4ff;
        }
      }
    }

    .el-tabs__content {
      background-color: #1e1e2d;
    }
  }
}

// 修复部门树区域背景问题
.department-section,
.dept-tree-container {
  background-color: #1e1e2d !important;
  border: 1px solid #334155;
  border-radius: 4px;
}

// 修复搜索栏背景问题
.search-section,
.search-wrapper {
  background-color: #1e1e2d !important;
  border: 1px solid #334155;
  border-radius: 4px;
}

// 通用容器背景修复
.container,
.wrapper,
.panel {
  background-color: #1e1e2d !important;
}

// 修复表格容器背景
.table-container,
.data-table-container {
  background-color: #1e1e2d !important;
  border: 1px solid #334155;
  border-radius: 4px;
}
/* ========================================
 * Vue Treeselect 组件科技感样式适配
 * ======================================== */
/* 全局覆盖vue-treeselect菜单样式 */
.vue-treeselect__menu
{
  background-color: #1e1e2d !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.vue-treeselect {
  &__control {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid #334155 !important;
    border-radius: 4px;
    color: #e2e8f0;
    min-height: 34px;

    &:hover {
      border-color: #00d4ff !important;
    }

    &--focused {
      border-color: #00d4ff !important;
      box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2) !important;
    }
  }

  &__value-container {
    color: #e2e8f0;

    &--has-value {
      .vue-treeselect__single-value {
        color: #e2e8f0;
      }
    }
  }

  &__ indicators {
    .vue-treeselect__indicator {
      svg {
        fill: #cbd5e1;
      }
    }
  }

  &__menu {
    background-color: #1e1e2d;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    z-index: 1000;
  }

  &__list {
    background-color: #1e1e2d;
  }

  &__option {
    background-color: #1e1e2d;
    color: #e2e8f0;

    &:hover {
      background-color: rgba(0, 212, 255, 0.1);
    }

    &--selected {
      background-color: rgba(0, 212, 255, 0.15);
      color: #00d4ff;
      font-weight: 500;
    }

    &--highlight {
      background-color: rgba(0, 212, 255, 0.1);
    }
  }

  &__label-container {
    &:hover {
      background-color: rgba(0, 212, 255, 0.1);
    }
  }

  &__checkbox {
    &--checked {
      .vue-treeselect__checkbox__inner {
        background-color: #00d4ff;
        border-color: #00d4ff;
      }
    }
  }
}

/* 确保菜单内的所有选项都有正确的样式 */
.vue-treeselect__option {
  background-color: #1e1e2d !important;
  color: #e2e8f0 !important;
}
.vue-treeselect__single-value {
  color: #94a3b8 !important;
}
.vue-treeselect__placeholder{
  color: #94a3b8 !important;
}
