/* ═══════════════════════════════════════════════════════════════
   LinkBoard — app.css
   Page-local layout built on TraeWork tokens (colors_and_type.css)
   and components (components.css). Light mode only.
   ═══════════════════════════════════════════════════════════════ */

/* ---- Reset / base ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-base-default);
  color: var(--text-default);
  font-family: var(--body-base-font-family);
  font-size: var(--body-base-font-size);
  line-height: var(--body-base-line-height);
  font-weight: var(--body-base-font-weight);
  letter-spacing: var(--body-base-letter-spacing);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
::selection { background: var(--bg-brand-popup); }

/* ---- Icon system: currentColor masks over TraeWork SVG assets ---- */
.ic {
  --ic-size: 16px;
  width: var(--ic-size);
  height: var(--ic-size);
  flex: 0 0 var(--ic-size);
  display: inline-block;
  vertical-align: middle;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.ic--12 { --ic-size: 12px; }
.ic--14 { --ic-size: 14px; }
.ic--20 { --ic-size: 20px; }
.ic--24 { --ic-size: 24px; }
.ic-link        { -webkit-mask-image: url('../assets/icons/Link.svg');                mask-image: url('../assets/icons/Link.svg'); }
.ic-plus        { -webkit-mask-image: url('../assets/icons/Plus.svg');                mask-image: url('../assets/icons/Plus.svg'); }
.ic-plus-circle { -webkit-mask-image: url('../assets/icons/PlusCircle.svg');          mask-image: url('../assets/icons/PlusCircle.svg'); }
.ic-home        { -webkit-mask-image: url('../assets/icons/home.svg');                mask-image: url('../assets/icons/home.svg'); }
.ic-settings    { -webkit-mask-image: url('../assets/icons/settings.svg');            mask-image: url('../assets/icons/settings.svg'); }
.ic-search      { -webkit-mask-image: url('../assets/icons/Search.svg');              mask-image: url('../assets/icons/Search.svg'); }
.ic-folder      { -webkit-mask-image: url('../assets/icons/Folder.svg');              mask-image: url('../assets/icons/Folder.svg'); }
.ic-folder-solid { -webkit-mask-image: url('../assets/icons/FolderSolid.svg');          mask-image: url('../assets/icons/FolderSolid.svg'); }
.ic-download    { -webkit-mask-image: url('../assets/icons/download.svg');            mask-image: url('../assets/icons/download.svg'); }
.ic-check       { -webkit-mask-image: url('../assets/icons/check.svg');               mask-image: url('../assets/icons/check.svg'); }
.ic-check-small { -webkit-mask-image: url('../assets/icons/check-small.svg');         mask-image: url('../assets/icons/check-small.svg'); }
.ic-chevron     { -webkit-mask-image: url('../assets/icons/chevron_down_large.svg');  mask-image: url('../assets/icons/chevron_down_large.svg'); }
.ic-drag        { -webkit-mask-image: url('../assets/icons/DragDot.svg');             mask-image: url('../assets/icons/DragDot.svg'); }
.ic-star        { -webkit-mask-image: url('../assets/icons/Star.svg');                mask-image: url('../assets/icons/Star.svg'); }
.ic-more        { -webkit-mask-image: url('../assets/icons/More.svg');                mask-image: url('../assets/icons/More.svg'); }
.ic-close       { -webkit-mask-image: url('../assets/icons/Close.svg');               mask-image: url('../assets/icons/Close.svg'); }
.ic-delete      { -webkit-mask-image: url('../assets/icons/Delete.svg');              mask-image: url('../assets/icons/Delete.svg'); }
.ic-edit        { -webkit-mask-image: url('../assets/icons/edit.svg');                mask-image: url('../assets/icons/edit.svg'); }
.ic-external    { -webkit-mask-image: url('../assets/icons/icon-arrow-up-right.svg'); mask-image: url('../assets/icons/icon-arrow-up-right.svg'); }
.ic-import      { -webkit-mask-image: url('../assets/icons/import.svg');              mask-image: url('../assets/icons/import.svg'); }
.ic-refresh     { -webkit-mask-image: url('../assets/icons/Refresh.svg');             mask-image: url('../assets/icons/Refresh.svg'); }
.ic-left        { -webkit-mask-image: url('../assets/icons/Left.svg');                mask-image: url('../assets/icons/Left.svg'); }
.ic-info        { -webkit-mask-image: url('../assets/icons/info.svg');                mask-image: url('../assets/icons/info.svg'); }
.ic-calendar    { -webkit-mask-image: url('../assets/icons/calendar.svg');            mask-image: url('../assets/icons/calendar.svg'); }
.ic-ban         { -webkit-mask-image: url('../assets/icons/ban.svg');                 mask-image: url('../assets/icons/ban.svg'); }
.ic-filter      { -webkit-mask-image: url('../assets/icons/filter.svg');              mask-image: url('../assets/icons/filter.svg'); }

/* ═══════════════════ App shell ═══════════════════ */
.app {
  display: grid;
  grid-template-columns: 200px 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  background: var(--bg-base-secondary);
  border-right: 1px solid var(--border-neutral-l1);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--spacer-12);
  padding: var(--spacer-20) var(--spacer-16) var(--spacer-16);
}
.brand__mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-8);
  background: var(--bg-brand);
  color: var(--icon-onbrand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand__mark .ic { --ic-size: 16px; }
.brand__name {
  font-family: var(--heading-sm-font-family);
  font-size: var(--heading-sm-font-size);
  line-height: var(--heading-sm-line-height);
  font-weight: var(--heading-sm-font-weight);
  color: var(--text-default);
  letter-spacing: -0.01em;
}
.side-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 var(--spacer-8) var(--spacer-8);
  overflow: hidden;
}
.side-section__label {
  font-size: var(--body-xs-font-size);
  line-height: var(--body-xs-line-height);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--spacer-8) var(--spacer-8) var(--spacer-4);
}
.board-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--spacer-2);
  padding: 0 var(--spacer-4);
}
.board-nav::-webkit-scrollbar { width: 8px; }
.board-nav::-webkit-scrollbar-thumb { background: var(--bg-overlay-l2); border-radius: 8px; }

