/* ============ 基础与主题变量 ============ */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #202429;
  --text-2: #69707a;
  --text-3: #9aa1ab;
  --border: #e3e6ea;
  --border-2: #d2d7dd;
  --accent: #2f6bff;
  --accent-weak: #eef3ff;
  --accent-strong: #2456d6;
  --danger: #e5484d;
  --mark: #ffe58f;
  --shadow: 0 1px 2px rgba(20, 24, 31, .05), 0 4px 16px rgba(20, 24, 31, .06);
  --shadow-lg: 0 4px 10px rgba(20, 24, 31, .08), 0 12px 40px rgba(20, 24, 31, .16);
  --bulk-border: #c9d9ff;
  --toast-bg: #1f242c;
  --toast-act: #8ab4ff;
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --panel: #1a1d23;
  --text: #e4e6eb;
  --text-2: #9aa1ab;
  --text-3: #69707a;
  --border: #2a2e36;
  --border-2: #363b44;
  --accent: #3b82f6;
  --accent-weak: #1e2a44;
  --accent-strong: #2563eb;
  --danger: #f87171;
  --mark: #4a3d1a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 4px 16px rgba(0, 0, 0, .3);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, .4), 0 12px 40px rgba(0, 0, 0, .5);
  --bulk-border: #2a3b5e;
  --toast-bg: #363b44;
  --toast-act: #93c5fd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

[hidden] {
  display: none !important
}

body {
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background .2s, color .2s
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer
}

input,
select {
  font: inherit;
  color: inherit
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px
}

.ic {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}

mark {
  background: var(--mark);
  border-radius: 2px;
  padding: 0 1px;
  color: var(--text)
}

#app {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 60px
}

.fatal {
  padding: 60px 20px;
  text-align: center;
  color: var(--danger)
}

/* ============ 搜索框 ============ */
.searchbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  height: 46px;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 14px
}

.searchbar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .13)
}

.searchbar>.ic {
  color: var(--text-3)
}

#q {
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15px
}

.q-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--text-3)
}

.q-clear:hover {
  background: var(--bg);
  color: var(--text)
}

/* ============ 快速访问与工具栏 ============ */
.quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 0
}

.quick:empty {
  display: none
}

.quick-label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--text-3);
  font-size: 12px;
  margin-right: 2px
}

.quick-label .ic {
  width: 13px;
  height: 13px
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 13px 4px 6px;
  font-size: 13px;
  transition: .12s;
  max-width: 200px
}

.chip:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow)
}

.chip .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-width: 0;
  margin-right: auto
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 7px;
  color: var(--text-2);
  font-size: 13px
}

.crumb:hover {
  background: var(--panel)
}

.crumb.cur {
  color: var(--text);
  font-weight: 600
}

.crumb-sep {
  color: var(--text-3)
}

.crumb .ic {
  width: 14px;
  height: 14px
}

.tools {
  display: flex;
  align-items: center;
  gap: 6px
}

.tool-sep {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 4px
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--panel);
  font-size: 13px;
  transition: .12s;
  white-space: nowrap
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.btn.primary:hover {
  background: var(--accent-strong);
  color: #fff
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff
}

.btn.danger:hover {
  background: #c93a3f;
  color: #fff
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-2);
  transition: .12s
}

.icon-btn:hover {
  background: var(--panel);
  color: var(--text)
}

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  padding: 2.5px 5px;
  border-radius: 999px;
  font-weight: 600
}

/* ============ 启动器主区 ============ */
.sec {
  margin-bottom: 22px
}

.sec-t {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 9px
}

.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px
}

.bgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 8px
}

.fcard {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  transition: .12s;
  min-width: 0
}

.fcard:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px)
}

.fcard-ic {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 8px;
  background: var(--accent-weak);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center
}

.fcard-ic .ic {
  width: 18px;
  height: 18px
}

.fcard-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500
}

.fcard-n {
  flex: none;
  font-size: 12px;
  color: var(--text-3)
}

