/* =========================================================
   Rocket.Chat Eye-care Theme — Unified Stable Edition v2.8
   =========================================================

   LIGHT
   - Main content     : Warm Paper
   - Chat Sidebar     : Dark Graphite
   - Account Sidebar  : Warm Stone

   DARK
   - Global UI        : Warm Graphite

   Theme marker supplied by Custom Script:

   body[data-eye-theme="light"]
   body[data-eye-theme="dark"]

   IMPORTANT
   ---------------------------------------------------------
   --rcx-color-surface-dark

   是当前 Custom Script 用于检测 Rocket.Chat
   Light / Dark Theme 的原生 Palette 探针。

   本 CSS 中绝对不要覆盖它。
   ========================================================= */


/* =========================================================
   1. LIGHT — MAIN CONTENT
   Warm Paper
   ========================================================= */

body.rcx-content--main[data-eye-theme="light"] {

  /* Main room */
  --rcx-color-surface-room: #efe7d6 !important;

  /* Input / Card / Panel */
  --rcx-color-surface-light: #fbf7ee !important;

  /* Secondary surface */
  --rcx-color-surface-tint: #f3ecdc !important;

  --rcx-color-surface-neutral: #eee6d7 !important;

  --rcx-color-surface-disabled: #f0eadf !important;


  /*
   * Hover：
   * 鼠标移入后变亮
   */
  --rcx-color-surface-hover: #f5f1e8 !important;


  /*
   * Selected
   */
  --rcx-color-surface-selected: #e8dec9 !important;


  /* Borders */
  --rcx-color-stroke-extra-light: #e2d8c7 !important;

  --rcx-color-stroke-light: #d8cdbb !important;


  /*
   * Light 主内容不修改字体 Palette。
   * 使用 Rocket.Chat 原生 Light Typography。
   */
}


/* =========================================================
   2. LIGHT — BLOCK CODE
   ========================================================= */

body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body pre,

body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body pre code,

body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body .code-colors:not(.inline) {

  background-color: #e3dac7 !important;

  color: #2f343d !important;
}


body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body pre {

  border: 1px solid #d4c7b0 !important;
}


/* =========================================================
   3. LIGHT — GLOBAL TOP NAVBAR
   =========================================================

   Light 模式顶部栏保持深色。

   同时把聊天 Sidebar 使用完全相同的基准色，
   从而形成统一的应用 Shell。

   Base:
   #2F343D
   ========================================================= */

body[data-eye-theme="light"]
.rcx-navbar {

  background-color: #2f343d !important;

  border-color: #444b57 !important;


  --rcx-color-surface-light: #343a44 !important;

  --rcx-color-surface-tint: #2f343d !important;

  --rcx-color-surface-neutral: #3a414c !important;

  --rcx-color-surface-hover: #3a414c !important;

  --rcx-color-surface-selected: #444b57 !important;


  --rcx-color-stroke-extra-light: #3b424d !important;

  --rcx-color-stroke-light: #4b5360 !important;


  --rcx-color-font-default: #e4e7ea !important;

  --rcx-color-font-titles-labels: #f2f3f5 !important;

  --rcx-color-font-secondary-info: #c1c7d0 !important;

  --rcx-color-font-hint: #aeb5bf !important;
}


/* Navbar icons */

body[data-eye-theme="light"]
.rcx-navbar .rcx-button,

body[data-eye-theme="light"]
.rcx-navbar .rcx-icon {

  color: #e4e7ea !important;
}


/* Navbar Hover */

body[data-eye-theme="light"]
.rcx-navbar .rcx-button:hover,

body[data-eye-theme="light"]
.rcx-navbar .rcx-button:focus-visible {

  background-color: #3a414c !important;
}


/* Navbar Selected */

body[data-eye-theme="light"]
.rcx-navbar .rcx-button[aria-current="page"],

body[data-eye-theme="light"]
.rcx-navbar .rcx-button[aria-pressed="true"] {

  background-color: #444b57 !important;
}


/* =========================================================
   4. LIGHT — GLOBAL SEARCH
   ========================================================= */

body[data-eye-theme="light"]
.rcx-navbar .rcx-input-box__wrapper {

  background-color: #262931 !important;

  border-color: #444b57 !important;

  color: #e4e7ea !important;
}


body[data-eye-theme="light"]
.rcx-navbar .rcx-input-box__wrapper:focus-within {

  background-color: #2b3039 !important;

  border-color: #69717e !important;
}


body[data-eye-theme="light"]
.rcx-navbar input {

  color: #f2f3f5 !important;
}


body[data-eye-theme="light"]
.rcx-navbar input::placeholder {

  color: #9ea5af !important;

  opacity: 1 !important;
}


/* =========================================================
   5. LIGHT — WORKSPACE CHAT SIDEBAR
   =========================================================

   这是普通聊天页面左侧的：
   - Discussions
   - Channels
   - Rooms
   - Direct Messages

   设计：
   与顶部 Navbar 使用相同 #2F343D。

   Account Settings Sidebar 会在下一节单独覆盖。
   ========================================================= */

body[data-eye-theme="light"]
.rcx-sidebar--main:not(:has(a[href^="/account/"])) {

  /* Main sidebar background */
  --rcx-color-surface-sidebar: #2f343d !important;

  --rcx-color-surface-light: #2f343d !important;

  --rcx-color-surface-tint: #2f343d !important;

  --rcx-color-surface-neutral: #353b45 !important;


  /*
   * Hover：
   * 稍微变亮
   */
  --rcx-color-surface-hover: #3a414c !important;


  /*
   * Selected room
   */
  --rcx-color-surface-selected: #444b57 !important;


  /* Borders */
  --rcx-color-stroke-extra-light: #3b424d !important;

  --rcx-color-stroke-light: #444b57 !important;

  --rcx-color-stroke-medium: #515967 !important;


  /* Typography */
  --rcx-color-font-default: #e4e7ea !important;

  --rcx-color-font-titles-labels: #f2f3f5 !important;

  --rcx-color-font-secondary-info: #c1c7d0 !important;

  --rcx-color-font-hint: #adb4be !important;

  --rcx-color-font-annotation: #a4abb5 !important;


  background-color: #2f343d !important;

  color: #e4e7ea !important;
}