.board-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--spacer-8);
  padding: var(--spacer-8) var(--spacer-10);
  border: none;
  background: transparent;
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.board-item .ic { color: var(--icon-tertiary); }
.board-item:hover { background: var(--bg-overlay-l2); color: var(--text-default); }
.board-item:hover .ic { color: var(--icon-secondary); }
/* 有自定义颜色时，文件夹图标保持彩色，不被 hover/active 覆盖 */
.board-item__icon[style] { color: inherit; }
.board-item.is-active { background: var(--bg-overlay-l3); color: var(--text-default); font-weight: var(--font-weight-medium); }
.board-item.is-active .ic { color: var(--icon-default); }
.board-item.is-active .board-item__icon[style] { color: inherit; }
.board-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-item__count {
  font-family: var(--font-family-metric);
  font-size: var(--body-xs-font-size);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
/* 「⋯」更多按钮：默认隐藏，hover 显示 */
.board-item__more {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: var(--radius-4);
  color: var(--icon-tertiary);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity .12s ease, background .12s ease, color .12s ease;
  cursor: pointer;
}
.board-item:hover .board-item__more { opacity: 1; }
.board-item__more:hover { background: var(--bg-overlay-l3); color: var(--icon-default); }
.board-item__more .ic { color: inherit; }
.new-board-btn {
  margin: var(--spacer-8) var(--spacer-4) 0;
  justify-content: flex-start;
  color: var(--text-secondary);
}

.side-foot {
  border-top: 1px solid var(--border-neutral-l1);
  padding: var(--spacer-8);
  display: flex;
  flex-direction: column;
  gap: var(--spacer-2);
}
.side-link {
  display: flex;
  align-items: center;
  gap: var(--spacer-10);
  padding: var(--spacer-8) var(--spacer-10);
  border: none;
  background: transparent;
  border-radius: var(--radius-8);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
  width: 100%;
  text-align: left;
}
.side-link .ic { color: var(--icon-tertiary); }
.side-link:hover { background: var(--bg-overlay-l2); color: var(--text-default); }
.side-link:hover .ic { color: var(--icon-secondary); }
.side-link.is-active { background: var(--bg-overlay-l3); color: var(--text-default); font-weight: var(--font-weight-medium); }
.side-link.is-active .ic { color: var(--icon-default); }

/* ---- Main ---- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.view { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---- Topbar ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacer-16);
  padding: var(--spacer-12) var(--spacer-24);
  border-bottom: 1px solid var(--border-neutral-l1);
  background: var(--bg-base-default);
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.topbar__left { display: flex; align-items: center; gap: var(--spacer-12); min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: var(--spacer-8); }
.topbar__crumb { font-size: var(--body-base-font-size); }
.topbar__title { margin: 0; }
.search { width: 280px; }
.search .ds-input__icon { width: 16px; height: 16px; }
.search input { width: 100%; }

/* Add menu dropdown */
.add-menu {
  position: absolute;
  top: 56px;
  right: var(--spacer-24);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: var(--spacer-2);
  background: var(--bg-menu);
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-12);
  padding: var(--spacer-8);
  min-width: 200px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text-default) 12%, transparent), 0 2px 8px color-mix(in srgb, var(--text-default) 8%, transparent);
}
.add-menu .ds-menu__item { border: none; background: transparent; }

/* ═══════════════════ Board ═══════════════════ */
.board-scroll { flex: 1; min-height: 0; overflow: auto; padding: var(--spacer-12); }
.board { display: flex; gap: var(--spacer-8); align-items: flex-start; padding-bottom: var(--spacer-8); }

/* 标签筛选栏 */
.tag-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacer-6);
  padding: var(--spacer-8) var(--spacer-24);
  border-bottom: 1px solid var(--border-neutral-l1);
  background: var(--bg-base-default);
  overflow-x: auto;
  flex-shrink: 0;
}
.tag-bar::-webkit-scrollbar { height: 6px; }
.tag-bar::-webkit-scrollbar-thumb { background: var(--bg-overlay-l2); border-radius: 8px; }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--spacer-4);
  padding: var(--spacer-2) var(--spacer-10);
  border: 1px solid var(--border-neutral-l1);
  background: var(--bg-overlay-l1);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: var(--body-sm-font-size);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.tag-chip:hover { background: var(--bg-overlay-l2); color: var(--text-default); }
