/* =========================================================
   REEHOR WORK
   THEME: COOL GRAY + TEAL BLUE
   方案4｜冷灰青蓝
========================================================= */

:root {

  /* 页面 */
  --rh-bg: #F4F8FB;
  --rh-bg-soft: #F8FBFD;

  /* 卡片 */
  --rh-card: #FFFFFF;
  --rh-card-border: #DCE8EF;
  --rh-card-border-strong: #C9DCE6;

  /* 文字 */
  --rh-title: #10273D;
  --rh-text: #233B4F;
  --rh-text-secondary: #6F8393;
  --rh-text-light: #91A1AE;

  /* 主色 */
  --rh-primary: #078EA1;
  --rh-primary-hover: #087B8C;
  --rh-primary-dark: #056A79;
  --rh-primary-light: #E4F6F8;
  --rh-primary-pale: #F0FAFB;

  /* Sidebar */
  --rh-sidebar: #063C4D;
  --rh-sidebar-dark: #052F3F;
  --rh-sidebar-active: #078EA1;
  --rh-sidebar-hover: #075B6D;
  --rh-sidebar-text: #E8F4F6;
  --rh-sidebar-muted: #A9C5CC;

  /* 状态 */
  --rh-danger: #E25252;
  --rh-danger-light: #FDEAEA;

  --rh-warning: #E88A2C;
  --rh-warning-light: #FFF2DF;

  --rh-success: #168B66;
  --rh-success-light: #E8F6F0;

  /* 阴影 */
  --rh-shadow-sm:
    0 2px 8px rgba(26, 70, 88, .07);

  --rh-shadow:
    0 5px 18px rgba(26, 70, 88, .10);

  --rh-shadow-hover:
    0 8px 24px rgba(26, 70, 88, .14);
}


/* =========================================================
   全局背景
========================================================= */

html,
body {
  background: var(--rh-bg) !important;
  color: var(--rh-text);
}


/* 兼容不同主内容容器名称 */
:where(
  .main-content,
  .content,
  .page-content,
  .dashboard-content,
  .app-content
) {
  background: var(--rh-bg) !important;
}


/* =========================================================
   左侧导航
========================================================= */

:where(
  .sidebar,
  .app-sidebar,
  .side-nav
) {
  background:
    linear-gradient(
      180deg,
      var(--rh-sidebar) 0%,
      var(--rh-sidebar-dark) 100%
    ) !important;

  color: var(--rh-sidebar-text) !important;
}


/* sidebar中文字 */
:where(
  .sidebar,
  .app-sidebar,
  .side-nav
) a,
:where(
  .sidebar,
  .app-sidebar,
  .side-nav
) button {
  color: var(--rh-sidebar-text);
}


/* sidebar普通菜单 */
:where(
  .sidebar .nav-item,
  .sidebar .menu-item,
  .app-sidebar .nav-item,
  .app-sidebar .menu-item
) {
  color: var(--rh-sidebar-text) !important;
}


/* hover */
:where(
  .sidebar .nav-item:hover,
  .sidebar .menu-item:hover,
  .app-sidebar .nav-item:hover,
  .app-sidebar .menu-item:hover
) {
  background: var(--rh-sidebar-hover) !important;
}


/* 当前菜单 */
:where(
  .sidebar .nav-item.active,
  .sidebar .menu-item.active,
  .sidebar .active,
  .app-sidebar .nav-item.active,
  .app-sidebar .menu-item.active
) {
  background:
    linear-gradient(
      90deg,
      #078EA1 0%,
      #0A8495 100%
    ) !important;

  color: #FFFFFF !important;

  box-shadow:
    0 4px 14px rgba(0, 152, 170, .22);
}


/* =========================================================
   页面标题
========================================================= */

:where(
  h1,
  .page-title,
  .dashboard-title
) {
  color: var(--rh-title) !important;
}


:where(
  .page-subtitle,
  .dashboard-subtitle,
  .subtitle
) {
  color: var(--rh-text-secondary) !important;
}