/*
 * 确保 Room 名称和图标不会继承 Light Theme
 * 主内容区域的深色字体值。
 */

body[data-eye-theme="light"]
.rcx-sidebar--main:not(:has(a[href^="/account/"])) a,

body[data-eye-theme="light"]
.rcx-sidebar--main:not(:has(a[href^="/account/"])) button,

body[data-eye-theme="light"]
.rcx-sidebar--main:not(:has(a[href^="/account/"])) .rcx-icon {

  color: #e4e7ea !important;
}


/* Workspace Sidebar shell */

body[data-eye-theme="light"]
.rcx-sidebar-topbar__wrapper,

body[data-eye-theme="light"]
.rcx-sidebar-footer {

  background-color: #2f343d !important;

  border-color: #444b57 !important;
}


/*
 * Legacy / Electron compatibility
 *
 * Light Theme 的 workspace sidebar
 * 也固定为深石墨色。
 */

body[data-eye-theme="light"] {

  --sidebar-background: #2f343d !important;

  --sidebar-item-text-color: #e4e7ea !important;

  --sidebar-border-color: #444b57 !important;
}


/* =========================================================
   6. LIGHT — ACCOUNT SETTINGS SIDEBAR
   =========================================================

   账户设置 Sidebar 和聊天 Room Sidebar 分开处理。

   通过内部的 /account/... 导航链接识别：

   /account/profile
   /account/preferences
   /account/security
   /account/tokens
   /account/accessibility-and-appearance
   ...

   因此这里不会影响普通 Room List。

   Account Sidebar:
   Warm Stone / Paper
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"]) {

  --rcx-color-surface-sidebar: #f1eadc !important;

  --rcx-color-surface-light: #f1eadc !important;

  --rcx-color-surface-tint: #f1eadc !important;

  --rcx-color-surface-neutral: #eee5d5 !important;


  /*
   * Hover 变亮
   */
  --rcx-color-surface-hover: #f8f4eb !important;


  /*
   * Selected
   */
  --rcx-color-surface-selected: #e8dec9 !important;


  /* Borders */
  --rcx-color-stroke-extra-light: #e6ddce !important;

  --rcx-color-stroke-light: #ddd3c2 !important;

  --rcx-color-stroke-medium: #d4c8b5 !important;


  /* Typography */
  --rcx-color-font-default: #3d3a34 !important;

  --rcx-color-font-titles-labels: #2f2d29 !important;

  --rcx-color-font-secondary-info: #625d55 !important;

  --rcx-color-font-hint: #746d63 !important;

  --rcx-color-font-annotation: #7d756a !important;


  /*
   * 覆盖 body 上用于 Workspace Sidebar 的 legacy 值
   */
  --sidebar-background: #f1eadc !important;

  --sidebar-item-text-color: #3d3a34 !important;

  --sidebar-border-color: #ddd3c2 !important;


  background-color: #f1eadc !important;

  color: #3d3a34 !important;
}


/* Account Sidebar Header / Footer */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
header,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
footer {

  background-color: #f1eadc !important;

  border-color: #ddd3c2 !important;

  color: #3d3a34 !important;
}


/* Account navigation text */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
a,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
button,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
.rcx-icon {

  color: #3d3a34 !important;
}


/* Account Selected */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
[aria-current="page"] {

  background-color: #e8dec9 !important;

  color: #2f2d29 !important;
}


/* Account Hover */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
a:hover,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/account/"])
button:hover {

  background-color: #f8f4eb !important;
}


/* =========================================================
   7. DARK — MAIN CONTENT
   Warm Graphite
   ========================================================= */

body.rcx-content--main[data-eye-theme="dark"] {

  /* Chat Room */
  --rcx-color-surface-room: #292823 !important;

  /* Input / Card / Panel */
  --rcx-color-surface-light: #32302a !important;

  /* Secondary surfaces */
  --rcx-color-surface-tint: #292823 !important;

  --rcx-color-surface-neutral: #35332d !important;

  --rcx-color-surface-disabled: #2d2c27 !important;


  /* Hover */
  --rcx-color-surface-hover: #38362f !important;


  /* Selected */
  --rcx-color-surface-selected: #424037 !important;


  /* Borders */
  --rcx-color-stroke-extra-light: #3b3933 !important;

  --rcx-color-stroke-light: #49463e !important;


  /* Typography */
  --rcx-color-font-default: #ddd8ce !important;

  --rcx-color-font-titles-labels: #f0ebe2 !important;

  --rcx-color-font-secondary-info: #b9b2a7 !important;

  --rcx-color-font-hint: #aaa296 !important;

  --rcx-color-font-annotation: #9d958a !important;


  /*
   * Functional links:
   * 保留一点蓝色作为功能性强调色
   */
  --rcx-color-font-info: #82a9c3 !important;


  /*
   * IMPORTANT:
   *
   * 不设置：
   * --rcx-color-surface-dark
   * --rcx-color-font-white
   */
}


/* =========================================================
   8. DARK — ROOM HEADER
   ========================================================= */

body[data-eye-theme="dark"]
.rcx-room-header {

  background-color: #292823 !important;

  border-color: #3b3933 !important;
}


/* =========================================================
   9. DARK — BLOCK CODE
   ========================================================= */

body.rcx-content--main[data-eye-theme="dark"]
.rcx-message-body pre,

