首次推送
build / build-and-test (push) Failing after 1m24s

This commit is contained in:
2026-10-18 19:44:38 +08:00
commit f047662129
64 changed files with 10454 additions and 0 deletions
+688
View File
@@ -0,0 +1,688 @@
/* ============================================================
代打台 · 管理端(浅色「接单台」)
纸感底色 + 墨色文字 + 松墨绿主色;色签(ticket)是唯一强装饰
============================================================ */
:root {
--paper: #f7f6f2;
--surface: #ffffff;
--ink: #1a1c21;
--ink-2: #43474f;
--muted: #7a7e86;
--line: #e3e0d6;
--line-2: #efede6;
--accent: #2f5d50;
--accent-ink: #22453b;
--accent-soft: #e7efea;
--danger: #b4231f;
--danger-soft: #fbeceb;
--warn: #a85e12;
--warn-soft: #fbf1e3;
--info: #41556b;
--info-soft: #eaeef2;
--radius: 3px;
--mono: "Bahnschrift", "Consolas", "SF Mono", ui-monospace, monospace;
--sans: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
background:
linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 100% 32px,
var(--paper);
color: var(--ink);
font-family: var(--sans);
font-size: 14px;
line-height: 1.55;
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 22px; }
h2 { font-size: 15px; }
h3 { font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }
/* ---------- 顶栏 ---------- */
.topbar {
position: sticky; top: 0; z-index: 40;
display: flex; align-items: center; gap: 14px;
padding: 0 20px; height: 56px;
background: rgba(247, 246, 242, 0.94);
backdrop-filter: blur(6px);
border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
display: grid; place-items: center;
width: 26px; height: 26px;
background: var(--accent); color: #fff;
font-size: 14px; font-weight: 700;
border-radius: 2px;
box-shadow: 2px 2px 0 rgba(47, 93, 80, 0.18);
}
.brand-name { font-weight: 700; letter-spacing: 0.06em; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search input {
width: 100%; height: 34px;
padding: 0 34px 0 12px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--surface);
font: inherit; color: var(--ink);
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search kbd {
position: absolute; right: 8px; top: 7px;
font-family: var(--mono); font-size: 11px;
color: var(--muted);
border: 1px solid var(--line); border-bottom-width: 2px;
border-radius: 3px; padding: 0 5px; background: var(--paper);
}
.nav { display: flex; gap: 2px; }
.nav a {
padding: 6px 10px; border-radius: var(--radius);
color: var(--ink-2); font-size: 13px;
}
.nav a:hover { background: var(--surface); text-decoration: none; }
.nav a.on { background: var(--accent); color: #fff; }
.nav a.nav-screen { color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill {
display: inline-flex; align-items: center; gap: 5px;
height: 28px; padding: 0 10px;
border: 1px solid var(--line); border-radius: 999px;
background: var(--surface);
font-size: 12px; color: var(--ink-2); white-space: nowrap;
}
.pill b { font-family: var(--mono); font-size: 13px; }
.pill:hover { text-decoration: none; border-color: var(--accent); }
.pill-due b { color: var(--danger); }
.pill-warn b { color: var(--warn); }
.me { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.me a { color: var(--ink-2); }
.link-btn {
border: 0; background: none; padding: 0; cursor: pointer;
color: var(--muted); font: inherit; font-size: 12px;
}
.link-btn:hover { color: var(--danger); }
/* ---------- 提示条 ---------- */
.flash {
position: fixed; z-index: 90;
left: 50%; top: 68px; transform: translateX(-50%);
max-width: min(680px, calc(100vw - 32px));
padding: 9px 16px;
background: var(--accent); color: #fff;
border-radius: var(--radius);
box-shadow: 0 6px 24px rgba(26, 28, 33, 0.16);
font-size: 13px;
animation: flash-in 0.22s ease-out;
}
.flash-error { background: var(--danger); }
.flash.hide { opacity: 0; transition: opacity 0.4s ease; }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, -6px); } }
/* ---------- 布局 ---------- */
main { padding: 0 20px 40px; }
main.with-top { padding-top: 22px; }
.page { max-width: 1280px; margin: 0 auto; }
.page.narrow { max-width: 860px; }
.page-head {
display: flex; align-items: flex-end; justify-content: space-between;
gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.page-head p { margin: 4px 0 0; font-size: 12px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.foot {
max-width: 1280px; margin: 0 auto; padding: 18px 20px 28px;
font-size: 12px; color: var(--muted);
border-top: 1px solid var(--line);
}
.notice {
margin: 0 0 14px; padding: 10px 14px;
background: var(--warn-soft); border-left: 3px solid var(--warn);
font-size: 13px; border-radius: 0 var(--radius) var(--radius) 0;
}
.notice.note { background: var(--accent-soft); border-left-color: var(--accent); white-space: pre-wrap; }
/* ---------- 按钮与表单 ---------- */
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
height: 34px; padding: 0 14px;
border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); color: var(--ink);
font: inherit; font-size: 13px; cursor: pointer;
white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-2); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--line); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-square { width: 34px; padding: 0; font-size: 18px; line-height: 1; }
.btn-block { width: 100%; }
.btn.disabled { opacity: 0.4; pointer-events: none; }
form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.field > span i { color: var(--danger); font-style: normal; }
.field input[type="text"], .field input[type="password"], .field input[type="number"],
.field input[type="date"], .field input[type="search"], .field select, .field textarea {
width: 100%; min-height: 34px; padding: 6px 10px;
border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); font: inherit; color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[type="color"] { width: 100%; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.fieldset { border: 0; padding: 0; }
.radios { display: grid; gap: 8px; }
.radios label {
display: grid; grid-template-columns: 18px 1fr; grid-template-rows: auto auto;
column-gap: 10px; align-items: center;
padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); cursor: pointer;
}
.radios label:hover { border-color: var(--accent); }
.radios input { grid-row: span 2; margin: 0; accent-color: var(--accent); }
.radios b { font-size: 13px; }
.radios small { grid-column: 2; color: var(--muted); font-size: 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 40px; }
.input-suffix b {
position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
font-size: 12px; color: var(--muted); font-weight: 400;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.actions.wrap { flex-wrap: wrap; }
.inline-form {
display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
margin-top: 14px; padding: 12px;
background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.inline-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.inline-field input, .inline-field select {
height: 32px; padding: 0 8px; min-width: 130px;
border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); font: inherit; font-size: 13px; color: var(--ink);
}
.inline-form select[name="package_id"] { min-width: 220px; }
.form.card, .section.card {
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 20px;
}
.filterbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filterbar input[type="search"], .filterbar select {
height: 34px; padding: 0 10px;
border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); font: inherit; color: var(--ink);
}
.filterbar input[type="search"] { flex: 1 1 260px; max-width: 420px; }
/* ---------- 认证页 ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-card {
width: 100%; max-width: 380px;
background: var(--surface); border: 1px solid var(--line);
border-top: 3px solid var(--accent);
padding: 28px;
box-shadow: 0 18px 40px -32px rgba(26, 28, 33, 0.5);
}
.auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 18px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card > p { font-size: 12px; margin: 0 0 18px; }
.auth-foot { margin-top: 16px !important; text-align: center; }
.form .btn-block { margin-top: 4px; }
/* ---------- 日历 ---------- */
.cal-page { max-width: 1400px; margin: 0 auto; }
.cal-head {
display: flex; align-items: center; justify-content: space-between;
gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.cal-title { display: flex; align-items: center; gap: 10px; }
.cal-title h1 { font-size: 20px; font-family: var(--mono); letter-spacing: 0.02em; }
.cal-stats { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cal-stats em {
font-family: var(--mono); font-style: normal; font-size: 16px;
color: var(--ink); margin-right: 4px;
}
.cal-body { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }
.cal-grid {
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--surface);
overflow: hidden;
}
.cal-dow {
display: grid; grid-template-columns: repeat(7, 1fr);
background: var(--paper);
border-bottom: 1px solid var(--line);
}
.cal-dow span {
padding: 7px 0; text-align: center;
font-size: 12px; color: var(--muted);
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell {
position: relative;
display: flex; flex-direction: column; gap: 3px;
min-height: 112px; padding: 6px 7px 8px;
border-right: 1px solid var(--line-2);
border-bottom: 1px solid var(--line-2);
color: var(--ink); text-decoration: none;
transition: background 0.12s ease;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: #f2f7f4; text-decoration: none; }
.cal-cell.out { opacity: 0.4; }
.cal-cell.weekend .dnum { color: var(--muted); }
.cal-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); z-index: 2; }
.cal-cell.today .dnum {
background: var(--accent); color: #fff;
border-radius: 50%; width: 22px; height: 22px;
display: inline-grid; place-items: center;
}
.cal-cell.has-due::after {
content: ""; position: absolute; left: 6px; right: 6px; bottom: 3px;
border-bottom: 1px dashed rgba(180, 35, 31, 0.45);
}
.cal-cell.heat-1 { background: rgba(47, 93, 80, 0.045); }
.cal-cell.heat-2 { background: rgba(47, 93, 80, 0.085); }
.cal-cell.heat-3 { background: rgba(47, 93, 80, 0.13); }
.cal-cell.heat-4 { background: rgba(47, 93, 80, 0.19); }
.cal-cell.heat-0:hover, .cal-cell.heat-1:hover { background: #f2f7f4; }
.cell-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.dnum { font-family: var(--mono); font-size: 13px; font-weight: 700; line-height: 1.4; }
.due-badge {
display: inline-flex; align-items: baseline; gap: 2px;
font-size: 10px; padding: 0 5px; line-height: 16px;
background: var(--danger); color: #fff; border-radius: 2px;
white-space: nowrap;
}
.due-badge em { font-style: normal; opacity: 0.85; }
.cell-load { font-family: var(--mono); font-size: 10px; color: var(--accent); }
.cell-tickets { display: flex; flex-direction: column; gap: 2px; margin-top: auto; overflow: hidden; }
.ticket {
display: inline-flex; align-items: baseline; gap: 3px;
max-width: 100%; min-width: 0;
padding: 1px 5px;
font-size: 10.5px; line-height: 16px;
border-left: 3px solid var(--tag, var(--accent));
background: color-mix(in srgb, var(--tag, var(--accent)) 11%, #fff);
border-radius: 1px 2px 2px 1px;
white-space: nowrap;
color: var(--ink-2);
}
.ticket b { font-family: var(--mono); font-size: 11px; color: var(--ink); flex: 0 0 auto; }
.ticket .tk-name { overflow: hidden; text-overflow: ellipsis; }
.ticket i { font-style: normal; font-size: 9.5px; color: var(--muted); flex: 0 0 auto; }
.ticket.done { opacity: 0.55; }
.ticket.done::after { content: "✓"; color: var(--accent); font-size: 10px; }
.ticket.skipped { opacity: 0.4; text-decoration: line-through; }
.ticket.more { border-left-color: var(--line); background: var(--paper); color: var(--muted); }
/* ---------- 当日抽屉 ---------- */
.drawer {
position: sticky; top: 72px;
border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface);
max-height: calc(100vh - 100px);
overflow-y: auto;
}
.drawer-head {
position: sticky; top: 0; z-index: 2;
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 12px 14px;
background: var(--paper); border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-size: 14px; font-family: var(--mono); }
.drawer-tags { display: flex; gap: 4px; }
.drawer-block { padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.drawer-block:last-child { border-bottom: 0; }
.drawer-block h3 {
display: flex; align-items: center; gap: 6px;
font-size: 12px; color: var(--ink-2); margin-bottom: 8px;
text-transform: none; letter-spacing: 0.02em;
}
.drawer-block h3 em {
font-family: var(--mono); font-style: normal; font-size: 11px;
background: var(--paper); border: 1px solid var(--line);
border-radius: 999px; padding: 0 6px; color: var(--muted);
}
.drawer-block p { margin: 0; font-size: 12px; }
.due-list, .task-list, .mini-due, .checkin-list { list-style: none; margin: 0; padding: 0; }
.due-list li {
display: flex; align-items: center; justify-content: space-between; gap: 8px;
padding: 6px 0; border-bottom: 1px dashed var(--line-2);
}
.due-list li:last-child { border-bottom: 0; }
.due-main { display: flex; align-items: center; gap: 7px; min-width: 0; color: var(--ink); }
.due-main .pkg, .task-meta .pkg { font-size: 11px; color: var(--muted); }
.due-main .rem { font-family: var(--mono); font-size: 11px; color: var(--danger); }
.task { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.task:last-child { border-bottom: 0; }
.task-main { min-width: 0; flex: 1 1 auto; }
.task-title { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.task-meta { display: flex; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 2px; }
.task-note { font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.task-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; max-width: 170px; }
.task.done .task-title, .task.skipped .task-title { opacity: 0.5; }
.task.skipped .task-title .ticket { text-decoration: line-through; }
.mini-due li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; }
.sm-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* ---------- 状态标签 ---------- */
.chip {
display: inline-flex; align-items: center;
height: 20px; padding: 0 7px;
font-size: 11px; line-height: 1;
border-radius: 2px; border: 1px solid transparent;
white-space: nowrap;
}
.chip-active { background: var(--accent-soft); color: var(--accent-ink); border-color: rgba(47, 93, 80, 0.2); }
.chip-pending { background: var(--info-soft); color: var(--info); border-color: rgba(65, 85, 107, 0.2); }
.chip-paused { background: var(--info-soft); color: var(--info); border-color: rgba(65, 85, 107, 0.2); }
.chip-expired { background: var(--danger-soft); color: var(--danger); border-color: rgba(180, 35, 31, 0.22); }
.chip-usedup { background: var(--warn-soft); color: var(--warn); border-color: rgba(168, 94, 18, 0.22); }
.chip-closed { background: #f0efeb; color: var(--muted); border-color: var(--line); }
.chip-plain { background: var(--paper); color: var(--ink-2); border-color: var(--line); }
.tagchip {
display: inline-block; margin-right: 4px;
padding: 0 6px; height: 19px; line-height: 19px;
font-size: 11px; color: var(--ink-2);
background: var(--paper); border: 1px solid var(--line); border-radius: 2px;
}
.due { font-size: 11px; }
.due-today { color: var(--danger); font-weight: 700; }
.due-warn { color: var(--warn); }
.due-expired { color: var(--muted); }
.due-ok, .due-none { color: var(--muted); }
.plus { color: var(--accent); font-family: var(--mono); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.dot.big { width: 12px; height: 12px; margin: 0; }
/* ---------- 表格 ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
text-align: left; padding: 9px 12px;
font-size: 11px; font-weight: 600; color: var(--muted);
letter-spacing: 0.04em;
background: var(--paper);
border-bottom: 1px solid var(--line);
white-space: nowrap;
}
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfb; }
.table.tight td, .table.tight th { padding: 7px 10px; }
.table .col-dot { width: 28px; }
.table tr.archived { opacity: 0.6; }
.actions-cell { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.tail {
display: inline-block; font-family: var(--mono); font-size: 15px; font-weight: 700;
color: var(--accent-ink); letter-spacing: 0.04em;
}
.name { font-weight: 600; color: var(--ink); }
.summary { font-size: 12px; color: var(--ink-2); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pager-info { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.empty {
display: flex; flex-direction: column; align-items: center; gap: 12px;
padding: 56px 20px; text-align: center;
border: 1px dashed var(--line); border-radius: var(--radius);
background: rgba(255, 255, 255, 0.55);
}
.empty p { margin: 0; color: var(--muted); font-size: 13px; }
.empty-mark {
width: 46px; height: 30px; display: grid; place-items: center;
border: 1px solid var(--line); border-left: 4px solid var(--accent);
background: var(--surface); color: var(--muted); font-size: 12px;
transform: rotate(-4deg);
}
/* ---------- 客户详情 ---------- */
.cust-head { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start; margin-bottom: 16px; }
.cust-id { display: flex; align-items: center; gap: 14px; }
.cust-tail {
font-family: var(--mono); font-size: 30px; font-weight: 700; line-height: 1;
padding: 8px 12px;
background: var(--surface); border: 1px solid var(--line);
border-left: 4px solid var(--accent);
letter-spacing: 0.06em;
}
.cust-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.cust-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; }
.cust-meta dt { font-size: 11px; color: var(--muted); }
.cust-meta dd { margin: 0; font-size: 12px; color: var(--ink-2); }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.section-head h2 { font-size: 14px; }
.section-head .muted { font-size: 11px; }
.section.card h2 { margin-bottom: 12px; }
.subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.subcard {
background: var(--surface);
border: 1px solid var(--line);
border-left: 4px solid var(--tag, var(--accent));
border-radius: var(--radius);
display: flex; flex-direction: column;
}
.subcard-head { display: flex; align-items: center; gap: 6px; padding: 10px 12px 6px; }
.subcard-head h3 { font-size: 13px; flex: 1 1 auto; }
.subcard-head .unit { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; }
.subcard-body { padding: 0 12px 10px; }
.subcard-big { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.subcard-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.bar { height: 5px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--tag, var(--accent)); }
.subcard-foot {
display: flex; gap: 4px; flex-wrap: wrap;
padding: 8px 12px; border-top: 1px dashed var(--line);
background: #fcfcfa;
}
.timeline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 16px 10px; }
.tl-axis { position: relative; height: 18px; margin-left: 92px; margin-right: 150px; border-bottom: 1px solid var(--line-2); }
.tl-tick { position: absolute; top: 0; font-family: var(--mono); font-size: 10px; color: var(--muted); transform: translateX(-50%); }
.tl-row { display: grid; grid-template-columns: 84px 1fr 142px; gap: 8px; align-items: center; padding: 5px 0; }
.tl-name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; height: 20px; background: var(--line-2); border-radius: 2px; }
.tl-bar { position: absolute; top: 4px; height: 12px; background: var(--tag); border-radius: 2px; }
.tl-bar.st-paused { opacity: 0.45; }
.tl-bar.st-closed { background: var(--muted); opacity: 0.6; }
.tl-pause {
position: absolute; top: 4px; height: 12px;
background: repeating-linear-gradient(135deg, #c9c7c0 0 4px, #e6e4dd 4px 8px);
border-radius: 1px;
}
.tl-due { position: absolute; top: 1px; bottom: 1px; width: 2px; background: var(--danger); }
.tl-legend { font-family: var(--mono); font-size: 10px; color: var(--muted); text-align: right; }
.checkin-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line-2); font-size: 12px; }
.checkin-list li:last-child { border-bottom: 0; }
/* ---------- 追加面板 ---------- */
.extend {
margin-top: 18px;
border: 1px solid var(--accent);
border-radius: var(--radius);
background: var(--surface);
box-shadow: 0 12px 32px -26px rgba(26, 28, 33, 0.8);
scroll-margin-top: 80px;
}
.drawer .extend { margin: 12px 14px; }
.extend-head {
display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
padding: 12px 14px;
background: var(--accent-soft);
border-bottom: 1px solid rgba(47, 93, 80, 0.2);
}
.extend-head h3 { font-size: 14px; }
.extend-head p { margin: 2px 0 0; font-size: 11px; }
.extend-close { font-size: 20px; line-height: 1; color: var(--ink-2); padding: 0 4px; }
.extend-form { padding: 14px; }
.extend-preview {
display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px;
padding: 10px; margin-bottom: 10px;
background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
}
.extend-preview div { display: flex; flex-direction: column; gap: 1px; }
.extend-preview span { font-size: 10px; color: var(--muted); }
.extend-preview b { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.extend-preview b i { font-style: normal; font-size: 18px; color: var(--accent); }
.extend-preview .add b { color: var(--accent); }
.extend-hint { margin: 0 0 10px; font-size: 11px; color: var(--muted); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 12px; margin-bottom: 12px; }
.minimonth { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.minimonth-title { font-size: 11px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; text-align: center; }
.minimonth-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.minimonth-grid .dow { text-align: center; font-size: 10px; color: var(--muted); }
.miniday {
height: 28px; border: 1px solid transparent; border-radius: 2px;
background: transparent; font: inherit; font-size: 11px; font-family: var(--mono);
color: var(--ink-2); cursor: pointer; padding: 0;
}
.miniday:hover:not(:disabled) { background: var(--accent-soft); border-color: rgba(47, 93, 80, 0.3); }
.miniday.out { color: #c3c1ba; }
.miniday.old { background: var(--warn-soft); border-color: rgba(168, 94, 18, 0.35); font-weight: 700; }
.miniday.today { outline: 1px solid var(--accent); }
.miniday.picked { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.miniday:disabled { color: #d6d4cc; cursor: not-allowed; }
/* ---------- 设置页杂项 ---------- */
.kv { display: grid; gap: 6px; margin: 0 0 14px; }
.kv > div { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: baseline; }
.kv dt { font-size: 11px; color: var(--muted); }
.kv dd { margin: 0; font-size: 12px; word-break: break-all; }
.backups { margin-top: 12px; font-size: 12px; }
.backups summary { cursor: pointer; color: var(--ink-2); }
.backups ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs a {
padding: 7px 12px; font-size: 13px; color: var(--ink-2);
border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
.cal-body { grid-template-columns: 1fr; }
.drawer { position: static; max-height: none; }
.cust-head { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
.topbar { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
.search { order: 3; flex-basis: 100%; max-width: none; }
.nav { order: 4; flex-basis: 100%; overflow-x: auto; }
.topbar-right { order: 2; margin-left: auto; }
main { padding: 0 12px 32px; }
.cal-grid { overflow-x: auto; }
.cal-week, .cal-dow { min-width: 680px; }
.cal-cell { min-height: 96px; }
.grid-2, .grid-3 { grid-template-columns: 1fr; }
.cust-tail { font-size: 24px; }
.tl-row { grid-template-columns: 70px 1fr; }
.tl-legend { display: none; }
.tl-axis { margin-right: 0; }
.extend-preview { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
.pill { display: none; }
.cal-week, .cal-dow { min-width: 0; }
.cal-cell { min-height: 64px; padding: 3px; }
.dnum { font-size: 12px; }
.due-badge { font-size: 9px; padding: 0 4px; line-height: 14px; }
.due-badge em { display: none; }
.cell-load { display: none; }
.cell-tickets { display: none; }
.task { flex-direction: column; }
.task-actions { max-width: none; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
* { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
+108
View File
@@ -0,0 +1,108 @@
/* 代打台 · 交互增强(无框架,全部渐进增强) */
(function () {
'use strict';
/* 提示条自动淡出 */
document.querySelectorAll('[data-flash]').forEach(function (el) {
setTimeout(function () {
el.classList.add('hide');
setTimeout(function () { el.remove(); }, 450);
}, 4200);
});
/* 按 / 聚焦搜索框 */
document.addEventListener('keydown', function (e) {
if (e.key !== '/' || e.metaKey || e.ctrlKey || e.altKey) return;
var tag = (document.activeElement && document.activeElement.tagName) || '';
if (/^(INPUT|TEXTAREA|SELECT)$/.test(tag)) return;
var s = document.querySelector('[data-search]');
if (s) { e.preventDefault(); s.focus(); s.select(); }
});
/* 危险操作确认 */
document.querySelectorAll('form[data-confirm]').forEach(function (f) {
f.addEventListener('submit', function (e) {
if (!window.confirm(f.getAttribute('data-confirm'))) e.preventDefault();
});
});
/* 追加时长面板:点日历挑终止日 + 实时反算 */
function parseDay(s) { return new Date(s + 'T00:00:00'); }
function diffDays(a, b) { return Math.round((b.getTime() - a.getTime()) / 86400000); }
document.querySelectorAll('form[data-extend]').forEach(function (form) {
var base = parseDay(form.getAttribute('data-base'));
var today = parseDay(form.getAttribute('data-today'));
var input = form.querySelector('[data-end-input]');
var endLabel = form.querySelector('[data-end-label]');
var daysEl = form.querySelector('[data-days]');
var remainEl = form.querySelector('[data-remain]');
var buttons = form.querySelectorAll('.miniday');
if (!input) return;
function paint(date) {
if (!date) return;
var d = parseDay(date);
input.value = date;
if (endLabel) endLabel.textContent = date;
var days = diffDays(base, d) + 1;
if (daysEl) daysEl.textContent = days > 0 ? days : 0;
var remain = diffDays(today, d) + 1;
if (remainEl) remainEl.textContent = remain > 0 ? remain : 0;
buttons.forEach(function (b) {
b.classList.toggle('picked', b.getAttribute('data-date') === date);
});
}
buttons.forEach(function (b) {
b.addEventListener('click', function () {
if (!b.disabled) paint(b.getAttribute('data-date'));
});
});
input.addEventListener('change', function () { paint(input.value); });
if (input.value) paint(input.value);
});
/* 新订阅表单:按套餐类型切换「天数 / 次数 / 终止日」 */
document.querySelectorAll('form[data-sub-form]').forEach(function (form) {
var sel = form.querySelector('[data-pkg-select]');
var daysWrap = form.querySelector('[data-days-wrap]');
var countWrap = form.querySelector('[data-count-wrap]');
var endWrap = form.querySelector('[data-end-wrap]');
if (!sel) return;
function sync() {
var opt = sel.options[sel.selectedIndex];
var unit = opt && opt.getAttribute('data-unit');
var amount = opt && opt.getAttribute('data-amount');
if (unit === 'count') {
if (daysWrap) daysWrap.hidden = true;
if (countWrap) { countWrap.hidden = false; if (amount) countWrap.querySelector('input').value = amount; }
if (endWrap) endWrap.hidden = true;
} else if (unit === 'day') {
if (daysWrap) { daysWrap.hidden = false; if (amount) daysWrap.querySelector('input').value = amount; }
if (countWrap) countWrap.hidden = true;
if (endWrap) endWrap.hidden = false;
} else {
if (daysWrap) daysWrap.hidden = false;
if (countWrap) countWrap.hidden = true;
if (endWrap) endWrap.hidden = true;
}
}
sel.addEventListener('change', sync);
sync();
});
/* 套餐表单:切换默认量单位文案 */
document.querySelectorAll('form[data-package-form]').forEach(function (form) {
var label = form.querySelector('[data-unit-label]');
var radios = form.querySelectorAll('input[name="unit"]');
function sync() {
var v = 'day';
radios.forEach(function (r) { if (r.checked) v = r.value; });
if (label) label.textContent = v === 'count' ? '次' : '天';
}
radios.forEach(function (r) { r.addEventListener('change', sync); });
sync();
});
})();
+9
View File
@@ -0,0 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
<rect width="64" height="64" rx="6" fill="#2F5D50"/>
<rect x="6" y="14" width="52" height="36" rx="3" fill="none" stroke="#F7F6F2" stroke-width="3"/>
<path d="M10 34h44" stroke="#F7F6F2" stroke-width="2" stroke-dasharray="4 4" opacity="0.55"/>
<rect x="12" y="20" width="14" height="7" fill="#F7F6F2"/>
<rect x="32" y="20" width="20" height="3" fill="#F7F6F2" opacity="0.8"/>
<rect x="32" y="26" width="12" height="3" fill="#F7F6F2" opacity="0.5"/>
<rect x="12" y="42" width="24" height="3" fill="#F7F6F2" opacity="0.7"/>
</svg>

After

Width:  |  Height:  |  Size: 627 B

+212
View File
@@ -0,0 +1,212 @@
/* ============================================================
代打台 · 可视化大屏(深色「记分板」)
============================================================ */
:root {
--bg: #070a0f;
--panel: #0e141c;
--panel-2: #121a24;
--line: #1b2530;
--ink: #e8eef2;
--dim: #7d8b99;
--mint: #35e0c6;
--mint-dim: rgba(53, 224, 198, 0.14);
--amber: #f5a524;
--red: #f2555a;
--mono: "Bahnschrift", "Consolas", "SF Mono", ui-monospace, monospace;
--sans: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.screen-body {
background:
radial-gradient(1200px 600px at 15% -10%, rgba(53, 224, 198, 0.07), transparent 60%),
radial-gradient(900px 500px at 100% 0%, rgba(245, 165, 36, 0.05), transparent 55%),
var(--bg);
color: var(--ink);
font-family: var(--sans);
font-size: 14px;
min-height: 100vh;
overflow-x: hidden;
}
a { color: var(--mint); text-decoration: none; }
a:hover { opacity: 0.8; }
.scr {
display: flex; flex-direction: column;
min-height: 100vh;
padding: clamp(12px, 1.4vw, 22px) clamp(14px, 1.8vw, 28px);
gap: clamp(10px, 1.1vw, 16px);
}
.scr-head { display: flex; align-items: center; gap: 16px; }
.scr-brand {
display: flex; align-items: center; gap: 10px;
font-size: clamp(15px, 1.2vw, 19px); font-weight: 700; letter-spacing: 0.1em;
}
.scr-brand .mark {
display: grid; place-items: center;
width: 30px; height: 30px; border-radius: 3px;
background: var(--mint); color: #04211d; font-size: 15px;
box-shadow: 0 0 22px rgba(53, 224, 198, 0.45);
}
.scr-brand em { font-style: normal; color: var(--dim); font-weight: 400; letter-spacing: 0.24em; font-size: 0.7em; }
.scr-clock { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; }
.scr-clock b {
font-family: var(--mono); font-size: clamp(24px, 2.4vw, 36px);
font-weight: 600; line-height: 1;
color: var(--ink); letter-spacing: 0.04em;
text-shadow: 0 0 22px rgba(53, 224, 198, 0.25);
}
.scr-clock span { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: 0.1em; }
.scr-links { font-size: 11px; color: var(--dim); }
/* KPI */
.scr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 0.9vw, 14px); }
.kpi {
position: relative; overflow: hidden;
background: linear-gradient(180deg, var(--panel-2), var(--panel));
border: 1px solid var(--line);
border-radius: 4px;
padding: clamp(10px, 1vw, 16px) clamp(12px, 1.2vw, 20px);
}
.kpi::before {
content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
background: var(--mint); opacity: 0.75;
}
.kpi-warm::before { background: var(--amber); }
.kpi-hot::before { background: var(--red); }
.kpi span { display: block; font-size: 11px; color: var(--dim); letter-spacing: 0.16em; }
.kpi b {
font-family: var(--mono); font-size: clamp(28px, 3.4vw, 52px); font-weight: 700;
line-height: 1.15; letter-spacing: -0.01em;
}
.kpi i { font-style: normal; font-size: 11px; color: var(--dim); margin-left: 4px; }
.kpi-hot b { color: var(--red); }
.kpi-warm b { color: var(--amber); }
/* 主区 */
.scr-main { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(10px, 1.1vw, 16px); flex: 1 1 auto; }
.panel {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 4px;
padding: clamp(10px, 1vw, 16px);
display: flex; flex-direction: column; min-height: 0;
}
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.panel-head h2 {
margin: 0; font-size: clamp(12px, 0.95vw, 14px); font-weight: 600; letter-spacing: 0.08em;
color: var(--ink);
}
.panel-head h2::before {
content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px;
background: var(--mint); vertical-align: 2px;
}
.panel-head span { font-size: 11px; color: var(--dim); font-family: var(--mono); }
/* 热力月历 */
.heat-grid { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.heat-dow, .heat-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.heat-row { flex: 1 1 0; min-height: 0; }
.heat-dow { flex: 0 0 auto; }
.heat-dow span { text-align: center; font-size: 10px; color: var(--dim); }
.heat-cell {
position: relative;
display: flex; flex-direction: column; justify-content: space-between;
min-height: 34px;
padding: 5px 6px;
border: 1px solid var(--line);
border-radius: 3px;
background: #0a1017;
}
.heat-cell span { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.heat-cell b {
align-self: flex-end; font-family: var(--mono); font-size: clamp(12px, 1.1vw, 16px);
color: var(--mint); font-weight: 700;
}
.heat-cell.out { opacity: 0.28; }
.heat-cell.today { border-color: var(--mint); box-shadow: 0 0 0 1px rgba(53, 224, 198, 0.35), 0 0 18px rgba(53, 224, 198, 0.16); }
.heat-cell.h1 { background: rgba(53, 224, 198, 0.08); border-color: rgba(53, 224, 198, 0.22); }
.heat-cell.h2 { background: rgba(53, 224, 198, 0.15); border-color: rgba(53, 224, 198, 0.3); }
.heat-cell.h3 { background: rgba(53, 224, 198, 0.24); border-color: rgba(53, 224, 198, 0.42); }
.heat-cell.h4 { background: rgba(53, 224, 198, 0.36); border-color: rgba(53, 224, 198, 0.6); }
.heat-cell.h3 b, .heat-cell.h4 b { color: #eafffb; }
.heat-legend { display: flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 10px; color: var(--dim); flex: 0 0 auto; }
.heat-legend i { width: 18px; height: 9px; border-radius: 2px; border: 1px solid #26313d; }
.heat-legend .h0 { background: #0a1017; }
.heat-legend .h1 { background: rgba(53, 224, 198, 0.16); }
.heat-legend .h2 { background: rgba(53, 224, 198, 0.28); }
.heat-legend .h3 { background: rgba(53, 224, 198, 0.42); }
.heat-legend .h4 { background: rgba(53, 224, 198, 0.6); }
/* TOP10 */
.top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.top-item {
display: grid; grid-template-columns: 22px auto 1fr auto auto;
grid-template-areas: "rank tail name pkg remain" "rank bar bar bar bar";
column-gap: 8px; row-gap: 3px;
align-items: center;
padding: 5px 8px;
border-radius: 3px;
background: #0a1017;
border-left: 2px solid transparent;
}
.top-item .rank { grid-area: rank; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.top-tail { grid-area: tail; font-family: var(--mono); font-size: clamp(13px, 1.15vw, 17px); font-weight: 700; letter-spacing: 0.03em; }
.top-name { grid-area: name; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-pkg {
grid-area: pkg; font-size: 10px; color: var(--dim);
border-left: 2px solid var(--tag); padding-left: 5px;
}
.top-remain { grid-area: remain; font-family: var(--mono); font-size: 12px; color: var(--mint); }
.top-bar { grid-area: bar; height: 3px; background: #16202b; border-radius: 999px; overflow: hidden; }
.top-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), rgba(53, 224, 198, 0.35)); }
.top-item.lv-warn { border-left-color: var(--amber); }
.top-item.lv-warn .top-remain { color: var(--amber); }
.top-item.lv-warn .top-bar i { background: linear-gradient(90deg, var(--amber), rgba(245, 165, 36, 0.3)); }
.top-item.lv-today, .top-item.lv-expired { border-left-color: var(--red); }
.top-item.lv-today .top-remain, .top-item.lv-expired .top-remain { color: var(--red); }
.top-item.lv-today .top-bar i, .top-item.lv-expired .top-bar i { background: linear-gradient(90deg, var(--red), rgba(242, 85, 90, 0.3)); }
/* 底部 */
.scr-bottom { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(10px, 1.1vw, 16px); }
.today-list, .recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 22vh; overflow: hidden; }
.today-list li {
display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
padding: 4px 6px; border-bottom: 1px solid rgba(27, 37, 48, 0.6);
}
.tchip {
display: inline-flex; align-items: baseline; gap: 3px;
padding: 1px 6px; font-size: 11px;
border-left: 3px solid var(--tag);
background: rgba(255, 255, 255, 0.04);
border-radius: 1px 2px 2px 1px;
}
.tchip b { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.today-list .pkg, .recent-list .pkg { font-size: 11px; color: var(--dim); }
.today-list .rem { font-family: var(--mono); font-size: 11px; color: var(--mint); }
.recent-list li { display: flex; align-items: center; gap: 8px; padding: 3px 4px; font-size: 11px; border-bottom: 1px solid rgba(27, 37, 48, 0.6); }
.recent-list .time { color: var(--dim); font-size: 10px; }
.recent-list .who b { font-family: var(--mono); font-size: 12px; margin-right: 4px; }
.recent-list .plus { margin-left: auto; color: var(--mint); font-family: var(--mono); font-style: normal; }
.recent-list .op { color: var(--dim); }
.scr-foot { font-size: 10px; color: #47535f; text-align: right; letter-spacing: 0.12em; }
.scr-empty { margin: auto; color: var(--dim); font-size: 12px; text-align: center; }
@media (max-width: 1100px) {
.scr-kpis { grid-template-columns: repeat(2, 1fr); }
.scr-main, .scr-bottom { grid-template-columns: 1fr; }
.heat-cell { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
* { animation: none !important; transition: none !important; }
}
+29
View File
@@ -0,0 +1,29 @@
/* 大屏:时钟 + 全屏快捷键 */
(function () {
'use strict';
function pad(n) { return n < 10 ? '0' + n : '' + n; }
function tick() {
var d = new Date();
var clock = document.querySelector('[data-clock]');
if (clock) clock.textContent = pad(d.getHours()) + ':' + pad(d.getMinutes()) + ':' + pad(d.getSeconds());
var dateEl = document.querySelector('[data-date]');
if (dateEl) {
dateEl.textContent = d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()) +
' 周' + '日一二三四五六'.charAt(d.getDay());
}
}
tick();
setInterval(tick, 1000);
document.addEventListener('keydown', function (e) {
if (e.key === 'f' || e.key === 'F') {
if (document.fullscreenElement) {
document.exitFullscreen();
} else if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
}
}
});
})();