/* =========================================================
   卡片 / Panel
   重点增强组件边界
========================================================= */

:where(
  .card,
  .panel,
  .dashboard-card,
  .dashboard-panel,
  .section-card,
  .todo-card,
  .todo-panel,
  .metric-card,
  .kpi-card,
  .table-card,
  .ai-card,
  .ai-panel
) {
  background: var(--rh-card) !important;

  border:
    1px solid
    var(--rh-card-border) !important;

  box-shadow:
    var(--rh-shadow-sm) !important;
}


/* Hover有点击属性的卡片 */
:where(
  .metric-card,
  .kpi-card,
  .clickable-card
):hover {
  border-color:
    var(--rh-card-border-strong) !important;

  box-shadow:
    var(--rh-shadow-hover) !important;
}


/* =========================================================
   KPI
========================================================= */

:where(
  .metric-card,
  .kpi-card
) {
  background:
    #FFFFFF !important;
}


/* KPI数字 */
:where(
  .metric-value,
  .kpi-value,
  .metric-number,
  .kpi-number
) {
  color:
    var(--rh-title) !important;
}


/* KPI标题 */
:where(
  .metric-title,
  .kpi-title
) {
  color:
    #647B8D !important;
}


/* KPI图标圆形浅底 */
:where(
  .metric-icon,
  .kpi-icon,
  .dashboard-icon
) {
  background:
    var(--rh-primary-light) !important;

  color:
    var(--rh-primary) !important;
}


/* =========================================================
   AI管理助手
========================================================= */

:where(
  .ai-card,
  .ai-panel,
  .ai-assistant,
  .ai-management-panel
) {
  background:
    linear-gradient(
      90deg,
      #F0FAFB 0%,
      #F8FCFD 100%
    ) !important;

  border:
    1px solid #CDE9EE !important;
}


/* =========================================================
   主按钮
========================================================= */

:where(
  .btn-primary,
  .primary-button,
  button.primary
) {
  background:
    var(--rh-primary) !important;

  border-color:
    var(--rh-primary) !important;

  color:
    #FFFFFF !important;
}


:where(
  .btn-primary,
  .primary-button,
  button.primary
):hover {
  background:
    var(--rh-primary-hover) !important;

  border-color:
    var(--rh-primary-hover) !important;
}


/* 你现有任务、项目按钮 */
.task-v6-confirm,
.task-life-v2-complete,
.task-actions-complete,
.project-actions-complete,
.task-actions-primary-full,
.project-actions-modal-buttons .primary {
  background:
    var(--rh-primary) !important;

  color:
    #FFFFFF !important;
}


.task-v6-confirm:hover,
.task-life-v2-complete:hover,
.task-actions-complete:hover,
.project-actions-complete:hover {
  background:
    var(--rh-primary-hover) !important;
}


/* =========================================================
   删除 / 危险按钮
========================================================= */

.task-actions-delete,
.project-actions-delete,
.project-actions-delete-full,
.task-life-v2-delete {
  background:
    #FFFFFF !important;

  border:
    1px solid #E4BBBB !important;

  color:
    #B04C4C !important;
}


/* =========================================================
   输入框
========================================================= */

input,
select,
textarea {
  background:
    #FFFFFF !important;

  border-color:
    #D6E3EA !important;

  color:
    var(--rh-text) !important;
}


input:focus,
select:focus,
textarea:focus {
  border-color:
    var(--rh-primary) !important;

  box-shadow:
    0 0 0 3px
    rgba(7, 142, 161, .10) !important;
}


/* =========================================================
   表格
========================================================= */

table {
  background:
    #FFFFFF;
}


th {
  color:
    #657C8E !important;

  background:
    #F9FBFC;
}


td {
  color:
    var(--rh-text);
}


tr {
  border-color:
    #E4EDF2 !important;
}


/* =========================================================
   分割线
========================================================= */

hr,
.divider,
.section-divider {
  border-color:
    #E2EBF0 !important;
}


/* =========================================================
   Badge
========================================================= */