body.rcx-content--main[data-eye-theme="dark"]
.rcx-message-body pre code,

body.rcx-content--main[data-eye-theme="dark"]
.rcx-message-body .code-colors:not(.inline) {

  background-color: #35332d !important;

  color: #ddd8ce !important;
}


body.rcx-content--main[data-eye-theme="dark"]
.rcx-message-body pre {

  border: 1px solid #49463e !important;
}


/* =========================================================
   10. DARK — SIDEBAR
   ========================================================= */

body[data-eye-theme="dark"]
:is(.rcx-sidebar, .rcx-sidebar--main) {

  --rcx-color-surface-sidebar: #2f2e29 !important;

  --rcx-color-surface-light: #2f2e29 !important;

  --rcx-color-surface-tint: #2f2e29 !important;

  --rcx-color-surface-neutral: #35342e !important;


  /* Hover */
  --rcx-color-surface-hover: #393832 !important;


  /* Selected */
  --rcx-color-surface-selected: #444139 !important;


  /* Borders */
  --rcx-color-stroke-extra-light: #3b3933 !important;

  --rcx-color-stroke-light: #414039 !important;

  --rcx-color-stroke-medium: #47453e !important;


  /* Text */
  --rcx-color-font-default: #ddd8ce !important;

  --rcx-color-font-titles-labels: #f0ebe2 !important;

  --rcx-color-font-secondary-info: #b9b2a7 !important;

  --rcx-color-font-hint: #aaa296 !important;


  background-color: #2f2e29 !important;

  color: #ddd8ce !important;
}


/* Sidebar shell */

body[data-eye-theme="dark"]
.rcx-sidebar-topbar__wrapper,

body[data-eye-theme="dark"]
.rcx-sidebar-footer {

  background-color: #2f2e29 !important;

  border-color: #414039 !important;
}


body[data-eye-theme="dark"]
:is(.rcx-sidebar, .rcx-sidebar--main) header,

body[data-eye-theme="dark"]
:is(.rcx-sidebar, .rcx-sidebar--main) footer {

  background-color: #2f2e29 !important;

  border-color: #414039 !important;
}


/* Legacy / Electron */

body[data-eye-theme="dark"] {

  --sidebar-background: #2f2e29 !important;

  --sidebar-item-text-color: #d6d1c8 !important;

  --sidebar-border-color: #414039 !important;
}


/* =========================================================
   11. DARK — GLOBAL NAVBAR
   ========================================================= */

body[data-eye-theme="dark"]
.rcx-navbar {

  background-color: #2b2b26 !important;

  border-color: #403e37 !important;


  --rcx-color-surface-light: #302f2a !important;

  --rcx-color-surface-tint: #2b2b26 !important;

  --rcx-color-surface-neutral: #35342e !important;

  --rcx-color-surface-hover: #393832 !important;

  --rcx-color-surface-selected: #444139 !important;


  --rcx-color-stroke-extra-light: #3d3b35 !important;

  --rcx-color-stroke-light: #48453e !important;


  --rcx-color-font-default: #ddd8ce !important;

  --rcx-color-font-hint: #9d958a !important;
}


/* Navbar icons */

body[data-eye-theme="dark"]
.rcx-navbar .rcx-button,

body[data-eye-theme="dark"]
.rcx-navbar .rcx-icon {

  color: #d8d3ca !important;
}


/* Navbar Hover */

body[data-eye-theme="dark"]
.rcx-navbar .rcx-button:hover,

body[data-eye-theme="dark"]
.rcx-navbar .rcx-button:focus-visible {

  background-color: #393832 !important;
}


/* Navbar Selected */

body[data-eye-theme="dark"]
.rcx-navbar .rcx-button[aria-current="page"],

body[data-eye-theme="dark"]
.rcx-navbar .rcx-button[aria-pressed="true"] {

  background-color: #444139 !important;
}


/* =========================================================
   12. DARK — GLOBAL SEARCH
   ========================================================= */

body[data-eye-theme="dark"]
.rcx-navbar .rcx-input-box__wrapper {

  background-color: #24241f !important;

  border-color: #45423b !important;

  color: #ddd8ce !important;
}


body[data-eye-theme="dark"]
.rcx-navbar .rcx-input-box__wrapper:focus-within {

  background-color: #292823 !important;

  border-color: #69645a !important;
}


body[data-eye-theme="dark"]
.rcx-navbar input {

  color: #ddd8ce !important;
}


body[data-eye-theme="dark"]
.rcx-navbar input::placeholder {

  color: #948d83 !important;

  opacity: 1 !important;
}


/* =========================================================
   13. DARK — CONTENT SECONDARY BUTTONS
   ========================================================= */

body[data-eye-theme="dark"]
#rocket-chat {

  --rcx-color-button-background-secondary-default:
    #39372f !important;

  --rcx-color-button-background-secondary-hover:
    #444139 !important;

  --rcx-color-button-background-secondary-press:
    #4d4940 !important;

  --rcx-color-button-background-secondary-focus:
    #39372f !important;

  --rcx-color-button-background-secondary-keyfocus:
    #39372f !important;

  --rcx-color-button-background-secondary-disabled:
    #302f2a !important;

  --rcx-color-button-font-on-secondary:
    #ddd8ce !important;
}


/* =========================================================
   14. DARK — USER MENU / POPOVER
   ========================================================= */

body[data-eye-theme="dark"] {

  --popover-background: #302f2a !important;

  --popover-background-hover: #393832 !important;

  --popover-title-color: #f0ebe2 !important;

  --popover-item-color: #ddd8ce !important;


  --popup-list-background: #302f2a !important;

  --popup-list-background-hover: #393832 !important;

  --popup-list-selected-background: #444139 !important;

  --popup-list-name-color: #ddd8ce !important;
}


