/* ==========================================================================
   招标项目管理 —— 样式表
   颜色约定（卡片背景，序号小的优先级高）：
     1. 已标记「待删除」→ 整块灰色
     2. 待开始 → 浅蓝
     3. 进行中 → 浅绿
     4. 已结束 → 浅粉
   ========================================================================== */

:root {
    --blue-bg:    #e4effc;   /* 待开始 */
    --green-bg:   #e3f5e7;   /* 进行中 */
    --pink-bg:    #fbe4ee;   /* 已结束 */
    --gray-bg:    #e8e9eb;   /* 待删除 */

    --text:       #1f2328;
    --text-dim:   #5c6370;
    --text-gray:  #9aa0a6;   /* 待删除时的文字 */
    --line:       #dfe2e6;

    --brand:      #2b6cb0;
    --brand-dark: #23578e;

    /* 低饱和红：删除按钮专用（饱和度刻意压低，免得比内容还抢眼） */
    --danger:      #b3544f;
    --danger-bg:   #f6e7e6;
    --danger-line: #dcb4b1;

    /* 顶部导航（浅蓝） */
    --nav-bg-top: #eef6ff;
    --nav-bg:     #e4f0fd;
    --nav-line:   #cbdff6;
    --nav-text:   #3f6a9c;
    --nav-active: #14508c;

    /* 页面骨架宽度：决定左右两侧留白多少（两侧留白即装饰区宽度） */
    --page-width: 1000px;
}

* { box-sizing: border-box; }

/* [hidden] 必须真正隐藏。
   坑：局部规则里的 display:flex / display:block 会盖掉浏览器默认的 [hidden]{display:none}，
   于是 JS 里 el.hidden = true 看着生效、实际上元素还在屏幕上（曾因此漏掉 .bookmark，
   造成「已保留的项目仍显示『未处理』书签」）。这里统一兜底，不再逐个补。 */
[hidden] { display: none !important; }

/* 整页共用同一层背景：浅蓝填色 + 白色圆点图案。
   中间内容区与两侧装饰区看到的是同一块背景，不再有"中间发白"的分界。 */
body {
    margin: 0;
    background-color: #dcebfb;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, .75) 1.6px, transparent 1.6px);
    background-size: 18px 18px;
    background-attachment: fixed;
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB",
                 "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* ======================= 顶部导航 ======================= */
.topbar {
    background: linear-gradient(180deg, var(--nav-bg-top) 0%, var(--nav-bg) 100%);
    border-bottom: 1px solid var(--nav-line);
    box-shadow: 0 1px 4px rgba(30, 82, 140, .08);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    font-size: 17px;
    font-weight: 700;
    color: var(--nav-active);
    letter-spacing: .5px;
    padding: 15px 0;
    white-space: nowrap;
}

.tabs { display: flex; gap: 4px; }

.tab {
    border: 0;
    background: none;
    font: inherit;
    color: var(--nav-text);
    padding: 15px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, background-color .15s;
}

.tab:hover {
    color: var(--nav-active);
    background: rgba(255, 255, 255, .55);
}

.tab.is-active {
    color: var(--nav-active);
    font-weight: 700;
    border-bottom-color: var(--brand);
    background: rgba(255, 255, 255, .75);
}

/* ======================= 页面骨架 ======================= */
/* 容器宽度由 --page-width 控制，想更宽/更窄只改这一个值 */
.page {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 20px 20px 48px;
    position: relative;
    z-index: 1;           /* 压在两侧装饰区之上 */
}

/* ======================= 工具条 ======================= */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sort-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
}

/* ======================= 「保留项目」页：左导航 + 右列表 ======================= */
.keep-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

/* 只有「保留项目」页才出现；其余 tab 下这个 aside 是 hidden 的 */
.keep-side {
    flex: none;
    width: 132px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 76px;                 /* 顶栏高度 + 一点余量 */
}

.keep-side[hidden] { display: none; }

.keep-main {
    flex: 1;
    min-width: 0;              /* 不加这条，长标题会把整列撑破 */
}