/* 蓝青风险标签 */
:where(
  .badge-info,
  .risk-upcoming,
  .tag-info
) {
  background:
    #DDF5F8 !important;

  color:
    #0A8799 !important;
}


/* 红 */
:where(
  .badge-danger,
  .tag-danger,
  .risk-overdue
) {
  background:
    var(--rh-danger-light) !important;

  color:
    var(--rh-danger) !important;
}


/* 黄 */
:where(
  .badge-warning,
  .tag-warning
) {
  background:
    var(--rh-warning-light) !important;

  color:
    var(--rh-warning) !important;
}


/* 绿 */
:where(
  .badge-success,
  .tag-success
) {
  background:
    var(--rh-success-light) !important;

  color:
    var(--rh-success) !important;
}


/* =========================================================
   待办事项
========================================================= */

:where(
  .todo-item,
  .todo-row
) {
  background:
    #FFFFFF !important;

  border-color:
    #DFE9EF !important;
}


/* 待办左侧强调线 */
:where(
  .todo-item::before,
  .todo-row::before
) {
  background:
    var(--rh-primary) !important;
}


/* =========================================================
   今日重点事项
========================================================= */

:where(
  .priority-item,
  .focus-item,
  .today-focus-item
) {
  border-color:
    #E0EAF0 !important;
}


/* 小圆点 */
:where(
  .priority-dot,
  .focus-dot
) {
  background:
    #13B5C8 !important;
}


/* =========================================================
   抽屉
========================================================= */

:where(
  .drawer,
  .drawer-panel,
  .drawer-content
) {
  background:
    #FFFFFF !important;

  border-left:
    1px solid
    var(--rh-card-border) !important;

  box-shadow:
    -10px 0 30px
    rgba(26, 70, 88, .10) !important;
}


/* =========================================================
   Scrollbar
========================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}


::-webkit-scrollbar-track {
  background:
    #EEF4F7;
}


::-webkit-scrollbar-thumb {
  background:
    #B9CDD6;

  border-radius:
    10px;
}


::-webkit-scrollbar-thumb:hover {
  background:
    #93B4C0;
}


/* =========================================================
   特别增强工作台模块边界
========================================================= */

:where(
  .dashboard-card,
  .dashboard-panel,
  .metric-card,
  .kpi-card,
  .todo-card,
  .todo-panel
) {
  outline:
    1px solid
    rgba(204, 220, 228, .25);

  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease;
}



/* ======================================================
   BRANDING V1
   AI DARK BAR + COMPANY LOGO
====================================================== */


/* ------------------------------------------------------
   AI管理助手：深色整栏
------------------------------------------------------ */

.rh-ai-dark-bar {
  background:
    linear-gradient(
      100deg,
      #073E50 0%,
      #075467 100%
    ) !important;

  border:
    1px solid
    #0B6073 !important;

  box-shadow:
    0 5px 18px
    rgba(
      4,
      54,
      69,
      .18
    ) !important;

  color:
    #FFFFFF !important;
}


/* 所有普通文字 */
.rh-ai-dark-bar,
.rh-ai-dark-bar div,
.rh-ai-dark-bar span,
.rh-ai-dark-bar p,
.rh-ai-dark-bar strong {
  color:
    #FFFFFF !important;
}


/* 副标题稍微降低亮度 */
.rh-ai-dark-bar
:where(
  small,
  .subtitle,
  .subtext
) {
  color:
    #C8E0E6 !important;
}


/* AI按钮 */
.rh-ai-dark-bar
.rh-ai-dark-button {
  background:
    #078EA1 !important;

  border:
    1px solid
    #19A2B3 !important;

  color:
    #FFFFFF !important;

  box-shadow:
    0 3px 10px
    rgba(
      0,
      0,
      0,
      .12
    ) !important;
}


.rh-ai-dark-bar
.rh-ai-dark-button:hover {
  background:
    #079DB1 !important;
}


/* ------------------------------------------------------
   Logo
------------------------------------------------------ */