.tag-chip.is-active { background: var(--bg-brand); color: var(--text-onbrand, #fff); border-color: transparent; }
.tag-chip__count {
  font-family: var(--font-family-metric);
  font-size: var(--body-xs-font-size);
  opacity: .7;
  font-variant-numeric: tabular-nums;
}
.tag-chip--clear { color: var(--text-brand); border-color: transparent; background: transparent; }

.column {
  display: flex;
  flex-direction: column;
  flex: 1 1 calc(25% - 6px);
  max-width: 320px;
  min-width: 0;
  max-height: calc(100vh - 116px);
  min-height: 0;
}
.column__head {
  display: flex;
  align-items: center;
  gap: var(--spacer-6);
  padding: var(--spacer-4) var(--spacer-6);
  margin-bottom: var(--spacer-6);
}
.col-toggle {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  color: var(--icon-tertiary);
  border-radius: var(--radius-6);
  transition: background .12s ease, color .12s ease;
}
.col-toggle:hover { background: var(--bg-overlay-l2); color: var(--icon-default); }
.col-toggle .ic { transition: transform .2s ease; }
.column.is-collapsed .col-toggle .ic { transform: rotate(-90deg); }
.column__title {
  flex: 1; min-width: 0;
  font-family: var(--body-base-strong-font-family);
  font-size: var(--body-base-strong-font-size);
  line-height: var(--body-base-strong-line-height);
  font-weight: var(--body-base-strong-font-weight);
  letter-spacing: var(--body-base-strong-letter-spacing);
  color: var(--text-default);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.column__title-input {
  flex: 1; min-width: 0;
  font: inherit;
  font-weight: var(--font-weight-medium);
  color: var(--text-default);
  background: var(--bg-base-default);
  border: 1px solid var(--border-contrast);
  border-radius: var(--radius-6);
  padding: var(--spacer-2) var(--spacer-6);
  outline: none;
}
.col-count {
  font-family: var(--font-family-metric);
  font-size: var(--body-xs-font-size);
  color: var(--text-tertiary);
  background: var(--bg-overlay-l2);
  border-radius: var(--radius-full);
  padding: 0 var(--spacer-6);
  height: 18px;
  display: inline-flex; align-items: center;
  font-variant-numeric: tabular-nums;
}
.col-icon-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  color: var(--icon-tertiary);
  border-radius: var(--radius-6);
  transition: background .12s ease, color .12s ease;
}
.col-icon-btn:hover { background: var(--bg-overlay-l2); color: var(--icon-default); }

/* 列拖拽手柄 */
.col-drag-handle {
  --ic-size: 14px;
  color: var(--icon-tertiary);
  cursor: grab;
  flex: 0 0 14px;
  opacity: 0;
  transition: opacity .12s ease, color .12s ease;
}
.column__head:hover .col-drag-handle { opacity: 1; }
.col-drag-handle:hover { color: var(--icon-default); }
.column__head[draggable="true"]:active .col-drag-handle { cursor: grabbing; }

/* 列拖拽视觉反馈 */
.column.is-dragging-col { opacity: 0.4; }
.column.is-col-drop-before { box-shadow: -2px 0 0 0 var(--bg-brand); }
.column.is-col-drop-after { box-shadow: 2px 0 0 0 var(--bg-brand); }

.column__body {
  display: flex;
  flex-direction: column;
  gap: var(--spacer-6);
  overflow-y: auto;
  min-height: 40px;
  padding: var(--spacer-2);
  border-radius: var(--radius-8);
  transition: background .15s ease, outline .15s ease;
  flex: 1;
}
.column__body::-webkit-scrollbar { width: 8px; }
.column__body::-webkit-scrollbar-thumb { background: var(--bg-overlay-l2); border-radius: 8px; }
.column__body.is-over { background: var(--bg-overlay-l1); outline: 1px dashed var(--border-neutral-l2); outline-offset: -2px; }
.column.is-collapsed .column__body { display: none; }

.col-empty {
  border: 1px dashed var(--border-neutral-l1);
  border-radius: var(--radius-8);
  padding: var(--spacer-16) var(--spacer-8);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--body-sm-font-size);
}

/* 列卡片超限折叠的展开/收起按钮 */
.col-more-toggle {
  margin-top: var(--spacer-4);
  padding: var(--spacer-6) var(--spacer-8);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--body-sm-font-size);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-8);
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: background .12s ease, color .12s ease;
}
.col-more-toggle:hover { background: var(--bg-overlay-l2); color: var(--text-default); }
.col-more-toggle__more {
  margin-left: var(--spacer-4);
  color: var(--text-brand);
  font-family: var(--font-family-metric);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════ Cards ═══════════════════ */
.card {
  position: relative;
  background: var(--bg-base-secondary);
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-12);
  padding: var(--spacer-10);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.card:hover { border-color: var(--border-neutral-l2); background: var(--bg-overlay-l1); }
.card.is-dragging { opacity: .4; }
.card.is-drop-before::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -5px;
  height: 2px;
  background: var(--bg-brand);
  border-radius: 2px;
}
.card[draggable="true"] { cursor: grab; }
.card[draggable="true"]:active { cursor: grabbing; }

.card__actions {
  position: absolute;
  top: var(--spacer-8);
  right: var(--spacer-8);
  display: flex;
  gap: var(--spacer-2);
  opacity: 0;
  transition: opacity .12s ease;
}
.card:hover .card__actions { opacity: 1; }
.card-act {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-base-default);
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-6);
  color: var(--icon-secondary);
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.card-act .ic { --ic-size: 12px; }
.card-act:hover { background: var(--bg-overlay-l2); color: var(--icon-default); border-color: var(--border-neutral-l2); }
.card-act.is-on { color: var(--status-alert-default); }
.card-act.is-on .ic { color: var(--status-alert-default); }

