/* 智算 · Operator Dark Theme */
:root {
  --center-channel-bg-rgb: 10, 13, 18 !important;
  --center-channel-color-rgb: 228, 232, 241 !important;
  --sidebar-bg-rgb: 19, 22, 29 !important;
  --sidebar-text-rgb: 228, 232, 241 !important;
  --button-color-rgb: 10, 13, 18 !important;
  --button-bg-rgb: 240, 185, 11 !important;
  --button-danger-color-rgb: 255, 255, 255 !important;
  --button-danger-bg-rgb: 246, 70, 93 !important;
  --link-color-rgb: 240, 185, 11 !important;
  --error-text-rgb: 246, 70, 93 !important;
  --prop-default: #1a1e27 !important;
  --prop-gray: #232833 !important;
  --prop-brown: #2d2416 !important;
  --prop-orange: #2d1a0e !important;
  --prop-yellow: #2d2a10 !important;
  --prop-green: #0e1a12 !important;
  --prop-blue: #0e1628 !important;
  --prop-purple: #1a1028 !important;
  --prop-pink: #280e1a !important;
  --prop-red: #280e10 !important;
  --default-rad: 6px !important;
  --modal-rad: 10px !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0d12; }
::-webkit-scrollbar-thumb { background: #232833; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #f0b90b; }

.octo-board-item:hover, .KanbanCard:hover { 
  box-shadow: 0 4px 20px rgba(240,185,11,.08) !important; 
}
.SidebarBoardItem.active, .SidebarBoardItem.active:hover {
  background: rgba(240,185,11,.12) !important;
  color: #f0b90b !important;
}
.KanbanCard {
  border: 1px solid #232833 !important;
  border-radius: 8px !important;
  transition: all .2s !important;
}
.Button.filled, .Button.emphasis--primary {
  border-radius: 6px !important;
  font-weight: 600 !important;
}
.Dialog {
  border: 1px solid #232833 !important;
  box-shadow: 0 8px 40px rgba(0,0,0,.5) !important;
}

.toast, .Toast, .FlashMessage,
[class*="websocket"], [class*="connection-lost"],
[class*="notification-bar"], [class*="banner"] {
  display: none !important;
}

/* ── 重复图标隐藏（纯CSS，无JS）── */

.SidebarBoardItem .octo-sidebar-icon,
.SidebarCategory .octo-sidebar-item .octo-sidebar-icon,
.octo-sidebar-item .octo-sidebar-icon {
  display: none !important;
}

.ViewTitle .octo-icon,
.IconSelector .octo-icon,
.ViewTitle .IconSelector {
  display: none !important;
}

.ViewTitle .description .octo-editor-preview > h1:first-child,
.ViewTitle .description .octo-editor-preview > h1:nth-child(1) {
  display: none !important;
}

.SidebarCategory + .SidebarCategory > div > div:nth-child(2) {
  display: none !important;
}

/* ── Board Description 描述区扩容 ── */

.ViewTitle .description,
.octo-content .description,
div[class*="description"],
.BoardDescription {
  max-height: none !important;
  overflow-y: visible !important;
  height: auto !important;
}

.octo-editor-preview {
  max-height: none !important;
  overflow: visible !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.octo-content,
div[class*="ViewTitle"] {
  max-height: none !important;
}

.octo-sidebar,
div[class*="right-sidebar"],
div[class*="sidebar-right"] {
  min-width: 320px !important;
}

/* ══════════════════════════════════════════════
   P2 CSS 增强 — Table · Calendar · 优先级 · 卡片
   ══════════════════════════════════════════════ */

/* ── 1. Table 视图增强 ── */

/* 斑马纹 */
.Table .octo-table-body .TableRow:nth-child(even),
div[class*="table"] div[class*="row"]:nth-child(even),
.octo-table-body > div:nth-child(even) {
  background: rgba(255,255,255,.015) !important;
}
.Table .octo-table-body .TableRow:nth-child(odd),
div[class*="table"] div[class*="row"]:nth-child(odd),
.octo-table-body > div:nth-child(odd) {
  background: transparent !important;
}

/* 行hover */
.Table .octo-table-body .TableRow:hover,
div[class*="table"] div[class*="row"]:hover {
  background: rgba(240,185,11,.05) !important;
}

/* 表头sticky */
.Table .octo-table-header,
div[class*="table"] div[class*="header"] {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #0a0d12 !important;
  border-bottom: 2px solid #232833 !important;
}
.Table .octo-table-header .octo-table-cell,
div[class*="table"] div[class*="header"] > div {
  font-weight: 700 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .5px !important;
  color: #8891a5 !important;
}

/* 表格单元格样式 */
.Table .octo-table-cell,
.octo-table-cell {
  padding: 8px 12px !important;
  font-size: 13px !important;
  border-right: 1px solid rgba(255,255,255,.03) !important;
}

/* 数字列右对齐 */
.octo-table-cell[class*="number"],
.Table .octo-table-cell:nth-child(n) {
  font-variant-numeric: tabular-nums !important;
}

/* ── 2. Calendar 视图增强 ── */

/* 今日高亮 */
.Calendar .CalendarDay.today,
.Calendar .octo-today,
div[class*="calendar"] div[class*="today"],
.CalendarContainer .today,
.CalendarDay[class*="today"] {
  background: rgba(240,185,11,.12) !important;
  border: 2px solid #f0b90b !important;
  border-radius: 4px !important;
}

/* 周末淡化 */
.Calendar .CalendarDay.weekend,
div[class*="calendar"] div[class*="weekend"] {
  background: rgba(255,255,255,.015) !important;
  opacity: .7 !important;
}

/* 日历事件卡片 */
.Calendar .CalendarCard,
div[class*="calendar"] div[class*="card"],
.CalendarContainer .octo-card {
  border-radius: 4px !important;
  border-left: 3px solid #f0b90b !important;
  font-size: 12px !important;
  padding: 3px 6px !important;
  transition: all .15s !important;
}
.Calendar .CalendarCard:hover,
div[class*="calendar"] div[class*="card"]:hover {
  filter: brightness(1.2) !important;
  transform: scale(1.02) !important;
}

/* 日历月份标题 */
.Calendar .CalendarHeader,
div[class*="calendar"] div[class*="header"] {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #f0b90b !important;
}

/* ── 3. 优先级色标 ── */

/* P0 / 紧急 — 红色边框+微光 */
.KanbanCard:has(.octo-propertyvalue:contains("P0")),
.KanbanCard:has([class*="propert"][class*="red"]),
[class*="priority"][class*="high"],
.select-option:is([title*="P0"],[title*="紧急"],[title*="🔴"]) {
  border-left: 3px solid #f6465d !important;
}

/* P1 / 重要 — 金色边框 */
.KanbanCard:has(.octo-propertyvalue:contains("P1")),
[class*="priority"][class*="medium"],
.select-option:is([title*="P1"],[title*="重要"],[title*="🟡"]) {
  border-left: 3px solid #f0b90b !important;
}

/* P2 / 普通 — 灰色边框 */
.KanbanCard:has(.octo-propertyvalue:contains("P2")),
[class*="priority"][class*="low"],
.select-option:is([title*="P2"],[title*="普通"],[title*="🟢"]) {
  border-left: 3px solid #3a4050 !important;
}

/* ── 4. Select属性标签增强 ── */

/* 属性标签整体放大+圆角 */
.octo-propertyvalue,
[class*="property-value"],
[class*="PropertyValue"] {
  border-radius: 4px !important;
  padding: 2px 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* 红色系标签 — 紧急/阻塞/高风险 */
.octo-propertyvalue[class*="red"],
[class*="propert"][class*="red"],
.select-option[class*="red"] {
  background: rgba(246,70,93,.15) !important;
  color: #f6465d !important;
  border: 1px solid rgba(246,70,93,.3) !important;
}

/* 金色系标签 — 重要/进行中/中风险 */
.octo-propertyvalue[class*="yellow"],
[class*="propert"][class*="yellow"],
.octo-propertyvalue[class*="orange"],
[class*="propert"][class*="orange"] {
  background: rgba(240,185,11,.15) !important;
  color: #f0b90b !important;
  border: 1px solid rgba(240,185,11,.3) !important;
}

/* 绿色系标签 — 完成/低风险/正常 */
.octo-propertyvalue[class*="green"],
[class*="propert"][class*="green"] {
  background: rgba(14,203,129,.12) !important;
  color: #0ecb81 !important;
  border: 1px solid rgba(14,203,129,.25) !important;
}

/* ── 5. 卡片看板视图增强 ── */

/* 卡片hover动效 */
.KanbanCard {
  position: relative !important;
  overflow: hidden !important;
}
.KanbanCard::before {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: transparent !important;
  transition: background .2s !important;
}
.KanbanCard:hover::before {
  background: #f0b90b !important;
}

/* 卡片标题加大 */
.KanbanCard .octo-title,
.KanbanCard [class*="title"],
.KanbanCard .cardTitle {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* ── 6. 描述区 Markdown 增强 ── */

/* 代码块 */
.octo-editor-preview code {
  background: #1a1e27 !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
  font-size: 12px !important;
  color: #f0b90b !important;
  font-family: 'SF Mono', 'Fira Code', monospace !important;
}
.octo-editor-preview pre {
  background: #13161d !important;
  border: 1px solid #232833 !important;
  border-radius: 6px !important;
  padding: 12px 16px !important;
  overflow-x: auto !important;
}

/* 粗体高亮 */
.octo-editor-preview strong {
  color: #f0b90b !important;
}

/* 表格（描述区内的markdown表格） */
.octo-editor-preview table {
  border-collapse: collapse !important;
  width: 100% !important;
  font-size: 12px !important;
}
.octo-editor-preview th {
  background: #1a1e27 !important;
  color: #8891a5 !important;
  padding: 6px 10px !important;
  text-align: left !important;
  border-bottom: 2px solid #232833 !important;
}
.octo-editor-preview td {
  padding: 6px 10px !important;
  border-bottom: 1px solid rgba(255,255,255,.04) !important;
}
.octo-editor-preview tr:hover td {
  background: rgba(240,185,11,.03) !important;
}

/* 水平线 */
.octo-editor-preview hr {
  border: none !important;
  border-top: 1px solid #232833 !important;
  margin: 16px 0 !important;
}

/* ── 7. 看板列头增强 ── */

.octo-board-header,
.KanbanColumnHeader,
[class*="column-header"] {
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: .3px !important;
  padding: 8px 12px !important;
}

/* 列卡片计数badge */
.octo-board-header .octo-board-header-count,
.KanbanColumnHeader [class*="count"],
[class*="column"] [class*="count"] {
  background: rgba(240,185,11,.15) !important;
  color: #f0b90b !important;
  border-radius: 10px !important;
  padding: 1px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* ── 8. 全局微调 ── */

/* 选中文本颜色 */
::selection {
  background: rgba(240,185,11,.3) !important;
  color: #fff !important;
}

/* 输入框focus */
input:focus, textarea:focus, select:focus,
[contenteditable]:focus {
  border-color: #f0b90b !important;
  box-shadow: 0 0 0 2px rgba(240,185,11,.15) !important;
  outline: none !important;
}

/* 属性面板标签 */
.octo-propertyname,
[class*="property-name"] {
  color: #8891a5 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
}

/* 空状态优化 */
.octo-board-column .octo-board-empty,
div[class*="empty"][class*="board"] {
  color: #3a4050 !important;
  font-style: italic !important;
  font-size: 12px !important;
}

/* ── 9. View Switcher 视图切换器增强 ── */

.ViewSwitcher,
[class*="view-switcher"],
[class*="ViewSwitcher"] {
  gap: 2px !important;
}
.ViewSwitcher button,
[class*="view-switcher"] button {
  border-radius: 4px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
  transition: all .15s !important;
}
.ViewSwitcher button.active,
[class*="view-switcher"] button[class*="active"] {
  background: rgba(240,185,11,.15) !important;
  color: #f0b90b !important;
}
