Files
subtrack/internal/web/static/screen.css
T
chun_qiu bc5076ee41 feat(v1.11.0): 通行证/深渊模式、淡蓝配色与触控小键盘修复
- 触控小键盘补回 3×4 网格样式:上一版重写 CSS 时漏掉了 .keypad/.key,
  按钮退化成行内小方块;现在恢复 46px 圆角键、⌫/✓ 功能键和「触控」开关态。
- 通行证(原「包赛季」):整段有效期在独立日历上按套餐色连续着色(18% 透明度),
  每一格显示同一个「已完成 / 总单数」(0/1 或 1/1);完成后色块保留并显示 1/1。
  沿用 season_done 记录完成日期,交互动线不变。
- 新增深渊模式:套餐设置周期天数 N 与周期数 X;开通时从开始日排出 X 个 N 天周期,
  结束日 = 开始日 + N×X − 1。周期内任意一天完成即算该周期完成;同一周期重复完成
  不重复计数;撤销该周期最后一条完成打卡会回退计数。独立日历连续着色,每格显示
  同一个「已完成周期 / 总周期数」。
- 全量把「包赛季」改名为「通行证」;套餐表单新增通行证 / 深渊选项,深渊显示 N/X 字段;
  客户开通表单、套餐批量开通、订阅列表、客户订阅卡片、日历待办行同步适配,
  通行证 / 深渊不再显示「追加时长」(提交也会被服务端拒绝)。
- 快速完成 / 批量完成对通行证改为整段完成,对深渊走周期打卡,不再错误地按日写打卡。
- 配色改为淡蓝 / 暗蓝:亮色用暗蓝主色 + 淡蓝纸底,暗色用海军蓝底 + 淡蓝强调;
  默认套餐色改为 #3B6EA5;大屏同步蓝调并修正热力图例与今日数字的对比度。
- 大屏页签排除通行证 / 深渊(它们不计每日热力,避免点开是空日历);「今日待打」
  仍会列出待处理的通行证 / 深渊。
- 数据迁移:packages.abyss / packages.cycle_days / subscriptions.abyss /
  subscriptions.cycle_days,老库启动自动补列。
- 修复手机端整段色块把 7 列日历撑出屏幕:日历改成 minmax(0,1fr),小屏色块缩小。
- 版本号 1.10.0 → 1.11.0。

验证:gofmt / go vet / go test 全绿;亮暗两套、1440 与 390 两档截图走查;
通行证 0/1 → 1/1、深渊 1/4 → 2/4、同周期重复完成不重复计数、撤销回退均实测通过。
2026-10-20 02:33:57 +08:00

402 lines
18 KiB
CSS