/* ---- Bookmark card ---- */
.bm-head { display: flex; align-items: center; gap: var(--spacer-8); min-width: 0; color: inherit; }
.bm-link {
  display: flex; align-items: flex-start; gap: var(--spacer-8); min-width: 0;
  text-decoration: none; color: inherit; flex: 1;
}
.bm-favicon {
  width: 22px; height: 22px;
  flex: 0 0 22px;
  border-radius: var(--radius-6);
  background: var(--bg-overlay-l2);
  display: grid; place-items: center;
  overflow: hidden;
  margin-top: 1px;
}
.bm-favicon__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bm-favicon__letter { display: none; width: 100%; height: 100%; place-items: center; font-family: var(--font-family-metric); font-size: var(--body-xs-font-size); font-weight: var(--font-weight-strong); color: var(--text-secondary); }
.bm-favicon.is-fallback .bm-favicon__img { display: none; }
.bm-favicon.is-fallback .bm-favicon__letter { display: grid; }
.bm-title {
  font-size: var(--body-sm-font-size);
  line-height: var(--body-sm-line-height);
  font-weight: var(--font-weight-medium);
  color: var(--text-default);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word;
  flex: 1; min-width: 0;
}
.bm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacer-4); margin-top: var(--spacer-8); }

/* ---- Colorful tags: 8 stable hues via text hash ---- */
.ds-tag--c1 { background: #e8f1ff; color: #2f5cc4; border-color: transparent; }
.ds-tag--c2 { background: #e7f7ee; color: #1c8a4d; border-color: transparent; }
.ds-tag--c3 { background: #fff1e6; color: #c2581e; border-color: transparent; }
.ds-tag--c4 { background: #fde8ef; color: #c4295f; border-color: transparent; }
.ds-tag--c5 { background: #f1e9ff; color: #6a35c4; border-color: transparent; }
.ds-tag--c6 { background: #e2f6f8; color: #0c7a86; border-color: transparent; }
.ds-tag--c7 { background: #fff6e0; color: #8a6914; border-color: transparent; }
.ds-tag--c8 { background: #eef1f4; color: #46586b; border-color: transparent; }

/* ---- Todo card ---- */
.todo-head { display: flex; align-items: center; gap: var(--spacer-8); margin-bottom: var(--spacer-6); }
.todo-title {
  font-size: var(--body-sm-font-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-default);
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.todo-progress { width: 56px; height: 4px; }
.todo-items { display: flex; flex-direction: column; gap: var(--spacer-4); }
.todo-item {
  display: flex;
  align-items: center;
  gap: var(--spacer-8);
  min-height: 24px;
  cursor: pointer;
  padding: var(--spacer-2) 0;
}
.todo-item__box {
  width: 16px; height: 16px;
  flex: 0 0 16px;
  border: 1px solid var(--border-neutral-l2);
  background: var(--bg-base-default);
  border-radius: var(--radius-4);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-onbrand);
  transition: background .12s, border-color .12s;
}
.todo-item.is-done .todo-item__box { background: var(--bg-brand); border-color: var(--bg-brand); }
.todo-item.is-done .todo-item__box::after {
  content: ''; width: 8px; height: 4px;
  border-left: 2px solid var(--text-onbrand);
  border-bottom: 2px solid var(--text-onbrand);
  transform: rotate(-45deg) translate(1px, -1px);
}
.todo-item__text {
  font-size: var(--body-sm-font-size);
  line-height: var(--body-sm-line-height);
  color: var(--text-default);
  flex: 1; min-width: 0;
  word-break: break-word;
}
.todo-item.is-done .todo-item__text { color: var(--text-tertiary); text-decoration: line-through; }
.todo-add {
  display: flex;
  align-items: center;
  gap: var(--spacer-8);
  margin-top: var(--spacer-8);
  padding: var(--spacer-4) 0;
  color: var(--text-tertiary);
  font-size: var(--body-sm-font-size);
  cursor: pointer;
}
.todo-add:hover { color: var(--text-secondary); }
.todo-add .ic { color: var(--icon-tertiary); }
.todo-add input {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; color: var(--text-default);
}
.todo-add input::placeholder { color: var(--text-tertiary); }

/* Compact card variant */
.app.is-compact .card { padding: var(--spacer-10); }

/* Hide tags row (书签卡片只显示标题，待办卡片不受影响) */
.app.is-hide-tags .bm-foot { display: none; }

/* Search hidden */
.card.is-hidden { display: none; }

/* ═══════════════════ Cross-board search results ═══════════════════ */
.search-results { display: flex; flex-direction: column; gap: var(--spacer-16); max-width: 1000px; }
.search-results__summary { font-size: var(--body-sm-font-size); color: var(--text-tertiary); padding: var(--spacer-4) var(--spacer-6); }
.search-results__summary strong { color: var(--text-default); font-weight: var(--font-weight-strong); }
.search-group { background: var(--bg-base-secondary); border: 1px solid var(--border-neutral-l1); border-radius: var(--radius-12); padding: var(--spacer-12) var(--spacer-12) var(--spacer-10); }
.search-group__head { display: flex; align-items: center; gap: var(--spacer-8); margin-bottom: var(--spacer-10); padding: 0 var(--spacer-4); }
.search-group__head .ic { color: var(--icon-tertiary); }
.search-group__name { font-weight: var(--font-weight-medium); color: var(--text-default); font-size: var(--body-base-font-size); }
.search-group__goto { margin-left: auto; background: transparent; border: none; color: var(--text-brand); font-size: var(--body-sm-font-size); cursor: pointer; padding: var(--spacer-2) var(--spacer-8); border-radius: var(--radius-6); transition: background .12s ease; }
.search-group__goto:hover { background: var(--bg-brand-popup); }
.search-group__cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--spacer-8); }
.search-card-wrap { display: flex; flex-direction: column; gap: var(--spacer-4); }
.search-card__col { font-size: var(--body-xs-font-size); color: var(--text-tertiary); padding-left: var(--spacer-2); }
.search-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--spacer-10); padding: var(--spacer-48) var(--spacer-24); color: var(--text-tertiary); text-align: center; }
.search-empty .ic { color: var(--icon-tertiary); }
.search-empty p { margin: 0; font-size: var(--body-base-font-size); color: var(--text-secondary); }
.search-empty__hint { font-size: var(--body-sm-font-size); color: var(--text-tertiary); }

/* ═══════════════════ Modal ═══════════════════ */
.modal-root {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-overlay-l4);
  padding: var(--spacer-32);
  animation: fade-in .15s ease;
}
.modal-root[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-root .ds-dialog { animation: pop-in .2s ease; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.ds-dialog__title { font-size: var(--heading-sm-font-size); }
.modal-form { display: grid; gap: var(--spacer-16); padding: var(--spacer-4) var(--spacer-20) var(--spacer-4); }
.field { display: flex; flex-direction: column; gap: var(--spacer-6); }
.field__label { font-size: var(--body-base-font-size); font-weight: var(--font-weight-medium); color: var(--text-default); }
.field__hint { font-size: var(--body-sm-font-size); color: var(--text-tertiary); }

/* 颜色选择器 */
.color-picker { display: flex; flex-wrap: wrap; gap: var(--spacer-8); }
.color-dot {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform .12s ease, box-shadow .15s ease;
}
.color-dot:hover { transform: scale(1.12); }
.color-dot.is-selected {
  box-shadow: 0 0 0 2px var(--bg-base-default), 0 0 0 4px var(--text-default);
}
.modal-foot { display: flex; justify-content: flex-end; gap: var(--spacer-8); padding: var(--spacer-12) var(--spacer-20) var(--spacer-20); }

/* ═══════════════════ Toast ═══════════════════ */
.toast-root {
  position: fixed; bottom: var(--spacer-24); right: var(--spacer-24); z-index: 60;
  display: flex; flex-direction: column; gap: var(--spacer-8);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: center; gap: var(--spacer-8);
  padding: var(--spacer-10) var(--spacer-12);
  background: var(--bg-invert);
  color: var(--text-white);
  border-radius: var(--radius-8);
  font-size: var(--body-base-font-size);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text-default) 24%, transparent);
  animation: toast-in .2s ease;
  max-width: 360px;
}
.toast .ic { color: var(--text-white); }
.toast--success .ic { color: var(--accent-teal); }
.toast--error .ic { color: var(--status-error-default); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* search highlight */
mark { background: var(--bg-overlay-l3); color: var(--text-default); border-radius: 2px; padding: 0 1px; }

/* ═══════════════════ Settings view ═══════════════════ */
.settings-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: var(--spacer-32) var(--spacer-24) var(--spacer-48); }
.settings-wrap { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--spacer-24); }
.settings-card { background: var(--bg-base-secondary); border: 1px solid var(--border-neutral-l1); border-radius: var(--radius-12); padding: var(--spacer-24); }
.settings-card__head { display: flex; align-items: center; gap: var(--spacer-12); margin-bottom: var(--spacer-8); }
.settings-card__icon {
  width: 32px; height: 32px; border-radius: var(--radius-8);
  background: var(--bg-overlay-l2); color: var(--icon-default);
  display: grid; place-items: center; flex-shrink: 0;
}
.settings-card__title { font-size: var(--heading-sm-font-size); font-weight: var(--heading-sm-font-weight); color: var(--text-default); }
.settings-card__desc { font-size: var(--body-sm-font-size); color: var(--text-tertiary); margin-bottom: var(--spacer-16); }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--spacer-16);
  padding: var(--spacer-12) 0;
  border-bottom: 1px solid var(--border-neutral-l1);
}
.set-row:last-child { border-bottom: none; }
.set-row__text { min-width: 0; }
.set-row__label { font-size: var(--body-base-font-size); font-weight: var(--font-weight-medium); color: var(--text-default); }
.set-row__hint { font-size: var(--body-sm-font-size); color: var(--text-tertiary); margin-top: var(--spacer-2); }

