/* Vikunja × guancyxx.cn Neumorphic Premium — theme-blog.css v1 — 2026-08-28
   设计令牌直接取自博客站 globals.css（暖黑 #14110e 系 + 金 accent #D3A043 + 双向柔光）
   需保持账号 Color Scheme = Dark。配套 blog-boost.js（卡片网格/右键菜单/分页）。 */

/* ===== 基底 ===== */
html.dark { --site-background: #14110e !important; }
html.dark body, body { background: #14110e !important; background-color: #14110e !important; }

/* ===== 变量（tailwind 灰阶 → 博客暖黑系） ===== */
html.dark {
  --grey-900: #14110e;  --grey-800: #17140f;  --grey-750: #1a1712;
  --grey-700: #1e1b17;  --grey-600: #242019;  --grey-500: #2e2921;
  --grey-400: #383225;  --grey-300: #4a4437;  --grey-200: #8a8577;
  --grey-100: #c4c0b6;  --grey-50:  #e8e5df;
  --primary: #D3A043;   --primary-dark: #B8862E;
  /* 拟物阴影（博客同款） */
  --shadow-out: 8px 8px 20px rgba(0,0,0,.4), -8px -8px 20px rgba(48,44,38,.3);
  --shadow-out-sm: 4px 4px 10px rgba(0,0,0,.3), -4px -4px 10px rgba(48,44,38,.2);
  --shadow-inset: inset 3px 3px 8px rgba(0,0,0,.3), inset -3px -3px 8px rgba(48,44,38,.2);
  --shadow-hover: 12px 12px 28px rgba(0,0,0,.5), -12px -12px 28px rgba(48,44,38,.4);
  --accent-soft: rgba(211,160,67,.12);
  --accent-glow: rgba(211,160,67,.25);
}

/* ===== 侧栏/顶栏（inset 凹陷底 #100e0c） ===== */
html.dark aside, html.dark .menu-container, html.dark [class*="sidebar"] {
  background: #100e0c !important;
  border-right: 1px solid rgba(255,255,255,.05) !important;
}
html.dark header, html.dark [class*="navbar"], html.dark [class*="topbar"] {
  background: #100e0c !important;
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
}
html.dark aside a:hover { background: rgba(255,255,255,.03) !important; }
html.dark aside a.router-link-active, html.dark aside a[class*="active"] {
  background: rgba(211,160,67,.12) !important;
}
html.dark aside a.router-link-active :where(span, div, p),
html.dark aside a[class*="active"] :where(span, div, p) { color: #E0B85C !important; }

/* ===== 列表视图容器（透明显底色 + 撑满宽度） ===== */
html.dark main, html.dark .list-view { background: transparent !important; }
/* Vikunja 自带的桌面最大宽度钳制放开，卡片网格吃满屏 */
html.dark .is-max-width-desktop, html.dark .is-max-width-desktop.has-text-start {
  max-width: none !important;
  width: 100% !important;
}

/* ===== 任务卡片（blog-boost.js 会把任务重排为网格卡片 .bb-task） ===== */
html.dark .tasks .task.single-task, html.dark .bb-task {
  background: #1e1b17 !important;
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 8px 8px 20px rgba(0,0,0,.4), -8px -8px 20px rgba(48,44,38,.3) !important;
  transition: box-shadow .18s ease, transform .12s ease;
  position: relative; overflow: hidden;
}
html.dark .tasks .task.single-task:hover, html.dark .bb-task:hover {
  box-shadow: 12px 12px 28px rgba(0,0,0,.5), -12px -12px 28px rgba(48,44,38,.4) !important;
  transform: translateY(-2px);
}
html.dark .task .tasktext, html.dark .task .task-title { color: #f5f5f7 !important; }
html.dark .task:hover .tasktext, html.dark .bb-task:hover .bb-title { color: #E0B85C !important; }
html.dark .task.done, html.dark .task.is-done { opacity: .45; }
html.dark .task.done .tasktext { text-decoration: line-through; text-decoration-color: #B8862E; }
html.dark .task .task-overdue, html.dark [class*="overdue"] { color: #E0564B !important; }
html.dark .task .task-link, html.dark .task [class*="icon"] { color: #8a8577; }

/* ===== Kanban bucket（凹盛凸） ===== */
html.dark .kanban [class*="bucket"], html.dark [class*="bucket"] {
  background: #100e0c !important;
  border: 1px solid rgba(255,255,255,.05) !important;
  border-radius: 20px !important;
  box-shadow: inset 3px 3px 8px rgba(0,0,0,.3), inset -3px -3px 8px rgba(48,44,38,.2) !important;
}
html.dark .kanban .task.single-task { cursor: grab; }

/* ===== 按钮（主=金底暖黑字，次=elevated 浮起） ===== */
html.dark .button-primary, html.dark button[class*="primary"],
html.dark [class*="button"][class*="primary"]:not([class*="outline"]):not([class*="ghost"]) {
  background: #D3A043 !important; color: #14110e !important;
  border: none !important; border-radius: 10px !important; font-weight: 600;
  box-shadow: 4px 4px 10px rgba(0,0,0,.3), -4px -4px 10px rgba(48,44,38,.2) !important;
}
html.dark .button-primary:hover { background: #E0B85C !important; }
html.dark .button-primary:active { box-shadow: inset 3px 3px 8px rgba(0,0,0,.3) !important; }
html.dark .button-secondary, html.dark [class*="button"][class*="secondary"],
html.dark [class*="button"][class*="outlined"], html.dark [class*="button"][class*="ghost"] {
  background: #1e1b17 !important; color: #c4c0b6 !important;
  border: none !important; border-radius: 10px !important;
  box-shadow: 4px 4px 10px rgba(0,0,0,.3), -4px -4px 10px rgba(48,44,38,.2) !important;
}
html.dark .button-secondary:hover { color: #f5f5f7 !important; }

/* ===== 输入/搜索（凹陷） ===== */
html.dark input, html.dark textarea, html.dark select,
html.dark [class*="input"], html.dark [class*="search"] {
  background: #100e0c !important; color: #f5f5f7 !important;
  border: none !important;
  box-shadow: inset 3px 3px 8px rgba(0,0,0,.3), inset -3px -3px 8px rgba(48,44,38,.2) !important;
  border-radius: 10px !important;
}
html.dark input:focus, html.dark textarea:focus { outline: none !important; box-shadow: inset 3px 3px 8px rgba(0,0,0,.3), 0 0 0 2px rgba(211,160,67,.4) !important; }

/* ===== 链接/选中/复选 ===== */
html.dark a { color: #D3A043; }
html.dark a:hover { color: #E0B85C; }
html.dark [class*="checkbox"]:checked, html.dark input[type="checkbox"]:checked {
  background: linear-gradient(135deg,#D3A043,#B8862E) !important;
  border-color: #B8862E !important;
}
html.dark ::selection { background: rgba(211,160,67,.3); }

/* ===== 模态/弹层 ===== */
html.dark [class*="modal"], html.dark [class*="card"], html.dark [class*="popup"] {
  background: #1e1b17 !important;
  border-radius: 20px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.3) !important;
}

/* ===== 滚动条 ===== */
html.dark ::-webkit-scrollbar { width: 8px; }
html.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }
html.dark ::-webkit-scrollbar-track { background: transparent; }

/* ===== bb-* 专属（blog-boost.js 渲染的卡片网格/分页/右键菜单） ===== */
.bb-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(var(--cols,5), minmax(0,1fr));
  grid-auto-rows: 1fr;
}
.bb-task { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; cursor: pointer; }
.bb-task.hide { display: none; }
.bb-task::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #B8862E, #D3A043, transparent);
}
.bb-proj {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #E0B85C;
}
.bb-proj::before { content: '◆'; font-size: 8px; color: #B8862E; }
.bb-head { display: flex; align-items: flex-start; gap: 12px; }
.bb-check {
  width: 20px; height: 20px; margin-top: 2px; border-radius: 6px; flex-shrink: 0;
  background: #100e0c; border: 1px solid rgba(255,255,255,.05); position: relative;
  box-shadow: inset 3px 3px 8px rgba(0,0,0,.3), inset -3px -3px 8px rgba(48,44,38,.2);
}
.bb-check.on {
  background: linear-gradient(135deg,#D3A043,#B8862E);
  box-shadow: 0 0 12px rgba(211,160,67,.25);
}
.bb-check.on::after {
  content: '✓'; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 12px; color: #14110e; font-weight: 700;
}
.bb-task.done { opacity: .45; }
.bb-task.done .bb-title { text-decoration: line-through; text-decoration-color: #B8862E; }
.bb-tag { font-size: 10.5px; font-weight: 600; padding: 2px 10px; border-radius: 100px; letter-spacing: .03em; }
.bb-sub { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #5a5750; }
.bb-subbar { flex: 1; height: 4px; border-radius: 2px; background: #100e0c; overflow: hidden;
  box-shadow: inset 3px 3px 8px rgba(0,0,0,.3), inset -3px -3px 8px rgba(48,44,38,.2); }
.bb-subbar i { display: block; height: 100%; background: linear-gradient(90deg,#B8862E,#D3A043); border-radius: 2px; }
.prio-high { color: #E0564B; font-size: 11px; font-weight: 700; }
.prio-mid  { color: #D3A043; font-size: 11px; font-weight: 700; }
.prio-low  { color: #5a5750; font-size: 11px; font-weight: 700; }
.bb-title { font-weight: 600; font-size: 14.5px; line-height: 1.45; color: #f5f5f7; }
.bb-desc {
  font-size: 12px; color: #a8a59f; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bb-meta {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.05);
}
.bb-meta .due-over { color: #E0564B; font-weight: 600; }
.bb-meta .due-today { color: #D3A043; font-weight: 500; }
.bb-pager { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; }
.bb-pg-btn {
  min-width: 34px; height: 34px; padding: 0 12px; border-radius: 10px;
  background: #1e1b17; color: #a8a59f; border: none; font-size: 13px; font-weight: 500;
  cursor: pointer; box-shadow: 4px 4px 10px rgba(0,0,0,.3), -4px -4px 10px rgba(48,44,38,.2);
  transition: all .15s;
}
.bb-pg-btn:hover:not(:disabled) { color: #f5f5f7; }
.bb-pg-btn:active:not(:disabled) { box-shadow: inset 3px 3px 8px rgba(0,0,0,.3); transform: translateY(1px); }
.bb-pg-btn.on { background: rgba(211,160,67,.12); color: #E0B85C; box-shadow: inset 3px 3px 8px rgba(0,0,0,.3); }
.bb-pg-btn:disabled { opacity: .35; cursor: default; }
.bb-pg-info { font-size: 12px; color: #5a5750; margin-left: 8px; }
.bb-pg-info b { color: #E0B85C; font-weight: 600; }

/* ===== 右键菜单 ===== */
.bb-ctx {
  position: fixed; z-index: 9999; width: 232px; padding: 6px;
  background: #1e1b17; border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
  animation: bb-pop .12s ease;
}
@keyframes bb-pop { from { opacity: 0; transform: scale(.96) translateY(2px); } to { opacity: 1; transform: none; } }
.bb-ctx-label {
  font-size: 10px; color: #5a5750; text-transform: uppercase;
  letter-spacing: .12em; padding: 8px 10px 4px; font-weight: 600;
}
.bb-ctx-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: 10px; font-size: 12.5px; color: #a8a59f; cursor: pointer; transition: all .1s;
}
.bb-ctx-item:hover { background: rgba(211,160,67,.12); color: #f5f5f7; }
.bb-ctx-item .kbd { margin-left: auto; font-size: 10px; color: #5a5750; }
.bb-ctx-item.danger:hover { background: rgba(224,86,75,.12); color: #E0564B; }
.bb-ctx-item.gold { color: #E0B85C; font-weight: 600; }
.bb-ctx-sep { height: 1px; background: rgba(255,255,255,.05); margin: 5px 8px; }
.bb-ctx-chips { display: flex; gap: 6px; padding: 4px 10px 8px; flex-wrap: wrap; }
.bb-ctx-chip {
  font-size: 10.5px; padding: 3px 10px; border-radius: 100px;
  background: #100e0c; color: #a8a59f; cursor: pointer;
  box-shadow: 4px 4px 10px rgba(0,0,0,.3), -4px -4px 10px rgba(48,44,38,.2);
}
.bb-ctx-chip:hover { color: #E0B85C; }

/* ===== toast ===== */
.bb-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1e1b17; color: #f5f5f7; font-size: 13px; padding: 10px 20px;
  border-radius: 100px; z-index: 10000;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); border-left: 3px solid #D3A043;
  animation: bb-pop .15s ease;
}