/* ============================================================
代打台 · 可视化大屏(v1.10)
------------------------------------------------------------
只认 <html data-bs-theme="light|dark">;默认由模板给 dark。
Bootstrap 只用于重置与栅格,视觉全部在本文件内闭环。
============================================================ */
:root,
[data-bs-theme="light"] {
--scr-bg: #eef4fb;
--scr-panel: #ffffff;
--scr-panel-2: #f7fafd;
--scr-line: #dbe6f1;
--scr-text: #0f1c29;
--scr-text-2: #354a60;
--scr-muted: #5d7186;
--scr-accent: #2f5f9e;
--scr-accent-2: #3f74b4;
--scr-accent-solid: #2f5f9e;
--scr-danger: #b3261e;
--scr-warn: #8a5200;
--scr-glow: 0 0 18px rgba(47, 95, 158, 0.12);
--scr-shadow: 0 14px 32px -22px rgba(20, 32, 43, 0.4);
}
[data-bs-theme="dark"] {
--scr-bg: #070e16;
--scr-panel: #0f1823;
--scr-panel-2: #142030;
--scr-line: #203448;
--scr-text: #e7f0f9;
--scr-text-2: #b6c9db;
--scr-muted: #87a0b8;
--scr-accent: #6fa8dc;
--scr-accent-2: #93c4ee;
--scr-accent-solid: #2b5d94;
--scr-danger: #f08a82;
--scr-warn: #e0b072;
--scr-glow: 0 0 24px rgba(111, 168, 220, 0.16);
--scr-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.screen-body {
background:
radial-gradient(1200px 600px at 12% -10%, color-mix(in srgb, var(--scr-accent) 14%, transparent), transparent 60%),
radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--scr-accent) 8%, transparent), transparent 55%),
var(--scr-bg);
color: var(--scr-text);
font-family: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
system-ui, -apple-system, "Segoe UI", sans-serif;
font-size: 14px;
line-height: 1.45;
overflow: hidden;
-webkit-font-smoothing: antialiased;
}
body.screen-body::before {
content: "";
position: fixed; inset: 0; z-index: 0; pointer-events: none;
background:
linear-gradient(var(--scr-line) 1px, transparent 1px) 0 0 / 100% 44px,
linear-gradient(90deg, var(--scr-line) 1px, transparent 1px) 0 0 / 44px 100%;
opacity: 0.35;
}
.scr {
position: relative; z-index: 1;
display: grid;
grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
gap: 10px;
height: 100vh;
height: 100dvh;
padding: 12px 16px 8px;
}
/* ---------- 头部 ---------- */
.scr-head { display: flex; align-items: center; gap: 14px; min-height: 40px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--scr-line); }
.scr-brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; letter-spacing: 0.06em; color: var(--scr-text); }
.scr-brand .mark {
display: inline-grid; place-items: center;
width: 26px; height: 26px;
background: var(--scr-accent-solid); color: #fff;
font-size: 13px; font-weight: 800; border-radius: 8px;
}
.scr-brand em { font-style: normal; font-size: 11px; font-weight: 500; color: var(--scr-muted); letter-spacing: 0.16em; }
.scr-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.scr-tabs a {
display: inline-flex; align-items: center; gap: 5px;
height: 28px; padding: 0 11px;
font-size: 12px; color: var(--scr-text-2); text-decoration: none;
border: 1px solid var(--scr-line); border-radius: 999px;
background: var(--scr-panel);
}
.scr-tabs a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tab, var(--scr-accent)); }
.scr-tabs a:hover { border-color: var(--scr-accent); color: var(--scr-text); text-decoration: none; }
.scr-tabs a.on { background: var(--scr-accent-solid); border-color: var(--scr-accent-solid); color: #fff; }
.scr-tabs a.on::before { background: #fff; }
.scr-tools { display: flex; align-items: center; gap: 8px; }
.scr-switch {
height: 28px; padding: 0 10px;
display: inline-flex; align-items: center;
font-size: 12px; color: var(--scr-accent); text-decoration: none;
border: 1px solid color-mix(in srgb, var(--scr-accent) 40%, var(--scr-line));
border-radius: 999px; background: var(--scr-panel);
}
.scr-switch:hover { background: color-mix(in srgb, var(--scr-accent) 12%, var(--scr-panel)); text-decoration: none; }
.scr-theme {
width: 28px; height: 28px; padding: 0;
display: inline-grid; place-items: center;
border: 1px solid var(--scr-line); border-radius: 999px;
background: var(--scr-panel); color: var(--scr-text-2);
font-size: 13px; cursor: pointer;
}
.scr-theme:hover { border-color: var(--scr-accent); color: var(--scr-accent); }
.scr-theme .ic-sun { display: none; }
[data-bs-theme="dark"] .scr-theme .ic-sun { display: inline; }
[data-bs-theme="dark"] .scr-theme .ic-moon { display: none; }
.scr-clock { margin-left: auto; text-align: right; line-height: 1.1; }
.scr-clock b { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 22px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: var(--scr-text); }
.scr-clock span { display: block; font-size: 11px; color: var(--scr-muted); }
.scr-links { font-size: 11px; color: var(--scr-muted); }
.scr-links a { color: var(--scr-accent); text-decoration: none; }
.scr-links a:hover { text-decoration: underline; }
/* ---------- KPI ---------- */
.scr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi {
position: relative;
display: flex; align-items: baseline; gap: 6px;
padding: 10px 14px 10px 18px;
background: var(--scr-panel);
border: 1px solid var(--scr-line);
border-radius: 10px;
overflow: hidden;
box-shadow: var(--scr-shadow);
}
.kpi::after {
content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
background: var(--scr-accent);
}
.kpi span { font-size: 12px; color: var(--scr-muted); margin-right: auto; }
.kpi b { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: var(--scr-text); }
.kpi i { font-style: normal; font-size: 11px; color: var(--scr-muted); }
.kpi-hot::after { background: var(--scr-danger); }
.kpi-hot b { color: var(--scr-danger); }
.kpi-warm::after { background: var(--scr-warn); }
.kpi-warm b { color: var(--scr-warn); }
/* ---------- 主区 ---------- */
.scr-main { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; min-height: 0; }
.panel {
display: flex; flex-direction: column; min-height: 0;
background: var(--scr-panel);
border: 1px solid var(--scr-line);
border-radius: 10px;
overflow: hidden;
box-shadow: var(--scr-shadow);
}
.panel-head {
display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
padding: 9px 14px;
border-bottom: 1px solid var(--scr-line);
background: var(--scr-panel-2);
}
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; color: var(--scr-text); }
.panel-head span { font-size: 11px; color: var(--scr-muted); }
/* 热力 */
.heat-grid { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding: 8px 12px; min-height: 0; min-width: 0; overflow: hidden; }
.heat-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; }
.heat-dow span { text-align: center; font-size: 10px; color: var(--scr-muted); }
.heat-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 4px; align-items: stretch; }
.heat-cell {
position: relative;
display: flex; align-items: center; justify-content: space-between;
min-height: 34px; min-width: 0;
padding: 3px 7px 3px 9px;
border: 1px solid var(--scr-line); border-radius: 6px;
background: var(--scr-panel-2);
font-size: 11px; color: var(--scr-muted);
overflow: hidden;
transition: transform 0.1s ease, border-color 0.1s ease;
}
.heat-cell span { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 11px; color: var(--scr-text-2); }
.heat-cell b { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 12px; font-weight: 700; color: var(--scr-text); white-space: nowrap; }
.heat-cell.out { background: var(--scr-panel-2); border-color: var(--scr-line); }
.heat-cell.out span, .heat-cell.out b { color: var(--scr-text-2); }
.heat-cell.past { opacity: 1; }
.heat-cell.today { outline: 1px solid var(--scr-accent); outline-offset: -1px; }
.heat-cell.today span { color: var(--scr-text); font-weight: 700; }
.heat-cell:hover { transform: translateY(-1px); border-color: var(--scr-accent); z-index: 3; }
.heat-cell.h1 { background: color-mix(in srgb, var(--scr-accent) 10%, var(--scr-panel-2)); }
.heat-cell.h2 { background: color-mix(in srgb, var(--scr-accent) 22%, var(--scr-panel-2)); }
.heat-cell.h3 { background: color-mix(in srgb, var(--scr-accent) 36%, var(--scr-panel-2)); }
.heat-cell.h4 { background: color-mix(in srgb, var(--scr-accent) 52%, var(--scr-panel-2)); }
.heat-cell.h3 span, .heat-cell.h4 span { color: var(--scr-text); }
.heat-cell.h3 b, .heat-cell.h4 b { color: var(--scr-text); }
.cell-urgent {
position: absolute; top: 3px; right: 3px;
width: 5px; height: 5px; border-radius: 50%;
background: var(--scr-danger);
box-shadow: 0 0 6px color-mix(in srgb, var(--scr-danger) 70%, transparent);
}
.heat-legend { display: flex; align-items: center; gap: 4px; padding: 6px 14px 10px; font-size: 10px; color: var(--scr-muted); }
.heat-legend span { margin-right: 6px; }
.heat-legend i { width: 14px; height: 9px; border-radius: 2px; border: 1px solid var(--scr-line); display: inline-block; }
.heat-legend i.h0 { background: var(--scr-panel-2); }
.heat-legend i.h1 { background: color-mix(in srgb, var(--scr-accent) 10%, var(--scr-panel-2)); }
.heat-legend i.h2 { background: color-mix(in srgb, var(--scr-accent) 22%, var(--scr-panel-2)); }
.heat-legend i.h3 { background: color-mix(in srgb, var(--scr-accent) 36%, var(--scr-panel-2)); }
.heat-legend i.h4 { background: color-mix(in srgb, var(--scr-accent) 52%, var(--scr-panel-2)); }
.heat-legend .legend-hint { margin-left: auto; font-style: normal; color: var(--scr-text-2); }
/* TOP 10 */
.top-list { list-style: none; margin: 0; padding: 6px 10px; overflow: auto; flex: 1 1 auto; min-height: 0; }
.top-item {
display: grid;
grid-template-columns: 24px 56px minmax(0, 1fr) minmax(0, 118px) 78px 64px;
gap: 8px; align-items: center;
padding: 5px 4px;
border-bottom: 1px dashed var(--scr-line);
font-size: 12px;
}
.top-item:last-child { border-bottom: 0; }
.top-item .rank { grid-column: 1; font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 11px; color: var(--scr-muted); }
.top-item:nth-child(-n+3) .rank { color: var(--scr-accent); font-weight: 700; }
.top-tail { grid-column: 2; font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; color: var(--scr-text); }
.top-name { grid-column: 3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--scr-text-2); }
.top-pkg {
grid-column: 4;
font-size: 10px; padding: 1px 6px; border-radius: 999px;
border-left: 2px solid var(--tag, var(--scr-accent));
background: color-mix(in srgb, var(--tag, var(--scr-accent)) 14%, transparent);
color: var(--scr-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top-remain { grid-column: 5; font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 11px; color: var(--scr-text-2); white-space: nowrap; }
.top-bar { grid-column: 6; height: 4px; background: var(--scr-line); border-radius: 999px; overflow: hidden; }
.top-bar i { display: block; height: 100%; background: var(--scr-accent); }
.top-item.lv-today .top-remain { color: var(--scr-danger); font-weight: 700; }
.top-item.lv-warn .top-remain { color: var(--scr-warn); }
.top-item.lv-today .top-bar i { background: var(--scr-danger); }
.top-item.lv-warn .top-bar i { background: var(--scr-warn); }
/* ---------- 底部两块 ---------- */
.scr-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 168px; max-height: 30vh; }
.today-list { list-style: none; margin: 0; padding: 4px 10px 8px; overflow: auto; min-height: 0; }
.today-list li {
display: grid;
grid-template-columns: auto minmax(0, 1fr) 86px 52px 76px;
gap: 8px; align-items: center;
padding: 5px 6px;
border-bottom: 1px dashed var(--scr-line);
font-size: 12px;
}
.today-list li:last-child { border-bottom: 0; }
.today-list li.urgent {
background: color-mix(in srgb, var(--scr-danger) 8%, transparent);
border-left: 2px solid var(--scr-danger);
padding-left: 8px;
}
.today-list .tchip { grid-column: 1; }
.today-list .pkg { grid-column: 2; font-size: 10px; color: var(--scr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-list .asg { grid-column: 3; }
.today-list .tag-urgent { grid-column: 4; justify-self: start; }
.today-list .rem { grid-column: 5; font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 11px; color: var(--scr-text-2); white-space: nowrap; text-align: right; }
.tchip {
display: inline-flex; align-items: baseline; gap: 3px;
padding: 1px 6px;
border-left: 2px solid var(--tag, var(--scr-accent));
background: color-mix(in srgb, var(--tag, var(--scr-accent)) 14%, transparent);
border-radius: 2px 6px 6px 2px; white-space: nowrap;
color: var(--scr-text-2);
}
.tchip b { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 13px; color: var(--scr-text); }
.tag-urgent {
display: inline-flex; align-items: center;
height: 18px; padding: 0 6px;
font-size: 10px; font-weight: 700; line-height: 1;
background: color-mix(in srgb, var(--scr-danger) 18%, var(--scr-panel));
color: var(--scr-danger);
border: 1px solid color-mix(in srgb, var(--scr-danger) 32%, transparent);
border-radius: 999px;
white-space: nowrap;
}
.scr-empty, .scr-empty-inline { color: var(--scr-muted); font-size: 12px; padding: 16px; text-align: center; margin: 0; }
.scr-empty-inline { padding: 0; text-align: left; }
/* ---------- 最近追加 ---------- */
.scr-recent {
display: flex; align-items: center; gap: 10px;
padding: 5px 12px;
background: var(--scr-panel);
border: 1px solid var(--scr-line); border-radius: 10px;
font-size: 11px; color: var(--scr-muted);
overflow: hidden;
}
.recent-label { flex: 0 0 auto; letter-spacing: 0.12em; color: var(--scr-accent); font-size: 10px; }
.recent-track { display: flex; gap: 18px; overflow: hidden; white-space: nowrap; }
.recent-item { color: var(--scr-text-2); }
.recent-item b { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 12px; color: var(--scr-text); margin-right: 3px; }
.recent-item em { font-style: normal; color: var(--scr-accent); margin-left: 3px; }
.scr-foot { text-align: center; font-size: 10px; color: var(--scr-muted); letter-spacing: 0.06em; }
/* ---------- 当日明细浮层 ---------- */
.day-pop {
position: fixed; z-index: 60;
width: 340px; max-height: 62vh; overflow: auto;
padding: 10px 12px;
background: var(--scr-panel);
border: 1px solid var(--scr-accent);
border-radius: 10px;
box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55), var(--scr-glow);
font-size: 12px;
pointer-events: auto;
overscroll-behavior: contain;
}
.day-pop[hidden] { display: none; }
.day-pop h4 { margin: 0 0 6px; display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--scr-text); }
.day-pop h4 small { font-weight: 400; color: var(--scr-muted); font-size: 10px; }
.day-pop .pop-meta { display: flex; gap: 10px; margin-bottom: 6px; font-size: 10px; color: var(--scr-muted); }
.day-pop .pop-meta b { color: var(--scr-text-2); font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; }
.day-pop ul { list-style: none; margin: 0; padding: 0; }
.day-pop li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 3px 0; border-bottom: 1px dashed var(--scr-line); }
.day-pop li:last-child { border-bottom: 0; }
.day-pop li.urgent { color: var(--scr-danger); }
.day-pop li.done { opacity: 0.45; text-decoration: line-through; }
.day-pop .pop-tail { font-family: "Cascadia Mono", "Consolas", ui-monospace, monospace; font-size: 12px; font-weight: 700; }
.day-pop .pop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--scr-text-2); }
.day-pop .pop-rem { font-size: 10px; color: var(--scr-muted); white-space: nowrap; }
.day-pop .pop-more { margin-top: 6px; font-size: 10px; color: var(--scr-muted); text-align: right; }
.day-pop .pop-empty { color: var(--scr-muted); text-align: center; padding: 8px 0; }
/* ---------- 打手颜色 ---------- */
.asg-strip {
position: absolute; left: 0; top: 0; bottom: 0;
display: flex; flex-direction: column;
width: 3px; overflow: hidden; border-radius: 6px 0 0 6px;
}
.asg-strip i { display: block; flex: 1 1 0; min-height: 3px; }
.asg-strip.sm { width: 3px; }
.asg { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--scr-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asg i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.asg.none { color: var(--scr-muted); }
.asg.none i { opacity: 0.5; }
.pop-who { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
/* ---------- 小屏 / 投屏适配 ---------- */
@media (max-width: 1200px) {
.scr-main { grid-template-columns: 1fr 1fr; }
.scr-kpis .kpi b { font-size: 24px; }
.top-item { grid-template-columns: 24px 52px minmax(0, 1fr) 78px 56px; }
.top-item .top-pkg { display: none; }
.top-remain { grid-column: 4; }
.top-bar { grid-column: 5; }
.today-list li { grid-template-columns: auto minmax(0, 1fr) 52px 76px; }
.today-list .asg { display: none; }
.today-list .tag-urgent { grid-column: 3; }
.today-list .rem { grid-column: 4; }
}
@media (max-width: 860px) {
body.screen-body { overflow: auto; }
.scr { height: auto; }
.scr-main, .scr-bottom { grid-template-columns: 1fr; }
.scr-bottom { max-height: none; }
.scr-tabs, .scr-links { display: none; }
.scr-clock { margin-left: 0; }
.scr-kpis { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
.heat-cell { transition: none; }
}