.bmcard {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  position: relative;
  transition: .12s;
  min-width: 0
}

.bmcard:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px)
}

.bmcard-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px
}

.bmcard-t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.bmcard-d {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.bmcard-pin {
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--text-3)
}

.bmcard-pin .ic {
  width: 11px;
  height: 11px
}

.blist {
  display: flex;
  flex-direction: column
}

.bmrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  min-width: 0
}

.bmrow:hover {
  background: var(--panel);
  box-shadow: var(--shadow)
}

.bmrow-t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.bmrow-u {
  color: var(--text-3);
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: none
}

.bmrow-time {
  color: var(--text-3);
  font-size: 12px;
  flex: none;
  margin-left: auto
}

.tags {
  display: inline-flex;
  gap: 4px;
  flex: none
}

.tags i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap
}

.favbox {
  width: 30px;
  height: 30px;
  flex: none;
  position: relative
}

.favbox img.fav {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: contain;
  position: absolute;
  inset: 0
}

.favbox .fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: hsl(var(--h, 220), 52%, 47%);
  color: #fff;
  font-weight: 600;
  font-size: 14px
}

.favbox:not(.dead) .fb {
  display: none
}

.favbox.dead img.fav {
  display: none
}

.chip .favbox {
  width: 20px;
  height: 20px
}

.chip .favbox img.fav {
  width: 20px;
  height: 20px;
  border-radius: 4px
}

.chip .favbox .fb {
  border-radius: 4px;
  font-size: 11px
}

.empty-small {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3)
}

.foot {
  margin-top: 44px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 2
}

/* ============ 欢迎空态 ============ */
.empty-hero {
  padding: 64px 0 40px;
  text-align: center;
  color: var(--text-2)
}

.eh-ic {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--accent-weak);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center
}

.eh-ic .ic {
  width: 26px;
  height: 26px
}

.empty-hero h2 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px
}

.empty-hero p {
  max-width: 420px;
  margin: 0 auto 22px
}

.eh-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px
}

.eh-tip {
  font-size: 12px;
  color: var(--text-3)
}

/* ============ 右键菜单 ============ */
#ctx-menu {
  position: fixed;
  z-index: 1000;
  display: none;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 5px
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer
}

.menu-item:hover {
  background: var(--bg)
}

.menu-item.danger {
  color: var(--danger)
}

.menu-item .ic {
  width: 14px;
  height: 14px;
  color: var(--text-3)
}

.menu-item.danger .ic {
  color: var(--danger)
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 5px 6px
}

/* ============ 对话框 ============ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(18, 22, 30, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 16px;
  animation: fadein .12s
}

@keyframes fadein {
  from {
    opacity: 0
  }
}

.modal {
  width: min(540px, 100%);
  background: var(--panel);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  animation: pop .14s
}

.modal.wide {
  width: min(760px, 100%)
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98)
  }
}

.modal-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px 0
}

.modal-h h3 {
  font-size: 16px
}

.modal-b {
  padding: 16px 20px;
  overflow: auto
}

.modal-f {
  padding: 12px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--border)
}

.fld {
  display: block;
  margin-bottom: 13px
}

.fld>span {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 5px
}

.fld input,
.fld select,
.modal input[type=text],
.modal select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--panel);
  outline: 0;
  transition: border-color .12s, box-shadow .12s
}

.fld input:focus,
.fld select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .13)
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer
}

.radio {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 3px 0
}

.confirm-msg {
  color: var(--text-2);
  line-height: 1.8
}

.modal-tip {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.6;
  word-break: break-all
}

/* ============ 导入 / 回收站 / 快照 ============ */
.file-drop {
  display: block;
  border: 1.5px dashed var(--border-2);
  border-radius: 10px;
  padding: 22px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: .12s;
  margin-bottom: 12px
}

.file-drop:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.file-drop input {
  display: none
}

.imp-info {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.8
}