.rh-brand-wrapper {
  position:
    relative !important;
}


.rh-company-logo-badge {
  position:
    relative;

  overflow:
    hidden;

  display:
    flex !important;

  align-items:
    center !important;

  justify-content:
    center !important;

  background:
    #123F64 !important;
}


.rh-company-logo-image {
  width:
    100%;

  height:
    100%;

  object-fit:
    contain;

  display:
    block;

  padding:
    3px;

  box-sizing:
    border-box;
}


.rh-company-logo-fallback {
  color:
    #FFFFFF;

  font-weight:
    700;
}


/* 上传Logo小按钮 */
.rh-logo-upload-button {
  position:
    absolute;

  right:
    -5px;

  bottom:
    -5px;

  z-index:
    20;

  width:
    22px;

  height:
    22px;

  padding:
    0;

  border:
    2px solid
    #063C4D;

  border-radius:
    50%;

  background:
    #FFFFFF;

  color:
    #078EA1;

  font-size:
    12px;

  line-height:
    18px;

  font-weight:
    700;

  cursor:
    pointer;

  box-shadow:
    0 3px 9px
    rgba(
      0,
      0,
      0,
      .22
    );
}


.rh-logo-upload-button:hover {
  background:
    #E4F6F8;

  transform:
    scale(1.06);
}


.rh-logo-upload-button:disabled {
  opacity:
    .65;

  cursor:
    wait;
}



/* ======================================================
   EMPLOYEE WORKBENCH V1
====================================================== */


/* ------------------------------------------------------
   AI管理助手
------------------------------------------------------ */

.employee-ai-assistant {
  width: 100%;

  box-sizing: border-box;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;

  margin: 0 0 14px;

  padding: 15px 18px;

  border:
    1px solid #0B6073;

  border-radius: 10px;

  background:
    linear-gradient(
      100deg,
      #073E50 0%,
      #075467 100%
    );

  box-shadow:
    0 5px 18px
    rgba(4, 54, 69, .16);
}


.employee-ai-left {
  display: flex;

  align-items: center;

  gap: 12px;
}


.employee-ai-icon {
  width: 34px;
  height: 34px;

  display: flex;

  align-items: center;

  justify-content: center;

  border-radius: 50%;

  background:
    rgba(255,255,255,.12);

  color: #8DE5EE;

  font-size: 18px;
}


.employee-ai-title {
  color: #FFFFFF;

  font-size: 13px;

  font-weight: 700;
}


.employee-ai-subtitle {
  margin-top: 3px;

  color: #C8E0E6;

  font-size: 10px;
}


.employee-ai-button {
  min-width: 128px;

  height: 38px;

  padding: 0 14px;

  border:
    1px solid #18A3B5;

  border-radius: 7px;

  background: #078EA1;

  color: #FFFFFF;

  font-size: 10px;

  font-weight: 650;

  cursor: pointer;
}


.employee-ai-button:hover {
  background: #079DB1;
}


/* ------------------------------------------------------
   KPI下钻
------------------------------------------------------ */

.employee-kpi-drilldown {
  cursor: pointer !important;

  transition:
    transform .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}


.employee-kpi-drilldown:hover {
  transform:
    translateY(-1px);

  border-color:
    #9ECBD4 !important;

  box-shadow:
    0 7px 20px
    rgba(26,70,88,.13) !important;
}


.employee-kpi-drilldown::after {
  content: "查看 ›";

  position: absolute;

  right: 13px;

  bottom: 10px;

  color: #078EA1;

  font-size: 9px;

  opacity: .75;
}


/*
某些原卡片没有position。
*/
.employee-kpi-drilldown {
  position: relative;
}


/* ------------------------------------------------------
   下钻遮罩
------------------------------------------------------ */

.employee-drilldown-overlay {
  position: fixed;

  inset: 0;

  z-index: 12000;

  background:
    rgba(17,30,45,.30);
}