.ks-item {
    font: inherit;
    font-size: 14px;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    color: var(--text-dim);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.ks-item:hover { border-color: #c3c8ce; color: var(--text); }

.ks-item.is-active {
    background: #fff;
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(23, 43, 77, .10);
}

select, .date-input {
    font: inherit;
    color: var(--text);
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}

.btn {
    font: inherit;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.btn:hover { border-color: #c3c8ce; }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
}

.btn.small { padding: 3px 10px; font-size: 13px; }

/* ======================= 已启用筛选条件 ======================= */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 10px;
}

.chips:empty { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eaf1fb;
    color: var(--brand-dark);
    border: 1px solid #cfe0f5;
    border-radius: 14px;
    padding: 2px 8px 2px 12px;
    font-size: 13px;
}

.chip-x {
    border: 0;
    background: none;
    color: var(--brand-dark);
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    cursor: pointer;
}

.chip-x:hover { color: #b3261e; }

.chip-clear {
    border: 0;
    background: none;
    color: var(--brand);
    font: inherit;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    padding: 2px 4px;
}

/* ======================= 项目卡片 ======================= */
.list { display: flex; flex-direction: column; gap: 14px; }

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 18px;
    /* 底色变成浅蓝后，投影要稍微明显一点，卡片才不会和背景糊在一起 */
    box-shadow: 0 2px 6px rgba(23, 43, 77, .10);
    transition: box-shadow .15s ease;
}

.card:hover { box-shadow: 0 4px 14px rgba(23, 43, 77, .16); }

/* 状态底色 —— 顺序决定优先级：越靠后定义越优先？不，这里用显式覆盖 */
.card.status-pending { background: var(--blue-bg);  border-color: #c3daf5; }
.card.status-ongoing { background: var(--green-bg); border-color: #bfe3c8; }
.card.status-ended   { background: var(--pink-bg);  border-color: #f2c4d8; }

/* 待删除：整块灰色，文字变灰，优先级最高（放在最后覆盖上面所有状态色） */
.card.trash {
    background: var(--gray-bg);
    border-color: #d3d5d8;
}

.card.trash .pname,
.card.trash .row2,
.card.trash .row3,
.card.trash .expand { color: var(--text-gray); }

.card.trash .pname { font-weight: 400; }
.card.trash a { color: var(--text-gray); }

/* ---- 第一行：项目名称 + 状态 + 按钮 ---- */
.row1 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pname {
    font-size: 16px;
    font-weight: 500;
    flex: 0 1 auto;                 /* 不撑满整行：状态徽章才能紧跟在标题后面 */
    min-width: 0;
    word-break: break-all;
}

/* 星标后标题加粗 */
.pname.starred { font-weight: 800; }

.row1-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.badge {
    font-size: 12px;
    border-radius: 12px;
    padding: 2px 10px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-pending { background: #cfe3fb; color: #1b4f8a; border-color: #a9caf2; }
.badge-ongoing { background: #c9ebd3; color: #1d6b39; border-color: #a5dbb5; }
.badge-ended   { background: #f6cfdf; color: #8f2a53; border-color: #eda9c4; }

.tbtn {
    font: inherit;
    font-size: 13px;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text-dim);
    cursor: pointer;
    white-space: nowrap;
}

.tbtn:hover { border-color: #c3c8ce; }

.tbtn.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ---- 第二行 / 第三行 / 第四行 ---- */
.row2, .row3, .row4 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 13px;
}

.dot { color: #b9bec4; }

.row3 { color: var(--text-dim); }

/* 来源链接 / 展开 靠右：与右侧「保留·待删除」操作列同侧，鼠标不用一会儿左一会儿右 */
.row4 { justify-content: flex-end; }

/* ---- 已保留项目的「取消保留」：在「删除」上一行，同样靠右 ---- */
.row-unkeep {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

/* display:flex 会盖掉 [hidden] 的默认隐藏，所以这里要显式补一条 */
.row-unkeep[hidden] { display: none; }

.unkeep-link {
    font: inherit;
    font-size: 13px;
    padding: 2px 4px;
    border: 0;
    background: none;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.unkeep-link:hover {
    color: var(--text);
    border-bottom-color: currentColor;
}

/* ---- 已保留项目的「删除」（红字，在「来源链接 / 展开」上一行，同样靠右） ---- */
.row-del {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

/* display:flex 会盖掉 [hidden] 的默认隐藏，所以这里要显式补一条 */
.row-del[hidden] { display: none; }

.del-link {
    font: inherit;
    font-size: 13px;
    padding: 2px 4px;
    border: 0;
    background: none;
    color: var(--danger);
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.del-link:hover {
    border-bottom-color: currentColor;
}

.row3 .spacer { margin-left: auto; }

a.source-link {
    color: var(--brand);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    font-size: 13px;
}

a.source-link:hover { color: var(--brand-dark); }

.source-link.disabled {
    color: var(--text-gray);
    border-bottom-style: dotted;
    cursor: not-allowed;
}

/* ---- 展开区域 ---- */
.expand {
    flex: 0 0 100%;                 /* 独占一整行：往下方展开，不占右侧 */
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, .15);
    font-size: 13px;
    color: var(--text-dim);
}

.expand-title { font-weight: 700; color: var(--text); margin-bottom: 4px; }

.ann-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ann-list li {
    padding: 2px 0;
    word-break: break-all;
}

.ann-line { display: inline; }

/* ---- 附件入口 ---- */
.attach-btn {
    display: inline-block;
    margin-left: 8px;
    font: inherit;
    font-size: 12px;
    line-height: 1.5;
    padding: 1px 8px;
    border: 1px solid #b9d4f2;
    border-radius: 10px;
    background: rgba(255, 255, 255, .8);
    color: var(--brand);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: 1px;
}

.attach-btn:hover {
    background: #e5f1fd;
    border-color: var(--brand);
}

/* 多附件展开后的清单 */
.attach-list {
    list-style: none;
    margin: 3px 0 3px 22px;
    padding: 0;
}

.attach-list li {
    padding: 1px 0 1px 12px;
    position: relative;
}

.attach-list li::before {
    content: "-";
    position: absolute;
    left: 0;
    color: var(--text-dim);
}

.attach-list a {
    color: var(--brand);
    text-decoration: none;
}

.attach-list a:hover { text-decoration: underline; }

/* 待删除的项目里，附件入口也要跟着变灰 */
.card.trash .attach-btn {
    color: var(--text-gray);
    border-color: #d3d5d8;
    background: rgba(255, 255, 255, .5);
}

.card.trash .attach-list li::before,
.card.trash .attach-list a { color: var(--text-gray); }

.ann-date { color: var(--text-dim); }

.ann-type { color: var(--text); }

.ann-list a { color: var(--brand); text-decoration: none; }
.ann-list a:hover { text-decoration: underline; }

.notes {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .65);
    border-radius: 6px;
    color: var(--text);
    word-break: break-all;
}

.notes-title { font-weight: 700; }

.notes-text { margin-top: 2px; }

/* 待删除时整块文字变灰，备注区也要跟着变灰 */
.card.trash .notes { color: var(--text-gray); }

/* ======================= 加载状态 / 空状态 ======================= */
.sentinel { height: 1px; }

.load-status {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    padding: 14px 0 30px;
}

.empty {
    text-align: center;
    color: var(--text-dim);
    padding: 40px 0;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 10px;
}

.empty.big { font-size: 15px; padding: 80px 0; }

/* ======================= 筛选弹窗 ======================= */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}

.modal-mask[hidden] { display: none; }

.modal {
    background: #fff;
    border-radius: 12px;
    width: 560px;
    max-width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-head {
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid var(--line);
}

.modal-body {
    padding: 8px 18px 4px;
    overflow-y: auto;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid var(--line);
}

.fgroup { padding: 12px 0; border-bottom: 1px solid #eef0f2; }
.fgroup:last-child { border-bottom: 0; }

.fgroup-title { font-weight: 700; margin-bottom: 8px; }

.fgroup-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.opt {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--text-dim);
}

.custom-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.tilde { color: var(--text-dim); }

/* ==========================================================================
   左右两侧装饰区
   --------------------------------------------------------------------------
   宽度 = 页面左右留白，用 calc 自动跟着窗口和 --page-width 变化：
       (100vw - 页面宽度) / 2
   所以窗口一窄，装饰区自己就没了，不需要额外判断。
   内容区（.page / .topbar）用 z-index 压在装饰之上，保证不会盖住文字。
   ========================================================================== */
.deco {
    position: fixed;
    top: 0;
    bottom: 0;
    width: calc((100vw - var(--page-width)) / 2);
    overflow: hidden;          /* 掉落的符号不出框，不会撑出滚动条 */
    pointer-events: none;      /* 纯装饰，不挡点击 */
    user-select: none;
    z-index: 0;

    /* 底色与图案由 body 统一提供，这里只负责符号和光晕，
       所以两侧与中间看到的是同一层背景，不会出现色块拼接的接缝 */

    /* 上下边缘渐隐，让符号在两端自然淡入淡出 */
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
    mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

/* 靠内容一侧加一层柔光，视觉上把中间栏"托"起来 */
.deco-left::before,
.deco-right::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 外缘再压一块模糊的色斑，让两侧有"填色"的层次，而不是一整片平板色 */
.deco-left::after,
.deco-right::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    pointer-events: none;
}

.deco-left { left: 0; }
.deco-right { right: 0; }

.deco-left::before {
    background: radial-gradient(520px 640px at 100% 38%,
                rgba(43, 108, 176, .16), transparent 70%);
}

.deco-right::before {
    background: radial-gradient(520px 640px at 0% 38%,
                rgba(43, 108, 176, .16), transparent 70%);
}

.deco-left::after {
    left: -170px;
    top: 6%;
    background: radial-gradient(circle, rgba(43, 108, 176, .16), rgba(43, 108, 176, 0) 70%);
}

.deco-right::after {
    right: -170px;
    top: 52%;
    background: radial-gradient(circle, rgba(43, 108, 176, .16), rgba(43, 108, 176, 0) 70%);
}

/* ---- 掉落的符号 ---- */
.deco span {
    position: absolute;
    left: var(--x, 50%);
    top: -14%;
    font-size: var(--s, 20px);
    font-weight: 700;
    /* 底色变蓝之后，符号要用更深的蓝才看得清（原来在近白底上用 .45 就够） */
    color: rgba(28, 78, 140, .55);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .85);
    white-space: nowrap;
    animation: deco-fall var(--t, 18s) linear var(--d, 0s) infinite;
    will-change: transform;
}

@keyframes deco-fall {
    0%   { transform: translateY(0) rotate(0deg) scale(1); opacity: 0; }
    8%   { opacity: 1; }
    92%  { opacity: 1; }
    100% { transform: translateY(118vh) rotate(var(--r, 90deg)) scale(1.05);
           opacity: 0; }
}

/* 装饰区太窄（窗口不够宽）时直接隐藏，避免挤在内容两边显得杂乱 */
@media (max-width: 1200px) {
    .deco { display: none; }
}

/* 系统开启"减少动态效果"时停止掉落动画，只保留图案与填色 */
@media (prefers-reduced-motion: reduce) {
    .deco span { animation: none; display: none; }
}

/* ==========================================================================
   卡片内部布局：左侧内容区 + 右侧操作列
   --------------------------------------------------------------------------
   右侧操作列固定宽度，"保留 / 待删除" 与 "我们参与 / 经销商参与 / 不参与 / 自定义"
   都占这一列，所以点完保留之后整块不会跳位。
   ========================================================================== */
.card {
    display: flex;
    flex-wrap: wrap;                /* 让展开区能换行到下方，不在右侧挤着展开 */
    gap: 14px;
    position: relative;
    padding: 14px 16px 14px 24px;   /* 左边多留一点给「未处理」书签 */
    overflow: hidden;
}

.card-main { flex: 1; min-width: 0; }

/* ---- 标题前的星标（空心 ☆ / 实心 ★） ---- */
.star-btn {
    flex: none;
    border: 0;
    background: none;
    font: inherit;
    font-size: 17px;
    line-height: 1;
    padding: 0 2px;
    color: #c3c8ce;
    cursor: pointer;
}

.star-btn:hover { color: #dfae2a; }
.star-btn.on    { color: #e0a92c; }

/* ---- 未处理书签（贴着卡片左边缘） ---- */
.bookmark {
    position: absolute;
    left: 0;
    top: 12px;
    width: 24px;
    padding: 5px 0 12px;
    background: #f2c86c;
    color: #6b4a05;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    /* 外层用 flex 居中；竖排放到内层 span 上。
       原因：vertical-rl 下单行行盒默认贴右边缘，text-align:center 管的是纵向，
       直接写在容器上会让竖排字整体偏右。 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 3px 0;
    /* 下端剪出 V 口，看起来像书签；留够下内边距，别切到最后一个字 */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 88%, 0 100%);
}

.bookmark > span {
    writing-mode: vertical-rl;      /* 竖排，三两个字正好 */
}

/* ---- 右侧操作列 ---- */
.card-ops {
    flex: none;
    width: 96px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-self: flex-start;
}

.op-btn {
    font: inherit;
    font-size: 13px;
    padding: 4px 6px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text-dim);
    cursor: pointer;
    white-space: nowrap;
}

.op-btn:hover { border-color: #c3c8ce; color: var(--text); }

/* 选中的「保留」 */
.op-btn.on {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* 选中的「待删除」——用灰色而不是红色，和整块的灰底呼应 */
.op-btn.on-trash {
    background: #dcdfe3;
    border-color: #c3c7cc;
    color: #4a4f56;
}

.card.trash .op-btn {
    color: var(--text-gray);
    border-color: #d3d5d8;
}

.card.trash .op-btn.on-trash {
    background: #d3d7db;
    border-color: #c0c5ca;
    color: #565b61;
}

/* ---- 底部标签区（已保留的项目才有） ---- */
.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, .12);
}

/* display:flex 会盖掉 [hidden] 的默认隐藏，所以这里要显式补一条 */
.tags[hidden] { display: none; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    background: #eaf1fb;
    border: 1px solid #cfe0f5;
    color: var(--brand-dark);
    border-radius: 12px;
    padding: 1px 6px 1px 10px;
    font-size: 12px;
    line-height: 1.7;
}

/* 标签文字过长时用省略号，绝不让它把卡片撑破 */
.tag-text {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-x {
    border: 0;
    background: none;
    color: var(--brand-dark);
    font-size: 13px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
}

.tag-x:hover { color: #b3261e; }

.tag-input {
    font: inherit;
    font-size: 12px;
    border: 1px dashed #b9d4f2;
    border-radius: 12px;
    padding: 2px 10px;
    width: 150px;
    background: #fff;
}

.tag-add {
    border: 1px dashed #b9d4f2;
    background: rgba(255, 255, 255, .7);
    color: var(--brand);
    border-radius: 12px;
    font: inherit;
    font-size: 12px;
    padding: 1px 10px;
    cursor: pointer;
}

.tag-add:hover { background: #e5f1fd; border-color: var(--brand); }

/* ==========================================================================
   右侧悬浮导航栏：剩余待处理数量 + 刷新重排 + 删除
   ========================================================================== */
.float-nav {
    position: fixed;
    right: 18px;
    top: 96px;
    width: 152px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(23, 43, 77, .14);
    padding: 12px;
    z-index: 30;
}

.fnav-label { font-size: 12px; color: var(--text-dim); }

.fnav-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--brand-dark);
}

.fnav-sub {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.fnav-btn {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font: inherit;
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.fnav-btn:last-child { margin-bottom: 0; }
.fnav-btn:hover { border-color: #c3c8ce; }

/* 删除按钮：低饱和度红，不刺眼 */
.fnav-btn.danger {
    color: var(--danger);
    border-color: var(--danger-line);
}

.fnav-btn.danger:hover { background: var(--danger-bg); }

.fnav-btn.danger:disabled {
    color: #b9bec4;
    border-color: var(--line);
    background: #fafafa;
    cursor: not-allowed;
}

/* ======================= 删除确认弹窗 ======================= */
.modal.small { width: 420px; }

.confirm-text {
    padding: 4px 0 2px;
    color: var(--text-dim);
    line-height: 1.9;
}

.confirm-text b { color: var(--danger); }

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger:hover { background: #9d4743; border-color: #9d4743; }

/* ======================= 登录页（访问密码） ======================= */
/* 背景沿用 body 的浅蓝圆点，所以这里不再另设底色 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 320px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 22px rgba(23, 43, 77, .14);
    padding: 26px 24px 22px;
    text-align: center;
}

.login-brand {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
}

.login-tip {
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-dim);
}

.login-form {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-input {
    font: inherit;
    font-size: 14px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-align: center;
}

.login-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, .14);
}

.login-btn { padding: 9px 14px; }

.login-error {
    margin-top: 10px;
    font-size: 13px;
    color: var(--danger);
}

/* ======================= 窄屏适配 ======================= */
/* 窗口不够宽时，右侧悬浮栏挪到右下角，免得压住内容区 */
@media (max-width: 1360px) {
    .float-nav {
        right: 12px;
        top: auto;
        bottom: 14px;
        width: 140px;
    }
}

@media (max-width: 640px) {
    .topbar-inner { flex-wrap: wrap; gap: 0; }
    .row1 { flex-wrap: wrap; }
    .pname { flex-basis: 100%; }
    .row1-right { margin-left: auto; }
    .sort-box { margin-left: 0; }
    .toolbar { flex-wrap: wrap; }
    .card { padding-left: 22px; }
    .card-ops { width: 82px; }
    .tag-text { max-width: 140px; }
}