.trash-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--border);
  min-width: 0
}

.trash-item:last-child {
  border-bottom: 0
}

.ti-body {
  flex: 1;
  min-width: 0
}

.ti-t {
  display: flex;
  gap: 6px;
  align-items: center
}

.ti-t b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500
}

.ti-type {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-weak);
  border-radius: 4px;
  padding: 0 5px;
  flex: none
}

.ti-sub {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ti-ops {
  display: flex;
  gap: 6px;
  flex: none
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border-2);
  font-size: 12px;
  color: var(--text-2);
  transition: .12s;
  white-space: nowrap
}

.mini-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.mini-btn.danger:hover {
  border-color: var(--danger);
  color: var(--danger)
}

/* ============ Toast ============ */
#toast-root {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none
}

.toast {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--toast-bg);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  transition: .25s;
  pointer-events: auto;
  max-width: 90vw
}

.toast.in {
  opacity: 1;
  transform: none
}

.toast.err {
  background: var(--danger)
}

.toast-act {
  color: var(--toast-act);
  font-weight: 600;
  white-space: nowrap
}

.toast.err .toast-act {
  color: #fff
}

/* ============ 拖放提示 ============ */
body.drag::after {
  content: '松开鼠标，添加书签';
  position: fixed;
  inset: 10px;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: var(--accent-weak);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  pointer-events: none
}

/* ============ 管理视图 ============ */
#manage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 60px
}

.mgr-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap
}

.mgr-top h2 {
  font-size: 18px
}

.mgr-stat {
  color: var(--text-3);
  font-size: 12px;
  margin-left: auto
}

.mgr-body {
  display: flex;
  gap: 18px;
  align-items: flex-start
}

.mgr-side {
  width: 236px;
  flex: none;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding-right: 4px
}

.side-sec {
  margin-bottom: 20px
}

.side-t {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  margin-bottom: 7px;
  padding-left: 2px;
  letter-spacing: .04em
}

.side-empty {
  font-size: 12px;
  color: var(--text-3)
}

.tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  min-width: 0
}

.tree-node:hover {
  background: var(--panel)
}

.tree-node.active {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600
}

.tree-node .ic {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--text-3)
}

.tree-node.active .ic {
  color: var(--accent)
}

.tree-node .tw {
  width: 16px;
  height: 16px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border-radius: 4px;
  transition: transform .12s
}

.tree-node .tw:hover {
  background: var(--bg)
}

.tree-node .tw .ic {
  width: 12px;
  height: 12px
}

.tree-node.closed>.tw {
  transform: rotate(-90deg)
}

.tree-node .tw.empty {
  visibility: hidden
}

.tree-node .tn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tree-node .tc {
  font-size: 11px;
  color: var(--text-3);
  flex: none
}

.tree-kids {
  margin-left: 14px;
  border-left: 1px solid var(--border);
  padding-left: 4px
}

.drop-on {
  outline: 2px dashed var(--accent) !important;
  outline-offset: -2px;
  background: var(--accent-weak) !important
}

.grp {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer
}

.grp:hover {
  background: var(--panel)
}

.grp.active {
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600
}

.grp .ic {
  width: 14px;
  height: 14px;
  color: var(--text-3)
}

.grp.active .ic {
  color: var(--accent)
}

.grp .gc {
  margin-left: auto;
  font-size: 11px;
  background: var(--bg);
  border-radius: 999px;
  padding: 1px 7px;
  color: var(--text-3)
}

.grp.active .gc {
  background: var(--panel);
  color: var(--accent)
}

.grp .gc.warn {
  background: #fdecea;
  color: var(--danger)
}

.tagside {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.tcloud {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  transition: .12s
}

.tcloud:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.tcloud.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff
}

.tcloud i {
  font-style: normal;
  font-size: 10px;
  opacity: .7
}

.mgr-main {
  flex: 1;
  min-width: 0
}

.mgr-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap
}

.mgr-bar h3 {
  font-size: 15px;
  margin-right: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap
}