.employee-drilldown-drawer {
  position: absolute;

  top: 0;
  right: 0;

  width: min(
    700px,
    92vw
  );

  height: 100%;

  box-sizing: border-box;

  display: flex;

  flex-direction: column;

  background: #FFFFFF;

  border-left:
    1px solid #DCE8EF;

  box-shadow:
    -12px 0 32px
    rgba(25,60,80,.15);
}


.employee-drilldown-header {
  min-height: 74px;

  box-sizing: border-box;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 16px 20px;

  border-bottom:
    1px solid #E1EBF0;
}


.employee-drilldown-title {
  color: #10273D;

  font-size: 16px;

  font-weight: 700;
}


.employee-drilldown-subtitle {
  margin-top: 4px;

  color: #758899;

  font-size: 10px;
}


.employee-drilldown-close {
  width: 34px;
  height: 34px;

  border:
    1px solid #D7E3E9;

  border-radius: 7px;

  background: #FFFFFF;

  color: #536878;

  font-size: 20px;

  cursor: pointer;
}


.employee-drilldown-content {
  flex: 1;

  overflow-y: auto;

  padding: 16px 20px;
}


.employee-drilldown-loading,
.employee-drilldown-empty,
.employee-drilldown-error {
  padding: 50px 20px;

  text-align: center;

  color: #7A8C9B;

  font-size: 11px;
}


.employee-drilldown-list {
  display: flex;

  flex-direction: column;

  gap: 8px;
}


.employee-drilldown-row {
  width: 100%;

  min-height: 68px;

  box-sizing: border-box;

  display: grid;

  grid-template-columns:
    minmax(180px, 1.6fr)
    95px
    minmax(120px, 1fr)
    115px
    20px;

  align-items: center;

  gap: 12px;

  padding: 11px 13px;

  border:
    1px solid #DFE9EF;

  border-radius: 8px;

  background: #FFFFFF;

  text-align: left;

  cursor: pointer;
}


.employee-drilldown-row:hover {
  border-color: #A4CED6;

  background: #F7FCFD;

  box-shadow:
    0 4px 13px
    rgba(26,70,88,.07);
}


.employee-drilldown-name {
  color: #1B3348;

  font-size: 11px;

  font-weight: 650;
}


.employee-drilldown-meta {
  margin-top: 4px;

  color: #8695A2;

  font-size: 9px;
}


.employee-drilldown-status {
  color: #087F91;

  font-size: 9px;

  font-weight: 600;
}


.employee-drilldown-action {
  overflow: hidden;

  color: #465B6D;

  font-size: 9px;

  text-overflow: ellipsis;

  white-space: nowrap;
}


.employee-drilldown-date {
  color: #566C7D;

  font-size: 9px;
}


.employee-drilldown-arrow {
  color: #078EA1;

  font-size: 20px;

  text-align: right;
}


/* ------------------------------------------------------
   AI员工摘要fallback
------------------------------------------------------ */

.employee-ai-summary-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0,1fr));

  gap: 10px;
}


.employee-ai-summary-grid > div {
  padding: 15px;

  border:
    1px solid #DCE8EF;

  border-radius: 9px;

  background: #F8FBFC;
}


.employee-ai-summary-grid span {
  display: block;

  color: #718594;

  font-size: 9px;
}


.employee-ai-summary-grid strong {
  display: block;

  margin-top: 7px;

  color: #10273D;

  font-size: 22px;
}


.employee-ai-summary-section {
  margin-top: 16px;

  padding: 16px;

  border:
    1px solid #DCE8EF;

  border-radius: 9px;

  background: #FFFFFF;
}


.employee-ai-summary-title {
  margin-bottom: 10px;

  color: #173B50;

  font-size: 11px;

  font-weight: 700;
}


.employee-ai-summary-section p {
  color: #52697A;

  font-size: 10px;

  line-height: 1.8;
}


@media (
  max-width: 800px
) {
  .employee-ai-summary-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }

  .employee-drilldown-row {
    grid-template-columns:
      1fr 80px 20px;
  }

  .employee-drilldown-action,
  .employee-drilldown-date {
    display: none;
  }
}