/* Popover containers */

body[data-eye-theme="dark"]
.rc-popover__content,

body[data-eye-theme="dark"]
.rcx-popover__content,

body[data-eye-theme="dark"]
.rcx-menu,

body[data-eye-theme="dark"]
.rcx-menu__wrapper,

body[data-eye-theme="dark"]
[role="menu"] {

  --rcx-color-surface-light: #302f2a !important;

  --rcx-color-surface-tint: #302f2a !important;

  --rcx-color-surface-neutral: #35342e !important;

  --rcx-color-surface-hover: #393832 !important;

  --rcx-color-surface-selected: #444139 !important;


  --rcx-color-stroke-extra-light: #3b3933 !important;

  --rcx-color-stroke-light: #45423b !important;

  --rcx-color-stroke-medium: #514d44 !important;


  --rcx-color-font-default: #ddd8ce !important;

  --rcx-color-font-titles-labels: #f0ebe2 !important;

  --rcx-color-font-secondary-info: #b9b2a7 !important;

  --rcx-color-font-hint: #aaa296 !important;

  --rcx-color-font-annotation: #9d958a !important;


  background-color: #302f2a !important;

  color: #ddd8ce !important;

  border-color: #45423b !important;


  box-shadow:
    0 8px 24px rgba(10, 9, 7, 0.36),
    0 2px 8px rgba(10, 9, 7, 0.24) !important;
}


/* =========================================================
   15. DARK — MENU ITEMS
   ========================================================= */

body[data-eye-theme="dark"]
.rc-popover__item,

body[data-eye-theme="dark"]
.rcx-menu__item,

body[data-eye-theme="dark"]
[role="menuitem"] {

  color: #ddd8ce !important;
}


/* Hover */

body[data-eye-theme="dark"]
.rc-popover__item:hover,

body[data-eye-theme="dark"]
.rcx-menu__item:hover,

body[data-eye-theme="dark"]
[role="menuitem"]:hover {

  background-color: #393832 !important;

  color: #f0ebe2 !important;
}


/* Focus */

body[data-eye-theme="dark"]
.rc-popover__item:focus-visible,

body[data-eye-theme="dark"]
.rcx-menu__item:focus-visible,

body[data-eye-theme="dark"]
[role="menuitem"]:focus-visible {

  background-color: #393832 !important;

  color: #f0ebe2 !important;
}


/* Selected */

body[data-eye-theme="dark"]
.rcx-menu__item[aria-selected="true"],

body[data-eye-theme="dark"]
[role="menuitem"][aria-selected="true"],

body[data-eye-theme="dark"]
[role="menuitem"][aria-current="true"] {

  background-color: #444139 !important;

  color: #f0ebe2 !important;
}


/* =========================================================
   16. DARK — OPTIONS / DROPDOWN
   ========================================================= */

body[data-eye-theme="dark"]
.rcx-options {

  --rcx-color-surface-light: #302f2a !important;

  --rcx-color-surface-tint: #302f2a !important;

  --rcx-color-surface-hover: #393832 !important;

  --rcx-color-surface-selected: #444139 !important;


  --rcx-color-font-default: #ddd8ce !important;


  background-color: #302f2a !important;

  color: #ddd8ce !important;

  border-color: #45423b !important;
}


body[data-eye-theme="dark"]
.rcx-option {

  color: #ddd8ce !important;
}


body[data-eye-theme="dark"]
.rcx-option:hover,

body[data-eye-theme="dark"]
.rcx-option--focus {

  background-color: #393832 !important;

  color: #f0ebe2 !important;
}


body[data-eye-theme="dark"]
.rcx-option--selected {

  background-color: #444139 !important;

  color: #f0ebe2 !important;
}


body[data-eye-theme="dark"]
.rcx-option__content {

  color: inherit !important;
}


/* =========================================================
   17. DARK — POPUP DIVIDERS
   ========================================================= */

body[data-eye-theme="dark"]
.rc-popover__content .rcx-divider,

body[data-eye-theme="dark"]
.rcx-popover__content .rcx-divider,

body[data-eye-theme="dark"]
.rcx-menu .rcx-divider,

body[data-eye-theme="dark"]
[role="menu"] .rcx-divider,

body[data-eye-theme="dark"]
[role="menu"] hr {

  border-color: #45423b !important;

  background-color: #45423b !important;
}


/* =========================================================
   18. DARK — POPUP BUTTONS
   ========================================================= */

body[data-eye-theme="dark"]
[role="menu"] .rcx-button:hover,

body[data-eye-theme="dark"]
.rc-popover__content .rcx-button:hover,

body[data-eye-theme="dark"]
.rcx-popover__content .rcx-button:hover,

body[data-eye-theme="dark"]
.rcx-menu .rcx-button:hover {

  background-color: #393832 !important;
}


/* =========================================================
   19. DARK — MENU SECONDARY BUTTON PALETTE
   ========================================================= */

body[data-eye-theme="dark"]
[role="menu"] {

  --rcx-color-button-background-secondary-default:
    #35342e !important;

  --rcx-color-button-background-secondary-hover:
    #393832 !important;

  --rcx-color-button-background-secondary-press:
    #444139 !important;

  --rcx-color-button-font-on-secondary:
    #ddd8ce !important;
}


/* =========================================================
   20. LIGHT — MARKDOWN TABLE TEXT CONTRAST FIX
   =========================================================

   仅修复浅色主题下聊天消息 Markdown 表格文字过浅。

   IMPORTANT:
   - 不修改任何背景色
   - 不修改边框
   - 不修改 Hover / Zebra rows
   - 不修改 Dark Theme
   - 不修改任何全局 Surface / Typography token
   - 不影响链接与 inline code 的功能性色
   ========================================================= */