.mgr-cnt {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400
}

.mgr-desc {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400
}

#mgr-filter {
  height: 34px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 0 10px;
  width: 200px;
  outline: 0;
  background: var(--panel);
  transition: border-color .12s, box-shadow .12s
}

#mgr-filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .13)
}

#mgr-sort {
  height: 34px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 0 6px;
  background: var(--panel);
  outline: 0
}

.bulk {
  position: sticky;
  top: 8px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-weak);
  border: 1px solid var(--bulk-border);
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  flex-wrap: wrap
}

.bulk b {
  font-size: 13px;
  color: var(--accent)
}

.bulk .btn {
  height: 30px;
  background: var(--panel)
}

.bulk .sp {
  flex: 1
}

.fdsec-t {
  font-size: 12px;
  color: var(--text-3);
  margin: 10px 2px 7px
}

.mrow {
  display: grid;
  grid-template-columns: 16px 30px minmax(140px, 1.3fr) minmax(0, .9fr) minmax(100px, .8fr) 92px 64px;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  min-width: 0
}

.mrow:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow)
}

.mrow.sel {
  border-color: var(--accent);
  background: var(--accent-weak)
}

.mrow.dragging {
  opacity: .45
}

.mrow.drop-before {
  box-shadow: 0 -2px 0 var(--accent)
}

.mrow.drop-after {
  box-shadow: 0 2px 0 var(--accent)
}

.mrow .rowcheck {
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex: none;
  margin: 0
}

.favbox.fdic {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-weak);
  color: var(--accent);
  border-radius: 6px
}

.favbox.fdic .ic {
  width: 16px;
  height: 16px
}

.m-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px
}

.m-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text);
  min-width: 0
}

.m-title .ic {
  width: 11px;
  height: 11px;
  color: var(--text-3);
  vertical-align: -1px;
  margin-left: 4px
}

.m-sub {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.m-tags {
  display: flex;
  gap: 4px;
  overflow: hidden;
  min-width: 0
}

.m-tags i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap
}

.m-path {
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.m-time {
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
  flex: none;
  white-space: nowrap
}

.m-ops {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
  opacity: 0;
  transition: .12s
}

.mrow:hover .m-ops,
.mrow.sel .m-ops {
  opacity: 1
}

.m-op {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3)
}

.m-op:hover {
  background: var(--bg);
  color: var(--text)
}

.m-op .ic {
  width: 14px;
  height: 14px
}

.list-end {
  height: 8px;
  border-radius: 4px
}

.list-end.drop-after {
  box-shadow: 0 3px 0 var(--accent)
}

.mgr-empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-3);
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 10px
}

/* ============ 健康面板 ============ */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center
}

.stat-card span {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px
}

.stat-card.warn span {
  color: var(--danger)
}

.dash-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.dash-tip {
  font-size: 13px;
  color: var(--text-2)
}

.dash-tip.warn {
  color: var(--danger)
}

.dash-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.dash-col h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text-2)
}

.dash-col .bmrow {
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: 6px
}

.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
  width: 100px
}

.progress-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: .2s
}

.code-box {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--text-2);
  cursor: pointer
}

@media (max-width:900px) {
  .dash-cols {
    grid-template-columns: 1fr
  }
}

@media (max-width:900px) {
  .mgr-body {
    flex-direction: column
  }

  .mgr-side {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    gap: 18px;
    overflow-x: auto
  }

  .side-sec {
    min-width: 210px;
    flex: none
  }

  .m-tags,
  .m-path {
    display: none
  }

  .mrow {
    grid-template-columns: 16px 30px 1fr 92px 64px
  }
}

@media (max-width:680px) {
  .row2 {
    grid-template-columns: 1fr
  }

  .bmrow-u,
  .bmrow-time {
    display: none
  }

  .fgrid,
  .bgrid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr))
  }

  #mgr-filter {
    width: 130px
  }
}