/* ── 设计变量 ─────────────────────────────────────────── */ :root { --bg: #f5f5f7; --surface: #fff; --border: #e8e8ed; --text: #1d1d1f; --text-2: #6e6e73; --accent: #0071e3; --accent-h: #0077ed; --danger: #d70015; --accent-2: #5ac8fa; --accent-3: #af52de; --ok: #34c759; --warn: #ff9f0a; --bad: #ff3b30; --r: 12px; --r-sm: 8px; --shadow: 0 1px 3px rgba(0,0,0,0.04); --shadow-lg: 0 8px 24px rgba(0,0,0,0.12); } /* ── 基础 ─────────────────────────────────────────────── */ * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; } html, body { margin: 0; } body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; padding: 16px; padding-bottom: calc(72px + env(safe-area-inset-bottom)); } .container { max-width: 1200px; margin: 0 auto; } /* 子页→首页返回键:贴在标题同一行,不占额外行高(单页场景脚本自动移除,见各模板尾部守卫) */ .crumb { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -6px; border-radius: 50%; color: var(--text-2); text-decoration: none; font-size: 20px; line-height: 1; } .crumb:hover { color: var(--accent); background: rgba(0,113,227,0.08); } .page-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; } .page-hd h1 { margin: 0; } h1 { font-size: 20px; margin: 4px 0 20px; letter-spacing: -0.02em; } /* ── 卡片 ─────────────────────────────────────────────── */ .card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; } .card-pad { padding: 18px; margin-bottom: 16px; overflow: hidden; } .card h2 { font-size: 14px; font-weight: 600; margin: 0 0 14px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; } /* ── 按钮 ─────────────────────────────────────────────── */ .btn { appearance: none; border: none; background: var(--accent); color: #fff; font: inherit; font-weight: 500; padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: background .15s, transform .05s; } .btn:hover { background: var(--accent-h); } .btn:active { transform: scale(0.97); } /* ── 搜索框 ───────────────────────────────────────────── */ .search { width: 100%; border: 1px solid var(--border); background: var(--bg); border-radius: var(--r-sm); padding: 8px 12px; font: inherit; outline: none; transition: border-color .15s, background .15s; } .search:focus { border-color: var(--accent); background: var(--surface); } /* ── 状态提示 ─────────────────────────────────────────── */ .msg { text-align: center; padding: 56px 20px; color: var(--text-2); } .msg.err { color: var(--danger); } /* ── 状态 pill ────────────────────────────────────────── */ .pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--bg); color: var(--text-2); } .pill.ok { color: var(--ok); background: rgba(52,199,89,.12); } .pill.ship { color: #0a84ff; background: rgba(90,200,250,.18); } .pill.pay { color: var(--warn); background: rgba(255,159,10,.15); } .pill.refund { color: var(--bad); background: rgba(255,59,48,.12); } /* ── 表格 ─────────────────────────────────────────────── */ .tw { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th, td { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; } th { color: var(--text-2); font-weight: 500; font-size: 13px; cursor: pointer; user-select: none; } th:hover { color: var(--text); } th .ar { font-size: 10px; margin-left: 4px; opacity: .7; } td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; } td.ed { cursor: text; } td.ed:hover { background: rgba(0,113,227,0.04); } tr:last-child td { border-bottom: none; } .col-ac { width: 40px; } .del { appearance: none; background: none; border: none; color: var(--text-2); cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 8px; border-radius: 6px; } .del:hover { color: var(--danger); background: rgba(215,0,21,0.08); } /* ── 分页 ─────────────────────────────────────────────── */ .pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); } .pager button { appearance: none; border: 1px solid var(--border); background: var(--surface); font: inherit; padding: 5px 12px; border-radius: 999px; cursor: pointer; } .pager button:disabled { opacity: .4; cursor: default; } /* ── 对话框表单 ───────────────────────────────────────── */ dialog { border: none; border-radius: var(--r); padding: 0; box-shadow: var(--shadow-lg); width: min(420px, calc(100vw - 32px)); } dialog::backdrop { background: rgba(0,0,0,0.35); } .form { padding: 22px; } .form h3 { margin: 0 0 18px; font-size: 16px; } .fld { margin-bottom: 14px; } .fld label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; } .fld input, .fld select { width: 100%; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; font: inherit; outline: none; transition: border-color .15s; background: var(--surface); color: var(--text); } .fld input:focus, .fld select:focus { border-color: var(--accent); } .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; } .acts button { font: inherit; padding: 8px 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); } .acts .pri { background: var(--accent); color: #fff; border-color: var(--accent); } .acts .pri:hover { background: var(--accent-h); } /* ── 统计卡片 ─────────────────────────────────────────── */ .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; } .stat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; } .stat .lbl { color: var(--text-2); font-size: 12px; margin-bottom: 4px; } .stat .val { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } /* ── 横向条 ───────────────────────────────────────────── */ .bars { display: flex; flex-direction: column; gap: 10px; } .bar-row { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 12px; align-items: center; } .bar-row .k { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .bar-row .bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; } .bar-row .bar > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s ease; } .bar-row:nth-child(3n+2) .bar > i { background: var(--accent-2); } .bar-row:nth-child(3n) .bar > i { background: var(--accent-3); } .bar-row .v { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 40px; text-align: right; } /* ── 表格滚动容器 ─────────────────────────────────────── */ .table-scroll { overflow-x: auto; margin: 0 -18px; padding: 0 18px; } /* ── 看板 ─────────────────────────────────────────────── */ .board-outer { overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; } .board { display: flex; gap: 12px; width: fit-content; margin: 0 auto; } .col { flex: 0 0 260px; scroll-snap-align: start; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); display: flex; flex-direction: column; max-height: calc(100vh - 140px); } .col-hd { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; } .col-hd .n { color: var(--text-2); font-weight: 400; font-size: 12px; background: var(--bg); padding: 1px 8px; border-radius: 999px; } .col-bd { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; } .kanban-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; } .kanban-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); } .kanban-card .t { font-size: 13px; font-weight: 500; line-height: 1.4; } .kanban-card .meta { display: flex; flex-wrap: wrap; gap: 6px; } .kanban-card .meta span { font-size: 11px; color: var(--text-2); background: var(--bg); padding: 2px 7px; border-radius: 999px; } .kanban-card .mv { display: flex; gap: 6px; margin-top: 2px; } .kanban-card .mv button { appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 6px; transition: all .15s; } .kanban-card .mv button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); } .kanban-card .mv button:disabled { opacity: .3; cursor: default; } .col-bd .empty { text-align: center; color: var(--text-2); padding: 20px 8px; font-size: 12px; } /* ── 返回应用 FAB ─────────────────────────────────────── */ .fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; border: none; box-shadow: 0 4px 12px rgba(0,113,227,0.3); cursor: pointer; z-index: 100; display: flex; align-items: center; justify-content: center; } .fab:hover { filter: brightness(1.08); } .fab:active { transform: scale(0.94); } /* ── 响应式 ───────────────────────────────────────────── */ @media (max-width: 480px) { body { padding: 8px; padding-bottom: calc(64px + env(safe-area-inset-bottom)); } h1 { font-size: 18px; margin-bottom: 14px; } .stat .val { font-size: 20px; } th, td { padding: 8px 12px; font-size: 13px; } }