/* Table body text */
body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body table td {

  color: #3d3a34 !important;
}


/* Table header text */
body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body table th {

  color: #2f343d !important;
}


/*
 * Rocket.Chat 的 Markdown 渲染有时会在 th / td 内
 * 再包 p、span、strong、b、em。
 *
 * 只让这些普通文字继承单元格颜色；
 * 刻意不处理 a / code，避免破坏链接和代码配色。
 */
body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body table td
:is(p, span, strong, b, em),

body.rcx-content--main[data-eye-theme="light"]
.rcx-message-body table th
:is(p, span, strong, b, em) {

  color: inherit !important;
}

/* =========================================================
   21. LIGHT — ADMIN WORKSPACE SIDEBAR
   =========================================================

   管理后台专用 Sidebar：

   /admin/info
   /admin/subscription
   /admin/users
   /admin/rooms
   /admin/settings
   ...

   与以下区域完全分离：
   - 普通聊天 Sidebar：Dark Graphite
   - Account Settings Sidebar：Warm Stone

   目标：
   - 去掉 Rocket.Chat 原生冷灰色
   - 使用 Warm Stone
   - 保持管理后台清晰、专业
   - Selected 稍深
   - Hover 稍亮
   ========================================================= */


/* =========================================================
   21.1 ADMIN SIDEBAR — BASE
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"]) {

  /* -------------------------------------------------------
     SURFACE
     ------------------------------------------------------- */

  /*
   * 管理后台 Sidebar 主背景
   *
   * 与 Account Settings 使用同一暖石色体系，
   * 但仍与右侧 Main Content 保持轻微层次。
   */
  --rcx-color-surface-sidebar: #f1eadc !important;

  --rcx-color-surface-light: #f1eadc !important;

  --rcx-color-surface-tint: #f1eadc !important;

  --rcx-color-surface-neutral: #eee5d5 !important;


  /*
   * Hover：
   * 延续 Eye-care Theme 的规则：
   * 鼠标移入后变亮。
   */
  --rcx-color-surface-hover: #f8f4eb !important;


  /*
   * Selected：
   * 当前管理员页面稍深，
   * 例如截图中的“工作区”。
   */
  --rcx-color-surface-selected: #e8dec9 !important;


  /* -------------------------------------------------------
     BORDER
     ------------------------------------------------------- */

  --rcx-color-stroke-extra-light: #e6ddce !important;

  --rcx-color-stroke-light: #ddd3c2 !important;

  --rcx-color-stroke-medium: #d4c8b5 !important;


  /* -------------------------------------------------------
     TYPOGRAPHY
     ------------------------------------------------------- */

  /*
   * 主菜单文字
   */
  --rcx-color-font-default: #3d3a34 !important;


  /*
   * 管理 / 标题
   */
  --rcx-color-font-titles-labels: #2f2d29 !important;


  /*
   * Secondary info
   */
  --rcx-color-font-secondary-info: #625d55 !important;


  /*
   * Hint
   */
  --rcx-color-font-hint: #746d63 !important;


  /*
   * Annotation
   */
  --rcx-color-font-annotation: #7d756a !important;


  /*
   * 覆盖 Light Workspace Sidebar 原来的
   * Dark Graphite legacy variables。
   */
  --sidebar-background: #f1eadc !important;

  --sidebar-item-text-color: #3d3a34 !important;

  --sidebar-border-color: #ddd3c2 !important;


  /* Actual Surface */

  background-color: #f1eadc !important;

  color: #3d3a34 !important;
}


/* =========================================================
   21.2 ADMIN SIDEBAR — HEADER / FOOTER
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
header,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
footer {

  background-color: #f1eadc !important;

  border-color: #ddd3c2 !important;

  color: #2f2d29 !important;
}


/* =========================================================
   21.3 ADMIN SIDEBAR — TEXT / ICONS
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
a,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
button,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
.rcx-icon {

  color: #3d3a34 !important;
}


/* =========================================================
   21.4 ADMIN SIDEBAR — ACTIVE / SELECTED
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
[aria-current="page"] {

  background-color: #e8dec9 !important;

  color: #2f2d29 !important;
}


/*
 * 确保 Selected 内部文字和 Icon
 * 不再继承其它 Sidebar 的浅色字体。
 */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
[aria-current="page"]
:is(a, button),

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
[aria-current="page"]
.rcx-icon {

  color: #2f2d29 !important;
}


/* =========================================================
   21.5 ADMIN SIDEBAR — HOVER
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
a:hover,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
button:hover {

  background-color: #f8f4eb !important;

  color: #2f2d29 !important;
}


/* =========================================================
   21.6 ADMIN SIDEBAR — KEYBOARD FOCUS
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
a:focus-visible,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(a[href^="/admin/"])
button:focus-visible {

  background-color: #f8f4eb !important;

  color: #2f2d29 !important;
}


/* =========================================================
   END — ADMIN WORKSPACE SIDEBAR
   ========================================================= */

/* =========================================================
   22. LIGHT — ADMIN MAIN CONTENT SECONDARY BUTTONS
   =========================================================

   修复 Light Theme 管理后台主内容区的 Secondary Button
   仍使用 Rocket.Chat 原生冷灰 / 蓝灰色的问题。

   适用范围：
   - 管理后台 /admin/... 页面
   - 右侧 main-content 主内容区
   - “打开 / 刷新 / 下载信息”等 secondary buttons

   不影响：
   - 普通聊天页面
   - Account Settings
   - Sidebar
   - Dark Theme
   - Primary / Danger 等功能性色按钮

   设计：
   Default  : Warm Beige   #E3DAC7
   Hover    : Lighter      #F1EADC
   Pressed  : Deeper       #D8CDBB
   Text     : Graphite     #2F343D
   Border   : Warm Stroke  #D4C8B5
   ========================================================= */