.import-grid { display: grid; gap: var(--spacer-16); }
.import-textarea { min-height: 160px; font-family: var(--code-editor-font-family); font-size: var(--body-sm-font-size); }
.import-row { display: flex; gap: var(--spacer-12); align-items: flex-end; flex-wrap: wrap; }
.import-row .field { flex: 1; min-width: 180px; }
.import-stats { display: flex; gap: var(--spacer-24); margin-top: var(--spacer-12); }
.import-stat__value { font-family: var(--font-family-metric); font-size: var(--heading-md-font-size); font-weight: var(--font-weight-strong); color: var(--text-default); font-variant-numeric: tabular-nums; }
.import-stat__label { font-size: var(--body-sm-font-size); color: var(--text-tertiary); }

.data-row { display: flex; align-items: center; justify-content: space-between; gap: var(--spacer-12); padding: var(--spacer-12) 0; border-bottom: 1px solid var(--border-neutral-l1); }
.data-row:last-child { border-bottom: none; }
.data-row__label { font-size: var(--body-base-font-size); color: var(--text-default); }
.data-row__meta { font-size: var(--body-sm-font-size); color: var(--text-tertiary); font-family: var(--code-editor-font-family); }

/* switch override (smaller) */
.ds-switch { width: 34px; height: 20px; }
.ds-switch__thumb { width: 14px; height: 14px; }
.ds-switch input:checked ~ .ds-switch__thumb { left: 18px; }

/* ═══════════════════ Sync badge ═══════════════════ */
.sync-badge {
  font-size: var(--body-xs-font-size);
  color: var(--text-tertiary);
  padding: var(--spacer-2) var(--spacer-8);
  border-radius: var(--radius-full);
  background: var(--bg-overlay-l1);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--spacer-4);
  font-variant-numeric: tabular-nums;
}
.sync-badge--syncing { color: var(--status-info-default, var(--text-secondary)); background: color-mix(in srgb, var(--bg-brand) 12%, transparent); }
.sync-badge--ok { color: var(--status-success-default, var(--text-secondary)); }
.sync-badge--dirty { color: var(--status-warning-default, var(--text-secondary)); background: color-mix(in srgb, var(--status-warning-default, var(--text-default)) 10%, transparent); }
.sync-badge--error { color: var(--status-error-default, var(--text-secondary)); background: color-mix(in srgb, var(--status-error-default, var(--text-default)) 10%, transparent); }
.sync-badge--offline { color: var(--text-tertiary); }

/* GitHub 仓库链接 */
.gh-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  color: var(--icon-tertiary);
  border-radius: var(--radius-8);
  transition: color .12s ease, background .12s ease;
  flex-shrink: 0;
}
.gh-link svg { width: 16px; height: 16px; }
.gh-link:hover { color: var(--text-default); background: var(--bg-overlay-l2); }

/* ═══════════════════ Login overlay ═══════════════════ */
.login-overlay {
  position: fixed; inset: 0; z-index: 100;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(75,63,227,.28), transparent 70%),
    radial-gradient(ellipse 60% 50% at 20% 100%, rgba(47,116,255,.18), transparent 70%),
    linear-gradient(180deg, #1a1740 0%, #0f0e2a 50%, #0a0920 100%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacer-24);
}
.login-overlay.is-visible { display: flex; animation: login-fade .35s ease; }
@keyframes login-fade { from { opacity: 0; } to { opacity: 1; } }

/* 卡片顶部光晕装饰 */
.login-card__glow {
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 120px;
  background: radial-gradient(ellipse, rgba(106,111,255,.45), transparent 65%);
  pointer-events: none;
  filter: blur(20px);
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-base-default);
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-20);
  padding: var(--spacer-40) var(--spacer-32) var(--spacer-32);
  box-shadow:
    0 24px 64px rgba(10,9,32,.5),
    0 4px 16px rgba(10,9,32,.3),
    0 0 0 1px rgba(255,255,255,.06);
  animation: login-slide .4s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
@keyframes login-slide {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 品牌区 */
.login-brand { display: flex; align-items: center; gap: var(--spacer-12); margin-bottom: var(--spacer-6); }
.login-brand__mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-10);
  background: linear-gradient(135deg, var(--bg-brand) 0%, var(--brand-500) 100%);
  color: #fff;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(75,63,227,.4);
}
.login-brand__mark .ic { --ic-size: 20px; }
.login-brand__name {
  font-family: var(--font-family-heading);
  font-size: var(--heading-md-font-size);
  line-height: var(--heading-md-line-height);
  font-weight: var(--heading-md-font-weight);
  color: var(--text-default);
  letter-spacing: -0.02em;
}
.login-subtitle { font-size: var(--body-base-font-size); color: var(--text-tertiary); margin: 0 0 var(--spacer-24); }

/* Tab 切换 */
.login-tabs {
  position: relative;
  display: flex; gap: var(--spacer-4);
  margin-bottom: var(--spacer-24);
  border-bottom: 1px solid var(--border-neutral-l1);
}
.login-tab {
  padding: var(--spacer-10) var(--spacer-16);
  border: none; background: transparent;
  color: var(--text-tertiary); cursor: pointer;
  font-size: var(--body-base-font-size); font-weight: var(--font-weight-medium);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s ease;
  position: relative; z-index: 1;
}
.login-tab:hover { color: var(--text-secondary); }
.login-tab.is-active { color: var(--text-brand); }
.login-tabs__indicator {
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 2px;
  background: var(--bg-brand);
  border-radius: 2px;
  transition: transform .28s cubic-bezier(.16,1,.3,1), width .28s cubic-bezier(.16,1,.3,1);
}