/* =========================================================
   22.1 ADMIN MAIN — SECONDARY BUTTON PALETTE
   ========================================================= */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content {

  --rcx-color-button-background-secondary-default:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-hover:
    #f1eadc !important;

  --rcx-color-button-background-secondary-press:
    #d8cdbb !important;

  --rcx-color-button-background-secondary-focus:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-keyfocus:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-disabled:
    #eee6d7 !important;

  --rcx-color-button-font-on-secondary:
    #2f343d !important;
}


/* =========================================================
   22.2 ADMIN MAIN — SECONDARY BUTTON ACTUAL SURFACE
   ---------------------------------------------------------
   为避免部分 Rocket.Chat / Fuselage 组件没有完全读取
   inherited button token，再对 secondary button 本身做
   局部兜底。作用域严格限定在 Admin main-content。
   ========================================================= */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary {

  background-color: #e3dac7 !important;

  color: #2f343d !important;

  border-color: #d4c8b5 !important;
}


/* Hover：延续护眼主题“移入变亮”的交互原则 */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary:hover {

  background-color: #f1eadc !important;

  color: #2f343d !important;

  border-color: #d4c8b5 !important;
}


/* Keyboard focus */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary:focus-visible {

  background-color: #f1eadc !important;

  color: #2f343d !important;

  border-color: #bfb39f !important;
}


/* Pressed */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary:active {

  background-color: #d8cdbb !important;

  color: #2f343d !important;

  border-color: #c8bba6 !important;
}


/* Disabled */

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary:disabled,

body[data-eye-theme="light"]
:has(:is(.rcx-sidebar, .rcx-sidebar--main) a[href^="/admin/"])
#main-content .rcx-button--secondary[aria-disabled="true"] {

  background-color: #eee6d7 !important;

  color: #7d756a !important;

  border-color: #ddd3c2 !important;
}

/* =========================================================
   23. LIGHT — OMNICHANNEL / CONTACT CENTER SIDEBAR
   =========================================================

   修复 Light Theme 下 Omnichannel（全渠道）/ Contact Center
   左侧导航仍使用 Rocket.Chat 原生冷灰色的问题。

   识别范围兼容常见 Omnichannel 路由：
   - /omnichannel/...
   - /livechat/...
   - /contact-center/...

   设计保持与 Account / Admin 设置导航一致：
   Base      : Warm Stone   #F1EADC
   Hover     : Lighter      #F8F4EB
   Selected  : Warm Beige   #E8DEC9
   Text      : Graphite     #3D3A34

   不影响：
   - 普通聊天 Sidebar
   - Account Settings
   - Admin Workspace
   - Dark Theme
   ========================================================= */


/* =========================================================
   23.1 OMNICHANNEL SIDEBAR — BASE
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) {

  --rcx-color-surface-sidebar: #f1eadc !important;

  --rcx-color-surface-light: #f1eadc !important;

  --rcx-color-surface-tint: #f1eadc !important;

  --rcx-color-surface-neutral: #eee5d5 !important;

  --rcx-color-surface-hover: #f8f4eb !important;

  --rcx-color-surface-selected: #e8dec9 !important;


  --rcx-color-stroke-extra-light: #e6ddce !important;

  --rcx-color-stroke-light: #ddd3c2 !important;

  --rcx-color-stroke-medium: #d4c8b5 !important;


  --rcx-color-font-default: #3d3a34 !important;

  --rcx-color-font-titles-labels: #2f2d29 !important;

  --rcx-color-font-secondary-info: #625d55 !important;

  --rcx-color-font-hint: #746d63 !important;

  --rcx-color-font-annotation: #7d756a !important;


  --sidebar-background: #f1eadc !important;

  --sidebar-item-text-color: #3d3a34 !important;

  --sidebar-border-color: #ddd3c2 !important;


  background-color: #f1eadc !important;

  color: #3d3a34 !important;
}


/* =========================================================
   23.2 OMNICHANNEL SIDEBAR — HEADER / FOOTER
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) header,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) footer {

  background-color: #f1eadc !important;

  border-color: #ddd3c2 !important;

  color: #2f2d29 !important;
}


/* =========================================================
   23.3 OMNICHANNEL SIDEBAR — TEXT / ICONS
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) a,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) button,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) .rcx-icon {

  color: #3d3a34 !important;
}


/* =========================================================
   23.4 OMNICHANNEL SIDEBAR — ACTIVE / SELECTED
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) :is(
  [aria-current="page"],
  [aria-selected="true"],
  .rcx-sidebar-item--selected
) {

  background-color: #e8dec9 !important;

  color: #2f2d29 !important;
}


body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) :is(
  [aria-current="page"],
  [aria-selected="true"],
  .rcx-sidebar-item--selected
) :is(a, button, .rcx-icon) {

  color: #2f2d29 !important;
}


/* =========================================================
   23.5 OMNICHANNEL SIDEBAR — HOVER / FOCUS
   ========================================================= */

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) a:hover,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) button:hover,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) a:focus-visible,

body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main):has(
  a[href*="/omnichannel"],
  a[href*="/livechat"],
  a[href*="/contact-center"]
) button:focus-visible {

  background-color: #f8f4eb !important;

  color: #2f2d29 !important;
}


/* =========================================================
   24. LIGHT — OMNICHANNEL MAIN SECONDARY BUTTONS
   =========================================================

   同步修复 Contact Center 主内容区域的 Secondary Button，
   例如“筛选器”等按钮仍使用冷蓝灰的问题。
   ========================================================= */

body[data-eye-theme="light"]:has(
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/omnichannel"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/livechat"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/contact-center"]
) #main-content {

  --rcx-color-button-background-secondary-default:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-hover:
    #f1eadc !important;

  --rcx-color-button-background-secondary-press:
    #d8cdbb !important;

  --rcx-color-button-background-secondary-focus:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-keyfocus:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-disabled:
    #eee6d7 !important;

  --rcx-color-button-font-on-secondary:
    #2f343d !important;
}


body[data-eye-theme="light"]:has(
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/omnichannel"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/livechat"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/contact-center"]
) #main-content .rcx-button--secondary {

  background-color: #e3dac7 !important;

  color: #2f343d !important;

  border-color: #d4c8b5 !important;
}


body[data-eye-theme="light"]:has(
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/omnichannel"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/livechat"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/contact-center"]
) #main-content .rcx-button--secondary:hover,

body[data-eye-theme="light"]:has(
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/omnichannel"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/livechat"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/contact-center"]
) #main-content .rcx-button--secondary:focus-visible {

  background-color: #f1eadc !important;

  color: #2f343d !important;

  border-color: #d4c8b5 !important;
}


body[data-eye-theme="light"]:has(
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/omnichannel"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/livechat"],
  :is(.rcx-sidebar, .rcx-sidebar--main) a[href*="/contact-center"]
) #main-content .rcx-button--secondary:active {

  background-color: #d8cdbb !important;

  color: #2f343d !important;

  border-color: #c8bba6 !important;
}


/* =========================================================
   25. LIGHT — MAIN CONTENT SECONDARY BUTTONS
   =========================================================

   v2.6 修正：
   Home 页的 Secondary Button 实际存在于 #main-content 中，
   但 v2.5 依赖 /home 当前链接或 /directory 链接来识别页面，
   在当前 Rocket.Chat 8.8.0 的 Home DOM 中该条件并不稳定，
   因此按钮仍回退到原生冷灰色。

   本版不再尝试通过 URL/Sidebar 识别 Home，而只处理：

     Light Theme + #main-content + .rcx-button--secondary

   这样：
   - Home 的“定制 / 创建频道 / 打开目录 / 应用商店 /
     Windows / Linux / Mac / 查看文档”等 Secondary Button
     都统一为暖米灰；
   - Primary 默认仍保持 Rocket.Chat 原有功能性色；
   - Home 卡片中的“添加用户”Primary Button 由第 27 节单独覆盖；
   - Home 页“添加用户”由第 27 节单独覆盖为 Secondary 同款；
   - 不触碰 Sidebar，因此不会再次污染 Admin / Settings /
     Account / Omnichannel / Marketplace 左栏；
   - Dark Theme 完全不受影响。

   Default   : #E3DAC7
   Hover     : #F1EADC
   Pressed   : #D8CDBB
   Text/Icon : #2F343D
   Border    : #D4C8B5
   Disabled  : #EEE6D7
   ========================================================= */


/* Main-content local semantic palette */
body[data-eye-theme="light"]
#main-content {

  --rcx-color-button-background-secondary-default:
    #e3dac7 !important;

  --rcx-color-button-background-secondary-hover:
    #f1eadc !important;

  --rcx-color-button-background-secondary-press:
    #d8cdbb !important;

  --rcx-color-button-background-secondary-focus:
    #f1eadc !important;

  --rcx-color-button-background-secondary-keyfocus:
    #f1eadc !important;

  --rcx-color-button-background-secondary-disabled:
    #eee6d7 !important;

  --rcx-color-button-font-on-secondary:
    #2f343d !important;
}


/* Secondary Button actual surface */
body[data-eye-theme="light"]
#main-content .rcx-button--secondary {

  background-color: #e3dac7 !important;

  color: #2f343d !important;

  border-color: #d4c8b5 !important;
}


/* Button text / icon inheritance */
body[data-eye-theme="light"]
#main-content .rcx-button--secondary
:is(.rcx-icon, span) {

  color: inherit !important;
}


/* Hover — 延续护眼主题“鼠标移入变亮” */
body[data-eye-theme="light"]
#main-content .rcx-button--secondary:hover,

body[data-eye-theme="light"]
#main-content .rcx-button--secondary:focus-visible {

  background-color: #f1eadc !important;

  color: #2f343d !important;

  border-color: #c8bba6 !important;
}


/* Pressed */
body[data-eye-theme="light"]
#main-content .rcx-button--secondary:active {

  background-color: #d8cdbb !important;

  color: #2f343d !important;

  border-color: #c8bba6 !important;
}


/* Disabled */
body[data-eye-theme="light"]
#main-content .rcx-button--secondary:disabled,

body[data-eye-theme="light"]
#main-content .rcx-button--secondary[aria-disabled="true"] {

  background-color: #eee6d7 !important;

  color: #9a9184 !important;

  border-color: #ddd3c2 !important;

  opacity: 1 !important;
}


/* =========================================================
   26. LIGHT — MARKETPLACE SIDEBAR
   =========================================================

   /marketplace/ 应用市场使用 Warm Stone 导航，
   与 Account / Admin / Omnichannel 的设置型导航保持一致。

   Base      : #F1EADC
   Hover     : #F8F4EB
   Selected  : #E8DEC9
   Text      : #3D3A34

   不影响：
   - 普通聊天 Sidebar
   - Home Sidebar
   - Account Settings
   - Admin Workspace
   - Omnichannel
   - Dark Theme
   ========================================================= */