/* 表单 */
.login-form { display: flex; flex-direction: column; gap: var(--spacer-16); }
.login-form:not([hidden]) .login-field { animation: field-in .4s cubic-bezier(.16,1,.3,1) backwards; }
.login-form:not([hidden]) .login-field:nth-child(1) { animation-delay: .05s; }
.login-form:not([hidden]) .login-field:nth-child(2) { animation-delay: .12s; }
.login-form:not([hidden]) .login-submit { animation: field-in .4s cubic-bezier(.16,1,.3,1) .19s backwards; }
@keyframes field-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.login-field { display: flex; flex-direction: column; gap: var(--spacer-8); }
.login-field__label {
  font-size: var(--body-md-strong-font-size);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
}
.login-input-wrap {
  display: flex; align-items: center; gap: var(--spacer-10);
  min-height: 42px;
  padding: 0 var(--spacer-12);
  background: var(--bg-base-secondary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-10);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.login-input-wrap:focus-within {
  border-color: var(--bg-brand);
  background: var(--bg-base-default);
  box-shadow: 0 0 0 4px var(--bg-brand-popup);
}
.login-input__icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--icon-tertiary);
  transition: color .15s ease;
}
.login-input-wrap:focus-within .login-input__icon { color: var(--icon-brand); }
.login-input-wrap input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-default); font: inherit; font-size: var(--body-base-font-size);
  min-width: 0; padding: var(--spacer-8) 0;
}
.login-input-wrap input::placeholder { color: var(--text-tertiary); }

/* 主按钮 */
.login-submit {
  margin-top: var(--spacer-6);
  width: 100%; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-brand) 0%, var(--brand-500) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-10);
  font-size: var(--body-base-font-size);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(75,63,227,.35);
  transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(75,63,227,.45); }
.login-submit:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(75,63,227,.3); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.login-error {
  font-size: var(--body-sm-font-size);
  color: var(--status-error-default);
  min-height: 18px; text-align: center;
  animation: shake .3s ease;
}
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* 离线模式 */
.login-offline { margin-top: var(--spacer-20); text-align: center; }
.login-divider {
  display: flex; align-items: center; gap: var(--spacer-12);
  margin-bottom: var(--spacer-16);
  color: var(--text-tertiary);
  font-size: var(--body-sm-font-size);
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-neutral-l1);
}

/* ═══════════════════ Sync settings extras ═══════════════════ */
.set-row--col { flex-direction: column; align-items: stretch; gap: var(--spacer-8); }
.token-box { display: flex; align-items: center; gap: var(--spacer-8); flex-wrap: wrap; }
.token-code {
  font-family: var(--code-editor-font-family);
  font-size: var(--body-sm-font-size);
  color: var(--text-secondary);
  background: var(--bg-overlay-l1);
  padding: var(--spacer-4) var(--spacer-8);
  border-radius: var(--radius-6);
  word-break: break-all;
  flex: 1; min-width: 0;
}
.server-url-code {
  font-family: var(--code-editor-font-family);
  font-size: var(--body-sm-font-size);
  color: var(--text-secondary);
  background: var(--bg-overlay-l1);
  padding: var(--spacer-4) var(--spacer-8);
  border-radius: var(--radius-6);
  word-break: break-all;
}

/* ═══════════════════ Multi-select mode ═══════════════════ */
/* 看板视图作为批量操作栏的定位上下文 */
.view--board { position: relative; }

/* 批量按钮激活态 */
#batchBtn.is-active {
  background: var(--bg-brand);
  color: var(--text-onbrand, #fff);
  border-color: transparent;
}
#batchBtn.is-active .ic { color: var(--icon-onbrand, #fff); }

/* 卡片多选态 */
.card.is-selectable { cursor: pointer; }
.card.is-selectable:hover { border-color: var(--border-brand-l1, var(--border-contrast)); }
.card.is-selected {
  border-color: var(--bg-brand);
  background: var(--bg-brand-surface-l1, color-mix(in srgb, var(--bg-brand) 8%, var(--bg-base-secondary)));
  box-shadow: 0 0 0 1px var(--bg-brand);
}
.card.is-selectable .card__actions { display: none; }

/* 卡片选择勾选框 */
.card-check {
  flex: 0 0 16px;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-base-default);
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-4);
  color: var(--icon-onbrand, #fff);
  cursor: pointer;
  padding: 0;
  transition: background .12s ease, border-color .12s ease, opacity .12s ease;
}
.card-check .ic { --ic-size: 10px; opacity: 0; transition: opacity .12s ease; }
.card.is-selected .card-check {
  background: var(--bg-brand);
  border-color: var(--bg-brand);
}
.card.is-selected .card-check .ic { opacity: 1; }

/* 底部批量操作栏 */
.batch-bar {
  position: absolute;
  left: 50%;
  bottom: var(--spacer-24);
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--spacer-16);
  padding: var(--spacer-10) var(--spacer-16);
  background: var(--bg-menu, var(--bg-base-default));
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-12);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--text-default) 14%, transparent), 0 2px 8px color-mix(in srgb, var(--text-default) 8%, transparent);
  flex-shrink: 0;
}
.batch-bar__count {
  font-size: var(--body-sm-font-size);
  color: var(--text-default);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}
.batch-bar__actions { display: flex; align-items: center; gap: var(--spacer-8); }

/* ═══════════════════ Responsive ═══════════════════ */
.sidebar-toggle { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .sidebar-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 240px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,.12);
  }
  .app.is-sidebar-open .sidebar { transform: translateX(0); }
  .app.is-sidebar-open .sidebar-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 40;
  }
  .search { width: 220px; }
}
@media (max-width: 720px) {
  /* ========== 顶部栏 ========== */
  .topbar { padding: var(--spacer-8) var(--spacer-12); flex-wrap: wrap; gap: var(--spacer-6); min-height: 44px; }
  .topbar__left { flex: 1; min-width: 0; }
  .topbar__crumb { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__right { flex-wrap: wrap; gap: var(--spacer-4); }
  .search { width: auto; flex: 1; min-width: 120px; max-width: 200px; order: 0; }
  .search .ds-input__icon { display: none; }
  .search-collapsed .search { display: none; }

  /* 顶部栏按钮文字隐藏，只留图标 */
  .topbar__right .ds-btn--sm { padding: 4px 8px; font-size: 11px; }
  .topbar__right .ds-btn--sm .ic--14 { --ic-size: 12px; }

  /* ========== 列切换 tab 条 ========== */
  .col-tabs {
    display: flex;
    gap: 2px;
    padding: var(--spacer-8) var(--spacer-12) 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-shrink: 0;
  }
  .col-tabs::-webkit-scrollbar { display: none; }
  .col-tab {
    flex-shrink: 0;
    padding: 6px 14px;
    border: 1px solid var(--border-neutral-l2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-secondary);
    background: transparent;
    transition: all .15s;
  }
  .col-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
  }

  /* ========== 看板区域 ========== */
  .board-scroll { padding: var(--spacer-6); padding-bottom: 80px; }
  .board { flex-direction: column; gap: var(--spacer-8); }

  /* 桌面端多列 → 手风琴单列 */
  .column {
    flex: 1 1 100%;
    max-width: none;
    min-width: 0;
    max-height: none;
    display: none;  /* 默认隐藏，.column--active 显示 */
  }
  .column.column--active { display: flex; }
  .column-header { padding: 10px 14px; min-height: 44px; }

  /* 列操作按钮放大 */
  .col-btn { width: 34px; height: 34px; }
  .col-btn svg { width: 16px; height: 16px; }

  /* ========== 卡片触摸优化 ========== */
  .card { padding: 8px 10px; border-radius: var(--radius-8); }
  .card:active { background: var(--bg-overlay-l2); }
  .bm-head { gap: var(--spacer-6); }
  .bm-favicon { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 0; }
  .bm-favicon__letter { font-size: 10px; width: 16px; height: 16px; line-height: 16px; }
  .bm-title { font-size: 14px; -webkit-line-clamp: 1; }
  .bm-foot { margin-top: var(--spacer-4); gap: var(--spacer-4); }
  .card__actions { margin-bottom: 2px; }
  .card__actions .card-act { width: 24px; height: 24px; }

  /* 桌面 hover 三点菜单在移动端始终隐藏 */
  .bm-menu { display: none !important; }

  .tag-bar { padding: var(--spacer-8) var(--spacer-12); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: var(--spacer-6); }
  .tag-bar::-webkit-scrollbar { display: none; }
  .tag { padding: 4px 12px; font-size: 12px; border-radius: 16px; flex-shrink: 0; }

  /* ========== FAB 浮动按钮 ========== */
  .fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 28px;
    line-height: 56px;
    text-align: center;
    font-weight: 400;
    border: none;
    box-shadow: 0 4px 16px rgba(99,102,241,.4);
    cursor: pointer;
    z-index: 30;
    transition: transform .15s, box-shadow .15s;
  }
  .fab:active { transform: scale(.92); box-shadow: 0 2px 8px rgba(99,102,241,.3); }

  /* ========== 多选操作栏 ========== */
  .batch-bar {
    left: var(--spacer-8);
    right: var(--spacer-8);
    bottom: var(--spacer-8);
    transform: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacer-6);
    padding: var(--spacer-8) var(--spacer-12);
    border-radius: var(--radius-12);
  }

  /* ========== 弹窗 → 底部 sheet ========== */
  .modal-overlay { align-items: flex-end; }
  .modal {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: var(--radius-16) var(--radius-16) 0 0;
    padding: 20px 16px 28px;
    max-height: 85vh;
    animation: slideUp .25s ease;
  }
  .modal h3 { font-size: 15px; margin-bottom: 12px; }
  .modal .field { margin-bottom: 8px; }
  .modal .ds-btn { padding: 10px 18px; font-size: 14px; }

  @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

  /* 长按菜单（移动端替代三点菜单） */
  /* ========== 设置/管理页 ========== */
  .settings-wrap { padding: 0 var(--spacer-12); }
  .settings-card { padding: var(--spacer-12); }
  .simple-table { font-size: 11px; }
  .simple-table__head,
  .simple-table__row { grid-template-columns: 1fr 0.6fr 0.8fr 1fr; padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---- Admin panel simple table ---- */
.simple-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--border-neutral-l1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 13px;
}
.simple-table__head {
  display: grid;
  grid-template-columns: 1fr 0.6fr 0.8fr 1fr;
  background: var(--bg-base-tertiary);
  padding: 8px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
}
.simple-table__row {
  display: grid;
  grid-template-columns: 1fr 0.6fr 0.8fr 1fr;
  padding: 8px 12px;
  border-top: 1px solid var(--border-neutral-l1);
  align-items: center;
}
.simple-table__row:hover {
  background: var(--bg-overlay-l2);
}