/* Marketplace sidebar base */
body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main, aside):has(a[href^="/marketplace"]),
body[data-eye-theme="light"]:has(
  a[aria-current="page"][href^="/marketplace"]
)
:is(.rcx-sidebar, .rcx-sidebar--main, aside) {
  --rcx-color-surface-sidebar: #f1eadc !important;
  --rcx-color-surface-light: #f1eadc !important;
  --rcx-color-surface-tint: #f1eadc !important;
  --rcx-color-surface-neutral: #eee5d5 !important;
  --rcx-color-surface-hover: #f8f4eb !important;
  --rcx-color-surface-selected: #e8dec9 !important;

  --rcx-color-stroke-extra-light: #e6ddce !important;
  --rcx-color-stroke-light: #ddd3c2 !important;
  --rcx-color-stroke-medium: #d4c8b5 !important;

  --rcx-color-font-default: #3d3a34 !important;
  --rcx-color-font-titles-labels: #2f2d29 !important;
  --rcx-color-font-secondary-info: #625d55 !important;
  --rcx-color-font-hint: #746d63 !important;
  --rcx-color-font-annotation: #7d756a !important;

  --sidebar-background: #f1eadc !important;
  --sidebar-item-text-color: #3d3a34 !important;
  --sidebar-border-color: #ddd3c2 !important;

  background-color: #f1eadc !important;
  color: #3d3a34 !important;
}

/* Marketplace header / footer */
body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main, aside):has(a[href^="/marketplace"])
:is(header, footer),
body[data-eye-theme="light"]:has(
  a[aria-current="page"][href^="/marketplace"]
)
:is(.rcx-sidebar, .rcx-sidebar--main, aside)
:is(header, footer) {
  background-color: #f1eadc !important;
  border-color: #ddd3c2 !important;
  color: #2f2d29 !important;
}

/* Marketplace text / icons */
body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main, aside):has(a[href^="/marketplace"])
:is(a, button, .rcx-icon),
body[data-eye-theme="light"]:has(
  a[aria-current="page"][href^="/marketplace"]
)
:is(.rcx-sidebar, .rcx-sidebar--main, aside)
:is(a, button, .rcx-icon) {
  color: #3d3a34 !important;
}

/* Marketplace selected */
body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main, aside):has(a[href^="/marketplace"])
:is([aria-current="page"], [aria-selected="true"], .rcx-sidebar-item--selected),
body[data-eye-theme="light"]:has(
  a[aria-current="page"][href^="/marketplace"]
)
:is(.rcx-sidebar, .rcx-sidebar--main, aside)
:is([aria-current="page"], [aria-selected="true"], .rcx-sidebar-item--selected) {
  background-color: #e8dec9 !important;
  color: #2f2d29 !important;
}

/* Marketplace hover / focus */
body[data-eye-theme="light"]
:is(.rcx-sidebar, .rcx-sidebar--main, aside):has(a[href^="/marketplace"])
:is(a, button):is(:hover, :focus-visible),
body[data-eye-theme="light"]:has(
  a[aria-current="page"][href^="/marketplace"]
)
:is(.rcx-sidebar, .rcx-sidebar--main, aside)
:is(a, button):is(:hover, :focus-visible) {
  background-color: #f8f4eb !important;
  color: #2f2d29 !important;
}


/* =========================================================
   27. LIGHT — HOME CARD PRIMARY BUTTON
   =========================================================

   v2.8：
   根据 Rocket.Chat 8.8.0 实际 DOM 验证：

   .rcx-card__controls > .rcx-button--primary

   Home 页“添加用户”属于 Primary Button。
   本节将它的视觉状态统一为 Home 其它 Secondary Button：

   Default : #E3DAC7
   Hover   : #F1EADC
   Pressed : #D8CDBB
   Text    : #2F343D

   关键点：边框颜色必须与各状态背景色一致，
   否则 Primary Button 会残留一圈可见深色边缘。
   ========================================================= */

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary {
  --rcx-color-button-background-primary-default: #e3dac7 !important;
  --rcx-color-button-background-primary-hover: #f1eadc !important;
  --rcx-color-button-background-primary-press: #d8cdbb !important;
  --rcx-color-button-background-primary-focus: #f1eadc !important;
  --rcx-color-button-background-primary-keyfocus: #f1eadc !important;
  --rcx-color-button-font-on-primary: #2f343d !important;

  background-color: #e3dac7 !important;
  color: #2f343d !important;
  border-color: #e3dac7 !important;
  box-shadow: none !important;
}

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary:hover,

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary:focus,

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary:focus-visible {
  background-color: #f1eadc !important;
  color: #2f343d !important;
  border-color: #f1eadc !important;
  box-shadow: none !important;
  outline: none !important;
}

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary:active {
  background-color: #d8cdbb !important;
  color: #2f343d !important;
  border-color: #d8cdbb !important;
  box-shadow: none !important;
  outline: none !important;
}

body[data-eye-theme="light"]
#main-content
.rcx-card__controls
> .rcx-button--primary
.rcx-button--content {
  color: inherit !important;
}


/* =========================================================
   28. CHAT — FLOATING DATE INDICATOR
   =========================================================

   v2.8：
   根据 Rocket.Chat 8.8.0 实际 DOM 验证，滚动聊天记录时
   顶部浮动日期提示结构为：

   .messages-container-main
     .bubble-visible
       > .rcx-bubble.rcx-bubble--small
       > .rcx-bubble__item.rcx-bubble__item--secondary

   将日期胶囊改为与“New messages”提示一致的蓝色：

   Background : #156FF5
   Text       : #FFFFFF

   保留原来的尺寸、圆角、定位和层级。
   ========================================================= */

body[data-eye-theme="light"]
.messages-container-main
.bubble-visible
> .rcx-bubble.rcx-bubble--small
> .rcx-bubble__item.rcx-bubble__item--secondary,

body[data-eye-theme="dark"]
.messages-container-main
.bubble-visible
> .rcx-bubble.rcx-bubble--small
> .rcx-bubble__item.rcx-bubble__item--secondary {
  background-color: #156ff5 !important;
  color: #ffffff !important;
  border-color: #156ff5 !important;
}


/* =========================================================
   END — Rocket.Chat Eye-care Theme v2.8
   ========================================================= */
